2008-11-27

Slitaz - vbox / gftp

vbox-nat-gftp


User Manual
Version 2.0.2 Edition

6.4.1. Configuring port forwarding with NAT
As the virtual machine is connected to a private network internal to VirtualBox and invisible to the host, network services on the guest are not accessible to the host machine or to other computers on the same network. However, VirtualBox can make given services available outside of the guest by using port forwarding. This means that VirtualBox listens to certain ports on the host and resends all packages which arrive on them to the guest on the ports used by the services being forwarded.
To an application on the host or other physical (or virtual) machines on the network, it looks as though the service being proxied is actually running on the host (note that this also means that you cannot run the same service on the same ports on the host). However, you still gain the advantages of running the service in a virtual machine -- for example, services on the host machine or on other virtual machines cannot be compromised or crashed by a vulnerability or a bug in the service, and the service can run in a different operating system to the host system.
You can set up a guest service which you wish to proxy using the command line tool VBoxManage. You will need to know which ports on the guest the service uses and to decide which ports to use on the host (often but not always you will want to use the same ports on the guest and on the host). You can use any ports on the host which are not already in use by a service. An example of how to set up incoming NAT connections to a ssh server on the guest requires the following three commands:
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata "Linux Guest"
"VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222
The above example assumes a PCNet virtual network card; if you have configured the guest to use the Intel PRO/1000, replace "pcnet" with "e1000" in the above commands.
The name guestssh is an arbitrary one chosen for this particular forwarding configuration. With that configuration in place, all TCP connections to port 2222 on the host will be forwarded to port 22 on the guest. Protocol can be either of TCP or UDP (these are case insensitive). To remove a mapping again, use the same commands, but leaving out the values (in this case TCP, 22 and 2222).

-------
VBoxManage clonevdi srv1.vdi srv2.vdi

-------
Extract from

http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?t=4486&start=0&postdays=0&postorder=asc&highlight=

Quote from George Ankner:
If you knew as much as you think you know,
You would realize that you don't know what you thought you knew!

也許正應了列在她上面那一段來自George Ankner睿智的話…

我的一個解讀是:
「假如你理解得像你想像中那樣剔透的話,那麼你終將會體認到:
原先你以為你懂,其實不然!」 ^o^

2008-11-24

Slitaz - cups - samba

URI: usb

URI: smb

cups-pdf

cups-smaba

2008-11-20

Slitaz - ISO

http://forum.slitaz.org/viewtopic.php?pid=5028#p5028

* » CD-label for Slitaz live-CD please?

2008-11-16 03:03:17

bellard Contributor

Re: CD-label for Slitaz live-CD please?

Hi,

Please note you can burn http://mirror.slitaz.org/iso/1.0/packages-1.0.iso (255Mb) instead of http://mirror.slitaz.org/iso/1.0/slitaz-1.0.iso (25.Mb).

You will be able to install anything offline with:
Code:

# mount /dev/cdrom /mnt
# /mnt/install.sh

-pascal

NB: for slitaz cooking http://mirror.slitaz.org/iso/cooking/pa … ooking.iso (692Mb) is built every night.

Offline


#4 2008-11-16 20:14:10

oui Contributor

Re: CD-label for Slitaz live-CD please?

sevala offers more labels:

http://forum.slitaz.org/viewtopic.php?pid=4863#p4863

Offline


#5 Yesterday 16:23:45

alanyih Member

Re: CD-label for Slitaz live-CD please?

bellard wrote:

NB: for slitaz cooking http://mirror.slitaz.org/iso/cooking/pa … ooking.iso (692Mb) is built every night.

can't display phpinfo!

Menu --> Development --> PHP info

root@slitaz:~# cat /mnt/iso/install.sh
#!/bin/sh
#

DIR=$(cd $(dirname $0); pwd)

[ -d /var/cache/tazpkg ] || mkdir -p /var/cache/tazpkg
ls -d $DIR/packages/* > /var/lib/tazpkg/mirror
ln -fs $DIR/packages/*/*.tazpkg /var/cache/tazpkg/
ln -fs $DIR/packages/*/packages.* /var/lib/tazpkg
ln -fs $DIR/packages/*/files.list.lzma /var/lib/tazpkg
ln -s $DIR/website /var/www

root@slitaz:~# cat /usr/share/applications/php.desktop
[Desktop Entry]
Encoding=UTF-8
Name=PHP info
GenericName=PHP informations
GenericName[fr]=Informations sur PHP
Comment=PHP configuration informations
Comment[fr]=Informations de configuration de PHP
Exec=firefox http://localhost/phpinfo/
Icon=php.png
Type=Application
Categories=Development;

root@slitaz:~# tazpkg get-install lighttpd
lighttpd-1.4.20 already in the cache : /var/cache/tazpkg
Tracking dependencies for : lighttpd-1.4.20
============================================================================
Missing : pcre
......
Installation of : lighttpd-1.4.20
============================================================================
Copying lighttpd-1.4.20... [ OK ]
Extracting lighttpd-1.4.20... 247 blocks
Extracting the pseudo fs... 545 blocks
Processing pre-install commands...
Installing lighttpd... cp: target '/var/www' is not a directory
[ Faile]

Removing all tmp files... [ OK ]
Processing post-install commands...
Starting web server: LightTPD... [ OK ]
============================================================================
lighttpd (1.4.20) is installed.

Online


#6 Yesterday 22:02:08

bellard Contributor

Re: CD-label for Slitaz live-CD please?

Can you reboot and do this test:
Code:

# mkdir /var/www
# /mnt/iso/install.sh

Thanks,

-pascal

Offline


#7 Today 16:07:55

alanyih Member

Re: CD-label for Slitaz live-CD please?

bellard wrote:
Code:

# mkdir /var/www
# /mnt/iso/install.sh

Well run!

Thankx!


#8 2008-11-20 10:42:06

bellard Contributor

Re: CD-label for Slitaz live-CD please?

FYI http://mirror.slitaz.org/iso/1.0/packages-1.0.iso and http://mirror.slitaz.org/iso/cooking/pa … ooking.iso are fixed now.

-pascal


----------

+case " $OPTIONS " in
+*\ --website\ *)
+ if [ -d /slitaz/home/slitaz/hg/website ]; then
+ echo -n "Adding web site"
+ mkdir $TEMP_DIR/website
+ cp -a /slitaz/home/slitaz/hg/website/* $TEMP_DIR/website
+ cat >>$TEMP_DIR/install.sh<< \ EOF
+[ -d /var/www ] || mkdir -p /var/www
+ln -s \$DIR/website /var/www
+EOF
+ status
+ echo "$(du -hs $TEMP_DIR/website | awk '{ print $1 }') used by web site."
+ fi;;
+esac

-

2008-11-14

Slitaz - autologin

Extract from

http://forum.slitaz.org/viewtopic.php?id=238

Step one - disable Slim:
Remove Slim from RUN_DAEMONS in /etc/rcS.conf

Step two - create an executable login script:
Create /usr/bin/loginscript file with the following content:

Code:

#!/bin/sh
/bin/login -f root

Step three - amend /etc/inittab

Code:

tty1::respawn:/sbin/getty -n -l /usr/bin/loginscript 38400 tty1

Step four - create /root/.profile (if you don't have one)

Code:

if [ -z "$SCREEN" ] && [ $(tty) = /dev/tty1 ]; then
while true
do
startx --
sleep 10
done
fi

Note: '[' is a command so make sure there are spaces before and after it.

Step five - reboot



http://listengine.tuxfamily.org/lists.tuxfamily.org/slitaz/2008/04/msg00012.html

http://www.shallowsky.com/blog/linux/autologin-upstart.html


--------
description: Up slim 1.3.1 (automatic login + more customizations)

http://hg.slitaz.org/wok/file/f25290110550/slim/receipt

slim/receipt
changeset 1424: f25290110550
parent: 302fa891a6d2
child: 2a0038b01ed7
author: Pascal Bellard
date: Fri Sep 26 13:16:44 2008 +0000 (6 weeks ago)
permissions: -rw-r--r--
description: Up slim 1.3.1 (automatic login + more customizations)

# SliTaz package receipt.

PACKAGE="slim"
VERSION="1.3.1"
CATEGORY="x-window"
SHORT_DESC="Desktop-independent graphical login manager for X11."
MAINTAINER="pankso@slitaz.org"
DEPENDS="jpeg libpng slitaz-configs"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://slim.berlios.de"
WGET_URL="http://download.berlios.de/slim/$TARBALL"
CONFIG_FILES="/etc/slim.conf"
BUGS="Sometime needs more thant 10 seconds to start (since HAL/DCOP addition). Why ?"


-------------
http://hg.slitaz.org/slitaz-boot-scripts/rev/06dffda5c2ce
changeset: bootopts.sh: autologin support (need slim 1.3.1)
changeset 117: 06dffda5c2ce
parent 116: 36274d47502f
child 118: b648ffc81f2e
tag: 2.5.2
author: Pascal Bellard
date: Sun Sep 28 23:09:36 2008 +0200 (7 weeks ago)
files: etc/init.d/bootopts.sh
description: bootopts.sh: autologin support (need slim 1.3.1)

--- a/etc/init.d/bootopts.sh Wed Sep 24 22:18:30 2008 +0200
+++ b/etc/init.d/bootopts.sh Sun Sep 28 23:09:36 2008 +0200
@@ -112,6 +112,11 @@ if ! grep -q "1000:1000" /etc/passwd; th
fi
fi

+# Autologin option to skip first graphic login prompt.
+if grep -q "autologin" /proc/cmdline; then
+ echo "auto_login yes" >> /etc/slim.conf
+fi
+
# Check for a specified home directory on cmdline (home=*).
#
if grep -q "home=usb" /proc/cmdline; then


----------
2008-11-21

slim-1.3.1.tazpkg 2008-Oct-31 09:02:50 78.5K

slitaz-boot-scripts-2.5.2.tazpkg 2008-Oct-15 22:47:57 13.5K

/etc/init.d/bootopts.sh
#!/bin/sh
# /etc/init.d/bootopts.sh - SliTaz boot options from the cmdline.
#
. /etc/init.d/rc.functions

# Autologin option to skip first graphic login prompt.
if grep -q "autologin" /proc/cmdline; then
echo "auto_login yes" >> /etc/slim.conf
fi


---------
ChangeLog
1.3.1 - 2008.09.26
* Added focus_password config option for focusing password
automatically when default_user is enabled
* Added auto_login option
* Fixed uninitialized daemonmode, see
http://www.freebsd.org/cgi/query-pr.cgi?pr=114366
* Fixed maximum length for password
* Introduced customization options for session text:
font, colors, position, shadows.

-