User Tools

Site Tools


atmos:citation:soft:vnc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
atmos:citation:soft:vnc [2025/12/02 21:32] deleneatmos:citation:soft:vnc [2026/06/13 10:26] (current) delene
Line 1: Line 1:
-====== Update August 21, 2024 ======+====== VNC Virtual Network Computing======
  
 +These directions are related to enabling you to remotely connecting to a Linux computer (i.e. Aircraft or Littlestorm) using a VNC client. You should have a good internet connection in order for the session to not be extremely slow. Additionally, you likely need to use the UND VPN to enable network access. You should be using either use TigerVNC or RealVNC clients, which include the VNC Viewer and the VNC Server; however, to access the Linux VNC server, you will need to run the VNC Viewer (client) locally. Users are able to start and top their own VNC servers on Littlestorm. To reduce memory usage on Littlestorm, user should run the XFCE4 Desktop environment on Littlestorm, instead of the default gnome desktop environment. You will need to start the XFCE4 desktop via the xstartup file using the command 'exec /usr/bin/xfce4-session', see next section for details.
  
-=====VNC Virtual Network Computing======+===== First Time Access via VNC Client to UND Linux VNC Servers (Aircraft/Littlestorm) as of 06/2026 ===== 
 +    - A secure shell (ssh) client is required. On Windows, use [[https://atmoswiki.azurewebsites.net/doku.php?id=atmos:citation:soft:putty_ssh|PuTTY]]. 
 +  - The UND VPN is also required. [[https://und.teamdynamix.com/TDClient/2048/IT/KB/ArticleDet?ID=145487|UNDvpnInstructions]] 
 +      - When logging into the vpn, use should be able to use vpn.und.edu; however, if you have issues you can try vpn.ndus.edu instead of vpn.und.edu. 
 +  - Login to PuTTY with your NDUS login. (firstname.lastname, ndus password) 
 +  - Enter ''vncpasswd'' into PuTTY to create a password file in ''~/.vnc''. The password can only be up to 8 characters long. 
 +  - Create a file in ''~/.vnc'' called ''xstartup'' containing the following code:<code> 
 +#!/bin/sh
  
-These directions are for remotely connecting to a Linux computer using a VNC server.+vncconfig -iconic &
  
-Must have a good internet connection in order for it to not be extremely slowbut note that the school's VPN may be the issue if connection is really slow.+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 & 
 +</code> 
 +  - Make this file executable with the command ''chmod +x xstartup'' 
 +  - Create another file in ''~/.vnc'' called ''config'' that contains this line:<code> 
 +session=xfce 
 +</code> 
 +  - If you have not already been assigned display number, scroll down and add your name with the next available number, or ask to be given the number of an inactive user. Note that the VPN only allows access up to display number 35; hencelikely need to use a display number that is no longer needed by another person. 
 +  - You will need a VNC viewer. (May need to be downloaded). Name: Either TigerVNC or RealVNC Viewer. (Preference for Tiger, download latest version https://tigervnc.org/
 +  - Run PuTTY and start your VNC session with the command ''systemctl start vncserver@:#.service'', replacing the # with your display number. 
 +  - Run your VNC viewer and enter the hostname, e.g. ''littlestorm.atmos.und.edu:#'', again replacing # with your display number. 
 +  - Log in with the password you created earlier 
 +  - You should now be looking at a window containing a linux desktop!  
 +  - When you are finished with the VNC, please return to PuTTY and enter the command ''systemctl stop vncserver@:#.service'', again replacing # with your display number. This will end your VNC session on the server, freeing up important resources. You can leave the VNC server session running if you will be returning within the next week; however, if you will be not using the server for awhile, please shutdown your VNC session.
  
-We will be using the RealVNC program, which includes the VNC Viewer and the VNC Server. 
  
-===== First Time Access via VNC to UND Linux Servers (Aircraft/Littlestorm) ===== 
-  - A secure shell client is required. 
-    - On Windows, use [[https://atmoswiki.azurewebsites.net/doku.php?id=atmos:citation:soft:putty_ssh|PuTTY]]. 
-  - Most likely will need to access UND vpn. [[https://und.teamdynamix.com/TDClient/2048/IT/KB/ArticleDet?ID=145487|UNDvpnInstructions]] 
-      - When logging into the vpn, use   vpn.ndus.edu   instead of vpn.und.edu 
-  - Login to PuTTY with your NDUS login. (firstname.lastname, ndus password) 
-  - Type vncpasswd in PuTTY to create a password file in ~/.vnc 
-  - Email SCC, Derek Stinchfield <derek.stinchfield@und.edu> to start VNC using your own "Display Number" listed in the table at end of this Wiki page. (If you don't have one, add one to the table) 
-  - Use VNC viewer to access the site. (May need to be downloaded). Name: Either TigerVNC or RealVNC Viewer. (Preference for Tiger, download latest version https://tigervnc.org/) 
-  - Make sure PuTTY is open and logged into (with NDUS identifiers) 
-  - Open the VNC viewer and enter hostname (e.g. "littlestorm.atmos.und.edu:xx") 
-    - Where "xx" is your display number. 
-  - Use new VNC password created in step 1. Then, login using personal ndus password. 
 * Simplified steps for future use after initial set up: * Simplified steps for future use after initial set up:
-    - Activate UND vpn through Global Protect.+    - Start the UND VPN
     - Open PuTTY and login.     - Open PuTTY and login.
 +    - Enter ''systemctl start vncserver@:#.service''
     - Open VNC Viewer, enter host name, and login.     - Open VNC Viewer, enter host name, and login.
 +    - When you are finished, return to PuTTY and enter ''systemctl stop vncserver@:#.service''
  
-===== Creating a VNC file on Remote Linux Computer =====+===== Desktop Environment to Use ===== 
 +Linux 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 
 +<code> 
 +unset SESSION_MANAGER 
 +unset DBUS_SESSION_BUS_ADDRESS 
 +exec /usr/bin/xfce4-session 
 +</code> 
 +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 
 +<code> 
 +session=xfce 
 +</code> 
 +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. 
 + 
 +===== Creating a VNC file on Other Remote Linux Computers =====
  
   - You must first create a vnc file on the computer you are wishing to gain external access to (the server computer).    - You must first create a vnc file on the computer you are wishing to gain external access to (the server computer). 
Line 37: Line 69:
   - Make sure this file is executable. If not, make executable by typing ''chmod +x xstartup'' in terminal window   - Make sure this file is executable. If not, make executable by typing ''chmod +x xstartup'' in terminal window
  
-=== xstartup code for RedHat Linux Computers (for example aircraft.atmos.und.ued) === 
- 
-See /nas/setup/xstartup-aircraft.  Put the below "code" in .vnc/xstartup using editor or cp.  For example, cp /nas/setup/xstartup-aircraft ~/.vnc/xstartup 
- 
-<code> 
-#!/bin/sh 
- 
-vncconfig -iconic & 
- 
-#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" & 
-gnome-session & 
-#IF YOUR NOT ABLE TO OPEN A GNOME TERMINAL IN YOUR VNC SESSION, COMMENT OUT THE LINE ABOVE AND UNCOMMENT OUT THE LINE BELOW! 
-#exec gnome-session & 
-0 
- 
-</code> 
  
 === xstartup code for Linux Mint Computers (for example Clifford Hall 422 computers) === === xstartup code for Linux Mint Computers (for example Clifford Hall 422 computers) ===
Line 81: Line 89:
 </code> </code>
  
-=== xstartup code for Ubuntu (for example Calgary) ===+=== xstartup code for Ubuntu ===
  
 <code> <code>
Line 99: Line 107:
 </code> </code>
  
-===== Starting and Killing the Remote Linux VNC Server (Can't do on Aircraft/Littlestorm) =====+===== Starting and Killing the Remote Linux VNC Server (Can't do on Aircraft/LittleStorm) =====
  
   * **To Start Server:**   * **To Start Server:**
-       * Type into a terminal window (on the server computer): ''vncserver''+       * Type into a terminal window (on the server computer): ''vncserver'' 
        * You can also choose the display number by using this command: ''vncserver :*'' (where * is the display number, make sure you watch your spacing!)           * You can also choose the display number by using this command: ''vncserver :*'' (where * is the display number, make sure you watch your spacing!)   
        * This will keep the server running until the computer is restarted or the power fails. This is also the reason why the computers in the computer labs are left on.        * This will keep the server running until the computer is restarted or the power fails. This is also the reason why the computers in the computer labs are left on.
Line 136: Line 144:
  
   ps -ef | grep -i Xvnc   ps -ef | grep -i Xvnc
- 
-===== VNC into Calgary ===== 
-Do the same steps as above, however in your 'vnccalagary' file on your home server, you must input the following. NOTE: You may need to change some of the contents in this file such as your <user.name> and what server number. 
- 
-<code> 
-#!/bin/bash 
-# Shell Access Aircraft using vnc client 
-export VNC_VIA_CMD='/usr/bin/ssh -2 -x -p 22 -f -L %L:%H:%R %G sleep 2' 
-/usr/bin/vncviewer -FullColor -passwd /home/<user.name>/.vnc/passwd -via <user.name>@134.129.222.140 :1 
-</code> 
- 
-Also, you need to use the xstartup code file for Calgary which is displayed underneath the xstartup code for linux mint machines. 
- 
  
 ===== Accessing the VNC server using Windows Operating System ===== ===== Accessing the VNC server using Windows Operating System =====
Line 197: Line 192:
   * Make sure to read the Wiki pages for both of these before continuing with this page   * Make sure to read the Wiki pages for both of these before continuing with this page
  
 +
 +===== Accessing the VNC server on OS X =====
 +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@und.edu|David Delene]] 2020/10/19 23:12//
 +
 +  * Open Terminal and execute the following command to set up a port tunnel: ssh -L 59??:localhost:59?? -l <login name> <host name or IP address> The host name for example is aircraft.atmos.und.edu.  This creates an tunnel via ssh.
 +  * Open Finder and in the toolbar, choose Go->Connect to Server
 +  * In the dialog box, enter vnc:/ /<hostname>:59?? where <hostname> is computer hostname or ip address. Use localhost if doing a tunnel via ssh (setup one).  For the ?? in 59??, replace with display number.  For example 07 or 14 for display 7 and 14. 
 +  * Choose "Connect. 
 +  * A window will prompt for your password. Enter it and you're all set!
 +
 +To change the VNC viewer resolution:
 +
 +  * Connect to the VNC server 
 +  * Open settings within the linux operating system and choose Displays->Resolution->1920x1080
  
 ===== Extra Information for those interested ===== ===== Extra Information for those interested =====
 +
  
 ==== Terms and Definitions ==== ==== Terms and Definitions ====
Line 216: Line 228:
  
   * **Client** : Your computer, or the computer that is trying to gain access to the server   * **Client** : Your computer, or the computer that is trying to gain access to the server
- 
- 
-===== Accessing the VNC server on OS X ===== 
-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@und.edu|David Delene]] 2020/10/19 23:12// 
- 
-  * Open Terminal and execute the following command to set up a port tunnel: ssh -L 59??:localhost:59?? -l <login name> <host name or IP address> The host name for example is aircraft.atmos.und.edu.  This creates an tunnel via ssh. 
-  * Open Finder and in the toolbar, choose Go->Connect to Server 
-  * In the dialog box, enter vnc:/ /<hostname>:59?? where <hostname> is computer hostname or ip address. Use localhost if doing a tunnel via ssh (setup one).  For the ?? in 59??, replace with display number.  For example 07 or 14 for display 7 and 14.  
-  * Choose "Connect.  
-  * A window will prompt for your password. Enter it and you're all set! 
- 
-To change the VNC viewer resolution: 
- 
-  * Connect to the VNC server  
-  * Open settings within the linux operating system and choose Displays->Resolution->1920x1080 
  
  
Line 259: Line 254:
   * 20 - Shawn Wagner*   * 20 - Shawn Wagner*
   * 21 - Nick (Nicholas) Gapp   * 21 - Nick (Nicholas) Gapp
-  * 22 - Talia Kurtz +  * 22 - Paramvi Singh 
-  * 23 - Aanan Schlief+  * 23 - (Kevin Norby) (Previously Aanan Schlief)
   * 24 - Henry Liberty (Previously Jennifer Moore)   * 24 - Henry Liberty (Previously Jennifer Moore)
-  * 25 - Andrew Delafrance+  * 25 - Benjamin Guida
   * 26 - Peter   * 26 - Peter
   * 27 - Cheyenne Harrison*   * 27 - Cheyenne Harrison*
Line 273: Line 268:
   * 34 - Kyle Gillette   * 34 - Kyle Gillette
   * 35 - Andrew Kramer   * 35 - Andrew Kramer
 +
  
 * Active Users * 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 session use vncserver -kill : where is your display number. +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 sessionuse ''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, email Derek.Stinchfield@und.edu to start session. +
  
 +- 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.
atmos/citation/soft/vnc.1764711130.txt.gz · Last modified: 2025/12/02 21:32 by delene