Skip to content

Commit

Permalink
$DISPLAY now defaults to ":0", useful for eg Xming
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Jan 20, 2015
1 parent 0214acd commit b187603
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reprounzip-vagrant/reprounzip/unpackers/vagrant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ def __init__(self, enabled, display=None):
self.display)

# Locate local display
local_addr, local_display = os.environ['DISPLAY'].rsplit(':', 1)
# We default to ":0", Xming for instance doesn't set $DISPLAY
local_addr, local_display = os.environ.get(
'DISPLAY', ':0').rsplit(':', 1)
local_display = int(local_display.split('.', 1)[0])
if ('XAUTHORITY' in os.environ and
Path(os.environ['XAUTHORITY']).is_file()):
Expand Down

0 comments on commit b187603

Please sign in to comment.