LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-06-2004, 09:58 PM   #1
paulsh2k4
LQ Newbie
 
Registered: Aug 2004
Posts: 21

Rep: Reputation: 15
Grey desktop connecting to VNC server


Hello,

I'm running the latest VNC server on RH 9. I'm new to this but basically I'm trying to use a viewer on Win2k to connect to the VNC server on RH9.

If I run the xstartup script that comes by default I get this:

./xstartup
No VNC extension on display :0.0
twm: another window manager is already running on screen 0?
twm: unable to find any unmanaged screens


So, I've been digging in Google and see many people complaining about this. I found one guy mentioned he bypasses this default script and just runs "vncserver :5" or whatever number he chooses. I did this and VNC server starts up fine, with no errors in the log file. Then I connect from the Win2k machine, it asks me for a password and connects me fine, however, all I see is a grey window and one xterm window is open. My goal is to be able to see a Gnome desktop just like when I am working on my Linux machine locally. How can I get a Gnome desktop through VNC? Preferably I'd like to get my Gnome desktop I always see when I login, not a whole new one that I have to recustomize.

Thanks for the help!.....
 
Old 11-06-2004, 10:10 PM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
Only thing i did RHEL 2.1AS

make symbolic link to xinitrc
in ~/.vnc
xstartup -> /etc/X11/xinit/xinitrc*
 
Old 11-06-2004, 10:50 PM   #3
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
http://www.tightvnc.com/doc/man/vncserver.1.html

nice site for how to use VNCserver...

here is how i set it up:

log in to your RH box on the user you want VNCserver to run as... ie: not root!

in CLI type:
Code:
vncserver -geometry 10124x768 -depth 16 :1
if this is the first time the VNCserver has ran it will prompt you for a password.

you are now all set and VNCserver is running. when connected to it via your 2k box just enter the IP:1 and your in.

example:

192.168.1.100:1

that will take you to that IP and VNCserver 1.

hope that helps.
 
Old 11-06-2004, 11:14 PM   #4
paulsh2k4
LQ Newbie
 
Registered: Aug 2004
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for the help. I actually didn't have a problem connecting, it was after I connected I would get a grey screen with nothing on it. After some digging I found I had to edit the xstartup script and replace twm with gnome-session so that a gnome-session will automatically start when I fire up the vncserver. Works great now!

The only problem is if I leave email open on the native X desktop, then connect from a Windows machine via VNC, I can't see the instance of email that is running on the native X desktop. It's no good to open a new instance of email as I won't see what email came in for me in the other instance. Hmmm....

I tried following instructions on the realvnc site to allow controlling the native X session but it doesn't work. Anyone else ever get this to work?

Thanks again
 
Old 11-12-2004, 06:44 PM   #5
insurin
LQ Newbie
 
Registered: Nov 2004
Posts: 28

Rep: Reputation: 15
VNC

hey paulsh2k4

I am in the same boat as you so if you can help me out then great!

I am running Fedora Core 2 with VNC. I can connect to Fedora vnc server fine from my windows box, but i just get a grey screen with a shell. I was kinda hopin that it would be like it is when i am sat at the fedora box and KDE is loaded up.

cheers
 
Old 11-12-2004, 06:54 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
insurin, did you actually read the adivce above? it does tell you to edit the ~/.vnc/xstartup script...
 
Old 11-13-2004, 07:37 AM   #7
insurin
LQ Newbie
 
Registered: Nov 2004
Posts: 28

Rep: Reputation: 15
yes fair point Chris,

I did read it although it was a quick skim, I had noted that I needed to edit the file but I am using KDE so i thought i would need to enter something other than gnome-session.

I needed to enter startkde instead, thanks anyway

Last edited by insurin; 11-13-2004 at 07:39 AM.
 
Old 11-30-2004, 09:28 AM   #8
a10392
Member
 
Registered: Sep 2004
Posts: 30

Rep: Reputation: 15
hi,

i have the same problem, under stable debian i get a grey screen, and i dont have any ~/.vnc/xstartup

what should be the content of xstartup to start window maker ????


thanx
 
Old 01-27-2005, 03:04 PM   #9
fortytwo42
LQ Newbie
 
Registered: Jan 2005
Posts: 11

Rep: Reputation: 0
I've got debian as well and have the same problem, I don't have any /.vnc/xstartup file, and am getting a grey screen when I try to connect.
 
Old 01-27-2005, 03:13 PM   #10
tormented_one
Member
 
Registered: Oct 2004
Location: Small Town USA
Distribution: slamd64 2.6.12 Slackware 2.4.32 Windows XP x64 pro
Posts: 383

Rep: Reputation: 30
do ypu have ~/.vnc/ ?
I haven't used vnc for a while, I just know that you have to edit one of the files(xstartup sounds about right) in the ~/.vnc/ directory. In the file it will then you to uncomment two line to get your default desktop on vnc. Hope that helps.
 
Old 01-27-2005, 03:31 PM   #11
fortytwo42
LQ Newbie
 
Registered: Jan 2005
Posts: 11

Rep: Reputation: 0
I do have ~/.vnc, but all I have in there are the error logs and a passwd file. I tried creating an xstartup file and copying what a few people had done in there, but it didn't work. Is Debian different...? When I run vncserver, I do see it doing: "Starting applications specified in /etc/X11/Xsession" and I've gone in that directory but can't really make sense of anything.

Thanks for the help.
 
Old 01-28-2005, 04:30 AM   #12
fortytwo42
LQ Newbie
 
Registered: Jan 2005
Posts: 11

Rep: Reputation: 0
Well, I've managed to make *some* progress, now what's happening is I connect to the vncserver (currently I am checking it by checking through the web applet) and now I am getting a blank BLACK screen instead of a grey one that looked like a TV not hooked up to any cable. Here are what my files look like, I'd really appreciate any help possible:

Notice that in vnc.conf I point directly to xstartup, at this point I (think) that I am skipping over .Xsession entirely.
vnc.conf:
Code:
# /etc/vnc.conf written by Marcus Brinkmann. This file is in the Public Domain.
#
# This is the configuration file for the vncserver package.
# It is perl syntax, but only variable assignment is allowed.
# A semicolon will be added if missing.
# Every value has suitable defaults, so you probably don't need any file.
#
# This file will be sourced by `vncserver' and `vncpasswd'.
# After this file, $(HOME)/.vncrc will be sourced, so values can be
# overwritten on a per-user basis. If you want to reactivate the default
# value there, you have to specify an empty value. For example, $fontPath
# will set to the default value after
#
# $fontPath = "/foo";
# $fontPath = "";
#
# If you are missing something, please let me know.
# Marcus.Brinkmann@ruhr-uni-bochum.de

# System configuration
# --------------------
#
# This section contains entries that should be true for all users.

# $vncClasses should be the path to the java classes of server.
# $vncClasses = "/usr/share/vncserver";

# $XFConfigPath   can be set to the global XF86Config file. This will be
#                 parsed to gain default values for $fontPath and $colorPath.
#                 If you want to disable this feature, point it to an
#                 invalid file, "/foo" for example.
# $XFConfigPath = "/etc/X11/XF86Config";

# $fontPath should be a comma seperated list of fonts to be added to the font
#           path. If not specified, and $XFConfigPath is valid, vncserver
#           will read the $fontPath from there. If both are not set, the
#           default will apply.
# Example: $fontPath = "tcp/localhost:7100";     # would make vnc to use xfs.
# Example: $fontPath = "";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/misc/,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/Type1/,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/Speedo/,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/75dpi/,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/100dpi/,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/freefont/,";
#       $fontPath .= "/usr/X11R6/lib/X11/fonts/sharefont/";
# I don't know what the default is, though.

# $colorPath should be the RGB file to be used by X. This can also be taken from
#            XF86Config file if specified by $XFConfigPath
# $colorPath = "/usr/X11R6/lib/X11/rgb";

# User configuration
# ------------------
#
# This section contains entries that may change from user to user.

# $vncUserDir contains the filename for the log files directory of Xvnc
#             (the server) and the viewers that are connected to it.
# $vncUserDir = "$ENV{HOME}/.vnc";

# $vncPasswdFile contains the filename of the password file for Xvnc.
# $vncPasswdFile = $vncUserDir . "/passwd";

# $vncStartup points to a script that will be started at the very beginning.
# $vncStartup = "/etc/X11/Xsession";
$vncStartup = "/home/brian/.vnc/xstartup";

# $xauthorityFile should be the path to the authority file that should be used
#                 by your vnc X server.
$xauthorityFile = "$ENV{HOME}/.Xauthority";

# $defaultDesktopName should be set to the default name of the desktop.
#                     This can be changed at the command line with -name.
# $defaultDesktopName = "X";

# $geometry sets framebuffer width & height. Default will be calculated if
#           server is started from within a running X servers. Can be changed at
#           the commandline (-geometry). A fixed default will be used if
#           vncserver is not invoked in a running X session.
# Example:  $geometry ="640x480";
$geometry = "1024x768";

# $depth       sets the framebuffer color depth. Must be between 8 and 32.
# $pixelformat sets the default pixelformat.
#              The default will be calculated if none of both is specified
#              and when vncserver is called from within a running X servers.
#              Can be changed at the command line with option -depth.
#              A fixed default value will be used if vncserver is not
#              invoked in a running X session.
# Example:  $depth = "16";
#           $pixelformat = "rgb565";
#depth = "16";
$pixelformat = "rgb656";

# $getDefaultFrom sets the display from which you can query the default of
#                 the above three options, if you don't want to start vncserver
#                 from within a running X server. It will be added to the call
#                 of xdpyinfo.
#                 It is useful to get the default from the X server you will
#                 run xvncviewer in.
# Example:  $getDefaultFrom = "-display localhost:0"

# $rfbwait sets the maximum time in msec to wait for vnc client viewer.
# $rfbwait = "120000";
xstartup:
Code:
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
/usr/bin/gnome-session
exec gnome-session &
 
Old 01-28-2005, 05:12 AM   #13
fortytwo42
LQ Newbie
 
Registered: Jan 2005
Posts: 11

Rep: Reputation: 0
Alright, another update, I got it working. Here were the problems.

First of all, xstartup should look like this:
Code:
#!/bin/sh

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
Second of all, in all of my editing, xstartup and xinitrc had lost execute perms, so make sure you do a chmod a+x for both of the files.
 
  


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
VNC - the screen is a grey checked color rwtreke Linux - Newbie 1 02-01-2005 05:16 PM
Having troubles connecting to a vino vnc server from windows xp using tightvnc,help? brynjarh Linux - Software 0 01-12-2005 05:28 AM
xstartup configured, Vnc still only loads grey screen on boot. DeTHZiT Linux - Software 8 09-05-2004 12:45 PM
Grey screen when trying to VNC to Gnome In2Deep General 7 02-05-2004 06:01 AM
Connecting to Redhat 9 VNC Server aeb105 Linux - Newbie 18 08-26-2003 01:12 PM


All times are GMT -5. The time now is 02:34 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration