You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Screen sharing from OS X to Linux: No screen appears on Mac.

I am trying to connect from my MacBook to a Linux machine on the same subnet to see the Linux screen on the Mac. I press the "Share Screen" button in Finder under the remote desktop icon that appears in the Shared section of the sidebar and the Linux machine instantly tells me that another computer is controlling its screen. However, on the Mac, there is only a dialog box saying "Contacting xxx's remote desktop on yyy" and no remote screen appears.

I have traced the VNC packets (via Wireshark on the Linux box) and output is as below. IP ending in 140 is Linux, 150 is the Mac. Both machines are hardwired to the same switch.

4.707835 192.168.5.140 192.168.5.150 VNC Server protocol version: 003.007
4.708132 192.168.5.150 192.168.5.140 VNC Client protocol version: 003.889
4.708907 192.168.5.140 192.168.5.150 VNC Security types supported
4.709148 192.168.5.150 192.168.5.140 VNC Authentication type selected by client
5.131544 192.168.5.140 192.168.5.150 VNC Authentication result OK

If I try to go from Linux to Mac, the Mac sends its server protocol version then kills the connection.

I can happily share the screen of a Windows XP box on the same LAN via the Microsoft RDP product.

I am new to the Mac, can anyone please help?

Peter.

MacBook 2.4 GHz 2 GB RAM, Mac OS X (10.5.5), Linux VNC server is Ubuntu 8.04

Posted on Oct 10, 2008 10:28 PM

Reply
5 replies

Oct 11, 2008 1:10 PM in response to Peter Sinclair

try Chicken of the VNC and/or JollysFastVNC clients on the Mac. See if that works. NOTE: I find either of these 2 much faster talking to Linux, then the Mac OS X Screen Sharing VNC client, but your mileage may vary, especially since you are on a local LAN and I'm going across the internet on a DSL line into work.

My experience with viewing the desktop of a Linux system is that you have to use something like X11vnc on Linux, otherwise you get a alternate Linux desktop which is separate from the one displayed on the monitor. And in this situation, my port is often 5901 instead of 5900.

Does your Linux system have an ~/.vnc/xstartup that launches your desktop?

Have you used vncpasswd to establish a Linux VNC password?

Have you viewed your Linux desktop from another system? Always a good indicator.

Oct 11, 2008 11:05 PM in response to BobHarris

Many thanks for the info. I tried both Chicken and Jollys Fast VNC client and both worked - however Chicken was unusably slow so I'm sticking with Jollys.

I have also tried tightvncserver on the Linux side, in addition to the default vino and both work.

I omitted to mention that I had successfully VNC connected from Windows using tightvnc client.

Nov 1, 2008 3:57 PM in response to Peter Sinclair

Greetings,

I have the Apple remote desktop working from the finder, its just as fast as any other vnc package I've tried and more convienient that chicken of the VNC or others as it is available from the finder. The configuration details below also work with chickend of the VNC and vine viewer.

I have a Mac OS 10.5 machine and a Linux centos 5 machine on the same network at home. The Linux machine is headless ie, no monitor, mouse or keyboard and my goal was to get the Apple remote desktop working to the Linux machine so that I could login and get a gnome-session desktop. I ran into the issue you describe and solved it after making the following configuration changes on the CentOS 5 machine.

On the Linux machine it is assumed that all the gnome desktop packages are installed and that you have the vnc-server.i386 package installed from the yum repository. avahi.i386 and avahi-glib.i386 are also installed. xinetd must also be installed from yum if you do not have it. xinetd.i386

I. Enable zeroconf avahi service ie, bonjour so your apple can see the Linux box in the finder.

a) If you can see the Linux machine in the finder, perhaps you already have the avahi daemon configured properly, otherwise edit /etc/avahi/avahi-daemon.conf. Mine looks like this, where my linux_boxhostname is the actual hostname of my machine and browse-domains is a comma separated list of domains that I use:

[server]
host-name=my linux_boxhostname
#domain-name=local
browse-domains=local, mydomain
use-ipv4=yes
use-ipv6=yes
#check-response-ttl=no
use-iff-running=yes
enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no


[wide-area]
enable-wide-area=yes

[publish]
disable-publishing=no
disable-user-service-publishing=no
add-service-cookie=yes
publish-addresses=yes
publish-hinfo=yes
publish-workstation=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes

[reflector]
#enable-reflector=no
#reflect-ipv=no

[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=3

b. Add or edit the file /etc/avahi/services/rfb.service, mine looks like this, note the port setting is 5900, this is the first X display 😮. So the apple remote desktop client will attempt to connect to display 😮 on the linux machine. Other possibilites are port 5901, 5902, etc... for different X displays on the Linux machine:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type> rfb.tcp</type>
<port>5900</port>
<txt-record>No User Authent0</txt-record>
</service>
</service-group>

c). Restart the avahi daemon on the linux box:

# service avahi-daemon restart

II. Configure the gdm gnome display daemon

a) My Linux machine is headless and does not have a keyboard or mouse. So, I disable display 😮 in run level 5 so that I may use VNC to connect to port 5900. Edit /etc/gdm/custom.conf. Mine looks like this:

[daemon]
RemoteGreeter=/usr/libexec/gdmgreeter

[security]
AllowRemoteRoot=false

[xdmcp]
Enable=true

[gui]

[greeter]
IncludeAll=true

[chooser]

[debug ]

# Note that to disable servers defined in the defaults.conf file (such as
# 0=Standard, you must put a line in this file that says 0=inactive, as
# described in the Configuration section of the GDM documentation.
#
[servers]
0=inactive

b) Restart X and gdm

# init 3
wait a minute or two and then
# init 5

III. Configure an Xvnc to start on port 5900, display 😮 from xinetd.

I'm using two monitors on my Mac, one monitor has a resolution of 1440x900 and I'm using it to display the remote Linux desktop.

a) The apple VNC seems to want a VNC password so I configure the VNC server on the Linux mahchine to use one, you can save this password in your keychain when you connect for the first time with the Apple Remote desktop client. Configure a vnc password owned by the user nobody on the Linux machine:

# vncpasswd /etc/vncpasswd
Password:
Verify:

# chown nobody:nobody /etc/vncpasswd

b) Create a vnc service under /etc/xinetd.d on the linux machine by adding the file named /etc/xinetd.d/vnc. Mine looks like this, note the vncpasswd location, nobody user, and screen resolution:

service vnc
{
disable = no
socket_type = stream
protocol = tcp
group = tty
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1440x900 -depth 16 -once -fp unix/:7100 passwordFile=/etc/vncpasswd
}

c) Add the following to the end of your /etc/services file, mine looks like this:

# Local services
vnc 5900/tcp # vnc server

d) Restart xinetd

# service xinetd restart

III. Setup your user environment on the Linux machine.

a) we are logging in with the username foo whom has a password. User foo has a home directory at /home/foo. His .bash_profile is to his liking and he wants to have a gnome session.

b) Examine /home/foo/.vnc/xstartup. Make sure the file is executable. Mine looks like this:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

gnome-session

c. Make the xtartup file executable:

$ chmod +x /home/foo/.vnc/xstartup

IV. Login using the Apple RDP from the finder as the user foo.

a) Make sure the SELinux firewall on your linux machine is not going to block port 5900. I disabled my SELinux firewall as all my machines are behind a NAT router with a firewall running.

b) If the avahi daemon is configured and working properly, you should see the hostname of your linux box in the finder window. Highlight it and you should see a "Share Screen" button. Push it. You will be prompted for the vnc password that we set on the Linux machine using vncpasswd. Enter the password and you should be able to save it in the keychain. Subseqent logins will not require you to enter it manually again unless it gets changed.

b) If xinetd and gdm above were configured properly, you should now have a gdmlogin screen at the resolution specified, mine is 1440x900. Login using the foo login and password. You should get a gnome-session desktop.

c) In case of trouble, try telneting from a term window on the mac to port 5900 on the Linux box. If you get Connection Refused, double check your xinetd configuration and/or any firewall ipfilters running on the Linux box.

Run netstat -an|grep 5900 on the Linux box. If you see a port LISTENING, then you have a firewall problem between the Mac and Linux box, xinetd is okay.

I have this working perfectly and use it to work from my Mac to the headless Linux machine every day.

regards
John Rushford
jjr@alisa.org

Screen sharing from OS X to Linux: No screen appears on Mac.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.