• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2362
  • Last Modified:

Connecting with VNC to Ubuntu

Hi, experts,

usually (in Fedora), I tunnel to a Linux machine with ssh, start vncserver, and then connect to it with vncserver viewer.

On my new Ubuntu, however, I get the output below, and when I connect I see clean blue screen but no items on it, and no right click helps either.

Any advice? - Thank you.

mark@mark-desktop:~$ vncserver :1
xauth: (argv):1:  bad display name "mark-desktop:1" in "add" command

New 'X' desktop is mark-desktop:1

Starting applications specified in /etc/X11/Xsession
Log file is /home/mark/.vnc/mark-desktop:1.log

mark@mark-desktop:~$
0
kerzner
Asked:
kerzner
  • 5
  • 4
1 Solution
 
CaseybeaCommented:
Typically, the "bad display name" is caused when the X-host cannot resolve the host name of the display.   This could be because of DNS problems, etc.

You may want to try adding "mark-desktop" as a defined host in the /etc/hosts file and try again.
0
 
kerznerAuthor Commented:
I add this, and not more error, but still the same blue screen (also with Ultra VNC)

mark@mark-desktop:~$ vncserver :1

New 'X' desktop is mark-desktop:1

Starting applications specified in /etc/X11/Xsession
Log file is /home/mark/.vnc/mark-desktop:1.log

mark@mark-desktop:~$

log contents:

07/08/07 12:37:45 Xvnc version 3.3.7 - built Mar  8 2007 21:58:32
07/08/07 12:37:45 Copyright (C) 2002-2003 RealVNC Ltd.
07/08/07 12:37:45 Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
07/08/07 12:37:45 All Rights Reserved.
07/08/07 12:37:45 See http://www.realvnc.com for information on VNC
07/08/07 12:37:45 Desktop name 'X' (mark-desktop:1)
07/08/07 12:37:45 Protocol version supported 3.3
07/08/07 12:37:45 Listening for VNC connections on TCP port 5901

0
 
echlinmCommented:
Hi,

In your home directory, in the .vnc directory off of it (~/.vnc/) less the xstartup file.

Typically with gnome it will have a command such as gnome-session & as the last line.
If it's not there and no other gnome (if you want to use gnome, otherwise the kde equiv) add that line and restart your vncserver and try again.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kerznerAuthor Commented:
I did not have the xstartup, so I found one a Fedora machine and placed it on Ubuntu. It has the

twm &

instead of gnome-session, and besides I do not think it gets execute, because I get a message

Starting applications specified in /etc/X11/Xsession
Log file is /home/mark/.vnc/mark-desktop:1.log

How should I make sure that xstartup is run, or how should I change the Xsession?

Thank you.
0
 
echlinmCommented:
Edit xstartup to replace twm & with gnome-session & using yor favorite editor and make sure the file permissions are 755 for that file and it should use it. (If it is not 755 (read write execute user, read execute group read execute all) then it won't run.)


Check the permissions with > ls ~/.vnc/xstartup
change them with > chmod 755 ~/.vnc/xstartup

then restart vncserver and connect from the windows machine to see if it worked.
0
 
kerznerAuthor Commented:
I did this,

mark@mark-desktop:~$ ls -l .vnc/xstartup
-rwxr-xr-x 1 mark mark 347 2007-08-16 12:55 .vnc/xstartup

still,

mark@mark-desktop:~$ vncserver :1

New 'X' desktop is mark-desktop:1

Starting applications specified in /etc/X11/Xsession
Log file is /home/mark/.vnc/mark-desktop:1.log

0
 
echlinmCommented:
Ah, this is a ubuntu box. Default is that they only have a single vnc session and do not use users own configurations but use the central one.

IF you are the only user you could just edit the Xsession file in /etc/X11/  if you have root access.
You could try copying the xstartup file to Xsession in /home/mark/.vnc/ (It seems the vncserver supplied with Ubuntu uses a different name for the command file then the one for Fedora Core.)

I only have CentOS and FC machines here, I will check this on a Ubuntu system as soon as i get home (2 hours)
0
 
kerznerAuthor Commented:
Thanks, it seems that I will need to do more research. I tried copying over Xsession, and it runs a new file, but now it shows an empty screen which is grey instead of a blue one. I also tried with both twm and gnome-session.

I will search and ask on ubuntu forums. I will give you the points though, because you alerted me that there is no magic there, but standard vnc.
0
 
echlinmCommented:
I will check the Ubuntu box at home as soon as I get there and see if I can replicate the issue and get you the right settings.
0
 
kerznerAuthor Commented:
Ubuntu has its own remote desktop app, I am going to try that.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now