on Ubuntu 14.04 the first Unity Dash search is much slower than the following searches.
With xdotool I'm trying to open and then close the Unity Dash user interface on Ubuntu start-up.
~/.config/autostart/unity_dash_update.desktop
[Desktop Entry]
Type=Application
Exec=~/.config/autostart/unity_dash_update.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[it]=Unity Dash Update
Name=Unity Dash Update
Comment[it]=
Comment=
~/.config/autostart/unity_dash_update.sh
#!/bin/bash
sleep 1
xdotool key Alt+F2
sleep 3
window="$(xdotool getactivewindow)"
xdotool key --window $window "Escape"
exit 0
If I manually run the bash script, the thing works, but during the system startup the Dash appears and doesn't disappear.
I've tried with or without sleeping time between xdotool execution, with no success.
What I am doing wrong?
update
As Jacob Vlijm suggests, the Exec
parameter was wrong, 'cause it must be an absolute path.
This was my fault cause I tried a quick (too quick) way to remove my name from the code I was posting.
I'm sorry.
So a corrected .desktop file would be
[Desktop Entry]
Type=Application
Exec=/home/myname/.config/autostart/unity_dash_update.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[it]=Unity Dash Update
Name=Unity Dash Update
Comment[it]=
Comment=
Thanks Jacob for your help.
DISPLAY=:0
to the top of the script. That's:
and zero