Blog

Enabling Bluetooth headset support in Lubuntu 13.10.

posted Mar 15, 2014, 4:47 AM by Warren Howard   [ updated May 10, 2016, 7:43 AM ]

This was tested using Lubuntu, but may have some relevance for Ubuntu users.

The section on sound in the Lubuntu setup guide explains that PulseAudio is not installed by default in Lubuntu. The PulseAudio section of the Ubuntu Wiki explains that PulseAudio provides advanced audio capabilities for "POSIX and Win32 systems".

This command:

sudo apt-get install pulseaudio-module-bluetooth

Will install the necessary bluetooth module for PulseAudio, but it will also install the required packages to install PulseAudio if it is not already installed:

The following extra packages will be installed:
  gstreamer0.10-pulseaudio libpulsedsp pulseaudio pulseaudio-module-x11 pulseaudio-utils rtkit
Suggested packages:
  pavumeter paman pavucontrol paprefs pulseaudio-module-raop pulseaudio-esound-compat
The following NEW packages will be installed:
  gstreamer0.10-pulseaudio libpulsedsp pulseaudio pulseaudio-module-bluetooth pulseaudio-module-x11 pulseaudio-utils rtkit
0 upgraded, 7 newly installed, 0 to remove and 6 not upgraded.
Need to get 1,250 kB of archives.
After this operation, 4,769 kB of additional disk space will be used.
Do you want to continue [Y/n]? n

Note the package pavucontrol is listed as "Suggested". I found that I needed to install this package in order to get working the Bluetooth headset:

sudo apt-get install pavucontrol

With the required packages now installed the steps to enabling the Bluetooth headset are:
  1. Pair the headset with the computer.
  2. Then use "PulseAudio Volume Control" (pavucontrol) to playback using Bluetooth headset output device.

Installing Ubuntu Studio from USB key

posted May 22, 2013, 5:16 AM by Warren Howard

These are the steps I followed to install Ubuntu Studio 10.10 (Maverick Meerkat) Alternate Install DVD iso image through USB key. 

  1. I used a 4GB usb key formatted with the FAT filesystem.
  2. Download and run Unetbootin
  3. Using Unetbootin install a Ubuntu 10.10-HdMedia image onto the usb key.
  4. Copy the iso "ubuntustudio-10.10-alternate-i386.iso" onto the same usb key.
  5. Insert the usb key into the destination computer and boot from usb.

The Ubuntu installation process will now begin.

Later I wanted to access the iso file from within Ubuntu in order to install additional packages. To do this I followed these steps.

Original post written and posted on Sun, 2011/02/20 - 07:11

Remove "Author" and "Date" from Drupal Blog Posts

posted May 22, 2013, 5:01 AM by Warren Howard   [ updated May 22, 2013, 5:03 AM ]

Recently I undertook to remove the "Author" and "Date" line from Blog entries for a Drupal 6 site. I ended up taking the path of a Google search to learn more about this and came up with these search results.
  1. Snipplr - Remove Usernames Blog Link from Drupal Blog Posts
  2. Controlling what link items goes in the $links variable on node.tpl.php
  3. Remove 'Shawn's Blog' From Posts.

Reading through all these posts and trying out different things took quite some time so I've summarize what I feel are the important lessons in the hope of saving you time and effort.

1. If removing the "Author" and "Date" line from Blog post is all you want to do then it is really simple. As mentioned here all you need to do is log in as a Drupal administrator for your site and go to Administer -> Site building ->Themes -> Global settings and deselect "Blog entry" in the "Display post information on" list.

2. Should you need to start making changes beyond this, then before you start adding code snippets (like those described in the links above) to you theme's template.php file, please read About overriding themable output and install the Theme developer" module. It will make life much easier and help you to see clearly why the code snippet is or (as in my case) is not working for you.

For me it turned out that in conjunction with removing the check box in "Themes / Global settings" all I needed to do was copy my theme's node.tpl.php to new file called node-blog.tpl.php in the same location and make the edits there. The "Theme Developer" module showed me the answer in seconds.

Original post written and posted on Sun, 2011/01/02 - 05:01

Theming Drupal with Zen

posted May 22, 2013, 4:55 AM by Warren Howard   [ updated May 22, 2013, 4:56 AM ]

"Zen is the ultimate starting theme for Drupal." At least that is the claim made by the Zen Project. One of the highlighted points made by the Zen Project is their fantastic online documentation.

I feel that claim is just a little bit misleading. According to me the Zen Project has fantastic online documentation for the purpose of installing Zen. After which you are expected to be familiar with CSS and to know what to do on your own.

If you are also a beginner to CSS and Drupal theming then you will need to get up to speed with CSS first, before you start theming with Zen. It should not be too hard, here are some self study suggestions :

By the time you are done with these steps you should have Firefox installed with FirebugMeasureItColorZilla and maybe a few other web development addons and be ready to starting theming with Zen!

Below are some of the steps that I applied to turn the Zen Starter Kit into something that looks like the mmKanso theme. Note these steps apply to Drupal 5, with some additional notes for Drupal 6 :

  1. Installed Zen and followed the build your own sub-theme steps, choosing the fixed layout
  2. From the themes administration page within Drupal I enabled the new sub-theme (the one based on STARTERKIT) and from the configuration section for the sub-theme I de-selected "Logo" and set "Display breadcrumb" to no, because I didn't want to display these items.
  3. The fixed layout was too wide for me. I edited layout.css, and reduced the width of #page.no-sidebars and .sidebar-left by 200px.
  4. I wanted to display a panoramic picture in the header, so I increased the height of #header-inner to 110px.
  5. Next I wanted to change the font, the font sizes, anchor styles and font colors. I copied html-elements.css from the parent zen theme folder to the local sub-theme folder and updated template.php so that the local subtheme copy of madtechsupport-html-elements.css was loaded immediately before madtechsupport.css (note, for Drupal 6 madtechsupport.info would need updating instead oftemplate.php). Within madtechsupport-html-elements.css I defined a new 11 pt base font, changed the font-family to Verdana, adjusted the colorfont-size and line-height for h1h6and changed the color and text-decoration for each of the anchor states.
  6. Moving on I next edited madtechsupport.css. I added the background image to #header, I moved the #primary links to the left (margin-left: 0px;) and I moved the #search-box to the right (float: right; and margin-right: 0px;).
  7. In madtechsupport.css there were anchor attributes for #site-name that were overriding those from madtechsupport-html-elements.css so I deleted those attributes for #site-name frommadtechsupport.css. Also I applied a font-style to #site-slogan and #mission.
  8. At this point the theme was starting to take shape. The mmKanso theme used a dotted gray line beneath the heading. I added border-left: 1px dotted #999999; to #content-innerborder-bottom: 1px dotted #999999; to #navbarborder-top: 1px dotted #999999; to #footer and border-left: 1px dotted #999999; to #primary a.
  9. Added the dotted borders revealed the need for some additional padding and adjustment to margins. In layout.css I added margin-left: 5px; to #header-inner (because of Internet Explorer, where possible, adding a margin to an "inner" component is preferential to using padding) and padding: 15px; to #content-inner. In madtechsupport.css I added margin-bottom: 10px; to #mission andpadding-left: 5px; to #primary a.
  10. Zen comes enabled with a "Skip to Navigation" link in the top right corner of header. This link has been colored white so that against a white background it will remain hidden until a mouse over event upon which it changes color to black. The problem for me is that I have used an image for the background of the header so the link in permanently visible. The other problem is that the link doesn't do that much anyway! So I removed it. To remove the "Skip to Navigation" link I copied page.tpl.php from the parent theme folder to the local sub-theme folder and deleted the line with div id="skip-to-nav" from this file.
  11. The last step was to check how the site was looking in Internet Explorer. There were two noticeable problems. The first was that Internet Explorer 6 used dashes instead of dots for the 1px borders (this is a known IE6 problem that is fixed in IE7). I decided to not try and fix or work around this problem (note, a 2px border is rendered as dotted). The other problem was that the search box was appearing across two lines instead of one. Again this is a problem that others have experienced. To fix this I copied ie.css from the parent theme directory to the local sub-theme directory and set #search-box to be width: 212px;. Note that in Drupal 6 it was also necessary to edit madtechsupport.info and uncomment the conditional-stylesheets entry for IE.
Original post written and posted on Sun, 2008/10/26 - 06:06

Recovering from an interrupted rdiff-backup

posted May 22, 2013, 4:53 AM by Warren Howard

I use rdiff-backup a bit to script nightly backups for the servers I set up. Good tool that does its job well… Except, when the backup has been interrupted mid-way. Across networks this happens occasionally and for me when it does happen rdiff-backup will not run normally again without administrator intervention.

Recovery steps in detail

I'm using rdiff-backup 1.1.5 and Python 2.4.4. The error I get looks like this

Exception '' raised of class 'exceptions.AssertionError':
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 295, in error_check_Main
    try: Main(arglist)
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 315, in Main
    take_action(rps)
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 273, in take_action
    elif action == "check-destination-dir": CheckDest(rps[0])
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 774, in CheckDest
    need_check = checkdest_need_check(dest_rp)
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 810, in checkdest_need_check
    if not force: curmir_incs[0].conn.regress.check_pids(curmir_incs)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 448, in __call__
    return apply(self.connection.reval, (self.name,) + args)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 367, in reval
    for arg in args: self._put(arg, req_num)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 139, in _put
    else: self._putobj(obj, req_num)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 144, in _putobj
    self._write("o", pickle.dumps(obj, 1), req_num)
  File "pickle.py", line 1386, in dumps
    Pickler(file, protocol, bin).dump(obj)
  File "pickle.py", line 231, in dump
    self.save(obj)
  File "pickle.py", line 293, in save
    f(self, obj) # Call unbound method with explicit self
  File "pickle.py", line 614, in save_list
    self._batch_appends(iter(obj))
  File "pickle.py", line 647, in _batch_appends
    save(x)
  File "pickle.py", line 293, in save
    f(self, obj) # Call unbound method with explicit self
  File "pickle.py", line 737, in save_inst
    stuff = getstate()
  File "/var/lib/python-support/python2.4/rdiff_backup/rpath.py", line 754, in __getstate__
    assert self.conn is Globals.local_connection

Traceback (most recent call last):
  File "/usr/bin/rdiff-backup", line 23, in ?
    rdiff_backup.Main.error_check_Main(sys.argv[1:])
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 295, in error_check_Main
    try: Main(arglist)
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 315, in Main
    take_action(rps)
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 273, in take_action
    elif action == "check-destination-dir": CheckDest(rps[0])
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 774, in CheckDest
    need_check = checkdest_need_check(dest_rp)
  File "/var/lib/python-support/python2.4/rdiff_backup/Main.py", line 810, in checkdest_need_check
    if not force: curmir_incs[0].conn.regress.check_pids(curmir_incs)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 448, in __call__
    return apply(self.connection.reval, (self.name,) + args)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 367, in reval
    for arg in args: self._put(arg, req_num)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 139, in _put
    else: self._putobj(obj, req_num)
  File "/var/lib/python-support/python2.4/rdiff_backup/connection.py", line 144, in _putobj
    self._write("o", pickle.dumps(obj, 1), req_num)
  File "/usr/lib/python2.4/pickle.py", line 1386, in dumps
    Pickler(file, protocol, bin).dump(obj)
  File "/usr/lib/python2.4/pickle.py", line 231, in dump
    self.save(obj)
  File "/usr/lib/python2.4/pickle.py", line 293, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.4/pickle.py", line 614, in save_list
    self._batch_appends(iter(obj))
  File "/usr/lib/python2.4/pickle.py", line 647, in _batch_appends
    save(x)
  File "/usr/lib/python2.4/pickle.py", line 293, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.4/pickle.py", line 737, in save_inst
    stuff = getstate()
  File "/var/lib/python-support/python2.4/rdiff_backup/rpath.py", line 754, in __getstate__
    assert self.conn is Globals.local_connection
AssertionError
Fatal Error: Lost connection to the remote system

My first attempt at fixing this problem was to try using the check-destination-dir option since the rdiff-backup man page claims that “running rdiff-backup with this option on the destination dir will undo the failed directory”

/usr/bin/rdiff-backup --check-destination-dir root@remote.backup.host::/path/to/backup

But this didn't work and produced similar (or maybe even the same) error as the one above. Next I decided to try using the “force” option since I had read descriptions from others finding success in fixing rdiff-backp errors with this option. From the rdiff-backup man page the force option will “Authorize a more drastic modification of a directory than usual”.

# /usr/bin/rdiff-backup --force --check-destination-dir root@remote.backup.host::/path/to/backup
# echo $?
0

OK, that completed successfully, for completeness list the available backups.

# /usr/bin/rdiff-backup -l root@remote.backup.host::/path/to/backup

Found 239 increments:
    increments.2007-10-07T02:11:45-07:00.dir   Sun Oct  7 02:11:45 2007
    increments.2007-10-18T09:55:29-07:00.dir   Thu Oct 18 09:55:29 2007
    increments.2007-10-18T10:56:32-07:00.dir   Thu Oct 18 10:56:32 2007
.
.
.
    increments.2008-06-09T19:00:02-07:00.dir   Mon Jun  9 19:00:02 2008
    increments.2008-06-10T19:00:03-07:00.dir   Tue Jun 10 19:00:03 2008
    increments.2008-06-11T19:00:03-07:00.dir   Wed Jun 11 19:00:03 2008
Current mirror: Thu Jun 12 19:00:03 2008

To summarize, the error message was long and bewildering. However the only thing that had “changed” since the last successful backup was that a normal backup had been interrupted. The backup location had become corrupted requiring the use of the “force” option to make the backup location usable again.

Original post written and posted on Tue, 2008/10/21 - 10:38

1-5 of 5