Solved

VNC - xstartup file

Posted on 2004-09-16
13
1,034 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ftp to port 21 4 43
awk variable in printf 1 25
how can I install and run a program from a 32GB Micro SDHC card? 8 64
Server 2012 Hypervisor 2 10
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

831 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