LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VNC question (https://www.linuxquestions.org/questions/linux-newbie-8/vnc-question-4175439810/)

DavidDiepUSC 12-03-2012 08:51 AM

VNC question
 
Hi,

I have some questions about VNC... maybe you guys can help me out.

When I finish my VNC session, the next time I log back in, I do not get the desktop but just checkboxes for clipboard options. The only way I can get the desktop again is if I go and restart the VNCSERVER on the Linux machine.

What can I do keep me from doing this... it kinda sucks.

Here is my /.vnc/xstartup:

#!/bin/sh

[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
*gnome*)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
export PATH
fi
;;
esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then

shivaa 12-03-2012 12:38 PM

It sounds that when you login back, your VNC desktop services do not start properly or your gnome profile is not loading properly.
Generally there's GNOME desktop associated with VNC/Linux machines. So I guess you're not getting that default fully functional GUI desktop, but only some wierd screen with gray icon and an xterm.

So you could try:

Save all your jobs, kiil the VNC session and create a new VNC port (i.e. session) for yourself.
If it cannot help, then once share the screenshot of that wierd desktop, and permissions/ownership info. of your home plus .vnc directory.

And if still problem persists, then I'd suggest you to reset your gnome profile.

DavidDiepUSC 12-03-2012 01:32 PM

1 Attachment(s)
Thanks shivaa

I created another port, but it did not help. After the initial VNCSERVER start, I would be able to login and see the desktop. I would then quit and log off. My next VNC session would result in what you see in the attachment.

Thanks for all your help...

DavidDiepUSC 12-03-2012 01:35 PM

This is all that is in the .vnc folder:

lsysg01a.in.dc.gov:1.log lsysg01a.in.dc.gov:1.pid passwd xstartup

mbstemps 12-03-2012 04:55 PM

vnc logoff
 
I don't know how you are looking off, but just click the vnc in the upper left hand corner of the screen, click on 'close' the screen should be there when you come back.

John.

DavidDiepUSC 12-04-2012 08:36 AM

mbstemps,


Thanks! Apparently thats what will retain your session...

Man, I wish there was an explanation why.

Thanks again!

shivaa 12-04-2012 10:35 PM

Close option will do something like what hibernate option do in windows. It will keep your session & jobs alive. You can use F11 key to open the option.
On the other hand, could you open a terminal or able to do a right click on VNC desktop? If not then try to open it using ALT+CTRL+T and check for following process:
Code:

ps -aef | grep metacity
Also check your DISPLAY variable, as:
Code:

echo $DISPLAY
And set it to "hostname:<port-no>", if not set. Then logout & login and check.

Although it may problem with a corrupt xstartup, but first once reset your gnome profile:
Code:

cd ~
ls -la gno* gcon*
mkdir old_gnome
mv gno* gcon* old_gnome

Then again logout & login again. It will create new .gno* and .gcon* files in your home dir. So check if it works. If it also couldn't help, then sure there's pb with xstartup.

DavidDiepUSC 12-05-2012 07:20 AM

Thanks!

Here are the results of ps -aef | grep metacity
root 21245 21216 0 Dec04 ? 00:00:00 metacity
root 36032 36005 0 08:16 pts/1 00:00:00 grep metacity
echo $DISPLAY
:1.0
This is what is in XSTARTUP right now:

#!/bin/sh
[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
*gnome*)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
export PATH
fi
;;
esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then[/INDENT]

shivaa 12-05-2012 12:13 PM

(1) Metacity is running. It's ok.
(2) Are you using a remote VNC server and connecting through vncviewer? If yes, then after login into it, set your DISPLAY variable as:
Code:

<vnc-hostname>:<your-vnc-port-no>
For example (below is just sample):
myvnvcserver.myorg.com:1.0

Append the same in your .bashrc or .cshrc as:
Code:

DISPLAY=myvnvcserver.myorg.com:1.0; export DISPLAY (In .bashrc)
setenv DISPLAY myvnvcserver.myorg.com:1.0 (in .cshrc or .tcshrc)

(3) Then try to reset gnome profile as I wrote above. Also mention is right click working on vnc display?

DavidDiepUSC 12-06-2012 11:04 AM

1 Attachment(s)
Shivaa,

I'm not using a remote VNCSERVER, the VNC Server is native on the server. Right click does work, I've attached the screenshot.

Thanks!


All times are GMT -5. The time now is 11:55 PM.