LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-05-2011, 03:37 AM   #1
DoME69
Member
 
Registered: Jan 2008
Posts: 189

Rep: Reputation: 16
how can i know if user set xhost?


Hi...

I wanted to know if user / Display set Xhost.

how can i know that?

Thanks
 
Old 09-05-2011, 06:10 AM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
http://www.xfree86.org/current/xhost.1.html
Quote:
nothing
If no command line arguments are given, a message indicating whether or not access control is currently enabled is printed, followed by the list of those allowed to connect. This is the only option that may be used from machines other than the controlling host.
Is this what you're after, to know if a specific entry exists on the allowed list?
Or if the environmental variable DISPLAY has been set, or something else?
 
Old 09-05-2011, 06:33 AM   #3
DoME69
Member
 
Registered: Jan 2008
Posts: 189

Original Poster
Rep: Reputation: 16
Hi...

by typing xhost at my machine i got enable/disable of xhost.

what i want is to know if another display/user set xhost to enable or disable.
 
Old 09-05-2011, 06:46 AM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Well a quick read around and it seems that means you're looking at an empty list of entities allowed, aka no one's set anything enabled/allowed.
What are you trying to achieve, because this itself isn't programming, and most sites seem to suggest xhost is weak and for single user usage only, to be reconsidered for things like xauth. If you're trying to check if a connection to a machine/device is going to succeed, can't you just try it and neatly capture any error returned?
 
  


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
Unable to set xhost + , in non-global zone rajaniyer123 Solaris / OpenSolaris 8 09-15-2009 11:25 AM
xhost + as user oracle not working, need to see oracle install GUI enzo250gto Linux - Software 2 02-11-2007 11:27 AM
set "xhost local:" perpetually pbhj Slackware 6 05-09-2006 05:41 PM
Problem with "xhost +localhost" not staying set Nylex Linux - General 2 12-29-2005 09:55 AM
How can I set up xhost permissions again? David the H. Debian 12 07-16-2004 12:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:34 AM.

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