Etch from scratch – Xfce shutdown

The tie it up and lock it all down as a default approach is sometimes very frustrating. Having logged in to an Xfce session, when I came to shut down my computer, I can’t do this from within my log in as the button is greyed out. Not that I have ever needed to use it, but so is the ‘Restart’ button.

The Xfce – Session Manager documentation on my computer says that you have to be listed in the systems Sudoers file to execute the ${libexecdir}/xfsm-shutdown-helper command as user root. This is /usr/sbin/xfsm-shutdown-helper on my Debian GNU/Linux (Etch) system so I became root, ran the visudo command and added the line as per the example:

dilettante poppy=/usr/sbin/xfsm-shutdown-helper

where dilettante is my username and poppy the hostname.

It didn’t work.

Reading the Sudoers Manual, I read about the NOPASSWD tag value, so I edited the line that I added previously to:

dilettante poppy = NOPASSWD: /usr/sbin/sfsm-shutdown-helper

And it worked!

However, my computer is not exactly a PC, i.e. a personal computer. H ‘sometimes’ gets to use it 🙂 I could add H as a user to the Sudoers file, but a more inclusive solution was to use what Cameron set up for the Computer Angels Sarge system which H kindly implemented for me.

So that all (two of us) users can shut down poppy, Sudoers now includes:

User_Alias XFCE_SHUTDOWN_USERS = ALL
Cmnd_Alias XFCE_SHUTDOWN_COMMAND = /usr/sbin/xfsm-shutdown-helper
XFCE_SHUTDOWN_USERS ALL = NOPASSWD: XFCE_SHUTDOWN_COMMAND

Albeit slower, I guess choosing ‘Shut Down’ from the ‘End Session’ dialog is a more elegant exit than poweroff in a root terminal.

out of the bag

According to the smh.com.au article Plastic bags join the endangered list, Australia uses 4 billion plastic bags a year and China uses as many bags in 48 hours.

Levy or ban? I think just ban them.

Since 2005, we have been using shopping bags that we can use and shove in the washing machine, and re-use. Yes, the conference bags that we got at Linux.conf.au 2005 are the most used and long lasting than any bags that we have obtained at conference.

Note: The article states “The energy consumed in the life cycle of a plastic bag is estimated to be equivalent to 13.8 millilitres of crude oil, or about a teaspoonful.” I think this must be a typo. I’ve always thought that a teaspoon is equivalent to approximately 5 ml, and a tablespoon to 15 ml.

Etch from scratch – Java

There have been a few web sites, that I quickly move on from as they require Java. They have just not been important or enough of them for me to install Java – until today.

I received a notice that the Australian Science Media Centre were hosting an online briefing on biofuels. In order to participate, I needed Java.

Well, I installed Java, but not in time to participate in the briefing. But this will be available to download and listen to later if I’m still so inclined.

I guess if I really wanted to listen to the briefing live, I could have just installed the version (Java Sun JRE 5.0) that is available in the Debian stable repository.

I’ve already got a bit of a mess on my Debian Etch system having not used the package manager to install Adobe Acrobat Reader and Flash, so I was not about to go down that route with Java. But I learnt that Sun JRE 6.0 was available, and I could get it from the unstable repository. And my reading and learning did not stop there.

Having started reading Installing Java on Debian and then Getting Sun Java 6 On Debian 4.0 With APT Pinning on Weiqi Gao’s Observations, I got distracted reading about APT pining and Feta.

A morning later, I mostly followed Weiqi Gao’s Observations to install Java Sun JRE 6.0 (and the rest), and began to learn about APT pining and play with Feta.

The only thing that I would add to this, is that to get the plugin to work with Iceweasel, I needed to create a sym link in my .Mozilla directory to /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so as per mozdev.org‘s PluginDoc.

The successful installation of Java has been confirmed using Java.com, entering ‘about:plugins’ in the Iceweasel Location Bar, and wiggling a molecule.

OpenCD to OpenDisc

I have only scanned the discussions on the forums and I’m pleased to see that OpenDisc has returned to being a CD of open source software for Windows and does not include Ubuntu. Previously, many of the people that took TheOpenCD from me were very confused as to what constitutes an operating system and whether they needed the Ubuntu ‘program’ to try any of the listed software included on the CD.

The difference a couple of days makes.

I prepared material for the ‘Creating a Web Site Using Nvu’ practical session presented on a Tuesday including the CD image (TheOpenCD SFD2007 Edition 2) that was prepared for Software Freedom Day 2007 from SourceForge.

On the Thursday, Chris Gray posted in his blog about stepping down from being the sole developer and caretaker of the OpenCD project to launch the OpenDisc project. This probably goes some way to explain why I found it so difficult to locate and obtain the ISO for the most recent ‘TheOpenCD’.

However, it will be a small thing to update my notes to refer people to http://www.opendisc.com. The web site is welcoming and very easy to navigate to enable you to download OpenDisc, setup notifications for new releases, satisfy your curiosity with about, faq, news and program list pages, and forums. The project web site invites you to comment, participate and contact the project members and other contributors.

Also, it is likely that KompZer will replace Nvu on the OpenDisc in the near future so I will need to update my tutorial material when the time comes to present the practical session again.

A CD that includes only open source software for Windows will make it much easier to distribute, and still provide an introduction to open source and free software, including GNU/Linux.

Etch from scratch – Nvu

Discovered today that Nvu is not part of Debian Etch. Having found a tutorial that said to get it (for Etch) from Debian Backports. I paused – for a moment, or two, or three.

Debian Backports is for programmes that have been backported from Debian testing, or so I thought. So if Nvu is listed as N/A in Etch and 1.0final-0bpo1 in Sarge. What does this mean?

I decided to take the plunge. Downloaded nvu_1.0final-0bpo1_i386.deb anyway, became root, and used dpkg to install:

dpkg -i nvu_1.0final-0bpo1_i386.deb

Nvu was correctly added to my Xfce Apps under the Net menu.

Phew.

Now to check Nvu on the Windows box. I installed it ages ago, it might of even be years. This was confirmed by noting that the version was 0.6.

Downloaded the Nvu Windows version 1.0 from Download.com, double-clicked the icon on the Desktop, and followed the prompts to install Nvu where I wanted and selected how I wanted to run the programme. Note: I didn’t like the Download.com web site, as they have lots and lots of ads that were not blocked by my browser and continued to flash and be distracting.

More phew.

Fortunately, Nvu on the Windows box has a similar look and feel to that on the Linux box.

I have been assured that installing Nvu on Mac OS X is a “simple download-open-drag and drop into the Applications folder procedure”. Having never installed anything on a Mac before, I’m crossing my fingers and toes that this is indeed the case.

If you are wondering why I need Nvu on Linux, Windows, and Mac, it is because I am conducting a tutorial on how to create web pages. In addition, I am more familiar with using Nvu (and drafting the handout) on my Linux box, the majority of the students use Windows, and the tutorial is to be conduced in a Mac studio (what they call the computer lab that has Macs).

Etch from scratch – upgrade

How much notification do you need before you upgrade your Debian system? Or, more specifically, certain packages on your Debian Etch system?

I subscribe to a number of newsletters and email announcement lists, and regularly read that various packages have new versions, or a security patch may have been made available. But what happens is that I make a mental note to upgrade my system, and it does not happen straight away or on any regular basis.

H has installed the Update Notifier, so he is reminded every time he logs on. If I am in the room, I get reminded too 🙂

I feel that I do need to take more care and act when I receive notification. But if everything is working, I am reluctant to twiddle with the computer system even though my past experience in upgrading packages has been positive. I keep a log of any changes made to my system, so it is not as if as I am relying on external sources to keep track. And H knows, that if he needs resources on my machine he can as long as he also records any changes in this log.

It really is easy to become root, and type:

apt-get update

followed by:

apt-get upgrade

So, I’m not sure why I can’t and don’t do it more regularly.

Since I installed Etch, any instance of apt-get upgrade has held back what appears to be mostly OpenOffice.org packages. For example, today thirteen packages were held back:

linux-image-2.6-486 openoffice.org openoffice.org-base openoffice.org-calc openoffice.org-core openoffice.org-draw openoffice.org-gcj
openoffice.org-gtk openoffice.org-impress openoffice.org-java-common openoffice.org-math openoffice.org-writer python-uno

The list was never as long as this – it has grown. Instead of running apt-get update and apt-get upgrade periodically hoping that it will resolve itself, I’m wondering whether I should do something else?

I recognise that all the above packages are related to OpenOffice.org except for linux-image-2.6-486.

Instructions at Debian Managing Packages are relatively straight forward, but they do not allow (and cannot allow) for all the different versions of packages and security updates. I may just have to follow the recipe for investigating why OpenOffice.org packages are held back.

The good news is, the X.org packages that were upgraded today have fixed the graphical system crashing when the login screen is displayed and I wiggle my mouse. I had forgotten about this problem as I have been avoiding visiting the graphical login screen and using poweroff. But it’s nice for it to be fixed so that I can exit elegantly from Xfce.

Icedove – annoyances

“It it ain’t broke, don’t fix it” is my motto as far software applications or programmes are concerned.

However, if the ‘default’ preferences change, is that considered to be broken?

To display an email message in a separate window, in all the time that I have been using Thunderbird, I have double-clicked the left mouse button. This doesn’t happen in the version of Icedove (version 1.5.0.12 on Debian Etch) that I am currently using. Each message that I select (double-click left mouse button) replaces the email message in an existing message window.

Thinks. Edit -> Preferences -> Advanced. Ah ha. Found it under the ‘General’ tab: “Open new messages in:”. This preference was set to “An existing message window”. It has since been changed (back ?) to “A new message window”.

Somewhat related is the nuisance of draft messages being overwritten. How I used to draft messages:

  1. draft a message
  2. save the draft message
  3. select the message and choose ‘Edit message as new’
  4. tweak/customise the new draft message
  5. save the customised draft message

Repeat steps 3-5 until finished. I can’t do this now.

The default message continues to be replaced with the latest version of the draft message. I haven’t found any preference that allows me to change how this ‘new feature’ works.

I’ve had a bit of a look around, but not a concerted effort at this stage. I’m not sure whether this is just how it now works, i.e. new feature, or whether it is a bug. Either way, if it is not a preference, I will need to change the way I draft similar messages.

Etch from scratch – how to change Iceweasel reported browser

I’m Iceweasel and I’m happy being who I am. Except there are some web pages in the community that don’t recognise me and do not allow me to carry out any further activities that require JavaScript.

So I have to pretend I’m someone else to get to do what I want to do, for example, upload images to a journal entry on the BookCrossing site.

In the BookCrossing Advanced Questions forum, ardik provided the hint that I needed. But I didn’t want to pretend I was Internet Explorer, Netscape or Opera by using the User Agent Switcher addon.

I did a little search of the debian-user mailing list to find that I can change the general.useragent.extra.firefox in about:config.

  1. In the Iceweasel browser Location Bar type:
    about:config
    to display the Preference Name, Status, Type, and Value.
  2. Use the Filter text box near the top of the window to locate general.useragent.extra.firefox.
  3. Double click general.useragent.extra.firefox to display a dialog window to allow you to change the value.
  4. I changed the value from “Iceweasel/2.0.0.4” to “Firefox/2.0.0.3” without any investigation of versions and just because this was what I read on the debian user mailing list.

So far so good. It is so nice to not have to edit my preferences to turn off JavaScript then turn it back on for different web sites.

Note: Also on the debian user mailing list, KS cautioned that “While this works, the user will always have the value as user-set and will not change with an upgrade.”

Etch from scratch – fire and ice

Debian Iceweasel icon

I now use Iceweasel which is essentially a re-badged Firefox for Debian with the non-free bits taken out. It came with the Debian Etch I installed a couple of months ago.

A new feature in the more updated version of the browser that is causing some difficulty is that there is a Close button for each tab. I much preferred having the one Close button to the right of the Window that could be used for any tab. Clicking the Close button closed the current tab.

I know this is old news for a lot of people, as I have found mild consternation to howls about the new ‘feature’, as well some hacks to modify the functionality. However, I’m getting used to the new way of doing Tabbed Browsing so I’ll let it be for now.

The only hiccup so far is that I have to turn off JavaScript to upload images, for example, uploading scanned book covers to the BookCrossing site using “Upload a Journal Entry Picture”. I would never have thought of this as a solution, as it used to be if something was not working, to turn on JavaScript. But Moem give me the tip in the BookCrossing Forum, and it works.

The Debian Sarge Firefox [1] Advanced JavaScript Settings have a “Change images” option that is on. The Debian Etch Iceweasel [2] does not have this option at all. Is this why I cannot upload images?

I did a little investigation and some googling but as yet not found a definitive answer. I would like to, as remembering to turn JavaScript off and turn it on (for most sites) is a bit of a nuisance.

[1] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20061113 Firefox/1.0.4 (Debian package 1.0.4-2sarge13)

[2] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)

Etch from scratch – LAME

Who would have thought that in choosing “Export As MP3” from the File menu in Audacity would have instigated such a lot of learning.

In the last two hours I have learnt about another Debian repository to add to my sources.list, authenticating a public key, downloading and compiling a file from source, and some of the history of MP3s and related patents.

Installing Audacity was easy:

apt-get install audacity

I assumed that the creation of MP3s within Audacity was available as the item was available on the File menu, i.e. it was not greyed out or dim.

When I chose “Export As MP3”, I was prompted to provide a filename, then a message was displayed to say that I needed libmp3lame.so. I was then prompted as to whether I wanted to go looking for it in /usr/lib.

I had a scrat around /usr/lib and /usr/local/lib and did not find libmp3lame.so. I went back to the Audacity web site as I remember reading that LAME (Lame Ain’t an MP3 Encoder) would need to be downloaded and installed after Audacity. What I had read referred to the Windows version, but I thought perhaps I would have a go at installing a deb package perhaps called lame.

apt-get install lame

Did not find anything in my apt-get cache. Then I remembered Christian Marillat’s site www.debian-multimedia.org.

I added an appropriate repository from the http://www.debian-multimedia.org web site to my sources.list file, then:

apt-get update

Then the fun began to figure out what to do with the following error:

W: GPG error: http://mirror.home-dn.net stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 07DC563 D1F41B907
W: You may want to run apt-get update to correct these problems

So off I went back to the www.debian-multimedia.org web site to find the public key. I didn’t scroll right to the bottom of the home page, or look at the FAQ. Remembering that it was Marillat’s site, I decided to ignore the displayed error.

apt-get install lame

The following error was displayed:

WARNING: The following packages cannot be authenticated!
lame
Install these packages without verification [y/N]? N
E: Some packages could not be authenticated

Back to www.debian-multimedia.org web site to find that the public key was at the bottom of the home page, and one of two FAQs 🙂

I downloaded the public key and then used

dpkg -i debian-multimedia-keyring_2007.02.14_all.deb

to install the public key.

Re-entered:

apt-get update

and

apt-get install lame

This installed lots of documentation, none of which assisted me to locate what I needed. Unlike, the Windows version, where you simply downloaded a .dll file and showed Audacity where it was.

Googling showed me that I ‘needed’ to download a file from SourceForge and compile from source. Sigh.

Download latest source file from The LAME Project. In my case it was lame-3.97.tar.gz.

Unpack or uncompress using:

tar -xvzf lame-3.97.tar.gz

Navigate to the lame-3.97 directory.

Read the README and INSTALL files. Decide together with H, that most of the configure file consisted of the ‘standard’ configure file stuff. Ran:

./configure

I didn’t have the necessary build tools on my computer as I only installed Etch some weeks ago, and I still haven’t got round to installing what people consider ‘essentials’.

apt-get install build-essential

got the necessary tools, or should I say ‘essential’. Re-entered:

./configure

then:

make

Become the root user, then entered:

make install

Checked that I had libmp3lame.so in the /usr/local/lib directory.

Ran Audacity and attempted to ‘Export As MP3’ again. It worked!

Now I just have to watch out for dependency hell, as LAME was not installed using the apt-get package manager.