giovedì 27 dicembre 2012

Canon MF4350D and Ubuntu

Now there is a PPA for 64-bit drivers!

mercoledì 25 luglio 2012

Ubuntu USB Boot with Grub2

grub-install --no-floppy --root-directory=/media/E7E0-092F/ /dev/sdb cp ubuntu-12.04-desktop-i386.iso /media/E7E0-092F

Edit /media/E7E0-092F/boot/grub/grub.cfg

menuentry "Ubuntu 12.04 ISO" { set isofile="/ubuntu-12.04-desktop-i386.iso" loopback loop (hd0,msdos1)$isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject initrd (loop)/casper/initrd.lz }

martedì 29 dicembre 2009

Crosscompilation for armel with emdebian

First of all create a chroot with debootstrap:

debootstrap lenny armchroot

Then let's go to fix locales:

mount none -t proc armchroot/proc
chroot armchroot
@armchroot: apt-get update && apt-get install locales&& dpkg-reconfigure locales && apt-get install localepurge

The last important part is to install emdebian-tools

@armchroot: apt-get install emdebian-tools

@armchroot: apt-get update && apt-get upgrade

Now we have to edit /etc/emsource.conf to use stable

targetsuite: lenny

Now it's time to setup emdebian. We want to crosscompile to armel so:

@armchroot: emsetup -a armel

This last command will install and configure the toolchain.

Gitweb with Lighttpd on a debianized NSLU2

First of all install Lighttpd gitweb and git

apt-get install lighttpd gitweb git-core

Then add a lighttpd configuration file.

server.modules += ( "mod_cgi" )
url.redirect = ( "^/git$" => "/git/" )
alias.url += ( "/git/" => "/usr/lib/cgi-bin/" )
$HTTP["url"] =~ "^/git/" {
cgi.assign = ( ".cgi" => "" )
index-file.names = ( "gitweb.cgi" )

Wrote this in /etc/lighttpd/conf-available/10-gitweb.conf.
The copy the three files in /usr/share/gitweb in /var/www.
Now edit projectroot field in your gitweb configuration file in /etc/gitweb.conf:

$projectroot = "/your/directory/git";

Save /etc/gitweb.conf and enable gitweb configuration for lighttpd:

lighttpd-enable-mod gitweb
invoke-rc.d lighttpd force-reload

An UML2 Diagram editor for Linux

Googling I found Gaphor. Iwas bored of Dia. Gaphor uses dia canvas but it's more UML2 oriented ant it's write in python!
Unfortunally debian package of gaphor depends on python-zope.interface that is broken.
So I decided to use python-virtualenv to install gaphor.

As root:

root@thelemasys:~# aptitude install python-virtualenv

And then as user:

denever@thelemasys:~$ virtualenv gaphor
denever@thelemasys:~$ cd gaphor
denever@thelemasys:~/gaphor$ source bin/activate
(gaphor)denever@thelemasys:~/gaphor$ easy_install gaphor
(gaphor)denever@thelemasys:~/gaphor$ gaphor

giovedì 5 novembre 2009

Configuring a Canon MF4350D on Ubuntu Karmic Koala 64bit

First of all you have to download Canon propetary drivers from here.

After you download Canon_UFRII_Linux_V1.90_[your country code here].tar.gz, untar it.

That will create a directory: Canon_UFRII_Linux_V1.90_IT/

denever@tuscio:~/tmp/src$ cd Canon_UFRII_Linux_V1.90_IT/
denever@tuscio:~/tmp/src/Canon_UFRII_Linux_V1.90_IT$ cd 64-bit_Driver/
denever@tuscio:~/tmp/src/Canon_UFRII_Linux_V1.90_IT/64-bit_Driver$ cd RPM/

In this directory you will have two rpm:

denever@tuscio:~/tmp/src/Canon_UFRII_Linux_V1.90_IT/64-bit_Driver/RPM$ ls
cndrvcups-common-1.90-1.x86_64.rpm cndrvcups-ufr2-uk-1.90-1.x86_64.rpm

Now you have to convert these two rpm in two debian package (.deb).
To do this you will need alien program installed.

sudo apt-get install alien

After you installed alien you can convert the two rpm:

alien cndrvcups-common-1.90-1.x86_64.rpm
alien cndrvcups-ufr2-uk-1.90-1.x86_64.rpm

After that you have to install ia32-libs.
This package is really important for the right use of the driver:

sudo apt-get install ia32-libs

And now you can install the two debs:

sudo dpkg -i cndrvcups-common_1.90-1_amd64.deb
sudo dpkg -i cndrvcups-ufr2-uk_1.90-1_amd64.deb

giovedì 30 luglio 2009

How to extract an image from a swf?

root@evans:~# apt-get install swftools
denever@evans:~$ swfextract file.swf
Objects in file file.swf:
[-i] 3 Shapes: ID(s) 2, 4, 6
[-j] 3 JPEGs: ID(s) 1, 3, 5
[-f] 1 Frame: ID(s) 0
denever@evans:~$ swfextract -j 1 -o image1.jpg
denever@evans:~$ swfextract -j 3 -o image3.jpg
denever@evans:~$ swfextract -j 5 -o image5.jpg