gn2 wrote:One potential solution, right click on a panel, select Add to Panel, then highlight Custom Application Launcher and click Add.
Now a box opens, Application is listed at the top, you can give it a name, next enter the command you want to run (including the sudo bit) next click on the icon, choose one that suits, click OK and you're done.
Now all you have to do to run the command is click on the button in the panel and enter your password.
This gives you the option of whether to run it or not.
Or to add it as a start-up item, in Mint Menu, Preferences > Startup Applications > Add and enter the command you want to run.
Bit Mad wrote:http://snippets.dzone.com/posts/show/6200
cybergateway ~ # crontab -l
# m h dom mon dow command
@reboot iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE || echo 1 > /proc/sys/net/ipv4/ip_forward
cybergateway ~ #
Alternatively you could add the iptables-restore and iptables-save to the if-pre-up.d and if-post-down.d directories in the /etc/network directory instead of modifying /etc/network/interface directly.
The script /etc/network/if-pre-up.d/iptaload will contain:
iptables-restore < /etc/iptables.rules
and/etc/network/if-post-down.d/iptasave will contain:
if [ -f /etc/iptables.downrules ]; then
iptables-restore < /etc/iptables.downrules
iptables-save -c > /etc/iptables.save
Then be sure to give both scripts execute permissions:
# chmod +x /etc/network/if-post-down.d/iptasave
# chmod +x /etc/network/if-pre-up.d/iptaload
Users browsing this forum: janos and 32 guests