Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

VNC into Pi with mac

Thu Aug 23, 2012 10:26 pm

Hi,
I'm slowly learning my way through through networking etc etc, and I've come to an issue with VNC. I would like to connect to my rpi from a mac, and essentially see the rpi screen on the mac. I've downloaded tightvncserver onto the pi, but when I connect Into the rpi from the mac, I get error messages saying it could not start the session due to activex. The username, passwords, ports etc are all fine, but it is the final hurdle in sorting this out. I'm using chicken VNC for the mac. HELP

ndrs
Posts: 31
Joined: Wed Jul 04, 2012 10:22 pm

Re: VNC into Pi with mac

Thu Aug 23, 2012 11:03 pm

Had you started a vnc session?

Code: Select all

vncserver :1 -geometry 1024x768 -depth 24
Then, open Chicken of the vnc and set your IP username and password, with port 5901 (5900 for default screen, 5901 for 1, 5902 for 2...)

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 8:50 am

Hi,
I'm using the ip address of the pi, with a :5601 at the end ie 192.168.1.86:5601

I'm not asked to input a user name, but I do input the password I set when configuring tightvncserver.

I've posted a screen shot to help with the error code.
Screen Shot 2012-08-24 at 09.42.32.png
Screen Shot 2012-08-24 at 09.42.32.png (10.79 KiB) Viewed 8773 times
Tightvncserver is running on the rpi, and I can ssh into the rpi with no probs.

I've also attached a copy of the Chicken VNC window.

Thanks in advance

P
Attachments
Screen Shot 2012-08-24 at 09.48.07.png
Screen Shot 2012-08-24 at 09.48.07.png (41.29 KiB) Viewed 8773 times

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 8:53 am

Oppss 5601 should have read 5901

P

ndrs
Posts: 31
Joined: Wed Jul 04, 2012 10:22 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 11:36 am

If it continues not working try this:

Code: Select all

ln -s /root/.xinitrc /root/.xsession
then use vncserver command to start :1 vnc desktop.

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 1:39 pm

Hi,
tried this and it didn't change the error message. :!:

I'm running Xbian 0.6.2 at the moment. I don't think this should matter.
P

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 1:51 pm

I thought about doing this, but I find it better to use X11 for the things I want to do, i.e. run Geany.

Open the "Terminal" app on your Mac.
Enter the following command : ssh -Y pi@xxx.xxx.xxx.xxx
xxx... is obviously the IP address of your raspberry pi.
Now at the pi@raspberrypi prompt enter the command for the app you want to run : geany
I get a couple of errors pop up, but after a few seconds, the Geany GUI will open up in an X11 window on the Mac.

Admittedly this doesn't work for all applications on the RPi. Scratch for example doesn't work at all this way.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 2:19 pm

hi,
I've tried this also, and I'm getting the following error:

root@XBian:~# geany
Geany: cannot open display

I've apt-get'd Geany and installed it also. I've started a VNC session within the RPi.

I'm at a loss as to what i'm doing wrong

P

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 2:29 pm

Have you installed X11 onto your Mac from the Tools directory on the installation disk?
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 4:04 pm

yes. No difference.

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 4:08 pm

You remembered the -Y switch in the sash command on the Mac? This is needed to redirect X output.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 5:13 pm

Hi,
I did remember the -Y, but still nothing. I have downloaded VNC viewer and I'm getting the same error on that as well.

As a step by step guide:
I ssh into the rpi using the SSH -Y command
I then start tight VNC with geometry etc etc
I then type in the Geany command and I get " Geany: cannot open display"

If I use VNC viewer, I get a
Screen Shot 2012-08-24 at 09.42.32.png
Screen Shot 2012-08-24 at 09.42.32.png (10.79 KiB) Viewed 8717 times
error.

I've just sent a general apt-get update command to make sure everything is up to date

I bet its something silly

loadbang
Posts: 36
Joined: Mon Aug 13, 2012 4:56 pm

Re: VNC into Pi with mac

Fri Aug 24, 2012 6:02 pm

Mac OS X has a built in VNC viewer. VNC is what is used is OS X screen sharing.

The apps location is "/System/Library/CoreServices/Screen\ Sharing.app".

If you install Bonjour, the RPi will show up in Finder under "shared" just like any Mac or PC, just click the RPi icon and VNC opens. Bonjour is missing from the default Debian repository so you may need to ask around.

Just make sure you start tightvncserver on :0.

Powerphil
Posts: 72
Joined: Sat Aug 04, 2012 9:36 pm

Re: VNC into Pi with mac

Sat Aug 25, 2012 9:10 pm

Hi,
Just to finish this off, I installed wheezy onto a Sd card, and tried all of the above again, and it worked!
I can only conclude that using xbian as an image means that vnc isn't possible.

Return to “Networking and servers”