User:Misterhaan/Ubuntu 22.04 Jammy Jellyfish Setup

From auWiki
Jump to navigation Jump to search

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 if i really want to. mostly i used that to let my son play minecraft bedrock edition before he got his own laptop. these instructions are what i did when i installed ubuntu 22.04 jammy jellyfish on my laptop galileo.

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 virtutal machine on my 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-get install nfs-common
  3. edit /etc/fstab as root with sudo gedit /etc/fstab and add a line for each nfs share to mount, similar to this: 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.

remmina is in the default ubuntu install and works well to connect to my home desktop using vnc (i use tightvnc server on windows 11 there). i create two connections for that -- one that uses my lan ip and another that uses the subdomain i keep mapped to my internet ip. both use remmina vnc plugin for the protocol and specify [ip]:[port] or [subdomain]:[port] since i use a custom vnc port. username can be left blank, and user password can save my connection password. i'm sure setting that is a security risk if someone else got access to my laptop, but as usual convenience and security are opposed and i connect to my desktop enough that i prefer the convenience here.

work vpn

my job provides cisco anyconnect vpn for me to connect remotely, but thankfully it's compatible with openconnect which is *much* easier to use and integrates with the network manager built into ubuntu. install openconnect, its network manager integration, and its editor (gnome is the name of the desktop environment ubuntu uses):

sudo apt-get install openconnect network-manager-openconnect network-manager-openconnect-gnome

now go to settings > network and add a vpn connection using "Multi-protocol VPN client (openconnect)." give it a name (i use the company name) and enter the vpn server as the gateway (something like vpn.example.com). the vpn protocol should already be set to "cisco anyconnect or openconnect" from the earlier choice.

now, just under your wifi line in the system menu it should say "vpn off," which you can expand and choose connect. the first time you do this it will prompt for username and password, which you can tell it to remember so it's even easier next time. the window stays open for me until i confirm that it's me connecting through the authenticator app on my phone -- my only real problem with this system is that it doesn't tell me i need to do that if i'm only looking at my laptop . . . but i don't think anyconnect did either.

while connected, there's a vpn icon next to the wifi icon. disconnect by expanding the name you gave to the vpn connection in the system menu and choosing "turn off."

for connecting to my work computer, i use remmina remote desktop client, which comes installed in ubuntu. create a new connection using the rdp protocol and set the server, username, password, and domain for the connection. choose a custom resolution (i use 2560x1440 since that's the resolution of the monitor i have at work), then switch to the advanced tab and change audio output mode to local to get both the speakers and microphone to work. save the connection.

in remmina preferences under keyboard i clear the host key i commonly use the right control key for normal keyboard shortcuts, and i don't really need to give up another key for remmina shortcuts i don't remember anyway. under rdp, map the caps lock key to insert by entering 0x3a=0x52 for keyboard scancode remapping (needs to be done even when it's already been done for the base machine).

configuration

map caps lock key as insert

to remap capslock to insert for the entire machine, edit /usr/share/X11/xkb/symbols/pc as root, and set the key <CAPS> line to:

key <CAPS> {	[ Insert	]	};

this takes effect on your next login. it doesn’t apply when using remmina to rdp though.

system settings

background

default background files are /usr/share/backgrounds/, so that's where i put my own backgrounds. this isn't enough to make them automatically show in settings > background though, so use the add picture button to get backgrounds added to settings, then select.

appearance

i set my system appearance to dark style and choose my favorite accent color. i also turn off show personal folder from desktop icons and turn down the icon size in the dock to 40.

sound

one of the reasons i prefer linux on my laptop is the over-amplification setting. turn this on and the volume can go up above 100%, which is often handy running off built-in speakers. you can also choose your favorite alert sound at the bottom.

power

upgrading to 22.04 seems to have solved the problem i was having with the screen not coming back on waking from sleep, so the only thing i do in power settings is to change power button behavior to nothing. my laptop's power button is placed where i can very easily hit it by accident when picking it up so i prefer that it ignores when that happens.

mouse & touchpad

"natural scrolling" has always felt backward to me, so i turn that off under touchpad. this doesn't affect mouse wheels or the touch screen, just two-finger touchpad scrolling.

printers

my canon mg 3520 all in one printer is detected and easy to add with just a click or two if it doesn't automatically connect.

users

similar to background files, i create /usr/share/avatars/ to hold user avatars. there are some default avatar choices but i haven't even found where those come from. the users section of settings will show the user you're logged in as by default. click the circle next to use username and then choose select a file and select your avatar. you can also enroll fingerprints here if you have a fingerprint reader. my laptop does but it's not really functional at matching my fingerprints, so may not be worth it.

set login screen background

system settings doesn't give you an option to set the background for the login screen, but if you set a setting for the gdm user it can look to a file. it seems you need to install machinectl from the systemd-container package so you can switch to gdm. these three commands will set the login screen background (skip the first one if it's not your first time) -- use the correct path to your background file:

sudo apt-get install systemd-container
sudo machinectl shell gdm@ /bin/bash
gsettings set com.ubuntu.login-screen background-picture-uri 'file:///usr/share/backgrounds/login.jpg'

machinectl says you can quit with ^[ 3 times, and that means hold the ctrl key and press the [ key 3 times.

firefox touch scroll zoom

while the touch screen makes most windows scroll, firefox selects text by default. to make a lasting change edit /etc/security/pam_env.conf and add a line (i add it to the end) with MOZ_USE_XINPUT2 DEFAULT=0 OVERRIDE=1. this should take effect on next login.

start remmina in tray at login

even though remmina preferences includes a checkbox for start in tray upon user login, it won't actually start itself just from having that box checked. run startup applications by searching for it or using the command gnome-session-properties. click the add button, give it a name such as remmina tray, and enter remmina -i as the command.

install software

here's a bunch of software i find useful to add:

sudo apt-get install gimp puddletag steam xsane

visual studio code

visual studio code isn't in the default repositories, but these commands add its repository and install from it:

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt-get install code

zoom

wget https://zoom.us/client/latest/zoom_amd64.deb
sudo apt install ./zoom_amd64.deb
rm zoom_amd64.deb

apply puddletag settings

i keep a couple tarballs of most of my puddletag settings, since they are stored in two different locations. extract them with these commands:

cd ~/.config
tar xvf /path/to/puddleconfig.tar
cd ~/.local/share
tar xvf /path/to/puddlelocal.tar

launch puddletag to set up the window, which is not in any of those settings. move the tag panel to the right side, close the filter panel from the bottom, turn on artwork and actions from the windows menu, and then move the actions panel up to just left of the tag panel.

remove software

sudo apt-get remove rhythmbox simple-scan
sudo apt-get autoremove