Re: Retrieving Horizontal Resolution

From: Dances With Crows (danSPANceswitTRAPhcrows_at_gmail.com)
Date: 05/04/05

  • Next message: Gordon Beaton: "Re: Fedora Core 2, Matrox G550, probs w 2nd head"
    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
    

  • Next message: Gordon Beaton: "Re: Fedora Core 2, Matrox G550, probs w 2nd head"

    Relevant Pages

    • Re: trouble with Javascript Pop-up
      ... the Publisher file on my laptop, but copied it over to my desktop to produce ... I also read somewhere that if you set your monitor to its default ... resolution, that might help??? ... Here's the script for the pop-up: ...
      (microsoft.public.publisher.webdesign)
    • Re: Help!
      ... script that makes a web site automatically adjust to different ... If you remember having heard something about a script for this purpose, ... was probably a script which detects the monitor resolution and redirects the ... user to a page supposedly designed for that resolution. ...
      (microsoft.public.frontpage.programming)
    • Re: Calculate time difference in mini-second with VBScript
      ... we wrote a script to monitor file server ... high resolution, but VBScript cannot directly get to them. ... COM objects that can access a higher resolution timer. ...
      (microsoft.public.scripting.vbscript)
    • Re: Automatic display resolution settings
      ... To boot to a specific screen resolution "Automatically" based on day and time would require some sort of booting software that would read the day and time information from the BIOS and then decide which configuration to boot. ... An alternative is to have the resolution set to the desired settings by way of a batch file or logon script. ...
      (microsoft.public.win2000.general)
    • Re: Shortcut to change Screen Resolution[Script attached]
      ... This toggle script makes use of an external program QRes.exe to do the actual screen resolution changing. ... Besides, though it saves a couple of clicks, a shortcut to toggle between the 2 specific resolutions would simplify things a lot... ... I suppose I need another VBScript Jon, ...
      (microsoft.public.windowsxp.general)