Ubuntu – How to automatically set the status to Busy when Empathy starts

empathy

So I can make Empathy log me in on boot, but how do I make my initial status Busy?

Best Answer

  • After some searching, I found an app that communicates with Empathy via dbus. I pulled some code from that and created a script that will set your status.


    Setting it up is pretty easy:

    Download the script here (github page).

    It requires some python libraries that are in the repos (and might be installed by default):

    sudo apt-get install python-dbus python-notify
    

    Then to set it to start on login, run Startup Applications, click Add, and fill in the fields like this:

    • Name: Custom -- Start Empathy Busy
    • Command: /usr/bin/python /path/to/empathy_set_status.py dnd
    • Comment: Start empathy and set status to busy (do no disturb).

    The command field includes what status to set. If you don't want busy (dnd), then you can use one of these values: available, dnd, away, xa, hidden, offline.

    Now when you log in, the script it should run empathy, wait a bit, and then set your status. You should see a notification when it tries to set your status.

    I don't check that the status is set correctly, so I just have a wait time to hope that empathy will be ready to let us change the status. Adjust your time if it's not working. Increase the value of EMPATHY_STARTUP_SECONDS until it works when you login. If you need to enter a password to unlock your keychain for your IM login, the delay will have to be long enough for Empathy to start up, for you to enter your password, and for Empathy to log into your accounts.

  • Related Question