User Tools

Site Tools


linux:install_tigervnc

Differences

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

Link to this comparison view

Next revision
Previous revision
linux:install_tigervnc [2020/05/24 18:19] – created bstaffordlinux:install_tigervnc [2022/11/23 12:49] (current) – external edit 127.0.0.1
Line 1: Line 1:
-======Install TigerVNC======+====== VNC on Ubuntu 20.04 ======
  
-This page shows how to install a VNC server on a CentOS 6.4 64-bit machine so that you can connect to it from a desktop using a VNC client. +===== Install Software ===== 
-=====Prerequisites===== +<code>sudo apt install xfce4 xfce4-goodies</code> 
-You must have a CentOS machine already set up in accordance with the the "[[Install CentOS 6]]" guide. +<code>sudo apt install tigervnc-standalone-server</code>
-=====Install VNC===== +
-Install prerequisite software as well as the tigervnc-server package<code>yum -y install pixman pixman-devel libXfont tigervnc-server*</code> +
-Configure VNC server to start automatically on boot.<code>chkconfig --level 5 vncserver on</code> +
-=====Configure User===== +
-Replace USERNAME with the name of the user account you want to grant VNC access to. Pick any password. +
-<code>su - USERNAME  +
-vncpasswd +
-exit</code> +
-Configure the resolution to have when connecting as this user. Replace USER with the name of the user account you want to grant VNC access to. +
-<code>cat << EOF >> /etc/sysconfig/vncservers +
-VNCSERVERS="1:tomcat" +
-VNCSERVERARGS[1]="-geometry 1500x900" +
-EOF +
-service vncserver restart</code> +
-=Configure Firewall= +
-Port 5901 is the port the VNC clients access. Port 5801 is a web server port that you can use to view the desktop through a web browser. '''Note''', you will have to change the 1 at the end of the port number to be whatever you set "1:tomcat" to be. E.G. if you set "3:user1 7:user2" you will need to open ports 5903 and 5097 for normal VNC and port 5803 and 5807 for web VNC. +
-<code>iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 5801 -j ACCEPT +
-iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT +
-service iptables save +
-service iptables restart</code>+
  
-=====Configure View Only===== +As the target user, set the VNC password 
-Sometimes you want people to connect and view the desktop but not be able to edit it. (Thinking of the web page specifically here).+<code>vncpasswd</code>
  
-TigerVNC does not support this. However, you can set the default to 'view only'. It is trivial to click the 'Options' button when using the web interface and set 'View only' to false if you need to make a change. However, if broadcasting something, it it kinda safe in a company this size. It helps prevent accidental damage rather than anything else. +===== Set Configuration ===== 
-<code>vi /usr/share/vnc/classes/index.vnc</code> +<code>cat << EOF >> ~/.vnc/xstartup 
-AFTER this line +#!/bin/bash 
-<code><param name=PORT value=$PORT></code> +unset SESSION_MANAGER 
-add this line +unset DBUS_SESSION_BUS_ADDRESS 
-<code><param name="View only" value="Yes"></code> +[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup 
-Save and exit +[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources 
-<code>service vncserver restart</code> +vncconfig -iconic & 
-=Connect= +dbus-launch --exit-with-session startxfce4 & 
-If you are using the TightVNC client on your Windows desktop, put the following value in the 'Remote Host:' text field and click 'Connect' (replacing HOSTNAME with the name of the server)<code>HOSTNAME::5901</code>  +EOF</code>
-You can also go to the following URL to view the machine through the web browser (replacing HOSTNAME with the name of the server).<code>http://HOSTNAME:5801/</code> +
-REMEMBER: When you are finished with the desktop session, do NOT log out. Just close the VNC window.+
  
-You may have to reduce the security settings of Java on your machine. See [http://www.java.com/en/download/help/jcp_security.xml here]. 
  
-Control Panel->Java->Security->Set Security Level to Medium. 
-=====Disable Annoying Popup Using VNC===== 
-When you vnc into a CentOS box, you can get an annoying popup asking for the root password to run 
  
-org.freedesktop.packagekit.system-network-proxy-configure+<code>chmod +x ~/.vnc/xstartup</code> 
 + 
 +===== Launch VNC as a user ===== 
 +<code>vncserver -localhost no</code> 
 + 
 + 
 +===== List VNC sessions ===== 
 +<code>vncserver -list</code> 
 + 
 +===== Kill a specific VNC session ===== 
 +<code>vncserver -kill :1</code> 
  
-Open a terminal window and run <code>gnome-session-properties</code> 
-Untick packagekit 
  
linux/install_tigervnc.1590344340.txt.gz · Last modified: (external edit)