Normalise display name when creating DBus name

This commit is contained in:
Stephen Boddy 2017-02-13 14:20:10 +01:00
parent 7c73aaa080
commit 1c0f934529
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ BUS_BASE = 'net.tenshu.Terminator2'
BUS_PATH = '/net/tenshu/Terminator2'
try:
# Try and include the X11 display name in the dbus bus name
DISPLAY = hex(hash(Gdk.get_display())).replace('-', '_')
DISPLAY = hex(hash(Gdk.get_display().partition('.')[0]))
BUS_NAME = '%s%s' % (BUS_BASE, DISPLAY)
except:
BUS_NAME = BUS_BASE