Difference between revisions of "Talk:Dropbox"

From ArchWiki
Jump to: navigation, search
(Explaining how to start dropbox for all users in systemd: re, closing)
m (Dropbox in systemd --user: closing)
Line 10: Line 10:
 
:Closing old discussion: now that {{AUR|dropbox}} ships with {{ic|dropbox@.service}}, the solution is trivial: {{ic|systemctl enable dropbox@''first_user''}}, {{ic|systemctl enable dropbox@''second_user''}}, ... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:47, 20 August 2013 (UTC)
 
:Closing old discussion: now that {{AUR|dropbox}} ships with {{ic|dropbox@.service}}, the solution is trivial: {{ic|systemctl enable dropbox@''first_user''}}, {{ic|systemctl enable dropbox@''second_user''}}, ... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:47, 20 August 2013 (UTC)
  
== Dropbox in systemd --user ==
+
== <s>Dropbox in systemd --user</s> ==
  
 
I had trouble with dropbox not starting correctly in systemd --user. There were 2 problems:
 
I had trouble with dropbox not starting correctly in systemd --user. There were 2 problems:
Line 41: Line 41:
 
: btw. this [https://github.com/lahwaacz/archlinux-dotfiles/blob/master/home/.config/systemd/user/dropbox.service] works for me...
 
: btw. this [https://github.com/lahwaacz/archlinux-dotfiles/blob/master/home/.config/systemd/user/dropbox.service] works for me...
 
: -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:46, 7 June 2013 (UTC)
 
: -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:46, 7 June 2013 (UTC)
 +
 +
:: Probably solved, closing. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:49, 20 August 2013 (UTC)

Revision as of 17:49, 20 August 2013

Explaining how to start dropbox for all users in systemd

I do not know how to do this, but I think it has to do with the User info. Could this be explained propperly? Simply removing the User= statements has some strange behaviour (as I have tried this and it makes dropbox startup together with gdm).

Can we add multiple usernames? Or disable it for root only? What would be the best way forward?

-- Hanckmann (talk) 18:18, 22 October 2012‎ (UTC)

Closing old discussion: now that dropboxAUR ships with dropbox@.service, the solution is trivial: systemctl enable dropbox@first_user, systemctl enable dropbox@second_user, ... -- Lahwaacz (talk) 17:47, 20 August 2013 (UTC)

Dropbox in systemd --user

I had trouble with dropbox not starting correctly in systemd --user. There were 2 problems:

  • /usr/bin/dropboxd apparently forks off a child daemon. I couldn't find how to start the daemon without forking.
  • /usr/bin/dropboxd exits with status code 9/KILL. This makes systemd kill its control-group and thereby its child (the daemon) too.

The original dropbox@.service did not work for me because of these two issues. Stopping dropboxd with systemd also did not work before.

To fix this I have the following in $HOME/.config/systemd/user/dropbox.service:

$HOME/.config/systemd/user/dropbox.service
[Unit]
Description=Dropbox
After=xorg.target

[Service]
Type=forking                                   # dropboxd forks off to a daemon and isn't itself long-running
ExecStart=/bin/sh -c '/usr/bin/dropboxd; true' # dropboxd always exists with 9, so just ignore the exit code
KillMode=process                               # Upon exiting, kill the process, not the control-group

[Install]
WantedBy=session.target

The DISPLAY environment is already in the environment, so Environment=DISPLAY=:0 is not needed. Also, this service does not detect when dropbox exited; I'm not sure how to fix this at the moment. Input on this is appreciated.

please sign your post with ~~~~ next time
read manpage systemd.service(5), especially SuccessExitStatus and KillSignal might be useful
btw. this [1] works for me...
-- Lahwaacz (talk) 13:46, 7 June 2013 (UTC)
Probably solved, closing. -- Lahwaacz (talk) 17:49, 20 August 2013 (UTC)