User:Misterhaan/Ubuntu 22.10 Kinetic Kudu Setup: Difference between revisions
Misterhaan (talk | contribs) (openconnect (not letting me configure yet)) |
Misterhaan (talk | contribs) No edit summary |
||
Line 27: | Line 27: | ||
== remote control == | == remote control == | ||
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. setting the password means if someone else got access to my laptop they could also access my desktop, so be sure to weigh the convenience against security for your situation. | 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. setting the password means if someone else got access to my laptop they could also access my desktop, so be sure to weigh the convenience against security for your situation. | ||
i connect to my work computer over rdp, which i also do through remmina. create a new connection leaving the protocol on the default of RDP - Remote Desktop 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 -- it has to be added to the list using the ... button before you can choose it), 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. on the first connection (we'll need to set up and connect to vpn first), it asks to accept a certificate for the machine. | |||
in remmina preferences i turn off the setting that prevents screenshots from entering clipboard. then under applet, check the box to start in tray upon user login. under keyboard i clear the host key since 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 separately from mapping it locally because rdp doesn't care about local mappings). | |||
== work vpn == | == work vpn == | ||
Line 33: | Line 37: | ||
sudo apt install openconnect network-manager-openconnect network-manager-openconnect-gnome | sudo apt install openconnect network-manager-openconnect network-manager-openconnect-gnome | ||
now go to | now go to the network icon in the panel (lower right, probably looks like wifi), click it, and choose "Network Connections." add a new connection using the plus button in the lower left of that window, and choose "Cisco AnyConnect or OpenConnect (OpenConnect)" from under the VPN heading. 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. save the connection. | ||
now, just under the list of available SSIDs in the network menu it will show "VPN Connections" with a toggle next to it. select this to 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 anyconnect doesn't either. disconnect by toggling VPN Connections back to off. |
Revision as of 11:36, 17 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.
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:
- 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 install nfs-common
- edit
/etc/fstab
as root withsudo gedit /etc/fstab
and add a line for each nfs share to mount, in this format:server:/nfs_share /local/mount/point nfs noexec,noauto 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. the noauto
in fstab tells the system not to attempt to mount those shares on startup, so it doesn't have to wait for that to fail when they're not available. the NetworkManager script makes sure to mount them once connected to the correct wifi, but if you're going to connect to your network with a cable it's not going to do anything.
remote control
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. setting the password means if someone else got access to my laptop they could also access my desktop, so be sure to weigh the convenience against security for your situation.
i connect to my work computer over rdp, which i also do through remmina. create a new connection leaving the protocol on the default of RDP - Remote Desktop 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 -- it has to be added to the list using the ... button before you can choose it), 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. on the first connection (we'll need to set up and connect to vpn first), it asks to accept a certificate for the machine.
in remmina preferences i turn off the setting that prevents screenshots from entering clipboard. then under applet, check the box to start in tray upon user login. under keyboard i clear the host key since 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 separately from mapping it locally because rdp doesn't care about local mappings).
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, even for cinnamon):
sudo apt install openconnect network-manager-openconnect network-manager-openconnect-gnome
now go to the network icon in the panel (lower right, probably looks like wifi), click it, and choose "Network Connections." add a new connection using the plus button in the lower left of that window, and choose "Cisco AnyConnect or OpenConnect (OpenConnect)" from under the VPN heading. 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. save the connection.
now, just under the list of available SSIDs in the network menu it will show "VPN Connections" with a toggle next to it. select this to 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 anyconnect doesn't either. disconnect by toggling VPN Connections back to off.