1

I just installed tor, privoxy and proxychains on Ubuntu 13.10, but they are not experiencing any problems. My problem is based on a .desktop file I created as I think it actually doesn't work properly. The content of that file is:

[Desktop Entry]
Type=Application
Terminal=false
Name=Switch IP address
Icon=/usr/desktop/icons/switchip.png
Exec=service tor restart

As command service tor restart is used to obtain new fake IP address, but when I run it from a terminal, it works. When I click on icon on launcher (which is .desktop file above) it does not take any effect. What I missed or did wrong?

3

Try this:

[Desktop Entry]
Type=Application
Terminal=false
Name=Switch IP address
Icon=/usr/desktop/icons/switchip.png
Exec=pkexec service tor restart

service needs to run as root, using pkexec.

  • 1
    yes, i forgot i must run it as admin... i recently came from kali where you login as root, and forget about sudo command... also, i think this is best way is, as with sudo i must keep terminal=true, and gksudo requires installation. thanks. – black_hat_cat Jan 10 '14 at 21:47
  • @black_hat_cat, would you accept this answer as it did solve the problem. See What should I do when someone answers my question? – user.dz Jul 19 '14 at 9:17
1

Services need root privileges to run. Try to change:

Exec=service tor restart

To:

Exec=gksu service tor restart

Or:

Exec=sudo service tor restart

Also, this will restart the service. Some services refuse to restart if they're not already running, try to use start instead of restart.

  • 2
    This will require Terminal=true, otherwise sudo will be unable to get the password input. gksu needs to be installed first (sudo apt-get install gksu). – kiri Jan 10 '14 at 21:30
0

Try changing

Terminal=false

to

Terminal=true

and see if it does execute properly. (remember to mark your .desktop file as executable)

  • no it does not. – black_hat_cat Jan 10 '14 at 21:28
  • another thing... does this command work when u use it manually in terminal? – Frost Jan 10 '14 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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