Re: Retrieving Horizontal Resolution
From: Dances With Crows (danSPANceswitTRAPhcrows_at_gmail.com)
Date: 05/04/05
- Previous message: Bob Parnes: "Retrieving Horizontal Resolution"
- In reply to: Bob Parnes: "Retrieving Horizontal Resolution"
- Next in thread: Bob Parnes: "Re: Retrieving Horizontal Resolution"
- Reply: Bob Parnes: "Re: Retrieving Horizontal Resolution"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 03 May 2005 20:00:39 -0500
On Wed, 04 May 2005 00:18:55 -0000, Bob Parnes staggered into the Black
Sun and said:
> Is there a way for an ordinary user to run a script returning the
> horizontal resolution of the monitor in use?
"xdpyinfo | grep resolution" ? This returns 75x75 for me here, but
that's because I've set things up that way specifically.
> On my system (debian), get-edid requires superuser privileges.
True. I don't know for sure what this returns for you that you want,
because I get nothing that could be described as "resolution data" when
I do "get-edid | parse-edid".
> Alternatively, I could parse appropriate lines in XF86Config-4, but I
> find that the actual resolution chosen by the system is not always
> predictable.
Eh? The first Mode listed in the Display subsection with the default
color depth is the mode that X typically starts up in. You can always
find out which of the available Modes you're using with "xvidtune -show"
, which also might work for you.
> My preferred script is python, but I should be able to adapt to an
> example in bash or perhaps another language.
The X functions that you need to call are all in C, so no matter what
scripting language you use, you'll be doing a system() and parsing its
output. HTH,
-- Matt G|There is no Darkness in Eternity/But only Light too dim for us to see Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong http://www.brainbench.com / Hire me! -----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
- Previous message: Bob Parnes: "Retrieving Horizontal Resolution"
- In reply to: Bob Parnes: "Retrieving Horizontal Resolution"
- Next in thread: Bob Parnes: "Re: Retrieving Horizontal Resolution"
- Reply: Bob Parnes: "Re: Retrieving Horizontal Resolution"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|