Install & Access Graphical Desktop on Ubuntu/Debian VPS Note: It is better not to run these commands as root user. Add a new user and give them sudo permission. Install and run these from the user account, more secured. Check and do system update with the two following commands sudo apt-get updatesudo apt-get upgradeInstalling the required packages. sudo apt-get install nano xorg lxde-core tightvncserverWe can start our tightvncserver with the following command. vncserverThis will ask you for a password. When it asks if you want read only access, type ‘n‘ and press Enter. The server will start at your_ip_or_domain:1. Don’t try to access it yet. First kill the vncserver using the following command. vncserver -kill :1Then we need to change the config file. nano ~/.vnc/xstartupAdd the following two lines at the end of the file. lxterminal & /usr/bin/lxsession -s LXDE &After the edit the config file will look like this: #!/bin/shxrdb $HOME/.Xresourcesxsetroot -solid grey#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#x-window-manager &# Fix to make GNOME workexport XKL_XMODMAP_DISABLE=1/etc/X11/Xsessionlxterminal &/usr/bin/lxsession -s LXDE &Save and close the file by pressing ctrl + x, then y and press Enter. Restart your vncserver with the following command: vncserverNow use any VNC-client software in your computer, phone or tablet to connect to your Linux VPS. You can use your domain name or ip ending with :1 and the password your entered earlier. And, the here you go. GUI enabled on your Ubuntu / Debian server or VPS.
|