开发者

Get screen vendor and serial number under Linux

I have an instance of Gdk::Screen wh开发者_开发技巧ich represents a monitor connected to my computer. How can I read that monitor's vendor ID and/or serial number?

Getting the Vendor ID and Serial Number from an XScreen would also suffice.

Reading the EDID of the Monitor would also suffice.

Any ideas? Thanks!


I haven't tested this out, but you should be able to look at the source of Gnome's display configuration applet. It's here:

http://git.gnome.org/browse/gnome-control-center/tree/panels/display/xrandr-capplet.c

The function get_display_name() looks promising. It looks like it uses code from libgnome-desktop, which is also viewable in the same git browser.


The EDID information usually is not passed on entirely by X11, but only those parts that matter for graphics renering, i.e. resolution, physical dimensions, stuff like that. It was possible to implement a X11 extension for this, but ATM there is no such one.

So you'll have to query the EDID information otherwise. Doing it remotely is impossible, but for reading local machine information there are tools like read-edid. Also there may be graphics driver vendor specific extensions, to do this, for example NV-CONTROL of NVidia.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜