Random Ramblings

Multi network freedom router

January 18, 2012 at 10:00 AM | categories: my projects

This is an idea I've been kicking around for a few months now. I was inspired to write it up by bdales talk today at linux.conf.au on the freedom box. This just an idea (I'm not able to implement it) but I think it has merit and others might find it interesting to work on if they choose.

After bdales talk I realised that my idea sounds like it could be run as a sub team of the freedom box project, or working closely with them. They seem to have very similar ideals and goals, but focusing on different parts of the problem.

The idea: An appliance/router that is connected to the Internet, Tor and i2p which is capable of routing the network clients sitting behind it on to the networks with no/minor configuration changes. It would make sense to support things like OpenVPN, or anything else available in Debian - this would require considerable work though.

The appliance should try to improve peoples privacy (using tools like privoxy) and try to reduce information leakage - A whole new kettle of fish though.

I feel it would be handy to have optional caching, as that could be useful when pulling files in over the slower Tor/i2p links.

This project would not be without its problems. Issues around integration aside, there are lots of other issues to work out:

  • tying these protocols together might cause holes in firewalls
  • making it user configurable. This is tricky, as anything past turn on, turn off involves interaction with other services
  • keeping the device secure and up to date
  • routing between the protocols. Its possible its impossible to do this transparently to the user, in which case making client configuration easier would become vital.

Thoughts on these thoughts? Let me know


Experience setting up a Lexmark Platinum Pro905

November 24, 2011 at 10:00 AM | categories: opinion, howtos and guides, my projects

We just got a printer, and we went for a Lexmark Platinum Pro905 from Harvey Norman. Here is some notes I made about its setup.

Setting it up

  • Put it all together before plugging the power in
  • The printer will automatically turn on when it gets power
  • Ignore all the online/printed instructions, configuration of the printer (and WiFi) can be done from the touch screen without installing anything on the computers.

Be aware that:

  • It appears to reboot if it crashes, but does so without explaining why (Magic reboot while trying to set up networking, yay!)
  • Turns out the wrong passphrase in WiFi configuration might have caused the reboots - now thats a poor effort.
  • There is no way to see the full passphrase once entered on the touch screen.
  • There is no way to correct AP settings after adding them (eg fixing a typo in the ap config) other then re setting up the encrypted wifi.

Printing to it

Needs the proprietary Lexmark drivers, or one of the bundled supporting applications (I suspect the latter is the real killer), so don't buy or use this if you care about software freedom.

Lack of information

Researching this device is rather annoying. I can't find anything that talks about if the printer supports postscript or PCL anywhere on the Lexmark website.

What do I know about it?

Stuff all, other then it listens on port 9100 like an HP printer. This might be a clue that it uses HP tech under the covers, but its not something that its safe to assume.

Because of this I'm left with questions:

  • Do the bundled drivers explain it?
  • Do they work well?
  • Whats the firmware update do? Make it work as a PCL or postscript printer? That would be nice.

PPD extraction script

Because it wasn't obvious what was needed to print to it (a detail somewhat bizarrely missing from all technical details of the printer) I decided to extract the ppd files for myself and find out what was what. On the off chance it would be useful to someone else, I wrote the script to extract the ppds so whoever else might want to see them can cut out the discovery part of their printer setup. (Its nothing special, its just unwrapping layer upon layer of different archives)

#!/bin/bash
# Extract lexmarks drivers from their deb bundles
# Run it from the dir with the printer deb.sh in it

# Where we will extract
tempdir="/tmp/$$"
# Where our ppds go
output="/tmp/output-ppds.$$"
# amd64 is the other option
ourarch="i386"

mkdir $tempdir

# Extract the self installer manually
./lexmark-inkjet-legacy-1.0-1.$ourarch.deb.sh \
        --noexec --target $tempdir

cd $tempdir

# unpack the archive component
tar --lzma --extract --file instarchive_all

# Extract the deb as a tar
# Use tar to extract only the ppd files from it
dpkg --fsys-tarfile lexmark-inkjet-legacy-1.0-1.$ourarch.deb \
  |tar --wildcards '*.ppd' --extract

mkdir $output
mv usr/local/lexmark/legacy/etc/*ppd $output

echo "Look in $output for the ppds"

rm -r $tempdir

Does it work on generic drivers?

No. Not without lexmarks drivers.

I tried the 'PCL 6/PCL XL Printer' drivers, as well as the 'Postscript Printer' (Generic, foomatic) drivers as shipped in Debian - both failed. Thats a rather disappointing result for something thats ostensibly a network printer.

Installing lexmarks drivers

Basic steps to install the driver:

  • run the script ./lexmark-inkjet-legacy-1.0-1.i386.deb.sh (or your arch/package format as required). These seem to have a weird glitch where they won't install properly if you don't have a root password (may be inherited from system-config-printer, where I found something similar). If you hit the glitch, use sudo or gksudo to get root for running it.
  • agree to the 'I agree that lexmark can beat me up in a dark ally' licence agreement. It contains choice quotes like these: "I agree that this patented printer is licensed for, and designed to work with only genuine Lexmark ink cartridges for the life of the patented printer. I agree to: (1) use only genuine Lexmark ink cartridges with this printer ..." "I agree that the patented print cartridge(s) shipped with this printing device are sold subject to the following license/agreement: The patented print cartridge(s) contained inside is/are licensed for a single use only and is/are designed to stop working after delivering a fixed amount of ink ..." "12. APPLICABLE LAW. This Software Licensing Agreement is governed by the laws of the Commonwealth of Kentucky, United States of America. No choice of law rules in any jurisdiction shall apply. The UN Convention on Contracts for the International Sale of Goods shall not apply."
  • Hit next. It goes and installs, doing things like reloading udev rules, adding temp files to /root and installing both bundled .debs - whether you want them or not.
  • Wait a moment while it closes the installer and launches a configuration application, then step through to your taste.

If someone knows how to get it working with free/generic ppds let me know, because I'd be happy not to agree to that licence again... (I'm also wondering what happens for people who didn't agree to it but set up the printer, does Lexmark think they have sway over them?)

Extracted PPDs

So, what do they tell us? I'll take a quick peak at lxPro800-Pro900.ppd, since its the one which covers my Lexmark Platinum 905p printer. A quick 'head' of the other files looks quite similar so far.

*% PPD file for Lexmark Pro800-Pro900 Series with CUPS.
*% Created by the CUPS PPD Compiler v1.2.3.
*%
*%  Adobe PostScript(R) Printer Description File
*%
*%  Produced by Lexmark International, Inc

So far so good, at least we know there is a fair chance it'll do postscript. If we're super lucky, we might be able to use Proper postscript, not some wacky Lexmark version of it.

A few lines down we see this

*Path: "/usr/local/lexmark/legacy"
[...]
*cupsFilter: "application/vnd.cups-raster 0 /usr/local/lexmark/legacy/bin/printfilter"

Seems there is more custom magic in there then I'm willing to toy with, so I don't appear to have been super lucky after all :/

Impressions of lexmark

I'll be nice here. They're trying, not they aren't 'there' yet. - Broken website (downloads pages counting in bytes and generating overflow errors). EG. "File Size 2.5195788E7" - Incorrect doco in printed manual ('.docx (Microsoft Wword Open Document Format)') - Proprietary PPDs, and nasty licence agreement (ref above for those) - Using a GPL installer and not mentioning it, anywhere (and no offer of source). (see my follow up post on this)


Using shell instead of make

November 23, 2011 at 10:00 AM | categories: opinion, my projects

This post is just a collection of thoughts around the idea of using a semi formalised subset of posix shell for make usage instead of the current make language. The aim would be to try and keep the language to 2-3 pages max with some, some key syntax and keywords.

Notes; Use the bashfaq so i don't suggest stupid shit. make should keep operating as it does but without its own language

comment from deb-dev recently (feb 2012) about making being proces driven and shell being 'just a language'

-> one library in smk (make in shell), at most 10-15 functions to do common things. everything else can be written as needed. -> optionally make more libs as required to do common things. key point: core 'make' functionality is small, extensibility is large.

# Other notes

< Kamping_Kaiser> btw. is there anything that 'make' does (well) that you couldn't do with posix sh? < Kamping_Kaiser> i've been trying to work out recently if make has any features, or if its just there to make life nastier < pabs> free dependency tracking < Kamping_Kaiser> oh, you mean make foo depending on make bar?

# References http://www.conifersystems.com/whitepapers/gnu-make/ http://cj5.info/pmiller/books/rmch/ (?) http://mywiki.wooledge.org/BashFAQ


Transferring a domain name to Jumba

November 23, 2011 at 10:00 AM | categories: website, opinion, my projects

I've decided to start moving away from domaincentral - their web UI was always horrible, and now they have bumped up the price of their service. I saw Jumba mentioned on the SAGE-AU list as a cheap but reliable provider and I thought I'd give them a go. Because I'd not gone through this before, here is a bit of a story about what happened.

First to move is medeopolis.com. Its a domain I'm planning to use later in the year, but nothing is associated with it yet. As a .com its handled differently to the .au domains, but I only have one of them anyway (kgoetz.id.au).

What happens

  • I decide I want to transfer the domain
  • Email domaincentral for my domain key
  • Register an account with Jumba
  • Put in the domain key on the Domain central website, wait about a week
  • Got an email from domaincentral asking me to verify my whois info
  • Got an email asking me to follow a link to confirm (details taken from whois entry). I followed the link and selected 'I approve'
  • Jumba charge you for 12 months service ($11 at the time of writing) on transfer of a domain
  • Got an email saying I can cancel the transfer in the next 3~ days and not to do anything if I want it to go through.
  • 1-2 weeks later get a message from Jumba to let me know the domain is transferred.

All done!

Only catch is to log into Jumba domains you need to use the domain name+password in the email; your username+password won't work.

I'm yet to really shake down the Jumba UI, but so far its not looking all that much easier then domaincentral - fingers crossed and I'll provide an update later :)


Building a new website - for real

November 01, 2011 at 10:00 AM | categories: website, hacking around, my projects

Writing a tool to generate my website has been on the todo list for years. Unfortunately I had a very specific idea of how I wanted it to work and didn't expect (but didn't look very hard) that anyone else would have written it yet.

Fortunately for me someones come pretty close! The tool is rest2web , and it will take a directory tree containing rest files and transform it into a website.

Annoyingly its not really working out. Its taking lots of hacking, I keep finding issues, and upstream has lost their source repository. Despite the hours I've spent on it I've decided to try an alternative - Blogofile.

I was hoping for something 'minimal impact' like rest2web in the sense that it doesn't require template systems and lots of dependencies to work. rest2web has a single html template (optionally overridden per directory with your own)) and provides default css. The flip side of that (as I discovered) was that every directory needed its own index.txt with special metadata, and each post needed a heading to provide some settings to rest2web (Although this can be skipped with --force).

On the other hand, blogofile seems to move the heavy lifting to the front - it does require a template system (mako) and requires you to have a metadata section in posts. The basic templates and CSS provided are very bare bones, but you can choose to use the templates from the main website if you wish (I opted for basic templates, and I've slowly been expanding the site from there).


Next Page ยป