Solved

VNC Issues: Can't find .Xsession, managers

Posted on 2003-10-31
18
6,823 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

751 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