Empathy – How to Automatically Set Status to Available on Login in Ubuntu 11.04
11.04autostartempathyinstant-messagingmemenu
This is the first thing I do after logging in:
How can I make it happen automatically?
Best Answer
To make the default Ubuntu IM application Empathy start automatically when you log in, the following instructions are from OMG Ubuntu:
Empathy requires a little bit of a
kick to get going on login.
You would be forgiven for thinking
that checking the ‘Automatically
connect on start-up’ box in Empathy’s
preferences pertained to starting on
system login. It doesn’t, the start-up
in this case refers to Empathy’s start
up – not your computer’s.
We can make it start on login by going
to System > preferences > startup
applications > new item and entering
the following information in the
relevant fields:
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.
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.
If not yet done by default install gnome-startup-applications
Search and open "Startup Applications"
click add to enter the command including options of your application as you would run it from terminal (you may have to give in the full path if it runs from a non-standard location)
This will add a .desktop file in your ~/.config/autostart
14.04 and later
Open the Dash and search for "Startup Applications"
Now click on Add and give in the command to run the application. This can be found in Main Menu if installed (see below)
Using Main Menu (alacarte) to find the terminal command to run a given program:
Firstly open the program 'Main Menu' (type Menu in the Dash)
Now select the program which you want to add to startup and click on properties .
Now note the command for that program .
Non GUI approach
Advanced users may want to manually put a .desktop file in ~/.config/autostart to run applications after a user login. This may have following content:
[Desktop Entry]
Type=Application
Name=<Name of application as displayed>
Exec=<command to execute>
Icon=<full path to icon>
Comment=<optinal comments>
X-GNOME-Autostart-enabled=true
You may have to give this file execute permission.
Best Answer
To make the default Ubuntu IM application Empathy start automatically when you log in, the following instructions are from OMG Ubuntu: