Created
December 25, 2012 15:22
-
-
Save mapix/4373704 to your computer and use it in GitHub Desktop.
Not always does Xorg run on :0. For times like those, this script allows you to find out which it is.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DISPLAY=$(tr '\000' '\n' < /proc/`pidof X`/cmdline | egrep '^:[0-9]+') | |
OR some what: | |
export DISPLAY=$(tr '\000' '\n' < /proc/`pidof Xorg`/cmdline | egrep '^:[0-9]+') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment