Posting Source Code to WordPress.com

2007/09/12 6:07:14

The other day I tried to blog about the vte.terminal, and I had huge problems posting the source code. My problem was that despite how much I searched, and everything I tried, I could not keep the formatting and post the source code. The formatting was wrong when I used the <code> tags (The spaces where removed and in python that’s important).

It turns out that this was the most correct with the exception that befor you make your post you must go to Users then Your Profile and make sure “Use the visual rich editor when writing”
is unselected instead of


you are going to want to have

#This
#is an example
#of what your source code will look like
x = True
if x:
    print 'hello world'

The source for this post can be found here.


Propensity – feedback wanted

2007/09/02 4:37:08

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.


There has been a revolution! Democracy is now Miro!

2007/07/19 1:28:53

Democracy is now Miro, today I did my updates and was welcomed with the new Miro player, I must say I haven’t noticed any real changes, In fact they don’t even seem to list any real on there blog (just little things here and there), but the one thing I can say is the update was flawless and its great to see a for profit company coming out with great open source software people getting paid to make open source software.

Long live Miro!


GraphThing and xchm

2007/07/14 17:38:07

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.

2007/06/20 13:51:58

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.


My top 10 commands

2007/06/12 15:34:46

I thought it was nifty when Jorge Bernal did a My top 10 commands, so here are mine. Funny thing was that Jorge Bernal command did not work for me so I added on a few extra commands to make it work for me.

history | awk ‘{print $2}’ | awk ‘BEGIN {FS=”|”} {print $1}’|sort|uniq -c | sort -n | tail | sort -nr

Note: wordpress seems to be messing up the single and double quotes, you need to remove them and retype them in

Rank Times Searched Command Comment
10 5 ssh Remote login to my other computers.
9 9 geany Best IDE I have found.
8 9 history If I want to look at recent commands I have used.
7 12 xpdf Good pdf viewer.
6 15 python One of my favorite programing languages.
5 38 svn Subversion, great revision control for all my projects.
4 41 ./a1q3.py An assignment I was working on.
3 59 gnome-open Will open any file just as nautilus would have if you had double clicked the file.
2 127 cd Change directory.
1 150 ls List directory.

What are your top 10 commands?


Democracy 0.9.6 is out, but is it worth the upgrade?

2007/06/06 18:29:06

I wrote about Democracy a month ago, back then the biggest comment that I got was that Democracy wouldent work for them. Democracy just released version 0.9.6 today and in the release post they claimed to have fixed support for feisty. Now I have been running the stock version that comes in the Ubuntu repository’s and I must say it is a product that once you use it you will never go back. I love coming home and having all of my vlogs downloaded for me ready to watch, I just wish I could find more Ubuntu vlogs, if anyone can find some let please post a link in the comments. I’m quite adventurous when it comes to Ubuntu and I will install anything weather or not I think it will break my system. So I backed up my ~/.democracy folder added the democracy repository, they have a great tutorial by the way, to my sources.list and upgraded.

First thing that happens when you run democracy is that it will “upgrade” the storage system for all your subscribed vlogs, this is why I backed up my democracy folder, and then it seg faults.

earobinson@NaN:~$ democracyplayer
/usr/bin/democracyplayer:87: DeprecationWarning: The dbus_bindings module is deprecated and will go away soon.

dbus-python 0.80 provides only a partial emulation of the old
dbus_bindings, which was never meant to be public API.

Most uses of dbus_bindings are applications catching the exception
dbus.dbus_bindings.DBusException. You should use dbus.DBusException
instead (this is compatible with all dbus-python versions since 0.40.2).

If you need additional public API, please contact the maintainers via
.

import dbus_bindings
/var/lib/python-support/python2.5/dbus_bindings.py:5: DeprecationWarning: The dbus_bindings module is deprecated and will go away soon.

dbus-python 0.80 provides only a partial emulation of the old
dbus_bindings, which was never meant to be public API.

Most uses of dbus_bindings are applications catching the exception
dbus.dbus_bindings.DBusException. You should use dbus.DBusException
instead (this is compatible with all dbus-python versions since 0.40.2).

If you need additional public API, please contact the maintainers via
.

from dbus.dbus_bindings import *
INFO Starting up Democracy Player
INFO Version: 0.9.6
INFO Revision: unknown
INFO Loading preferences…
INFO Starting event loop thread
INFO Restoring database…
INFO Connecting to /home/earobinson/.democracy/sqlitedb
TIMING Database load slow: 0.463
INFO Recomputing filters…
INFO Spawning auto downloader…
INFO Displaying main frame…
WARNING Menu item action “CheckVersion” not implemented
WARNING Menu item action “FastForward” not implemented
WARNING Menu item action “Rewind” not implemented
WARNING Menu item action “UpVolume” not implemented
WARNING Menu item action “DownVolume” not implemented
WARNING Volume changed before videoDisplay created
WARNING Display updated before video display was created
INFO Creating video display…
INFO *** Launching Downloader Daemon ****
alsa
oss
pulseaudio
file
none
INFO loaded renderer ‘xinerenderer’
INFO Setting VolumeLevel to 1.0
TIMING gtkAsyncMethod: took too long: 1.483
Segmentation fault (core dumped)

This was what I had expected from a product that had gone since the 2 months without upgrading to support feisty. I posted in the comments about what happened hoping to warn users that this may break the version of democracy that they have installed.

What I did not expect was about an hour and a half later there is a response in the comments from Nicholas Reville, who i can only assume is a democracy employ, that says that they are working on it. Another two and a half hours later Ben (another democracy employ?) posts to say they have fixed the problem. The great part of this is that they had. All in all it took them about 4 hours to fix the problem and upload it to the democracy repository.

This makes me ask the question, is it worth the upgrade. The ubuntu MOTU, do a great job of ensuring that every package that makes it into the Ubuntu repository is a working and quality package. Not only did democracy leave the feisty version of democracy broken for months but they don’t seem to test that much before they release a new version, however they did release a fix quickly. The version of democracy in the Ubuntu repository was working for me (thanks to the ubuntu MOTU), but I love the bleeding edge.

I for one will upgrade to the new version of democracy, but I will do so knowing that in the future things may break and that I will keep a backup of both the install deb files and my ~/.democracy folder just in case things break again and they don’t provide an upgrade for another 2 months. What are you going to do?


Finite State Machine

2007/06/05 15:01:44

Part of my goal with this blog is to write about the Ubuntu experience, I’m still working on a wireless writeup but it keeps getting pushed back because everyone knows about Ubuntu wireless. I’m a student at the University of Toronto, and I’m currently taking CSC363 — Computability and Complexity. Anyways I’m doing my first assignment and the first question is to draw a finite state machine. My problem was that I would draw the finite state machine and the figure out that I missed some special case and have to re draw it. Getting frustrated I fired up synaptic and searched for (finite stat machine), synaptic returns four results but the one that catches my eye is graphviz, partly because it has the ubuntu logo beside it meaning its an officially supported package like gaim (anyone find a link to support this, I cant), and partly because of its decryption “rich set of graph drawing tools”. I install it and it all goes well, and then i do what I always do after I install a program, I run it.

I type “graphviz” into the terminal and nothing happens. Well thats weird usualy I can just run programs based off the names I installed them with. I go back to synaptic and check that its installed correctly which it is. So skip to the bottom of the description below and it turns out that graphviz website, all the time that I’m doing this my buddy is sitting beside me trying to find a windows program to draw finite state machines.

Heading over to the website it turns out that they have some great examples of finite state machines and the “source code” that was used to make them. It is at about this time that my buddy finds JFLAP and starts to download it, you have to fill out a bunch of information before you can. A bit more searching on that website and I learn that I can “compile” that source code code to a png image with the following command “ccomps -x fsm.dot | dot | gvpack | neato -s -n2 -Tpng > fsm.png”

Now as a side note the nifty thing is that JFLAP (the program my buddy found) is a jar file so we should be able to run it on linux, while I continued to use graphviz to do my assignment because I liked to type up the finite state machine and then compile it, if you want to test your finite state machine you may want to look into using JFLAP.

After I get my assignment back Ill post my finite state machine and its source if there is interest.


Any press is good press?

2007/05/30 1:43:33

When the pale blue “Linux car,” also known as car #77 from Chastain Motorsports, was the first car to crash in the 91st Indianapolis 500 on Sunday, we can imagine hordes of geeks wishing it had been a “Vista car” instead. Imagine the “blue screen of death” jokes that could have resulted!

http://news.com.com/8301-10784_3-9723221-7.html

Hey at least we are getting the linux name out, I’m sure no can name (without google) the car that came 72nd


Top 10 Ubuntu Forum Feature Requests

2007/05/17 20:29:38

Those of you who know me know I frequent the ubuntu forums quite a lot. As a result I get to see all the things that users are having trouble with as well as all of the new feature requests. These are my top ten ubuntu forum feature requests. As a disclaimer I’m not sure about how feasible all of these ideas are, and I’m also not going to include things like, lets have better divers for X, because that will always be in my top 10. What I am going to post is features that I think could be included for gusty or even gusty +1.

10. [IDEA] Nautilus “Restore from Trash” – This is a very well laid out request while I wouldn’t use it, I’m not even sure that many users, and it would give Ubuntu that extra polish.

9. [IDEA] Modify the installer so that it asks for Timezone instead of City. – Maybe not modify but at least have an option to list a timezone instead of picking the nearest city.

8. [IDEA] Reliable Kill for Fullscreen Applications – Now I know that there are ways to do this, and they where suggested in the thread. But I think what this really brings up is that ubuntu should ship with an easy way to access the System Monitor, I suggest ctrl + alt + delete

7. [IDEA] Auto removal of old kernels - I often hear users saying “why do I have 3 versions of Ubuntu installed on my computer” now while I think its a really bad idea to auto remove old kernels maybe pop up a message that notifies the users that extra kernels have been detected asking them if they want to remove any of the old ones (Personally I always keep two kernels, the current one and the previous one just in case anything goes wrong). It would be best if this program asked the user after the next boot so that they could make sure everything works.

6. [IDEA] Bring back screensaver settings - The new default screen saver configuration gui for Ubuntu wont let you change your screen saver settings. Users don’t want GLText to say the computer name and its Linux version they want to be able to customize it to say “Ubuntu rocks”

5. [IDEA]: Warning about disk being full – Another very common problem users seem to have is that they fill up there disk, and so they can log into gnome now I’m pretty sure that gnome now gives a more friendly error before it logs you out, but a lot of users have beryl installed so they are unable to see this error. Also its a bit late to warn the user after the disk is full don’t you think. It would be great if users could be warned, before the disk was full.

4. [IDEA] External Monitor Support – I’m pretty sure I have seen programs that do this, but a nice little gnome applet would be perfect.

3. [idea] Fix the delay when searching in Synaptic – It is very easy on the ubuntu forums to find someone looking for package X, I’m sure I have answered hundreds of these questions in the past. When I get a question like this I usually fire up synaptic (actually most of the time it sits open in my task bar) and I search for key words, or if I’m pretty sure I know the program name I search for the program name. Synaptic search is a bit slow, now I know that there are 21382 packages in my repository at the time of this post but still, I can search my music, around 6000 songs, faster than that. I’m not sure if its possible to include this feature but its one that I would love to see.

2. [IDEA] Graphical Frontend for xorgconfig (dpkg-reconfigure xserver-xorg) – I’m pretty sure that this one is in the works, in fact I was even going to point it out to the guy who posted the thread but some one beat me to it. This is one of the biggest problems that users seem to have is configuring there displays, and I must say after installing the propitiatory nvidia drivers I haven’t looked back at all since I’m now able to configure my box with the nvidia-settings tool.

1. Allow Us To Vote (like ideastorm, digg, etc.) On Ideas Here. – To me this would be a great way to connect the developers to the users. Now I know the problem is that a lot of features would get suggested that could not be done for whatever reason. So I suggested having a little vote for this idea button, kind of like the thanks button this would would at least let the forum ambassadors know what the users want so they could let developers know.

These are all just features that I have found while browsing the forums and I know that there are better ways to suggest features, I just thought it would be fun to keep a list of what users where asking for.


Follow

Get every new post delivered to your Inbox.