LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Starting Gnome Session over VNC (http://www.linuxquestions.org/questions/linux-newbie-8/starting-gnome-session-over-vnc-268828/)

John Parsons 12-21-2004 12:39 PM

Starting Gnome Session over VNC
 
Some of you will likely think "Oh no, not again!" . I have searched the forums here and I realize that this question hs been asked before but I can't seem to find a definitive answer to the problem. My original xstartup file had the line "startkde &'" which starts a kde desktop without fail every time. While I have not used Linux enough to have a preference Gnome is the default manager on my Linux box so I am being stuborn and want to learn how to start up a Gnome session on the VNC viewer on my WIN2K box.

I have replaced "startkde &" with "gnome-session" but this only works if I am root when I start the <vncserver> . If I am logged in as my regular user then gnome will not startup. Yes, both "xstartup" files are the same for root and myuser. After starting <vncserver> the log files also appear to be the same, I don't know if the last line is any clue but it is the same regardless of whether I can or cannot get gnome to appear on the WIN box

"gnome-session: you're already running a session manager"

I hope someone can help. I am very new to *nix OS so if you have a suggestion please try to be as specific as possible. Your assistance is much appreciated.

Merry Christmas
John

Harlin 12-22-2004 12:22 AM

I'm not sure where I see your question, but I believe you're trying to make sure that when you log in via vncviewer that you get a gnome session instead something else like twm or the like.

Here is what I do: As the user that I will be logging in as, I will put a file called .xinitrc that has a line in it like so:
exec /path/to/gnome-session

Next, as the same user, I run:
# vncserver :1

From a remote computer I pull up vncviewer and connect to my box like so:
harlin.box.net:1

and supply the password. I get the window manager/desktop environment I want. Let me know if I missed what you were wanting.

Haiyadragon 12-22-2004 03:40 AM

Instead of gnome-session:

unset SESSION_MANAGER
gnome-session &

This works fine for me for a while but the sessions crash from time to time (none of that with other wm's). And when I log in on the pc itself after some remote sessions all my icons are messed up.

I hope you're more lucky with Gnome on VNC.

speedyg7 01-08-2005 02:23 AM

Check ~/.vnc/xstartup

At the top you may find the following:
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

Uncomment those two lines as indicated. I also commented out the launch of twm at the end of the script.

HTH
Charles

Demonbane 01-08-2005 03:16 AM

If you already have one user logged in with GNOME, AFAIK you can't start another one with vnc using the same user, they'll try to access the same files at the same time, screwing up your session.
What you can do is start your vncserver using the console, without logging in your X session, or login with another window manager.

icasimpan 07-21-2009 09:45 AM

Quote:

Originally Posted by speedyg7 (Post 1395607)
Check ~/.vnc/xstartup

At the top you may find the following:
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

Uncomment those two lines as indicated. I also commented out the launch of twm at the end of the script.

HTH
Charles

I know this is a very old thread but I would like to make it a point that this helped me a lot. I didn't know that twm is the default window manager in vnc.

With this post, this clarified everything.

Thanks a lot!

Ismael :)

icasimpan 07-21-2009 11:21 AM

Quote:

Originally Posted by icasimpan (Post 3615189)
I know this is a very old thread but I would like to make it a point that this helped me a lot. I didn't know that twm is the default window manager in vnc.

With this post, this clarified everything.

Thanks a lot!

Ismael :)

Just to add up, if you want to use kde instead of gnome, then use 'startkde &' instead of 'gnome-session &'


All times are GMT -5. The time now is 12:33 PM.