LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-09-2011, 12:20 PM   #1
gvanto
Member
 
Registered: Oct 2009
Posts: 40

Rep: Reputation: 0
Question Installing xhost on RH


I have been following tutorial:
https://wiki.archlinux.org/index.php/SSH

in order to try and get gvim working with SSH forwarding.

When I run 'gvim', I get:
Quote:
[02:53:12][root@host:/home]# gvim
E233: cannot open display
According to the above tutorial, I need to run 'xhost +', but to my disappointment, 'xhost' command does not exist.
So I search for 'xhost rpm package' and come to this link:

http://pkgs.org/centos-5-rhel-5/cent....i386.rpm.html

After I download and try to install the package, I get dependencies errors:

Quote:
[03:10:04][root@host:/home]# rpm -ivh xorg-x11-server-utils-7.1-5.el5_6.1.i386.rpm
warning: xorg-x11-server-utils-7.1-5.el5_6.1.i386.rpm: V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
filesystem >= 2.3.7-1 is needed by xorg-x11-server-utils-7.1-5.el5_6.1.i386
libXau.so.6 is needed by xorg-x11-server-utils-7.1-5.el5_6.1.i386
libXfontcache.so.1 is needed by xorg-x11-server-utils-7.1-5.el5_6.1.i386
libc.so.6(GLIBC_2.4) is needed by xorg-x11-server-utils-7.1-5.el5_6.1.i386
rtld(GNU_HASH) is needed by xorg-x11-server-utils-7.1-5.el5_6.1.i386
I normally use Ubuntu and find that dependencies are taken care of themselves mostly, is there a way to perhaps update my repositories or something to include 'newer' packages like 'xhost'? (so that dependencies can take care of themselves)?

Quote:
[03:10:11][root@host:/home]# yum search xhost
Searching Packages:
Setting up repositories
update 100% |=========================| 951 B 00:00
rpmforge 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:03
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
No Matches found
[03:20:25][root@host:/home]#
:-((

ANy help would be much appreciated!

gvanto
 
Old 05-09-2011, 12:43 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What version of RHEL are you using? I hope it's 5, since you downloaded a CentOS 5 package, but if that was true then the base dependencies would have worked. It looks like you're on RHEL 4 - iirc - from the lack of rtld(GNU_HASH). But then you use yum, which isn't available on RHEL 4. Is this really CentOS 4?

Quote:
I normally use Ubuntu and find that dependencies are taken care of themselves mostly
Part of the problem is that you tried to use rpm instead of yum. That's like using dpkg instead of apt-get. rpm doesn't take care of dependencies for you.

In any case you can find what package provides xhost with the following command:
Code:
yum whatprovides "*/xhost"
It's probably called xorg-x11-server-utils.
Then do:
Code:
yum install xorg-x11-server-utils
 
Old 05-09-2011, 01:25 PM   #3
gvanto
Member
 
Registered: Oct 2009
Posts: 40

Original Poster
Rep: Reputation: 0
Thanks much Alucard! I had no idea about this whatprovides feature, seems like a v useful one ...

Making progress - got xhost installed, installed xclock in the same fashion

Still getting error with display 'Cant open display' error when trying to open gvim

Quote:
Error: Can't open display:
My putty event log shows that I X11 forwarding has been 'refused' ...
There must be a way to configure the host to be in the 'allowed to X-forward' list on the server somewhere, will try to find it ...

I've been following this: https://wiki.archlinux.org/index.php/SSH and it says to run 'xhost +' in case of display errors, only running that gives me another display problem:
Quote:
xhost: unable to open display ""
 
Old 05-09-2011, 01:50 PM   #4
gvanto
Member
 
Registered: Oct 2009
Posts: 40

Original Poster
Rep: Reputation: 0
oh yes and I've checked the version:

Quote:
Linux version 2.6.18-028stab064.8-ent (root@rh5-build-x64) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SM P Sat Oct 31 08:34:51 MSK 2009
So it's RedHat but I'm not entirely sure which version (rh5 appears in there, so does 4.1.2, etc) - how to know?
 
Old 05-09-2011, 01:56 PM   #5
gvanto
Member
 
Registered: Oct 2009
Posts: 40

Original Poster
Rep: Reputation: 0
Got it working! Had to restart the sshd service:
http://www.starnet.com/xwin32kb/restart_sshd

Thanks much guys!

OK, now where to find default vimrc location.

Probably need to get zshenv going ... :-)
 
Old 05-09-2011, 02:30 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
RHEL5 has 2.6.18, but that's not a stock kernel - all of -028stab064.8-ent is weird. 4.1.2 refers to the version of gcc used to build the kernel.
 
Old 05-09-2011, 11:02 PM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
You shouldn't need to use xhost. Are you sure you enabled X11 forwarding in the server config file? And did you use the "-Y" flag when you ran the ssh client?

It may also be a good idea to run the ssh client with the "-v" flag to see what is going on.

Regards,

Evo2.
 
Old 05-10-2011, 01:11 AM   #8
gvanto
Member
 
Registered: Oct 2009
Posts: 40

Original Poster
Rep: Reputation: 0
Thanks evo2, got it sorted.
 
Old 05-10-2011, 02:42 AM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by gvanto View Post
Thanks evo2, got it sorted.
Ok great. I see you said you restarted sshd, but did you have to do anything else? Are you actually using xhost or is it working without it?

Cheers,

Evo2.


PS. Please use the "thread tools" to mark the thread as "solved".
 
Old 05-10-2011, 05:41 PM   #10
gvanto
Member
 
Registered: Oct 2009
Posts: 40

Original Poster
Rep: Reputation: 0
Was just using 'xhost +' command (not sure it helped) because the above tutorial said to do that in case of Display problems (see my prev post).

ok, will mark as solved, thanks !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xhost + triley Linux - General 1 12-31-2008 01:10 PM
xhost sachinh Linux - General 1 05-31-2007 05:10 PM
xhost + mlykam Linux - Software 3 03-17-2005 09:50 AM
xhost itsjung Linux - Newbie 4 12-22-2004 05:58 AM
xhost + and 9.1 Mufasa SUSE / openSUSE 1 11-14-2004 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration