Daniel 'MaTachi' Jonsson

Monthly Archives: April 2011

Make CSS Footer Stay at the Bottom of the Page

I’m currently working on a small website in HTML and CSS for web design class in school. Though, I had major problems with positioning the footer at the bottom, get the background image of the layout to work right and shit. It didn’t become easier with my layout background image being an semitransparent .png-file. So messy…

However, I stumbled over two good website that helped me to get in the right direction with getting the footer to stay at the bottom. They didn’t completely solve my problems, but yeah, they helped much. Here are links to them:

EDIT: You can check out the theme here and download it.

How to add a launcher to the Unity launcher bar

Here is the steps you have to take to add a custom launcher to the Unity panel:

  1. Right click on your desktop and create a launcher.
  2. Customize the launcher until you are happy.
  3. Navigate to /home/[username]/.local/share/applications in Nautilus. (Press Ctrl + H to show hidden folders (.local).)
  4. Drag and drop your launcher to this folder from the desktop.
  5. Now, drag and drop your launcher from the applications folder that you have opened, to the Unity launcher bar.
  6. If the launcher is still on the desktop you can delete it.
  7. Done!

Ubuntu Shell Script to Enable and Disable Secondary Monitor

I wrote a short, simple shell script to easily enable and disable my secondary monitor in Ubuntu. I have saved it as monitor.sh in my home folder, and here is the source code:

#!/bin/sh
echo "Turn on: 1\nTurn off: 2"
read option
if [ $option = 1 ];
then xrandr --output DFP2 --auto --left-of DFP1
elif [ $option = 2 ];
then xrandr --output DFP2 --off
fi

To run it, just open a terminal window (Ctrl + Alt + T) and type sh monitor.sh. If you are really lazy, you can add an alias for the command in the file .bashrc in your home folder. I named my alias m. :)

Disable “click selects all” in Firefox for Ubuntu

Anime Girl FirefoxIn Firefox for Windows, you are able to double click a segment of the URL in the address field to select it. By default, this isn’t possible in Firefox for Ubuntu, instead selects a single click the whole address. Luckily, this is easy to change, which you can do by following these steps:

  1. Open a new tab.
  2. Type about:config in the address bar.
  3. Press the I’will be careful, I promise! button.
  4. Type selects in the filter field.
  5. Change the browser.urlbar.clickSelectsAll entry to false by double clicking on the row.
  6. Do the same as above with the browser.urlbar.doubleClickSelectsAll, and make sure both are false.
  7. Done!

Ubuntu Unity Video Tutorials

On ubuntuforms.org I saw a post by the user castrojo to two Unity video tutorials made by him. I think that they work as a good introduction to Ubuntu’s new user interface. However, Ubuntu 11.04 hasn’t been released yet, and Canonical says that they will do many changes until then. But I suppose that the basics will be the same, and that they only will add more functionality. Links to the two videos:

When I started Ubuntu 11.04 Beta 2 for my first time, I was really sceptical to Unity, so I changed fast to Ubuntu Classic. But then I gave Unity a second chance and I must say that it actually isn’t that terrible. I miss some stuff, like better support for dual monitor setups, the ability to right click the panels, and the ability add applets to the top panel. But I hope this will be fixed to the release of Ubuntu 11.04.

Three Monitors With Two AMD/ATI Graphic Cards

I have two 22″ monitors hooked up to my computer through DVI. But the other day I wanted to try out if it would work with three monitors too. However, my ATI/AMD PowerColor 4870 graphic card has only two DVI video outputs, so I borrowed my brother’s video card, which is an ATI 3650. After plugging it in to a PCI-E bus, I realised that it hasn’t even a Crossfire connector. I did some searching and found out that a Crossfire bridge is only needed when you want to take advantage of the extra video card in games and such, which I wasn’t interested of. Then I hooked up my brother’s 17″ monitor to the 3650 card. The monitor had only a VGA input tho, while the card only had DVI outputs, so I had to use a DVI-to-VGA adapter.

I started with booting up Windows 7, and it worked fine with 3 monitors. However, I didn’t test it for too long. Then I rebooted the computer and started up Ubuntu 10.10 instead, to see if it would work. I had to do some configurations in the ATI Catalyst Control Center, but then it worked there too. However, it worked a bit strangely, almost like its own desktop. The 17″ monitor had the standard panel configuration for a single monitor, and I wasn’t able to drag windows between it and the other two monitors. I didn’t have much time tho, and my brother wanted his card and monitor back, so I never solved that odd problem. Maybe I had to adjust something in CCC, or somewhere else, I don’t know.

To summarize this post: You can use three monitors by plugging in a second (AMD/ATI) graphic card. The card must not be of the same model, or even of the same generation (ATI 4870 and ATI 3650). You don’t need a crossfire bridge. Though, I can’t say if this applies on Nvidia cards too.

Book Tip: Daemon by Daniel Suarez

DaemonI’m currently reading the techno-thriller Daemon, written by Daniel Suarez, which I think is a really good book. I’m almost halfway through it and it has started to get really thrilling. Since there is already a good introduction/summary on Wikipedia, I’m going to quote it here:

Daemon

Daemon, the first book, begins with the death of wealthy, legendary computer game designer Matthew Sobol. At the time of his death, he had a program running that was scanning obituaries on the Internet. That program, coupled with his death (due to cancer), sets in motion a series of other programs (daemon) that move money, recruit operatives, and even kill. Detective Peter Sebeck initially leads two murder investigations which reveal The Daemon. Sebeck and others try to combat this murderous technological construct in an increasingly complex and interconnected world. But Matthew Sobol already anticipated Sebeck’s actions and frames him for murder.

Source: http://en.wikipedia.org/wiki/Daemon_(novel)

Here you can read preview chapters of the book:
http://thedaemon.com/daemonpreview.html