Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1112
  • Last Modified:

VNC - xstartup file

We are trying to use VNC to connect to our Redhat Server.  The man says that we should make some changes to the xstartup file.  The only problem is that we can't find the xstartup file.  I am a linux newbie and we are using Enterprise Edition 3.

Any help would be appreciated.  Also, will modifying this file allow us to connect to the server and "see" the desktop like I can in a windows enviornment?
0
Intern
Asked:
Intern
  • 7
  • 6
1 Solution
 
InternAuthor Commented:
Ok, we are now connected to the server with REALVNC, but when we close a connection we get a crash error on the server and no one can connect to the server until you close that manually.

We are using the regular Desktop Sharing on the server right now and it seems to work other than we can only have one connection open at a time, and that the error is popping up.  

Error:
The application (krfb) crashed and caused the signal 11 (SIGSEGV)
0
 
tanelornCommented:
hi,

here  is my xstartup file and it seems to work fine
you'll find it in  the home directory  so its


~/.vnc/xstartup

you need the kill statement at the end so it kills the xssession.

#######################
#!/bin/sh

# Red Hat Linux VNC session startup script
unset SESSION_MANAGER
/etc/X11/xinit/xinitrc
vncserver -kill $DISPLAY

#############################


Tanelorn
0
 
tanelornCommented:
Hi

<snip///  Any help would be appreciated.  Also, will modifying this file allow us to connect to the server and "see" the desktop like I can in a windows enviornment?  ///snip>


not really,  this is just like using an x server except that the xserver is running on the linux box.  all seperate x sessions (unless you share one)    also, you can kill the viewer and the session will continue to run in the background of the linux box.

we use vnc for all of our solaris, and linux boxes here and it seems to work pretty well.

are you using the version that came with redhat???

Tanelorn
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
InternAuthor Commented:
>>tanelorn

~/.vnc/xstartup


You said that is in the home directory...  I can not find this anywhere.  Can you step through the navigation in the GUI?  I used the up arrow key to go all the way out, then what folders do I need to go through??  Am I missing something?
0
 
tanelornCommented:
its in a hidden directory.

you'll need to turn on "show hidden files"

so if you are using konqueror (sp)  its in the view menu item,  then down towards the bottom
anything that starts with a .  (dot) is a hidden folder/file  

or if you use a terminal shell,  just type in

cd ~/.vnc
and that should take you there as well.

T

0
 
InternAuthor Commented:
Nevermind - found it
0
 
tanelornCommented:

the .vnc folders are in the users directory

if the user is root,  it will be in the

/root        directory

if regular users are using them,  they will be where ever you have the home directories

usually

/home/username/.vnc

T

0
 
InternAuthor Commented:
I made the changes to the file per your post.  It still errors when I close my VNC session from my desktop.  The error shows up on the server and you have to close the error box to connect again.
0
 
tanelornCommented:
how are you closing the session?  are you logging off?  or just closing the viewer?

also, what is the command you are using to start the vncserver? (with all the switches)

also,  are you using the vnc RPM that came with the distro?

T
0
 
tanelornCommented:
bear with me now, alot of this you probably already know...

this is how I have this set up in my environment here.

the service does not start at boot.  

user "x" will ssh (or telnet..) into the server (sun or linux)

then he types vncserver (no switches)

the first time sets the password
the second time will start the xsession

he gets the > "New 'X' desktop is server:1"

then I tell them to exit the ssh session and open the vncviewer

connect to server:1
and put in the password.  

to kill the session,  just log out, and it should kill the xsession on the server.

if this sequence still crashes the server, I would see if there are any updated rpm's on redhad's site and install them

T

0
 
InternAuthor Commented:
Alright let me explain what I am doing.  We have been connecting fine to the server and viewing the "whole" desktop using Destop Sharing that is built in to RedHat.  This is where I get the error when I close the session.  

This is why we tried using VNC.  When we connect to VNC all you see is a terminal window and it works fine, but we want to see the GUI.  

Sorry about the miscominication, So this is where we stand Destop Sharing works good, but it gives an error when we close it.  VNC works if we want to see the command prompt but it does not show the whole desktop.

If you guys can help us figure this out I will post some more question points also, to try and make up for the time you spent working on this.
0
 
InternAuthor Commented:
When we use the vnc part it will not crash - it just does not show the destop.  Sorry about all the stupidity on my part!
0
 
tanelornCommented:
Hi,
s ok,  you should read some of the stupid things I type....  ;-)

I'm not familiar with the desktop sharing that's built into redhat.

so I can't help you there.

however,
if you install the vnc RPM's package that comes with the distribution (vncserver and vncviewer)
and follow the command sequence that I wrote above, with the xstartup file that I copied in, that should work.
you will get a full desktop and not just the command window.  
and it shouldn't crash.  (hopefully)
;)
T
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now