User avatar
computerpie
Posts: 57
Joined: Wed Jun 20, 2012 10:55 pm
Location: USA

vnc into raspi session

Sat Jul 21, 2012 12:55 pm

I have tightvnc working and can vnc into my raspi.
How do I vnc into the raspi and NOT get a new session?
On my workstations I vnc into them and see what appears on the desktop, ie Chromium open, terminal..etc.

When I vnc in the raspi with IP:5901 I get a new session.

I hope this question makes sense. :roll:

Please and Thank you!
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2827
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: vnc into raspi session

Sat Jul 21, 2012 1:51 pm

Must be in the settings. How are you exiting your sessions?

Using the windows client Tightvncviewer I just close the viewer and next time I open it the same session is still there - even if I use a different device the next time (just tried it with android phone).
Alex Eames RasPi.TV, RasP.iO

User avatar
computerpie
Posts: 57
Joined: Wed Jun 20, 2012 10:55 pm
Location: USA

Re: vnc into raspi session

Sat Jul 21, 2012 2:05 pm

I just close the session with the x on the window. When I reopen it does come back to the same session.
What I want is to see the same session that the raspi has open. the pi session.
Maybe I'm using the wrong terminology. Here is an example.
My wife is on her windows box next to me. I can vnc into her computer and see that she has Facebook open and her email. I can move my mouse and hers moves on her screen.
My raspi is setup on the other side of me. I have a browser open and terminal. When I vnc into it I can't see the browser or terminal open I get a new session with nothing open..

I start tightvncserver at startup on the raspi with su -c "/usr/bin/tightvncserver -geometry 1280x1024" pi
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD

JeremyF
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm
Contact: Website

Re: vnc into raspi session

Sat Jul 21, 2012 2:27 pm

Maybe you could try port 5900 instead of 5901? If I remember correctly, the X desktop running on your Pi runs on a virtual port 0, and the external port for accessing it is 5900? (i.e. 5901 redirects to an X desktop running on port 1)

Horrible explanation, but try it.
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge

doobedoobedo
Posts: 36
Joined: Sun Aug 28, 2011 11:03 pm

Re: vnc into raspi session

Sat Jul 21, 2012 2:35 pm

You need to run x11vnc on the pi.

User avatar
computerpie
Posts: 57
Joined: Wed Jun 20, 2012 10:55 pm
Location: USA

Re: vnc into raspi session

Sat Jul 21, 2012 2:36 pm

I get a connection refused (111) when I try IP:5900.
I was thinking it was session : 0 too not :1
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD

JeremyF
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm
Contact: Website

Re: vnc into raspi session

Sat Jul 21, 2012 3:36 pm

computerpie wrote:I get a connection refused (111) when I try IP:5900.
I was thinking it was session : 0 too not :1
When you start the server, add the tag :0 to the end of the command. Reading about the syntax, I've discovered it defaults to the next available port not in use (so it would go to port 1 unless you specify port 0)

So try:

Code: Select all

vncserver -geometry 1280x1024 :0 
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge

Return to “Beginners”