LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-25-2006, 06:05 PM   #1
Joe Donner
LQ Newbie
 
Registered: Jun 2006
Posts: 22

Rep: Reputation: 15
vnc4server on ubuntu


I installed vnc4server on Ubuntu (first time I'm trying Ubuntu and I'm new to Linux in general), and can connect to it, but only get a nasty "dotty" grey screen with the mouse pointer as a big X. I've tried with both gnome and kde, but no luck. I'm using kde as desktop so would like to have a kde vnc session too.

My xstartup file looks like this, where you can see I've uncommented the lines for a normal desktop. With them commented out I do get the screen with the console:

Quote:
#!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
Does anyone know how I can get it to work? Uncommenting those two lines always works a charm with Red Hat, so I'm a bit surprised that it's such a struggle with Ubuntu.

Will appreciate your advice.
 
Old 06-25-2006, 06:51 PM   #2
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
You don't need to install a vnc in Ubuntu -- it already has one. Perhaps there's something special about the one your trying to use. To use, you enter "vncviewer {location}" in a terminal window. Location could be an IP or an alias you set in System-> Administration-> Networking-> Hosts tab-> +Add. A server on the target machine needs to enabled -- Let's say another Ubuntu box. On the target box System-> Preferences-> Remote Desktop. This works quite nicely for my home network.
 
Old 06-26-2006, 02:54 PM   #3
Joe Donner
LQ Newbie
 
Registered: Jun 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for the reply.

Maybe I should have mentioned that I'm running KDE (which I much prefer to Gnome).

Is there any way I can get this to work? I'm sure this can't be too difficult to solve, I just have no idea where to start.

Thanks.
 
Old 06-26-2006, 09:40 PM   #4
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
CLI "whereis vncviewer" to see if its installed with Kubuntu. If not check out a search for "vnc" in Synaptic. I saw two KDE remote access installs that might do the same thing, "krdc" and "krfb". A search for Synaptic search for "remote desktop" might also help. You may see that Kubuntu a vnc for remote access is already installed. Best of luck.
 
Old 06-27-2006, 05:28 PM   #5
Joe Donner
LQ Newbie
 
Registered: Jun 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for the suggestion, but krbf crashes within seconds of me connecting to it via the RealVNC viewer.

I've googled the issue extensively, but haven't found an answer yet. krbf would have been a good solution, if it worked.

Regards,

Joe
 
Old 06-28-2006, 04:50 PM   #6
Joe Donner
LQ Newbie
 
Registered: Jun 2006
Posts: 22

Original Poster
Rep: Reputation: 15
If this helps anyone:

I've downloaded and installed x11vnc. It seems to work very well with Kubuntu (I like KDE much more than Gnome) - and I can connect to it using the RealVNC viewer/client without any problems.

Have a look at http://www.karlrunge.com/x11vnc.

The only thing I'm trying to work out is how to run it as a service - still need to look into that aspect of it.

Hope this helps someone out there.
 
Old 07-30-2006, 06:47 PM   #7
arist
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
For your xstartup file in ~/.vnc (the ".vnc" folder in
your home directory), you need the following:
-----------------------------
#!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
# twm &
------------------------

instead of uncommenting the lines as teh script suggests, you change the window manager to gnome-session

make sure restart vnc4server
 
Old 05-31-2007, 10:33 AM   #8
tempest56k
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 0
vnc4server on ubuntu fix

this is to combat the grey screen and ugly mouse pointer for vnc4server program

1. edit ~/.vnc/xstartup file
2. uncomment the "SESSION MANAGER" line
3. add in the "gnome-session &" after that line but before the other lines.

if u dont want the terminal window or the vnc config program to be there when u vnc in ....just comment the "vncconfig" and "xterm" line out with "#"

easy as pie


#!/bin/sh


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

gnome-session &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
 
Old 05-31-2007, 06:19 PM   #9
oxleyk
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 309

Rep: Reputation: 30
Quote:
Originally Posted by Joe Donner
Thanks for the suggestion, but krbf crashes within seconds of me connecting to it via the RealVNC viewer.

I've googled the issue extensively, but haven't found an answer yet. krbf would have been a good solution, if it worked.

Regards,

Joe

Yep, sounds right. I've never been able to RC with KDE. It works better in GNOME.

Kent
 
Old 12-30-2007, 03:35 PM   #10
nuggets1967
LQ Newbie
 
Registered: Dec 2007
Distribution: Ubuntu, CentOS, RHEL
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by tempest56k View Post
this is to combat the grey screen and ugly mouse pointer for vnc4server program

1. edit ~/.vnc/xstartup file
2. uncomment the "SESSION MANAGER" line
3. add in the "gnome-session &" after that line but before the other lines.

if u dont want the terminal window or the vnc config program to be there when u vnc in ....just comment the "vncconfig" and "xterm" line out with "#"

easy as pie


#!/bin/sh


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

gnome-session &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
Thanks Tempest.

Worked great for me. Using vino, CPU usage stayed around 85%. Using Xvncserver, CPU average 2%, great speed.
 
Old 01-05-2008, 08:59 AM   #11
lordrakim
LQ Newbie
 
Registered: May 2006
Posts: 16

Rep: Reputation: 0
ok I'm running Xubuntu... is the process the same?
 
Old 06-16-2010, 11:53 AM   #12
pburwell
LQ Newbie
 
Registered: Jun 2010
Location: PA, USA | NJ, USA
Distribution: CentOS 6
Posts: 22

Rep: Reputation: 0
Quote:
Originally Posted by arist View Post
For your xstartup file in ~/.vnc (the ".vnc" folder in
your home directory), you need the following:
-----------------------------
#!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
# twm &
------------------------

instead of uncommenting the lines as teh script suggests, you change the window manager to gnome-session

make sure restart vnc4server
Kill vns4server like this: #vncserver -kill :1
Then restart like this: #vncserver

Here is the best and most complete answer I found for vns4server install on Ubuntu (with the above xstartup script):

http://imthi.com/blog/linux/ubuntu-9...ut-monitor.php

Don;t forget to uncomment this line:

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

Little tip:
DO NOT LOG OFF THE SESSION while in your remote VNC session. Just lock the screen and disconnect. Because if you do log off the session then you will have to stop and start vncserver to get the desktop again!

Last edited by pburwell; 06-16-2010 at 02:18 PM. Reason: updating with url
 
Old 06-22-2010, 07:32 PM   #13
pburwell
LQ Newbie
 
Registered: Jun 2010
Location: PA, USA | NJ, USA
Distribution: CentOS 6
Posts: 22

Rep: Reputation: 0
NOW I cannot get VNCServer to STOP LOGGING IN AS ROOT ONLY! YIKES!
Any ideas?
 
Old 08-10-2010, 12:20 AM   #14
Zeddious
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
Don't start a Server as root

Don't sudo vncserver just type vncserver with no sudo. That should solve the problem...


Don't quote me though.
 
  


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
UBUNTU 5.04 PPTP configuration problem . On the Help Page of ubuntu is strange proble ReGgaE-Bg Linux - Networking 1 06-13-2006 09:05 AM
UBUNTU 5.04 PPTP configuration problem . On the Help Page of ubuntu is strange proble ReGgaE-Bg Ubuntu 0 06-13-2006 07:33 AM
LXer: Printing with Ubuntu: Insights for a quick and easy Ubuntu printer installation LXer Syndicated Linux News 0 06-03-2006 10:54 AM
vnc4server doesn`t work! tyranus Debian 4 06-02-2006 07:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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

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
Open Source Consulting | Domain Registration