By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,695 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,695 IT Pros & Developers. It's quick & easy.

finding monitor or screen resolution in Linux with standard python module

P: n/a
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_GEOMETRY(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.

Mar 7 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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_GEOMETRY(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.

Mar 7 '07 #2

P: n/a
On Mar 7, 4:25 am, "akbar" <akbarh...@gmail.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_GEOMETRY(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

Mar 7 '07 #3

P: n/a
On Mar 7, 11:25 am, "akbar" <akbarh...@gmail.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_GEOMETRY(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:
http://python-xlib.sourceforge.net/d..._16.html#SEC15

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.

Mar 7 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.