Difference between revisions of "Talk:Dropbox"

From ArchWiki
Jump to: navigation, search
(use https for links to archlinux.org)
(Dropbox in systemd --user: new section)
Line 27: Line 27:
 
::I followed those instructions and they work like a charm.--[[User:MDuo13|MDuo13]] 06:29, 30 April 2010 (EDT)
 
::I followed those instructions and they work like a charm.--[[User:MDuo13|MDuo13]] 06:29, 30 April 2010 (EDT)
 
::: Info already added. Close. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:02, 25 February 2013 (UTC)
 
::: Info already added. Close. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:02, 25 February 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:
 +
 +
{{hc|$HOME/.config/systemd/user/dropbox.service|<nowiki>
 +
[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
 +
</nowiki>}}
 +
 +
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.

Revision as of 11:21, 7 June 2013

Daemon

I think that Dropbox#Daemon section can be removed from this page :D what do you think? --Umby213 (talk) 12:57, 26 January 2013 (UTC)

I agree. I just updated the section about using Dropbox as a daemon with Systemd, and moved it to the top of the sections about daemons. I did not remove the initscripts-based section; if a third person agrees that it should be removed I think (s)he can go ahead and do so. --AsmundEr (talk) 11:33, 20 February 2013 (UTC)

Initscript method removed. Close. -- Fengchao (talk) 11:58, 25 February 2013 (UTC)

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?


dropbox without nautilus

What do you think of adding the procedure explained here?

--> [1]

It describes a very simple way on how to use dropbox without nautilus, give me your feedback!

rent0n

If no-one else is going to comment, I'd suggest you add it in, clearly labelled as an alternative to the current method.
Jasonwryan 16:15, 19 December 2009 (EST)
I followed those instructions and they work like a charm.--MDuo13 06:29, 30 April 2010 (EDT)
Info already added. Close. -- Fengchao (talk) 12:02, 25 February 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.