Change settings in Desktop Sharing for local remote connection
In my Ubuntu 14.04 Trusty OS I needed to first make some changes to the Desktop Sharing.
To do this search your Linux computer for Desktop Sharing.
Open Desktop Sharing, and check or unchecked the following:
Know your system.
Command lsb_release -a gives you the system information
You will see Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Preform updates and upgrades before installing VNC
Anytime you are getting ready to do install you should run updates and upgrades
Run sudo apt-get update
Then sudo apt-get upgrade
Install VNC on your Linux system
Now is the time to install VNC on ubuntu 14.04
sudo apt-get install tightvncserver
After install is completed set screen resolution as follow;
vncserver -geometry 1366×768
You should now see your <computername>:: 1
To make sure vnc server is running on your Linux os type
Note: to end vnc server you would enter.
vncserver -kill :1 (:1 is the session number running, it could be :2 )
You will see a message that reads Killing xtightvnc process ID ####
ALWAYS a good idea to end your VNC connection!
To start vnc server just type vncserver
You will see a message that reads, New X desktop is <computername>:1
To connect from your Windows computer to your Linux OS you need to know the current ip address of the Linux OS. Remember I’m using Ubuntu could be different in Fedora.
Install and run netstat -l to confirm port
See what port is listening, it should be 5900?
To do this do netstat -l | less Note:(lower case L)
IF you need to install netstat fo the following;
sudo apt-get install netstat-net
Now try netstat -l |less
My computer shows 5901 is listen! Note the port that listen on your system.
Run ifconfig to get your current IP Address
Type the following: ifconfig
You should inet addr: <ipaddress> note the ip address is this line. Example in my case the ip address is 22.214.171.124
Install and run tightvnc on your Windows machine
Now in tightVNC Viewer (client ) enter the ip address as 198.168..0.105:: 5901 Note two colons and 5901 is the port number!
What if you get a gray screen.
If you get a gray screen, this means you made a completed connection using VNC but we need to edit the xstartup using vi or vim.
To do this do the following:
Run command ls to confirm that you see xstartup
Run vi xstartup
Add this line to bottom of the file
Note that these instructions are for installing VNC on a Ubuntu 14.04 operating system and my be different on other Linux systems, such Fedora. You may have to do some research for your operating system and or version of OS.
What you will learn by installing and using vnc remote.
Working with Desktop Sharing
- lsb_release -a
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install tightvncserver
- run vncserver to start the service
- vncserver -kill :1 to end the session 1
- netstat -l | less to look at short list of ports
- if need sudo apt-get install netstat-net if netstat is not installed
- ifconfig to your IP address information and more
- Using tightvnc viewer which would be installed on your windows system.