Difference between revisions of "RPi Wheezy VNC"

From eLinux.org
Jump to: navigation, search
(Well here we go.)
m (Added port from Mac)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Running a VNC Server on a RaspberryPI==
 
==Running a VNC Server on a RaspberryPI==
  
Ok here is one for the Monitorily challenged let’s assume you have followed the ssh blind setup and have your connection to your beloved RaspberryPi
+
Ok here is one for the Monitorily challenged let’s assume you have followed the ssh blind setup and have your putty connection to your beloved RaspberryPi
  
 
You have run raspi-config and maximized the available space on your SD card.   
 
You have run raspi-config and maximized the available space on your SD card.   
  
How would you like to see the startx screen  
+
How would you like to see the startx screen
  
 
==Well here we go.==   
 
==Well here we go.==   
Line 43: Line 43:
  
 
Click connect and enjoy
 
Click connect and enjoy
 +
 +
The port is the same if you connect from a Mac
  
 
==Noob overview and explanation ==
 
==Noob overview and explanation ==
  
 
Putty login if you don’t understand this go look at the Blind ssh login wiki page
 
Putty login if you don’t understand this go look at the Blind ssh login wiki page
 +
 +
Obviously if you have a monitor attached you can do all of this stuff from a command line without using putty. 
  
 
You should have a note of you DHCP assigned address or hava a fixed IP address assigned you will need this later.   
 
You should have a note of you DHCP assigned address or hava a fixed IP address assigned you will need this later.   
  
sudo apt-get update
+
{|
sudo # sudo is the instruction to run the following command as the super user.   
+
|sudo apt-get update
apt-get # is the tool to get packages to install
+
|-
update # just makes sure you have the latest settings for apt-get
+
|sudo
 +
|sudo is the instruction to run the following command as the super user.   
 +
|-
 +
|apt-get
 +
|is the tool to get packages to install
 +
|-
 +
|update
 +
|just makes sure you have the latest settings for apt-get
 +
|}
  
sudo apt-get  install vnc-server
 
sudo # sudo is the instruction to run the following command as the super user. 
 
apt-get # is the tool to get packages to install
 
install                # tells the apt-get programm it's going to install what follows
 
vnc-server              # the vnc server the thing you are installing
 
  
 +
{|
 +
|sudo apt-get install vnc-server
 +
|-
 +
|sudo
 +
|sudo is the instruction to run the following command as the super user. 
 +
|-
 +
|apt-get
 +
|is the tool to get packages to install
 +
|-
 +
|install
 +
|tells the apt-get programm it's going to install what follows
 +
|-
 +
|vnc-server
 +
|the vnc server the thing you are installing
 +
|}
 
vncserver
 
vncserver
 +
 
This is the command to kick the server ito life but it realises that it's not been run before for this user so it prompts you for a password which you then have to confirm.   
 
This is the command to kick the server ito life but it realises that it's not been run before for this user so it prompts you for a password which you then have to confirm.   
  
It then asks you if you want a password set for view only not a lot of point to this on the RPi maybe later with multiple logins but for now just decline the offer.   
+
Note the omitted - hyphen you use vnc-server to install vncserver to run.   
  
vncserver I haveallways done this a second time assuming it dropped out after password set I suppose it's experiment time.
+
It then asks you if you want a password set for view only not a lot of point to this on the RPi maybe later with multiple logins but for now just decline the offer.
  
 
==PC stuff==
 
==PC stuff==
 
Note under Vista and Windows7 you will have issues with run as administrator your on your own there I'm a old XP hound.
 
Note under Vista and Windows7 you will have issues with run as administrator your on your own there I'm a old XP hound.
 +
 +
[[Category:RaspberryPi]]
 +
 +
==Shutting down==
 +
This was a direct grab from the forum I will tidy it later for now I thought it would be best to get it in here quickly
 +
 +
 +
Question by by JohnStodden » 22 Jul 2012 19:52
 +
 +
I am running vnc viewer on a windows laptop communicating with tightvncserver on the pi.
 +
 +
Works well, but how should I close the session in an orderly manner? If I choose Logout, it appears to leave the GUI running and the menus are still active (though the logo at bottom right) has changed to a green walking figure????)
 +
 +
Or do I choose Disconnect from the menu?
 +
 +
I want to make sure I can close the session and release all resources tidily.
 +
 +
 +
Response by doobedoobedo » 22 Jul 2012 20:51
 +
 +
To end the vnc session on the pi run:
 +
 +
vncserver -kill :x
 +
 +
where x is the display number.

Latest revision as of 08:04, 6 January 2013

Running a VNC Server on a RaspberryPI

Ok here is one for the Monitorily challenged let’s assume you have followed the ssh blind setup and have your putty connection to your beloved RaspberryPi

You have run raspi-config and maximized the available space on your SD card.

How would you like to see the startx screen

Well here we go.

Login to your RPi with putty

sudo apt-get update
sudo apt-get install vnc-server
vncserver

follow the instructions to add a server password confirm the password say no to the view only option

Close your putty window but leave your RPi running if you reboot shutdown or restart your RPi you will need to re-run vncserver from the command line as it's not added automatically to the start up script.

NOTE: If you use sudo su or sudo bash or one of the other commands to change to a root login to install vnc-server you need to get back to a pi login before you run vncserver to set the password it goes through the motions if your logged in as root but if you look at the response root is debarred from this action.

Setting up the PC

Now you need to get some software for your PC use your browser and visit

http://www.tightvnc.com/download.php/ 

Download the tight VNC Java viewer

(Here I am assuming you have Java loaded as an option on your PC if not go to java.com and get it if you want use this method)

You can wait till you try the application and get Java if it does not play.

Unzip the download and run “tightvnc-jviewer.jar” if you have Java installed you will open a window that looks like this

Tight VNC.png

Type your IP address for your RaspberryPi into the Server Box

Edit the port to read 5901

Click connect and enjoy

The port is the same if you connect from a Mac

Noob overview and explanation

Putty login if you don’t understand this go look at the Blind ssh login wiki page

Obviously if you have a monitor attached you can do all of this stuff from a command line without using putty.

You should have a note of you DHCP assigned address or hava a fixed IP address assigned you will need this later.

sudo apt-get update
sudo sudo is the instruction to run the following command as the super user.
apt-get is the tool to get packages to install
update just makes sure you have the latest settings for apt-get


sudo apt-get install vnc-server
sudo sudo is the instruction to run the following command as the super user.
apt-get is the tool to get packages to install
install tells the apt-get programm it's going to install what follows
vnc-server the vnc server the thing you are installing

vncserver

This is the command to kick the server ito life but it realises that it's not been run before for this user so it prompts you for a password which you then have to confirm.

Note the omitted - hyphen you use vnc-server to install vncserver to run.

It then asks you if you want a password set for view only not a lot of point to this on the RPi maybe later with multiple logins but for now just decline the offer.

PC stuff

Note under Vista and Windows7 you will have issues with run as administrator your on your own there I'm a old XP hound.

Shutting down

This was a direct grab from the forum I will tidy it later for now I thought it would be best to get it in here quickly


Question by by JohnStodden » 22 Jul 2012 19:52

I am running vnc viewer on a windows laptop communicating with tightvncserver on the pi.

Works well, but how should I close the session in an orderly manner? If I choose Logout, it appears to leave the GUI running and the menus are still active (though the logo at bottom right) has changed to a green walking figure????)

Or do I choose Disconnect from the menu?

I want to make sure I can close the session and release all resources tidily.


Response by doobedoobedo » 22 Jul 2012 20:51

To end the vnc session on the pi run:

vncserver -kill :x

where x is the display number.