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

Tray doesn't work as a service #130

Open
coldfix opened this issue Jan 13, 2017 · 5 comments
Open

Tray doesn't work as a service #130

coldfix opened this issue Jan 13, 2017 · 5 comments

Comments

@coldfix
Copy link
Owner

coldfix commented Jan 13, 2017

From #129, @mindstormer12:

I'm finding that smart tray doesn't seem to work with the posted service file and the the corrected argument. On my config.yml, I also have tray: auto. No tray is displayed with my USB plugged in.

Tray only appears if I start another instance using udiskie --smart-tray on the terminal, after udiskie is already running via service.

@mindstormer12
Copy link

@coldfix Was this reproducible on your machine?

@coldfix
Copy link
Owner Author

coldfix commented Jan 17, 2017

I hope to have time to check this evening. I believe to have experienced similar issue in the past when starting via service files (irrespectively of the auto/smart flag). It could be related to X not being started up when udiskie is creating the Gtk.StatusIcon instance. In this case the most straight forward fix would be to start the icon with your window manager (.xinitrc or autostart applications). (You could start the icon without automounting --no-automount plus background daemon with no tray --no-tray via service file, if you need automounting without X login)

BTW: I do currently not recommend starting udiskie as service.

@rieje
Copy link

rieje commented Feb 14, 2017

I'm also having this problem--any updates?

And might as well ask questions: Is --eject option useful at all for hard disk drives or flash drives? Is unmount "safe" without also using --detach or is --detach recommended after an unmount in all cases?

@coldfix
Copy link
Owner Author

coldfix commented Feb 15, 2017

My recommendation for now is: do not use udiskie tray/notifications as a systemd service.

GUI service components should be started with the window manager, i.e. in .xinitrc or in your window manager's autostart feature.

If you sometimes log in without window manager but still want udiskie running, you can start an udiskie instance without notifications/tray via systemd. In this case you would start an additional udiskie instance with notifications/tray but without automount with the window manager as described above.

I'm pretty short on time right now, and this is not my top priority, since there is a workaround.

@coldfix
Copy link
Owner Author

coldfix commented Feb 15, 2017

About your other questions:

  • --eject should be useful only for CD drives, where it physically ejects the CD. It is sometimes also available for other media. In that case, it somehow disables them but does not power down. Not recommended.
  • If you wait for completion, unmount ensures that the disc will be synced and the drive is not left in an inconsistent state. I'm not an expert on hardware and cannot say about potential damage to the disc due to voltage peaks during removal without having powered down first or something, but I think, unmount should be safe without detach in most cases. If you want a more funded estimation, you should better ask someone else. If you get information on this, please notify me:)

Personally, I usually go for detach when I know I'm gonna remove the drive physically.

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

3 participants