cancel
Showing results for 
Search instead for 
Did you mean: 

VNC log out how to log in

 
SOLVED
Go to solution
Gary L
Super Advisor

VNC log out how to log in

Hi

I open a linux remote virtual desktop via VNC (version E4.2.9). Just now, I did a "Log Out" via main menu - log out - ok. But, I meet problem when I wanna log in. The VNC window no any log in prompt like real linux desktop. No available on mouse right/left only F8 key.
How can I re-login in this VNC window? ( I know, I could kill this process of VNC xxx:1 and startup another VNC process via command vncserver).
Any answers will be very appricate
8 REPLIES
Stuart Browne
Honored Contributor
Solution

Re: VNC log out how to log in

Yeah, this happens because the VNC session launches a single instance of the windows manager, and when you exit it, there's nothing left to do with the empty X server.

Start by looking at the '~/.vnc/xstartup' routine. The last line should be your windows manager.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: VNC log out how to log in

Shalom,

ps -ef | grep vnc

Lets get a handle on whether the process is dead or not. I'm not sture at this point.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gary L
Super Advisor

Re: VNC log out how to log in

Hi Stuart Browne and SEP

Thank you very much for your help.
Have a great day.
Gary L
Super Advisor

Re: VNC log out how to log in

Hi Stuart Browne

Below is my xstartup file
#cat .vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# 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" &
exec gnome-session &

the last line is execute "Gnome" desktop when startup VNC, right? So, which one is my windows manager?

I have a another way to fix it, kill -9 "server1:1" process and re-start "vncserver". But, when I kill server1:1 and restart the nmuber became server:2, when kill :2 restart, number becaume :3. So, how to let the system use the server1:1 "1" again? is there a configuration file and parameter that let vncserver re-use.

thanks
Stuart Browne
Honored Contributor

Re: VNC log out how to log in

Assuming it's installed as a service, then you should just be able to 'service vncserver restart'.

'gnome-session' is your windows manager / desktop.

When you Log Out, that's what you are exiting.
One long-haired git at your service...
Alexander Chuzhoy
Honored Contributor

Re: VNC log out how to log in

To start the vnc on specific port - 1 for example (assuming this port isn't occupied by already running session) do:
vncserver :1

to stop:
vncserver -kill :1


There's a file /etc/sysconfig/vncservers,
where you can configure the vnc to start on specific port(s) for specific user(s).Thus every time you'll reboot your system, the VNC will start listening on these ports.
Gary L
Super Advisor

Re: VNC log out how to log in

Hi Alexander and Stuart

Thank you very much for your kindly help.

I know, vncserver restart and vncserver:1 can fix it. But, I remember there is a Linux server of our company can automatic use the lowest number via "vncserver" when the VNC process of the lowest number be stopped. For example: server:1 for root, server:2 for oracle. kill the process of server:1. root run "vncserver" again. It still used server:1 not server:3. Probably, I should remove some files or change some configurations of VNC.
But, It doesnâ t matter , I could use vncserver:1 to reuse the specific number.

Thanks
Gary L
Super Advisor

Re: VNC log out how to log in

I find a method could reuse the lowest number via "vncserver"
cd /tmp

ll -al you will find some files like these: .X0-lock .... .X7-lock

rm -r .X*

vncserver

reuse :1 not :8