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

No systray icon when running as root #408

Closed
Germar opened this issue Oct 11, 2015 · 6 comments
Closed

No systray icon when running as root #408

Germar opened this issue Oct 11, 2015 · 6 comments
Labels
Discussion decision or consensus needed

Comments

@Germar
Copy link
Member

Germar commented Oct 11, 2015

When run as root, it may not be possible to put the systray icon on the desktops of any user that is logged in, but what about sending a notification?

The objective is to let the user know that a shutdown/reboot would interrupt the backup. (backintime -b is run by anacron)


Imported from Launchpad using lp2gh.

@dinoboy197
Copy link
Member

When run as root, it may not be possible to put the systray icon on the desktops of any user that is logged in

BIT, in root mode, begins executing as root, and completes the backup process as root, then exits.

I am not a *nix socket expert, especially when it comes to multiple processes that execute as different users (even with a parent / child process relationship), but I wonder if it would be technically possible (ignoring for the moment any code restructuring required) to, when in root mode:

BIT begins executing as the user who scheduled the backup (not root), but then starts a child process as root which runs the actual snapshot logic and is able to communicate with the parent, which can manage the systray icon.

@Germar
Copy link
Member Author

Germar commented Feb 11, 2016

I'd rather do it the other way around:

Start BIT as root (from crontab) and fork a systray-process with os.seteuid() to change process owner. The user who created the profile (could be read from PKEXEC_UID or SUDO_USER environ) should be that new process owner. The user would also need read access to /root/.local/share/backintime/

I didn't try yet if this would work. Incorrect environ could still make troubles...

@Germar Germar added Wishlist and removed New labels Feb 11, 2016
@Germar Germar changed the title when run as root: send notifications to all users No systray icon when running as root Feb 11, 2016
@Wabuo
Copy link

Wabuo commented Feb 27, 2016

I get an systray icon while the aktualy backup is running but not while the GUI is open.

Im running Archlinux with:

  • GNOME Shell 3.18.3
  • backintime-qt4
  • starting BIT with pkexec

@Germar
Copy link
Member Author

Germar commented Feb 28, 2016

The systray icon should only show up while creating a new snapshot (no matter if GUI is open). If you just open the GUI it is supposed to not show up.

@emtiu
Copy link
Member

emtiu commented Sep 9, 2022

With backintime 1.2.1 on Kubuntu 22.04, this works for me: A backintime icon appears in the systray when a snapshot is being taken, both:

  1. from root's crontab, or
  2. from the backintime-as-root GUI.

I'll try and test this on some other system, but this Issue cal probably be closed.

@emtiu emtiu added Discussion decision or consensus needed Feedback needs user response, may be closed after timeout without a response and removed wishlist labels Sep 9, 2022
@emtiu
Copy link
Member

emtiu commented Oct 21, 2022

Other systray problems exist (see #1306), but I'm closing this 10-year-old report that can no longer be reproduced.

@emtiu emtiu closed this as completed Oct 21, 2022
@buhtz buhtz removed the Feedback needs user response, may be closed after timeout without a response label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion decision or consensus needed
Projects
None yet
Development

No branches or pull requests

5 participants