Tuesday, 2 August 2011

CPU Frequency Scaling application

In addition to my post on how to use frequency scaling with the terminal, I made a GUI application  that allows you to quickly scale the frequency without having to note down and type in commands.

You can download it at: http://turtle-studios.co.uk/products

Thursday, 28 July 2011

Use Compiz to annotate your screen

There are times when it can be really useful to draw on your screen, like when making a tutorial for example. You can draw around important features to highlight them and help people see what they need to do. Because Ubuntu uses Compiz to decorate the windows this functionality is already there, you just need a way to access it.

Install compizconfig-settings-manager and start it up (a shortcut is to type ccsm). Click the Extras button on the left and choose Annotate, then click Enable annotate to activate it. If some of your panels mess up at this point, open a terminal and run "compiz --replace" to restart Compiz and fix them.

As will all Compiz features, annotate is very customisable and you can change key actions, colours and even how shapes behave. Try it out, it's easy to do!

Wednesday, 27 July 2011

Recover forgotten passwords with Evolution mail

Once you've received mail with Evolution you'll have entered your password for your email account, which you may have chosen to save. The thing is though, where does it save?

Old versions of Ubuntu used to save into a file in ~/.gnome2_private/ which stored base64 encrypted passwords (which was very insecure). If you're using a later version (which you probably are) then passwords are saved in a different way. The Gnome Keyring Manager now handles encrypted data on Ubuntu to provide a secure way of storing sensitive data.

To view your saved passwords, run the application "seahorse" which will open the password manager, double click the "Passwords: login" folder, and scroll down to your email account. Double click that and you can view your password for that account.

Easily view your saved passwords with Seahorse and Gnome Keyring

You'll also notice that browser passwords and some other keys are stored here too as it is used for all passwords.

Tuesday, 26 July 2011

Extend laptop battery life with CPU scaling

If you have a laptop with poor battery life, it is really annoying to have it run out when you're doing something important like word processing. Many computers support CPU scaling however, which is a way of making your processor use less power.

(Note that this post might look a bit intense, but it really isn't, it just has a few terminal commands)

The first step of this is to see what modes your CPU can use, so type
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
in a terminal. You should see a range of options, if not your CPU may not support scaling. My options are: "conservative ondemand userspace powersave performance".

At this point you should check the default for your CPU with:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
this will tell you which mode your computer is currently using so you can switch back to it later.

You can then tell your computer to use a certain mode on the CPU. If you're just taking notes at work you probably need no more than powersave (or your CPU's equivalent).
cpufreq-selector -c 0 -g powersave
Note that you must put your core number after the -c. If your CPU has a dual-core processor (2 cores), run this twice with "-c 0" and "-c 1" (and do the appropriate for triple/quad cores).

And that's it! You can check how your CPU is doing with
cat /proc/cpuinfo | grep "cpu MHz"
Try comparing it with performance mode to see the difference.

Monday, 25 July 2011

Battle for Wesnoth

Battle for Wesnoth is a full turn based strategy game, available on a number of platforms. Notably on Linux because we don't get many games here!

You can get it in the repositories be installing "wesnoth".

The graphics are well drawn and it has the sense of a game that you would pay for. There are loads of different character types and each one has a different image, they're not just edited with different colours.
Wesnoth has great level designs, despite being limited to a hexagonal grid

As a turn-based strategy, Wesnoth has lots of different factors in gameplay. Units level up, and have various statistics, multiple weapons (which also have lots of stats). Playing in the night changes your units abilities, or playing on different terrain. At first it can seem a lot to get your head around but it really makes playing more fun when you have to review all the stats before you make a move. It's also got a battle calculator so you can predict the possible outcomes of each battle before you attack.
Level, HP, XP, MP, Defence, Allegiance and weapon stats all to consider

Game time:
Wesnoth has a extensive single player campaigns and and multi-player over the internet, so it doesn't get old. Single player will last you a while if you play a few hours a day and once that's done you can have countless battles over the internet (which is even more exciting, in my opinion).
There are 15 campaigns, most with over 10 scenarios

In conclusion, Wesnoth is an amazing game which, being free, is something you really should try because on Linux it's one of the best games available.

Saturday, 23 July 2011

Geany text editor

Anyone who has done programming on Ubuntu has probably used Gedit. It's the pre-installed text editor that does a pretty good job, with numerous languages for syntax highlighting and a range of features to make programming easier.

Recently I discovered another editor, Geany. This is basically a vastly improved version of Gedit, and I can see why it's not installed by default as a standard user wouldn't need to use half the features. For developers on the other hand, Geany is way more useful then Gedit, let me show you  a few of the reasons why.

Built-in terminal:
Geany's terminal lets you run your code without switching windows.
At the bottom of the Geany window is a row of tabs, for various functions. One of these is the terminal, which stays visible when you edit your code up top. Using a normal terminal window can be a pain because it covers the editor and you have to Alt-Tab or the like between windows. The built-in terminal is completely unobtrusive and allows you to quickly test and fix bugs in your program.

Smart home key:
If you like to keep your code neat, you'll be used to nesting lines of code. Especially in HTML and Python, it's not uncommon to get over 3 tabs in and you find yourself using the left and right arrow keys a lot. The smart home key fixes this by jumping to the start of the text, not the start of the line, saving time having to adjust the cursor.

Indexing your code:
Quickly navigate your code with Geany's tree
The Geany window has a tree down the left hand side which contains all of the functions, classes, definitions etc in your file. When you have a large file that becomes hard to navigate, it might be time to use this because it really saves time scrolling through to find what you want. Simply clicking the entry in the tree jumps to the right place in the file without any unnecessary searching.

Geany also has support for compiling (though I use Python so I haven't tried this out) and hosts a load of other amazing tools, so try it if you haven't yet! If you don't use Gedit or Geany then what's your favourite editor?

Thursday, 14 July 2011

Firefox 4, 5 and Chromium

It's been a while since I posted due to exams and whatnot. While I was out, Firefox got 2 major releases: 4 and 5. (5 is out in the repositories, so an update will get it for you) Currently Mozilla's plan is to release smaller updates much faster, so you don't have to wait half a year to get the latest technology.

The strength of this plan shows up when compared to a browser like Internet Explorer, which is only released every few years. It lags behind other browsers because it rarely gets updated. Firefox's new release schedule aims to overcome the delays Firefox experienced by getting the new updates out on a new "Major" release, which used to happen once or twice a year.

If you had the misfortune to use Firefox 4, I'm sure you'll agree it was quite a flop, especially on Ubuntu. The layout and GUI is clunky and slow and the browser uses excessive amounts of memory. Rather than waiting for FF5 to fix it, I took the opportunity to use Chrome/Chromium. I was thinking of using Chrome before, but didn't want to transfer everything from Firefox, however because FF4 effectively forced me to, I decided it would be worth it.

Chrome works well on Ubuntu, the only issue I have is the window decorations going out of Chrome's own fancy window, though I run it maximised usually, so it's generally not noticed. Chrome looks much more smooth than Firefox, even FF5 and has useful features like switching tabs by scrolling over them and a slick way of dragging a tab into a window. Not to mention it runs quickly.

When FF5 got released I downloaded the binary before it got into the main repositories and had a look. The GUI isn't much different from 4, but the browser itself is more stable and optimised. Firefox 5 generally uses slightly less memory then Chrome, but Chrome is slightly faster, so it's pretty neck and neck which to use. In the end I stuck with Chrome because I find it easier to use. After the Firefox 4 fail, FF5 is also an awesome browser that I find myself opening every now and again as well as Chrome.

Friday, 25 March 2011

Alarm Clock

Just like GBirthday, reminder and scheduler applications are useful tools to have on your computer. If you've got lots of work to do as well as other activities it's easy to spend too much time one one thing and not have enough time for anything else. Alarm Clock helps with this by letting you schedule reminders, sounds or even programs to happen at a certain time.

 Start your favourite game when you want to give yourself a break.

Alarm Clock has loads of options you can use for each event. Fire it off on certain days and months. Play a sound, run a program, show a popup or even lock the screen. Create templates for common tasks.
Need more time? Use the snooze button to get the alert again a few minutes later

Be sure to spend time looking at all the options because there are a number of menus that each have useful settings for customizing how you use the program.

Finally, there is also an applet version that works in a similar way but is more concise. It's up to you which one you use, though I prefer the main version.

Tuesday, 22 March 2011

Using Lego Mindstorms NXT with Ubuntu Linux

The Lego Mindstorms NXT brick is an incredibly versatile programmable brick consisting of a microcontroller inside a plastic casing with an LCD display, four buttons, a speaker and eight external connections. Unfortunately, though, it only ships with compilers for Lego's "NXT-G" graphical language that run on Microsoft Windows and Apple Macintosh platforms. There is, however, a multitude of text-based languages available for the main platforms (Linux/Unix included). The variety of languages available is beyond the scope of this article, but there is an excellent page here that should provide enough information to get started.

In this article I will be setting up the NBC/NXC compiler for use on Ubuntu Maverick (it should work on most current *nix releases, too - if not, please comment and we'll look into it).

The first thing to do is make sure the NXT brick is recognised by the system. To do this we run:

david@pinatubo:~$ lsusb|grep Lego
Bus 002 Device 002: ID 0694:0002 Lego Group Mindstorms NXT

If you get similar output, you are ready to go onto the next stage. If not, then there is probably a misconfiguration or fault somewhere in the USB communications, or the brick isn't turned on.
To be able to compile and download NXC or NBC programs, all you need is the nbc executable. Download the latest release from here and untar. Make sure the binary is executable by cd'ing to where you untarred it and run chmod +x nbc. You can now run it by typing ./nbc at the terminal. This isn't very convenient unless you happen to be in the directory whenever you need it. I prefer to move the compiler to /usr/local/bin/ so it is on the system include path and the './' can be omitted.
david@pinatubo:~/nbc$ ls
david@pinatubo:~/nbc$ sudo mv nbc /usr/local/bin
[sudo] password for david:
david@pinatubo:~/nbc$ which nbc

You can now compile and download NXC and NBC programs by running:
david@pinatubo:~/nbc$ sudo nbc -d -EF test.nxc
[sudo] password for david:

Flags used are -d to make it download the compiled binary and -EF to tell it to compile it for the enhanced firmware (see nbc download link). For a full overview of available options, run nbc -help.
You may have noticed that the compiler needed to be run as superuser in order to work. This is due to the way Linux handles device files and a udev rule will need to be made to let it run at normal permissions. udev is the utility in charge of dynamic devices (e.g. USB devices which must allow hotplugging) on Linux systems. When a new device is connected, it looks through a set of predefined rules to tell it what to do with the device and who is allowed to access it. The details of how to set up the necessary udev rule are a tad too long to include here, but there are excellent instructions here on the NBC website.

That should be enough to get the NXT brick talking to your Linux box. If there are any errors or omissions, or you have problems following these instructions or configuring your system, please comment below and we will try to help.
Not got one? Buy LEGO Mindstorms NXT 2.0 (8547)

Saturday, 19 March 2011

The Firefox Add-ons Almanac: Part 2

To conclude the almanac:

  • Adblock plus
  • Tab scope 
Destroy the Web
    Adblock Plus
    Nearly every site you go on has adverts, even this one (though I try to use few). Adblock Plus completely changes this; you will never see an advert again. Even YouTube video ads are removed, which I really hated.

    Tab Scope
    If you use lots of tabs it's easy to lose track of what you have open, especially if they have misleading titles. Of course, you could change browser.tabs.tabMinWidth in about:config and restart Firefox, but theres nothing fun about that! Tab Scope adds a real-time image under the tab when you mouse over it, so you can easily see whats in it.

    And just for fun: Destroy the web
    Take your anger out on a website with Destroy the Web. Earn points by clicking elements in the page and try to beat the high scores! (Scores for this blog are at http://www.destroytheweb.net/page.php?gid=058bbbb87-a659-2b6c-716e-bc3b709cccb).

    Recognize this page?

    Even though this add-on wont get your work done any faster, it's definitely fun to have when theres nothing to do on the internet (is that even possible?)

    Wednesday, 16 March 2011

    GBirthday birthday reminder

    As it was my birthday yesterday, I chose to highlight a birthday related application today. GBirthday is a panel applet that shows you which of your Evolution contacts have a birthday in next next few days.

    There's no excuse for forgetting a birthday with GBirthday

    This applet is customizable; you can show birthdays up-to the past 30 days and 90 days in the future. It even changes colour and flashes to alert you, so there's no chance of not seeing.

    If you only have a few contacts you might not find this particularly useful, but people who have hundreds will benefit from having this reminder.

    Monday, 14 March 2011

    Game Review: Oil Rush

    Oil Rush is a water based Real Time Strategy game, where your mission is to take over the ocean in a world where oil is running out. The game is still in a pre-release version, and should be finally released in June, but until then you can pre-order for around £12/$19.95. Pre-ordering also gives you every build so you can start playing right away.

    Defend your base in an all-new RTS game

    Oil Rush has stunning graphics. Put that with the £12 price tag and it makes them even better. Most Linux games have pretty simple graphics: they're not bad but don't match up to mainstream Windows games. Oil Rush goes just as far as them, if not further, and the more you play the game, the more detail you notice. 10/10

    There is something about this game that makes you want to go back and play. You know you've got a good game when you can do this because you can keep playing it for as long as you like. There isn't much in the way of campaigns (it is only pre-release) but you can play over a LAN or internet (I assume there will be a main server later on) with your friends. 8/10

    I'm not too fussed about the sounds in games. I generally have the effects turned up and the music turned down. Oil Rush however is different and I keep the background music on when I'm playing because it's composed well and fits in with the game. 8/10

    As Oil Rush nears it's final release I can only see a great game becoming an awesome one, and I definitely recommend it to anyone considering it. 9/10

    Friday, 11 March 2011

    The Firefox Add-ons Almanac: Part 1

    To make up for yesterdays short post, todays will be a very long one. You probably won't want to read it all, so here are the contents if you want to scroll down to the important bits:

      • Schedule
      • YouTube
      • Management
       2. Utilities
      • Weather
      • Language

        As you might have guessed, this post is about Firefox Add-ons. There are loads of them available but which should you choose? To save time searching, here are the reviews:

        Thursday, 10 March 2011

        OpenOffice extensions

        Only a short post today, as I got home late and I haven't much time. I will make up for it tomorrow with an extra long post!

        OpenOffice has the functionality to use extensions: snippets of code that add extra features to the program. One useful extension is the Oracle PDF Import Extension. This lets you open a PDF like any other document in Draw and make changes to it. You can then save in the range of standard formats, including PDF.

        The second extension is Writer's Tools:http://code.google.com/p/writertools/downloads/list. Writer's Tools gives you a new menu in OpenOffice that let you do a range of things, like backup or translate.

        Writer's Tools is a very useful addition to OpenOffice

        The backup supports FTP, email and Amazon, you can bookmark documents and lookup words. Beware that this extension needs some setting up however, though it is easy to follow the instructions.

        Please comment if you know about any other good extensions as I haven't written much here.

        Wednesday, 9 March 2011

        Ubuntu Tweak: An easy way to customise Ubuntu

        I've known about Ubuntu Tweak for a white, but I never really used it. To be honest, I don't know why: it's an incredibly useful tool that saves hours of time searching for a terminal command of system file. It's beginner friendly too, with a graphical interface that is well designed, making it accessible to any user.
        Tweak runs under standard privileges, so you shouldn't accidentally do something you didn't mean to and find your computer is broken.

        Tweak combines lots of system utilities all into one place so you can easily find what you're looking for

        Ubuntu Tweak is a "play, don't say" application. The best way you'll learn about it is to try it out for yourself instead of reading an article. It's stored in the standard repositories (ubuntu-tweak) and installs to Applications > System Tools > Ubuntu Tweak.

        Tuesday, 8 March 2011

        5 Firefox config tips

        Firefox allows you to change critical settings it its about:config menu. There are a wide range of options here and some are surprisingly useful, yet hidden from the user. To access the menu, go to about:config in the address bar, and confirm that you'll "be careful".
        I'll take this point to note that this is a serious message and if you go haywire changing any setting to see what it does, there's a chance that you'll mess up the browser and have to reinstall it. Saying that, just follow the instructions here and you'll be fine.

        Monday, 7 March 2011

        Ubuntu Homepage

        If you ask me, the Firefox Start homepage is pretty dull: that shade of blue on white isn't the best start to the day, so why not have something else? How about that nice purple and orange that Canonical uses so lavishly?

        Your homepage doesn't have to be plain and simple

        Over the weekend I designed a fun and useful homepage for Firefox, featuring Google web/image search, a clock and links to Ubuntu.com, this blog and Ubuntu Forums. There'll be updates to come over the next few weeks so you can customize it to how you want.

        Saturday, 5 March 2011

        5 things you didn't (or did) know about Ubuntu

        Ubuntu has lots of neat features that make using it more productive and fun, but people new to it don't know about them. Here are 5 of them that you might not have known.

        Hiding files

        Ubuntu has a different method for hiding file from Windows: any file with a . as the first letter automatically becomes hidden. As an example, if you had "picture.jpg", rename it to ".picture.jpg" to make it hidden.
        Hidden files can be shown by pressing Ctrl+H

        Run a program without a terminal

        If you need to run a program but can't find where it installed to, then press Alt+F2. You'll be shown a list of applications to choose from and also each programs command.

        Change folder and file icons in Nautilus

        If you want to use a special image instead of the standard icons in Nautilus file browser, right-click an item and go to the Properties. In the top left corner you'll see the current icon, so click that and navigate to an image that you want to use. You can also reset the image by clicking Revert at the bottom.

        Spruce up your folders by changing icons

        Make fancy desktop effects

        For this tip, you'll need a decent graphics card. If things seem to be slow afterwards, you can disable this in System > Preferences > Appearance, and using None or Normal Visual Effects.

        Install Compiz Config Settings Manager first. This lets you change the visual effects.
        Open it in System > Preferences > CompizConfig Settings Manager.

        In the manager window you can change a whole range of options, or if you haven't got time, I have uploaded my settings file that has fun effects.

        To use my file, click Preferences down the left side and select Import. Choose the "ccsm-settings.profile" file and once it's finished the effects take place immediately.

        Software you never knew you had

        By default, Ubuntu hides some programs from the Applications menu that you might not need but these can be reshown to be used like other software.
        Right click the Applications button and select Edit Menus. You'll be shown a window with the menus and software in each menu, and some of the software has a softer, italic font: these are the ones that are hidden.

        Even though some items are hidden, it doesn't mean they're not handy

        To show or hide software, click the check box to the left. Some of the hidden items won't work, but a few such as Image Viewer or Control Centre are useful, so I keep them visible.

        Friday, 4 March 2011

        Set folder backgrounds in Nautilus

        Nautilus is much more than a file browser; it has a multitude of options designed to make using it easier or more enjoyable. One of these is the ability to set backgrounds to folders.

        You can choose your own backgrounds to liven up your folders

        The procedure is really simple: Just navigate to the folder that you want to decorate and click Edit > Backgrounds and Emblems. You can then choose whether to have a pattern or colour and you can even pick your own image. Just drag the icon into the folder and the background will change.

        This menu also has a useful feature of adding emblems to files and folders. You can use these to highlight important files and make then stand out by dragging the emblem onto it. To reset the emblem, just drag it on again.

        Thursday, 3 March 2011

        Game Review: Hedgewars

        If you've played the Worms games you'll probably know that there isn't an Ubuntu release and that the game costs money. Introducing Hedgewars:

        This is a Turn Based Strategy game, where you battle another player on a 2D landscape.

        Hedgewars is available in the GetDeb repository

        Hedgewars 0.9.3 and 0.9.6

        The graphics in this game are very cartoony which fits in well with this genre. It's not a First Person Shooter with realistic physics simulation: it's hedgehog wars. The images are surprisingly high quality and a lot of work must have been put into them.

        As of writing this there is no story or unlockables that make a game "completable", you just set your team against the computer or another human and use your skills to (try to) win. The beauty of this is that unlike other games where you get better weapons as you progress, it's all based on how well you can play.

        Multiplayer is this games biggest advantage; you'll get bored after playing against the simple AI computer. You can choose between 3 modes for this: Local (on the same computer), LAN (on your home network), and Internet.
        The internet server is never empty so you'll always have someone to play and you can choose to go to the Beginners or Experts rooms depending on your level. I never play single player anymore as multiplayer is so much better (my username is turtle153 if you see me around).

        My favourite game on Ubuntu - great for passing the hours on a rainy day or the 5 minutes before dinner. Make sure you have a decent internet connection however, if you want the full potential of Hedgewars.

        Wednesday, 2 March 2011

        Using headphone or back sound ports.

        A recurring problem in Ubuntu is that you can only use one sound port at a time. For example, if you have your back output wired up to speakers and you plug in some headphones in the front, you'll get no sound.

        The good news is that this can be easily fixed from a simple menu:

         It's easy to choose which port you want from a graphical menu

        Click your volume control on the top panel and in the lis that appears click Sound Preferences. Navigate to the Output tab and you'll see a choice for the connector at the bottom. Simply choose the right connector and you're away!

        Tuesday, 1 March 2011

        Top Music Players

        There's a lot of confusion over the best music player for Ubuntu, so I'm going to review 4 of the most common dedicated players. Note that there are also Media Players (VLC, Movie player) that also play music but I won't be focusing on these due the the limited functionality.

        Please don't take my work as final when reading this: the programs are no bigger than 20MB to download so you may want to try each out for your self and give me some feedback.

        You can read my review on Banshee here: http://ubuntudaily.blogspot.com/2011/03/software-review-banshee.html

        First up: Song Bird

        Search in the Software Centre: songbird

        Song bird has a non-native interface that will stand out from the rest of your applications. I quite like the design and clearly a lot of effort has been put into it: +2 points

        Song Bird's theme will jump out at you, but is that a bad thing for showing off your music collection?

        When Song Bird is first run you get presented with a license agreement. This is a shame for free software, but if you're OK with it, just continue along. You'll see a useful setup wizard to help you import your music collection and change a few options, so it is easy to get this program working: +1

        The interface takes some getting used to but it's not hard to get the hang of. The tabbed system lets you browse around the external features like last.fm so you can contain all your work inside one window: +2 points

        Overall score: 5


        Search in the Software Centre: guayadeque

        No, don't even try saying this name! (I'm just glad this isn't a vlog) Like its title, Guayadeque has some interesting features that are jammed into it's window:

        Don't be put off by Guayadeque's crammed window, it packs some useful stuff in there

        Software Review: Banshee

        Banshee is a music player that will be included with Ubuntu 11.04 (Natty), instead of Rhythmbox. In my opinion, Banshee is much better: it's got a more aesthetic layout, it crashes much less often and has useful plugins like Wikipedia and last.fm

        Banshee can have the browser hidden or shown, depending on your preference

        Banshee's current release is 1.8, the same one in the repositories, so open Software Centre and search for "banshee". You'll need the first hit, so click it and press install. Once that's done it can be launched from Applications > Sound and Video > Banshee Music Player.
        Once Banshee is running, you can even set it to show in the volume control; just go to the preferences and click "Show Banshee in the sound menu".

        The forté of Banshee however, comes with the extensions in the preferences. There is already a huge range of options and there'll be more to come with the next Ubuntu release. Rather than telling you which to choose I'll leave it to you to see what works best.

        Rating: 9/10


        Monday, 28 February 2011

        A late introduction?

        I had planned to jump straight in to this blog and not give an introduction, but I think that I should give the lowdown.

        This is the first blog I've made so it will be a new experience to me! Feel free to comment on the posts and ask me to review some software or the like. As you might have guessed, this blog is oriented around the Ubuntu operating system so that's what I'll be focusing on mainly, I'll also write about general Linux stuff and anything else that's related.

        I'm going to try to update this blog every day, so I really will need suggestions in the future to help me out. Thanks for reading!

        Game Review: Super Tux Kart

        First up in this blog, I'll be reviewing Super Tux Kart, a free racing simulator thats available to many Linux distros, not just Ubuntu.

        The game in the Ubuntu repositories is version 0.6.2 which isn't the latest, so I recommend you download 0.7 at http://supertuxkart.sourceforge.net/ before you play.

        Update: As of 2nd of March, v0.7 is available in the GetDeb repositories.

        I like my games to be visually appealing, so the graphics are a big part for me. I tried this game on an integrated graphics chipset and on an ATI Radeon 4550: absolutely no different, yet great 3D graphics! It will run well on what ever video card you have so you won't be disappointed.

        The gameplay is generally smooth but the controls can take sometime to respond, so you'll be off the track the first few times you play. After you get used to it and change the settings to your liking however, it is on par with mainstream racing games.

        With great graphics and sound gameplay this is a must have for the casual gamer: 8/10