To compile a C++ application using gtkmm in Code::Blocks, do the following steps:

  1. Open Project > Build Options…
  2. Select your project.
  3. On the Compiler settings tab, select Other options and add this to the field:
    `pkg-config gtkmm-3.0 --cflags`
  4. Select the Linker settings tab and type the following line in the Other linker options text area:
    `pkg-config gtkmm-3.0 --libs`

Tags: , , , , , ,

I have installed Ubuntu 11.10 on my laptop but I noticed that it drained a lot more of the battery than it should do. Apparently there are a couple of fixes to this:

To add pcie_aspm=force, i915.i915_enable_rc6=1, i915.i915_enable_fbc=1 and i915.lvds_downclock=1 to GRUB, do the following steps:

  1. Open the terminal and run: sudo gedit /etc/default/grub
  2. Add:
    pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1
    to
    GRUB_CMDLINE_LINUX_DEFAULT=”",
    so it should look somewhat like:
    GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1″
  3. Close gedit and save the document.
  4. Now run the following line in the terminal to update GRUB:
    sudo grub-mkconfig -o /boot/grub/grub.cfg
  5. After a restart of your computer the new settings should get activated.

Tags: , , ,

When I the other day tried to set up Egit in Eclipse Indigo with Github I had major problems with guides not working. Two of the tutorials I tried where:

I got many errors and such… :/

But I found a really good post describing how to set it up in a current version of Eclipse:

2. In eclipse, configure the remote push
a. Window > Show View > Git > Git Repositories will add a repository explorer window.
b. In the repository window, select the repository and expand and right-click Remotes and choose Create Remote.
c. Copy the github repository URI from the github repository page and paste this in the URI box.
d. Select ssh as the protocol but then go back to the URI box and add “git+” at the beginning so it looks like this: git+ssh://git@github.com/UserName/ProjectName.git
e. In the Repository Path box, remove the leading slash
f. Hit next and cross your fingers. If your get “auth fail” restart eclipse and try step 5 again.
g. When you get past the authentication, in the next dialog select “master” for source ref, click “Add all branches spec” and “Finish”.

Now try a push to github. This worked for me but with all the fiddling around I’m not sure these instructions are perfect….

Link to the post: http://www.eclipse.org/forums/index.php/mv/msg/200890/648905/#msg_648905

Tags: , ,

Today I managed to install and configure software to make my computer automatically start and download torrents. So now my computer will by itself download episodes from series I have specified as soon as they are released. What you basically need (for my solution) is the torrent client Deluge, the application FlexGet and a RSS feed where the torrents are indexed.

Hereunder follow descriptions of what you have to do to get this working (on Arch Linux with Gnome, but most of the steps should work on any distribution. However some commands may differ and such).

Deluge

  1. First, download Deluge from your Linux distribution’s repository, if you don’t already have it installed. On Arch Linux, type the following in the terminal: sudo pacman -Sy deluge
  2. Open the Preferences window under the Edit menu in Deluge. Then navigate to the Interface tab and make sure that Classic Mode isn’t enabled, which I think it’s by default. You have to disable Classic Mode to be able to run the Deluge daemon, which is Deluge without the GUI, in the background.
  3. Next time you start Deluge (I think) it will ask you to start the daemon to make Deluge able to run. Under Edit > Connection Manager in Deluge you can reopen this window.
  4. Then you have to reopen the Preferences window, and under the Downloads tab choose where the torrents (the downloaded content) should be downloaded to.
  5. You can also start the daemon by typing deluged in the terminal. More information about the daemon can be found here: http://dev.deluge-torrent.org/wiki/Faq#Daemon. To see if it’s running, type ps -A | grep deluged in the terminal.

FlexGet

  1. Download and install FlexGet. There are installation instructions in their Wiki: http://flexget.com/wiki. However, if you are on Arch and have a wrapper for pacman and the AUR installed, like Yaourt, type the following in the terminal: yaourt -Sy flexget. (On Arch you probably will need to do some button smashing to install all dependences, since many of them can be found in the AUR too.)
  2. When you have installed FlexGet, create the folder .flexget in your home folder and in it create a file called config.yml. Now you should read a bit on FlexGet’s wiki to learn how you should construct the config file. Especially read the Configuration page. Here is how (a part of) my config file looks like:
    feeds:
      tokyotosho:
        rss: http://www.tokyotosho.info/rss.php?filter=1&entries=450
        series:
          - Fate/Zero
        deluge: yes

    Note the last line: deluge: yes. It’s necessary for making Deluge start the torrents. Also note that you have to specify a RSS-feed where FlexGet should look for new torrents to download.

  3. Now FlexGet should be able to check the RSS feed(s), find the series/content you want to download and make Deluge download them. To test run FlexGet, run flexget --test in the terminal. Of course you can run flexget --help to find more possible commands. But to do a regular check in the RSS feeds, download, and all that stuff, just run flexget. Note that you don’t have to be running Deluge to download the torrents, only deluged is needed.

Start deluged with Gnome

  1. Open a terminal and run gnome-session-properties if you are on Gnome. In the window that pops up you should add an additional startup program – in this case deluged. Just type that in both the Name field and the Command field. If you are using another desktop environment you sadly have to figure out this step by yourself (Google).

Make FlexGet run once every hour automatically

FlexGet only checks the RSS feeds when you run flexget in the terminal. So what we want to do is to schedule the computer to run it once every hour.

  1. Start with adding the following two lines to the .bashrc file in your home folder:
    EDITOR=nano
    export EDITOR

    This will make the next terminal application use the text editor nano instead of whatever alien editor it uses by default. :)

  2. Close all terminal windows and open a new one to apply the change.
  3. Run crontab -e in the terminal.
  4. Add 0 * * * * flexget to the file, and then save and close it with Ctrl + Shift + X. You can find more schedule options here: https://wiki.archlinux.org/index.php/Crontab. Please don’t make it run once every minute or something crazy like that, since that would use a lot of the server’s bandwidth where your RSS feed is hosted.
  5. To see everything you have scheduled, type crontab -l.

Done!

Now your computer should be able to automatically download torrents for you. I hope you found this guide helpful. If you have any wonders or problems, please leave a comment below, and maybe I can help you get it sorted out.

Tags: , , , , , , , ,

Yesterday at school I heard from a classmate that there is a new Youtube interface called Cosmic Panda which you are able to try out.

To activate it, you have to visit the following page:

As I’m writing this, I have only watched a single video with this interface. But it looked pretty slick on that video. ;) The profile pages have also been updated.

Check it out if you are interested. You can always deactivate it by visiting the page and pressing a button.

I also saw that they have a page dedicated to testing stuff:

Tags: , , ,

There is a really nice lightweight music player to Linux called DeaDBeeF, which can be found on the following link:

The appearance is in many ways very similar to the Windows music player Foobar2000. So if you like Foobar2000 on Windows, give DeaDBeeF a try. It also has many (preinstalled) plugins and features.

One of the features it has is the ability to show album art right in the playlist. To do this, do the following steps:

  1. Right click the bar right over the playlist and add Album Art from the Add Column window.
  2. Right click the bar again and choose Artist/Date/Album under Group by.
  3. Done!
  4. If you don’t want it to separate the playlist by artist. Choose Custom under the Group by menu instead, and type [%y] %b in the Format field.

Tags: , , , , ,

On my laptop where I run Linux Mint 11 I have been using the window manager XMonad for a while. It’s a tiling window manager, and it’s the first time I’m using one of those. If you don’t know what a tiling window manager is, you can check out Wikipedia’s page on the subject:

Or this video of somebody fiddling around with XMonad:

XMonad works very well with Gnome 2, and it doesn’t conflict with the Gnome 2 panel at the top of the monitor. Here is a screenshot of my dekstop (click on it to show it in full-size):

XMonadI like that you open, resize and change active window, and move windows between workspaces with only the keyboard. This means that you don’t have to use the trackpad for those tasks. :)

I think that using a tiling window manager works surprisingly well, considering that it’s not a commonly used type of window manager. Sometimes do windows look a bit strange when they are forced to fill the whole screen tho, but that’s not often.

I recommend you to check out XMonad if it sound interesting. On Mint it’s really easy to change back to regular Gnome if you don’t like it, just pick regular Gnome on the login screen.

Links:

Tags: , , ,

Yesterday (around 3-4 AM) I installed Linux Mint on my laptop (Toshiba R830). So now it has Windows 7, Arch and Mint. To enhance the awesomeness, I downloaded a Ghost in the Shell wallpaper and added a Linux Mint logo to it which I edited with a brush. All work was done in GIMP.

Ghost in the Shell Linux Mint Wallpaper 1920x1200

Ghost in the Shell - Linux Mint Wallpaper - 1920x1200

Ghost in the Shell Linux Mint Wallpaper 1920x1080

Ghost in the Shell - Linux Mint Wallpaper - 1920x1080

Linux Mint Laptop Screenshot Prev

My Desktop

Tags: , , , ,

Almost a week ago I ordered my first laptop, which I’m mainly going to use in the school. It’s a 13,3″ Toshiba R830 and it arrived last Friday. I have already installed Arch Linux and Gnome 3 on it and I’m currently tweaking power saving settings.

Anyway, when I first tried to install the operating system I did it with the netinstall image, version 2010.05, from their website. However, it didn’t work since eth0 wasn’t found during the installation. (ifconfig found wlan0, but I don’t have wireless Internet at home.) Instead I downloaded the core image, chose during the installation to install from the CD (USB memory in my case) and ended up with a working OS – but still no Internet.

I did some searching on the Internet (on my phone) and found the suggestion to download a more recent image of Arch Linux, from this site:

I downloaded the netinstall image with version number 2011.06.10 and that worked out great. :) Since my laptop is fairly new I suppose the hardware wasn’t fully supported in the earlier image. Maybe the kernel has been updated since then or something.

So if Arch Linux doesn’t find Internet, try to reinstall it with a more recent image from the link above.

Tags: , , , , ,

Google has a pretty clumsy URL for searching with SSL, like Wikipedia. However, the encrypted version of Google Search is currently only in beta, so it may be the reason behind it. Anyway, here is the URL to it:

To change to your country’s version, replace the last two letters en to something more fitting. In my case sv since I’m from Sweden.

With the Firefox add-on Add to Search Bar you should be able to add an entry for this version to your search bar. And as with all other search fields in Firefox, it’s possible to add a keyword for the search field by right clicking the field and pressing “Add a Keyword for this Search…”.

However, if you care about your privacy, don’t forget to check out DuckDuckGo. Click here to read my short introduction to the search engine.

Tags: , , , , ,

« Older entries