
- How to enable vnc through ssh full version#
- How to enable vnc through ssh install#
- How to enable vnc through ssh full#
- How to enable vnc through ssh password#
Modify the file so it looks like this: #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc gnome-session -session=gnome-classic & & exec /etc/vnc/xstartup & xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & Move to the home directory and edit the xstartup file: cd ~ nano. Switch to the newly created user and run vncserver command for it: su hussain vncserver Now, restart the service by typing: sudo service vncserver restartĬreate a local user, using the following command: sudo adduser hussain I put that in caps because if you skip that step none of it will work.įinally, do the following: sudo update-rc.d vncserver defaults 99 We’ll need to run vncserver command AT LEAST ONCE AS EACH USER that want to login as. etc/vncserver/nf prog=$"VNC server" start() " exit 1 esac Next, create an empty init script and make it executable: sudo touch /etc/init.d/vncserver sudo chmod +x /etc/init.d/vncserver sudo nano /etc/init.d/vncserverĪdd the following to /etc/init.d/vncserver: #!/bin/bash unset VNCSERVERARGS VNCSERVERS="" &.

To solve this problem, we will use an excellent script of Justin Buser.Īs sudo user create the file (and directory if it doesn’t exist): sudo mkdir -p /etc/vncserver sudo touch /etc/vncserver/nf sudo nano /etc/vncserver/nfĪdd servers as needed for each user by adding something like the following to the nf file we just created: VNCSERVERS="1:arbab" VNCSERVERARGS="-geometry 1024圆00 -depth 24"
How to enable vnc through ssh password#
Įnter the password that we created using the vncserver command:Īfter reboot the server, we will not be able to connect to the server with VNC, this is because the “ vncserver -geometry 1024×600” command that we typed above is not persistent. Now, download VNCVieweronto our desktop computer from which we want to access the shared desktop. Connect using ServerIP/Name:1 ( :1 is for the VNC server window), In my case it is tendo:1. Next, create the VNC Session once more: vncserver -geometry 1024圆00 Now open up the file that we need to edit: cd ~Īnd Modify the file so it looks like this: #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc gnome-session -session=gnome-classic & & exec /etc/vnc/xstartup & xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & #x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & To make a tweak in startup script, we need to kill the session that we just created: vncserver -kill :1 In order to use VNC, we need to setup a password using the following command: vncserver

How to enable vnc through ssh install#
To install a virtual desktop, use this command: sudo apt-get install vnc4server To install the core components of gnome, use this command: sudo apt-get install gnome-core
How to enable vnc through ssh full#
VNC provides a lightweight virtual desktop than full blown version of Gnome. Actually there is a better way and that is to install VNC.


How to enable vnc through ssh full version#
When we install the fresh copy of Ubuntu Server, it only gives us the “Command Line” interface.īut some people prefer GUI instead and for this they install Full version of Gnome on Ubuntu Server. VNC is a protocol that is used to share the desktop with other users/computers over the network/Internet.In order to share a desktop, VNC server must be install and configure on the computer and VNC client must be run on the computer that will access the shared desktop.
