diff -Nru kylin-display-switch-1.0.1/debian/changelog kylin-display-switch-1.0.1/debian/changelog --- kylin-display-switch-1.0.1/debian/changelog 2017-12-20 11:39:01.000000000 +0800 +++ kylin-display-switch-1.0.1/debian/changelog 2018-10-30 16:01:11.000000000 +0800 @@ -1,3 +1,10 @@ +kylin-display-switch (1.0.1-0ubuntu1.1) bionic-proposed; urgency=medium + + * Fix the wrong permission of file 'instance.lock'. (LP: #1766491) + * Fix the crash when press numlock. + + -- handsome_feng Tue, 30 Oct 2018 16:01:11 +0800 + kylin-display-switch (1.0.1-0ubuntu1) bionic; urgency=medium * Initial release (LP: #1738366) diff -Nru kylin-display-switch-1.0.1/debian/patches/fix_wrong_permission_file_and_add_missing_parentheses.diff kylin-display-switch-1.0.1/debian/patches/fix_wrong_permission_file_and_add_missing_parentheses.diff --- kylin-display-switch-1.0.1/debian/patches/fix_wrong_permission_file_and_add_missing_parentheses.diff 1970-01-01 08:00:00.000000000 +0800 +++ kylin-display-switch-1.0.1/debian/patches/fix_wrong_permission_file_and_add_missing_parentheses.diff 2018-10-30 16:00:53.000000000 +0800 @@ -0,0 +1,32 @@ +--- a/kylin_display_switch.py ++++ b/kylin_display_switch.py +@@ -1,7 +1,7 @@ + #!/usr/bin/python3 + # -*- coding: utf-8 -*- + +-import sys ++import os, sys, stat + from PyQt5.QtGui import * + from PyQt5.QtCore import * + from PyQt5.QtWidgets import * +@@ -41,6 +41,11 @@ + + # singleton + def check_singleton(self): ++ if(os.path.exists("/tmp/instance_kds.lock") == False): ++ new_instance_file = open("/tmp/instance_kds.lock", 'w') ++ new_instance_file.close() ++ os.chmod("/tmp/instance_kds.lock", stat.S_IRWXU|stat.S_IRWXG|stat.S_IRWXO) ++ + self.instance_file = open("/tmp/instance_kds.lock", 'w') + try: + fcntl.lockf(self.instance_file, fcntl.LOCK_EX | fcntl.LOCK_NB) +@@ -194,7 +199,7 @@ + self.ui.num_off_widget.show() + + desktop = QApplication.desktop() +- if (desktop.screenCount > 1): ++ if (desktop.screenCount() > 1): + desktop = desktop.screenGeometry(0) + self.move((desktop.width() - self.width()) / 2, (desktop.height() - self.height()) / 2) + self.ui.tipWidget.show() diff -Nru kylin-display-switch-1.0.1/debian/patches/series kylin-display-switch-1.0.1/debian/patches/series --- kylin-display-switch-1.0.1/debian/patches/series 1970-01-01 08:00:00.000000000 +0800 +++ kylin-display-switch-1.0.1/debian/patches/series 2018-10-30 15:58:55.000000000 +0800 @@ -0,0 +1 @@ +fix_wrong_permission_file_and_add_missing_parentheses.diff