April 16th, 2009 by vwochnik in Scripts · 3 Comments
I developed a small program allowing you to administrate your UPnP router at work or at home. It can reconnect, print statistics, add a port mapping entry, remove one, print a list and clear the entire entry list.
The program depends on libnet-upnp-perl. So you first have to install it to use the script. The packet contains the Perl extension Net::UPnP which allows you to control UPnP devices in Perl.
sudo apt-get install libnet-upnp-perl -y
Now download the script and unpack it. Now you can open a terminal and navigate to the script’s directory. Make the script executable with this command:
chmod +x ./router.pl
You can use it. This one-liner reconnects your router’s internet connection.
./router.pl -r
If you have more then one UPnP device, the script will ask you for the right one. Instead of being asked every time executing the command, you can use the -d parameter followed by the device number.
./router.pl -r -d 0
You can add a port mapping entry with this:
./router.pl -a -e 1033 -I 192.168.0.5 -i 1033 -P TCP
This will add a port mapping entry mapping the external port 1033 to the IP address 192.168.0.5.
For further information, use the -h option.
Please write a comment after you executed this script. In this comment post your router’s model name, the command you executed and the program’s output so I can correct mistakes if there are any. Thanks.
April 6th, 2009 by vwochnik in Howtos · 1 Comment
The file /etc/crontab contains instructions which tell crond what command to execute at a given time. But this is only the half truth. Actually, each user can create his own crontab containing commands to execute. By default this feature is disabled, but you can enable it. [Read more →]
Tagged: Linux Ubuntu crontab crond
After searching on gnome-look.org for a GDM theme I like I decided to create my own one.
The theme is based on Blue_login.
As you can see the background is taken from Windows7. The icon near the text field is removed and the icons are smaller and the distance is changed so the text will not break.
You can download the theme here.
March 21st, 2009 by vwochnik in Tips · No Comments
Some installation routines often want you to confirm their actions with y. You have to press it again and again. Often you can force a program not to ask. The apt-get, for example, is more self-assured with the parameter -y.
sudo apt-get install w32codecs -y
But what about other programs? Maybe you want to use an installation script. If there are no parameters that force the program not to ask, you can use yes. yes writes ys to stdout. You can send them to a program or script via a pipe.
yes | sudo apt-get install w32codecs
This will work with the most programs and installation scripts.
But there is a disadvantage: You will not be able to enter strings and other input. There will be always entered y.
Some programs want the user enter YES instead of y. You can do this with the following change:
yes YES | program
You could also inject a program with n if you want to say no!
yes n | program
But that doesn’t make sense, no really!
Tagged: linux ubuntu force yes confirm
Since five years I’m a very satisfied firefox user. A very important aspect I care about is the security. The world’s most user-friendly and customizable browser gets you addicted with lots and lots of plug-ins and tweaks. Today I want to show you a few of them which allow you securing your web expierience. [Read more →]
Tagged: firefox security anonymous privacy customize