Archive for the ‘Ubuntu Experience’ Category.

Lets Let APT-URL Install Repositories

APT-URL is one of my favorite programs. The great thing about it is I can keep a list of programs I like on a website and easily install all the program I like on a new box, or point someone new to Ubuntu to the website with all my favorite programs. The problem is that with the personal package archives, letting users run there own repositories on launchpad, and many great programs using there own repository’s you need to add them to your source.list file before you can use any of those great programs.

My solution, let APT-URL add a repository after giving a warning of course. Is this dangerous, sure it is but we can take a similar approach to this that Firefox does, only let trusted websites add to the source.list file. So on a trusted website like launchpad you would get a message like “launchpad.net is trying to add the following repository” compared to a random website that might say “wiki.earobinson.org is trying to add a repository if this is a trusted website please click yes otherwise click no”. This would add some risk but the benefit to the user is huge. Please support this idea by voting for it at the Ubuntu brainstorm.



Cheating At Nethack

I’m not really a gamer, I think this has to do with a lack of skill, its no fun playing Americas Army if you die in 30 seconds, and yes they have a Linux installer. One game that I do come back to every now and then is nethack, however just like Americas Army I still die every 30 seconds. My solution … cheat. I use two simple shell scripts (backup.sh and restore.sh) to cheat.

How to cheat

  1. Save backup.sh and restore.sh in /var/games
  2. Play nethack I use nethack-gnome
  3. When you get to a spot you want to save, save and exit <ctrl + s>
  4. Using a terminal navigate to /var/games and run sudo sh backup.sh
  5. Reload nethack and continue to play
  6. If you die or need to reload your save point exit nethack navigate to /var/games and run sudo sh restore.sh then run nethack again

backup.sh
[sourcecode language="jscript"]
rm -rf nethack.bak
cp -ra nethack nethack.bak
[/sourcecode]

restore.sh
[sourcecode language="jscript"]
rm -rf nethack
cp -ra nethack.bak nethack
[/sourcecode]

It would be really great if someone created a version of nethack-gnome with cheating built right in.

AptUrl – Why don’t we use it for the Ubuntu wiki?

I often recommend Ubuntu to people and recommend that they install programs like miro, and geany. Geany comes stock in the Ubuntu repositories and miro has great step-by-step install instruction for beginners, however as I make this post they currently have no official Gutsy support. When I recommend a program to a user I usually send them the command line install command sudo aptitude install geany as well as sending them instructions

Go to System, then Administration, then click Synaptic. From there you can search for geany and you should be able to double click the name then click install and Ubuntu will install geany for you.

In my mind both solutions extremely simple, but then I have been using Linux for a while now and am a computer geek. I was trying to set up ssh the other day for a friend and they where complaining to me about how on Windows they can just click the program the select run, I claimed that you could do the same thing in Ubuntu (with a deb file) but the claim was that the website (repository browser) was ugly, and well I cant really argue with that. Now that Geany is out I can go back to my friend with another solution and if they want to install Inkscape I can just say “here you go“.

The only downside is that currently adding a new repository is disabled, my two cents is that we should give the user a nice large warning then go ahead and add the new repository. Another anoying and easily fixed thing is that I was looking at the Ubuntu wiki for games yesterday and I thought “ohh I’ll add in some apt:// URLs so that users can just click to install games”, but currently the Ubuntu wiki doesn’t support apt:// URLs so I got them working on my own wiki, just to make sure that it was easy and started a list of my favorite applications.

I guess I really have 2 requests:

  1. Enable AptUrl to add third party repositories, I’m going to download the code eventually and take a look at this and post a deb file if I make one. But It would be great if someone beet me to it.
  2. Add support for apt:// URLs on the Ubuntu wiki.

Oh and thanks for such a great feature.

New Hackergotchi

In light of the fact that I am now bald, today I uploaded a new hackergotchi to the planet ubuntu bzr tree. Uploading the picture was easy, making the picture was a bit harder. This is my first time using GIMP 2.4.0-rc3 and it seems that the selection tools don’t work the same way that they used to. In the old gimp I was able to make a selection the drag that selection around in order to remove it. It would seem that in the new gimp the only way to remove a selection (That I my girlfriend, could figure out) is to cut (<ctrl>+x) that selection. On the other hand the fuzzy select still works great.

TIP: when using fuzzy select you can use the ctrl key to un-select things that you have selected.

All in all I would say the update was a success. I just wish I had had a larger source image, (The large scale version of my new hackergotchi is a bit jagged around the edges, stupid digital camera being broken).

Large Version

From Me

Small Version

From Me

On a side note it would be fun to make a web page linking all the planet ubuntu faces to there websites / launchpad IDs, any thoughts on this? (Update: it could be just like the gnome one unless we all ready have one?)

Also I have three midterms this week, wish me luck.

SUMming Up The Stats

I’m quite a fan of stats, checking my most viewed posts is a bit of an obsession of mine. On of my posts that continues to baffle me in how much activity it gets is my post about ubuntu root access. This post resulted in a friendly argument between me and a friend during class. At the time it was a quick and dirty post to try and prove to him that linux was far superior to windows (lol, j/k, only a friendly debate).

In response to that post so long ago I now want to post about SUM (Screenshots). SUM lets you control your boot settings, including your boot password, from a GUI. For anyone interested you can get SUM here, or if you use propensity you can import this .pa file.

SVN Error With Fix!

I have my own subversion repository, I use this to store my school work, personal data like my resume, and pretty much anything else I want to keep backups of or keep synced across all of my computers. The other day I was trying to do an svn up and I was getting the following error “Can’t find a temporary directory: Internal error“. With all my googling I found a lot of people that said that they had this error also but that the problem had fixed its self. This was no good for me since the posts I found seemed to be implying that the problem was on the side of the svn server, but since I ran my own svn server the problem was mine to fix.

Well it turns out that the problem was that my computer that runs the server had run out of space and the simple fix was to delete some old files I had. Just thought I would put this out there for anyone else having this problem.

Propensity – feedback wanted

I have been using ubuntu for quite some time, and I have ubuntu installed on 20+ computers at one time. I find myself always installing ubuntu on a different computer. One of the things that I always do is install some programs that don’t come stock with ubuntu like geany, or miro. At first I had a simple shell script that I ran that aptituded (lol) all the programs I wanted to install. But soon that was not enough because different computers had different uses and installing miro or gaim guifications on a work computer, or a computer that will be going back to a client is out of the question. Another thing I wanted was to updated the source.list file with new repositories cleanly. And so eventually that shell script involved into a python program.

I have spent a bit of my summer cleaning up that python program and the result is propensity (I looked for synonyms for aptitude) and now I figure its almost ready to be released into the public. I have uploaded both a deb file and the source to my website, and would love some feedback.

Some features that I would like to add before I release it are:

  • I would like propensity to generate a standalone shell script that could be used to standalone install the package
  • Icon
  • Splash screen
  • Ability to add your own programs and save them (so you can load them from a file at a later date) Thanks Ed
  • Documentation

To sum up you can get the deb file here, and the source here. Thanks for any feedback you have.

Update 01: I made a post to the ubuntu forums and posted a screenshot
Update 02: I have been dugg.
Update 03: Propensity has only been tested on feisty.

Linux live CD as a window recovery tool

As a computer geek one of the first things people say to me when learn that I’m a computer geek is “can you fix my computer”. Now depending on my mood or how exactly they asked, offering beer is always a good idea, I usually respond with “I don’t use windows, and haven’t used it in years”. But if your nice and its convenient for me sure Ill give it a shot.

The other day a friend of mines computer laptop had stopped booting, during the boot it would get the blue screen of death. She had all ready called IBM, she got her laptop before Lenovo bought the thinkpad name, who said the hard drive was most likely dead. Seeing as she had lost all her data I first scolded her for not creating proper backups, and then told her that if she brought her computer to me I would give it a shot at fixing it.

Popping a Ubuntu live cd into her computer and then plugging in an IPod we where able to recover most of the data on her computer. To me it seemed second nature to be able to run an operating system off a live cd in order to recover data, but to her it seemed foreign since windows would not boot she had assumed all was lost.

Is this really still the case for windows, what do you do if windows wont boot (and yes safe mode and the “IBM recovery button” would not boot)?

Disclamer: This is not a windows bash but is there no way to yank your data off the computer if it wont boot other than taking out the hard drive?

GraphThing and xchm

On of the best features that linux has in my opinion is synaptic, I have said this before and I will say it again. Why is synaptic so great? You can fire it up and search for any package you like and then with a few clicks install that program. I have recently had two great finds with synaptic, the first came in my algorithms class I was sitting at school doing some homework and one of my buddies asked me if I had a program to find a maximum flow of a graph. Simply by searching for “max flow” in synaptic I was able to find a program called GraphThing that lets you draw graphs and then run all sorts of simple algorithms on them like, max flow, minimum spanning tree, and may more. GraphThing dose have some faults however it is unable to have an edge to a node with capasity of 3 and an edge in the opsit direction with capasity 5 but it is a great application for starters. then a Funny thing is not moments later do we find some notes online but they are stored in chm format, once again I fire up synaptic this time I search for “chm” and moments later Im using xchm a great chm viewer.


What great programs have you found using synaptic?

Ubuntu root access.

One of the greatest features that Linux has to offer, is the ability to customize your version so that it works the way you like it. Being a computer science student I have many friends that run linux, and many running windows (most dual boot).

With some of my windows friends there is a bit of an on going war about who’s computer is better, IBM vs Dell, Windows vs Linux vs Mac, Ubuntu vs Fedora Firefox vs IE, Vista vs XP. The things to debate are endless, its mostly all in good fun but it can sometimes get heated. The great thing is that usually when someone finds a “flaw” with ubuntu I can fix it on the spot if I so chose. Common arguments are that the brown is ugly (I love the brow), all I need do is fire up beryl or compiz (gl desktop). And the argument is shutdown.

The other day it was pointed out to me that a “flaw” was that if ubuntu was booted into recovery mode that the user was then given root access without the need of a password. I know that /boot/grub/menu.lst controls grub so I open it up “sudo gedit /boot/grub/menu.lst” and search for the word “password” at line 28 I find

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command ‘lock’
# e.g. password topsecret
# password –md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecrete

I change it to

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command ‘lock’
# e.g. password topsecret
# password –md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
password topsecrete

Go down to the bottom of the file and change

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro single
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

to

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
lock
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=8fdab1e2-1453-4eb3-a8db-a14dbff447d0 ro single
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
lock
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Now not only can the user not access anything but my default boot option with using the very secure password, lol. While I don’t consider it a bug that the user could have gained access to the root before without a password I love how easy it is in Linux to prevent that kind of thing. Now all I need is to set my BIOS password so that the user cant boot of anything but the hard disk without a password.