2010-05-28

Slitaz -- vboxadd / folder sharing


folder sharing

Env:
HOST: winxp (with Ext2fsd)
GUEST: slitaz-3.0.iso in HD (vdi)
VirtualBox: 3.1.8

root@slitaz:~# lsmod | grep vboxsf
vboxsf 29528 1
vboxguest 113576 2 vboxsf
root@slitaz:/home/slitaz# mount.vboxsf slitaz3 /mnt/share
root@slitaz:/home/slitaz# ls -l /mnt/share
drwxrwxrwx 1 root root 0 Apr 26 15:25 bin
drwxrwxrwx 1 root root 0 May 15 22:55 boot
drwxrwxrwx 1 root root 0 May 27 10:13 dev
drwxrwxrwx 1 root root 0 May 27 09:07 etc
drwxrwxrwx 1 root root 0 May 27 09:13 home
-rwxrwxrwx 1 root root 3162 Mar 12 17:26 init
drwxrwxrwx 1 root root 0 May 15 23:45 lib
drwxrwxrwx 1 root root 0 Mar 7 01:08 lost+found
drwxrwxrwx 1 root root 0 May 27 10:16 media
drwxrwxrwx 1 root root 0 Apr 23 14:42 mnt
drwxrwxrwx 1 root root 0 May 19 15:32 opt
drwxrwxrwx 1 root root 0 May 15 23:58 opt-backup
drwxrwxrwx 1 root root 0 Mar 7 01:08 proc
drwxrwxrwx 1 root root 0 May 27 19:44 root
drwxrwxrwx 1 root root 0 May 19 14:24 sbin
drwxrwxrwx 1 root root 0 Mar 7 01:08 sys
drwxrwxrwx 1 root root 0 May 27 19:44 tmp
drwxrwxrwx 1 root root 0 May 27 17:37 usr
drwxrwxrwx 1 root root 0 May 2 01:28 var
root@slitaz:/home/slitaz# ls -l /mnt/share/home/slitaz/distro
drwxrwxrwx 1 root root 0 May 27 10:30 rootcd
drwxrwxrwx 1 root root 0 May 27 10:30 rootfs
-rwxrwxrwx 1 root root 31457280 May 27 11:54 slitaz-1.iso
-rwxrwxrwx 1 root root 45 May 27 11:54 slitaz-1.md5
-rwxrwxrwx 1 root root 81788928 May 27 13:08 slitaz-201005271305.iso
-rwxrwxrwx 1 root root 58 May 27 13:08 slitaz-201005271305.md5
-rwxrwxrwx 1 root root 108003328 May 27 15:23 slitaz-201005271522.iso
-rwxrwxrwx 1 root root 58 May 27 15:23 slitaz-201005271522.md5
-rwxrwxrwx 1 root root 81788928 May 27 12:13 slitaz-2.iso
-rwxrwxrwx 1 root root 45 May 27 12:13 slitaz-2.md5
root@slitaz:/home/slitaz# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
tmpfs on /dev/shm type tmpfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
none on /mnt/share type vboxsf (rw,nodev,relatime)
root@slitaz:/home/slitaz#

root@slitaz:~# mount.vboxsf -help
Usage: mount.vboxsf [OPTIONS] NAME MOUNTPOINT
Mount the VirtualBox shared folder NAME from the host system to MOUNTPOINT.

-w mount the shared folder writably (the default)
-r mount the shared folder read-only
-n do not create an mtab entry
-o OPTION[,OPTION...] use the mount options specified

Available mount options are:
rw mount writably (the default)
ro mount read only
uid=UID set the default file owner user id to UID
gid=GID set the default file owner group id to GID
ttl=TTL set the "time to live" to TID for the dentry
dmode=MODE override the mode of all directories to (octal) MODE
fmode=MODE override the mode of all regular files to (octal) MODE
umask=UMASK set the umask to (octal) UMASK
dmask=UMASK set the umask applied to directories only
fmask=UMASK set the umask applied to regular files only
iocharset CHARSET use the character set CHARSET for I/O operations
(default set is utf8)
convertcp CHARSET convert the folder name from CHARSET to utf8

Less common used options:
noexec,exec,nodev,dev,nosuid,suid
root@slitaz:~#

2010-05-27

Slitaz -- chroot / tazlito

Qemu & zh

Qemu

Boot from slitaz-vbox.iso

Boot from slitaz-vbox.iso & GuestAdditions

slitaz-vbox.iso: based on slitaz-3.0.iso + virtualbox-3.1.8 + guestadditions + wenquanyi_10pt.pcf

Qemu

root@slitaz:~# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 251.1M 0 251.1M 0% /dev/shm
root@slitaz:~# du -sh /
247.9M
root@slitaz:~# free
total used free shared buffers
Mem: 514340 297692 216648 0 0
Swap: 0 0 0
Total: 514340 297692 216648
[..]
root@slitaz:~# fc-list :lang=zh
WenQuanYi Bitmap Song:style=Regular
root@slitaz:~# ls -l /home/slitaz
-rwxrwxrwx 1 root root 1197684 May 26 15:51 vboxadd-3.1.8_2.6.30.6.tazpkg
root@slitaz:~# cat /etc/slitaz-release
3.0
root@slitaz:~#
====

Boot from slitaz-vbox.iso
root@slitaz:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.7G 250.0M 1.4G 15% /
tmpfs 1.7G 250.0M 1.4G 15% /
tmpfs 944.7M 0 944.7M 0% /dev/shm
root@slitaz:~# du -sh /
250.0M
root@slitaz:~# free
total used free shared buffers
Mem: 1934820 312836 1621984 0 0
Swap: 0 0 0
Total: 1934820 312836 1621984
root@slitaz:/home/tux# cat /var/log/tazpkg.log
2010-05-27 11:24:08 - Installed - libsdl (1.2.13) - c490ce417515b7f73d840474f29f7301
2010-05-27 11:24:09 - Installed - openssl (0.9.8l) - 43929be1cb7bd473cc24d1fbfd3e401e
2010-05-27 11:24:09 - Installed - libdb (4.7.25) - 88b3fb91256dd36f1b8bd7d3aef73989
2010-05-27 11:24:09 - Installed - xorg-libXss (1.1.2) - fdc154d798c077d27802290d1845e95f
2010-05-27 11:24:09 - Installed - gdbm (1.8.3) - db31351e035c988201ab6a4f54582e96
2010-05-27 11:24:10 - Installed - tcl (8.5.5) - 25ecf5dc353ffdcd1eb63aac551f45b8
2010-05-27 11:24:10 - Installed - tk (8.5.5) - f3456e5e6b37cafe227b8530693607fb
2010-05-27 11:24:12 - Installed - python (2.5.1) - 2260d614c6c89b99eb5ad807f24a2b96
2010-05-27 11:24:13 - Installed - libglu-mesa (7.4.4) - 80f321321678b85dc3ac5bf704159b0c
2010-05-27 11:24:22 - Installed - virtualbox (3.1.8-61349_2.6.30.6) - fe2806b3323f51fb663dd739b9404865
root@slitaz:~# ls -l /home/slitaz
-rwxrwxrwx 1 root root 1197684 May 26 15:51 vboxadd-3.1.8_2.6.30.6.tazpkg
root@slitaz:~# ls /lib/modules/`uname -r`/misc
vboxdrv.ko vboxnetadp.ko vboxnetflt.ko
root@slitaz:~# fc-list :lang=zh
WenQuanYi Bitmap Song:style=Regular
root@slitaz:~# cat /proc/cmdline
root=/dev/null screen=1280x1024x24 lang=en kmap=us acpi=off
root@slitaz:~# VBoxManage --help | head -3
Sun VirtualBox Command Line Management Interface Version 3.1.8
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
root@slitaz:~#

----
root@slitaz:~# ps ax | grep -i vbox
1108 root /usr/bin/VBoxClient --clipboard
1119 root /usr/bin/VBoxClient --display
1125 root /usr/bin/VBoxClient --seamless
1221 root grep -i vbox
root@slitaz:~# lsmod | grep vbox
vboxvideo 1908 1
drm 121736 2 vboxvideo
vboxsf 29528 1
vboxguest 113576 5 vboxsf
root@slitaz:~# mount | tail -3
tmpfs on /dev/shm type tmpfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
none on /mnt/share type vboxsf (rw,nodev,relatime)
root@slitaz:~# ls -lh /mnt/share/iso/slitaz-vbox*
-rwxrwxrwx 1 root root 103.0M May 15 11:26 /mnt/share/iso/slitaz-vbox-0515.iso
-rwxrwxrwx 1 root root 45 May 15 11:26 /mnt/share/iso/slitaz-vbox-0515.md5
-rwxrwxrwx 1 root root 103.0M May 27 15:23 /mnt/share/iso/slitaz-vbox.iso
-rwxrwxrwx 1 root root 58 May 27 15:23 /mnt/share/iso/slitaz-vbox.md5
root@slitaz:~#

2010-05-26

Slitaz -- chroot / xephyr



Env:
HOST: slitaz-3.0 in HD
CHROOT: slitaz-3.0.iso extract to /home/slitaz/distro
package: xorg-server-Xephyr, packages-3.0.iso

nested X server

Xephyr is an X server that can be run inside another X server, much like Xnest. It is based on the kdrive X server, and as a result it supports newer extensions than Xnest, including render and composite.

HOST:
root@slitaz:~# Xephyr -pn -ac :1.0 2>/dev/null &

CHROOT:
root@slitaz:/# DISPLAY=:1.0 openbox-session 2>/dev/null &

root@slitaz:~# tazpkg info xorg-server-Xephyr

Tazpkg information
================================================================================
Package : xorg-server-Xephyr
Version : 1.5.3
Category : x-window
Short desc : Xephyr server used to creat chrooted X env.
Maintainer : pankso@slitaz.org
Depends : freetype xorg-libXau xorg-libfontenc xorg-libXdmcp xorg-libXfont xorg-libXext xorg-libX11 zlib pixman hal libcrypto xorg-libXv
Wanted src : xorg-server-tinyX
Web site : http://www.x.org/
================================================================================

root@slitaz:~#

root@slitaz:/home/slitaz# ls -l
-rwxr-xr-x 1 root root 617 May 25 11:59 chroot_env.sh
-rwxrwxrwx 1 root root 31457280 Apr 15 13:25 slitaz-3.0.iso
lrwxrwxrwx 1 root root 23 May 21 17:18 wok -> /media/packages-3.0/wok
root@slitaz:/home/slitaz# tazlito extract-distro slitaz-3.0.iso

Tazlito extracting : slitaz-3.0.iso
================================================================================

Mounting ISO image...
Copying the Linux kernel... [ OK ]
Copying isolinux files... [ OK ]
Copying GRUB files... [ OK ]
Copying the rootfs... [ OK ]
Extracting the rootfs...
================================================================================
Extracted : slitaz-3.0.iso (30.0M)
Distro tree : /home/slitaz/distro
Rootfs size : 101.1M rootfs
Rootcd size : 29.2M rootcd
================================================================================

root@slitaz:/home/slitaz# ls /home/slitaz/distro
rootcd rootfs
root@slitaz:/home/slitaz# ls /home/slitaz/distro/rootfs
bin etc init media proc sbin tmp var
dev home lib mnt root sys usr
root@slitaz:/home/slitaz# du -sh /home/slitaz/distro/rootfs
101.1M /home/slitaz/distro/rootfs
root@slitaz:/home/slitaz#
root@slitaz:/home/slitaz# sh ./chroot_env.sh
Chrooting into /home/slitaz/distro/rootfs...
root@slitaz:/#

*** HOST:***
root@slitaz:~# Xephyr -pn -ac :1.0 2>/dev/null &

***CHROOT***
root@slitaz:/# DISPLAY=:1.0 openbox-session &
/usr/bin/openbox-session: /etc/xdg/openbox/autostart.sh: line 8: ivman: not found
sed: /root/.config/lxpanel/default/panels/panel: No such file or directory
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-MBFterGVIx,guid=bc8c8da4d912d167a5a10b804bfbe2d4
DBUS_SESSION_BUS_PID=4013
.

Slitaz -- vboxadd-3.1.8




root@slitaz:~# tazpkg info vboxadd

Tazpkg information
=======================================================================
Package : vboxadd
Version : 3.1.8_2.6.30.6
Category : non-free
Short desc : x86 VBoxLinuxAdditions.
Maintainer :
Depends : linux-drm mesa-dri xorg-xf86-input-evdev
Web site : http://www.virtualbox.org/
=======================================================================

root@slitaz:~# df -h

Filesystem Size Used Available Use% Mounted on
rootfs 348.5M 120.8M 227.7M 35% /
tmpfs 348.5M 120.8M 227.7M 35% /
tmpfs 193.6M 0 193.6M 0% /dev/shm
root@slitaz:~# du -sh /
120.8M
root@slitaz:~# dmesg | tail -12
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 9
PCI: setting IRQ 9 as level-triggered
pci 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 9 (level, low) -> IRQ 9
vboxguest: major 0, IRQ 9, I/O port d040, MMIO at 00000000f0400000 (size 0x400000)
vboxguest: Successfully loaded version 3.1.8 (interface 0x00010004)
vboxsf: Successfully loaded version 3.1.8 (interface 0x00010004)
Linux agpgart interface v0.103
[drm] Initialized drm 1.1.0 20060810
pci 0000:00:02.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
pci 0000:00:02.0: setting latency timer to 64
[drm] Initialized vboxvideo 1.0.0 20090303 for 0000:00:02.0 on minor 0
mtrr: no MTRR for e0000000,2000000 found
root@slitaz:~#
root@slitaz:~# cat /var/log/tazpkg.log
2010-05-26 14:53:55 - Installed - linux-drm (2.6.30.6) - 62ba26c458a1823ccee1f87d33ad619b
2010-05-26 14:53:56 - Installed - mesa-dri (7.4.4) - 2f1a8d7ccc8f8f357266052580fb1df8
2010-05-26 14:53:56 - Installed - xorg-xf86-input-evdev (2.0.4) - 2536931075fe9b19b51c2229740938ec
2010-05-26 14:53:59 - Installed - vboxadd (3.1.8_2.6.30.6) - c30174c6df5395cb57e218832532897a
root@slitaz:~# ls -l /dev/dri
crw-rw---- 1 root root 226, 0 May 26 14:59 card0
root@slitaz:~#
root@slitaz:~# ls -l /dev/vbox*
crw-rw---- 1 vboxadd vboxadd 10, 60 May 26 14:54 /dev/vboxguest
crw-rw-rw- 1 vboxadd root 10, 59 May 26 14:54 /dev/vboxuser
root@slitaz:~#
root@slitaz:~# tail -3 .config/openbox/autostart.sh
# Background color with xsetroot.
#xsetroot -solid "#222222" &
VBoxClietn-all &
root@slitaz:~#
root@slitaz:~# tail -5 /etc/group
tty:x:7:
video:x:8:tux
haldaemon:x:26:
tux:x:1000:
vboxadd:x:1001:
root@slitaz:~#
root@slitaz:~# ps ax | grep -i vbox
2045 root /usr/bin/VBoxClient --clipboard
2056 root /usr/bin/VBoxClient --display
2062 root /usr/bin/VBoxClient --seamless
2886 root grep -i vbox
root@slitaz:~#
root@slitaz:~# lsmod | grep vbox
vboxvideo 1908 1
drm 121736 2 vboxvideo
vboxsf 29528 0
vboxguest 113576 5 vboxsf
root@slitaz:~#

http://doc.slitaz.org/en:guides:xorg-xvesa
[..]
DRI / DRM Problem

DRI / DRM - SliTaz 3.0 has a file in a wrong place - /dev/dri should be a directory and not a file. And to get DRI working: we have to add tux to the group video:

# tazpkg get-install linux-drm
# tazpkg get-install mesa-demos (for glxinfo and glxgears)
# rm /dev/dri
# mkdir /dev/dri/
# addgroup tux video
The module drm is not loaded by tazhw, you have to do it manually:

# modprobe drm
[..]

====
Reprinted:

http://doc.slitaz.org/en:guides:xorg-xvesa

Xorg - Xvesa

The # sign means that you do this command as root on your console.

The default Slitaz-3.0.iso uses xorg 7.4 with the xorg-xf86-video-vesa 2.0.0 driver. This xvesa-driver can cause quite a few problems - it can result in a very low resolution or X does not start at all (falls back to slim or to the console). There are however some more possibilities:

*
check first, if you have enough Ram to run the default.iso - if not use the lowram.iso
*
you use the slitaz-3.0-xvesa.iso (TinyX)
*
you install the xorg video driver for your card
*
you can try to change your xorg.conf

Note: In Xorg versions up to 7.3, the Ctrl+Alt+Backspace key combination could be used to quit the X server. To enable it in version 7.4 and later, you can type the following command from any X terminal emulator:

setxkbmap -option terminate:ctrl_alt_bksp

Good introductions to Xorg Configuration: The FreeBSD Handbook and X Configuration from Ubuntu
slitaz-xvesa.iso with tinyX Server

You can download the slitaz-3.0-xvesa.iso here: SliTaz-3.0-xvesa.iso

It boots on nearly all computers and laptops, but you can only display a 4:3 resolution. To find out which resolutions are possible with your card, type:

Xvesa -listmodes

Here's a selection of resolutions for my Intel Atom Board:

VBE version 3.0 (Intel(r) 82945GM Chipset Family Graphics Chip Accelerated VGA BIOS)
DAC is switchable, controller is VGA compatible, RAMDAC causes snow
Total memory: 7872 kilobytes
0x015A: 1600x1200x24 TrueColor [8:8:8:8]
0x011B: 1280x1024x24 TrueColor [8:8:8:8]
0x0118: 1024x768x24 TrueColor [8:8:8:8]
0x0112: 640x480x24 TrueColor [8:8:8:8]
0x0115: 800x600x24 TrueColor [8:8:8:8]

So widescreen resolutions cannot be displayed with the slitaz-3.0-xvesa.iso.

If X does not start with the default SliTaz.iso (falls back to slim), you could use the xvesa.iso to install your default xorg driver. Because when you are asked for your resolution at boot, you can scroll down the window and find the possibility to install your xorg.driver before X is started. But don't use 「tazx」 and 「tazhw setup ati or nv」 on the xvesa.iso to install your xorg driver, because you will end up with a black screen.
Xorg Video Driver

When you are using SliTaz as your daily OS, it's recommended to setup your default xorg video driver. You will get a much better picture than using the xvesa driver or tinyX.

If you have a AGP-Videocard

Check with 「lspci」 - if you find AGP, you should do this first:

# tazpkg get-install linux-agp

Then load the modules:

# tazhw detect-pci

Then normally, you just run as root:

# tazx

And install your video driver from the list.

- but sometimes this is not enough.

DRI / DRM Problem

DRI / DRM - SliTaz 3.0 has a file in a wrong place - /dev/dri should be a directory and not a file. And to get DRI working: we have to add tux to the group video:

# tazpkg get-install linux-drm
# tazpkg get-install mesa-demos (for glxinfo and glxgears)
# rm /dev/dri
# mkdir /dev/dri/
# addgroup tux video

The module drm is not loaded by tazhw, you have to do it manually:

# modprobe drm

Load modules persistently

Please note that all modules, which are loaded by tazhw and yourself to make your changes permanent, have to be added to the SliTaz Control Box under Initialization in 「Load modules」.

Change your xorg.conf

Normally X will start, but perhaps not with the correct resolution. See the tips at the end of this page or sometimes search the net for the xorg.conf for your card and your monitor - or use another LiveCD and copy the working conf file to SliTaz.

Restart X

Use the normal shutdown button and select on SliTaz Desktop logout the button Logout X session.

Check the /var/log/Xorg.0.log to see if you get any essential (WW)- warnings or (EE) - errors. When you installed mesa-demos you can test if rendering is working:

glxinfo | grep render

intel-video cards

The xorg-xf86-video-vesa 2.0.0 driver has a lot of trouble with intel chips - e.g. on my 82945GM Chipset it does not display 1280×1024 and 1024×768, but 1600×1200 is not a problem.

Use 「tazx」 to select the intel driver, then 「tazhw detect-pci」, solve the dri problem and load drm and restart X - normally that's it (perhaps you must change your xorg.conf).

Some users may need to add the 「intel_agp」 module to the xorg.conf file:

Section "Module"
...
Load "intel_agp"
EndSection

for the driver to work.
trident-video cards

Use 「tazx」 to select the trident driver, install mesa-dri-trident

# tazpkg get-install mesa-dri-trident

and restart X
nvidia cards

Slitaz provides automatic configuration for nvidia cards. For free nvidia drivers, do:

# tazhw setup nvidia

For non-free nvidia drivers (supplied by NVIDIA), do:

# tazhw setup nvidia --non-free

To setup non-free nvidia manually:

First download: mesa mesa-demos linux-agp nvidia

# tazpkg get-install nvidia
# tazpkg get-install mesa
# tazpkg get-install mesa-demos
# tazpkg get-install linux-agp

Load modules

# tazhw detect-pci

To configure nvidia automatically

# nvidia-xconfig

To test if rendering is working

glxinfo | grep render

To change nvidia settings

# nvidia-settings

For no logo at bootup, add the following to xorg.conf

Option "NoLogo" "True"

To setup free nvidia manually:

First download: mesa mesa-demos linux-agp xorg-xf86-video-nv

# tazpkg get-install xorg-xf86-video-nv
# tazpkg get-install mesa
# tazpkg get-install mesa-demos
# tazpkg get-install linux-agp

Load modules

# tazhw detect-pci

Replace vesa with nv

# sed -i 's/vesa/nv/' /etc/X11/xorg.conf

ati cards

For free ati drivers (preferred), do:

tazpkg get-install linux-agp
tazpkg get-install linux-drm
tazhw setup ati

- but perhaps this is not enough - check /var/log/Xorg.0.log to see if other modules must be loaded: See DRI / DRM Problem

For non-free ati catalyst drivers (known to be not so good), do:

tazhw setup ati --non-free

To setup free ati manually:

First download: xorg-xf86-video-ati mesa-dri-ati mesa-demos linux-agp

# tazpkg get-install xorg-xf86-video-ati
# tazpkg get-install mesa-dri-ati
# tazpkg get-install mesa-demos
# tazpkg get-install linux-agp
# tazpkg get-install linux-drm

Load modules

# tazhw detect-pci

The free ati driver is called radeon, replace vesa with radeon

# sed -i 's/vesa/radeon/' /etc/X11/xorg.conf

Edit Xorg.conf manually

This is how we can get a 1024×768 resolution: if your display is stuck at a low resolution, say 800×600, just add edit 「Modes」 in step 2b below.

I edited the following sections in xorg.conf (/etc/X11/xorg.conf):

1) Include HorizSync and VertRefresh in section 「Monitor」

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 28-64
VertRefresh 60
EndSection

2a) In Section 「Screen」; added Default Depth

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24

2b) In Sub-section Display: added 「Modes」

SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600"
EndSubSection

3) Also, added default Slitaz Font path in Section Files

Section "Files"
ModulePath "/usr/lib/X11/modules"
FontPath "/usr/share/fonts/X11/misc/"
FontPath "/usr/share/fonts/X11/TTF/"
FontPath "/usr/share/fonts/X11/OTF"
FontPath "/usr/share/fonts/X11/Type1/"
FontPath "/usr/share/fonts/X11/100dpi/"
FontPath "/usr/share/fonts/X11/75dpi/"
FontPath "/usr/share/fonts/truetype/ttf-dejavu"
EndSection

You can use xrandr to identify your monitor(s) Debian RandR 1.2 Wiki

# tazpkg get-install xorg-xrandr


Page Review Section
Quality Good
Review Minor Updates
Priority Medium
Problems add a forum post link
OR add a lab issue tracker link
How to Improve How about other xorg-cards?
More details or references on Xorg.conf


en/guides/xorg-xvesa.txt · Last modified: 2010/05/25 21:46 by linea

2010-05-19

Slitaz -- virtualbox-3.1.8

Add Slitaz support to VirtualBox installer

root@slitaz:~# head -12 /home/slitaz/wok/get-virtualbox/stuff/installer.u
--- stuff/get-virtualbox Thu Jan 7 14:12:34 2010
+++ get-virtualbox Fri Jan 15 11:39:10 2010
@@ -57,6 +57,159 @@
cd install
[ -d /usr/share/VirtualBox ] && ./uninstall.sh
find /usr /etc /lib > ../before
+
+
+# Add Slitaz support to VirtualBox installer.
patch -p1 <<'EOT'
+--- install-ori/routines.sh Thu Dec 17 14:37:35 2009
++++ install/routines.sh Thu Dec 24 13:33:02 2009
root@slitaz:~#
root@slitaz:~# tazpkg info virtualbox

Tazpkg information
================================================================================
Package : virtualbox
Version : 3.1.8-61349_2.6.30.6
Category : non-free
Short desc : x86 virtualization.
Maintainer :
Depends : libsdl fontconfig gcc-lib-base glib libpng python udev libglu-mesa
Web site : http://www.virtualbox.org/
================================================================================

root@slitaz:~#
root@slitaz:~# tazpkg list | grep virtual
get-virtualbox 1.01 non-free
virtualbox 3.1.8-61349_2.6.3 non-free
root@slitaz:~# ps ax | grep Virtu
3962 root /usr/share/VirtualBox/VirtualBox
3988 root /usr/share/VirtualBox/VBoxXPCOMIPCD
4001 root /usr/share/VirtualBox/VBoxSVC --pipe 8 --auto-shutdown
4025 root /usr/share/VirtualBox/VirtualBox --comment slitaz --startvm d80162f7-9736-4e1b-99c1-b361431eb7e5
4993 root grep Virtu
root@slitaz:~# lsmod | grep vbox
vboxdrv 138232 1
root@slitaz:~# VirtualBox --help | head -6
Sun VirtualBox Graphical User Interface 3.1.8 (C) 2005-2010 Sun Microsystems, Inc. All rights reserved.
Usage: --startvm start a VM by specifying its UUID or name
root@slitaz:~#

root@slitaz:~# cat /var/lib/tazpkg/installed/virtualbox/receipt
# SliTaz package receipt.

PACKED_SIZE="40.4M"
UNPACKED_SIZE="103.2M"
PACKAGE="virtualbox"
VERSION="3.1.8-61349"
EXTRAVERSION=_2.6.30.6
CATEGORY="non-free"
SHORT_DESC="x86 virtualization."
WEB_SITE="http://www.virtualbox.org/"
DEPENDS="libsdl fontconfig gcc-lib-base glib libpng python udev libglu-mesa"

post_install()
{
udevadm trigger --subsystem-match=usb > /dev/null 2>&1
udevtrigger --subsystem-match=usb > /dev/null 2>&1
udevtrigger --subsystem-match=usb_device > /dev/null 2>&1
udevplug -Busb > /dev/null 2>&1
chroot "$1/" depmod -a 2.6.30.6-slitaz

# Add vboxusers group
if (! grep -q ^vboxusers /etc/group); then
addgroup vboxusers
fi
}
root@slitaz:~#
root@slitaz:~# cat /usr/bin/get-virtualbox
#!/bin/sh -e

ROOT="$1"
PACKAGE=${0#*get-}

if test $(id -u) != 0 ; then
echo -e "\nYou must be root to run `basename $0`."
echo -e "Please type 'su' and root password to become super-user.\n"
exit 0
fi

if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
[ -n "$ROOT" ] && exit 1
tazpkg remove $PACKAGE
[ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1
fi
[ -d $ROOT/usr/share/$PACKAGE ] && rm -rf $ROOT/usr/share/$PACKAGE

WEB_SITE=http://www.virtualbox.org/
SHORT_DESC="x86 virtualization."
dl_url()
{
wget -O - ${WEB_SITE}wiki/Linux_Downloads 2> /dev/null | \
grep Linux_x86.run | sed 's|.*href="\(.*Linux_x86.run\).*|\1|'
}

TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM
CUR_DIR=$(pwd)
mkdir -p $TMP_DIR && cd $TMP_DIR

url=$(dl_url)
TARBALL=$(basename $url)
wget $url

if [ ! -f "$TARBALL" ]; then
cd $CUR_DIR
rm -rf $TMP_DIR
echo "Could not download $TARBALL. Exiting."
exit 1
fi

VERSION=${TARBALL%-Linux_x86.run*}
VERSION=${VERSION#VirtualBox-}

sed -i 's/df -kP/df -k/' $TARBALL

# Extract
sh $TARBALL --noexec --keep

BUILD_DEPENDS="slitaz-toolchain bzip2 linux-source python python-dev"
for i in $BUILD_DEPENDS; do
[ -d /var/lib/tazpkg/installed/$i ] && continue
yes y | tazpkg get-install $i
done

# Install files
cd install
[ -d /usr/share/VirtualBox ] && ./uninstall.sh
find /usr /etc /lib > ../before


# Add Slitaz support to VirtualBox installer.
+patch -p1 <<'EOT'
--- install-ori/routines.sh Thu Dec 17 14:37:35 2009
+++ install/routines.sh Thu Dec 24 13:33:02 2009
@@ -207,6 +207,10 @@
ro_SYS_TYPE=unknown
ro_INIT_TYPE=bsd
ro_RC_LOCAL=/etc/rc.local
+ elif [ -f /etc/slitaz-release ]; then
+ ro_SYS_TYPE=slitaz
+ ro_INIT_TYPE=slitaz
+ ro_RC_LOCAL=/etc/rcS.conf
elif [ -d /etc/init.d ]; then
ro_SYS_TYPE=unknown
ro_INIT_TYPE=sysv
@@ -252,6 +256,9 @@
cp "$script" "/usr/sbin/$name" 2> /dev/null
chmod 755 "/usr/sbin/$name" 2> /dev/null
hav register $name System.Service $pardus_script
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ cp "$script" "/etc/init.d/$name" 2> /dev/null
+ chmod 755 "/etc/init.d/$name" 2> /dev/null
else
log "install_init_script: error: unknown init type"
return 1
@@ -279,6 +286,8 @@
elif [ "$ro_INIT_TYPE" = "pardus" ]; then
hav remove $name
rm -f "/usr/sbin/$name" > /dev/null 2>&1
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ rm -f "/etc/init.d/$name" > /dev/null 2>&1
else
log "remove_init_script: error: unknown init type"
return 1
@@ -303,6 +312,8 @@
"/etc/rc.d/rc.$name" start >> $ro_LOG_FILE 2>&1
elif [ "$ro_INIT_TYPE" = "lfs" ]; then
"/etc/rc.d/init.d/$name" start >> $ro_LOG_FILE 2>&1
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ "/etc/init.d/$name" start >> $ro_LOG_FILE 2>&1
elif [ "$ro_INIT_TYPE" = "pardus" ]; then
service $name on
else
@@ -328,6 +339,8 @@
"/etc/rc.d/rc.$name" stop >> $ro_LOG_FILE 2>&1
elif [ "$ro_INIT_TYPE" = "lfs" ]; then
"/etc/rc.d/init.d/$name" stop >> $ro_LOG_FILE 2>&1
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ "/etc/init.d/$name" stop >> $ro_LOG_FILE 2>&1
elif [ "$ro_INIT_TYPE" = "pardus" ]; then
service $name off
else
@@ -425,6 +438,12 @@
echo "fi" >> $ro_RC_LOCAL
echo "" >> $ro_RC_LOCAL
fi
+ # Slitaz GNU/Linux use /etc/rcS.conf to start services.
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ if ! grep $1 $ro_RC_LOCAL
+ then
+ sed -i -e "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"\1 $1\"/" $ro_RC_LOCAL
+ fi
# Probably most unknown Linux systems will be sysv type ones. These can theoretically
# be handled automatically if people give us information about them.
elif [ "$ro_INIT_TYPE" = "sysv" ]; then
@@ -484,6 +503,12 @@
rm "/etc/rc4.d/S??$1" > /dev/null 2>&1
rm "/etc/rc5.d/S??$1" > /dev/null 2>&1
rm "/etc/rc6.d/K??$1" > /dev/null 2>&1
+ # Slitaz GNU/Linux
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ if grep $1 $ro_RC_LOCAL
+ then
+ sed -i -e "s/$1//" $ro_RC_LOCAL
+ fi
# Unknown sysv-type system
elif [ "$ro_INIT_TYPE" = "sysv" ]; then
echo 1>&2 "Please remove remove references to the initialization script"
@@ -515,6 +540,8 @@
scriptname="/etc/rc.d/init.d/$name"
elif [ "$ro_INIT_TYPE" = "pardus" ]; then
scriptname="/usr/sbin/$name"
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ scriptname="/etc/init.d/$name"
else
log "$self: error: unknown init type"
return 1
@@ -563,6 +590,8 @@
scriptname="/etc/rc.d/init.d/$name"
elif [ "$ro_INIT_TYPE" = "pardus" ]; then
scriptname="/usr/sbin/$name"
+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
+ scriptname="/etc/rc.d/init.d/$name"
else
log "$self: error: unknown init type"
return 1
--- install-ori/vboxdrv.sh Thu Dec 17 14:37:35 2009
+++ install/vboxdrv.sh Thu Dec 24 11:49:30 2009
@@ -63,6 +63,8 @@
system=suse
elif [ -f /etc/gentoo-release ]; then
system=gentoo
+ elif [ -f /etc/slitaz-release ]; then
+ system=slitaz
fi
fi

@@ -123,6 +125,19 @@
if [ "`which $0`" = "/sbin/rc" ]; then
shift
fi
+ elif [ "$system" = "slitaz" ]; then
+ if [ -f /etc/init.d/rc.functions ]; then
+ . /etc/init.d/rc.functions
+ fi
+ fail_msg() {
+ status
+ }
+ succ_msg() {
+ status "$?"
+ }
+ begin_msg() {
+ echo "$1"
+ }
else
fail_msg() {
echo " ...failed!"
@@ -132,6 +147,7 @@
echo " ...done."
}
fi
+
if [ "$system" != "gentoo" ]; then
begin_msg() {
[ -z "${1:-}" ] && return 1
@@ -169,7 +185,11 @@
if ! modprobe vboxdrv > /dev/null 2>&1; then
failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
fi
- sleep .2
+ if [ "$system" = "slitaz" ]; then
+ sleep 1
+ else
+ sleep .2
+ fi
fi
# ensure the character special exists
if [ ! -c $DEVICE ]; then

EOT

./install.sh install /usr/share/VirtualBox
cd ..
find /usr /etc /lib > after
sed -i 's/ps -U/ps | grep/' /usr/share/VirtualBox/VBox.sh
echo 'lsmod | grep -q vboxdrv || modprobe vboxdrv' >> /etc/vbox/vbox.cfg
mkdir -p $PACKAGE-$VERSION/fs
diff -U0 before after | grep ^+/ | sed 's|^\+/||' | \
( cd / ; cpio -o -H newc ) | ( cd $PACKAGE-$VERSION/fs ; cpio -idm )

# Create pseudo package
cat > $PACKAGE-$VERSION/receipt <# SliTaz package receipt.

PACKAGE="$PACKAGE"
VERSION="$VERSION"
EXTRAVERSION=_$(uname -r | sed 's/-slitaz//')
CATEGORY="non-free"
SHORT_DESC="$SHORT_DESC"
WEB_SITE="$WEB_SITE"
DEPENDS="libsdl fontconfig gcc-lib-base glib libpng python udev libglu-mesa"

post_install()
{
$(grep ' udev[atp]' install/install.sh)
chroot "\$1/" depmod -a $(uname -r)

# Add vboxusers group
if (! grep -q ^vboxusers /etc/group); then
addgroup vboxusers
fi
}
EOT

# Pack
tazpkg pack $PACKAGE-$VERSION

# Install pseudo package
tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT

# Clean
cd $CUR_DIR
rm -rf $TMP_DIR
.

2010-05-18

Slitaz -- setxkbmap

Ctrl+Alt+Backspace

http://doc.slitaz.org/en:guides:xorg-xvesa

The # sign means that you do this command as root on your console.

The default Slitaz-3.0.iso uses xorg 7.4 with the xorg-xf86-video-vesa 2.0.0 driver. This xvesa-driver can cause quite a few problems - it can result in a very low resolution or X does not start at all (falls back to slim or to the console). There are however some more possibilities:

  • check first, if you have enough Ram to run the default.iso - if not use the lowram.iso
  • you use the slitaz-3.0-xvesa.iso (TinyX)
  • you install the xorg video driver for your card
  • you can try to change your xorg.conf

Note: In Xorg versions up to 7.3, the Ctrl+Alt+Backspace key combination could be used to quit the X server. To enable it in version 7.4 and later, you can type the following command from any X terminal emulator:

setxkbmap -option terminate:ctrl_alt_bksp

Good introductions to Xorg Configuration: The FreeBSD Handbook and X Configuration from Ubuntu
[..]
root@slitaz-3:~# tazpkg info xorg-setxkbmap

Tazpkg information
================================================================================
Package : xorg-setxkbmap
Version : 1.0.4
Category : x-window
Short desc : Set the keyboard using the X Keyboard Extension.
Maintainer : pascal.bellard@slitaz.org
Depends : xorg xorg-libX11 xorg-xkeyboard-config xorg-libxkbfile
Web site : http://www.x.org/
================================================================================

root@slitaz-3:~# tazpkg list-files xorg-setxkbmap

Installed files with : xorg-setxkbmap
================================================================================
/usr/bin/setxkbmap
================================================================================
1 files installed with xorg-setxkbmap.

root@slitaz-3:~#
.

2010-05-12

Slitaz -- kernel -2

tazwok cook linux

Env:
http://hg.slitaz.org/wok-stable/raw-file/d4f3fe7e0dc0/linux/receipt

wok-stable-cd66133a1f46.tar.bz2

error: zlib.h: No such file or directory

tazpkg get-install zlib-dev
or
ln -s /home/slitaz/wok/linux/linux-2.6.30.6/include/linux/zlib.h /usr/include

root@slitaz:/home/slitaz/wok# tazwok cook linux
[..]
================================================================================
Package linux-wireless (2.6.30.6) generated.
Size : 1.4M /home/slitaz/packages/linux-wireless-2.6.30.6.tazpkg

tazwok cook aufs-utils
tazwok cook broadcom-wl
tazwok cook catalyst
tazwok cook compcache
tazwok cook dahdi-linux
tazwok cook fuse
tazwok cook gnu-efi
tazwok cook iptables
tazwok cook kqemu
tazwok cook libcap
tazwok cook linmodem-agrsm
tazwok cook linmodem-intel-536ep
tazwok cook linmodem-intel-537
tazwok cook linmodem-slmodem
tazwok cook ndiswrapper-driver
tazwok cook nvidia
tazwok cook open-iscsi
tazwok cook usbip
======================================================================
These modules selected in .config were not categorized in linux-* pkgs:
smsc9420.ko.gz : /home/slitaz/wok/linux/linux-2.6.30.6/_pkg/lib/modules/2.6.30.6-slitaz/kernel/drivers/net/smsc9420.ko.gz
dvb-core.ko.gz : /home/slitaz/wok/linux/linux-2.6.30.6/_pkg/lib/modules/2.6.30.6-slitaz/kernel/drivers/media/dvb/dvb-core/dvb-core.ko.gz
dlm.ko.gz : /home/slitaz/wok/linux/linux-2.6.30.6/_pkg/lib/modules/2.6.30.6-slitaz/kernel/fs/dlm/dlm.ko.gz
configfs.ko.gz : /home/slitaz/wok/linux/linux-2.6.30.6/_pkg/lib/modules/2.6.30.6-slitaz/kernel/fs/configfs/configfs.ko.gz
======================================================================

Executing strip on all files... [ OK ]
Copying the receipt... [ OK ]
Creating the list of files... [ OK ]
Creating md5sum of files... [ OK ]
Compressing the fs...
LZMA 4.57 Copyright (c) 1999-2007 Igor Pavlov 2007-12-06
8861 blocks
[ OK ]
Updating receipt sizes... [ OK ]
Creating full cpio archive... 6361 blocks
[ OK ]
Restoring original package tree... 8861 blocks
================================================================================
Package linux (2.6.30.6) generated.
Size : 3.1M /home/slitaz/packages/linux-2.6.30.6.tazpkg

root@slitaz:/home/slitaz/wok# tazwok stats

Tazwok configuration statistics
================================================================================
Wok directory : /home/slitaz/wok
Packages repository : /home/slitaz/packages
Sources repository : /home/slitaz/src
Packages in the wok : 2293
Cooked packages : 53
================================================================================

root@slitaz:/home/slitaz/wok# ls ../packages
lguest-2.6.30.6.tazpkg
linux-2.6.30.6.tazpkg
linux-acpi-2.6.30.6.tazpkg
linux-agp-2.6.30.6.tazpkg
linux-appletalk-2.6.30.6.tazpkg
linux-aufs-2.6.30.6.tazpkg
linux-bluetooth-2.6.30.6.tazpkg
linux-bridge-2.6.30.6.tazpkg
linux-btrfs-2.6.30.6.tazpkg
linux-cifs-2.6.30.6.tazpkg
linux-coda-2.6.30.6.tazpkg
linux-cpufreq-2.6.30.6.tazpkg
linux-cramfs-2.6.30.6.tazpkg
linux-crypto-2.6.30.6.tazpkg
linux-cryptoloop-2.6.30.6.tazpkg
linux-dialup-2.6.30.6.tazpkg
linux-drm-2.6.30.6.tazpkg
linux-ext4-2.6.30.6.tazpkg
linux-gfs2-2.6.30.6.tazpkg
linux-headers-2.6.30.6.tazpkg
linux-hfs-2.6.30.6.tazpkg
linux-hfsplus-2.6.30.6.tazpkg
linux-ieee1394-2.6.30.6.tazpkg
linux-input-misc-2.6.30.6.tazpkg
linux-input-tablet-2.6.30.6.tazpkg
linux-input-touchscreen-2.6.30.6.tazpkg
linux-ipv6-2.6.30.6.tazpkg
linux-irda-2.6.30.6.tazpkg
linux-isdn-2.6.30.6.tazpkg
linux-jfs-2.6.30.6.tazpkg
linux-joystick-2.6.30.6.tazpkg
linux-kvm-2.6.30.6.tazpkg
linux-md-2.6.30.6.tazpkg
linux-memstick-2.6.30.6.tazpkg
linux-minix-2.6.30.6.tazpkg
linux-mmc-2.6.30.6.tazpkg
linux-mwave-2.6.30.6.tazpkg
linux-ncpfs-2.6.30.6.tazpkg
linux-netfilter-2.6.30.6.tazpkg
linux-reiserfs-2.6.30.6.tazpkg
linux-sched-2.6.30.6.tazpkg
linux-scsi-2.6.30.6.tazpkg
linux-sound-2.6.30.6.tazpkg
linux-source-2.6.30.6.tazpkg
linux-squashfs-2.6.30.6.tazpkg
linux-udf-2.6.30.6.tazpkg
linux-usbdsl-2.6.30.6.tazpkg
linux-usbip-2.6.30.6.tazpkg
linux-usb-misc-2.6.30.6.tazpkg
linux-uwb-2.6.30.6.tazpkg
linux-video-2.6.30.6.tazpkg
linux-wimax-2.6.30.6.tazpkg
linux-wireless-2.6.30.6.tazpkg
root@slitaz:/home/slitaz/wok#

====
root@slitaz:/home/slitaz/wok# tazwok cook linux
[..]
patching file lib/Kconfig
patching file lib/decompress_bunzip2.c
patching file lib/decompress_inflate.c
patching file lib/decompress_unlzma.c
cc -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE lguest.c -lz -o lguest
lguest.c:34:18: error: zlib.h: No such file or directory
make: *** [lguest] Error 1

root@slitaz:/home/slitaz/wok# cat linux/receipt | grep -n lguest
59: cd Documentation/lguest
60: make lguest || return 1
root@slitaz:/home/slitaz/wok#
.

2010-05-11

Slitaz -- kernel

Build your own custom Linux Kernel for SliTaz
[http://doc.slitaz.org/en:guides:kernel]

1. tazpkg get-install slitaz-toolchain
2. tazpkg get-install linux-source


----
To modify the kernel configuration:
$ cd /usr/src/linux-2.6.30.6-slitaz
$ make menuconfig

To build the kernel and the modules:
$ cd /usr/src/linux-2.6.30.6-slitaz
$ make bzImage && make modules

To install the new kernel and the modules:
$ make modules_install
$ cp -a arch/x86/boot/bzImage /boot/vmlinuz-2.6.30.6-slitaz

To make a Slitaz package with the new kernel and the modules:
$ make tazpkg

See /usr/src/linux-2.6.30.6-slitaz/README
----
================================================================================
linux-source (2.6.30.6) is installed.

root@slitaz:~# gcc -v
Using built-in specs.
Target: i486-pc-linux-gnu
Configured with: ../gcc-4.4.1/configure --prefix=/usr --libexecdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --with-system-zlib --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu
Thread model: posix
gcc version 4.4.1 (GCC)
root@slitaz:~#

root@slitaz:~# tazpkg info slitaz-toolchain

Tazpkg information
================================================================================
Package : slitaz-toolchain
Version : 1.0
Category : meta
Short desc : SliTaz toolchain meta package for devel.
Maintainer : pankso@slitaz.org
Depends : binutils linux-headers glibc-dev gcc make
Web site : http://www.slitaz.org/
================================================================================

root@slitaz:~# tazpkg info linux-source

Tazpkg information
================================================================================
Package : linux-source
Version : 2.6.30.6
Category : development
Short desc : The Linux kernel source files.
Maintainer : devel@slitaz.org
Depends : linux slitaz-toolchain ncurses-dev perl
Wanted src : linux
Web site : http://www.kernel.org/
================================================================================

root@slitaz:~# cat /var/log/tazpkg.log
2010-05-12 08:33:01 - Installed - binutils (2.19.1) - 3e0de34e007be29c0ebb6cbff43eba15
2010-05-12 08:33:01 - Installed - linux-headers (2.6.30.6) - f96101f9d3e1c29ff35edd54476e4577
2010-05-12 08:33:03 - Installed - bash (4.0) - 299bf79f5c8ea7b19715e9981a9419a8
2010-05-12 08:33:03 - Installed - libgd (2.0.35) - 539b6e178d8bcdbd7a0e4d4d97c0e04a
2010-05-12 08:33:04 - Installed - glibc-dev (2.10.1) - 1bfa095deffb35e64401b59856cf3ede
2010-05-12 08:33:05 - Installed - libgomp (4.4.1) - 2a1264d8e6daed0f6a0d51f30bdc6ede
2010-05-12 08:33:05 - Installed - make (3.81) - 6e37b7395ffa82c65ef5630c2e27dec2
2010-05-12 08:33:06 - Installed - gmp (4.2.2) - 549b48e2af6470f3babfcab6a407900c
2010-05-12 08:33:06 - Installed - mpfr (2.4.1) - 8af4c7df92b29ccf77d589a6e54001f6
2010-05-12 08:33:13 - Installed - gcc (4.4.1) - 3dd4b1be27a5a90f738c63f5654786c9
2010-05-12 08:33:13 - Installed - slitaz-toolchain (1.0) - dbf1a81f5e42e93b9f838b5e146c6783
2010-05-12 08:39:43 - Installed - ncursesw-dev (5.7) - 3a243df79f4ad2dfa1c1fc4c7981a0a9
2010-05-12 08:39:43 - Installed - ncurses-dev (5.7) - c7a96c4ae098b65809e2bd2165362a48
2010-05-12 08:39:43 - Installed - libdb (4.7.25) - 88b3fb91256dd36f1b8bd7d3aef73989
2010-05-12 08:39:43 - Installed - gdbm (1.8.3) - db31351e035c988201ab6a4f54582e96
2010-05-12 08:39:45 - Installed - perl (5.10.0) - 08a618230fbad37eaa63b7e4483eca80
2010-05-12 08:40:06 - Installed - patch (2.5.4) - 395aa6153644678ea3ff2512ac0bb8bb
2010-05-12 08:40:12 - Installed - linux-source (2.6.30.6) - 478e2bdb88dabc5ac32cd7781488305a
root@slitaz:~#

root@slitaz:~# ls -l /usr/src
lrwxrwxrwx 1 root root 21 May 12 08:39 linux -> linux-2.6.30.6-slitaz
drwxrwxr-x 24 root root 4096 May 12 08:40 linux-2.6.30.6-slitaz
-rwx------ 1 root root 59430223 Oct 14 2009 linux-2.6.30.6.tar.bz2
root@slitaz:~# ls -l /lib/modules/`uname -r`/ | grep linux
lrwxrwxrwx 1 root root 30 May 12 08:39 build -> /usr/src/linux-2.6.30.6-slitaz
lrwxrwxrwx 1 root root 30 May 12 08:39 source -> /usr/src/linux-2.6.30.6-slitaz
root@slitaz:~#
.

2010-05-10

Slitaz -- ldd

ldd :
LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $@

root@slitaz:~# which ldd
/usr/bin/ldd
root@slitaz:~# cat /usr/bin/ldd
#!/bin/sh
#
# Tiny ldd fake.
# (c) 2010 SliTaz GNU/Linux.
#

echo ""
LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $@
echo ""
root@slitaz:~# tazpkg search-pkgname ldd

Search result for file : ldd
================================================================================
asterisk
catalyst
glibc-dev
slitaz-base-files
zsh

================================================================================
5 pkg(s) found with file : ldd

root@slitaz:~# tazpkg list-files slitaz-base-files | grep ldd
/usr/bin/ldd
root@slitaz:~#
root@slitaz:~# ldd /bin/cpio

linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/librt.so.1 (0xb8022000)
libc.so.6 => /lib/libc.so.6 (0xb7ebc000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7ea3000)
/lib/ld-linux.so.2 => /lib/ld-2.10.1.so (0xb802c000)

root@slitaz:~# LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $@ /bin/cpio
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/librt.so.1 (0xb7f55000)
libc.so.6 => /lib/libc.so.6 (0xb7def000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7dd6000)
/lib/ld-linux.so.2 => /lib/ld-2.10.1.so (0xb7f5f000)

root@slitaz:~# LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $@
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
This program usually lives in the file `/lib/ld.so', and special directives
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file. This helper program loads
the shared libraries needed by the program executable, prepares the program
to run, and runs it. You may invoke this helper program directly from the
command line to load and run an ELF executable file; this is like executing
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the executable
file you run. This is mostly of use for maintainers to test new versions
of this helper program; chances are you did not intend to run this program.

--list list all dependencies and how they are resolved
--verify verify that given object really is a dynamically linked
object we can handle
--library-path PATH use given PATH instead of content of the environment
variable LD_LIBRARY_PATH
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names
in LIST
--audit LIST use objects named in LIST as auditors
root@slitaz:~#

2010-05-09

Slitaz -- Desktop Wallpaper



Desktop Wallpaper

A.
menu --> preferences --> Desktop Wallpaper

B.
default:

root@slitaz:~# tail -5 ~/.config/openbox/autostart.sh
# Set a background image using hsetroot (depends on imlib2).
#hsetroot -fill /usr/share/images/slitaz-background.png &

# Background color with xsetroot.
#xsetroot -solid "#222222" &
root@slitaz-3:~# ls /usr/share/images/slitaz*
/usr/share/images/slitaz-background.jpg
root@slitaz:~#

1. enable hsetroot
vi ~/.config/openbox/autostart.sh

hsetroot -fill /usr/share/images/heron.jpg &

2. tazpkg get-install hsetroot
.

Slitaz -- numlock

numlock

vi /etc/slim.conf

numlock on

root@slitaz:~# cat /etc/slim.conf | grep numlock
# Activate numlock when slim starts. Valid values: on|off
# numlock on
root@slitaz:~#
.

Slitaz -- lighttpd




Lighttpd Enhanced Directory Listing Script

Env: packages-3.0.iso
lighttpd-1.4.26
php-5.2.11

root@slitaz:/var/www/packages/3.0# head index.php

$VERSION = "0.2-slitaz";

/* Lighttpd Enhanced Directory Listing Script
* ------------------------------------------
* Authors: Evan Fosmark ,
* Pascal Bellard
*
*

root@slitaz:/var/www/packages/3.0# tail -14 index.php

// Print ending stuff
print "



lighttpd (SliTaz GNU/Linux)





";
?>
root@slitaz:/var/www/packages/3.0#
.

2010-05-05

Slitaz -- firefox


Env: slitaz-3.0.iso
langpack: Traditional Chinese (zh-TW) Language Pack
[http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.5/linux-i686/xpi/zh-TW.xpi]

root@slitaz:~# file /tmp/zh-TW.xpi
/tmp/zh-TW.xpi: Zip archive data, at least v2.0 to extract
root@slitaz:~# unzip -l /tmp/zh-TW.xpi
Archive: /tmp/zh-TW.xpi
Length Date Time Name
-------- ---- ---- ----
876 03-15-10 09:10 install.rdf
467859 03-15-10 09:10 chrome/zh-TW.jar
1363 03-15-10 09:10 chrome.manifest
-------- -------
470098 3 files
root@slitaz:~#
root@slitaz:~# ls -lR /usr/lib/firefox-3.5.7/extensions/langpack-zh-TW@firefox.mo
zilla.org/
/usr/lib/firefox-3.5.7/extensions/langpack-zh-TW@firefox.mozilla.org/:
drwxr-xr-x 2 root root 60 May 5 19:43 chrome
-rw-r--r-- 1 root root 1363 Mar 15 09:10 chrome.manifest
-rw-r--r-- 1 root root 876 Mar 15 09:10 install.rdf

/usr/lib/firefox-3.5.7/extensions/langpack-zh-TW@firefox.mozilla.org/chrome:
-rw-r--r-- 1 root root 467859 Mar 15 09:10 zh-TW.jar
root@slitaz:~#

root@slitaz:~# cat /etc/firefox/pref/firefox-l10n.js
//@line 36 "/home/slitaz/wok/firefox/firefox-3.5.7/browser/locales/en-US/firefox-l10n.js"

//@line 38 "/home/slitaz/wok/firefox/firefox-3.5.7/browser/locales/en-US/firefox-l10n.js"

pref("general.useragent.locale", "zh-TW");

root@slitaz:~# cat /var/lib/tazpkg/installed/firefox/receipt
# SliTaz package receipt.

PACKAGE="firefox"
VERSION="3.5.7"
CATEGORY="network"
SHORT_DESC="User friendly, secure and fast web browser."
MAINTAINER="pankso@slitaz.org"
DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage alsa-lib xorg-libXt libfirefox"
BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev \
dbus-dev dbus-glib-dev alsa-lib-dev"
TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
WEB_SITE="http://www.mozilla.org/"
WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
CONFIG_FILES="/etc/firefox"
TAGS="browser"

# Rules to configure and make the package.
#
# A long compile time... dont forget to build libidl before and check the
# .mozconfig file from the stuff and the stuff/README document.
#
compile_rules()
{
# Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
# and to have a nice clean.
mv mozilla-* $PACKAGE-$VERSION 2>/dev/null
cp -a stuff/firefox.mozconfig $src/.mozconfig
cd $src
sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk
./configure $CONFIGURE_ARGS &&
make &&
make DESTDIR=$PWD/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
mkdir -p $fs/usr/lib/$PACKAGE-$VERSION $fs/usr/share $fs/etc
cp -a $_pkg/usr/bin $fs/usr
cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib

# Home page, bookmarks file and branding.
cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
cp -a stuff/bookmarks.html \
$fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
cp -a stuff/firefox-branding.js \
$fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/

# User preference.
cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
cp -a stuff/userChrome.css \
$fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome

# Move default config to /etc/firefox (/usr maybe read-only)
for i in defaults browserconfig.properties ; do
mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
done
ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults

# EULA is accepted by SliTaz project.
sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
$fs/etc/firefox/pref/firefox.js

# Locale fr
tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
-C $fs/usr/lib/$PACKAGE-$VERSION/extensions

#sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
# $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf

# Search Plugin (by: oddball)
cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
chown -R root.root $fs

# Remove unnecessary files.
rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
# split firefox libs
rm -rf $fs/usr/lib/$PACKAGE-$VERSION/*.so
#retain big firefox libs
cp $_pkg/usr/lib/$PACKAGE-$VERSION/libxul.so \
$_pkg/usr/lib/$PACKAGE-$VERSION/libmozjs.so \
$fs/usr/lib/$PACKAGE-$VERSION

}

# Pre - Post install command to set default locale.
pre_install()
{
local root
root=$1
# Get old plugins
mkdir /tmp/firefox-plugins-$$
cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
# Remove old libs and configs
rm -rf $root/usr/lib/firefox-*/plugins
rm -rf $root/usr/lib/firefox-*/dictionaries
rm -rf $root/etc/firefox
}
post_install()
{
local root
root=$1
if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
sed -i 's/en-US/fr/' \
$root/etc/firefox/pref/firefox-l10n.js

fi
for i in /tmp/firefox-plugins-$$/* ; do
[ -e $i ] || continue
[ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
cp -a $i /usr/lib/firefox-*/plugins/
done
rm -rf /tmp/firefox-plugins-$$
}
.

2010-05-01

Slitaz -- Gigabit Ethernet




Env: Gigabit Ethernet direct connection
server: pure-ftpd-1.0.27
client: gftp-2.0.19

54.60 Mbytes per second, 39.97 Mbytes per second

root@slitaz:~# tail ~/.gftp/gftp.log
PASV
227 Entering Passive Mode (192,168,1,37,170,149)
RETR /media/Audio1/slitaz/iso/packages-3.0.iso
150-Accepted data connection
150 1562624.0 kbytes to download
226-File successfully transferred
226 38.181 seconds (measured here), 39.97 Mbytes per second
Successfully transferred /media/Audio1/slitaz/iso/packages-3.0.iso at 40901.58 KB/s
Successfully changed mode of /media/video/packages-3.0.iso to 777
Successfully changed the time stamp of /media/video/packages-3.0.iso

root@slitaz:~# tail -94 ~/.gftp/gftp.log | head -8
RETR /media/Audio1/arm9/arm9home/arm-linux-gnueabi-4.2.4.tar.gz
150-Accepted data connection
150 70052.1 kbytes to download
226-File successfully transferred
226 1.253 seconds (measured here), 54.60 Mbytes per second
Successfully transferred /media/Audio1/arm9/arm9home/arm-linux-gnueabi-4.2.4.tar.gz at 55752.24 KB/s
Successfully changed mode of /root/arm-linux-gnueabi-4.2.4.tar.gz to 777
Successfully changed the time stamp of /root/arm-linux-gnueabi-4.2.4.tar.gz

root@slitaz:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr x:x:x:x:x:x
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49906 errors:0 dropped:0 overruns:0 frame:0
TX packets:15625 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:75058857 (71.5 MiB) TX bytes:1174623 (1.1 MiB)
Interrupt:20 Base address:0xc000
root@slitaz:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use If
127.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 lo
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 et
root@slitaz:~# ssh root@192.168.1.37

Host '192.168.1.37' is not in the trusted hosts file.
(fingerprint md5 x:x:x:x:)
Do you want to continue connecting? (y/n) y

Secure login on SliTaz GNU/Linux powered by Dropbear SSH server.

root@192.168.1.37's password:


(°- { Documentation in /usr/share/doc. Use 'less -EM' to read files,
//\ become root with 'su' and edit using 'nano'.
v_/_ Type 'startx' to start a X window session. }

SliTaz GNU/Linux is distributed in the hope that it will be useful, but
with ABSOLUTELY NO WARRANTY.


root@slitaz-3:~# netstat -nlt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.37:43669 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
netstat: /proc/net/tcp6: No such file or directory
root@slitaz-3:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr x:x:x:x:x:x
inet addr:192.168.1.37 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5083790 errors:0 dropped:0 overruns:0 frame:0
TX packets:11132174 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:359400699 (342.7 MiB) TX bytes:4009240006 (3.7 GiB)
Interrupt:17

root@slitaz-3:~#
.

Slitaz -- fbreader


root@slitaz-3:~# tazpkg info fbreader

Tazpkg information
================================================================================
Package : fbreader
Version : 0.12.10
Category : utilities
Short desc : E-Book Reader. Supports many e-book formats.
Maintainer : devl547@gmail.com
Depends : expat liblinebreak curl fribidi bzip2 sqlite gtk+
Build deps : expat-dev liblinebreak-dev curl-dev fribidi-dev bzip2-dev sqlite-dev gtk+-dev
Web site : http://www.fbreader.org/
================================================================================

FBReader— e-book reader for Unix/Windows computers

[..]
Main features:

* Supported e-book formats are
o ePub, an international e-publishing standard.
o fb2, a Russian e-books standard de facto.
o plucker, one of the most popular Palm e-book format.
o Non-DRM'd version of Mobipocket, a popular commercial e-book format.
o More formats.
* Direct reading from tar, zip, gzip and bzip2 archives. (Multiple books in one archive are supported.)
* Automatic library building.
* Automatic language and character encoding detection is supported.
* Automatically generated contents table.
* Embedded images support.
* Footnotes/hyperlinks support.
* Position indicator.
* Keeps the last open book and the last read positions for all opened books between runs.
* List of last opened books.
* Automatic hyphenations. Liang's algorithm is used. The same algorithm is used in TeX, and TeX hyphenation patterns are used in FBReader. Patterns for Czech, English, Esperanto, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish and Ukrainian are included in the current version.
* Text search.
* Full-screen mode.
* Screen rotation by 90, 180 and 270 degrees.
[..]

Navit


navit planet extractor

Main Page [http://wiki.navit-project.org/index.php/Main_Page]

Navit is an open source (GPL) car navigation software for Linux systems. It will display your position on a map (in bird-view mode or as a 3D "visualization") from GPS sensor data, and can provide precise route calculation, touch screen functionality and supports Points of Interest (POI), which can be extended via an easy to use plugin system. Unlike other navigation systems, Navit maps are dynamically generated in real time from vector data.
[..]
Maps

The best navigation system is useless without maps. Navit supports these various map formats:

* OpenStreetMaps
o You can download pre-compiled (ready-to-use) maps using the OpenStreetMap-data from the the navit planet extractor ;-)]™ which allows you to select a region of OpenStreetMap to extract. This will give you a binary file that can be used directly by Navit without further processing. The planet extractor's map data is updated daily.
o Or you can download pre-processed Navit-compatible map packages from cloudmade.com
* Australian OSM extract
o Bigtincan maintains a regular extract for navit, which does support navigation and search of the Australian data.
* European maps
* Garmin maps
* US/Tiger maps
* Other maps or how you could display POI, tracks or routes from other sources
[..]