开发者

Display (mntr) DeviceID Mac OS X in Bash?

开发者 https://www.devze.com 2023-03-08 00:50 出处:网络
I need to query the DeviceID of each connected monitor on Mac OS X Leopard & Snow Leopard. is this possible to do using bash? if not what would be the best approach?

I need to query the DeviceID of each connected monitor on Mac OS X Leopard & Snow Leopard. is this possible to do using bash? if not what would be the best approach? would this be stored in a preference file anywhere?

i tried accessing the system_profiler info but it does not look like the device id is included for the monitors开发者_开发知识库.

any help would be greatly appreciated...

Thanks!


You can find here How to Get the Display Name with the Display ID in Mac OS X? one small C program. You can compile it, and when you run it will show Device ID.

For example, for my notebook will return:

Color LCD : 69677760

it is decimal number, when you convert it to hexadecimal

echo 69677760 16 o p | dc

will return the 42732C0 hex-number what is the last part of Device ID from the colorsync.

0

精彩评论

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

关注公众号