You are not logged in.
Hey all,
Not sure if this is the right place for this. I am new to Arch but not to *nix. I am using XFCE for the first time. I am having an issue where dropbox is starting before networkmanager establishes a connection so I am trying to change the line in the ~/.config/autostart/dropbox.destop to read:
sh -c "nm-online -t 120 && /opt/dropbox/dropboxd"
however, whenever i change this and reboot or relog the line reverts back to "/opt/dropbox/dropboxd". I tried changing this in the XFCE session and startup gui but the same thing happens. Any idea how to get this setting to stick permanently?
Thanks in advanced! :-)
Offline
It can be difficult getting items to launch in a particular order using ~/.config/autostart, and even more difficult having them wait until network manager has brought the network up.
May I suggest trying network manager's dispatcher.d directory. Here scripts are executed in number/alpha order upon the netowrk coming up and in reverse numerical/alpha order prior to the network going down.
This way you can launch/mount/start and terminate/unmount/stop apps/filesystems/services based on the state of the network.
For example, I start/stop ntpd, netfs and mount/unmount my NAS as follows:
/etc/NetworkManager/dispatcher.d
10.ntp_daemon
15.netfs
20.mount_unmount_nasThe scripts must be executable and owned by root, and they are executed as root, so ensure you include the necessary code to launch apps as your user where required.
A sample script follows:
#! /bin/bash
INTERFACE=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface
case "$STATUS" in
'up') # $INTERFACE is up
# your code here
;;
'down') # $INTERFACE is down
# your code here
;;
esacCheers.
Offline