473,598 Members | 3,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

Mar 7 '07 #1
3 3510
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.

Mar 7 '07 #2
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

Mar 7 '07 #3
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:
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
30419
by: KJM | last post by:
How can I detect if the user has dual monitors and then how do I control which monitor a form is displayed on. Currently my forms always come up on my right monitor. What if I want to have it always display on my left one? Thanks Ken
3
2649
by: Mario | last post by:
How to get monitor resolution using javascript?
10
11593
by: santiago538 | last post by:
Hi, Is there any way to specify which monitor a Window.open() will launch a new browser window in on systems with more than one display. It would only need to work with Mozilla browsers, and not IE. Thanks!
20
10829
by: Joel Hedlund | last post by:
Hi all! I use python for writing terminal applications and I have been bothered by how hard it seems to be to determine the terminal size. What is the best way of doing this? At the end I've included a code snippet from Chuck Blake 'ls' app in python. It seems to do the job just fine on my comp, but regrettably, I'm not sassy enough to wrap my head around the fine grain details on this one. How cross-platform is this? Is there a more...
5
2053
by: Nomen Nescio | last post by:
I'm running gpg in python to verify a signature. I can see that it is working, because gpg is displaying the results. But I need a way to let the python script know this. According to the gpg manual there is a return code from gpg of 0 if the verify is good and 1 if it is bad. Can anyone tell me how I can get the python script to 'see' this return code?
4
3988
by: Paolo Pantaleo | last post by:
Hi, I need to capture a screen snapshot in Linux. PIL has a module IageGrab, but in the free version it only works under Windows. Is there any package to capture the screen on Linux? Thnx PAolo
2
2684
by: Bill Nguyen | last post by:
Is there a way to send output from a .NET app to a selected monitor screen in a 3-monitor client desktop? Currently, my app sends output to 3 windows then I have to move/drag each of them to the proper monitor connected to the desktop. Thanks Bill
10
1792
by: RobinS | last post by:
Hello to all, and happy new year! I have this application that someone wrote that I'm sort of checking out. The forms look fine in design mode, but when I run the application, it crops off the bottom of almost every form. I haven't figured out yet if there's a pattern to it. I compared two forms -- one that looks okay and one that gets cropped, and aside from the size and the accept button and the cancel button, their properties are...
3
6660
by: rahulnag22 | last post by:
Hi, I have developed a GUI using tkinter (grid geometory manager). The structure is a top frame containing multiple subframes. Each subframe has a combination of widgets like(Entry, label, button,listboxes). The subframes are placed with a padx and pady offset with regards to the other subframes. And the widgets within these subframes have their own padx and pady offsets. The GUI runs fine on my linux box, but on a different linux box...
0
7991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7902
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8395
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8050
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6719
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3898
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1250
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.