Java plugin in Firefox under Ubuntu 9.04
April 15th, 2009
I needed to install a Java plugin for Firefox under Ubuntu 9.04 (beta). This didn’t happen by itself when I installed sun-java6-plugin, but a quick search showed me what Eirik Hoem found out a year ago.
Or, as Karl Trygve said in a comment; messing about in /usr is usually not a good idea
- the link could be made in /usr/lib/firefox-3.0/plugins, and the plugin would then be available for all users on the computer.
Linking the java plugin to Firefox (paths might vary a bit, depending on Java versions):
cd ~/.mozilla/firefox/.default/plugins
sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so
I didn’t have Icedtea installed, but I do use OpenJDK for development. Works now, at least.
Skype on Acer Aspire One
January 8th, 2009
Yesterday I installed Skype on my Acer Aspire One. I did it on the Linpus Lite Distro, and it was quick and painless. Everything I had read up until yesterday had prepared me for a difficult and time consuming task. I set at it with grim persistence, though - I needed Skype, and my desktop is crashing every one or two hours now.
With a bit more research it all looked brighter. It seems as if Linpus is built on Fedora (6?), and then I could at least use the rpm (package) from skype.com. There still was a few troubling hints that I had to download it and install with yam - getting every prerequisite package before I could get it installed.
Reality was even easier than I had guessed, and about as easy as I could hope. I located the terminal and changed the root password, fixing a system menu to the right mouse button, as described by Laptop Magazine. After that I downloaded the rpm package from the net - and it opened by default in the package manager. A few ok
’s later, and it had installed all dependencies and skype itself.
I’m still planning on getting easy peasy installed on it later, but I guess I’ll wait until I got time, money and inspiration to get more memory, a SD card and a bigger battery pack for it. Then I probably got a < 1.0 kg computer with almost as much processing power as my aging desktop…
Tag, you got it.
January 5th, 2009
As you might have noticed; I’ve got a tag cloud in my sidebar. And there were no tags under the entries, and none on the single post page. That is because, as with the widgets, this is an old theme - from when the dinosaurs roamed the earth and whatnot. And tagging wasn’t in Wordpress core.
I’ve quickly added the tags as a new line below the post’s category, setting a class to the span for markup, wrapping it in a div for that new line business. The change is to insert the three last lines below into index.php
(lines 21 through 23). This fixes both the index page and the single post view, as there’s no specific markup code for single posts, pages or archives. I’ll add some beautifying code for this later, and individual templates for my own theme modification.
17 18 19 20 21 22 23 | <div class="postinfo">
<span class="postedby">Posted by <?php the_author() ?></span>
<span class="filedto">Filed in <?php the_category(', ') ?> <?php edit_post_link('Edit', ' | ', ''); ?></span>
</div>
<div class="postinfo">
<span class="tagged">Tagged <?php the_tags('', ', ') ?></span>
</div> |
In addition, we need to add some css to style up the tags listing with an icon as the other post info. I chose the page_component.gif
image from the same icon series as Simpla uses; the Minis from Famfamfam. Put it in the /images/
folder in your theme’s folder and add the following code to styles.css
:
121 122 123 124 125 | .tagged{ background:#fff url(./images/page_component.gif) no-repeat; padding:3px; padding-left:20px; } |
You can probably see that the style information of the last couple of entries in styles.css
are very much alike? Just the file names are different. I get an urge to extract the redundant information as a separate style class, like below, and let each line with an icon get marked with two classes. This makes the file look like this from line 106:
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | .icon{ padding:3px; padding-left:20px; } .postedby{ background:#fff url(./images/user.gif) no-repeat; } .filedto{ background:#fff url(./images/post.gif) no-repeat; } .commentslink{ background:#fff url(./images/packaged.gif) no-repeat; } .tagged{ background:#fff url(./images/page_component.gif) no-repeat; } |
I must now change each line with one of the above class descriptions and add icon
. This is easy, as they are collected together in the index.php
file. And if nothing else; it saves a tiny bit on bandwidth. Not that it is optimized for it. The programmer in me like to pull out shared information.
From my last change this will now look like this:
16 17 18 19 20 21 22 23 24 25 | <div class="entrymeta">
<div class="postinfo">
<span class="icon postedby">Posted by <?php the_author() ?></span>
<span class="icon filedto">Filed in <?php the_category(', ') ?> <?php edit_post_link('Edit', ' | ', ''); ?></span>
</div>
<div class="postinfo">
<span class="icon tagged">Tagged <?php the_tags('', ', ') ?></span>
</div>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »', 'icon commentslink'); ?>
</div> |
Find all four icon
additions? The last is at the end of the comments_popup_link
thingey. Great! I also downloaded page_package.gif
, page_tick.gif
and page_cross.gif
for marking of todo lists as I was picking out the tags icon. That is something not directly connected to upgrading Simpla - and perhaps I should find or make a plugin for it. But it’s for another post.
Agree or disagree on method, markup, choice of icon or anything? Speak up, I’d love to hear.
Making a hole in the sidebar
January 5th, 2009
The next step is fixing the sidebar. As this is a pretty old theme, the sidebar is rather statically set up. It links your pages, categories and links. Nowadays these Widgets are all the rage - and it isn’t hard to set up support for them in an old theme either.
First we’ll make the sidebar accept widgets. The easy, and right, way is to wrap the old sidebar in a condition saying it should be displayed if there is no support for widgets. Do it like this; insert line 2 and 15, making the code look like below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <div id="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <h2>Pages</h2> <ul> <li><a href="<?php echo get_settings('home'); ?>/">Home</a></li> <?php wp_list_pages('title_li='); ?> </ul> <h2>Categories</h2> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> <ul> <?php get_links_list(); ?> </ul> <?php endif; ?> </div> |
Here we could have made the container around sidebar into an unordered list (ul), but that would mean we’d have to have a look at the css to get things to display correctly. So instead we must do a small fix in functions.php
. Instead of using register_sidebars
we’ll use register_sidebar
(plural vs. singular) with some parameters.
Since the functions.php
to register dynamic sidebars in doesn’t exist, we’ll have to create it. Put it in the theme’s folder, and make it contain the following code. Be careful; no space or newlines before or after the lines of code:
1 2 3 4 | <?php if ( function_exists('register_sidebar') ) register_sidebar(array('before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>')); ?> |
The before and after_widget parameters wraps each widget in a div. This wouldn’t be necessary if the dynamic sidebar call was issued from inside an unordered list (ul), as the default values produces list elements (li).
Now the only task left is to go into the widget page (in the blog administration) and add what you want. I suggest Pages, Categories and Links if you want to keep the feel of Simpla, as it were. Keep tuned for more.
Anything you want to add, ask or tell? Feel free.
First steps
January 4th, 2009
I’ve begun making some small changes to the Simpla Theme, in order to get something looking *just* like I want. I’ll share my changes, and also the code if somebody asks for it. For now this is filed as work in progress. And there will be progress.
Here are the things I did to change the theme as it looks now (2009-01-04T20:59:12+01:00). Increase / change font size and screen real estate. Flip the sidebar to the left. Fix logout from near comment field. I’d love to hear if you like / dislike the changes.
Change font size
First order of business is to increase the text size, because I’ve seen what it helps on some devices. The code changes are from:
13 14 15 16 17 18 19 20 21 22 23 | body{ background:#fff url(./images/bg.png) repeat-x; border-top:5px solid #333; color:#555; font-family: Georgia, "Times New Roman", Times, serif; font-size:62.5%; line-height:1.5; margin:0; padding:0; text-align:center; } |
Change relevant line to the following:
18 | font-size:12pt; |
Then remove lines 30 and 36 from the following block:
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #wrap{ margin:0 auto; text-align:left; width:76em; } content{ font-size:1.2em; float:left; padding:1em; width:40em; } #sidebar{ font-size:1.1em; float:right; padding-top:2em; width:20em; } |
That is, these line should be removed:
30 | font-size:1.2em; |
36 | font-size:1.1em; |
These font-size changes means that we have to redistribute a bit of space in the content area. Change line 24, 33 and 39 from above to the following:
24 | max-width:80em; |
33 | width:70%; |
39 | width:25%; |
Flip sidebar to the left hand side
Next step is to flip the sidebar to the left hand side, just because I can. Change line 30 (or 31 if you didn’t change the font-size like above from the first block of code) to the next line:
29 30 31 32 33 | #content{ float:left; padding:1em; width:70%; } |
30 | float:right; |
Minor fixes needed for Wordpress 2.7
Logout link in comment.php
needed updating because of the new security measures in Wordpress. If this isn’t done, you won’t be able to log out from the link beside the comment field. Find and replace first block of code with the second block of code:
76 | <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p> |
76 | <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p> |
I got 1-up’d
December 31st, 2008

Or something like that. For once someone told me to look it up on Google
. It was a Linux query, and since I’m not that knowledgeable on Linux, I deferred it to my brother. He asked me if he should shuffle me away from the computer, or if I would look it up on Google myself.
My error message was something in the neighbourhood of this (source):
* Starting System Tools Backends system-tools-backends invoke-rc.d: initscript system-tools-backends, action “start” failed.
dpkg: error processing system-tools-backends (–configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
system-tools-backends
E: Sub-process /usr/bin/dpkg returned an error code (1)
and the fix is (source):
***TEMPORARY WORKAROUND***
After the upgrade has failed, you will get an error every time you run dpkg or apt-get saying that system-tools-backends is not configured. “sudo dpkg –configure -a” will not fix this. To recover, please perform the following 2 steps:1) sudo invoke-rc.d system-tools-backends stop
2) sudo dpkg –configure -a
It seems like the problem is with installing while switching users. Now fixed. Yay!
Wireless trouble in Ubuntu
December 30th, 2008

I’ve been doing something that I should have been doing a long time ago. As I haven’t been using my desktop much since my last hard disk crash, it has sported only a Windows XP install. Yesterday I set down to install Ubuntu on it; completing another backup, clearing space and getting the actual iso image written to a CD. Everything went a-OK up to and including the install.
Now, getting on teh intrawebz was a bit harder. After setting the wireless up nicely in the graphical network manager and then turning it on a few times, I suddenly noticed that there was no wireless card installed. Which kind of explained why I didn’t connect to my router. Selecting troubleshooting from the Help prompted me to install ndisgtk
from the Synaptic Package Manager. Where I couldn’t find it. Which was fixed by inserting the Ubuntu CD again, and adding it to the package repositories from within the package manager.
Now the troubles began. I was prompted to install a Windows driver ( a *.inf
file ) for the card. Checking up what was installed in Windows I found an oem driver - which didn’t work under Ubuntu, probably because it was filled with different values and references to packaged files residing elsewhere and on Windows CD’s. Next I went to the manufacturer’s webpage and downloaded what turned out to be the wrong driver. Which installed, but didn’t find the hardware. Now I dug into Howto documents and man pages. They pointed me in direction of the NDISwrapper compatibility list. Which doesn’t exist any more, and when I dug up a more or less recent version on archive.org it didn’t contain my card.
The fix was easy. I just had to get the correct driver from the manufacturer - or rather from the people who branded the hardware. My card is a Jensen Wireless High Speed USB
dongle. Running lsusb
yielded:
Bus 001 Device 002: ID 1435:0210 Wistron NeWeb
for my card. This card can be used through ndiswrapper with the driver downloadable from Jensen Scandinavia.
iTunes stole my podcasts
August 7th, 2008
Starting my computer to sync my iPod this morning brought on instant Apple hatred. iTunes told me that my iTunes Library were damaged, and just like that my podcast subscriptions were gone. Pffft - not there any more.
I then vented at twitter, being rewarded by someone else having that same problem. iTunes complaining about library file on Windows, and podcast subscriptions being lost.
With a flash of insight and a bit of luck, I browsed to where my iTunes library file were located. Taking backup of the new (empty) file, I renamed the one marked with (Damaged)
back to it’s original name, and it all looked just like before when I restarted iTunes.
The files was located in the My Music/iTunes
folder - actually /Users/MYNAME/Music/iTunes/
on Vista. The relevant file is the one named something with (Damaged)
. don’t blame me if it doesn’t work. Backup the defunct file first.
Still, I am more and more inclined to try and get my iPod updated without iTunes. Next time, perhaps.
Twitterdemics - my network grows
July 9th, 2008
When I started using twitter for real, I set out to follow a small group, only following back if I deemed other persons interesting enough to read. This worked out rather nicely, I followed a few people, tweeted a bit, got a few followers and it got going.
I’m still not sure if I say anything that is interesting, but at least I don’t say enough stupid stuff making people remove me again.
Anyway. I muddle about, blocking the occasional spammer, following back someone who inadvertently follows me… (there is a fine line between modesty and depression induced paranoia). I’m suddenly above 20 followers and 20 I follow. Then something happens. People I follow reply to someone I cannot see. Or rather, to someone I don’t follow. I take a quick look, and follow them. They follow back…
The snowball has started rolling. It is an epidemic! A Twitterdemic! Even being careful about following and followers, I find myself passing 30, 50 and even 70 followers and foll.. fr… subscriptions! Will it ever end? If everyone else (for smaller values of everyone
) are doing this, we’ll end up with a big ball… a metagroup of twitterers - each of who has a small number of strings out in the twitterverse.
Or perhaps it will all collapse like a house of cards?
Firefox not really default browser in Vista
May 21st, 2008
I installed twhirl, to give it a twirl with twitter.
First issue was that URLs opened in Internet Explorer, instead of in Firefox. A bit searching lead me to throk.net for a possible solution, but Mozilla Firefox doesn’t show up under Set Program Access and Computer Defaults
. It was mentioned that Flock doesn’t show up either, but Firefox 3 does.
Next try brought me to CNET’s Forums, where it was pointed out that IE still holds some file associations (*.url
for one). Before I tried to mess around with that, I tried the suggestion of one LinuxDude
; executing the following command from the Run dialog (Win key + R): firefox.exe -silent -setDefaultBrowser
This worked, but I can’t see any changes in Default Programs
. I haven’t restarted yet, though.








