Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Wednesday, July 8, 2009

Installing PalmDesktop and DocumentsToGo under WINE

I needed to syncronize (MS)office documents on my PalmOS device with several PCs. Some are Windows based and there is no problem using DocumentsToGo. Some are Linux based and there is (at the moment) no clone for DocumentsToGo. Besides other tricky ways (mostly using an SD card or RAMDrive with CardExport: no bluetooth or wifi on my Treo 600), the last option was to run DocumentsToGo under WINE, but the initial report was not encouraging.
But merging some experiences from the web and some trial and error, I managed to install it, with reference to:
  • ubuntu 9.04;
  • WINE 1.0.1;
  • PalmDesktop 4.1;
  • DocumentsToGo 8.0.1.

PalmDesktop is actually not working, but HotSync is (it syncs) and DocumentsToGo also (it converts and syncs). My steps were:

  1. download winetricks (Wine Wiki);
  2. install cabextract via synaptic (same Wine Wiki);
  3. install Windows Installer 2.0 and Internet Explorer 6 via winetricks (same Wine Wiki);
  4. configure WINE to behave as "Windows98" (later versions make the installer crash);
  5. run the PalmDesktop installer (if it stops responding, cancel and then retry);
  6. run the DocumentsToGo installer (mine gives an "Error 1904", ignore, press OK);
  7. install pilot-link via synaptic;
  8. add udev rules for Palm devices (Ubuntu Help);
  9. add module "visor" to /etc/modules (same Ubuntu Help);
  10. reboot
  11. configure HotSync on the linux box to use "Network" and select the right (Palm) user under Setup->Network;
  12. configure HotSync on the Palm device to sync through the network under HotSync->LANSync Prefs.
To use it:

  1. be sure HotSync is running and press the sync button;
  2. in a terminal, give the command:
    pilot-nredir -n -p /dev/pilot;

For a replacement of the non-working PalmDesktop, look for "Evolution" in the repositories.
You may want to install the "gnome-pilot" too. There is bug in the panel applet for ubuntu 9.04, but there is a fix for the 32bit version and one for the 64bit version.

Tuesday, June 30, 2009

Re-installing EEEbuntu (3.0) on an eeePC

The experience with EEEbuntu 2.0 was not completely satisfactory. I'm trying now with version 3.0, with the hope for more boot speed and performance.
Dual boot configuration with Xandros (which is on /dev/sda2, with "home" partition on /dev/sdb1).
  1. get EEEbuntu Base;
  2. run the eeebuntu ("base" cd version) installer:Link
    • install / (root) folder on /dev/sda1;
    • install /usr folder on /dev/sdb2 (no space left on sda);
  3. reboot (boot time 45 sec.);
  4. install better network manager "wicd";
  5. install OpenOffice;
  6. take a snapshot of /dev/sda1 and /dev/sdb2 with partimage (record 1);
  7. install a faster kernel (eeepc-lean) from array.org;
  8. reboot (boot time 33 sec.);
  9. remove some virtual consoles (tty7 is for X and tty1 is for text, Knowledge76 article):
    # rm /etc/event.d/tty2
    ..
    # rm /etc/event.d/tty6
  10. add "rootfstype=ext2" to grub boot instructions (avoid kernel very little guessing time, Debian Italia post);
  11. add "noresume" options to grub boot instructions (if hibernation disabled, avoid kernel looking for resume image Debian Italia post);
  12. replace the bash shell with the faster (for scripts) dash shell (Ubuntu wiki):
    # apt-get install dash
    # dpkg-reconfigure dash
  13. improve performance by setting "noatime" option (instead of "relatime" or "atime") in fstab entries (same Debian User forum post);
  14. remove create_floppy_devices, pcmcia-check-broken-cis, pcmcia-socket-startup from /lib/udev;
  15. improve boot time by disabling some services (same Knowledge76 article);
  16. reboot (boot time 32 sec.);
  17. install mc and set it to use the internal editor (mcedit) through Options->Configuration;
  18. install gimp;
  19. install totem;
  20. install moonlight plugin for firefox;
  21. install Adobe flash player plugin for firefox;
  22. enable archive.canonical.com ("Third party") repositories
  23. install acroread
  24. install Medibuntu repositories and non-free codecs (Ubuntu help)
  25. install wine;
  26. install exifer (win32);Link
  27. install xnview (win32);
  28. update kernel to version 2.6.29-1-netbook;
  29. reboot (boot time 28 sec.);
  30. take a snapshot of /dev/sda1 and /dev/sdb2 with partimage (record 2);
  31. install eeepc-laptop-dkms (to make Fn-F2 work again);
  32. install PalmDesktop (win32) and DocumentsToGo (win32) (my way, coming soon);
  33. fix broken "Scroll Lock" (Fn+F12) button (EEEbuntu forum);
  34. install some plug-in ("Terminal here", "Open as administrator") for nautilus via Synaptic;
  35. install GDM theme ("Simply Grace");
  36. configure login windows (users, faces, timed login);
  37. install AbiWord;
  38. install TrueCrypt;
  39. install GnoCHM;
  40. ...

Sunday, April 5, 2009

Installing Avant Window Navigator (AWN)

under "Lightweight X11 Desktop Environment" (LXDE) and Compiz with EEEbuntu.
With reference to an eeePC 900 with EEEbuntu base installed, I had some troubles in getting AWN to work nicely, due to some lack of information.
Compiz is easy to install (Ubuntu Help):
apt-get install compiz compizconfig-settings-manager
and also to start automatically, once you figured how to; edit /etc/xdg/lxsession/LXDE/config so that this line says:
window_manager=compiz

AWN is in the repositories as well:
apt-get install avant-window-navigator awn-manager
To start it automatically (after Compiz is running) edit /etc/xdg/lxsession/LXDE/autostart appending this line:
@avant-window-navigator


Now restart X by hitting ctrl-alt-bkspc.

Tuesday, February 24, 2009

Enabling TuxOnIce hibernation with EEEbuntu

Enabling hibernation (suspend to disk) support is a bit tricky, and I never found a good and complete tutorial. Also mine is not, but after several attempts I got hibernation working and now I want to record my steps, to be able to repeat them.
On EEEbuntu, hibernation is possible through "swsuspend" which is told to be slower than "TuxOnIce" (true) which is told to be faster than normal booting without resuming (true, but not impressive).
TuxOnIce needs to be patched into the kernel and compiled, and can completely replace swsuspend without reconfiguration.
My steps were (mixing different guides, an EEEbuntu forum post and TuxOnIce wiki):
  1. check that swsuspend is working;
  2. check that the package hibernate is installed;
  3. open a terminal for the normal user;
  4. become "root":
    # sudo bash
  5. install "git-core":
    # sudo apt-get install git-core
  6. clone the Array kernel for Intrepid:
    # git clone git://git.array.org/array/ubuntu-intrepid.git
  7. enter the directory:
    # cd ubuntu-intrepid
  8. join the split config files to a .config for the kernel:
    # cat debian/config/i386/config debian/config/i386/config.eeepc > .config
  9. check kernel version:
    # uname -r
  10. download a suitable patch from TuxOnIce site;
  11. apply patches:
    # bunzip2 -c path/to/patchname.patch.bz2 | patch -p1
  12. choose TuxOnIce options:
    # make oldconfig
    (press enter on all, except say Y for IGNORE_LATE_INITCALL);
  13. install some tools:
    # sudo apt-get install kernel-package libncurses5-dev fakeroot
  14. choose your config options:
    # make menuconfig
  15. move config where ubuntu looks for it, and make a backup:
    # cp .config debian/config/i386/config.eeepc
    # cp .config config
  16. if you want to change the config later, just do:
    # cp config .config
    # make menuconfig

  17. create a file:
    # sudo nano /usr/share/initramfs-tools/scripts/local-premount/tuxonice_do_resume
    with the following content:
    #!/bin/sh
    PREREQ=""
    prereqs()
    {
    echo "$PREREQ"
    }
    case $1 in
    # get pre-requisites
    prereqs)
    prereqs
    exit 0
    ;;
    esac
    if [ -d /sys/power/tuxonice ]; then
    echo 1 > /sys/power/tuxonice/do_resume
    fi
  18. compile:
    # fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
  19. in the parent directory there are now two .deb packages to install:
    # cd ..
    # sudo dpkg -i *custom*.deb
  20. reboot using the new kernel and the new initrd;
  21. check the new GRUB entry has the boot kernel option like "resume=swap:/dev/xxx";
  22. check hibernate is working, by typing in a console:
    # sudo hibernate -v3 --no-suspend
  23. check that resuming is possible, because some buggy initramfs building scripts fail to include the tuxonice_do_resume file into the new initrd
    • inspect the new initrd:
      # follow this
    • if not OK, add the file, create an initrd again:
      # follow this
    • and replace it;
  24. check that the hibernate button is visible; if not, use gconf-editor to tick "can_hibernate" property (go to apps -> gnome-power-manager -> can_hibernate);
  25. test hibernating and resuming.
Even if the test succeded, I gave up: too slow. I'll wait for GRUB to boot directly from resume image.

Re-installing EEEbuntu (2.0) on an eeePC

Due to some limitations of the preinstalled Xandros, I'm switching to EEEbuntu. I hope to get this ubuntu-based distribution boot faster with some tweaking. In the meanwhile I'm also keeping Xandros, because I like its 15 sec. boot time. My 900 model has two SSDs, 4GB (faster) and 16GB (slower); so I'm planning to boot both Xandros and EEEbuntu from the first small but faster device: I'll have to split the EEEbuntu installation across two partitions on two different devices.
  1. get EEEbuntu Base;
  2. install in a partition on the 16GB one (let's say /dev/sdb2);
  3. reboot (boot time 46 sec., from grub menu to welcome sound with autologin);
  4. take a snapshot of /dev/sdb2 with partimage (record 1);
  5. shrink the Xandros partition to make room for an EEEbuntu partition (let's say /dev/sda3);
  6. move everything except /usr from /dev/sdb2 to /dev/sda3;
  7. on /dev/sdb2, move everything in /usr to the parent directory (/);
  8. on /dev/sda3, make a new /usr folder;
  9. on /dev/sda3, edit /etc/fstab to mount /dev/sdb2 to /usr;
  10. fix grub boot instructions accordingly (grub root is now "(hd0,2)", kernel option "root=/dev/sda3");
  11. reboot (boot time 40 sec.);
  12. if ok, take a snapshot of /dev/sda3 and /dev/sdb2 with partimage (record 2);
  13. install a faster kernel (eeepc-lean) from array.org;
  14. fix grub boot instructions accordingly;
  15. reboot (boot time 38 sec.);
  16. fix some hardware (Fn-) keys issues (EEEbuntu forum #1) with eee-control installed from synaptic;
  17. run eee-control tray applet at startup (System -> Control center -> Sessions -> Add, fill with /usr/bin/eee-control-tray);
  18. install TuxOnIce (my way);
  19. improve boot time by disabling some services (Knowledge76 article):
    als-utils
    anacron
    apmd
    apparmor
    apport
    atd
    bluetooth
    bootlogd
    cron
    dns-clean
    pcmciautils
    ppp-dns
    rmnologin
    rsync
    stop-bootlogd
    stop-bootlogd-single
    sysklogd
    ufw
    usplash
  20. remove cron, logrotate, sysklogd (Debian WiKi):
    # apt-get remove cron logrotate sysklogd
  21. remove "splash" option from grub boot instructions (usplash service is removed);
  22. add "rootfstype=ext2" to grub boot instructions (avoid kernel very little guessing time, Debian Italia post);
  23. add "noresume" options to grub boot instructions (if hibernation disabled, avoid kernel looking for resume image Debian Italia post);
  24. remove some virtual consoles (tty7 is for X and tty1 is for text, same Knowledge76 article):
    # rm /etc/event.d/tty2
    ..
    # rm /etc/event.d/tty6
  25. replace the bash shell with the faster (for scripts) dash shell (Ubuntu wiki):
    # apt-get install dash
    # dpkg-reconfigure dash
  26. reorder boot scripts with right dependencies (Debian User forum post):
    # apt-get install insserv
    # dpkg-reconfigure insserv
  27. reboot (boot time 35 sec.);
  28. remove create_floppy_devices, pcmcia-check-broken-cis, pcmcia-socket-startup from /lib/udev;
  29. fix hwclock time out (Debian WiKi);
  30. improve performance by setting "noatime" option (instead of "relatime" or "atime") in fstab entries (same Debian User forum post);
  31. boot once with "profile" option in grub entry, to update the profile for "readahead";
  32. reboot (boot time 34 sec.);
  33. install mc and mcedit;
  34. set mcedit as default editor for mc, by setting "use internal editor" under Option ->Configuration of mc (Ubuntu launchpad);
  35. take a snapshot of /dev/sda3 (record 3);
  36. no real benefit from "readahead", remove it by disabling some services (same Knowledge76 article):
    readahead
    readahead-desktop
    stop-readahead
  37. re-run insserv;
  38. reboot (boot time 33 sec.);
  39. install LXDE:
    # apt-get install lxde
  40. make LXDE the default desktop manager instead of GNOME (from login menu, after hitting ctrl-alt-bkspc);
  41. reboot (boot time 31 sec.);
  42. prepend "exit" to /etc/init.d/hwclock.sh and to /etc/init.d/hwclockfirst.sh (the scripts are called but nothing is done);
  43. install compiz (Ubuntu Help);
  44. install avant-window-navigator (AWN);
  45. fix compiz and AWN startup (my way);
  46. set AWN bar position through gconf-editor (this post);
  47. reboot (boot time sec. 33);
  48. install xcompmgr and make it autostart;
  49. install cairo-dock and make it autostart;
  50. take a snapshot of /dev/sda3 and /dev/sdb2 with partimage (record 4);
The EEEbuntu experience is not completely satifactory: wireless networking troubles, external monitor resolution troubles, slow boot.. I'm leaving..
[..]
I'm trying now with version 3.0.

Sunday, December 28, 2008

Multi-booting (automatic way) several Ubuntu based distributions

There is a simple way to boot from different ubuntu .iso images saved on the same media, but a manual intervention is needed in order to rename some files before (re)booting.
It is possible to automate it: it's tricky, but it works.

Briefly:
  1. make an usb stick (or hard disk) FreeDOS bootable;
  2. put the .iso images on it;
  3. put the correct pair of kernel and initrd which boots the .isos;
  4. edit (fd)config.sys and autoexec.bat in order to make a menu and a batch that renames some files and boots (using Grub4DOS).

In detail (with the goal of booting the "alternate" distro of kubuntu hardy in either i386 or amd64 flavour):
  1. make your usb device boot any (in principle) OS capable of file manipulation. The plain old DOS is enaugh (and fast to load) but not free. FreeDOS is a good choice and making an usb stick FreeDOS bootable is simple;
  2. make a folder called "hardy" under the root;
  3. download the alternate iso images and put them into the folder "hardy";
  4. rename them "i386-k.iso" and "amd64-k.iso" for short;
  5. under the folder "hardy" make two sub-folders "i386" and "amd64";
  6. download the proper (check here for details) pair of kernel and initrd of each distro and put them into the corresponding folder;
  7. get Grub4DOS and put the dos executable "grub.exe" in the root folder (it will be used to boot the kernel which in turn will run the installer on the .iso image);
  8. make two configuration files for Grub4DOS to load the proper kernels;
    the first "i386-k.lst" (add kernel options as needed):
    default 0
    timeout 1
    title i386
    root (fd0)
    kernel /hardy/i386/vmlinuz root=/dev/ram0 noapic
    initrd /hardy/i386//initrd.gz
    boot

    the second "amd64-k.lst" (add kernel options as needed):
    default 0
    timeout 1
    title amd64
    root (fd0)
    kernel /hardy/amd64/vmlinuz root=/dev/ram0 noapic
    initrd /hardy/amd64/initrd.gz
    boot
  9. in the root folder, make an "fdconfig.sys" file, which acts as menu:
    switches=/F /N
    menudefault=0,30
    menu Kubuntu USB installer
    menu
    menu 0 - Exit to FreeDOS
    menu 1 - Install from kubuntu-8.04.1-alternate-amd64.iso
    menu 2 - Install from kubuntu-8.04.1-alternate-i386.iso
    0?rem
    1?rem
    2?rem
  10. in the root folder, make an "autoexec.bat" file, which manipulates files and invokes the loader:
    rem common preparation
    cd \hardy
    ren *.iso *.isn

    rem select distro
    if "%config%"=="1" ren amd64-k.isn amd64-k.iso
    if "%config%"=="2" ren i386-k.isn i386-k.iso

    rem run distro
    if "%config%"=="1" \grub --config-file=\hardy\amd64-k.lst
    if "%config%"=="2" \grub --config-file=\hardy\i386-k.lst

    cd \

unmount the usb device to be sure all get saved and reboot.

Wednesday, December 3, 2008

More than 80 columns in an Ubuntu console with SVGATextMode

For my server running Ubuntu 8.04 I needed the text console 160 columns wide.
I tried some "vga=xxx" settings in the kernel options to increase the resolution of the virtual consoles, and to install the SVGATextMode package, but both ones with no success, because during the boot "something" related to the framebuffer was always making the screen revert to 80x25.
I can't remember the page where I read that the video card framebuffer driver is sometimes conflicting with the framebuffer console, but the info was right. So my steps were (as "root"):

  1. look for video card framebuffer driver with:
    lsmod|grep fb
    in my case s3fb;

  2. blacklist that driver to avoid loading it, by appending
    blacklist s3fb
    to the file "/etc/modprobe.d/blacklist-framebuffer";

  3. comment out vesafb from "/etc/modules":
    #vesafb

  4. install SVGATextMode:
    apt-get install svgatextmode
    (note that it rebuilds "initramfs");

  5. edit "/etc/TextConfig", the configuration file for SVGATextMode, in particular:

    • fitting the video card chip and DAC
      ..
      ChipSet "S3"
      ..
      ClockChip "S3Virge"
    • correcting the "setfont" path
      # Debian defaults for use with kbd again, if you use console-tools
      # then use consolechars as your FontProg instead.
      #FontProg "/usr/bin/consolechars -f"
      FontProg "/bin/setfont"
      FontPath "/usr/share/consolefonts"
    • loading a suitable 8bit font (needed to display well on an 160 columns screen)
      FontSelect "lat1-16"   8x16 9x16 8x15 9x15
      FontSelect "lat1-14" 8x14 9x14 8x13 9x13
      FontSelect "lat1-12" 8x12 9x12 8x11 9x11
      FontSelect "lat1-10" 8x10 9x10 8x9 9x9
      FontSelect "lat1-08" 8x8 9x8 8x7 9x7


  6. edit "/etc/init.d/svgatextmode" by adding the "-x" switch (without it, it did not work: I don't know exactly why) and the text mode desired (bold part)
                    /sbin/SVGATextMode -x "n160x60" >/dev/null
    echo "done."
    ;;

    (note that in the "/etc/TextConfig" coming with the package the mode name "160x60" is used for two different text mode, thus only the last one is effective. I renamed one "n160x60" );
  7. reboot

Tuesday, October 21, 2008

Multi-booting (manual way) several Ubuntu based distributions

As for Gentoo distributions, for some reasons I need to carry with me different Ubuntu distributions (x86, amd64, live, alternate, etc.) on the same usb disk and to be able to boot and install from them. You (quite) cannot boot directly from the .iso image (with some other distros you can, i.e. quantian). You (quite) cannot put them in a single partition because they all share the same directory structure and jailing each one in a sub-directory did not work. The easiest way is to have each distro in its own partition and a multi-boot scheme for the usb disk.
As stated in the page linked above, it is possible to use a pair of kernel and initrd to load the installer from an .iso image.
If you have several .iso images (related to the same version of the distro) in the same partition, you can choose which one to load from, by renaming the other ones with an extension different from ".iso". The boot process automatically loads and installs from the first image it finds.

Sunday, October 5, 2008

Installing CurlFtpFS on Ubuntu Edgy to mount FTP shares

To mount an FTP share under Ubuntu linux there are at least two choiches: LUFS and ftpFS.
After reading this post, I opted for ftpFS, through CurlFtpFS. The most comprehensive tutorial to install it under Ubuntu Edgy I have found is this one.
By purging all comments you get this simple way to install:

  1. become root:
    prompt#: sudo -i

  2. install the necessary libraries:
    prompt#: apt-get install libc6 libcomerr2 libcurl3 libfuse2
    libglib2.0-0 libidn11 libkrb53 libssl0.9.8 zlib1g fuse-utils

  3. download backport package for Edgy from here: curlftpfs-0.9.1-1_edgy.tar.bz2;
  4. unpack with:
    prompt#: mkdir curlftps-edgy
    prompt#: tar xvjf curlftpfs-0.9.1-1_edgy.tar.bz2 -C curlftps-edgy

  5. install .deb package:
    prompt#: dpkg -i curlftpfs_0.9.1-1_i386.deb

  6. clean up:
    prompt#: rm -r curlftps-edgy

  7. let mount recognize the filesystem type:
    prompt#: ln -s /usr/bin/curlftpfs /sbin/mount.curlftpfs 

If you need to mount in fstab, add the proper line to fstab itself:
ftpusername:ftppassword@ftp.site.address /path/to/mountpoint curlftpfs 
rw,allow_other,uid=userid,gid=groupid 0 0

Wednesday, October 1, 2008

Unsupported versions of Ubuntu - repos and distros

One of my linux boxes runs on Ubuntu 6.10 Edgy Eft, which is no longer supported. It runs good, the machine is quite old and I have no reason to upgrade, but sometimes I need to (re)install some packages. Unfortunately official repositories are not available anymore, but after googling a lot I came across a forum thread that pointed to the right site.



Here is for reference: http://old-releases.ubuntu.com/releases/



It contains repositories and distributions for all old versions of Ubuntu, Kubuntu and Edubuntu.



Still for reference, "sources.list" in /etc/apt should have lines like :

deb http://old-releases.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ edgy main restricted
deb http://old-releases.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ edgy-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ edgy universe
deb-src http://old-releases.ubuntu.com/ubuntu/ edgy universe
deb http://old-releases.ubuntu.com/ubuntu/ edgy-backports main restricted universe
deb-src http://old-releases.ubuntu.com/ubuntu/ edgy-backports main restricted universe
deb http://old-releases.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu edgy-security main restricted