andrew.grimm3
Posts: 17
Joined: Sat Dec 06, 2014 3:59 pm

VNC Server on RPi 2 B+

Fri May 06, 2016 12:02 am

Hi All:

I am trying to have remote control of a Pi. The Pi is going be dedicated to running a program but the program has to be ran in the GUI and can't be ran by the terminal. I've setup a VNC server on the Pi with port forwarding in my router and I'm able to connect with no problems.

The issue I'm running into is that the VNC window is actually showing the Root user desktop and not Pi. I could see this causing me some issues in the future so I'd like to be able to view the Pi user desktop just like you would if you were sitting in front of the Pi with a monitor connected.

Does anyone have any ideas on how I can achieve this?

Thanks,
Andrew :D

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 12:59 am

You want to control your pi and see the same desktop on a monitor? If that then you want to use xrdp

If you are actually getting the root desktop then what command are you using to start the vnc server?
There are 10 types of people: those who understand binary and those who don't.

andrew.grimm3
Posts: 17
Joined: Sat Dec 06, 2014 3:59 pm

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 1:04 am

I installed tightvncserver, and then ran the vnc on the Pi (tightvncserver).

Then I started a vnc server on the Pi. (vncserver :1 -geometry 1920x1080 -depth 24)

It works but when I connect from another PC, I view the GUI desktop on the root user and not the Pi user.

I want to view whats going on graphically on the Pi desktop. I will look into xRDP

klricks
Posts: 6430
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 1:09 am

kusti8 wrote:You want to control your pi and see the same desktop on a monitor? If that then you want to use xrdp

If you are actually getting the root desktop then what command are you using to start the vnc server?
XRDP will also open a separate session apart from the local session.

x11vnc is needed to connect to the local session.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

stevech
Posts: 144
Joined: Sun Jul 15, 2012 11:53 pm

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 3:40 am

I use VNC client on windows 7 and VNC server on RPI2s and RPi zeros.
I just searched out and followed instructions for setting this up, with a keyboard/mouse and monitor connected to the RPi. Once VNC works, I use them headless on the LAN, and the Zero, on WiFi, with VNC.

User avatar
Cancelor
Posts: 756
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 7:14 am

andrew.grimm3 wrote:I installed tightvncserver, and then ran the vnc on the Pi (tightvncserver).

Then I started a vnc server on the Pi. (vncserver :1 -geometry 1920x1080 -depth 24)

It works but when I connect from another PC, I view the GUI desktop on the root user and not the Pi user.

I want to view whats going on graphically on the Pi desktop. I will look into xRDP
Could you try starting the server with

Code: Select all

vncserver :0 -geometry 1920x1080 -depth 24
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

fruitoftheloom
Posts: 19780
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 7:23 am

andrew.grimm3 wrote:Hi All:

I am trying to have remote control of a Pi. The Pi is going be dedicated to running a program but the program has to be ran in the GUI and can't be ran by the terminal. I've setup a VNC server on the Pi with port forwarding in my router and I'm able to connect with no problems.

The issue I'm running into is that the VNC window is actually showing the Root user desktop and not Pi. I could see this causing me some issues in the future so I'd like to be able to view the Pi user desktop just like you would if you were sitting in front of the Pi with a monitor connected.

Does anyone have any ideas on how I can achieve this?

Thanks,
Andrew :D
FYI the RPi 2 B+ model does not exist ???
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Buster.
Raspberry Pi Model 2B v1.1

User avatar
andyc_realvnc
Posts: 11
Joined: Wed Apr 27, 2016 9:19 pm
Location: Cambridge, UK
Contact: Website

Re: VNC Server on RPi 2 B+

Fri May 06, 2016 3:04 pm

You might also try using the latest version of RealVNC for the Raspberry Pi.

We have a preview version that lets you see and remotely control things like Minecraft and the Pi Camera preview.

https://github.com/RealVNC/raspi-preview

If you're looking for something a little more tried and tested, our 5.3 version works well on the Pi for remoting both the main desktop, and virtual desktops. See https://www.realvnc.com/products/vnc/raspberrypi/ for more.

Andy

--
Disclaimer - I work for RealVNC
Andy Clark
Engineering Manager at RealVNC

Return to “General discussion”