Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VNC Issues: Can't find .Xsession, managers

Posted on 2003-10-31
18
Medium Priority
?
7,342 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
16 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 750 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
Independent Software Vendors: 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!

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
Suggested Courses

772 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