Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added Deluge in Startup applications and sometimes after restart or shutdown, Deluge won't start. If I try to run it in terminal then I get the next error:

vas@LenovoZ580:~$ deluge
[ERROR   ] 11:18:36 ipcinterface:156 Deluge restart failed: Couldn't listen on any:/home/vas/.config/deluge/ipc/deluge-gtk: Cannot acquire lock.

If I delete /home/vas/.config/deluge/ipc/deluge-gtk and /home/vas/.config/deluge/ipc/deluge-gtk.lockthen Deluge starts normally.

How can I set that when I restart or shutdown the laptop, these 2 files to be deleted if they exist?

share|improve this question
up vote 7 down vote accepted

You could make a script that deletes the two files and set it to run at start-up.

Something like this:

rm /home/vas/.config/deluge/ipc/deluge-gtk
rm /home/vas/.config/deluge/ipc/deluge-gtk.lock

You'll need to place your scripts in /etc/init.d/.


Also here is a short tutorial on how to bash script:

share|improve this answer

This is a common error when Deluge don't exit cleanly. Some symbolic link gets broken and Deluge doesn't know what to do. But I do.

rm /home/vas/.config/deluge/ipc/deluge*

Then start Deluge.

share|improve this answer
thank you, it worked.. – Luja Shrestha Oct 1 '14 at 5:35

There is an open bug ticket #2234 that would resolve the stale file issue.

An alternative to putting Deluge in startup apps would be to run the daemon in the background using upstart script and then connect with thinclient.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.