LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   VNC works, but doesn't ask for password (https://www.linuxquestions.org/questions/suse-opensuse-60/vnc-works-but-doesnt-ask-for-password-499534/)

drokmed 11-07-2006 04:48 PM

VNC works, but doesn't ask for password
 
Hi all,

I need the vncserver to ask me for a password!

I'm running SUSE 10.1, and the vncserver is configured and up and running. Works fine.

The first time I started the vncserver (yast2->remote administration) I didn't put a password in when it prompted me (kickin myself!). Now, it NEVER asks for a password. It will let anybody connect to it, and give them a login prompt!

I've tried everything I can think of. Used vncpasswd as root and my normal login. I've edited xinetd startup for the vnc1 session. I've even un/reinstalled tightvnc and the xorg*vnc. No luck.

This is driving me nuts!

If I connect using the java interface (browser pointed to port 5801) it DOES ask for a vnc password, before connecting to a login session.

If I connect to 5901, it refuses.

If I connect to port 1, it connects! and doesn't ask for a password.

The docs say the password is stored in $HOME/.vnc/passwd. The service runs as nobody, however there is NO /home/nobody directory. I tried making a /home/nobody/.vnc/passwd file but no luck DOH!

I've seen other people post this very same question, but I haven't found any of them answered.

Please help me Obiwan... you are my only hope!

kotnik 11-08-2006 11:51 AM

I don't know about Yast thing, but you can start vncserver as a regular user. First set up a password:

vncpasswd

Copy xinit script of your favourite Window Manager into ~/.vnc/xstartup. I use fluxbox, so my xstartup looks like this:

Code:

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# Start the window manager:
eval `ssh-agent`
exec /usr/X11R6/bin/startfluxbox

Then, start a server:

vncserver

Nobody will be able to connect without a password.

crazibri 11-09-2006 03:38 PM

There's 2 ways to enable VNC via GUI (KDE or GNOME).

Yast > Remote Administration (which starts a separate session for each remote login) and yes you have to manually setup a password using steps below.

second way:

Yast > Display and Monitor (X monitor setup) and just enable VNC (which lets you log into the existing session visible on X). That will also give you a password option right there and not have to go through the troubles above.

FYI - make sure you open the firewall port for the one you want (5900 or 5800 - java). Or be smart and do VNC through SSH tunnel (no firewall port opening required, except for SSH).

Hope this helps :D

drokmed 11-10-2006 10:57 AM

Thank you for both of those responses.

The "second way" is what I was actually looking to do, which is to remote control the current X session, just like I do on my windows servers.

However, when I enabled that option, it does wierd things. It works, I can connect to it from a remote vnc client, but the video is scrambled (interlaced) and the keyboard on the server becomes disabled. DOH! I have to view from the server, and key from the remote client heh. Oh well, disabled that for now.

I sure wish suse/Novell had some documentation on this stuff. The various online help resources dont even mention the display->vnc option. When enabled, its deactivating the local keyboard... dont see any options to configure that.

crazibri 11-10-2006 12:49 PM

Hmm, I had a similar problem like that with a previous machine. I remember that you have to go into your X11 config file to change it. There will be an entry for your existing keyboard and mouse but there will be another entry for your VNC keyboard and VNC mouse. Check it out and see if you see anything wrong. It should be in /etc/X11/xorg.conf if I remember correctly. You should enable that VNC option using the GUI config before looking at the xorg.conf file, otherwise you wont see the VNC entries.

If you display your conf file, I might be able to help. :)

kotnik 11-10-2006 06:42 PM

If you want to access to already running X desktop, then use x11vnc package. It's easy to setup and use.


All times are GMT -5. The time now is 03:59 PM.