Solved

Linux VNC -- Can't see root Apps??

Posted on 2006-11-13
5
1,047 Views
Last Modified: 2012-06-27
Hi,
So, I spent a lot of time and I finally have VNC up and running on my test machine at home. I have CentOs 4.2 running vncserver and I'm connecting to it from a WinXP machine. I made the changes to the xstartup file so that I can see the gnome desktop and it looks great....BUT, whenever I try to open a program that requires me to enter the root password before opening, like Network Security (firewall) or anything else that requires me to enter the root password, this program will NOT show up in the VNC window. If I hook the monitor directly up to the CentOS machine and open up a root program, then it shows up fine under this session but it cannot be seen when using VNC. When opening them up using VNC I can tell that Centos is doing something because I can hear my hard drive reading, so I'm guessing that somehow after I enter the root password that the program does open but it's just that I can't see it in the VNC session. Other than that,  everything else looks great--images, coloring, etc.

Any ideas on what might be happening?
0
Comment
Question by:goldylamont
5 Comments
 

Author Comment

by:goldylamont
Comment Utility
More info--check this out. When I try to open Emacs from the shell command I get this error:

[root@localhost ~]# emacs /etc/openldap/slapd.conf
Xlib: connection to "localhost.localdomain:1.0" refused by server
Xlib: No protocol specified

emacs: Cannot connect to X server localhost.localdomain:1.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.


So, somehow the server is refusing Xlib connections? or something. How do I correct for this so that I can actually use VNC.  Note,  when I got this error I was logged in as 'username' but was trying to run Emacs as 'root'.

Thanks!
0
 
LVL 1

Accepted Solution

by:
baybiz earned 250 total points
Comment Utility
It might have been easier to just enable  the remote desktop in gnome (vnc viewer will see it). Then open a root terminal from the gnome menu.
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 250 total points
Comment Utility
Hi,

just open a terminal after you launch vnc and type:

xhost +

This is not a problem with xlib its is simply that nvc refuses the requests when they arrive. Do't forget that xhost + means that you're allowing X connections to your VNS from everywhere so don't use it in a nonsecure environment. Aother method is to run vnc with -ac switch such as:

vnc -ac

NO it was the answer t your question but I agree with baybiz why don't you use Remote Desktop ? If you have your personal firewall enabled on your Centos dont forget to allow 5900, and 5901 to let your vnc client access to the remote connection ports.

Cheers,
K.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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…
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…

771 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