Tue Aug 11 00:14:20 CDT 2009
Splitting for reading on PDA
Splitting for reading on PDA
Now that I have a file that I can read and click on any word for a definition, I found it useful to break a bigger file into s maller files for reading on my PDA. This worked for me:
[mathieu2@durnik]~/opalescentca/blog/tech$ mkdir principe
[mathieu2@durnik]~/opalescentca/blog/tech/$ cp principe.html principe
[mathieu2@durnik]~/opalescentca/blog/tech/$ cd principe
[mathieu2@durnik]~/opalescentca/blog/tech/principe$ split -C 10000 principe.html
[mathieu2@durnik]~/opalescentca/blog/tech/principe$ rename 's/$/\.html/' *
[mathieu2@durnik]~/opalescentca/blog/tech/principe$ find -exec sed -i 1i"<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" > <html> <body>" '{}' ';'
Posted by Mathieu Allard
Fri Jul 31 01:30:57 CDT 2009
Point and click for definition
I thought I would share how I quickly got reading a text with every word pointed to wordreference.com. I find this useful where I'm reading a text in spanish where I am missing a lot of vocabulary and want to be able to point and click on the words I don't know for a definition. This is how I did so very quickly in Linux. oraculo.txt is a file that I saved as text from mozilla firefox. I then point my firefox browser to oraculo-finalu.html and I'm able to easily read my text.
[mathieu2@durnik]~/Desktop$ iconv
--from-code=ISO-8859-1 --to-code=UTF-8 ./oraculo.txt >
./oraculou.txt
[mathieu2@durnik]~/Desktop$ cat oraculou.txt
|sed 's/$/ 4444/' > oraculou2.txt
[mathieu2@durnik]~/Desktop$
cat oraculou2.txt |sed 's/\w\+/\<a
href\=\"http\:\/\/www\.wordreference\.com\/esfr\/\0\"\>\0\<a\>
/g' > oraculou3.txt
[mathieu2@durnik]~/Desktop$ cat
oraculou3.txt|sed 's/4444/<br>/g' > oraculo-finalu.html
Posted by Mathieu Allard
Thu Feb 26 16:30:09 CST 2009
Ubuntu 8.10 on the Toshiba u200
Linux on LaptopsSponsored by LinuxCertified Inc.
|
![]() |
Installing Ubuntu Intrepid 8.10 on Toshiba U200
Last updated: February 26th, 2009
I would personally recommend the use of this laptop with Linux, I have accelerated graphics, power management, wifi and sound working with it.
General Hardware Specifications of Toshiba U200:
I borrowed the specs from here because I wasn't able to find my laptop on the Toshiba site.|
Hardware
Components
|
Status
under Linux
|
Notes
|
| Processor: Intel Core Duo T2300E 1.66 GHz | Works | No special procedure required during installation. |
| Display: 12.1" Widescreen TFT XGA with TruBrite | Works | Select Generic LCD Display in Installer |
| Graphics: Intel GMA 950(integrated, 128MB shared) | Works | Use Xorg i810 driver. |
| Memory: 2x512MB DDR2 @ 533MHZ | Works | No special procedure required during installation |
| Hard-drive: Toshiba Serial-ATA 100GB, 5400RPM | Works | No special procedure required during installation |
| Integrated Network Card | Not Tested. | Not tested. |
| Internal 56k Modem | Not Tested. | Not tested. |
| Optical-drive: Matshita Super-Multi Double Layer DVD+/- RW | Works | No special procedure required during installation |
| Connectivity: Intel PRO/Wireless 3945ABG | Works. | Use Ubuntu ipw3945 module. |
| 6 Cell. | Works | No special procedure required during installation |
| Intel High Definition Audio | Works |
No special procedure required if using Kernel 2.6.x. |
| Integrated Card Reader. | Not tested. | Not tested. |
This laptop is operating under Ubuntu Kernel Version 2.6.27-9-generic.
- /etc/X11/xorg.conf
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Files"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" &nSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Modes "1280x800"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection
- df -hl
/dev/sda1 109G 101G 1.7G 99% /
tmpfs 501M 0 501M&nbs; /sys/kernel/security
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
gvfs-fuse-daemon 0 0 0 - /home/mathieu2/.gvfs
- lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
03:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 02)
03:0b.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
03:0b.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
03:0b.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
03:0b.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 14
model name : Genuine Intel(R) CPU T2250 @ 1.73GHz
stepping : 8
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc arch_perfmon bts pni monitor est tm2 xtpr
bogomips : 3457.97
clflush size : 64
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 14
model name : Genuine Intel(R) CPU T2250 @ 1.73GHz
stepping : 8
cpu MHz : 800.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc arch_perfmon bts pni monitor est tm2 xtpr
bogomips : 3458.00
clflush size : 64
power management:
Images By Name:
- e-mail address mathieu at mathieuallard.ca
|
Linux on Laptops is copyright © 2005
linux-on-laptops.com Privacy
Stateme Contact us at linuxonlaptops (at) gmail.com |
|
Posted by Mathieu Allard
Tue Mar 25 00:35:55 CDT 2008
Making .svi files for Samsung YP-T9 Under Linux
I tried software called svi coder to make files that would be compatible with my YP-T9 but this was unsuccessful. After getting in touch with the developper, the reason this software does not work is that there is some metadata in the file that is unknown that is needed to make the devices operate properly.
The only solution that I was able to find to be able to convert files that would work on the device was to install the Samsung Media Studio application with WINE. This was not a straightforward process under Linux. This is what I had to do:
1) install wine (version 0.9.46)
2) run winecfg and configure your wine machine to act like windowsXP
2) install ie6setup.exe
3) install a version of windows media player from the cd that came with the device (i had to do this because the microsoft website now make you certify your version of windows)
4) install using wine 20050205175658671_MediaStudio5_5132.exe (I downloaded this from the Samsung Website)
5) install from the Program Files\Samsung\Samsungapplication folder the free codecs package
Posted by Mathieu Allard
Tue Dec 11 03:46:20 CST 2007
Spanish text linking to wordreference.com from french/spanish translation
cp Homero\ -\ La\ Odisea.txt Homero\ -\ La\ Odisea.html
cat Homero\ -\ La\ Odisea.txt|sed 's/$/4444/' > Homero\ -\ La\ Odisea2.txt
cat Homero\ -\ La\ Odisea2.txt|sed 's/\w\+/\<a href\=\"http\:\/\/www\.wordreference\.com\/esfr\/\0\"\>\0\<a\> /g' > Homero\ -\ La\ Odisea3.txt
cat Homero\ -\ La\ Odisea3.txt|sed 's/4444/<br>/g'
cat Homero\ -\ La\ Odisea3.txt|sed 's/4444/<br>/g' > Homero\ -\ La\ Odisea4.html
split -l 25 Homero\ -\ La\ Odisea4.html
rename 's/$/\.html' x*
find . -iname '*.html'|cut -b3- |sed "s/^/\"/"|sed 's/$/\"/'|xargs perl -pi -e 's/charset=utf-8/charset=utf-8/'
Missing in the post is a step where I prepended a header to every .html file. I cut the files in smaller pieces to make it easier on the browser. The link to the final product is up.
Posted by Mathieu Allard
Sun Nov 18 05:26:38 CST 2007
Gusty Upgrade
Posted by Mathieu Allard
Mon Oct 8 14:43:06 CDT 2007
Toshiba U200
Posted by Mathieu Allard
Wed Sep 5 20:19:17 CDT 2007
New Partition and Filesystem Setup
An unintended consequence to this is that I have more security in the preservation in the files in my /home. By creating a squashfs disk image, I now have a static backup of the home directory, static backups were not part of my backup regime prior to this, I simply copied my entire filesystem using rsync. I did this because it was simple, but it put my files at risk in the event where they would become corrupted or if I accidentily deleted a branch of files which would be automatically deleted in my backup.
The other major alteration that I made to my setup was to re-encrypt all of the partitions on my filesystem. Luckily, Ubuntu now bundles cryptsetup in its initrds which made my filesystem encryption much easier. I wanted to scramble all of the filesystems on my disk and wanted to scramble even the root. To encrypt the root I had to make a custom initrd that allows me to decrypt the root. The custom initrd also contains the necessary key to decrypt the filesystem. I used my old notes as to how to setup the encrypted block devices and setup the initrd necessary to encrypt the drive. I now carry the laptop key much like I would carry a car key in the form of a mini-cd.
Making your own grub cd is very easy, instructions can be found here
This is the relevant sections of my resulting fstab:
//begin fstab//
#
proc /proc proc defaults 0 0
/dev/mapper/root / ext3 defaults,user_xattr,errors=remount-ro 0 1
/dev/mapper/swap none swap sw 0 0
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/mapper/home /mnt/home squashfs auto 0 0
/dev/mapper/usr /mnt/usr squashfs auto 0 0
none /home unionfs dirs=/home/=rw:/mnt/home=ro,auto 0 0
none /usr/ unionfs dirs=/usr/=rw:/mnt/usr=ro,auto 0 0
//end fstab//
I now have a much more secure albeit much slower and more complicated setup in my Linux laptop.
Posted by Mathieu Allard
Tue Jun 26 22:08:37 CDT 2007
Gimp and scripts
Turns out scripting in the gimp is fairly easy. I used the following link as a base for what I wanted to do:
http://www.gimp.org/tutorials/Basic_Batch/
and the following page to look at some syntax:
http://adrian.gimp.org/scripts/test.scm
In the following folder folder ~/.gimp-2.2/scripts I placed the file posterize.scm with the following contents:
(define (posterize filename posterfactor)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-message "gimp-posterize img layer" posterfactor)
(gimp-posterize drawable posterfactor)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)))
Then with one find command, I was able to posterize all ~400 files that I had in the folder that I was using.
find -iname '*.png' -exec gimp -i -b '(posterize "{}" 2)' '(gimp-quit 0)' ';'
After much processing time, I saved myself quite a bit of disk space.
Posted by Mathieu Allard
Fri May 25 12:31:33 CDT 2007
Udev Problem
Specifically, I am getting messages such as these:
--
[45887.989000] device-mapper: table: 254:3: linear: dm-linear: Device lookup failed
[45887.989000] device-mapper: ioctl: error adding target to table
--
I currently boot my Ubuntu using a mini cd that has a kernel, initrd and the tools necessary to decrypt and boot my encrypted swap and root. This problem with udev has only started since my upgrade to feisty.
The kernel version that I am using is 2.6.18 with some patches that I needed to apply for my last laptop to be able to read sd cards.
Furthermore, if I don't kill udevd, it eats up my cpu ressources and spits out messages as described above.
Any advice would be appreciated.
Posted by Mathieu Allard




