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

Display Managers don't start and logout issues. #318

Closed
sylkat opened this issue Dec 28, 2020 · 5 comments
Closed

Display Managers don't start and logout issues. #318

sylkat opened this issue Dec 28, 2020 · 5 comments
Milestone

Comments

@sylkat
Copy link

sylkat commented Dec 28, 2020

Hi,
First of all, congrats for the great app i believe is so useful for some scenarios.

The display managers don't start if the opensnitch daemon is up, which is happening at least on my Debian system.
I've tried different dm as sddm, ligthdm, all of them refused to start.

To reproduce this bug i just had to install the last release package of debian:

opensnitch_1.3.0-1_amd64.deb

And enabling it with:
systemctl enable opensnitch

The system will hang without showing the display manager.

Once fixed that, i have some other issues with the display managers logout.

I see that starting the opensnitch service after the Display Service i can bypass this issue and start these Desktop Managers:

  • Kde plasma
  • Xfce
  • Cinammon

These are the ones that i have and all are working well until the logout happens.

In any of those environments the coming back to the Display Manager either ligthdm or sddm will give us a hang login screen again due to the impossibility to kill the ui process:

/usr/bin/python3 /usr/bin/opensnitch-ui

I saw a process trying to kill the ui, not sure if is due to the window manager logout or the ui code try to catch the signal or the daemon, i didn't see the code deeply and i prefer to ask before going to it, was something like:

pkill -15 PID;opensnitch-ui

Looks like a window manager way to kill their own started apps, but not sure at all due to the last 'opensnitch-ui' command after the ";"

All of them kde plasma, xfce4 and cinammon didn't leave the session cleanly due to this process still there, very strange, but this happens to me.

So kill the process will let the Display Manager go the login screen again.

Sddm has not a feature to launch scripts as root when the login session starts or logout, but ligthdm does and is easy to add some fixing for this bug in my environment...but could be nice to see whats going and why the daemon interferes with them.

So creating a start script of session, starting the service will fix the log in issue after a logout.

And creating a second script when the logout session, stopping the service and killing the ui will fix the return back to the Display Manager login screen.

All this worked for xfce4 and cinammon, Plasma refuse to log in after one logout, with daemon started or not, it keeps that environment not accessible until a restart of the box, ive tried to:

  • -Delete all the cache refered to plasma, kwin, kde.
  • -Delete all the config of plasma, kwin, kde.
  • -Kill all the process that were hang up related to plasma, kde, kwin.

Even doing all of that, was for me impossible to start again a Plasma session once i did a logout from it, only a reboot made me log in again to plasma.

@gustavo-iniguez-goya
Copy link
Collaborator

hey @sylkat

The display managers don't start if the opensnitch daemon is up, which is happening at least on my Debian system.

I haven't ran into this problem (yet).

The system will hang without showing the display manager.

Can you reproduce this problem again and post the output of journalctl -ar --since=today? .
Also set the log level to DEBUG (preferences -> nodes -> defult log level), and post the log /var/log/opensnitchd.log

I guess that the daemon DefaultAction is allow in /etc/opensnitchd/default-action.json.

In any of those environments the coming back to the Display Manager either ligthdm or sddm will give us a hang login screen again due to the impossibility to kill the ui process:

I'm aware of this problem on KDE, but in my case it only prevents to reboot the system the first time you click on logout/shutdown/reboot. If I click again then it exits as expected.

@gustavo-iniguez-goya
Copy link
Collaborator

related: gustavo-iniguez-goya#15 (comment)

@gustavo-iniguez-goya
Copy link
Collaborator

@sylkat can you modify /usr/lib/python3/dist-packages/dialogs/stats.py and let me know if this change solves the problem?

change e.ignore() (line 1167)
by e.accept()

that solves the problem in my case.

gustavo-iniguez-goya added a commit that referenced this issue Dec 30, 2020
On KDE and GNOME Shell we were preventing logging out from the
session.

Related: #318
@gustavo-iniguez-goya
Copy link
Collaborator

gustavo-iniguez-goya commented Dec 30, 2020

@sylkat , I think the above change fixes the problem logging out. Regarding the problems when booting up the system, could you add this rule to /etc/opensnitchd/rules/ and see if it solves the problem?
000-allow-system-commands.txt

rename it to .json (github does not allow to upload .json files):
sudo mv 000-allow-system-commands.txt /etc/opensnitchd/rules/000-allow-system-commands.json

[edit]
or simpler, create a rule to allow everything to localhost -> "To this IP: 127.0.0.1"

gustavo-iniguez-goya added a commit to gustavo-iniguez-goya/opensnitch that referenced this issue Dec 31, 2020
On KDE and GNOME Shell we were preventing logging out from the
session.

Related: evilsocket#318
gustavo-iniguez-goya added a commit to gustavo-iniguez-goya/opensnitch that referenced this issue Jan 1, 2021
On KDE and GNOME Shell we were preventing logging out from the
session.

Related: evilsocket#318
@gustavo-iniguez-goya gustavo-iniguez-goya added this to the 1.3.5 milestone Jan 3, 2021
@gustavo-iniguez-goya
Copy link
Collaborator

I consider this issue fixed. If you test it and it still doesn't work reopen it please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants