The JakAttack is back

It was an ordinary day.
A day like any other when suddenly…

As I was transferring my ogg casts to my ogg player I realised that there was a new JakAttack episode. The show is by Jon Watson and his wife Kelly Penguin Girl. It resulted from an earlier show that Jon had that was restricted to technology topics. Their network wouldn’t let them change to a more relaxed “tech ‘n talk” format so they left and started JakAttack on their own.

They were going great guns for a while but when they moved back to Nova Scotia and bought a old house to renovate as a B&B, their podcasting time was limited. While others had given up all hope of ever seeing a new episode (even Dan put them in the graveyard section of http://www.thelinuxlink.net/) I knew they wouldn’t let us down.

So here we are – over a year has passed since the last episode and out of the blue Jon and Kelly were back. Back and at top form. Find the next cast (whenever that will be) at:
http://thejakattack.libsyn.com/

Posted in General | 2 Comments

To me six months from now: How to get Citrix running on GNU/Linux (Ubuntu/Debian/Fedora)

This is now the third time that I’ve had to research how to get working so it’s time for a post. This should probably work for Ubuntu systems as well.

Edit: The site now has a debian package to make life easier the only dependency is libxp6

aptitude install libxp6
dpkg -i icaclient_11.100_i386.patched.deb

Go to the Citrix Site and download the file called:
linuxx86-11.0.140395.tar.gz (or greater).

This is a tarbomb so I advise creating a new directory and extract it there. Then run the setup script ./setupwfc

mkdir citrix
mv /tmp/linuxx86-11.0.140395.tar.gz citrix/
cd citrix
tar xzvf linuxx86-11.0.140395.tar.gz
./setupwfc

Now the two extra things you’ll need to do.

First install the package ia32-libs package which is “ia32 shared libraries for use on amd64 and ia64 systems”.

sudo apt-get install ia32-libs

Next you need to copy the firefox/iceweasel/whatever certs

cp -v /usr/share/ca-certificates/mozilla/* /usr/lib/ICAClient/keystore/cacerts/

Of course when I need this next I’ll have forgotten all about this post.

EDIT: I updated to Kubuntu 10.05 and I came across the error related to /usr/lib/ICAClient/wfcmgr: error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory. A quick print of the shared library dependencies and we see that libXm.so.4 is not found.

user@pc:~$ ldd /usr/lib/ICAClient/wfcmgr
        linux-gate.so.1 =>  (0xf77c1000)
        libXm.so.4 => not found
        libXp.so.6 => /usr/lib32/libXp.so.6 (0xf779a000)
        libXpm.so.4 => /usr/lib32/libXpm.so.4 (0xf7788000)
        libSM.so.6 => /usr/lib32/libSM.so.6 (0xf777f000)
        libICE.so.6 => /usr/lib32/libICE.so.6 (0xf7766000)
        libXmu.so.6 => /usr/lib32/libXmu.so.6 (0xf774f000)
        libXinerama.so.1 => /usr/lib32/libXinerama.so.1 (0xf774b000)
        libdl.so.2 => /lib32/libdl.so.2 (0xf7747000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf772d000)
        libc.so.6 => /lib32/libc.so.6 (0xf75d3000)
        libXt.so.6 => /usr/lib32/libXt.so.6 (0xf7580000)
        libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7463000)
        libXext.so.6 => /usr/lib32/libXext.so.6 (0xf7453000)
        libXau.so.6 => /usr/lib32/libXau.so.6 (0xf744f000)
        libuuid.so.1 => /lib32/libuuid.so.1 (0xf7449000)
        /lib/ld-linux.so.2 (0xf77c2000)
        libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf742f000)
        libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf7429000)

I tried installing libmotif3 (apt-get install libmotif3) as suggested here but then I got the error wrong ELF class: ELFCLASS64. I know from experience that this is due to running a 32bit application on a 64bit os. After some searching I came across this post which recommended downloading a 32 bit version of libmotif3 for the i386 platform, forcing the install and creating a link from version 3 to version 4.

dpkg -i --force-architecture libmotif*i386.deb
ln -s /usr/lib/libXm.so.3 /usr/lib32/libXm.so.4

This fixed the problem for me. By the way the binary you need to point your browser to is /usr/lib/ICAClient/wfica

Posted in citrix, General | Tagged , , | 5 Comments

SpudShow

I listen to so many tech podcasts that I forgot that my ogg player can actually play music. Then while listening to the Linux Outlaws I heard that Dan Lynch had started a music podcast called Rat Hole Radio. So I set out to modify bashpodder not to speed up all my podcasts. In doing so I went down a rathole of my own where a simple change turned into a major project. Those that have seen Hal’s attempt to fix a light bulb in the opening sequence of “Malcolm in the Middle” Season 3 Episode 6 “Health Scare” will know what I mean.

Once I was back up and running I went looking for some Irish podcasts and came across Spud Show which features mostly unsigned female artists from Ireland and around the world. The show has been going for four years and although the presenter Brendan Bolger started out speaking English, he switched to Irish for a while. That turned out to be a long while as the show is still in Irish but don’t let that put you off. The show comes out a few times a week and it’s always something different, fresh and new. He does a great job of linking to the musicians on the website and always makes a point of spelling out the artist’s URL’s (in the English alphabet).

I had a happy few months going through the back catalogue and I can recommend the following shows (of course these are songs that I liked and more importantly were able to get the repeating sound of bob the builder out of my head.) :

In short, give spudshow a listen. Now what was I doing again – ho yea – adding Rat Hole Radio to my feed . . .

Posted in General | 2 Comments

HPR ep0481 :: Mashpodder

I have been using bashpodder for years as my podcatching client. For those that don’t know bashpodder is a shell script written by Linc Fessenden of the The Linux Link Tech Show and it is a simple sysadmin solution to a problem.

  • The problem: “get podcasts from the Intenet”
  • The solution: “assemble unix commands into a shell script and run from cron”

For sysadmins while the problem may vary but the solution is always the same :). I’m not embarrassed to say that bashpodder.shell inspired a lot of my own scripts and as a result I have gotten more familiar with the underlying tools like date, mkdir, wget, tr, sed, awk, cat, sort, uniq and grep.

Over the years people (including myself) have modified the script to tailor it to their own personal needs. A few months back I was looking at the amount of changes that I had made and I have to say a lot of the elegance of Linc’s original masterpiece was lost. So I downloaded a fresh version of bashpodder and started the task of adding all the changes that I had made, most of which were adaptations that other users had contributed back. As I was browsing the site I realised that the majority of changes that I needed were already implemented by Chess Griffin’s mashpodder.

Chess mentioned that he had ‘forked’ bashpodder on the (sadly no longer produced but still required listening) Linux Reality Podcast. I looked at it at the time I didn’t make a the jump because of the investment that I had made in bashpodder. However now after looking through the code for mashpodder I realised that most of the functionality I needed was already included.

If you change, one of the major changes you will notice is in the mp.conf file which is where you add the lists of podcasts. Where the bp.conf file of bashpodder only had the option for the URL of the feed you wanted to subscribe to, mashpodder has two extra fields. Rather than explain it myself here is the comments that Chess had added to the default mp.conf file.

# Mashpodder sample mp.conf
# $Id: mp.conf 2 2009-01-29 22:36:28Z chess.griffin $
#
# Three fields, separated by spaces:
# Field 1: rss feed
# Field 2: name_of_directory or 'date'
# Field 3: 'all' or 'none' or 'update' or a number greater than 0
#
# Field 1 is self explanatory.  Field 2 is where the episodes will be saved,
# either in a user-named directory or a date-based directory.  Put the word
# 'date' if you want date-based directories.  Field 3 is how many episodes to
# fetch.  The term 'update' means episode names will be saved as if they were
# downloaded but nothing will actually be downloaded.
#
# Examples:
#

I was able to put my music podcasts in an output folder and my “talk” podcasts in a folder called fast so that I could speed them up and convert them to ogg first.

One caveat I found was that if I put all in the last field, mashpodder took a long time to run. Not that it was a major issue given I am running it in cron. I discovered that with the setting all mashpodder would check each file in a feed to see if it was downloaded. When I changes the last field to 3 it sped up considerably.

[edit: Should be in the podcast section – sorry Linc]

Posted in Podcasts | 1 Comment

Ready for the Desktop

I’ve been using many different desktop environments over the years. Not only the many desktop’s available under Linux but also the various different iterations of Windows and Apple’s OS. Some allowed me to do my work quickly while others just frustrated me to the point that I spent more time fighting the computer than doing actual work.

I have been thinking about what causes this frustration for a while. In today’s Hacker Public Radio episode I draw parallels between my frustrations at trying to start an automatic car with peoples frustration with computer interfaces. I realize that my frustrations may be with my own expectations rather than with the interface itself.

In the computer world when I hear people say that “Linux is not ready for the desktop”. I have to look at all the people around me that are having no problem using Linux as their only computing environment. People across the spectrum of ages and abilities but the one thing they have in common was that they have no preconceived ideas of how a computer works. They approach it by asking ‘how do I…” as opposed to “why can’t I…”.

So if you are having a problem with the Linux Desktop perhaps it is because it’s to much like what you have used before. Fortunately with free software there is a choice of how you interact with your computer. You’re not stuck with an automatic or a stick shift. Try out other desktop environments until you find one you like and most importantly ask questions.

Posted in Podcasts | Tagged | 2 Comments

Can’t copy from a PDF file.

Every so often I come across a PDF document that has been protected to prevent copying. You probably won’t notice this for a while until your copy and paste fails a few times. Finally you will see that the Edit -> Copy menu in Adobe Reader has been disabled/grayed out. Other readers like Okular show a more meaningful “Copying forbidden by DRM” message to alert you to what is going on.

The logic behind this feature is to prevent copying but is completely pointless because of the “if you can see it you can copy it” principle more commonly referred to as the analogue hole. A determined thief can take photographs of all the pages effectively bypassing all the content protection completely. Sure it’s not a digital copy of the text but they still have a digital copy of the image of the text and more importantly they have the confidential information you were trying to protect.

So all this protection achieves is forcing legitimate users to type text extracts instead of copying them. This will of course lead to errors in transcription and which will cause confusion down the line when your customers tries to order part number XI20458-AA7 when it is listed as X12O4513B-AA7 in the document. Can you spot the three differences ?

For the moment the solution is to convertĀ  the PDF to text using the pdftotext tool from the poppler-utils package on kubuntu.

$ aptitude show poppler-utils
Package: poppler-utils
[snip]
Description: PDF utilitites (based on libpoppler)
 This package contains pdftops (PDF to PostScript converter), pdfinfo (PDF
document information extractor), pdfimages (PDF image extractor), pdftohtml
(PDF to HTML converter), pdftotext (PDF to text
 converter), and pdffonts (PDF font analyzer).

To install on GNU/Debian based systems:

$ sudo apt-get install poppler-utils

Once this is installed you can simply run the command

$ pdftotext bla.pdf

This will output a file called bla.txt with all the text from the document. Oddly enough running

pdftohtml bla.pdf

results in the error “Error: Copying of text from this document is not allowed.”, so it remains to be seen how long it will be before pdftotext will be patched to remove this feature.

Posted in General | 5 Comments

Converting Word Documents to DokuWiki

I needed to convert some existing word documents to the DokuWiki format. After a quick search I realized that the best option was to:

  1. open the word document in OpenOffice.Org Writer and select File -> save as -> HTML
  2. use the program Html2DokuWiki.exe to convert the HTML to DokuWiki format.

This gave me a text file and a lot of graphics files of the embedded images.

In my case I wanted to be able to split this large file up into separate DokuWiki pages so that the document would be more manageable. This would allow several people to update different sections at the same time without running into locking issues.

After looking through the document I noticed that I wanted to split the document every time I came across the string “Section Title:”. I first thought of doing this in perl but then I found a bash one liner here that uses awk to split the document into smaller files.

$ awk '/Section Title:/ \r
{if (n) close(output); \r
output= f n++} n {print >> output }' \r
f=output.txt input.txt

This produces a series of files that are titled output.txt0, output.txt1, …, output.txtn. The first line of each is now something like this:

\ \ | **Section Title:** | Example_1: Example section| \ ||

After that I was able to rename the files to example_1.txt using the following script:

for i in output.txt*;do \r
 mv ${i} \r
`head -1 ${i} | \r
awk -F '|' '{print $3}' | \r
awk -F ':' '{print $1}' | \r
sed 's[^ [[g' | \r
tr "[:upper:]" "[:lower:]"`.txt;\r
done
Posted in General | Comments Off on Converting Word Documents to DokuWiki

Join IT – see the floor

July 31, 2009 is the 10th Annual System Administrator Appreciation Day. A day set aside for you to thank the people that keep the data flowing through the veins of your building. Having been a system administrator for a long time I appreciate the work that goes into keeping your computer, phone, pda, printer, tablet, or whatever connected and working. It’s a job where success is often gauged by how many people don’t notice changes.

On System Administrator Appreciation Day you get a chance to say thank you to the IT Crowd. It might be as simple as sending the help desk a email to comment on how well the systems are working. I know some people give gifts and others just grab them some coffee.

Personally, I like to give cake.

Happy 10th Annual System Administrator Appreciation Day !

Happy 10th Annual System Administrator Appreciation Day !

Posted in General | Leave a comment

HPR web2speech v 0.2 released

In episode ep0401 :: web2speech of Hacker Public Radio I introduce the world to web2speech. The episode shows how you can pipe standard input to standard output of various programs. It builds on my original idea of a Wikipedia text to speech tool and makes it more flexible.

I don’t think that anyone will actually use this but if you give I’d appreciate your feedback.

Posted in Podcasts | 1 Comment

HPR ep0386 :: SSH config file

This episode spawned from some feedback I sent to klatuu from The Bad Apples podcast. I’ve been using my .ssh/config to simplify long or commonly used ssh commands.

Say you want to login to your home machine (mymachine.dynamicdns.org) as user homeuser that’s listening on a non standard port of 1234.

ssh -p 1234 homeuser@mymachine.dynamicdns.org

You can shorten this to

ssh home

by adding the following to your .ssh/config file

Host home
	User homeuser
	Hostname mymachine.dynamicdns.org
        Port 1234

Probably not worth setting up if you’re not going to be using it often but if you start doing a lot of port forwarding then your command line can quickly get unwieldy.

ssh -p 1234 -L 8080:localhost:80 \r
homeuser@mymachine.dynamicdns.org

Just add the line below to the section to achieve the same result.

	LocalForward 8080 192.168.1.100:80

The nice thing is that you can add lots of LocalForward lines for a particular host. Another trick I use is to have different public/private key files for each group of server that I use. Normally you would use the -i switch

ssh -i ~/.ssh/work_id_dsa.pub homeuser@mymachine.dynamicdns.org

Just add the line below to the section to achieve the same result.

        IdentityFile ~/.ssh/work_id_dsa.pub

You can commands per host by placing them in the Host section or for all the hosts by placing them at the top of the file. Some common ones that I use are

  • ForwardX11 yes Use instead of using the -X switch to allow forwarding of X applications to run on your local X server.
  • ForwardAgent yes Use instead of using the -A switch to allow forwarding of the ssh-agent/ssh-add
  • Protocol 2 Use instead of -2 to ensure that only protocal 2 is used.
  • GSSAPIAuthentication no Use instead of -o GSSAPIAuthentication=no. This switch is used to provide Kerberos 5 authentication to ssh. Although the man pages say that GSSAPIAuthentication is off continue reading to see if the distro maintainers note that it is turned on. This is the case with Debian and Fedora based distros.

I started using this switch when I noticed that ssh connections were taking a long time to setup and I discovered that it was due to:
The default Fedora ssh_config file comes with GSSAPIAuthentication set to “yes”. This causes a DNS query in an attempt to resolve _kerberos. whenever ssh is invoked. During periods when connectivity to the outside world is interrupted for whatever reason, the ssh session won’t proceed until the DNS query times out. Not really a problem, just more of an annoyance when trying to ssh to another machine on the LAN.

So putting it all together a sample ~/.ssh/config file might look like this:

GSSAPIAuthentication no
ForwardAgent yes
EscapeChar none
ForwardX11 yes
Protocol 2

Host hometunnel
    User homeuser
    Hostname mymachine.dynamicdns.org
    LocalForward 8080 192.168.1.100:80
    Port 1234

Host home
    User homeuser
    Hostname mymachine.dynamicdns.org
    Port 1234

Host work
    User workuser
    Hostname mywork.mycompany.com
    IdentityFile ~/.ssh/work_id_dsa.pub

Host isp
    User ispuser
    Hostname isp.example.com
    IdentityFile ~/.ssh/isp_id_dsa.pub
Posted in Podcasts | Tagged , , , | 2 Comments