0

I am trying to launch gufw from an icon on my desktop. Now gufw requires sudo to run. I found an application that did the same thing but for nautilus (http://lifehacker.com/5596006/create-an-application-shortcut-to-open-nautilus-as-root-in-ubuntu and came up with this:

   [Desktop Entry]
   Name=Firewall (Root)
   Comment=Set I/0 rules
   Exec=gksudo gufw
   Icon=file-manager
   Terminal=false
   Type=Application
   Categories=Application;System;

The result is showing in Application-System but nothing happens when I click the icon. If I right-click the select open, then the root login screen appear and all runs smothly.

There is a pair of '()' in the name. Could that be the problem?

  • Have you installed gksu? you can call that instead of gksudo. It generally works much better. – Andrew Stewart Jan 14 '15 at 20:03
  • Changed gksudo for gksu, removed the '()'. No difference – frepie Jan 14 '15 at 20:48
  • I don't know what it could be, then. I'll poke around and do some research. – Andrew Stewart Jan 14 '15 at 20:54
3

Which Ubuntu version do you use? At least on 14.04 gufw already comes with a desktop file, /usr/share/applications/gufw.desktop. These are its contents:

[Desktop Entry]
Version=1.0
Name=Firewall Configuration
Comment=An easy way to configure your firewall
Categories=GNOME;GTK;Settings;Security;X-GNOME-Settings-Panel;X-GNOME-SystemSettings;    X-Unity-Settings-Panel;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
Exec=gufw
Icon=gufw
Terminal=false
Type=Application
X-GNOME-Settings-Panel=gufw
X-Unity-Settings-Panel=gufw
X-Ubuntu-Gettext-Domain=gufw

gufw doesn't need gksudo, it asks for your password on its own. You can also start it from a terminal window and it will ask for the password.

  • I too have 14.04 LTS. I went to /usr/share/applications/ and found Firewall Configuration which did the trick. Thanks – frepie Jan 15 '15 at 21:22

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.