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 Answers 3

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.

2
  • 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. Jan 10, 2014 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, 2014 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.

1
  • 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, 2014 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)

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .