Mercurial > code > home > repos > homeauto
comparison lib/localdisplay.py @ 1060:0cd92c2f8cf4
find .Xauthority better, tools that talk to X
Ignore-this: b6a9920c14e702c68785d794b28ce141
darcs-hash:fb330d329f733cd54240f524daba6c853f95238b
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 21 Mar 2016 04:21:06 -0700 |
parents | 3184772368a5 |
children | 9ee169ba3f0e |
comparison
equal
deleted
inserted
replaced
1059:faf1f8677a91 | 1060:0cd92c2f8cf4 |
---|---|
17 display = [arg for arg in proc.cmdline if not arg.startswith('-')][1] | 17 display = [arg for arg in proc.cmdline if not arg.startswith('-')][1] |
18 if display == 'tcp': # ?? | 18 if display == 'tcp': # ?? |
19 display = ":0.0" | 19 display = ":0.0" |
20 assert display.startswith(':'), display | 20 assert display.startswith(':'), display |
21 os.environ['DISPLAY'] = display | 21 os.environ['DISPLAY'] = display |
22 os.environ['XAUTHORITY'] = os.path.expanduser('~/.Xauthority') | |
22 break | 23 break |
23 else: | 24 else: |
24 raise ValueError("didn't find an Xorg process") | 25 raise ValueError("didn't find an Xorg process") |