empathy – How to Start Empathy Hidden

14.0414.1015.04empathy

How to start Empathy in hidden mode in Ubuntu? If you auto-start Empathy in hidden mode, you can not open the Contacts window, even though Empathy is running in the background.

Note, this was possible in previous versions of Ubuntu using empathy -h or empathy --start-hidden. (See Bug 1179180).

Best Answer

Here is a workaround for this problem...

Step 1

Install xdotool...

$ sudo apt-get install xdotool

Step 2

To start empathy in hidden mode just for yourself...

$ mkdir -p ~/.config/autostart
$ cp /usr/share/applications/empathy.desktop ~/.config/autostart
$ gedit ~/.config/autostart/empathy.desktop

...OR....

To start empathy in hidden mode for all users...

$ cp /usr/share/applications/empathy.desktop /etc/xdg/autostart
$ sudo gedit /etc/xdg/autostart/empathy.desktop

Step 3

In section [Desktop Entry]

Replace...

Exec=empathy

With...

Exec=sh -c 'empathy & xdotool search --sync --onlyvisible --class "empathy" windowmove 25 25 windowunmap'

Finally, save your changes; log out and log back in. You will see the Empathy window "flash" for split-second and then it will disappear. Empathy will continue to run in the background, and you will be able to open the Empathy contacts window (from the unity indicator) whenever you want.

Note: If you don't like the command line, install xdotool using the Software Center. Then use the Startup Applications GUI from the Dash to to create a new launcher called "Empathy," and enter the following as the command: sh -c 'empathy & xdotool search --sync --onlyvisible --class "empathy" windowmove 25 25 windowunmap'.

Related Question