Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-25-2008, 09:04 AM   #1
LQ Newbie
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
Check wether a X server is running and ok

Basically I need a more reliable way to check wether a X server is ok than using ps/pgrep.
Is there a (standard) application which connects to a X server and exits again giving me the status? Something like "xterm -e exit".
Old 06-25-2008, 09:27 AM   #2
LQ Newbie
Registered: Jun 2008
Posts: 11

Rep: Reputation: 1
# xset -q

( q - for query )

It works good for me. The only case it is missing is the shortage of file descriptors.
Old 06-25-2008, 03:42 PM   #3
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,402
Blog Entries: 1

Rep: Reputation: 64
what about ....
export DISPLAY=":0.0"
(running on a tty, not on a terminal inside X)
Old 06-29-2008, 01:32 PM   #4
LQ Newbie
Registered: Jun 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks, both answers answer my question and I appreciate your help.


code, exit, server, status, x11

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to check uptime of all applications running in solris server rajaniyer123 Solaris / OpenSolaris 1 10-12-2007 11:37 PM
Check yor dcop server is running error messae dazpaul2222 Linux - Newbie 6 01-16-2007 05:26 PM
Health Check / Server Completion Check Software? tells Linux - Enterprise 0 04-20-2006 11:03 AM
ethernet, unsure wether it is working for me Michael_aust MEPIS 2 01-09-2006 03:50 AM
How can I check wether a file is empty in Linux by using shell script programming ??? Bassam Linux - General 2 02-26-2004 01:01 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:52 PM.

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