Solved

VNC - xstartup file

Posted on 2004-09-16
13
1,037 Views
Last Modified: 2013-12-06
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
Comment
Question by:Intern
  • 7
  • 6
13 Comments
 
LVL 1

Author Comment

by:Intern
ID: 12077588
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
 
LVL 6

Accepted Solution

by:
tanelorn earned 500 total points
ID: 12078261
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
 
LVL 6

Expert Comment

by:tanelorn
ID: 12078288
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 1

Author Comment

by:Intern
ID: 12078520
>>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
 
LVL 6

Expert Comment

by:tanelorn
ID: 12078561
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
 
LVL 1

Author Comment

by:Intern
ID: 12078562
Nevermind - found it
0
 
LVL 6

Expert Comment

by:tanelorn
ID: 12078585

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
 
LVL 1

Author Comment

by:Intern
ID: 12078591
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
 
LVL 6

Expert Comment

by:tanelorn
ID: 12078625
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
 
LVL 6

Expert Comment

by:tanelorn
ID: 12078877
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
 
LVL 1

Author Comment

by:Intern
ID: 12079266
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
 
LVL 1

Author Comment

by:Intern
ID: 12079285
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
 
LVL 6

Expert Comment

by:tanelorn
ID: 12079464
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
If you don't know how to downgrade, my instructions below should be helpful.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question