LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2009, 05:09 PM   #1
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Rep: Reputation: 30
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.
 
Old 08-12-2009, 05:29 PM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
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
 
Old 08-12-2009, 09:43 PM   #3
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
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 &
 
Old 08-12-2009, 10:33 PM   #4
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
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
 
Old 08-13-2009, 06:14 AM   #5
jeromeNP7
Member
 
Registered: Jun 2009
Posts: 101

Rep: Reputation: 19
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

Last edited by jeromeNP7; 09-04-2009 at 10:26 PM.
 
Old 08-13-2009, 07:34 AM   #6
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by SuperDude123 View Post
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?
 
Old 08-13-2009, 07:58 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
freenx is redundant in most cases now, with the real nomachine.org nx software doing the job better all round for 2 concurrent connections.
 
Old 08-13-2009, 01:26 PM   #8
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
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?
 
Old 08-13-2009, 02:11 PM   #9
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
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

Last edited by TBC Cosmo; 08-13-2009 at 02:13 PM.
 
Old 08-13-2009, 02:23 PM   #10
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
It worked
 
Old 08-22-2009, 01:24 AM   #11
ernst
Member
 
Registered: May 2006
Location: Sydney
Distribution: Debian etch, SkoleLinux
Posts: 77

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian and graphical desktop cola Debian 7 03-19-2009 02:25 PM
Want to use linux with less Graphical desktop. wardialer Linux - Newbie 13 03-22-2007 07:13 PM
graphical desktop problem leachim_8 Linux - Newbie 2 05-20-2005 01:00 PM
How do i change my Graphical Desktop environtment? Jengo SUSE / openSUSE 3 11-25-2004 11:59 PM
Graphical Desktop Environment Gerardoj Linux - General 3 10-30-2003 08:00 PM


All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration