Desktop Sharing not working after upgrade

Asked by Pepehillo on 2011-10-15

Just upgraded to Oneiric and the desktop sharing feature that I use heavily is no longer working. I checked all settings, even disabling the password, and tried from different VNC clients but always get the same error: "Connection refused". I am trying to connect from within my own LAN, so no firewall... Any ideas? Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu vino Edit question
Assignee:
No assignee Edit question
Last query:
2011-10-24
Last reply:
2012-01-19

Please open a Terminal window and run this command:

apt-cache policy vnc4server tightvncserver

Then run this command:

sudo apt-get update; sudo apt-get install nmap

Then run this command:

sudo nmap -sS -sV -O -vv localhost

Then select all the text from the Terminal (Edit > Select All), copy it to the clipboard (Edit > Copy), and paste it here.

Pepehillo (julian-glez) said : #2

Here it is...
-------------------------------------------------------------------------------------------------
Starting Nmap 5.21 ( http://nmap.org ) at 2011-10-16 00:17 CEST
NSE: Loaded 4 scripts for scanning.
Initiating SYN Stealth Scan at 00:17
Scanning localhost (127.0.0.1) [1000 ports]
Discovered open port 80/tcp on 127.0.0.1
Discovered open port 139/tcp on 127.0.0.1
Discovered open port 445/tcp on 127.0.0.1
Discovered open port 21/tcp on 127.0.0.1
Discovered open port 631/tcp on 127.0.0.1
Discovered open port 548/tcp on 127.0.0.1
Completed SYN Stealth Scan at 00:17, 0.12s elapsed (1000 total ports)
Initiating Service scan at 00:17
Scanning 6 services on localhost (127.0.0.1)
Completed Service scan at 00:18, 16.09s elapsed (6 services on 1 host)
Initiating OS detection (try #1) against localhost (127.0.0.1)
Retrying OS detection (try #2) against localhost (127.0.0.1)
Retrying OS detection (try #3) against localhost (127.0.0.1)
Retrying OS detection (try #4) against localhost (127.0.0.1)
Retrying OS detection (try #5) against localhost (127.0.0.1)
NSE: Script scanning 127.0.0.1.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 00:18
Completed NSE at 00:18, 0.00s elapsed
NSE: Script Scanning completed.
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000017s latency).
Scanned at 2011-10-16 00:17:54 CEST for 28s
Not shown: 994 closed ports
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 2.3.2
80/tcp open http Apache httpd 2.2.20 ((Ubuntu))
139/tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
445/tcp open netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
548/tcp open afp?
631/tcp open ipp CUPS 1.4
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=5.21%D=10/16%OT=21%CT=1%CU=30538%PV=N%DS=0%DC=L%G=Y%TM=4E9A06AE%P
OS:=x86_64-unknown-linux-gnu)SEQ(SP=105%GCD=1%ISR=105%TI=Z%CI=Z%II=I%TS=8)O
OS:PS(O1=M400CST11NW7%O2=M400CST11NW7%O3=M400CNNT11NW7%O4=M400CST11NW7%O5=M
OS:400CST11NW7%O6=M400CST11)WIN(W1=8000%W2=8000%W3=8000%W4=8000%W5=8000%W6=
OS:8000)ECN(R=Y%DF=Y%T=40%W=8018%O=M400CNNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O
OS:%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=Y%DF=Y%T=40%W=8000%S=O%A=S+%F=AS%O=M400CS
OS:T11NW7%RD=0%Q=)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T
OS:=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=
OS:0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=
OS:164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)

Uptime guess: 0.141 days (since Sat Oct 15 20:54:52 2011)
Network Distance: 0 hops
TCP Sequence Prediction: Difficulty=261 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: OS: Unix

Read data files from: /usr/share/nmap
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 28.11 seconds
           Raw packets sent: 1095 (51.990KB) | Rcvd: 2211 (98.764KB)
---------------------------------------------------------------------------------------------------------
Hope it helps! Thanks...

Pepehillo (julian-glez) said : #3

Sorry. I think you may also be needing this:
------------------------------------------------------------------------------------------------------------
vnc4server:
  Installed: (none)
  Candidate: 4.1.1+xorg4.3.0-37ubuntu3
  Version table:
     4.1.1+xorg4.3.0-37ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/universe amd64 Packages
tightvncserver:
  Installed: (none)
  Candidate: 1.3.9-6.2
  Version table:
     1.3.9-6.2 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/universe amd64 Packages
------------------------------------------------------------------------------------------------------------
I think that's it...

Pepehillo (julian-glez) said : #4

Update: I followed the steps suggested by ejuden in http://ubuntuforums.org/showthread.php?t=1861148:

---------------------------------------------------------------------------------------------------------------
I did this and finally got it to work.

I had my IPv4 Settings to Manual, I set temporarily to DHCP, rebooted. I then test connecting to the IP address assigned and was successful. I then change the IPv4 settings back to Manual and re-entered the previous assigned IP address. All works well now.

Who knows why.
---------------------------------------------------------------------------------------------------------------

This workaround worked for me too.

kcny (kcny) said : #5

Pepehillo are you using a static or dynamic IP address? I ask because two other people that are having the same issue as you have addresses set statically. One person "fixed it" by setting to DHCP and then back to static.

Also, my issue is that the Desktop Sharing icon does not show up - even though my settings are set to always show it. Is your icon showing up (if you have it set to always show)?

Pepehillo (julian-glez) said : #6

kcny,

Right, I have a static IP address. I tried ejuden's workaround (setting the IP to DHCP, connecting and then going back to static) and now it works. But I cannot see the icon either. The message "Another user is controlling..." does appear when you get connected, but the icon does not show up.

kcny (kcny) said : #7

Worked for me too - so it seems if you use a static address before the upgrade, Desktop Sharing does not work until you set you interface to dynamic first.

And the issue remains as well with the icon not showing up.

Ryan Fugger (rfugger) said : #8

I have a dynamic IP address, and I am having this same issue. The workaround doesn't seem to apply to me.

Ryan Fugger (rfugger) said : #9

apt-cache policy indicated that vnc4server was installed, but it wasn't running, so I tried to start it, and apparently it wasn't installed at all. After installing it and starting it, desktop sharing works now.

This is definitely a bug in the upgrade to 11.10, since it was certainly working before the upgrade.

Ryan Fugger (rfugger) said : #10

Vnc4server worked once and then stopped working. Tried Tightvncserver, no dice. Realized Vino is the built-in VNC server in Ubuntu, tried to start it, got this:

** (vino-server:1924): WARNING **: The desktop sharing service is not enabled, so it should not be run.

Apparently vino is broken in 11.10???

http://ubuntuforums.org/showthread.php?p=11355003

What's going on here?

fourthe (fourthe) said : #12

Here is another solution via the link 2nd above by installing gnome and not using unity:

1. Install gnome classic: sudo apt-get install gnome-session-fallback

2. Change the default session to gnome classic: sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-classic

Restart and rejoice.

Nirapada (n-ghost) said : #13

I am hoping my finding will help developers to fix this problem quickly. When we toggle "vino-prefernces" [either command-line or by "Desktop Sharing", vino-server is being restarted as usual and starts listening to ports 5800 and 5900 and then is a few seconds those ports go away from "nmap localhost" listing -- which means vino-server crash [?].

Now, after spending long time, I have found an work-around for this:
Disable your network interface, then toggle the preference indicating you want to allow remote access.

Now enable your interface back. You should be able to connect now.

Hopefully, the fix is coming soon..... I do not know how long this work around will last.

Thanks,

Johnsky (simpson7) said : #14

Nirapada (n-ghost) wrote :
"Now, after spending long time, I have found an work-around for this:
Disable your network interface, then toggle the preference indicating you want to allow remote access.

Now enable your interface back. You should be able to connect now."
---------------------------------------------

WOWOWOWOW!
I can't believe you found this, it actually worked! Thanks!

He's dead right. Disable your network connection, then set your Desktop Sharing Preferences, close it, then re-enable your network connection.

It seems to work until you re-open, and re-close your Desktop Sharing Preferences.

THANK YOU NIRAPADA!
I can't imagine how frustrated you must have been trying to find that.

@Pepehillo
Does this workaround work for you?

Pepehillo (julian-glez) said : #16

Eliah,

Don't know, I didn't try that one. As I mentioned in post #4, I tried a different workaround (changing from static IP to DHCP, then changing the VNC settings, connecting using the DHCP-assigned IP, and then back to static again) and it's been working like a charm since then. So I didn't try anything else... And I'm currently on the road, with very limited possibilities to test (that's the reason why remote connection is so important to me!).

Nirapada (n-ghost) said : #17

I tried post#4, didn't work for me at all. Which is why I had to find another work around [as mentioned in #13].

robfish (robert-fisher) said : #18

#13 workaround works well but when should we expect a fix for this?

The post #13 worked for me, but if I reboot it doesn't work anymore untill I re-do the procedure. I'll have to change to Maverick Meerkat or Linux Mint Katya, until they solve this problem. =/

@Kwizatz
If you can perform the workaround from the command line, you may be able to add the relevant command to /etc/rc.local, so that it runs every time you start up your computer. If there is no clear way to do it from the command-line, or there is but that way doesn't work, then please post about that (with details) and I'll try to the look into the matter more deeply. It should be possible to automate this workaround.

Hey Eliah,
I didn't run command lines... I've just did the following step from post #13:

"Disable your network interface, then toggle the preference indicating you want to allow remote access.

Now enable your interface back. You should be able to connect now."

with this step, desktop sharing runs, until next reboot.
Later I'll make a new installation of oneiric and try to do that by command line.

If/when you try that, please let us know how it goes. It is certainly possible to perform that action from the command-line, though if you are disabling and re-enabling the interface with the Network Manager, you might have to use network-manager-cli to do it from the command-line. However, whether or not that can be done when the system is starting up is a different matter. It might be necessary to configure the interface not to use Network Manager, to get that to work without an unreasonable amount of hassle. Anyway, if/when you try this, please let us know how it goes.

Pepehillo (julian-glez) said : #23

Kwitzatz,

Haven't you given a go to the other workaround, the one described in posts #4 or #16? That one worked for me permanently; I mean, I can reboot and it's still working...

Well guys, I've tried a new unsuccesfull instalation.
I made the steps from all posts here. when I use DHCP settings, it works fine. If I set my IP to static, doesn't work anymore, even I use the same IP from DHCP settings. At the next reboot, don't run. I have to use a static IP from a different range of my DHCP server on my LAN, one more reason to unsuccess..lol
Well, I need to configure 8 new desktops, and I have to do this fast. I'll back to 10.10 or linux mint, cause I don't have so much time to do tests.
Thank you all for support!!!
\o/

doug james (douglasdouglasj) said : #25

Tried #13, and finally got my macbook pro to find my ubuntu computer on LAN. However, never connects.

cyberhiker (cyberhiker) said : #26

I tried #13 and it did not work for me.

robfish (robert-fisher) said : #27

No good trying Linuxmint 12 as it has the same probem.

Monkberry (peter-monkberry) said : #28

Apparently this is a timing problem, cart before the horse so to speak. As seen above the suggestions about starting/stopping/enabling/disabling networks and/or desktop sharing, I figured the problem was probably due to the fact that the desktop sharing was enabling BEFORE the network was actually ready, thereby killing the process when the network then became ready. This may or not be but creating a simple script that fires up the vino-server after waiting for 10 seconds after login solves the problem. I created this and added it to my startup applicaitions.

#!/bin/bash
sleep 10
/usr/lib/vino/vino-server

Now all is well. This was on Linux Mint 12 using the MATE desktop.

Nirapada (n-ghost) said : #29

Just to let everyone know, I am reporting that with all updates installed [as of 02/16/2012], the problem is apparently fixed. Remote sharing is working flawlessly without any workaround needed whatsoever. Thanks for whoever fixed it.

Can you help with this problem?

Provide an answer of your own, or ask Pepehillo for more information if necessary.

To post a message you must log in.