VNC Issues: Can't find .Xsession, managers

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!
slikrik98Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GnsCommented:
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
willy134Commented:
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
GnsCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

willy134Commented:
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
lbarberCommented:
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
earthmonkeyCommented:
lbarber,
     Just wanted to say that is exactly what I needed. Thanks
0
majorwooCommented:
are earthmonkey and slikrik98 the same person?
0
GnsCommented:
Um.... perhaps. Admins perhaps can tell (look at reg info etc). You've reported it Josh?
0
majorwooCommented:
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
GnsCommented:
Good man.

-- Glenn
0
earthmonkeyCommented:
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
majorwooCommented:
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
earthmonkeyCommented:
Ok, cool. No problem... I just thought I was in trouble or something!
0
majorwooCommented:
sorry for the scare ;-)
0
GnsCommented:
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
majorwooCommented:
maybe they are too, but you came back and...: "It is assumed that any participant not responding..."
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.