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
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!
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
Downloads will be active in a couple of minutes