Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[notice] dbus does not allow qomui.service by default on openSUSE Leap 15.0 #52

Closed
ChaosNicro opened this issue Dec 27, 2018 · 6 comments
Labels
bug Something isn't working

Comments

@ChaosNicro
Copy link

Using the packaged Version of 0.8.0 the GUI failed to start the service.
Running sudo qomui-service manually, I got:

Traceback (most recent call last): File "/usr/bin/qomui-service", line 11, in <module> load_entry_point('qomui==0.8.0', 'console_scripts', 'qomui-service')() File "/usr/lib/python3.6/site-packages/qomui/qomui_service.py", line 645, in main service = QomuiDbus() File "/usr/lib/python3.6/site-packages/qomui/qomui_service.py", line 58, in __init__ self.bus_name = dbus.service.BusName(BUS_NAME, bus=self.sys_bus) File "/usr/lib/python3.6/site-packages/dbus/service.py", line 131, in __new__ retval = bus.request_name(name, name_flags) File "/usr/lib/python3.6/site-packages/dbus/bus.py", line 303, in request_name 'su', (name, flags)) File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.143" is not allowed to own the service "org.qomui.service" due to security policies in the configuration file

I don't know much about the system-dbus but the policy seems to block "unregistered" services by default.
My solution was to create a minimal policy for the service:
/etc/dbus-1/system.d/org.qomui.conf

<policy>
    <allow own="org.qomui.service"/>
</policy>

I'm not actually certain that it is the default setting but I did not change any settings in the dbus-service. Should this be a problem for other users, you may want to place a similar configuration and reload the dbus-service during installation. If this is actually just me, please feel free to close this.
After this change, everything started fine and is working as expected.

Setup used:
Opensuse Leap 15.0
qomui 0.8.0 from corrad1nho's Opensuse repository

@corrad1nho
Copy link
Owner

I had this issue in the past; sometimes a restart of dbus (or a system reboot) was necessary in order for the policy file to be recognized properly on some distributions. A custom policy file shouldn't be needed as I already included one.

@corrad1nho corrad1nho added the bug Something isn't working label Dec 30, 2018
@corrad1nho
Copy link
Owner

I did a fresh install of OpenSuse Leap 15 and couldn't reproduce this issue. But I just realized that you are starting qomui-service manually. What happens if you use systemd?
systemctl start qomui

@poisonowl
Copy link

For version: qomui-0.8.1

No issues with versions -0.7.4 -0.7.3 (works great- it’s a wonderful app- thank you for creating it)

I initially started with 0.7.4 (currently using 0.7.3 since I can’t find .deb installer for 0.7.4)

System info: Linux Mint 18.3 (Ubuntu 16.04)

I am a relative novice with Linux, so the info I am including may either be too much or too little- but I hope it will help.

I have attempted to upgrade to version 0.8.1 multiple times on two different Linux computers (one a laptop, the other a desktop). Same issues for both. Each time, I also ensured that the listed dependencies/ required packages were also installed.

Methods tried:

  1. adding the repository and upgrading through the update manager

  2. through terminal (using commands you have listed)

  3. downloading .deb package and using gdeb package installer

  4. (after adding the repository) with the button on the qomui gui (this did not work at all)

  5. reinstall via the synaptic package manager

Most recent attempt (so that I could share more detailed info with you):

X ~ $ sudo apt-get install qomui
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
qomui
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,029 kB of archives.
After this operation, 3,820 kB of additional disk space will be used.
Get:1 http://download.opensuse.org/repositories/home:/corrad1nho/xUbuntu_16.04 qomui 0.8.1 [3,029 kB]
Fetched 3,029 kB in 21s (142 kB/s)
(Reading database ... 236252 files and directories currently installed.)
Preparing to unpack .../archives/qomui_0.8.1_amd64.deb ...
Unpacking qomui (0.8.1) over (0.7.3) ...
dpkg: warning: unable to delete old directory '/usr/lib/python3/dist-packages/qomui/pycache': Directory not empty
dpkg: warning: unable to delete old directory '/usr/lib/python3/dist-packages/qomui': Directory not empty
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22+linuxmint1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for dbus (1.10.6-1ubuntu3.3) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Setting up qomui (0.8.1) ...
X ~ $ sudo qomui-service
Traceback (most recent call last):
File "/usr/bin/qomui-service", line 9, in
load_entry_point('qomui==0.8.1', 'console_scripts', 'qomui-service')()
File "/usr/lib/python3.5/dist-packages/qomui/qomui_service.py", line 653, in main
service = QomuiDbus()
File "/usr/lib/python3.5/dist-packages/qomui/qomui_service.py", line 65, in init
maxBytes=210241024, backupCount=1)
File "/usr/lib/python3.5/logging/handlers.py", line 150, in init
BaseRotatingHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.5/logging/handlers.py", line 57, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.5/logging/init.py", line 1008, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.5/logging/init.py", line 1037, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/qomui/qomui.log'

Upon update install, this folder/ file was deleted and not reinstalled:

/etc/dbus-1/system.d/org.qomui.conf

System Log:

2019-01-14 13:01:48 startup archives unpack
2019-01-14 13:04:44 upgrade qomui:amd64 0.7.3 0.8.1
2019-01-14 13:04:44 status half-configured qomui:amd64 0.7.3
2019-01-14 13:04:45 status unpacked qomui:amd64 0.7.3
2019-01-14 13:04:45 status half-installed qomui:amd64 0.7.3
2019-01-14 13:04:53 status triggers-pending gnome-menus:amd64 3.13.3-6ubuntu3.1
2019-01-14 13:04:53 status triggers-pending desktop-file-utils:amd64 0.22+linuxmint1
2019-01-14 13:04:53 status half-installed qomui:amd64 0.7.3
2019-01-14 13:04:54 status triggers-pending mime-support:all 3.59ubuntu1
2019-01-14 13:04:55 status triggers-pending dbus:amd64 1.10.6-1ubuntu3.3
2019-01-14 13:04:55 status triggers-pending hicolor-icon-theme:all 0.15-0ubuntu1.1
2019-01-14 13:05:00 status half-installed qomui:amd64 0.7.3
2019-01-14 13:05:02 status triggers-pending dbus:amd64 1.10.6-1ubuntu3.3
2019-01-14 13:05:03 status unpacked qomui:amd64 0.8.1
2019-01-14 13:05:04 status unpacked qomui:amd64 0.8.1
2019-01-14 13:05:05 trigproc gnome-menus:amd64 3.13.3-6ubuntu3.1
2019-01-14 13:05:05 status half-configured gnome-menus:amd64 3.13.3-6ubuntu3.1
2019-01-14 13:05:06 status installed gnome-menus:amd64 3.13.3-6ubuntu3.1
2019-01-14 13:05:07 trigproc desktop-file-utils:amd64 0.22+linuxmint1
2019-01-14 13:05:07 status half-configured desktop-file-utils:amd64 0.22+linuxmint1
2019-01-14 13:05:21 status installed desktop-file-utils:amd64 0.22+linuxmint1
2019-01-14 13:05:21 trigproc mime-support:all 3.59ubuntu1
2019-01-14 13:05:21 status half-configured mime-support:all 3.59ubuntu1
2019-01-14 13:05:27 status installed mime-support:all 3.59ubuntu1
2019-01-14 13:05:28 trigproc dbus:amd64 1.10.6-1ubuntu3.3
2019-01-14 13:05:28 status half-configured dbus:amd64 1.10.6-1ubuntu3.3
2019-01-14 13:05:29 status installed dbus:amd64 1.10.6-1ubuntu3.3
2019-01-14 13:05:29 trigproc hicolor-icon-theme:all 0.15-0ubuntu1.1
2019-01-14 13:05:29 status half-configured hicolor-icon-theme:all 0.15-0ubuntu1.1
2019-01-14 13:05:39 status installed hicolor-icon-theme:all 0.15-0ubuntu1.1
2019-01-14 13:05:40 startup packages configure
2019-01-14 13:05:40 configure qomui:amd64 0.8.1
2019-01-14 13:05:40 status unpacked qomui:amd64 0.8.1
2019-01-14 13:05:40 status half-configured qomui:amd64 0.8.1
2019-01-14 13:05:56 status installed qomui:amd64 0.8.1
2019-01-14 13:05:57 startup packages configure

2nd attempt in terminal:

X ~ $ sudo qomui-service
[sudo] password for X:
openvpn: no process found
Traceback (most recent call last):
File "/usr/lib/python3.5/dist-packages/qomui/qomui_service.py", line 154, in load_firewall
with open('{}/config.json'.format(ROOTDIR), 'r') as c:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/qomui/config.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/qomui-service", line 9, in
load_entry_point('qomui==0.8.1', 'console_scripts', 'qomui-service')()
File "/usr/lib/python3.5/dist-packages/qomui/qomui_service.py", line 653, in main
service = QomuiDbus()
File "/usr/lib/python3.5/dist-packages/qomui/qomui_service.py", line 80, in init
self.load_firewall(0)
File "/usr/lib/python3.5/dist-packages/qomui/qomui_service.py", line 159, in load_firewall
with open('{}/default_config.json'.format(ROOTDIR), 'r') as c:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/qomui/default_config.json'

Qomui Log:

2019-01-14 13:36:09,317 - INFO - Dbus-service successfully initialized
2019-01-14 13:36:09,424 - WARNING - /usr/share/qomui/VERSION does not exist
2019-01-14 13:36:09,472 - DEBUG - Failed to save current iptables rules
2019-01-14 13:36:09,474 - ERROR - [Errno 2] No such file or directory: '/usr/share/qomui/config.json': Could not open config.json - loading default configuration

When attempting to activate via desktop button: “Dbus error- no reply from qomui-service”

@corrad1nho
Copy link
Owner

@poisonowl: Please remove and then reinstall Qomui. For detail see #53.

@poisonowl
Copy link

Unfortunately, I have already tried uninstalling (and completely removing) and then reinstalling multiple times. It has been the same result each time (and has been a complete headache). So, I suppose I will stick with 0.7.3 until you release a newer version, and then give that one a shot.

Thank you for the link- somehow I had missed seeing that.

@corrad1nho
Copy link
Owner

Deb packages were broken. It's fixed in v0.8.2. A re-install is required, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants