LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using VNC to get a graphical desktop (https://www.linuxquestions.org/questions/linux-newbie-8/using-vnc-to-get-a-graphical-desktop-747104/)

SuperDude123 08-12-2009 04:09 PM

Using VNC to get a graphical desktop
 
Ok, so from my terminal on my mac, I SSHed in to my Linux box, then from there, I typed the command vncserver, and then with the program Chicken of the VNC, I get a remote terminal screen on my linux box.

How do I get my full desktop and xserver through my VNC connection? My objective here is somewhat like that of PC Anywhere that's used on windows systems.

TBC Cosmo 08-12-2009 04:29 PM

There should be a .vnc directory in the user's directory on the vncserver side. In that dir you should find an xstartup file that either has all the directives for X, or is a link to xinitrc. Let us know what you find

SuperDude123 08-12-2009 08:43 PM

This is what the file has:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

TBC Cosmo 08-12-2009 09:33 PM

Code:

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

Code:

# Uncomment the following two lines for normal desktop:
 unset SESSION_MANAGER
 exec /etc/X11/xinit/xinitrc


jeromeNP7 08-13-2009 05:14 AM

There slight differences needed for the VNC configuration depending on the window manager (KDE, Gnome, etc). By default a "normal dektop" is the ancient twm GUI.

Linux

centosboy 08-13-2009 06:34 AM

Quote:

Originally Posted by SuperDude123 (Post 3641009)
Ok, so from my terminal on my mac, I SSHed in to my Linux box, then from there, I typed the command vncserver, and then with the program Chicken of the VNC, I get a remote terminal screen on my linux box.

How do I get my full desktop and xserver through my VNC connection? My objective here is somewhat like that of PC Anywhere that's used on windows systems.


i know this is off topic, but i have found freenx much faster, more secure, and generally much more pleasant then vnc.
Maybe you could give this a try one day?

acid_kewpie 08-13-2009 06:58 AM

freenx is redundant in most cases now, with the real nomachine.org nx software doing the job better all round for 2 concurrent connections.

SuperDude123 08-13-2009 12:26 PM

After uncommenting those two lines, all I get with chicken of vnc is a blank screen with gray dots in the back ground and a X as a cursor. What do I try next?

TBC Cosmo 08-13-2009 01:11 PM

Ok, here's what seems to work:

Code:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
 unset SESSION_MANAGER
 exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
/usr/bin/gnome-session &

Since I was getting permission denied on the exec line in the exec xinitrc
Code:

# chmod 755 /etc/X11/xinit/xinitrc
Code:

$ vnc4server -geometry 1024x768 -depth 24
New 'debian5:1 (wayne)' desktop is debian5:1

Starting applications specified in /home/wayne/.vnc/xstartup
Log file is /home/wayne/.vnc/debian5:1.log

And log shows no permission error, plus I can now see the full gnome desktop

SuperDude123 08-13-2009 01:23 PM

It worked

ernst 08-22-2009 12:24 AM

Many thanks! Works!

I use KDE, replacing
/usr/bin/gnome-session &
with
/usr/bin/startkde &

Also in my case the vnc server is a xen guest domain.


Are there any serious security implications from
chmod 755 /etc/X11/xinit/xinitrc
the default was 644


All times are GMT -5. The time now is 01:32 PM.