User:Misterhaan/Ubuntu 22.04 Jammy Jellyfish Setup: Difference between revisions
Misterhaan (talk | contribs) No edit summary |
Misterhaan (talk | contribs) |
||
Line 7: | Line 7: | ||
key <CAPS> { [ Insert ] }; | key <CAPS> { [ Insert ] }; | ||
this takes effect on your next login. it doesn’t | this takes effect on your next login. it doesn’t apply when using remmina to rdp though. | ||
= connections to other systems = | = connections to other systems = |
Revision as of 21:41, 28 April 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 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.
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.
connections to other systems
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:
- edit
/etc/hosts
as root withsudo 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. - install nfs support with
sudo apt-get install nfs-common
- edit
/etc/fstab
as root withsudo 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
- create the local mount points for each share (the second column in fstab) with a command like
sudo mkdir /local/mount/point
- 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 withchmod 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.
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. TODO: make sure this works: under rdp, check the box for client keyboard mapping to make sure my caps lock remapped to insert works.