These directions are for remotely connecting to a Linux computer using a VNC server.
Must have a good internet connection in order for it to not be extremely slow, but note that the school's VPN may be the issue if connection is really slow.
We will be using either TigerVNC or RealVNC, which include the VNC Viewer and the VNC Server.
vncpasswd into PuTTY to create a password file in ~/.vnc. The password can only be up to 8 characters long.~/.vnc called xstartup containing the following code:#!/bin/sh vncconfig -iconic & unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS exec /usr/bin/xfce4-session [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic &
chmod +x xstartup~/.vnc called config that contains this line:session=xfce
systemctl start vncserver@:#.service, replacing the # with your display number.littlestorm.atmos.und.edu:#, again replacing # with your display number.systemctl stop vncserver@:#.service, again replacing # with your display number. This will end your VNC session on the server, freeing up important resources.* Simplified steps for future use after initial set up:
systemctl start vncserver@:#.servicesystemctl stop vncserver@:#.serviceLinux has several options for a desktop environment, which include GNOME and Xfce. GNOME is the default, but it seems to take up to 20GB of memory on busy servers like Littlestorm after running for several weeks/months. Hence, users should use the Xfce environment instead of GNOME on Littlestorm.
If you set up your VNC using the 06/2026 instructions at the top of the page, then you will already be using Xfce. To be sure, look at the top left of the VNC window. If the symbol to the left of Applications is a blue X with a mouse in front, you're running Xfce. If your VNC was set up previously and uses GNOME, please swap to Xfce when possible. To do so, edit your xstartup file and make sure it contains the lines
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS exec /usr/bin/xfce4-session
Get rid of the line exec /etc/X11/xinit/xinitrc if it is present.
You will also need to create a config file in ~/.vnc that contains
session=xfce
If you already have a config file, make sure it contains this line. The next time you start your VNC session, it should be running Xfce.
vncpasswd, next enter the password you would like to use when accessing the server computer. (This will only be your VNC password when you are starting VNC) vncserver to start the server. More information and functions about starting and killing the server in the Extra Information section of this page.chmod +x xstartup in terminal window#!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & mate-session &
#!/bin/sh #Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & mate-session &
vncserver vncserver :* (where * is the display number, make sure you watch your spacing!) mkdir /home/<user.name>/bin
vi vncaircraft
#!/bin/bash # Shell Access Aircraft using vnc client export VNC_VIA_CMD='/usr/bin/ssh -2 -c aes128-cbc -x -p 22 -f -L %L:%H:%R %G sleep 2' /usr/bin/vncviewer -FullColor -passwd ~/.vnc/passwd -via aircraft.atmos.und.edu :1
chmod +x vncaircraft
vncpasswd
If it asks you if you would like to enter a view-only password say yes.
/home/<user.name>/bin
directory and run vncaircraft
./vncaircraft
ls ~/.vnc/*.pid computer_name:1.pid
vncserver -kill :* (where * is the number of the display)ps -ef | grep -i Xvnc
1) Connect to the campus' VPN
2) Use PuTTY or the like to connect to the computer you want to remotely access
3) Start the VNC server as described in the Starting and Killing the Remote Linux VNC Server section and take note of the display number you are assigned
New 'computer_name.atmos.und.edu:1 (username)' desktop is computer_name.atmos.und.edu:1
4) Exit out of PuTTY while keeping the previous terminal open, reopen PuTTY, and type the following:
5) Open VNC Viewer and type into the VNC Server box: localhost:?? where ?? is the display number assigned to you
You can access vnc through a Linux (i.e. Redhat) terminal window with the following command:
vncviewer -via <IP address> :<display number>
With the case of esxfedoralo, it would be the following command:
vncviewer -via 134.129.214.58 :<display number>
OS X has a built in VNC viewer, so no extra software is needed to access the VNC server.
To access the VNC server: — David Delene 2020/10/19 23:12
To change the VNC viewer resolution:
To allow scripting to access VNC, people may want to use the same display number, Hence, below is list, please add your name and number. Please use vncserver :? where ? is your display number.
* Active Users
To see who is using VNC Server session use the command “ps -ef | grep -i Xvnc”. This can also be used to check if your own session is running. To kill your session, use systemctl stop vncserver@:#.service, where # is your display number.
- Error Example: Attempting to run VNC, you may get the error 'Timed out waiting for a response from the computer.' Use above command to check your session. If your session is not running, start it with systemctl start vncserver@:#.service, where # is your display number.