Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

3 Answers 3

up vote 0 down vote accepted

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

Something like this:

#!/bin/bash
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/.

See: http://superuser.com/questions/155476/how-do-i-make-a-script-run-upon-startup-of-the-ubuntu-machine

Also here is a short tutorial on how to bash script: https://help.ubuntu.com/community/Beginners/BashScripting

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.. –  Lujaw Oct 1 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

 
discard

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.