LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Grey desktop connecting to VNC server (https://www.linuxquestions.org/questions/linux-software-2/grey-desktop-connecting-to-vnc-server-251975/)

paulsh2k4 11-06-2004 08:58 PM

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!.....

TBC Cosmo 11-06-2004 09:10 PM

Only thing i did RHEL 2.1AS

make symbolic link to xinitrc
in ~/.vnc
xstartup -> /etc/X11/xinit/xinitrc*

Lleb_KCir 11-06-2004 09:50 PM

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.

paulsh2k4 11-06-2004 10:14 PM

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

insurin 11-12-2004 05:44 PM

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

acid_kewpie 11-12-2004 05:54 PM

insurin, did you actually read the adivce above? it does tell you to edit the ~/.vnc/xstartup script...

insurin 11-13-2004 06:37 AM

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

a10392 11-30-2004 08:28 AM

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

fortytwo42 01-27-2005 02:04 PM

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.

tormented_one 01-27-2005 02:13 PM

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.

fortytwo42 01-27-2005 02:31 PM

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.

fortytwo42 01-28-2005 03:30 AM

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 &


fortytwo42 01-28-2005 04:12 AM

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.


All times are GMT -5. The time now is 01:06 AM.