Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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.
#!/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]
(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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.