Skip to content

Instantly share code, notes, and snippets.

@rhoconlinux
Last active March 7, 2016 17:15
Show Gist options
  • Select an option

  • Save rhoconlinux/c6f33a3bde551aa4bfa5 to your computer and use it in GitHub Desktop.

Select an option

Save rhoconlinux/c6f33a3bde551aa4bfa5 to your computer and use it in GitHub Desktop.
dropbox-fix-tray-elementary-freya.sh
#!/bin/bash
sleep 5 ;
# stop it if it's running
dropbox stop &>/dev/null
killall dropbox ;
rm /.config/autostart/dropbox.desktop ;
# start it properly
DROPBOX_USE_LIBAPPINDICATOR=1 XDG_CURRENT_DESKTOP=Unity \
#dropbox start -i
#hack para orden de indicadores:
dropbox start -i
sleep 1
b=`pidof dropbox`
c=`echo $b | cut -d' ' -f1`
c1=`echo $b | cut -d' ' -f2`
d="dropbox-client-$c=4"
d1="dropbox-client-$c1=4"
filename=/usr/share/indicator-application/ordering-override.keyfile
count=0
while read LINE
do
let count++
if [[ $LINE == *dropbox* ]];then
c=$LINE
e=$count
e1=$(($e + 1))
break
fi
done < $filename
sed -i "$e s/.*/$d/" $filename
sed -i "$e1 s/.*/$d1/" $filename
#source: http://unix.stackexchange.com/questions/198977/dropbox-tray-icon-doesnt-show-up-in-elementary-os-luna-freya
#save as /usr/bin/start-dropbox-withtray.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment