Category: Linux/UNIX

  • VPN and Network Manager in Ubuntu

    Today i want to share my little knowledge about vpn connections using NetworkManager.

    Network Manager in case you dont already know is an amazing piece of software for your linux distro allowing easy hazzle free networking when switching to wireless network environments.
    An example would be the windows wireless list were its possible to see all the wireless networks found and click to access a specific one. Network Manager works much the same way.

    However one functionality that i know some people use, amongst others myself, is VPN connection. Its available for Network Manager through a plug in, and i can say it works great. Though there are a few quirks that i have discovered through my use of it, and it can also be a little hard to get a hold of 🙁 Why i dont know, so to help out i have provided a download link at the end of this article.

    First off to enable the use of the VPN plugin install VPNC from synaptic. You can also use the terminal and install using this command:

    sudo apt-get install vpnc

    If you for some reason forget to install this you will risk Network Manager simply crashing / disappearing on you when you try to connect to a VPN network. I had this bug recently and didn’t realize it until later when i installed vpnc and it worked. I haven’t investigated whether or not this is a known bug in Network Manager yet but in any case a valid point to know.

    So now we have installed the necessary applications for the vpn plugin to function correctly. Download the .deb file provided at the end of the article and simply double click to install it. After install you might need to reboot network manager to get your vpn plugin showing up. Either reboot the old fashioned way, restart gnome or open the terminal and do the following:

    sudo killall NetworkManager

    sudo NetworkManager

    Now when you left-click your network manager icon you should get a menu item called “VPN Connections” at the bottom. Now all thats left is simply to add your vpn network details and you are ready to connect.
    I have personally found this to work easily and well on my university network, but different vpn networks might not be that easy. But most of this should be pretty much straight forward.

    I hope this helped some people and especially the need to have “vpnc” installed before trying to establish a vpn connection could prove useful. So go forth and connect to vpn networks all over the world my penguins!
    Class dismissed!

    Download Network Manager VPN plugin: (.deb) (.rar)
    PS: The version of Network Manager im currently using with this plugin is 0.6.3, so other versions might experience trouble.

  • Power up the terminal with Aliases !

    A little quick trick on how to add some nifty aliases for your terminal. What is an alias exactly. Well it’s another name for a specific command. A common alias e.g. could be to be able to type ‘dir’ (windows/DOS style) to list the directory content instead of ‘ls’. Then you make an alias saying that the ‘dir’ command should be the same as typing the ‘ls’ command.

    Now Ubuntu Linux comes with some of the common aliases already in your .bashrc file, but pr. default they are commented out. We simply need to uncomment them and also add our own extra ones if we want.

    gedit .bashrc

    Towards the bottom of the tile you should see a line like this:

    # some more ls aliases

    Uncomment the section below this line, by removing the ‘#’ at the beginning of each line. You should now be able to use these aliases. If you wish to add extra aliases just follow the same syntax as the ones already there and you should be able to quickly add your own.

    Personally i like to add an alias for the ‘cd ..’ command which allows me to also use ‘cd..’ without the space between ‘cd’ and ‘..’. An alias like that would like like this:

    alias cd..=’cd ..’

    There you have it.. how to add your own aliases to the terminal. If you don’t want to close the terminal for them to take effect, simply use the following command from your home directory to reload the .bashrc file.

    source .bashrc

    Enjoy the wonderful world of aliases 😉

  • Use your own scripts in Ubuntu

    Sometimes tedious tasks can be simplified by writing a simple bash script to perform them. Now i will not go into details on how to write scripts in Bash, but instead show how you can easily make your scripts available from anywhere in your terminal.

    First off open up a terminal, and in your home directory create a directory named ‘scripts’. As you might have guessed all your scripts will be placed here. For each script file you place here do the following:

    chmod +x scriptname.sh

    This will ensure that your script is executable, so no more need to type ‘sh’ before running the script. So now you have a directory of executable script, but so far they can only be accessed from either the directory itself, or by typing the path to the script. So we edit our .bashrc file a little. This file is located in your home directory.

    gedit .bashrc

    Scroll down to the bottom of the file, and add the following line

    export PATH=$PATH:/home/USERNAME/scripts/

    Of course replace USERNAME with your own username/homedirectory. Now reload the file with

    source .bashrc

    And you are all set. Any shell script you now place in scripts can be executed from anywhere on the system. The only requirement is to chmod +x on the file first 😀

  • Take control of your CPU in Ubuntu!

    I recently was investigating for no apparent reason if my cpu (core 2 duo) was running at full speed. Also looking for ways to manage speeds, and fan control in Ubuntu. What i found was the following. You can add an applet to your panel that shows the CPU temperature.

    Right click on the panel, and choose ‘add to panel’. Choose the CPU Frequency Scaling Monitor.

    But how does this help me to control the speed ? It doesn’t, so off i go investigating. But before i did i noticed that instead of showing 1.6 GHz i was getting simply 1. Also i had to add 2 applets to monitor each core.
    So after some digging i ran the following command from a terminal:

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

    What you get from this is a list of the possible frequencies your CPU will run at. The steps are predetermined by the manufacturer. Next is to find a list of the possible managing (called governors) of the speed.

    cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

    This provides me with a list of the Governors available for my cpu. Normally its using the ‘Ondemand’ which allows the higher cpu usage if needed, but else throttles down speeds in exchange for longer battery life and temperature.

    Now my goal was to be able to mange them myself also, so i found after some searching that the CPU monitor applet would allow this, but pr default is set not to allow the user to change such setting. It makes sense also because why would be average user (non-root) need to control cpu settings. Also changing it would allow ANY user on the system to change the speeds. Since I’m only myself i don’t mind this. So off i go to reconfigure the applet, to allow speed changing:

    sudo dpkg-reconfigure gnome-applets

    This is gonna change the settings if you answer yes to the question regarding setting the suid of the cpufreq-selector executable. Now i can right click my cpu monitor applet and under preferences choose which kind of controls i want available. I choose to have both frequency, and governor available.
    Now a simple left click on the monitor allows me to change either the governor mode, or the frequency itself.

    Hope this helps people take back control of their cpu, or at least leave you the opportunity to do so 😀 Enjoy!

  • Frozen Bubble 2 released!

    Yes it’s here. Frozen Bubble 2 !!!
    After a lot of hard work and a lot of testing, FB2 is released on 27th of October 2006. This new release brings the following new features:

    • new 1-player game mode: multiplayer training; uses identical game rules as multiplayer, generated malus bubbles are counted as points – what score will you be able to reach in the 2 minutes time frame?
    • network (Internet) game: up to 5 players in a game (net game system has logic able to transparently handle players behind a NAT)
    • LAN game: similar to network game except that no connection to Internet is made, substituted by polling the local network
    • fully revamped graphics, including now 3d-based smooth penguin eyecandy
    • revamped intro and 1p music into fully digital productions
    • full joystick support: just move your joystick(s) or push buttons in the “change keys” dialog (analog joysticks handled as digital for fair play)
    • recording and playback of all games with non-predefined levels (1-player in random and multiplayer training, local 2-player, and network/LAN game with 2 to 5 players)
    • realtime graphical effects in the menu screen (if your computer is fast enough)
    • anti-aliased and localized messages

    Now let’s pray for the stability of the Frozen-Bubble Internet game servers.

    PS: I did the danish translation for this game, so check it out 😀 Hope the translations wont be too far off 😀 hehe

    The Frozen Bubble Homepage

  • Ubuntu Edgy Eft 6.10 Officially Released

    Here it is folks. The new version of Ubuntu is now officially out. Out-of-the-box features include Gnome 2.16, Tomboy, F-Spot, Firefox 2.0, and more…

    Enjoy!

    read more | digg story

  • 2 More linux videos are done!

    Okay despite being sick, and all that follows i managed to sound awake, fresh and alert for the extend of recording two more videos.
    The linux videos this time deals with package management in short introduction and how to use synaptic, and apt. Second video deals with using Automatix and how it can be used as an extremely usefull tool for getting a system up and running quickly.

    The downloads are available here:
    Introduction to packages and packagemanagement

    Instaling and using Automatix

    Downloads will be active in a couple of minutes 😀