DebianDebian

Debian related stuff

Canon IP1800 – update

In my last post I mentioned how to get this printer working in Debian, and since then have found a better (no ignoring dependancies) method.

Taken from: http://nomo17k.wordpress.com/2009/03/22/canon-pixma-ip1800-for-debian-lenny/

Sunday, March 22, 2009

Canon PIXMA iP1800 for Debian Lenny

Filed under: Debian, Lenny, Linux — nomo17k @ 12:51

This is a cheap inkjet printer that I got for my temporary printing needs. The cartridges are very expensive (> $16 !!), so for heavy use this isn’t really worth my money. Anyways…

Install CUPS and printing-related packages:

# apt-get install cupsys cupsys-client libcupsys2
# apt-get install cupsys-driver-gimpprint cupsys-bsd
# apt-get install foomatic-db-engine foomatic-db-gimp-print foomatic-filters
# apt-get install hp-ppd linuxprinting.org-ppds printfilters-ppd
# apt-get install foomatic-filters-ppds
# apt-get install gs-gpl libpng3 ijsgutenprint

(Note that I downloaded a few packages that are not necessary for this particular printer. This is a generic collection of packages that I find useful to use printers in other places like my office.)

Download deb packages of the printer driver:

cnijfilter-common_2.70-3_i386.deb
cnijfilter-ip1800series_2.70-3_i386.deb

and install them:

# dpkg -i cnijfilter-common_2.70-3_i386.deb cnijfilter-ip1800series_2.70-3_i386.deb

If CUPS has been installed properly, visit the CUPS admin page (http://localhost:631/admin) with your browser. You will be able to configure the printer in the standard CUPS way.

Taken from: http://nomo17k.wordpress.com/2009/03/22/canon-pixma-ip1800-for-debian-lenny/

I copied and pasted so I have a copy incase that site disapears.

Debian Mirror and GPG issues

So I had a mirror up and running beautifully, and then after running the update scripts I lost the GPG authentication.

I was getting the following errors:
WARNING: The following packages cannot be authenticated!
foo bar baz
Install these packages without verification [y/N]?

I struggled for a while to get this to work, and then gave up, but I finally got this sorted out :)

Firstly as the user running the mirror script:
gpg --no-default-keyring --keyring ~/.gnupg/trustedkeys.gpg --keyserver hkp://subkeys.pgp.net --recv-keys

I needed to add the following keys:
16BA136C – Backports.org Archive Key
55BE302B – Debian Archive Automatic Signing Key (5.0/lenny)
F42584E6 – Lenny Stable Release Key
55BE302B – Debian Archive Automatic Signing Key (5.0/lenny)
0C5A2783 – Medibuntu Packaging Team
1F41B907 – Christian Marillat
437D05B5 – Ubuntu Archive Automatic Signing Key
6DFBCBAE – Sun Microsystems, Inc. (xVM VirtualBox archive signing key)
BBE55AB3 – Debian-Volatile Archive Automatic Signing Key (4.0/etch)

The Medibuntu key was a little strange to get as noted on this post: How To: Make Your Own Ubuntu Repository DVDs

Also removed the “–ignore-release-gpg” option from the scripts, this will at least warn me the next time something like this happens… ;)

And then run the mirror scripts again and voila

Apache mod_rewrite tips and tricks

So I was trying to solve a weird redirect issue: Request exceeded the limit of 10 internal redirects due to probable configuration error.

I found this site, which had quite alot of info.

One tip I really liked was:

Cache-Friendly File Names

This is probably my favorite, and I use it on every site I work on. It allows me to update my javascript and css files in my visitors cache’s simply by naming them differently in the html, on the server they stay the same name. This rewrites all files for /zap/j/anything-anynumber.js to /zap/j/anything.js and /zap/c/anything-anynumber.css to /zap/c/anything.css

RewriteRule ^zap/(j|c)/([a-z]+)-([0-9]+)\.(js|css)$ /zap/$1/$2.$4 [L]

Local development – multiple vhosts

As with alot of devs out there, I have a couple of virtual hosts setup. It is rather annoying to keep updating the /etc/hosts file. I came across “42foo: all the virtual hosts you need for your web development” which has helped alot. But this was not enough, the virtual hosts are still static, then I found “Dynamically Configured Mass Virtual Hosting“.

So now I have the following setup:

/etc/dnsmasq.conf

no-resolv
server=<DNSSERVER>
address=/.local/<DEVSERVERIP>
no-hosts

/etc/apache2/conf.d/multi_vhost (on the devserver)

# get the server name from the Host: header
UseCanonicalName Off

# this log format can be split per-virtual-host based on the first field
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog /var/log/apache2/vhost_access_log vcommon

# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /var/www/%0/

<Directory /var/www/>
 AllowOverride All
 Order allow,deny
 Allow from all
</Directory>

Apache requires the mod_vhost_alias module to be loaded.

And this is it, all that is needed now is to have a symlink/directory in /var/www/ with the name of the virtualhost pointing to the document root of the dev site.

EG: /var/www/test.local -> /home/<user>/Development/test/webroot/

So now no more editing multiple files, all I need is to create a symlink and sorted :)

P.S. I did find that the Avahi daemon was causing issues see Bug #80900

To disable the Avahi daemon:

sudo invoke-rc.d avahi-daemon stop
sudo update-rc.d -f avahi-daemon remove

UPDATE: I needed to add the directory clause to multi_vhost as I needed to use .htaccess files ;)
UPDATE 2: There was also an issue with mod_rewrite (Request exceeded the limit of 10 internal redirects due to probable configuration error.) This was only happening to sites with a .htaccess. The solution was to add:

RewriteBase /

Microsoft Tax– Howto get a refund

Was going through my rss feeds and found the following on Planet Ubuntu: http://simos.info/blog/archives/1000

I now can’t wait till I get a new PC :)

Hopefully this helps others out there who don’t need/want windows, there are other alternatives: http://distrowatch.com

Phone update – Nokia 5800 XpressMusic

So, I’ve been using this phone for a while now, and it’s quite awesome… Well when using all the features the battery only seems to last about a day and a half, but that’s with WIFI and GPS on, so not too surprized…

The GPS and Nokia maps isn’t too bad, managed to get me to a couple of places I needed to go, one annoying thing though is that sometimes it wants me to take an offramp and then an onramp to the same hiway… *weird*

Still need to try get this phone to sync with my PC, just havn’t really had the time to play with it…

I really like the touch screen, and the multiple”keyboards” pity they only in qwerty format… and too small to use like a pc keyboard…

Well overall I think it was a great choise, now to find some decent logging software so I can contribute to openstreetmaps.org

MySQL group_concat not returning all data.

So working on a project for work, and it was not behaving as expected. I was selecting all the ID’s from a table that was linked to a couple of other tables, it turns out that it wasn’t returning all the id’s as expected as there is a limit on the amount of data that GROUP_CONCAT will return. MySQL Manual – GROUP_CONCAT

Well instead of using GROUP_CONCAT I’m now selecting the id’s individually, and this is now working.

Also there seems to be a limit on the number of items you can have in a IN clause: SELECT * FROM table WHERE field IN (xxx,xxx,xxx) so I’ve had to split these into 1000 peice chunks.

All seems to be working now after that, we’ll see how it goes… :)

Installing Gwibber under Debian Lenny

Looking around for a new Twitter client that has support for both twitter and identi.ca and came across gwibber, there are no deb so I couldn’t install it on Debian untill I found this.

Looks good :)

Debian Lenny – Finally released

So today Debian Lenny has been officially released, and I’ve been using it for a couple of months and it’s been great…

Can’t wait to see what happens from here on, apparrently a lot of changes are happening with the Debian teams…

Good times :)

Keep up the good work all involved in Debian

Git colors

I’ve been using Git for a while now and am enjoying it over SVN. Especially the fact that it’s distributed.

Well recently I was having an issue with the color output:

<config ~/.gitconfig>
[color]
ui = auto
</config>

After enabling colors I was getting the following:

#       ESC[31mmodified:   cms/config.phpESC[m

And then I found an entry on the GitFaq which fixed the issue :)

<config ~/.gitconfig>
[core]
pager = less -FXRS
</config>

Hope this helps someone else having the same issue.