finding monitor or screen resolution in Linux with standard python module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • akbar

    #1

    finding monitor or screen resolution in Linux with standard python module

    I googled and searched in archive. All I can find is finding
    resolution with Tkinter and pygame. Any idea to find monitor
    resolution with standard python module?
    I can check from output of: xprop -root
    _NET_DESKTOP_GE OMETRY(CARDINAL ) . The problem is when you use Beryl or
    Xgl, it is not correct anymore because Beryl or Xgl set this value
    from amount of workspaces multiplied by monitor or screen resolution.

  • =?ISO-8859-1?Q?Jos=E9_Antonio_Salazar_Montenegro?=

    #2
    Re: finding monitor or screen resolution in Linux with standardpython module

    I'm using Beryl too, and xwininfo -root gives te correct resolution.

    akbar wrote:
    I googled and searched in archive. All I can find is finding
    resolution with Tkinter and pygame. Any idea to find monitor
    resolution with standard python module?
    I can check from output of: xprop -root
    _NET_DESKTOP_GE OMETRY(CARDINAL ) . The problem is when you use Beryl or
    Xgl, it is not correct anymore because Beryl or Xgl set this value
    from amount of workspaces multiplied by monitor or screen resolution.
    >
    NOTA: La informacion de este correo es de propiedad exclusiva y confidencial. Este mensaje es solo para el destinatario indicado, si usted no lo es, destruyalo de inmediato. Ninguna informacion aqui contenida debe ser entendida como dada o avalada por MADISA, sus subsidiarias o sus empleados, salvo cuando ello expresamente se indique. Es responsabilidad de quien recibe este correo de asegurarse que este libre de virus, por lo tanto ni MADISA, sus subsidiarias ni sus empleados aceptan responsabilidad alguna.

    NOTE: The information in this email is proprietary and confidential. This message is for the designated recipient only, if you are not the intended recipient, you should destroy it immediately. Any information in this message shall not be understood as given or endorsed by MADISA, its subsidiaries or their employees, unless expressly so stated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither MADISA, its subsidiaries nor their employees accept any responsibility.

    Comment

    • MonkeeSage

      #3
      Re: finding monitor or screen resolution in Linux with standard python module

      On Mar 7, 4:25 am, "akbar" <akbarh...@gmai l.comwrote:
      I googled and searched in archive. All I can find is finding
      resolution with Tkinter and pygame. Any idea to find monitor
      resolution with standard python module?
      I can check from output of: xprop -root
      _NET_DESKTOP_GE OMETRY(CARDINAL ) . The problem is when you use Beryl or
      Xgl, it is not correct anymore because Beryl or Xgl set this value
      from amount of workspaces multiplied by monitor or screen resolution.
      Perhaps read-edid [1] or ddcprobe [2] would work since they read the
      info strait off the EDID. You could probably read the EDID from python
      (mabye through the xlib binding?), but no need to reinvent the wheel.

      [1] http://john.fremlin.de/programs/linu...did/index.html
      [2] http://sources.gentoo.org/viewcvs.py...nfig/ddcprobe/

      Regards,
      Jordan

      Comment

      • consmash@gmail.com

        #4
        Re: finding monitor or screen resolution in Linux with standard python module

        On Mar 7, 11:25 am, "akbar" <akbarh...@gmai l.comwrote:
        I googled and searched in archive. All I can find is finding
        resolution with Tkinter and pygame. Any idea to find monitor
        resolution with standard python module?
        I can check from output of: xprop -root
        _NET_DESKTOP_GE OMETRY(CARDINAL ) . The problem is when you use Beryl or
        Xgl, it is not correct anymore because Beryl or Xgl set this value
        from amount of workspaces multiplied by monitor or screen resolution.
        A method 'screen' from Python X Library looks promising:


        More, or less if I understand right you just need to request from
        server dimensions of the screen, over x protocol of course. So it will
        be something associated with Xlib.

        Comment

        Working...