'Linux' Archive

I Like to Watch

January 24th, 2009

In the category of lovely commands you may not know about, the watch command. You can take almost any command and throw watch in front and it will recurse for you. A quick example: You’re copying or ftping a large amount of files into /tmp directory and you want to keep an eye on the progress. Let’s say you’re also interested in file details so this will give you a snapshot:

ls -lh /tmp

To keep an eye on it, just prefix with watch:

watch ls -lh /tmp

Default is to rerun every 2 seconds which is a bit much for this. The following will run every 30 seconds allowing me to keep a watch on progress:

watch -n 30 ls -lh /tmp

ubuntu, ATI and two monitors

October 8th, 2008

Working on an open source OS can be empowering. Most everything you’d like to do has a relatively simple solution with a common sense approach….IF you can find it. The challenge isn’t about having the freedom of possible solutions, it’s about being able to find, interpret, and judge a multitude of possible solutions in order to determine what the best solution is to a problem you’re experiencing.

A recent example? I’ve always ran 2 monitors on my desktop at home using an nVidia card which is notorious for offering better support to linux based systems. My new office desktop shipped with an ATI card. If you read enough, you could easily find yourself buying a new nVidia based card to solve this one. I strayed for a while on overly complex solutions, installing multiple packages from source etc, until finally landing on a one line solution.

“aticonfig –dtop=horizontal”

With that I have both monitors running beside each other as a single desktop. Simple but unusually complicated to find.

Pushin and Poppin

July 20th, 2008

Related to super cd, if you don’t already know about pushd and popd then read up as they’re helpful as well…

“The pushd command saves the current working directory in memory so it can be returned to at any time, optionally changing to a new directory. The popd command returns to the path at the top of the directory stack.”

If you end up using these commands then I highly recommend this tip.

Super cd

July 20th, 2008

I pitched the idea a while back to a friend for a super cd. The idea being to add a means of easily creating, managing, and using shortcuts to directories you often use. I currently handle this by creating aliases in my .bashrc like this one:

alias cddir=”cd /home/some/directory/used/a/lot”

It’s a pain, however, to manage them, recall what I named one, delete old ones etc. So my thought was to build a python program to wrap cd. You could then use some special syntax like hashing to reference shortcuts. So typing “cd #dir” would move you into the directory you saved under shortcut “dir”. If super cd didn’t feel the command was meant for it then it would simply pass the request down to the base cd.

While sitting here in Vancouver sipping a tasty americano, I finally got around to some searching to figure out how I could change directories in a shell by calling into a python script. Not quite as simple as it first seems. In searching for that I not only found the answer but I found almost the exact tool I was about to write. Adding to the weirdness is the fact it appears to be written by a guy here in Vancouver.

If you use a shell, try go. While not exactly what I had planned, it allows you to type “go -a dir” to add the current directory. Then type “go dir” at any point later to change back to that directory. I like…

Painless Upgrade

April 26th, 2008

A new ubuntu release, hardy heron, is out, lifehacker review.

synaptic1.pngI know I’ve said this before but synaptic, and apt-get, is the coolest piece of software I’ve come across in years. Finding, installing and maintaining software is a magnitude simpler on ubuntu than any other os. An example is this recent release. I’m about to download, install etc with one click of a button while on a wireless network. A dream.

gnome-do stuff

April 14th, 2008

I have a new favourite, and one of my most used, applications. First, a quick history. I don’t like using a mouse and I don’t like menus, especially start menus. To avoid start menus I used to start most apps from a shell by creating a multitude of alias that I’d have to remember.

After that I moved onto using katapult which was better but flaky, likely because it was built for kde not gnome.

After that I moved onto deskbar-applet which I still use a bit today. I believe it comes on the ubuntu base install so you usually have it from the start.

I’m now using gnome-do for all this and it’s the slickest one yet…

“GNOME Do allows you to quickly search for many items present in your GNOME desktop environment (applications, Evolution contacts, Firefox bookmarks, files, artists and albums in Rhythmbox, Pidgin buddies) and perform commonly used actions on those objects (Run, Open, Email, Chat, Play, etc.).”

It’s inspired by, which all the above are, Quicksilver. Gnome-do has done the best of them all. If you’re on a linux OS and haven’t yet, give it a try.

Epiphany II

March 3rd, 2008

SOLD! One of the few reasons I’ve jumped to my vmware windows instance over the past few months has been to watch tsn highlights. The have a new slick looking beta video player that gives me nothing but “Sorry, there was an error
We are experiencing temporary difficulties downloading your lineup. Please wait another few seconds then try again. Thanks for your patience.”

I expected nothing but the same from epiphany but gave it a shot anyway and it works!! Finally, hockey highlights at my finger tips. I’m guessing this is somehow related to being a tighter integration with gnome? It’s a tricky balance. On one hand, it makes sense to build something like firefox to work across platforms but in other cases I just want something that works on my machine and I don’t care how tightly coupled it is.

New Browser Epiphany

March 3rd, 2008

I’m starting to figure out that I’m flighty when it comes to browsers. I just installed and started playing with epiphany

“Welcome to the Epiphany wiki! Epiphany is the easy-to-use GNOME web browser. With Epiphany, you can Search by typing in the location bar and organize Bookmarks by category. Its clean Preferences window makes finding and changing useful options a breeze.”

So far I really like it. It’s just simpler and works better which is a rare combination in software. I was able to immediately integrate my delicious bookmarks and through the location field only I’m able to quickly navigate my bookmarks, search the web, goto a url etc. Currently in firefox I needed two fields, location bar and search box, to accomplish that.

This part’s cool if you like python. One extension is a python console that allows you to start messing with the browser itself through the epiphany api. There’s an example here that has you editing the browser title bar, browsing to a page, etc in one liners.

Linux Blogging Client

November 1st, 2007

This entry was posted using the gnome based blogging client Drivel. More details here.

Why bother with a blogging client? The main reason for me is drafting posts offline and then being able to easily post them. Typically I write up basic txt files for that purpose, however, that means I have to copy, paste, and edit when I want to actually post. With drivel I can save locally and then post anytime I’m connected.

Just to test it out, this is me editing this existing post with drivel. I was going to add that drivel is clean and simple which are attributes I like in my software. Another nice feature is that if you post to multiple blogs running on varied blog engines then you have a consistent interface for posting.

Linux on a stick

November 1st, 2007

I arrived at my sister’s in LA yesterday. Due to how silly cheap it was to ship it to a US address, I had my new thinkpad x61 shipped to her place. I cracked it open last night. The x61 is one of the smallest, lightest laptops you’ll find these days. In order to achieve those attributes they abandoned an optical drive. Without a DVD drive, how to you ditch vista and install ubuntu?

The answer was alarming painless to pull off. You follow these instructions and create a bootable USB flash drive with the latest version of ubuntu on it. Yes, this is a nerd post so move on or be prepared.

Maybe I’m new to this but this is cool. I now have a 2GB USB drive with a complete live version of ubuntu that can save it’s state. What’s that mean? It means I can plug that into any pc with a USB port and a BIOS that can boot from USB, restart, and I’m up and running in a full instance of linux running on that flash drive.

The one thing I did differently from those instructions is that I didn’t have a cd copy of ubuntu. Instead I simply downloaded the ISO, extracted it locally and copied the files from there.

Why would you ever do that? Well in my case it allowed me to click the install icon and install ubuntu without a DVD drive. Other things? Get in and retrieve data off corrupt OS’s before you blow them away. Allow people to test drive linux on their machines.

Will I ever make use of this? Actually I have no idea. It’s still cool that you can even do it. Maybe something to demo at the next DemoCampGuelph?