User:Misterhaan/Ubuntu 22.10 Kinetic Kudu Setup: Difference between revisions

From auWiki
Jump to navigation Jump to search
(started setting up 22.10)
(No difference)

Revision as of 21:48, 15 December 2022

i use ubuntu linux as my main operating system on my laptop. since the laptop came with windows 10 (which i upgraded to windows 11), i keep that around so i can choose windows on startup when i need one of the manufacturer's utilities.these instructions are what i did when i installed ubuntu cinnamon 22.10 kinetic kudu on my laptop westinghouse.

connections to other systems

most of what i use my laptop for is connecting to other systems, including my home file shares. i set those up first so i have access to my files and the ability to connect to my home desktop and work computer right away.

home server nfs shares

i have command-line ubuntu installed on a different computer at home that stores my files, so my laptop should mount its shares when i'm on my home network. i can't just do a normal mount because if i travel with my laptop, my home server isn't available and i have to wait for those connections to time out before it will finish booting. still, the first couple steps are the same as mounting the shares from a desktop:

  1. edit /etc/hosts as root with sudo gedit /etc/hosts and add a line mapping the lan ip of the server to its name. follow the format of the line that has 127.0.0.1 localhost. saving this change makes sure the laptop can resolve the name of the server, which sometimes doesn't work without this setting.
  2. install nfs support with sudo apt install nfs-common
  3. edit /etc/fstab as root with sudo gedit /etc/fstab and add a line for each nfs share to mount, in this format: server:/nfs_share /local/mount/point nfs noexec 0 0
  4. create the local mount points for each share (the second column in fstab) with a command like sudo mkdir /local/mount/point
  5. create a new file as root in /etc/NetworkManager/dispatcher.d/ and enter the following code (make sure to put in your uuid and your actual mount points), then set its permissions to rwxr-xr-x with chmod 755 /etc/NetworkManager/dispatcher.d/nfs-mount:
#!/bin/bash
SSID="your-wifi-ssid"
INTERFACE=$1
ACTION=$2
ESSID=`iwconfig $INTERFACE | grep ESSID | cut -d":" -f2 | sed 's/^[^"]*"\|"[^"]*$//g'`

if [ "$SSID" == "$ESSID" ] && [ "$ACTION" == "up" ]; then
	mount /local/mount/point/one
	mount /local/mount/point/two
fi

the network shares should be mounted whenever connecting to the wifi SSID.