Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I know, that it's possible, to re-arrange the ordering of the appindicators in the tray (this question has been asked a few times)


and I know that it's possible to get the name of the different appindicators via this qdbus command:

qdbus --literal   com.canonical.AppMenu.Registrar /com/canonical/Unity/Panel/Service                                  com.canonical.Unity.Panel.Service.Sync | sed -e 's/[^{]*{\(.*\)}\]/\1/' | sed -e 's/\[[^"]*/[/g' | sed -e 's/\[\(\(\("[^"]*"\|[^,"]*\), \)\{4\}\)[^]]*,\([^,]*\)\]/[\4, \1]/g' | sed -e 's/\[\([^,]*\, \)\("[^"]*",\)/[    \1\2 /g'  | sed -e 's/\[ *\(....,.\{24\}\) */[\1/g'  | sed -e 's/\], \[/]\n[/g'  | sort -n -k2

my problem is: the dropbox-client changes it's name of the appindicator (always "dropbox-client-" and a random(?) number).

Is it nevertheless possible to move the dropbox-appindicator (something like getting the number beforehand, and changing the file with a bash script?)


share|improve this question
I'm not sure, but you could try the wild card * instead of the number. I'm not saying this is the answer, but worth a try :) –  SimplySimon Jun 18 '13 at 14:22
nope, unfortunately not :( was thinking about this as well, but doesn't work –  wa4557 Jun 18 '13 at 14:33
one thing I was able to find out, is that the random number is not random, but the process id, maybe that helps –  wa4557 Jun 18 '13 at 17:08

1 Answer 1

up vote 2 down vote accepted

I figured it out by myself, hope I can help anyone with the same problem (maybe a little bit "dirty", but it works!)

I created a bash file #!/bin/bash

dropbox start -i
sleep 1
b=`pidof dropbox`

c=`echo $b | cut -d' ' -f1`
c1=`echo $b | cut -d' ' -f2`


while read LINE 
let count++
if [[ $LINE == *dropbox* ]];then
    e1=$(($e + 1))
done < $filename
sed -i "$e s/.*/$d/" $filename
sed -i "$e1 s/.*/$d1/" $filename

and replaced the startup command for dropbox with this bash-script, voilá!

edit: obviously you need two dropbox line in your ordering-override.keyfile since there are two possible pid's for dropbox after startup

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.