I have been using xmonad under unbuntu for nearly a year now (and have been VERY happy). I thought it was finally time that I share my method for configuring/setting up xmonad.
I run xmonad under gnome, this allows a lot of the magic of Ubuntu to continue working (such as network manager configuring wifi), and helps keep the amount of manual configuration down to a minimum.
Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
Wednesday, March 3, 2010
Tuesday, April 7, 2009
Adding fonts to linux
I have been complaining for the last few days about my the font that I have been using in my terminal, so I decided to actually do something about it.
What I didn't know, was how to go about installing some nicer fonts. While talking to James about this, he suggested that I can just create a
What I didn't know, was how to go about installing some nicer fonts. While talking to James about this, he suggested that I can just create a
~/.fonts directory, and place the fonts in there. A great little piece of information, that I had no idea about.
Tuesday, March 31, 2009
Fixing audio on Ubuntu 8.10 for an iMac
I was having problems where the sound was crackly and quiet. So the fix seems to be reload the snd_hda_intel driver (kinda annoying... but at least it works)
[bash]
sudo rmmod snd_hda_intel
sudo modprobe snd_hda_intel
[/bash]
[bash]
sudo rmmod snd_hda_intel
sudo modprobe snd_hda_intel
[/bash]
Friday, February 20, 2009
Handy bash one liner for getting the ip address of a host
Something I find that I have to do in bash scripts occasionally is to grab the ip address of a specific computer. This requires a little parsing in most cases (due to cnames and multiple ipv4 addresses for a host).
The following one liner should handle all of this correctly:
[bash]
host ServerName | sed -rne 's/.*has address ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/\1/p' | head -n 1
[/bash]
Note: Syntax error was picked up by freespace
The following one liner should handle all of this correctly:
[bash]
host ServerName | sed -rne 's/.*has address ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/\1/p' | head -n 1
[/bash]
Note: Syntax error was picked up by freespace
Monday, January 5, 2009
Multiplayer Snake
Well, here we have yet another challenge... Though this one does not involve any prizes, as I want my students at the NCSS camp to actually do their projects and not spend all their time on my competition.
So, what is has to be done here? Well it is quite simple really... Design a bot to play snake for you. I am forcing people who submit to write their solution in python (though there is no real need, other than I am teaching python at the moment). The input/output of the program is quite simple... The output consists of one of the following four letters: 'U', 'D', 'L', 'R' (corresponding to Up, Down, Left and Right).
The input consists of the following:
An example is:
Where
Code for the engine is located in my repository under the snake project. Submissions should be made to my email address, or in person.
The initial competition will have bots go up against each other, with no time limit given per move. The later rounds will ensure that all bots get equal cpu time (by running the faster bots more often).
So, what is has to be done here? Well it is quite simple really... Design a bot to play snake for you. I am forcing people who submit to write their solution in python (though there is no real need, other than I am teaching python at the moment). The input/output of the program is quite simple... The output consists of one of the following four letters: 'U', 'D', 'L', 'R' (corresponding to Up, Down, Left and Right).
The input consists of the following:
width height snake_id
board layoutAn example is:
7 7 A
..*....
..A....
..a....
..a....
.......
.......
..Bbbb.Where
* is an apple, . is an empty cell, the uppercase letters are the head's of the snakes, with the lowercase being the body.Code for the engine is located in my repository under the snake project. Submissions should be made to my email address, or in person.
The initial competition will have bots go up against each other, with no time limit given per move. The later rounds will ensure that all bots get equal cpu time (by running the faster bots more often).
Wednesday, November 5, 2008
Not so smooth transition to xubuntu-intrepid
So James and I decided to take the plunge and install the intrepid update on a newly installed machine we had here (it had had xubuntu-hardy installed only a week earlier).
This machine was using the nvidia binary package, but other than that did not have anything that was from a restricted repo.
Upon the upgrade we found that the nvidia package no longer works. In fact, it no longer compiles the kernel module (even though it claims that the package is installed correctly). This left us without an X11 server. Even when trying to use the nv driver we could not get it to work.
On a side note: We found that the nv driver is now no-longer installed by default.
After about an hour of trying to get things to work, we decided that we will just have to live with the vesa driver. Although this makes the system slow, at least we can use X11.
Another thing I noticed, is that it now spams me with an annoying motd, I mean sure system stats on login is may be nice for some people, but I already have most of that coded in my scripts. The easiest way to get rid of this is to remove the package landscape-client with the following command:
This machine was using the nvidia binary package, but other than that did not have anything that was from a restricted repo.
Upon the upgrade we found that the nvidia package no longer works. In fact, it no longer compiles the kernel module (even though it claims that the package is installed correctly). This left us without an X11 server. Even when trying to use the nv driver we could not get it to work.
On a side note: We found that the nv driver is now no-longer installed by default.
After about an hour of trying to get things to work, we decided that we will just have to live with the vesa driver. Although this makes the system slow, at least we can use X11.
Another thing I noticed, is that it now spams me with an annoying motd, I mean sure system stats on login is may be nice for some people, but I already have most of that coded in my scripts. The easiest way to get rid of this is to remove the package landscape-client with the following command:
sudo aptitude purge landscape-client
Subscribe to:
Posts (Atom)