4

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).

1

3 Answers 3

5

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'.

4
  • You can fix those code tags in your answer by putting an blank line before each one.
    – daboross
    Jun 15, 2013 at 1:11
  • Your workaround is FANTASTIC. I included the command in my custom startup script that also launches Skype and it works perfectly. :) Jul 11, 2013 at 13:25
  • Andrea, Skype has a "Start Skype minimized in the system tray" option that works fine in Ubuntu, in case you didn't already know.
    – Enterprise
    Aug 6, 2013 at 22:08
  • Yes, I didn't mean that I also use xdotool for Skype, just that I launch both of them at the same time. :P Sorry for not being clear. ;) Oct 20, 2013 at 18:15
1

If that workaround doesn't work try this in the Exec= line when you edit /etc/xdg/autostart/empathy.desktop (or /usr/share/applications/empathy.desktop):

sh -c 'empathy & sleep 5 && xdotool search --sync --onlyvisible --class "empathy" windowunmap'

This is similar but not the same:

  • It attempts to add a five-second pause between starting Empathy and sending simulated input to it with xdotool.
  • It also uses only the windowunmap action, rather than the preceding windowmove action which is less essential.
1
  • Good suggestion!
    – Enterprise
    May 3, 2015 at 15:09
0

As of June 2020, --start-hidden functionality is provided with the standard version of Empathy in the Ubuntu 20.04 standard package repos.

Empathy 3.12.14 usage :

$ empathy --help
Usage:
  empathy [OPTION…] - Empathy IM Client

Help Options:
  -?, --help                 Show help options
  --help-all                 Show all help options
  --help-gtk                 Show GTK+ Options

Application Options:
  -n, --no-connect           Don't connect on startup
  -h, --start-hidden         Don't display the contact list or any other dialogs on startup
  -p, --show-preferences     
  -v, --version              
  --display=DISPLAY          X display to use

There is a --start-hidden option which should provide the functionality you need.

Follow the standard way to add this to your start up programs for the window manager you are using. For xfce4:

$ xfce4-session-settings

Then add empathy -h to the list in the Application Autostart section.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .