LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   VNC displays 'terminal window' that can't be closed after VNC connection to CentOS (http://www.linuxquestions.org/questions/red-hat-31/vnc-displays-terminal-window-that-cant-be-closed-after-vnc-connection-to-centos-794278/)

Hispacific 03-09-2010 12:36 PM

VNC displays 'terminal window' that can't be closed after VNC connection to CentOS
 
I have VNC server running on Centos 5.3 and a user called student. When I use VNC viewer, from another computer, and connect to my server on port 5901, the login is fine but I see what appears to be a terminal window, sometimes there are 3+ of them. When there are multiples of these windows, I can close all but one. I can minimize that window, I can't close it. How can I prevent this from appearing?

I have tried changing xstartup, commenting out various lines, added different gui's such as gnome but I still have that window.

It looks like a terminal window without the menus bar showing File, Edit, etc.
The title bar says: student1@tc001:~
Then in the window it shows: [student1@tc001~]$


Under /home/student1/.vnc my xstartup file looks like this:

#!/bin/sh
( while true ; do xterm ; done ) &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
xterm -geometry 160x160+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &



Any help would be greatly appreciated. I am new to linux and have tried searching the forums for a solution before I posted this.

dragonfly2010 10-15-2010 03:44 PM

If you comment out the following line from the xstartup file and restart the VNC server the xterm window will not automatically open:

( while true ; do xterm ; done ) &

I have read on some other posts online that there might be a risk that you won't be able to re-start your desktop manager if something happens and you don't have an xterm available, but I suspect this will not be a common issue. Also, if you have ssh access to your server you should be able to resolve any issues.


All times are GMT -5. The time now is 02:33 PM.