LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-25-2008, 09:04 AM   #1
johg
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
solarkash
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
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

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

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


Reply

Tags
code, exit, server, status, x11



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:13 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