ipc.py generated negativ hashes when DISPLAY is four or more digits
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Terminator |
New
|
Undecided
|
Unassigned |
Bug Description
Hi *,
I notice that sometimes I am not able to start terminator. I receive an error like this:
$ terminator
Traceback (most recent call last):
File "/usr/bin/
from terminatorlib import ipc
File "/usr/share/
class DBusService(Borg, dbus.service.
File "/usr/share/
@dbus.
File "/usr/lib/
validate_
ValueError: Invalid interface or error name 'net.tenshu.
The variable BUS_NAME comes from ipc.py line 26 and 27:
DISPLAY = hex(hash(
BUS_NAME = '%s%s' % (BUS_BASE, DISPLAY)
The problems occurs when the DISPAY is higher that 999.
$ python2
Python 2.7.15+ (default, Oct 7 2019, 17:39:04)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gdk
>>> Gdk.get_display()
':8096.0'
>>> hex(hash(
'-0x7d8b25b9890
>>> hex(hash(':999'))
'0x100e92d8193b
>>> hex(hash(':1000'))
'-0xa48cd7ee825470'
This happend sometimes when connection via NX or Citrix to an Ubuntu system. Than I am getting a DISPLAY number 1000+.
System information
----------------
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
$ uname -r
4.15.0-66-generic
$ terminator -v
terminator 1.91
Using XFCE desktop flavour
Not using any config file for Terminator
Also tried to download an run terminator from lp:terminator, got the same result.
Could you please test hellodeargrandma's python3 branch from bug #1662544? That one uses a different hashing method.