Solved

VNC - xstartup file

Posted on 2004-09-16
13
1,021 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:Intern
Comment Utility
>>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
Comment Utility
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
Comment Utility
Nevermind - found it
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Expert Comment

by:tanelorn
Comment Utility

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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now