Solved

VNC Issues: Can't find .Xsession, managers

Posted on 2003-10-31
18
6,559 Views
Last Modified: 2013-12-21
Greetings.  I'm a Linux newbie so please forgive me :)  I'm attempting to VNC from one PC (running Windows XP) to another PC running Debian linux.  I have installed VNC server on the linux machine, and it seems to load properly.  However, when I attempt to make the connection on the XP machine, I get a window that displays the following message (a graphical window, that is):

Xsession: unable to start X session --- no '/root/.xsession' file, no '/root/.Xsession' file, no session managers, no window managers, and no terminal emulators found; aborting

By default, the VNC server creates a new X session (1), and this is what I'm attempting to connect to, via:

192.168.0.2:1

I tried copying /etc/X11/Xsession to the directory indicated in the error message, and this got rid of the error message, but all I'm left with is a grey desktop screen that doesn't allow me to do anything except move the mouse around.

Any help is greatly appreciated!
0
Comment
Question by:slikrik98
  • 5
  • 5
  • 3
  • +2
18 Comments
 
LVL 20

Expert Comment

by:Gns
ID: 9662595
rm /root/.[xX]session
vi /root/.Xsession
i#!/bin/sh
exec /etc/X11/Xsession <the session name you want>
<ESC>
ZZ
chmod +x /root/.Xsession
Then try reconnecting.

-- Glenn
0
 
LVL 5

Expert Comment

by:willy134
ID: 9675059
also look in your home directory (which I assume you are running as root) /root/.vnc

there should be a file in there called xstartup.  Make sure there is a line in it that says
xterm ...

0
 
LVL 20

Accepted Solution

by:
Gns earned 250 total points
ID: 9677131
My comment above is wrong, in that it assumes things to be ... perhaps a bit RedHatish/Mandrakish... On a Debian, they're not:-). Sorry for the obfuscation. It should still work, sort of... problem is determining the parameter to pass along:-). The default, if there is no parameter given, is to have at least one one of the symbolic links (in /usr/bin, ordered) x-session-manager, x-window-manager and x-terminal-emulator... point to symbolic links in /etc/alternatives, which in turn point to the actual program to run. In my case that points to /usr/bin/kde2 (I run others from the display manager greeter, so this was news to me;-). Do
file /usr/bin/x-* /etc/alternatives/x-*
to see that you have 'em and where they point. Would be a good thing to quote here.

Now, Willys suggestion is good, since it points to where one could customize the vnc server only behaviour. You often want to avoid the "color-intense and overloaded" desktops, and go with something very simple and ... gray:-)... in other words: twm.
The default for Debian is to not have any $HOME/.vnc/xstartup for the user starting the vncserver, but rather rely on the default behaviour of the Xsession script.

You say you get a "gray baqckground" that you can do nothing with... might this be twm? Do you have the X-shaped cursor? Do you get a menu if you hold down the left mouse-button?

-- Glenn
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 5

Expert Comment

by:willy134
ID: 9680180
it sounds like you are running just X... no desktop.

here is my .vnc/xstartup file

#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
0
 

Expert Comment

by:lbarber
ID: 9801919
for a nice windows-ish GUI,
1)type gedit in the terminal. enter the path to your vnc startup script (e.g. .vnc/xstartup)
2)change twm in the last line to Gnome-session or startkde (startkde is probably your best bet, if you aren't comfortable with terminal windows)
3)save
4)type vncserver -kill :(number of session - usually 0 or 1)
5)start the vncserver again on the linux box. when you remote this time, it will load the KDE GUI.
Hope this helps
0
 

Expert Comment

by:earthmonkey
ID: 9932230
lbarber,
     Just wanted to say that is exactly what I needed. Thanks
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 10394114
are earthmonkey and slikrik98 the same person?
0
 
LVL 20

Expert Comment

by:Gns
ID: 10396141
Um.... perhaps. Admins perhaps can tell (look at reg info etc). You've reported it Josh?
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 10396211
Well I can see most of what they can (they would be useful along those lines) since this is the only link between the two...

But yes, I've stuck a note in CS... ;-) http://www.experts-exchange.com/Community_Support/Q_20889761.html
0
 
LVL 20

Expert Comment

by:Gns
ID: 10396494
Good man.

-- Glenn
0
 

Expert Comment

by:earthmonkey
ID: 10396646
I just wanted to clear things up-- I am not the same as slikrik98, and I am curious as to what it matters. I was simply thanking the guy for his input. If you need further info about me, just email me.

Thanks
Louis Crockett
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 10396802
earthmonkey,

it would be relevant if you are the same person because that's against the guidelines.  No harm done though -> thanks for the input.

majorwoo
0
 

Expert Comment

by:earthmonkey
ID: 10397626
Ok, cool. No problem... I just thought I was in trouble or something!
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 10397916
sorry for the scare ;-)
0
 
LVL 20

Expert Comment

by:Gns
ID: 10448530
I'm fairly certain I'm right, as are others too... But the lack of feedback/dialog makes it real hard to determine if any of what we've said actually helped.
Frustrating.

-- Glenn
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 10487136
maybe they are too, but you came back and...: "It is assumed that any participant not responding..."
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question