Once, we connected then all the VNC data is unencrypted and hacker could sniff our VNC session. It is better (safer) to start VNC server only on 127.0.0.1(localhost) and tunnel it over secure SSH tunnel (For this,there are options in Putty). Reboot the server and that GUI log-in screen will no longer appear:īy default, VNC is not secure protocol.VNC uses encryption during initial connection and login (passwords are not sent in plain-text). # and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1 To prevent it, edit the gdm.conf file: sudo nano /etc/init/gdm.confĬomment these six lines: #start on ((filesystem Gnome is automatically started on boot in Ubuntu 12.04 LTS, if we connect a monitor to our server we will see that GUI sitting there waiting for us to log in. Preventing Gnome to start on boot on the server: We now have GUI access to our server for newly created user. Restart the service: sudo service vncserver restartĬonnect with newly created user using tendo:2, Where tendo is my server name:Įnter the password that we created using the vncserver command: Now open up the /etc/vncserver/nf file as sudo user: sudo nano /etc/vncserver/nfĪdd servers for newly created user by adding something like this: VNCSERVERS="1:arbab 2:hussain" Move to the home directory and edit the xstartup file: cd ~ Switch to the newly created user and run vncserver command for it: su hussain 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. Next, create an empty init script and make it executable: sudo touch /etc/init.d/vncserverĪdd the following to /etc/init.d/vncserver: #!/bin/bash Sudo touch /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" 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 Now, download VNCViewer onto 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.Į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Ã≶00â command that we typed above is not persistent. Next, create the VNC Session once more: vncserver -geometry 1024圆00 #x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" & # Uncomment the following two lines for normal desktop: Now open up the file that we need to edit: cd ~Īnd Modify the file so it looks like this: #!/bin/sh 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 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 VNC provides a lightweight virtual desktop than full blown version of Gnome. Actually there is a better way and that is to install VNC. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |