# [solved] tightVNC login to server problems

## bigbangnet

I can log in to my vncserver in my network pretty fine by using xx.xx.xx.xx:number of my display. but my vncviewer can only see a terminal. that's all. The rest of the screen is gray. Is there anything i can take a look so i can fix this. config files or such ? A bit lost here ?

----------

## Kaso_da_Zmok

what is in this file? 

```
~/.vnc/xstartup
```

----------

## bigbangnet

Here is my ~/.vnc/xstartup.

```
#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

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

xdm &

```

I tried replacing xdm & with gdm & and startx & and had similar results. I also tried putting unset session_manager after the first line and exec /etc/X11/xinit/xinitrc and same thing...similar results.

Just in case here is my xorg.conf as well

```

# nvidia-xconfig: X configuration file generated by nvidia-xconfig

# nvidia-xconfig:  version 290.10  (buildmeister@swio-display-x86-rhel47-07.nvidia.com)  Wed Nov 16 18:47:40 PST 2011

Section "ServerLayout"

    Identifier     "X.org Configured"

    Screen      0  "Screen0" 0 0

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

    ModulePath      "/usr/lib64/xorg/modules"

    ModulePath        "/usr/lib64/xorg/modules/extensions"

    ModulePath      "/usr/lib64a/xorg/opengl/xorg-x11"

    ModulePath      "/usr/lib64/xorg/opengl/xorg-x11/extensions"

    FontPath        "/usr/share/fonts/misc/"

    FontPath        "/usr/share/fonts/TTF/"

    FontPath        "/usr/share/fonts/OTF/"

    FontPath        "/usr/share/fonts/Type1/"

    FontPath        "/usr/share/fonts/100dpi/"

    FontPath        "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

#    Load           "dri2"

    Load      "vnc"

    Load           "extmod"

    Load           "record"

    Load           "dbe"

    Load           "glx"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

EndSection

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol" "auto"

    Option         "Device" "/dev/input/mice"

    Option         "ZAxisMapping" "4 5 6 7"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "Monitor Vendor"

    ModelName      "Monitor Model"

EndSection

Section "Device"

    Identifier     "Card0"

    Driver         "nvidia"

    VideoRam       1048576

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Card0"

    Monitor        "Monitor0"

    SubSection     "Display"

        Viewport    0 0

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       4

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       8

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       15

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       16

    EndSubSection

    SubSection     "Display"

        Viewport    0 0

        Depth       24

    EndSubSection

EndSection

```

Each time I connect from my vncviewer I can connect successfully but it's only a terminal that opens up. If I try to type GDM here is what happens:

```
gdm[19733]: WARNING: GDM file gdm-daemon-config.c: line 2041 (): Cannot run seteuid to 0: Operation not permitted

GDM file gdm-daemon-config.c: line 2041 (): Cannot run seteuid to 0: Operation not permitted
```

If I type startx after I connect here is what happens on the terminal:

```
startx

xauth:  file /home/bigbangnet/.serverauth.21115 does not exist

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed

_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:

Cannot establish any listening sockets - Make sure an X server isn't already running

Please consult the The X.Org Foundation support

         at http://wiki.x.org

 for help.

Please also check the log file at "/var/log/Xorg.0.log" for additional information.

Server terminated with error (1). Closing log file.
```

----------

## Hu

What do you want to be shown?  From the description, everything is behaving as it should.  Running startx is meant to create an X server on the physical console.  The various DMs are meant to provide pre-login authentication and then transfer to an X server running as the right user.  VNC is already started as the right user, so running a DM there does not make any sense.

----------

## bigbangnet

Should'nt I see some kind of window manager (the desktop in other words ) like gnome when vncviewer connects to vncserver ?

----------

## Hu

That would be handy, but your VNC startup script does not run one, so no, you should not see one.  :Wink:   If you modify the startup script to invoke one, then you would see it and it should work fine.  Normally, your window manager is started either from your xinitrc or, in some cases, by way of integration with your pre-login authentication screen (XDM/GDM/KDM).  Since you are not using either of those, no window manager is started.

----------

## bigbangnet

That's what I'm trying to do. How can I accomplish this then ?

----------

## bigbangnet

If you mean by using this in my  ~/.vnc/xstartup file:

```

#!/bin/sh

unset SESSION_MANAGER

exec /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

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

xdm &

```

that didn't work. I just get the terminal again. Same thing. No gnome desktop like I want..in the first place.

----------

## Kaso_da_Zmok

comment out the xterm and xdm and put whatever DE or WM you want there.

in my i case i put starte16 to start e16 in the vncsession.

so put what you want there. startfluxfox, startxfce etc

----------

## bigbangnet

Since I use gnome does that mean I would put gdm ? I tried that too and I got the same results... or is it startgdm ?

----------

## Kaso_da_Zmok

No to gdm because gdm is login manager and not DE or WM

Use this to start gnome in the vnc session

```
 exec ck-launch-session gnome-session
```

----------

## bigbangnet

I will test that when I have time and probably get back here...I hope not though... thanks

ps: sorry for late reply...busy and all

----------

## bigbangnet

I think I'm getting closer but now I saw a button that said "Could not acquire name on session bus"... and still gray after that.

----------

## bigbangnet

Nevermind my last reply, made some research (should of done that first) and I found the solution to the last error message.

I added 

```
unset DBUS_SESSION_BUS_ADDRESS
```

after 

```
unset SESSION_MANAGER
```

and it works fine now. All I need to do is test it from my work and connect from my work to my home. Never done that with an external ip address ...is it possible ? If so should I use my external Ip to connect it too like 206.99.xx.xx:1 or whatever number after the column.

By the way, thanks for all the help guys. I really appreciate that

----------

