return to OCLUG Web Site
A Django site.
March 12, 2013

Michael P. Soulier
msoulier
But I Digress
» Video on Raspbian

Currently our upstairs TV has a raspberry pi attached to it. It's running the basic Raspbian distribution, based on Debian Linux. I'm using it for development as well as for a media center at the moment, so I'm not using RaspBMC, I'm going to order another one has a dedicated media center, but for now I need to be able to play movies off of a usb stick.

I tried VLC, but the performance was horrible. Apparently it doesn't use the native GPU. I read about it online, and thanks to that finally found omxplayer, which does use the native GPU. Unfortunately, it's not all that polished when playing from the command-line. It leaves behind text in the terminal above and below the video at certain aspect ratios, which is visually distracting.

They haven't fixed it yet so I put a wrapper script around it to work around the issue. I plan to put a whole interface around it at some point just for fun, but for now at least I can watch movies without text in the black bars above and below:

#!/bin/sh

setterm -cursor off
clear
omxplayer -o hdmi $1
clear
setterm -cursor on

Simple, but it works.

November 28, 2012

Michael P. Soulier
msoulier
But I Digress
» Customizing Awesome

As I mentioned previously, I'm currently running Awesome on my netbook. While I added suspend on lid close, I still need to customize the crap out of it. I had nothing showing me my current battery status, so I searched around to find the appropriate lua code, a language that I'm still picking up.

So, I hacked my $HOME/.config/awesome/rc.lua and added this:

-- {{{ Battery state

-- Initialize widget
batwidget = widget({ type = "textbox" })
baticon = widget({ type = "imagebox" })

-- Register widget
vicious.register(batwidget, vicious.widgets.bat,
    function (widget, args)
        if args[2] == 0 then return ""
        else
            baticon.image = image(beautiful.widget_bat)
            return "<span color='white'>".. args[2] .. "%</span>"
        end
    end, 61, "BAT0"
)

-- }}}

And then added the widget to the top of my screen. I was warned on the awesome mailing list (the name does confuse the english language) that I had to be careful where to put it, since the tasklist is greedy and will take all available space.

mywibox[s].widgets = {
    {
        mylauncher,
        mytaglist[s],
        mypromptbox[s],
        layout = awful.widget.layout.horizontal.leftright
    },
    mylayoutbox[s],
    mytextclock,
    s == 1 and mysystray or nil,
    baticon.image and separator, batwidget, baticon or nil,
    separator, mytasklist[s],
    layout = awful.widget.layout.horizontal.rightleft
}

And, it works. Now I need a system load, cpu load, etc. And I should hack the keybindings, although I'm getting used to the default ones. Maybe update the default layout since I prefer maximized layout.

November 21, 2012

Michael P. Soulier
msoulier
But I Digress
» Suspend on lid close in Debian Squeeze

I recently decided that Gnome is not the best desktop for my little EeePC netbook with a little 10.5" screen. So I'm playing around with a window manager that mainly just maximizes everything. I've tried Ratpoison, I've tried wmii, and now I'm trying Awesome.

I have a lot of customizations to do, but one thing that was missing was a way to suspend the netbook when the laptop lid is closed. I could manually run acpitool -s in a shell, or pm-suspend, but it's best handled by DBus, as intended.

Now, a simple way to have DBus do the work is using dbus-send, like so:

dbus-send --print-reply \
          --system \
          --dest=org.freedesktop.UPower \
          /org/freedesktop/UPower \
          org.freedesktop.UPower.Suspend

The hard part is subscribing to the lid close event, so I'm not polling all the time, exactly what DBus was written to prevent. I had a Python script for this, but the API was changed in Squeeze to use the UPower daemon and API.

I had to do some poking around to figure out how to update it, but I just got it working, so I thought I'd share.

#!/usr/bin/python

import dbus, gobject, sys
from dbus.mainloop.glib import DBusGMainLoop

pow_prop_iface = None
pow_iface = None

def handle_lidclose(*args):
    closed = pow_prop_iface.Get('',
                                'LidIsClosed')
    if closed:
        print "lid is closed, suspending"
        pow_iface.Suspend()
    else:
        print "lid is open"

def main():
    global pow_prop_iface, pow_iface

    DBusGMainLoop(set_as_default=True)

    bus = dbus.SystemBus()

    power_proxy = bus.get_object('org.freedesktop.UPower',
                                '/org/freedesktop/UPower')

    pow_prop_iface = dbus.Interface(power_proxy,
                                    'org.freedesktop.DBus.Properties')
    pow_iface = dbus.Interface(power_proxy,
                               'org.freedesktop.UPower')

    print "Registering a signal receiver for upower events..."

    bus.add_signal_receiver(handle_lidclose,
                            dbus_interface="org.freedesktop.UPower",
                            signal_name="Changed")


    loop = gobject.MainLoop()
    loop.run()

if __name__ == '__main__':
    main()

Now I just run it in the background from my .xsession script at X11 login, and it's sitting there waiting for any change in UPower status. Works like a charm.

September 10, 2012

Rob Echlin
echlin
Talk Software
» Rob Echlin

I installed Ubuntu 12.04 on a machine at work, using the WUBI installer. When I did an update, it complained like this:

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com precise-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>

It turns out that i was not authorized on the WIFI when I tried to do the update, so of course it failed. The real issue is that it managed to mess up the APT cache, so it kept on failing, even after I had the WIFI running.

The fix, from Ubuntu Forums, was to clear that cache.

cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update

July 10, 2012

Rick Leir
blinkmonitor
» Linux Symposium

The Linux Symposium is fast approaching, July 11 to 13. Jon Masters, the SCSI expert, will be giving the “Definitive” Kernel Update. Jon “Maddog” Hall, the well spoken Linux promoter from way back, will be talking about the benefits of FOSS in education and research. Other presenters will be traveling to Ottawa from USA, India, China, Korea, Brazil, France, and Sweden.

May 17, 2012

Rob Echlin
echlin
Talk Software
» Search in DTD’s on Windows – Fail!

So you have some DTD files: the main DTD files, model files, and entity files, in a number of folders and sub-folders on Windows XP.

They have extensions as follows:

  • dtd
  • mod
  • ent

Search for something using Windows Explorer, in it’s Search pane. Tell it to search all files and folders. Results? Only from some of the files, not all. Why?

Look at the no-search, no-folders mode of Windows Explorer. It offers to help you view videos, but can’t actually find any to show you. Odd, but related. This is because Windows is aware of a video file type with an extension of “mod”. So it won’t search those files.

Fail.

Let’s try the command line! You can use “find” to search the contents of files, but only in the current folder.

Fail.

Fix it with GetGnuWin32! And use grep to find your stuff.


Tagged: Gnu, Linux, software, Windows

May 3, 2012

Michael P. Soulier
msoulier
But I Digress
» Eclipse, you could be nicer to me

So I’m playing in Eclipse going through Android development HOWTOs. Yes, I know. Java. Thankfully there’s a scripting layer for Android, but I want to learn it all before I choose a toolset for a particular problem. Besides, Java ain’t all bad, just mostly.

Anywho, I fired up the HelloWorld tutorial, made my project, and very quickly found that Eclipse’s wonderful generated code that was going to save me all this work of typing Java didn’t compile. I got, “main cannot be resolved or is not a field”. Huh? The main it’s referring to is my main.xml file (can’t have too much XML eh Java?) describing the Android UI layout, under res/layouts/main.xml. Invoked through the ubiguitous Android R object. What do you mean it’s not there, you stupid machine??

So I do what any modern programmer does, after swearing at my screen repeatedly, I look up the error in google, and voila, I’m not alone. This post was particularly helpful. Apparently, it’s an Android SDK issue, which Eclipse invokes to create the project. Yo, Google! Get off your butts and fix it! Seems to me that you have time…


February 26, 2012

Rob Echlin
echlin
Talk Software
» It’s not the “Sound” app, it’s alsamixer

Finally got the sound working on my laptop, running Mint 12 and Cinnamon.

The fix was to go to the Gnome Alsa Mixer and uncheck “External amplifier”. The “Sound” app on the system bar seemed to allow the same change, but it didn’t seem to stick.

I first tried adding more gStreamer plugins. No effect. There were already some gStream plugins installed, but there are lots and lots of others to distract you!


Tagged: frustration, Linux, Linux sound problem, software

February 23, 2012

Rob Echlin
echlin
Talk Software
» delete .gconfd to fix missing panels

I have had to fix missing panels before in previous versions of Ubuntu and Xubuntu.

Previously, you deleted .gconf from your home directory.

Now you have to delete .gconfd.

“Now” means Xubuntu 10.10.
:-)
I am a little out of date on the family computer in the kitchen.


Tagged: Linux, ubuntu

February 20, 2012

Rob Echlin
echlin
Talk Software
» jackd out, sound came back

I have had a real problem with sound on Xubuntu for the last week.

The system says  “Welcome to Xubuntu 9.10″ in the web page reached with “Applications > Help”, and “Update Manager” says “11.04″ is available, so I think this is the system that was originally installed a s 9.10, and upgraded to 10.04 and 10.10.

There was no way for me to get sound out of this system. Many tweaks and such did not help. Windows runs sound fine.

I looked to see if I installed anything recently, and “Synaptic” said I had installed jackd – way back in October. I uninstalled jackd, and now I can output sound. I am able to record from a USB webcam, but Pinyinpro.com won’t use it.

One thing at a time.


Tagged: frustration, Linux, software

February 17, 2012

Rob Echlin
echlin
Talk Software
» Your daily tools: Tortoise and ls

Gui is cute, and sometimes productive, but GNU command line saved my sanity today.

Tortoise is a good GUI for using Subversion on Windows. It nicely flags all the files with status symbols on their icons.

Usually.

Sometimes it gets confused when a change is made 2 or more folders deeper, below the one on display. I don’t know whose cache is causing this – Microsoft’s or Tortoise’s, but it’s a minor issue.

It’s been worse since I upgraded to Tortoise 1.7.5. I jumped from 1.6.x to 1.7.5 the other day while writing docs for some tech writers, including how to install Tortoise.

I have several checkouts (OK, working copies) from the same corporate repository, all checked out in C:\svn. (OK, creativity didn’t seem necessary in this case, OK?)

Today the checkout I am most interested in was mostly not displaying its status icons. Yesterday I wasn’t as worried about it. Usually the entire tree was unaccented. Sometimes a folder would light up until I changed something. Then I noticed that all the “.svn” folders were missing, except in the top folder of the tree. Weird. I checked settings on a couple of things to make sure hidden folders were visible. For a while I had a grain of doubt that maybe the .svn folders were really gone.

So I went to the command line. “dir” didn’t see any .svn folders at all. That was because they were “hidden” by a Microsoft flag on them. “dir /ah” showed them, but not any of the other files/folders. Two dir commands required. Painful.

I have GNU Win32 tools installed, which is a port of the regular GNU tools to Windows.

So the answer was “ls -Al”, or “ls -A” for that economical look.

Thanks to all the GNU developers and those who ported and packaged it for Windows. You help me stay sane on the MS platform.

The site to download for Windows is getgnuwin32.sourceforge.net.


Tagged: frustration, Linux, software, tools, Windows

February 16, 2012

Michael P. Soulier
msoulier
But I Digress
» Bash, sometimes you suck

So, I’m trying to pass a ! character to a shell command. Should be simple right?

Not so much.

twit --post 'OMG...I'm out of coffee...work stoppage!'
bash: !': event not found

Huh? Oh yeah, in the fine tradition of crappy shells like csh, bash uses ! to re-run commands from the command history. But you’d think that in a single-quoted string it wouldn’t interpret that, it would just pass it into the command I’m running. Nope.

Can I escape it with a backslash? You bet.

$ echo "foobar\!"
foobar\!

K, still not what I wanted.

Simple solution, don’t use bash.

sh twit --post 'OMG...I'm out of coffee...work stoppage!'

Works fine in a POSIX mode.

Am I missing something? Is there a simpler way to get what I want? This blows the 80/20 rule totally.


January 23, 2012

Rob Echlin
echlin
Talk Software
» Blog tools in Linux

I decided to look at what blog tools are available in Linux. I want to  use them with my WordPress.com blog, of course, so that is how I tested them.

I have only checked out a couple of tools, but I find them mostly not working very well with WordPress.com. The only one that has worked at all is QTM, so far.

BloGTK

This is the recommended tool for Linux, according to the WordPress site. It won’t install in Oneiric. I expect I could make it work if I fiddled with some settings for apt-get, maybe. But the author is not working on it, so no real desire to try.

gnome-blog

Broken. Intended for Gnome 2. One of the libraries is not compatible with Gnome 3: “python-gnomeapplet”. Maybe there is no concept of applet in Gnome 3?

Drivel

I tried it. Editing a new post worked. There were error messages connecting to WordPress.com. I was not able to post the blog because it could not get permission to write.

QTM

This one was able to post a message, but left the message in the “draft” state on WordPress.com. That may be my fault – there is a “draft/publish” drop down on the app.

Because it was “posted”, it put the file into some sort of archive state, so that the next time I went to edit, I had to fiddle around to be able to see it. Finished editing the post on WordPress.com.

Other options

There is at least one plugin for FireFox for editing blogs. But I was looking for tools for Gnome so I can try out Gnome 3, so I haven’t tried it yet.


Tagged: Gnome3, Linux, software review

January 17, 2012

Rob Echlin
echlin
Talk Software
» Installing Mint 12

I installed Mint on my laptop the other day. Then I installed Cinnamon, which is Mint’s Gnome 3 based interface. I wanted to learn about Gnome 3′s powers, but without all the Gnome 3 hassle.

Installing Mint

I have to get some DVD’s – they want to put a GB in the installer. Fortunately there is a CD version without Office software and without codecs. Somepages indicate there are Windows installers, but I didn’t find one. It would be nice to have one for my work computer.

Installing Cinnamon

Installing Cinnamon was easy. Select Cinnamon in Synaptic and install it. Err, no, not in the list of selected items when I tried to choose at login time. Select cinnamon-session and install that (the notes said to do that). And now I am in Cinnamon.

Actually, I liked “Nate”, Mint’s Gnome 2 interface, a bit better. I liked having the menu as one of the choices when you select the thingy in the top left corner. In Cinnamon, the menu is in the bottom left.

Cinnamon Menu

In the Cinnamon menu, there are three columns. The left column is favorites, with some stuff you can’t get rid of like shutdown and lock screen. When the mouse is over an item, the bottom of the menu block, on the right (as far away from the favorites as possible) is the name and one line description of that application.

It actually makes sense to be on the bottom right, you should soon know what your favorites are, and the right column is the apps of the highlighted category in the middle column.

Faves can be removed using the right click menu. Also, you can right-click on a program to add it to favorites.

Firefox mysterious disappearing menus

By default, the Firefox menu system is missing. It turns out that Ubuntu disappeared it by installing a plugin that moved it to the Unity menu location, which is presumably some Mac-like common menu location.

So I could not use Firefox menus to get at the Addon Manager to kill the creepy addon.

I used a command line parameter to get at it, which I got from some web page I can’t find now. However, you can type “about:addons” in the address bar to get there.

The Guilty Addon is called “Global Menu Bar Integration”, and you can’t uninstall it, you can only disable it.

Broadcom Drivers

My laptop has Broadcom wifi, 4318 style. On all the other Ubuntu versions I have installed, I had to install the right thing, run the right script and then maybe remove the right lines from a config file.

This time, I was able to search in Synaptic for “Broadcom”, and install the package b43-fwcutter, and it worked! Wow!


Tagged: Linux, review

December 20, 2011

Ian Ward
excess
excess.org - News
» Super Meat Boy with Reconfigured Keys

The Humble Indie Bundle #4 was nice enough to bring Super Meat Boy and a bunch of other great games to Linux. The SMB people however seem to want to punish you for playing on a keyboard and leave you with SPACE as jump, SHIFT as run, and no way to reconfigure the keys.

Here is a little xmodmap script that makes playing on a keyboard much more enjoyable:

keysym x = space
keysym z = Shift_L

Just save this as xmodmap.meat and then run xmodmap -pke > xmodmap.orig to save your original key settings.

Finally, run xmodmap xmodmap.meat before starting the game, and xmodmap xmodmap.orig when you're done.

December 8, 2011

Ian Ward
excess
excess.org - News
» Speedometer 2.8 Released

This release adds the long-requested linear scale feature to Speedometer. You can now also adjust the minimum and maximum values displayed, and switch all units shown to bits per second.

November 20, 2011

Brenda Butler
bjb
linuxbutler
» debian kernel source build package bug

The official Debian kernel building tools are a thing of wonder. But, it didn’t do what I wanted, which was to build the exact version of the kernel that I’m running. I guess it is only ever used to build the latest version.

debian bug 649394

Here is the best documentation I found for this task. It refers to this which is also pretty good.

Also, reportbug failed (it was unable to get the list of open bugs for this package from the Bug Tracking System) — I used debian-bug in debian-el package (as noted at the bottom of this page). To actually send the mail, use ctrl-c ctrl-s in the mail buffer (or ctrl-c ctrl-c if you want to send the email and exit emacs).

UPDATE:

Maybe I misunderstood … maybe the -5 is not the patch level I’m aiming for. We shall see.

UPDATE:

No, the -5 is the “ABI” level, and has nothing to do with the Debian patch level. So there was no bug. I was supposed to build with all the patches. Live and learn …

October 28, 2011

Dave O'Neill
dmo
blog
» Drives with 4k sectors

I have a new disk that uses 4kb sectors. Unfortunately, on the system it's installed in, none of the partitioning tools deal with this automatically, leading to near-guaranteed misalignment and slower performance, or so says the Googled results (JFGI yourself... I'm too lazy to paste the links here). So, here's what I did:

more

October 7, 2011

Rick Leir
blinkmonitor
» LPI Linux Certification

LPI Linux Certification in A Nutshell 3rd edition, Adam Haeder, O’Reilly, 2010

This certification may be useful to Linux system admins. Too bad they have left out virtualization, which most job reqs will include. It will appear in a ‘level 3 specialty’. In any case, the book is a good summary of Linux admin tasks. 450 pages.

September 16, 2011

Rob Echlin
echlin
Talk Software
» Gaming day for OCLUG this Saturday

Hi
It’s game day, and Software Freedom Day, for OCLUG tomorrow, Sat Sep 17.
11 am to probably 3pm.
Room T117 at Algonquin College on Woodroffe – that’s in building T.

BZ Flag server v2.0.x will be provided on the local LAN.
There will be some other games for kids, and mine will be there.
There will be some software demos, at least one for ‘R’.


Tagged: games, groups, Linux