PDA

View Full Version : [Solved] How do you config "xstartup" in vnc in order to start remote desktop with gnome?


admail2
July 1st, 2009, 09:12
Hi, I tried the following 2 configuration but could not see the gnome desktop screen, in stead of a grey grid shown.

How do you config VNC to use gnome? Thanks so much.


[root@earth ~/.vnc]# vi xstartup

#!/bin/sh

unset SESSION_MANAGER
exec /usr/local/lib/X11/xinit/xinitrc




[root@earth ~/.vnc]# vi xstartup

#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &

gnone-session &

pbd
July 1st, 2009, 11:20
Is the ~/.vnc/xstartup executable?

admail2
July 1st, 2009, 11:29
I think so:


-rwxr-xr-x 1 root wheel 254 Jul 1 15:15 xstartup

pbd
July 1st, 2009, 11:39
Try:

#!/bin/sh

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
exec gnome-session

but, just guessing.

admail2
July 1st, 2009, 13:57
It kind of like a xstartup in Linux.

Does it work in your system?

Thanks,

pbd
July 1st, 2009, 14:26
Does it work in your system?


If the question was whether this

#!/bin/sh

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
exec gnome-session

works for me, than unfortunately I don't know, i don't have gnome installed.

I'm using Awesome WM:

ps@cht0n ~ % cat .vnc/xstartup
#!/bin/sh
xsetroot -solid "#001800"
eval `ssh-agent`
/usr/local/bin/awesome

admail2
July 1st, 2009, 14:36
Thanks Pdb.

It can not work in my FreeBSD, even I correct the directory information. (etc. should be : exec /usr/local/lib/X11/xinit/xinitrc)

This configuration is same as my another Linux PC. :e;););)

SirDice
July 1st, 2009, 15:02
Try to tail the log file in ~/.vnc/ any errors are bound to show up there.

My xstartup only contains the following:

/usr/local/bin/gnome-session &


Don't forget the & ;)

admail2
July 14th, 2009, 04:18
Thanks all, It resolved.

janpirate
December 18th, 2009, 21:15
admail ,

how do you solve the problem?

can you give the exact code in your xstartup?

janpirate
December 19th, 2009, 12:19
ok just get it... tq :P