Twitter Updates

    follow me on Twitter

    G-AVLN in front of her home

    G-AVLN in front of her home

    Mostly Unix and Linux topics. But flying might get a mention too.

    Friday, January 23, 2009

    HPOfficeJet H470 in Ubuntu 8.10 over Bluetooth

    It was all working in Hardy, but a week ago I reinstalled my Dell M1330, no Vista anymore - just Ubuntu 8.10. Very impressed, added Crossover Linux (still need MS Office), and I don't think I'm going to look back.

    Hardware recognition fantastic, my 3G dongle, which used to give me a lot of grieve before - now is running with a single click on the panel...

    Bluetooth seemed fine as well (connecting to other laptops and exchanging files OK). However, got stuck on the HP H470 printer. It worked with Hardy, now, attempts to connect only showed "Pairing Failed". Checking Ubuntu forum confirmed that there is a known bug in Intrepid, and there is seemingly a disagreement between the forum members and the developer on how to handle this. Shame...

    Never mind, time to get under the hood. The bug indicates that the gnome front end configuration is broken. Instead, one can use the CUPS web-based configuration, available through your browser.

    First check that your CUPS daemon is running, is listening for tcp connections:

    $ /etc/init.d/cups status

    Status of Common Unix Printing System: cupsd is running.

    $ netstat -a | grep LISTEN | grep cups

    unix 2 [ ACC ] STREAM LISTENING 62711 /var/run/cups/cups.sock

    If not, you may have to (re)start the CUPS daemon (replace "status" with "start" in the first command above).

    Now to the actual configuration:

    1. First of all, identify the printer's number with the following command:

    $ hcitool scan

    Scanning ...


    00:1A:0E:XX:XX:XX Officejet H470

    2. Now start your browser and enter the server's URL: This will point it at CUPS administration server (strictly speaking it is IPP - Internet Printing Protocol using CUPS).

    3. Select Add Printer, then Continue

    4. Enter values for Name, Location and Description, then Continue

    5. In Device: screen select from the drop-down list HP Printer (HPLIP), then Continue

    6. In the Device URI screen enter the protocol and the address for your printer, as identified in step 1. Notice no ':' characters used in the string below:

    bluetooth://001A0EXXXXXX, then Continue

    7. Complete the configuration with the:

    Make: HP, then Continue

    Model: HP Officejet h470 Foomatic/hpijs (en), then Add Printer

    Hopefully, you are looking at "The Bluetooth printer has been added successfully"

    8. Test the setup from the command line. Run:

    $ lpstat -t

    scheduler is running

    no system default destination

    device for Bluetooth: bluetooth://001A0E79AF32

    Bluetooth accepting requests since Fri 23 Jan 2009 16:39:02 GMT

    printer Bluetooth is idle. enabled since Fri 23 Jan 2009 16:39:02 GMT

    From now on, whether you print from the command line, or from applications, the printer will work hard for you!

    Wednesday, January 21, 2009

    Handling MAC addresses in VM

    We are working on setting up all our UNIX and Linux courses as guests in VMware workstation. There are many advantages of taking this route, as there are some penalties. We setup a 'master' VM, then ghost it, which allows us to dump an image on demand. Once we have used this method for a while, I might elaborate a bit more, with more insight...

    In the meantime, just a comment on preventing new images from duplicating original MAC address in Linux configuration. All this is new for me, but our techie in Swindon has sent me an e-mail documenting the solution. Thanks, Martin!

    "If you don't do this before taking the image, each subsequent VM that you deploy will have the same MAC Address and you get that annoying "did you copy or move the VM" question on first boot......The fix is...

    1. Delete the file /etc/udev/rules.d/70-persistent-net.rules [in the guest]
    2. Shutdown the VM
    3. Find the .vmx file on the host (in this case, D:\VMRun\Linux C\Linux C.vmx). Edit it with Wordpad and look for 2 lines called uuid.bios and uuid.location. Underneath those 2 lines, add a line as follows:

    uuid.action = "create"

    4. Save the file and take the image"

    Should Gnome-terminal read shell startup files?

    I say it should. If not by default, then at least users (ordinary users) should be able to set the capability permanently and easily!

    It's very easy to set is for a session. Open terminal, go to Edit --> Current Profile --> Title and Command and tick the "Run command as a login shell" box.

    Problem is, you have to do it every time you log in. Your first terminal never gets to see your environmental settings. We need permanent solution. Searched and googled, googled and searched. Found a wealth of information on the Red Hat site.

    They definitely put me on the right track (and convinced me that I do need to learn xml after all!). However, the article omitted to mention one important bit of information. When you change the settings with the gconftool-2, you must stop the gconfd-2 daemon. I didn't, and had all sorts of desktop problems, including Nautilus crash.

    So, to make every gnome-terminal a login shell (e.i. read your environmental files) first stop the gconfd-2 process. There may be a clean way of doing this in runlevel 5, I chose to go to runlevel 3, which is a full multi-user mode of operation, but without X (GUI).

    Do the following steps only if you *don't* have any applications or users requiring GUI - you risk P45 or your tyres slashed otherwise.

    Log in as root and enter:

    # init 3

    Press Enter (after few messages) - that will show the prompt again. Enter:

    # gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type boolean --set /apps/gnome-terminal/profiles/Default/login_shell true

    Return to GUI runlevel:

    # init 5

    From now on, every user's terminal will source their startup files...

    Wednesday, January 07, 2009

    Kiosk mode in Firefox

    I had a few e-mails from my local Linux User Group (NLUG, Northants LUG). Somebody asked for help in fixing Firefox. His browser lost all toolbars. An answer appeared within minutes: "F11? (Toggles kiosk mode)".

    Two thoughts went through my mind. First of all I remembered that I had the same problem some months ago, and never found the solution. In fact, it was at that point when I decided to investigate Opera (which I have been using ever since). Why didn't I ask the forum? I would probably have had the same answer within minutes!

    The other thought related to a question a delegate asked me only yesterday about a "kiosk mode" in an application. I regret to admit, but my answer was a rather ignorant "don't know anything about your application, so can't comment" statement.

    Will I ever learn? Not knowing anything about the 'kiosk' thing, I assumed the term was peculiar to the application the chap was talking about!

    So I'm feeling rather depressed. Not only is this questioning my style in interaction with delegates, but also exposing massive gaps in my knowledge - everybody I mentioned the "kiosk mode" since then knew about it. It seems I'm the only person in the Universe that thought a kiosk is a type of detached cabin selling newspepars and cigarettes...

    Saturday, January 03, 2009

    Blog Archive