Solved

VNC Issues: Can't find .Xsession, managers

Posted on 2003-10-31
18
6,322 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 5

Expert Comment

by:willy134
Comment Utility
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
Comment Utility
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
Comment Utility
lbarber,
     Just wanted to say that is exactly what I needed. Thanks
0
 
LVL 9

Expert Comment

by:majorwoo
Comment Utility
are earthmonkey and slikrik98 the same person?
0
 
LVL 20

Expert Comment

by:Gns
Comment Utility
Um.... perhaps. Admins perhaps can tell (look at reg info etc). You've reported it Josh?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 9

Expert Comment

by:majorwoo
Comment Utility
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
Comment Utility
Good man.

-- Glenn
0
 

Expert Comment

by:earthmonkey
Comment Utility
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
Comment Utility
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
Comment Utility
Ok, cool. No problem... I just thought I was in trouble or something!
0
 
LVL 9

Expert Comment

by:majorwoo
Comment Utility
sorry for the scare ;-)
0
 
LVL 20

Expert Comment

by:Gns
Comment Utility
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
Comment Utility
maybe they are too, but you came back and...: "It is assumed that any participant not responding..."
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now