PDA

View Full Version : [Debian] Running Debian in a chroot


Pages : [1] 2

qole
2008-05-22, 19:48
This is a technical discussion thread about running Debian in a chroot. Please post questions about custom setups or technical problems here.

UPDATE, AUGUST 10 2008:

I have posted the newest versions of the chroot scripts (/sbin/debian, /sbin/closechroot, /sbin/synchroot, /usr/bin/debbie) and the chroot config file (/home/user/.chroot) in this post (http://www.internettablettalk.com/forums/showthread.php?p=211973#post211973). You can use these scripts to set up your own custom chroot solution. If you just wish to have the applications that Debian gives you (OpenOffice, Firefox, etc) without the hassle, use the Easy Debian (http://www.internettablettalk.com/forums/showthread.php?t=21629) package.

UPDATE, JULY 3 2008:

The post with the first installable .deb files and a link to the first version of the chroot image file is here (http://www.internettablettalk.com/forums/showthread.php?p=194523#post194523) on page 9, and there is an empty 1GB image file with some cool ideas for other chroot options a few posts later, here (http://www.internettablettalk.com/forums/showthread.php?p=194648#post194648).

I posted a smaller image file (730MB) with all of the applications installed a bit later, here (http://www.internettablettalk.com/forums/showthread.php?p=194798#post194798).

Lastly, I posted a 1GB image file with only minimal applications installed here (http://www.internettablettalk.com/forums/showthread.php?p=196832#post196832), so that those who want to experiment with installing lots of different apps can have more "play-space".

The rest of the thread is a bunch of hardcore Debian chroot enthusiasts trying to get stuff working and keeping each other up to date.

Oh yes, and one very cool video (http://www.internettablettalk.com/forums/showthread.php?p=195817#post195817).

ORIGINAL POST FOLLOWS:

Hi all,

I have a wiki entry, Running Debian in a chroot (http://www.internettablettalk.com/wiki/index.php?title=Running_Debian_in_a_chroot)

This method allows you to install and run any of the thousands of applications, including things like Gimp and OpenOffice, compiled for the Debian armel port, without rebooting your tablet. Many of them run under the default OS, but you may need to use penguinbait's KDE to run some of the apps, because they are designed for a desktop OS and they have problems like dialog boxes that don't fit on the standard tablet operating system's screen.

I have posted about this in various threads, but I wanted to start a new thread so that people can discuss this in one place and propose better ways to do it. I would love to see a simple, newbie-friendly way to set this up so that anyone can install and run Debian apps with a minimum of hassle. This thread might help to make that happen.

Also, if you find Debian apps that work particularly well, apps that totally crash the system, or tricks for getting certain Debian apps to work on the tablet (eg. make sure you install esound support to get sound working on several apps), you can report your findings here.

EDIT: The "Discussion" tab on the wiki now links back to this thread. Nice.

debernardis
2008-05-27, 05:29
Hello qole my friend,

in order to avoid fiddling with passwordless ssh, I changed the /usr/bin/debbie script as follows:

#!/bin/sh

if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
sudo gainroot <<EOF
exec $0 $*
EOF
exit
fi

exec /home/user/MyDocs/bin/debian hilda $*

Took the code for re-executing as root elsewhere on the forums.

This seems OK BUT I haven't been able to make hildon menu items work.
If your menus do their job indeed, would you please try this modified script to see if it makes them not functional? Thanks

qole
2008-05-27, 18:32
I have added a bit to the wiki from Benson, he pointed me to using visudo to make it possible to run anything as root just by typing sudo <command>, so now I just make the exec line in my menu item look something like:


exec=sudo debian hilda abiword


That is a tested line. I just opened abiword with it.

You can make the "debbie" script just say "sudo debian hilda $*", that works too.

I found Personal Menu (http://www.internettablettalk.com/forums/showthread.php?t=17777) to be great for running these programs too; you don't have to mess around with a text editor and .desktop files. Also, there's a "run as root" checkbox.

t3h
2008-05-28, 01:28
Xnest won't behave, installed, and it's not there...

qole
2008-05-28, 17:24
Xephyr works. Try it instead of Xnest.

debernardis
2008-05-29, 05:40
This is great news.
I installed xserver-xephyr on the debian chroot, then started xephyr in fullscreen as display :1.
Then in the Debian prompt exported display to :1
Then started xfce4-session.

Ta-dah! Full screen xfce4 (with abiword, openoffice and all the band) along with hildon-matchbox and those other odd things. Two worlds together! I am verrrrry happy :-)

Now I need a new 8gigs transflash. The one I had from Sandisk was fridged by the tablet and I was never able to restore it. My present 6gigs has become insufficient for that debianosaurus.

qole
2008-05-29, 09:45
Ta-dah! Full screen xfce4 (with abiword, openoffice and all the band) along with hildon-matchbox and those other odd things. Two worlds together! I am verrrrry happy :-)

Don't you find two windows managers to be terribly slow? I do.

But, if you want to go the two-WM route, I suggest looking into the VNC method:

VNC METHOD


Install tightvncserver in Debian
Install VNC Viewer in OS2008
Run the following command in Debian: vncserver -geometry 770x770
Use VNC Viewer to view localhost:1
When you're done with xfce4, in Debian: vncserver -kill :1


This method has the following advantages:

Full Hildon virtual keyboard support
Right-click support
Large virtual desktop (with a convenient vertical scroll-bar)


However, for anyone interested in getting this to work with Xephyr (come on, you know you do), within Debian you'll need to:

XEPHYR METHOD

apt-get install xserver-xephyr
apt-get install wmctrl
I assume you already have xfce4 installed, since it comes as default for the current Debian install.

Then, I suggest a little script (/usr/bin/xephce4 ? ;) ) with something like the following:

#!/bin/sh
#---------------------------------------
#Start the Xephyr server. Don't use host-cursor! There is none!

export DISPLAY=:0
Xephyr :1 -screen 800x480x16 -dpi 96 -ac &

#---------------------------------------
#Make Xephyr full screen and bring it to the front.

wmctrl -r Xephyr -b toggle,fullscreen
wmctrl -a Xephyr

#---------------------------------------
#Make a bunch of important files writable
#by the user. Maybe not needed in all setups.

chown user /home/user/.ICEauthority
chgrp users /home/user/.ICEauthority
chown user /home/user/.cache
chgrp users /home/user/.cache
chown user /home/user/.dbus/session-bus
chgrp users /home/user/.dbus/session-bus

#---------------------------------------
#run xfce4 as user.
su user -c 'export DISPLAY=:1; xfce4-session' &



As always, remember to chmod +x /usr/bin/xephce4. Also, you need to run this as root in Debian, so don't use the "hilda" script. You should just do (from OS2008):

sudo debian xephce4

You'll need to use wmctrl -a Xephyr or that kciconsbox program (http://www.internettablettalk.com/forums/showthread.php?t=18542) to get back to your xfce4 desktop when you "lose" it.

Advantages of this method:

Very cool.
It seems faster. Anyone want to do time trials?
Pressure sensitivity should work Nope.


http://farm3.static.flickr.com/2059/2532880923_4603f6b4d1.jpg (http://www.flickr.com/photos/qole2/2532880923/)

My present 6gigs has become insufficient for that debianosaurus.

That's a good word for it. I constantly have to free up space by looking through my installed packages and removing stuff that I tried once and haven't used again... I'm still trying to find a good media player.

BruceL
2008-05-29, 18:03
Could one of you guys post a quick recipe for getting Abiword to work through Debian on maemo and/or KDE?

If so, thanks!

qole
2008-05-29, 19:12
Once you have your chroot scripts set up as I describe in the wiki, you go into Debian and "apt-get install abiword", and abiword should run from the Debian prompt. Then you just have to run "sudo debian hilda abiword" from a maemo terminal or put that line into a .desktop file.

Could you be more specific as to what your problem is? I can give better help if I know what's wrong.

debernardis
2008-05-30, 05:54
From my approximate evaluation, calling openoffice or abiword in hildon windows (the "debbie abiword" method) is much quicker than calling them under xfce4 in a Xephyr window.
At present I don't know if that depends on Xephyr or on xfce4. I'll experiment more - with JWM I presume, a very light WM.

qole
2008-05-30, 22:43
When I said "it seems faster" I only meant that it seems faster running xfce4 via Xephyr than running it via VNC. I think it's going to be slow no matter what WM you use.

debernardis
2008-06-02, 07:43
JWM is easy to achieve - just apt-get install. It seems quite quick, too.

I have a question: when I call these windows managers in a Xephyr windows *as root* there's no problem in opening other applications like the console terminal.
But, if I call the window manager *as user* there are dbus problems for several apps.
Do you see such a behavior too?

Also, when opening another window manager in a Xephyr window, I lose the ability of getting "blue" function keys like numbers, and that's quite unpractical. Unless there's a workaround, I'll stick to hildon.

hans-castorp
2008-06-02, 17:22
sylpheed works very well when you put it in vertical mode. very suitable to the tablet. xchat in debian is much better than that in maemo imo. i'll be using dillo for all of my browsing from now on methinks.

also, abiword, when you turn off real time spell checking is really very snappy.

qole
2008-06-03, 19:07
Dillo, while very fast, seems a bit on the spartan side for me. It seems to have a similar feature set to links2; good for simple web sites, but not much use for modern web application sites.

qole
2008-06-03, 19:48
I have a question: when I call these windows managers in a Xephyr windows *as root* there's no problem in opening other applications like the console terminal.
But, if I call the window manager *as user* there are dbus problems for several apps.
Do you see such a behavior too?

No, I don't. Can you give specific times when this happens, and what the errors look like?

This may be a problem with permissions. The application may have created some settings files when you were root, and then when you try running it as user, it can't read or write to the settings files. I know that's what happened with Xephyr, that's why my script has those chmod and chgrp lines in it. Also, make sure your chroot script copies the hildon /etc/group and /etc/passwd files so that your chroot "user" account is the same "user" as in hildon. Otherwise you won't be able to share tmp files between hildon and debian.


Also, when opening another window manager in a Xephyr window, I lose the ability of getting "blue" function keys like numbers, and that's quite unpractical. Unless there's a workaround, I'll stick to hildon.

Xephyr, XFCE4 and AbiWord seem to have no problems with my BT keyboard. I can access all of the keys, including the blue numbers and the green symbols. I don't know what's happening there to you.

The biggest problem I have with the Xephyr WM method is that it just seems slow.

Benson
2008-06-03, 19:54
Dillo is real nice; it's a shame about the developer needing to eat... It got put on the back burner, and will probably never be brought up to speed now. CSS and such were supposed to arrive right after the version which is now in perpetual alpha.

I find it (the GTK version, I haven't tried the FLTK alpha) better than links2, overall... I think it misses "proper" frames support, but frames are rarely a good idea anyway, IMHO.

But of course, modern web apps are designed around modern web browsers, and no light-weight will ever be caught up on enough features to do well on them.

qole
2008-06-03, 23:17
I got all excited when summatusmentis (http://www.internettablettalk.com/forums/member.php?u=16747) posted an expanded icon .desktop file (http://www.internettablettalk.com/wiki/index.php?title=Running_Debian_in_a_chroot&diff=2572&oldid=2564) that included the line

X-HildonDesk-ShowInToolbar=true


... but OpenOffice still has no sidebar icon. Anyone know what the two lines he added are for?

qole
2008-06-03, 23:19
I find it (the GTK version, I haven't tried the FLTK alpha) better than links2, overall...

I think you're right.

But of course, modern web apps are designed around modern web browsers, and no light-weight will ever be caught up on enough features to do well on them.

I think the best bet is to go backwards, like MicroB or Fennec. Take a modern standards-compliant browser engine and aggressively optimize it and strip it down.

qole
2008-06-05, 21:55
But, if I call the window manager *as user* there are dbus problems for several apps.
Do you see such a behavior too?

I just noticed that epiphany complained of dbus errors when called as a user. Doesn't matter if it is in Xephyr or in Hildon.

FIXED: When your application complains of dbus errors, then, as root, do the following:

chown user /home/user/.dbus/session-bus/*
chgrp users /home/user/.dbus/session-bus/*


That should fix things. It's a permissions problem again; these files are being created as root/root and you need it set to user/users.

I think it wouldn't hurt to put those lines in the hilda and xephce4 scripts. Anyone else have any ideas?

qole
2008-06-06, 22:48
I have been able to get Gnash to display Flash videos (albeit slowly), and gappletviewer can run Java applets, but I can't seem to get a browser to run either the Gnash plugin or the java plugin.

I currently believe the best bet for a browser to do these things would be kazehakase, since it is a small, fast gecko (xulrunner) based browser that supposedly can run mozilla plugins. Epiphany-webkit doesn't do plugins, and installing konqueror means installing the whole KDE ball of wax.

Here are some screenshots. The first is the Gnash standalone player running a flash video:

http://farm4.static.flickr.com/3258/2556401031_016f54bb65_o.png (http://www.flickr.com/photos/qole2/2556401031/)

Here is gappletviewer (found in the Debian classpath package) running this java applet (http://java.sun.com/applets/jdk/1.4/demo/applets/WireFrame/example2.html), standalone:

http://farm4.static.flickr.com/3127/2557264662_c482f57d51_o.png (http://www.flickr.com/photos/qole2/2557264662)

debernardis
2008-06-07, 03:30
That dbus chown does the trick, thanks.
Now, there is the keyboard problem, I think you have the n800 plus BT kbd so you don't see it, but with the n810 only first function chars do work, not 2nd function (blue) chars. This happens only inside a Xephyr window.
Must be some specific keyboard config to be copied between the maemo root and the debian chroot. Unfortunately at present I have no clue where to look for.

By the way, JWM is really cool, very minimalist and quick. Try it...

debernardis
2008-06-07, 08:01
Tip #1 - shorten openoffice.org startup. Fire up an openoffice instance (ex. writer), go to tools / options, then in the list look for openoffice.org and memory. Change "use for openoffice.org" to 30MB and "memory per object" to 2MB. Seems to work in my hands albeit I did no measures (placebo is enough for me :-).
Taken from http://www.linuxformat.co.uk/pdfs/download.php?PDF=LXF72.feat_speed.pdf which is a very interesting source of speeding advices.

Tip #2 - move around windows in matchbox. Very useful with debian apps windows under hildon/matchbox. See http://www.internettablettalk.com/forums/showthread.php?t=18920&highlight=hacking+matchbox - thanks to Anakin -
and apply the "DIALOGMODE = free" hack. I already posted it in another, more obscure, thread, but this is relevant also in this debian chroot thread.

Tip #3 - toggle maximization of debian apps windows with n810 keyboard. If you are already using keylaunch to get mouse right click, add the following line to your /etc/keylaunchrc file
key=*...Pressed F6:/home/user/togglewindowstate
and make a /home/user/togglewindowstate like that:
#!/bin/sh
wmctrl -r :ACTIVE: -b toggle,fullscreen
exit 0
Then, when you press shift+the hardware maximize button, you'll toggle the maximized state of any window including debian apps.

debernardis
2008-06-10, 05:55
I got all excited when summatusmentis (http://www.internettablettalk.com/forums/member.php?u=16747) posted an expanded icon .desktop file (http://www.internettablettalk.com/wiki/index.php?title=Running_Debian_in_a_chroot&diff=2572&oldid=2564) that included the line


... but OpenOffice still has no sidebar icon. Anyone know what the two lines he added are for?

By the way, did you notice that if you call synaptic with sudo debian synaptic you get a sidebar icon? But there is no synaptic.desktop under /usr/share/application/hildon so it's the .desktop file inside the chroot that's ruling.
There must be some fundamental difference in ooo, then.

qole
2008-06-10, 16:15
By the way, did you notice that if you call synaptic with sudo debian synaptic you get a sidebar icon? But there is no synaptic.desktop under /usr/share/application/hildon so it's the .desktop file inside the chroot that's ruling.
There must be some fundamental difference in ooo, then.

I think Synaptic, Abiword, Gimp, and other Debian apps that have sidebar icons are better integrated with GTK+, the graphics toolkit used in OS2008. I've installed the ooo GTK package, but it doesn't help here.

qole
2008-06-10, 16:47
I installed the Debian beta3 version and I've discovered that it doesn't work as smoothly with my chroot scripts. In particular, the mpd (music player daemon) is installed, and it adds the mpd user. The users from the original install are overwritten by the default OS2008 users when you copy the /etc/passwd file in the chroot script, and then apt-get complains a lot that the mpd user is missing. I guess you need to purge mpd before copying over the passwd file.

Benson
2008-06-10, 17:46
Yeah, I'm using a modified version of the script that backs up the passwd and group files...

So I'll just put them back, but I have made no effort to install packages since then; I was just more cautious. (Because I'm using it for boot as well as chroot...)

qole
2008-06-10, 17:53
...I have made no effort to install packages since then...

I can't stop installing packages. It's some sort of compulsion with me.

Maybe part of my compulsive apt-getting is that every time I do an

apt-get update
apt-get upgrade

... it seems like a dozen central packages have been updated, including classpath and epiphany.

debernardis
2008-06-10, 17:53
Yes, I deleted the mpd user. I thought it was some mistake of mine when I first installed the thing. Now I think that should be added to the wiki.

Concerning packages, did you have success with iceape? It crashes in my hands, but who knows...

qole
2008-06-10, 18:17
No, iceape is a no-go here too. It would have been nice, though, wouldn't it?

qole
2008-06-10, 19:37
Gecko based browser news: Minimo (http://www.mozilla.org/projects/minimo/) and Icehamster (http://gallery.neilandtheresa.co.uk/Icehamster/Homepage) have Zaurus Debian ports (http://matrixmen.free.fr/zaurus/debian/ca1eb_deb/). They install fine with "dpkg -i <package.deb>" in my Debian chroot, and they both run. I think Icehamster is better than Kazehakase. Neither of them do flash or java, however. I still think I've got something set up wrongly. I wish someone else was working on this.

The ArmEabiHowto page has two new repositories for your /etc/apt/sources.list

deb http://simplemachines.it/debian armel-sid/
deb http://simplemachines.it/debian armel-experimental/


The armel-experimental repository, in particular, is interesting because it contains the iceweasel package! It is Firefox 3.0. It installs xulrunner-1.9.

Put those in your /etc/apt/sources.list, run

apt-get update
apt-get install iceweasel
iceweasel


Aaannd... It runs! Hooray! Full-blown Firefox 3.0 running on the NIT! Is that another first for me?

EDIT: It looks like it uses the Gnash and Java plugins. We now have in-browser Java applets.

http://farm4.static.flickr.com/3072/2568636064_479e99a465_o.png (http://www.flickr.com/photos/qole2/2568636064/)

Benson
2008-06-10, 22:29
That's not FireFox; that's IceWeasel... Sheesh!

hans-castorp
2008-06-11, 05:55
wow iceweasel 3 is pretty sweet. i'm booting into debian and after the initial slow startup this provides a very pleasant browsing experience. All the sites which I tried work well and load very quickly including google docs.

debernardis
2008-06-11, 06:31
Those *sicilianazzi* from simplemachines.it is remind us (http://www.simplemachines.it/linux-distros.html) that is possible to propagate a debian system with debootstrap - in the last few minutes I made an arm lenny minbase system which is only 96.9 megabytes and includes apt - then I'll populate it with openoffice.org only. Let's see how big it gets.

qole
2008-06-11, 18:46
Mr. Bernardis, I think you (and those other guys on your active-volcano (http://en.wikipedia.org/wiki/Etna) island*) might be on to something there. A minimal Debian system built with debootstrap might be just the thing for our chroot, rather than working with the necessarily-larger bootable Debian. And it might just be the best thing for a .deb install. I would suggest sid over lenny, however. The package versions seem consistently newer in sid.

* I love volcanoes. I went to visit Etna in 1992 to watch the lava crawling down the hillside.

Benson
2008-06-11, 19:34
The package versions seem consistently newer in sid.
Qolling again? :p

qole
2008-06-11, 20:28
Qolling again? :p

I don't understand what you mean. Maybe I'm being ignorant, but that's not qolling.

I'm serious. Compare the package versions for OpenOffice.org (http://packages.debian.org/search?keywords=openoffice.org&searchon=names&suite=all&section=all). And I just chose that one because we've been talking about it.

Lenny: 1:2.4.0-5 (no package for armel)
Sid: 1:2.4.0-6

EDIT: I've decided qolling actually does require a healthy dose of ignorance on the part of the qoller.

EDIT2: OK, this is all obvious after reading Debian's releases page (http://www.debian.org/releases/). Sid packages, by definition, will always be higher numbers, since Lenny is going to be the next stable release and the packages are all in the queue for that goal, and Sid is under active development.

Benson
2008-06-11, 20:43
I was joking; the thing is, I thought that newer packages in sid was completely obvious; lenny's currently testing (not released as stable yet, but not unstable), sid's unstable... Etch, the current stable release, doesn't exist for armel, and is thus out of the question.

qole
2008-06-12, 00:09
News from the same category as OpenOffice.org:

Evolution runs, it just doesn't run very well (kinda slow and layout is poor for tablet). But if you need that precious MS Exchange (or Novell Groupware) compatibility, then you might put up with the headaches.

http://farm4.static.flickr.com/3071/2571022509_97877e57b4_o.png (http://www.flickr.com/photos/qole2/2571022509/)

qole
2008-06-12, 18:22
UPDATE: Please see this post (http://www.internettablettalk.com/forums/showthread.php?p=191487#post191487) for a larger (42MB) tarball that works much better for installing things like OpenOffice, AbiWord, and Firefox / Iceweasel.

I did four different debootstrap variants (lenny, sid, minbase lenny, minbase sid), and the minbase sid was the smallest. I tarred up each of my variants, and I've uploaded the tiny minbase sid one (http://rapidshare.com/files/121983841/debian-minsid-armel-chroot.tgz.html) for you-all. It is just over 28mb.

You download the tarball, make a directory (like /debian) in your big SD clone partition, and then

tar xjvf debian-minsid-armel-chroot.tgz /debian
mkdir /debian/home/user
chown user /debian/home/user
chgrp users /debian/home/user
mkdir /debian/media/mmc1
mkdir /debian/media/mmc2
mkdir /debian/media/usb
to set up the chroot.

Use the chroot script from the wiki to "get into" the chroot, and then you'll have to

apt-get update
to start installing stuff.

As for installing OpenOffice.org, I found I couldn't just install the big meta-package, it gave errors about dependencies not being installed. So I had to work my way back to the openoffice.org-core package. It gave me a full page of package names to be installed, and told me that it would use 250MB on the disk! :eek:

EDIT: OK, this is weird. I installed the openoffice.org-core package. It claims to be the 1:2.4.0-6 package. When I try to install anything "above" that, however, (e.g. openoffice.org-writer) it says that it needs openoffice.org-core = 1:2.4.0-6, which is not going to be installed.

EDIT2: After downloading the package and doing a dpkg -i openoffice.org-writer_2.4.0-6_armel.deb I found out that somebody's recently screwed up the openoffice.org package. The high-level packages are "conflicting" with openoffice-common. Looks like they've got a broken version number in there (1:2.4.1), from one of the Intel architectures, probably. Sigh. I got it installed, but it sure is ugly. I hope they get this fixed soon.

EDIT3: OK this is just wacky. There's something wrong with the versioning in this chroot in the ooo packages.

Benson
2008-06-12, 19:36
Just over 28 MB (bzipped), eh?

Wonder if it fits in flash memory (jffs2, so some compression, but it won't be as good as bz2), for chroot... probably not that hot, really; it'd be better, if you're trying for something useful in flash, to strip down JohnX's build and obliterate ITOS. But it'd be cool, anyway. I might try this on my internal memory.

qole
2008-06-12, 19:46
...then I'll populate it with openoffice.org only. Let's see how big it gets.

Populated with openoffice.org writer, draw and impress (for Word and PowerPoint compatibility), the directory is over 555 MB. :eek: :eek:

Benson
2008-06-12, 19:52
Well, that probably includes a bunch of stuff that is provided by maemo; if there's an X server somewhere in the dependency tree, for example, you can really get rid of that. I bet there's a lot of cleanup possible, but going through and doing it will be huge time.

Especially if you do it the right way, which (I think?) is to make a package that provides all those things, so your dependencies aren't whacked and apt still goes.

What if you just pull all the docs, ala ITOS? Also, if it's dedicated chroot, you can clear out any trees that get stuff 'mount --bind'ed over top of them. I don't think that'll be much, though, overall.

qole
2008-06-12, 20:55
Well, that probably includes a bunch of stuff that is provided by maemo; if there's an X server somewhere in the dependency tree, for example, you can really get rid of that. I bet there's a lot of cleanup possible, but going through and doing it will be huge time.

Especially if you do it the right way, which (I think?) is to make a package that provides all those things, so your dependencies aren't whacked and apt still goes.

Yeah you would need to build an empty package that claims to provide all of the unneeded dependencies.

The whole point of this chroot business is to avoid that kind of work. I guess the cost of convenience is always going to be some bloat. Well, 8GB SD cards are ~$30, it's no big deal to just make a big partition.

It seems that the full sid rootfs works fine, it is that pesky minbase version that is causing still has all the dependency problems. I'll post a separate message about that.

qole
2008-06-12, 22:46
Ok everyone, here's the full Debian Sid rootfs tarball (http://rapidshare.com/files/122031522/debian-sid-armel-chroot.tgz.html). It is a 42MB download and, when uncompressed, it is a 133MB directory tree, but it installs software just fine, with none of the dependency problems of the minbase system posted above.

I installed AbiWord this time. It reminds me of pulling on a thread that unravels the whole sweater; by the time it was done installing, it had installed CUPS (a full printing system) and samba (a full network file server and clients). It tried to install dbus and some other stuff, but dbus failed on post-install configure. I was able to uninstall that easily without much hassle. In the end, I end up with a directory tree that is... 552 MB! Just about the same as for OpenOffice. Hee hee!

EDIT: Interestingly, OpenOffice still has the same weird problems (anything above openoffice.org-core complains of conflicts, missing dependencies, etc). That suggests there are two problems here; OpenOffice and the minbase system.

EDIT2: The minbase system is fine. It is entirely the fault of OpenOffice.org. Once you force-install any of the ooo packages, it breaks subsequent installs. What a mess.

debernardis
2008-06-13, 05:17
This seems to mean that people installing debian today won't be able to get OOO, right? That's a bad thing.

So maybe we better put somewhere a rootfs which already includes OOO, allowing people to use that if they want, until dependencies are fixed on the development of sid.
After installing OOO, abiword, iceweasel and all that jazz, my debian rootfs is reported as 1,3 G - 580 M when tgzipped - too big? If useful, I'll put somewhere to download.

locusf
2008-06-13, 13:18
This seems to mean that people installing debian today won't be able to get OOO, right? That's a bad thing.

So maybe we better put somewhere a rootfs which already includes OOO, allowing people to use that if they want, until dependencies are fixed on the development of sid.
After installing OOO, abiword, iceweasel and all that jazz, my debian rootfs is reported as 1,3 G - 580 M when tgzipped - too big? If useful, I'll put somewhere to download.

Yup it sure is a little too big for me to install chroot debian on my internal 2GB SD card on N810. Too bad though, it would be super great to run Abiword/OOO on N810.

qole
2008-06-13, 22:11
This seems to mean that people installing debian today won't be able to get OOO, right? That's a bad thing.

Yes, it is a bad thing. I can install it, using dpkg -i -force-conflicts, but then I have to uninstall those things any time I want to install something else. I am really hoping that we're not the only ones trying to install OOO armel, and that they'll discover their goof and fix it. It's purely a packaging problem, once installed it works fine.

After installing OOO, abiword, iceweasel and all that jazz, my debian rootfs is reported as 1,3 G - 580 M when tgzipped - too big? If useful, I'll put somewhere to download.

My basic rootfs populated with abiword, iceweasel, Java plugin, and OOO writer, draw and impress (plus their dependencies) came in at around 660 MB. I ran out of space when compressing it, but the archive was already over 300MB.

Yup it sure is a little too big for me to install chroot debian on my internal 2GB SD card on N810. Too bad though, it would be super great to run Abiword/OOO on N810.

I would say that no matter how you do it, you're going to need a big chunk of free space on a Linux-formatted (ext2 or ext3) partition. I would guess that 1 GB would probably be the smallest amount of space that you could have.

Doesn't the N810 have a slot for more memory? I'm sure you're not limited to 2GB of space.

qole
2008-06-13, 22:45
I've been thinking; Our best bet for people who want a specific application would be for one of us to install everything into a clean chroot, and then put it in an .img file and then tar it up so that people can simply download it, untar it, and mount it as a loop device (http://en.wikipedia.org/wiki/Loop_device). Penguinbait does this with his KDE debs. That way you wouldn't be required to have a specific file system. You could just un-tar this .img file on any large memory card and then run the mount script. It's a bit tricky to set up, but it is much more straightforward for the end-user.

I just wish I was more than an enthusiastic self-taught wannabe. I just don't have the mad skillz necessary to do this. We need Benson or penguinbait to take an interest in developing this.

Something like this?


dd if=/dev/zero of=debian.img count=2097152


What's that 2097152? That should give us a gigabyte. Seems that you calculate size like this: <bytes> / 512 = <dd-count>


mkfs.ext2 debian.img -m 1 -L debian
mkdir /debian
mount -t ext2 debian.img /debian -o loop,noatime


Now the debian.img file is mounted as /debian! Cool, huh?

debernardis
2008-06-14, 04:40
Yes that's the way I have been mounting sid - the next step is to make it compressed (jffs2 ?). I would have done it on a clean sid but there come the ooo dependencies madness and we're stuck unless we choose to make a rootfs package with borked dependencies, not good for apt-getting anything. Alas, by now this is the only good thing to do, right?

qole
2008-06-14, 05:09
Yes that's the way I have been mounting sid - the next step is to make it compressed (jffs2 ?).

I seriously thought long and hard about it, and then decided that the Debian chroot programs are slow enough as it is, without adding the whole compressed-filesystem thing. But if you want to play with it, the tools are in the Debian mtd-utils package :)

I would have done it on a clean sid but there come the ooo dependencies madness and we're stuck unless we choose to make a rootfs package with borked dependencies, not good for apt-getting anything. Alas, by now this is the only good thing to do, right?

I think this is the thing to do for now, if we want to offer a pre-installed ooo-abiword-firefox-java system. I hope and pray this is a temporary problem that will be fixed shortly. The Debian armel team are pretty active, I'm sure they'll find the problem and fix it. Alternately, you can try reporting the bug, but I got lost trying to figure out how to do it.

qole
2008-06-14, 08:41
Here's a cool trick. Currently, the maemo ssh server (sshd) doesn't handle X-Forwarding. If you ssh to your tablet and try to run a GUI app, it will simply appear on your tablet's screen. If you go into your chroot and issue

/etc/init.d/ssh stop
/etc/init.d/ssh start

the next time you ssh to your tablet you will go directly into your Debian chroot and you will be able to use X-Forwarding of all your GUI apps.

Does anyone know how to fix the "The fingerprint for the RSA key sent by the remote host has changed" error one gets when doing this? Is there a file I can copy from my OS2008 rootfs to the chroot to sync the keys?

EDIT: You can fix the problem of changed keys by copying the ssh keys from your main filesystem to your chroot (before you do the stop and start above). As root, with the chroot mounted (but not from within the chroot), do this:

cp /etc/ssh/ssh_host_* /debian/etc/ssh/

qole
2008-06-16, 17:35
Somebody added "don't put [the Debian chroot script] in /usr/bin, that causes problems"

What problems? Why not?

I guess I should change the wiki to suggest putting the script in /sbin since it needs to be run by root anyway.

qole
2008-06-16, 18:24
Hmm, I wonder if this hack could fix the dependency problems of OpenOffice until the maintainers fix it:

...just modify /var/lib/dpkg/status (or something like that) with a text editor, and change the dependency...

I'll look into it.

daperl
2008-06-16, 18:38
Hey qole, I thought I was just reading a thread you had just started about easy chroot stuff. Where did it go?

qole
2008-06-16, 19:11
I didn't start it. And you probably can't find it because it uses "Debain" instead of "Debian". Search on that word.

daperl
2008-06-16, 19:25
I didn't start it. And you probably can't find it because it uses "Debain" instead of "Debian". Search on that word.

Thanks for the reply. I had that thread opened and something crashed my tablet (never happened before) while I stepped away for a moment. After it rebooted I went to "New Posts" and your 11:07am post to that thread doesn't appear in the right "New Posts" time slot. Strange.

qole
2008-06-16, 19:40
Interestingly, I did an apt-get upgrade on my big old Debian partition, and irb1.8 (Interactive Ruby) has broken dependencies too. The good news is that it seems isolated to openoffice-common and irb1.8.

XL1200c
2008-06-17, 17:10
I have a few questions to try to clear up some confusion I have.
I'm currently using the Debian beta3 intended for a dual boot system, but I'm not dual booting.

1. Is it better to used one of debootstrap variants by qole?
2. If yes to #1 than which one, the larger or the smaller?
3. With using the above does it solve the MPD user problem when using apt?
4. Do I still need a window mananger like KDE as stated in the Wiki?

I may have a few other questions later, but these should get me started.

qole
2008-06-17, 17:49
1. Is it better to used one of debootstrap variants by qole?
2. If yes to #1 than which one, the larger or the smaller?
3. With using the above does it solve the MPD user problem when using apt?

My debootstrap variants are great if you don't mind installing everything from scratch. My experience is that both work, and both get equally enormous after installing a few big apps. The larger debootstrap has some useful things like wget that you'll have to install manually with the smaller one.

Using my files avoids the mpd user problems, but I was getting locale problems. I haven't tried working from the debootstrap again since I got the very good suggestion (http://www.internettablettalk.com/forums/showthread.php?p=192626#post192626) to try "dpkg-reconfigure locales". I actually think the problem is that neither of the debootstrap variants have locales installed, so you probably want to "apt-get install locales" before installing anything else.

----------------
EDIT: So I'm working on the debootstrap again. I needed to do both things to get locales set correctly. I would recommend doing the following three things as soon as you untar your new chroot and then chroot in:


apt-get update
apt-get install locales
dpkg-reconfigure locales

----------------

The only reason I would stay with the bootable Debian if I wasn't planning to boot to it is if I had already installed OpenOffice.org. I've gotta figure out how to fix those packages.


4. Do I still need a window mananger like KDE as stated in the Wiki?


Well, technically, no, which is why I've changed the wiki. If you use the qwerty12 hack that lets you move windows around in OS2008, and you install XVKBD or something similar (or you use a hardware keyboard), and you're willing to set something up with wmctrl to full-screen the apps, you can muddle through in OS2008. But the programs really are designed for a non-Hildon window manager, and eventually you're going to hit a window that is too big for the screen and can't be moved. I've managed to get through these by just tabbing through the buttons and pressing enter when I think I'm on the "OK" button. But KDE makes it much easier to use Debian apps.


I may have a few other questions later, but these should get me started.

Ask, and I'll try my best to answer.

XL1200c
2008-06-17, 18:40
Please correct me if I'm wrong. To install PenguinBait's KDE I would chroot into Debian, download his KDE installer and install with dpkg.

Benson
2008-06-17, 18:46
No, just install KDE normally, in maemo, I think.

qole
2008-06-17, 19:18
No, just install KDE normally, in maemo, I think.

Yes, install KDE on your tablet from your tablet OS, then start KDE and chroot to Debian from KDE (from the KDE terminal) or make KDE desktop icons that run Debian chroot apps.

XL1200c
2008-06-19, 19:57
I'm confused again. I partitioned and formated my 4gb memory card that I keep in the internal slot of my N800, it is setup as follows.
/dev/mmcblk0p1 - fat, for general file storage
/dev/mmcblk0p2 - ext3, where I installed the large debain bootstrap. by quole

Now when I run the /sbin/debian script (as root) it fails from mounting /dev/mmcblk0p2 to the end. I did change that line in the script to match my partitions.
But
When I copy and paste each line from the script it works fine and I chroot into debian.

I'm totaly lost. Why will the script work when I paste it line by line but not when run? Yes I did chmod +x /sbin/debian.

qole
2008-06-19, 21:02
If you have already mounted your partition, you will get an error about the mount failing, but that's a meaningless error (it has already mounted, it can't do it again), and the script should proceed normally. What errors are you getting after the failed mount?

XL1200c
2008-06-20, 02:53
I get the same weather it's munted or not

/home/user # debian
Setting up the chroot...
': No such file or directorytfs/lib/modules/2.6.21-omap1/mbcache.ko
': No such file or directorytfs/lib/modules/2.6.21-omap1/ext2.ko
failedmounting /dev/mmcblk0p2 on /opt
failedmounting /dev on /opt
failedmounting /proc on /opt
failedsounting none on /opt
failedmounting /tmp on /opt
failedmounting /media on /opt
failedmmc1ting /media/mmc1 on /opt
failedmmc2ting /media/mmc2 on /opt
failedusbnting /media/usb on /opt
failedsernting /home/user on /opt
': No such file or directory
': No such file or directory
': No such file or directory
': No such file or directory
Everything set up, running chroot...
: No such file or directorydirectory to /opt
/home/user #


and it does not chroot.

here is the script, copied ffrom the wiki

echo "Setting up the chroot..."
export CHROOT=/opt
###
#mount the Debian partition.
insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko
mount /dev/mmcblk0p2 $CHROOT -o noatime
###
# Make the tablet's devices available to Debian.
mount -o bind /dev $CHROOT/dev
mount -o bind /proc $CHROOT/proc
###
# Gentoo wiki says this will make X work.
mount -t devpts none $CHROOT/dev/pts
mount -o bind /tmp $CHROOT/tmp
###
# Mount various external devices (SD cards, USB devices)
mount -o bind /media $CHROOT/media
mount -o bind /media/mmc1 $CHROOT/media/mmc1
mount -o bind /media/mmc2 $CHROOT/media/mmc2
mount -o bind /media/usb $CHROOT/media/usb
###
# Mount the user's home directory
mount -o bind /home/user $CHROOT/home/user
###
# Make the Internet work.
cp /etc/resolv.conf $CHROOT/etc/resolv.conf
cp /etc/hosts $CHROOT/etc/hosts
###
# Make permissions work.
cp /etc/group $CHROOT/etc/group
cp /etc/passwd $CHROOT/etc/passwd
###
# Custom prompt. Reduces confusion.
export PS1="[\u@Debian: \w]"
###
# Actually chroot.
echo "Everything set up, running chroot..."
chroot $CHROOT $*

qole
2008-06-20, 04:07
Ok, first thing to do is find those two kernel modules, mbcache.ko and ext2.ko. You might need to become root and then:

cd /
find . -name "mbcache.ko"


Wherever you find mbcache.ko, you'll probably find ext2.ko. Change the directory in those two insmod lines to match the directory where you found the modules. Then try it all again.

Also, the weird spacing in your error messages suggests that there may be something weird happening in the text file you made for the script. Did you use Windows to make the file? You might need to make it again in Linux. It would be best if you used a tablet editor like leafpad to do it.

XL1200c
2008-06-20, 19:33
I think I've got it fixed. qole, I did use notepad in Windoze, I was thinking about that on my way into work today (I hate M$). So I used leafpad and made a new debian script, that did not work, but the formating in the errors was correct. So I got to wondering if formating it in ext3 was the problem, but I was able to do it before. I decide to start from scratch, I reformated as ext2, reinstalled, and now everything seams to be fine.

Thanks for all the help.

Does installing KDE on the tablet's os take a lot of space?
Can someone post setp by setp directions for installing KDE?

I've used Linux for many years, mainly as a tinker rather than a true hacker.

qole
2008-06-20, 22:46
Thanks, XL1200c, for figuring it out!

Of course, I'm an idiot. My script loads the kernel module for the ext2 file system (the second "insmod" line), but you had said in your post that you were using the ext3 file system. The answer was right in front of me. It probably would have worked if you had just changed the ext2.ko in that line to ext3.ko ... I'm sorry. Well, we'll know for next time... :o

As for getting KDE installed, there is really lots and lots of information on doing that. Many long, detailed help threads (http://www.internettablettalk.com/forums/showthread.php?t=19675). In fact, there's a whole section of ITT (http://www.internettablettalk.com/forums/forumdisplay.php?f=33) devoted to KDE on the tablets.

scumgrief
2008-06-21, 18:13
I love this thread. It's really excitin, I'll join your guys fun in awhile.

bunanson
2008-06-21, 19:40
...Does installing KDE on the tablet's os take a lot of space?
Can someone post setp by setp directions for installing KDE?
....

1.35G per PB and the lowest I get was 1.42G Free space, installation still went thru.
I am not aware where can one find a setp by setp directions, I do have one step by step here, http://www.internettablettalk.com/forums/showthread.php?t=20884
________________________________________
I repartiton my MMC boot to make 2.4 G partition on the rootfs. I then dl kde-installer-v3.deb from http://penguinbait.com/, the 5th one from top, kde-installer-v3 (boot from SD only), and click on the .deb file, it will automatically install under app manager. It took 40 min for my N810. Reboot, and KDE will be under Extra. Warning: do not turn off tablet while on KDE. Always log out KDE before turn off tablet.

Edit: need more FAT space, re-do another one, with rootfs 1.9 G and free space of 1.47 G, works, installation 45min
_______________________________________

Hope this helps,

bun

pipeline
2008-06-21, 20:40
Nice... finally enough bits and pieces of info that i was able to generate an ext2 file image of debian b3 in ubuntu, copy it to (fat fs) mmc card and mount it as ext2. Now to try ext3 since i guess thats compressed. I might try to merge mounting support with isomount so that i can use it as option for chmod images like this. I'd probably add ext2mount/ext2drop/ext2run(?) and ext3mount/ext3drop/ext3run commands for interfacing with them... adding appropriate sudoers lines on initial install. I guess i'll stick with file extension .ext2 and .ext3.

At that point I could fine tune custom images like your debian images that can be dropped on any mmc type or network share.

Edit : Ok it seems compression is not available for ext3? Can ext3 images be resized dynamically? If not i see no advantages.

Here's how i generated the ext2 image on the (ubuntu) desktop :
dd if=/dev/zero of=/home/maemo/debian-b3.ext2 bs=1k count=998400
sudo losetup /dev/loop0 /home/maemo/debian-b3.ext2
sudo mkfs -t ext2 /dev/loop0 998400
sudo mount -t ext2 /dev/loop0 /mnt/deb
sudo cp -a . /mnt/deb

Then after the file is copied to device, gainroot and then :
insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko
mount -o loop -t ext2 /media/mmc2/debian-b3.ext2 /mnt/ext2

Or try merging into debbie script (I havent tried this yet) and it does complain about the /dev device files when extracting archive to ubuntu fs... so the image might need 'fix up' before use.

qole
2008-06-21, 23:25
Some good news. :D :cool:


I've managed to hack the /var/lib/dpkg/status file so that it no longer complains about openoffice being broken. After installing openoffice.org, and then hacking the status file, I can install new stuff without problem. "apt-get upgrade" may break things again, however.

I've figured out how to make a .deb (thanks to PyPackager) and I've figured out how to add the line to the sudoers file as part of the install script. So I think I'll be able to have a "Debian chroot" .deb installer that will do all the magic for you by the end of this week. It will have all the scripts and icons, etc, but the actual chroot file will be a separate download. This will allow me to post the .deb here on itT. It will also allow you to download the chroot flavour of your choice. Stay tuned!

I've built a Debian chroot with openoffice.org, abiword, and firefox 3 with java and flash plugins. It comes to 750MB (uncompressed). This also includes a full samba client/server, along with some other goodies. I've put it into a one gig .img file that you will put on your SD card. (It is a purely English language install, but if you need other locales, I will have a small version that requires the user to install the apps themselves.) The .deb will mount this image file and then chroot into it. I just need to find somewhere that can host the 300MB tarball. Any offers? Please?

pipeline
2008-06-21, 23:55
I can host/mirror it at least for awhile. Look forward to trying it out... what type of filesystem is it?

zuachs
2008-06-22, 00:17
Hi qole, I've downloaded the large tarball and the mini too, but when I try to extract it, it just do nothing. I use the same command (tar xjvf .......) but it doesn't work with both. Could it be the tar version ? I'm using the same tar used to extract the kde's tarballs. :(

I don't know what I'm doing wrong :s

I wanted to try this one because I'm having the mpd problem...

qole
2008-06-22, 00:22
I can host/mirror it at least for awhile. Look forward to trying it out...
I'll PM you...
what type of filesystem is it?
Just ext2. I did it all on the tablet like I say here (http://www.internettablettalk.com/forums/showthread.php?p=191876#post191876)...

pipeline
2008-06-22, 00:24
Ah, yes i just found your old post... can you name it with .ext2 extension so i can associate it (and so its obvious what file system it contains) ?

qole
2008-06-22, 03:47
...can you name it with .ext2 extension so i can associate it...?

Ah right, for use with your (very cool) dbus-switchboard. I'll set it to .ext2, although .img is a very common extension for these files.

Hi qole, I've downloaded the large tarball and the mini too, but when I try to extract it, it just do nothing. I use the same command (tar xjvf .......) but it doesn't work with both. Could it be the tar version ? I'm using the same tar used to extract the kde's tarballs. :(

So, let's assume you downloaded the large tarball to /media/mmc1/
So, you become root, then you do the following?

tar -xjvf /media/mmc1/debian-sid-armel-chroot.tgz /debian


...if you can wait a few days, I'll make it easier...

zuachs
2008-06-22, 04:34
qole:
I've tried this way too but it's not working :( I don't understand why I can't extract it, it's weird...:/

I'll be checking this thread :)

Thanks!

zuachs
2008-06-22, 05:48
Hey! It worked --> tar -xvjf /media/mmc1/debian-sid-armel-chroot.tgz
inside the directory where the partition is mounted.

pipeline
2008-06-22, 13:27
Ah right, for use with your (very cool) dbus-switchboard. I'll set it to .ext2, although .img is a very common extension for these files.

Thanks... yes while img is very commonly used its useless for file system inference as it is used also for clonecd images, picture formats, and i would guess generically to host all types of loopback filesystem types. This would probably not matter if the kernel modules were already loaded by default, but apparently they aren't.

Most importantly, i am integrating support for ext2 filesystems into my isomount package which basically is just simple package which establishes mountpoints, updates sudoers, and adds support scripts. It's not so much a technical marvel as it is an attempt to provide standard framework which people can use. So if you have inputs on refining this interface I would be willing to adapt. I currently establish /mnt/iso for iso's and i have begun using /mnt/ext2 for these ext2 images. I already use isomount in emelfm2 and dbus-switchboard for iso's. In keeping extension as ext2 i can maintain fine grained permissions when run as user. This would provide command like ext2chootrun which would (mount filesystem, run command, unmount filesystem)... or i could just mount and leave open. Base commands for mounting, chroot setup, and unmounting would be sudo-able.

For dbus-switchboard this would let you associate file extensions like debernardis did for open office documents in a very generic, reusable way.

But i will also associate with emelfm2 so that it can mount and drop ext2 file systems like it already can with iso's. This will be very useful for tweaking .ext2 images since i can edit text files in emelfm2 or copy files in and out.

bunanson
2008-06-22, 18:35
Some good news. :D :cool:


I've managed to hack the /var/lib/dpkg/status file so that it no longer complains about openoffice being broken. After installing openoffice.org, and then hacking the status file, I can install new stuff without problem. "apt-get upgrade" may break things again, however.

I've figured out how to make a .deb (thanks to PyPackager) and I've figured out how to add the line to the sudoers file as part of the install script. So I think I'll be able to have a "Debian chroot" .deb installer that will do all the magic for you by the end of this week. It will have all the scripts and icons, etc, but the actual chroot file will be a separate download. This will allow me to post the .deb here on itT. It will also allow you to download the chroot flavour of your choice. Stay tuned!

I've built a Debian chroot with openoffice.org, abiword, and firefox 3 with java and flash plugins. It comes to 750MB (uncompressed). This also includes a full samba client/server, along with some other goodies. I've put it into a one gig .img file that you will put on your SD card. (It is a purely English language install, but if you need other locales, I will have a small version that requires the user to install the apps themselves.) The .deb will mount this image file and then chroot into it. I just need to find somewhere that can host the 300MB tarball. Any offers? Please?


Good job Qole, I am looking forward to it.

bun

qole
2008-06-23, 09:44
Ok, so I had an insomnia episode and you're getting a nice present.

Here is the Debian image file.

debian-chroot-apps-img.tar.bz2
[FileFactory.com] (http://www.filefactory.com/file/628a64/n/debian-chroot-apps-img_tar_bz2)
[Pipeline's Mirror] (http://wardenclyffetower.com/MaemoFiles/mirrored/debian-chroot-apps-img.tar.bz2)

It is ~230 MB compressed, and 1GB uncompressed. It includes OpenOffice, AbiWord, Firefox 3 (Iceweasel) with Java applet capability, and Synaptic (for adding more fun stuff). To extract it, you need the same tar command (gnutar (http://elkins.org/packages/binary/gnu_tar-1.19.deb), found at elkins.org repo (http://www.gronmayer.com/it/dl.php?id=128)) that is used by several other projects here, including PenguinBait's KDE. You must drop the extracted image file (debian.img.ext2) in the root of (one of) your SD card(s). Assuming you have an N810 and you are putting it on your internal SD card, /media/mmc2, and you are at a command line in the place where you downloaded the tar file:


gnutar -xjvf debian-chroot-apps-img.tar.bz2 /media/mmc2


Alternately, you can install bzip2 (http://repository.maemo.org/extras/pool/chinook/free/b/bzip2/bzip2_1.0.3-1_armel.deb) (found in the extras repository, red pill for app manager) and do this:


bunzip2 -c debian-chroot-apps-img.tar.bz2 | tar xvf - -C /media/mmc2


If someone wants to host a mirror of the file on a better file host, please do. The free service that I'm using is slow and yucky! (FileFactory actually seems OK)

I have made an installable package that sets up root access, puts tested, working scripts in the right places, makes menu items for the Debian apps that people want (open office, abiword, and firefox 3). There are two versions, one for each of the two possible SD card positions.

Please find attached two .deb files. Choose the .deb that corresponds to the SD card where you put your debian.img.ext2 file. (mmc2 is the N810 internal card).

If I get some success stories, I'll start a new thread and make a big announcement that we're up and running with easy Debian chroot. I'll include more detailed instructions about untarring the image, including where to get the right tar version. Maybe I can even include it in the .deb and extract the file as part of the install? Any other ideas to make this easier?


Some notes / warnings:

This deb messes with very little in OS2008. After install, your tablet should remain much the way it was before. Please note, however, that, in order to run properly on the tablet, running Debian apps have access to a lot of stuff, and they can possibly do damage. This chroot isn't much of a "jail", on purpose. Sometimes, installing or updating an app will shut down or restart an important service on the tablet as part of the install. This can have some very interesting effects, sometimes causing the tablet to freeze or reboot. You can mount the image and chroot without the script if you need a better "jail" that doesn't have as much access to running servers.
Everything starts up really slowly, especially Iceweasel (since it has no splash screen). The tablet seems to be sitting there, doing nothing, sometimes for a long time. If you want to test your new chroot without using the command line, start with something smaller, like AbiWord or Synaptic or pop up the matchbox-keyboard.
The matchbox-keyboard menu item causes the matchbox keyboard (father to our tablet stylus keyboard) to pop up, or if it is up, the menu item makes it go away. There's no "hide" button on the matchbox-keyboard, so you have to use the menu item to hide it.
To run an application as user from the command line, type "sudo debian hilda <command>". If you need to run the app as root, drop the "hilda" from the command.
OpenOffice is completely Tablet unfriendly. There's no icon on the left-hand app panel. If you lose your OpenOffice screen, or you need it fullscreen, use the included "Make OpenOffice Fullscreen" (in the Extras menu). I would have made one for AbiWord too, since the AbiWord fullscreen hides all the menu bars, but AbiWord sets the window title to your document name so I have no idea what window to fullscreen.
I install the movable-windows hack for OS2008. You really need it for running Debian programs in OS2008. If you hate that, uninstall my .deb, or copy /etc/osso-af-init/matchbox.defs.orig back to matchbox.defs and everything will be the way it was before.
In an attempt to make the image file as tiny as possible, I purged all locales except en-US, en-CA and en-GB. I also deleted all of the doc files and the man files too. This has definitely broken internationalization, and it has probably broken other things too (ie the cups printing system). Please try stuff out and report back. I have made a nice clean Debian root file system available as an image (http://www.internettablettalk.com/forums/showthread.php?p=196832#post196832), and you can set your locale and proceed to install everything you want, just the way you want it.
Previous posts have made it clear that there's some broken packages associated with OpenOffice. I hacked the Debian chroot's dpkg status file so it wouldn't complain, but don't upgrade the OpenOffice packages until you read here that the packages have been fixed, or you could be left with a broken install and now the Debian team has fixed the packages so they should update and be fine now.


Have fun!

debernardis
2008-06-23, 11:18
Previous posts have made it clear that there's some broken packages associated with OpenOffice. I hacked the dpkg status file so it wouldn't complain, but don't upgrade the packages until you read here that the packages have been fixed, or you could be left with a broken install.


Hi Qole, the rootfs derived by Johnx debian beta 3, once openoffice was installed while its dependency trouble hadn't appeared yet, has no problems in apt-get updating and upgrading. Openoffice and other packages are kept at the current version.
Since the debootstrap is almost as large, why not publish a beta-3 derived rootfs which people can update without hassle?

qole
2008-06-23, 17:53
Here is the empty 1 GB debian.img.ext2 file. I had to attach it with a fake .zip ending because itT doesn't recognize tar.bz2 files (yet). You can either rename it (remove the .zip) or just uncompress it the way it is. tar doesn't care about file extensions.

Untar it, mount it (using the chroot script if you want -- just chroot and then exit) and then put whatever you want into it:

The Basic Debian Sid Rootfs (http://rapidshare.com/files/122031522/debian-sid-armel-chroot.tgz.html) (don't forget to install and then configure locales) ... note that this is also a .tar.bz2 file, I mis-named it.
Johnx's bootable Debian rootfs (http://www.internettablettalk.com/wiki/index.php?title=Debian#Download). Remember to chroot without the script and do "apt-get remove --purge mpd" before doing anything else.
Be the first to get the Fedora ARM port (http://fedoraproject.org/wiki/Architectures/ARM) up and running on the tablet. I couldn't get this rootfs' Yum to work for me, so I couldn't install anything, but I haven't used RedHat for years...
The Mojo Ubuntu "Grumpy" distro (http://mojo.handhelds.org/). I guess you would make a debootstrap of Ubuntu in Debian with a procedure like this (http://linux-vserver.org/Installing_Ubuntu_on_Debian) using the script from this debootstrap (http://repository.handhelds.org/grumpy-armv6el-vfp/pool/main/d/debootstrap/debootstrap_1.0.3build1_all.deb).
PM someone running the new Diablo OS2007 and see if they'll give you a copy of their rootfs.

pipeline
2008-06-24, 00:44
Thanks, this is very useful. Nice to have 2 files i can drop on my devices and get openoffice, abiword, and umm some kinda weasel that looks like mozilla... no real depencies to worry about... simple to use as well.

It would be nice to resize to minimum file size though to make it easier/smaller to fit for those that will just use those 3 apps, and have another larger image for full version with working apt-get for heavy use.

Your FileFactory download went relatively quick, however if others want to try this out they can also use my mirror here :
http://wardenclyffetower.com/MaemoFiles/mirrored/debian-chroot-apps-img.tar.bz2

Now if only i could apt-get install monodevelop :)

qole
2008-06-24, 04:10
It would be nice to resize to minimum file size though to make it easier/smaller to fit for those that will just use those 3 apps, and have another larger image for full version with working apt-get for heavy use.


That's a good idea, the version I have there is kinda the b@stard child of both worlds. I stripped everything out to make it compress to a small file size, but then I dropped it in a big disk image with lots of empty space, just in case people wanted to install more. But I should make a smaller disk image that just fits the installed apps. I've applied for space on maemobox.org so hopefully I'll have an ad-free hosting service with a larger file size limit.

UPDATE: I did what you asked, here it is (http://www.internettablettalk.com/forums/showthread.php?p=196832#post196832), but it isn't much smaller (730MB vs 1GB)

By the way, pipeline, are you a success story? Did it install OK for you? I'm asking because this is my first serious .deb and it installed fine on my vanilla OS2008 partition, others might have had problems. I want to start a new announcement thread, but I want confirmation that I've got a working package here.

pipeline
2008-06-24, 06:49
Yes, it just plain worked as expected on my 810 (after my fumbling with file placement). I half expected to run into issues but for me all icons worked fine. Great job with first deb, looks like you covered all bases... icons, postinstall, sudoers, etc.

The hardest part was placing the 1G file via openssh (glitchy network adapter). That and i tried to delete a previous 1G ext file of mine before unmounting and it couldnt reclaim space so i had to reformat... not sure if thats an issue to warn of for future .ext2 releases since i see you leave mounted. Perhaps unmount is needed for safe deletion of any loopback filesystem.

So afaict its great as openoffice, abiword, mozilla appliance (maybe more once i get time to look around more) Now i just gotta figure some libxul depeendency error for monodevelop.

BTW stock 810 mmc2 2g fat partition here (formatted with file manager).

debernardis
2008-06-24, 09:28
Another thing which I strongly needed and debian brought is pdftk.
Pdftk is a gread adjunct for those who work with pdf documents because it allows to encrypt, decrypt, cut and paste pages and merge pdf documents. It was impossible to port to maemo since no java compiler is available, but is in the armel debian packages so it's easy to apt-get install and works allright.

qole
2008-06-24, 16:44
Now I have to figure out what dependencies to give my package. I'm thinking at least gnutar, maybe also bzip2? I wish I knew what came "stock" on an N8x0. I want people to be able to set this up with a minimum of hassle, and I don't want a flood of, "how do I un-tar the file?"

The xarchiver project (https://garage.maemo.org/projects/xarchive) has both files in their repository (http://xarchive.garage.maemo.org/main/).

Benson
2008-06-24, 16:54
Well, you could tar your tbz up with gnu tar and whatever other binaries are necessary, and a shell script to perform the extraction and maybe installation too.

Then it'd be:
tar xf bundle.tar
cd bundle
./install.sh

Oh, wait a sec, I just realized you're doing a .deb; ignore the above.

You don't need bzip2 if you have gnu tar; but bzip2 is in extras, and I don't think gnutar is. So bzip2 might be the better choice to ease dependency chasing.

pipeline
2008-06-24, 18:22
Hmm i would recommend just libc6 since nothing in the 'deb' currently calls bzip2... these files are so big you should probably leave that to user to manage.. if that means using zip instead, well thats what i would do... your increasing rate of failure by automating extraction... i'd rather get asked howto then error messages. If you do include extract logic in deb, i would make icon or command for it instead of postinst.... 20 minute installer cylons are not pleasant.

qole
2008-06-24, 19:34
I was thinking of depending on bzip2, and then dropping a script as part of the . The script (eg. "chroot-extract") would simply be:

export IMGFOLDER=/media/mmc1
bunzip2 -c $IMGFOLDER/$1 | tar xvf - -C $IMGFOLDER/

the user would just type:

chroot-extract debian-chroot-img.tar.bz2


It seems like the best way to make this process easy. That's what I want. I want a "Debian appliance" that is easy for newbies, and you're right, "20 minute installer cylons are not pleasant."

EDIT... I should probably make my scripts more failure-resistant... put if statements, check for the existence of files, that sort of thing...

EDIT2: I can't seem to make the package dependent on bzip2, Application Manager just shrugs and says it can't find it, even in red pill mode. I don't get it.

qole
2008-06-24, 19:48
Should I include the ext2.ko and mbcache.ko files? Do they come "stock" with OS2008?

EDIT: I've decided to put them in /lib/modules/2.6.21-omap1/, they're only 80k, and my script is pretty dependent on that kernel number anyway.

doctorbri
2008-06-25, 00:08
I want a "Debian appliance" that is easy for newbies

Many thanks to qole et. al. for this very attitude. I'm looking forward to the .deb. Will your package run into problems with Diablo, that you can foresee, anyways?

pipeline
2008-06-25, 01:28
Works for me ... no difference.

qole
2008-06-25, 05:17
This would provide command like ext2chootrun which would (mount filesystem, run command, unmount filesystem)... or i could just mount and leave open. Base commands for mounting, chroot setup, and unmounting would be sudo-able.

Unmounting is often difficult, because many applications start up and then keep running in the chroot. Also, several system paths (/dev, /media, /home/user, etc) get bound into the chroot to make the chroot programs aware of the system... I've found that the only sure way to "close" the chroot is to reboot.

maxzar100
2008-06-25, 06:27
hey guys, im a newbie with linux, and i got my n800 a few days ago. I am trying to test out your method. I have os2008, and the nokia n800. Im currently at the step were you untar the 1gb blank memory partion.

I am willing to test out your installer files and images, it can benefit both of us.

(this seems to be the easiest way to chroot Debian.)

Please help,
maxzar100

UPDATE: i have successfully un tarred the 1gb memory partion, but i am trying to figure out how to mount the dam thing.

daperl
2008-06-25, 06:52
Unmounting is often difficult, because many applications start up and then keep running in the chroot. Also, several system paths (/dev, /media, /home/user, etc) get bound into the chroot to make the chroot programs aware of the system... I've found that the only sure way to "close" the chroot is to reboot.

Maybe you should think of incorporating the dynamic symlink technique used in scratchbox. It seems to me mixing and matching a combination of environment variables, dynamic symlinks, binding mounts and a chroot can get you where you want to go.

qole
2008-06-25, 07:43
Maybe you should think of incorporating the dynamic symlink technique used in scratchbox....

Well, scratchbox has the luxury of a nested X-server (Xephyr). You aren't trying to run all of your applications on the same X server and share as much of the same environment as possible like I'm trying to do here.

qole
2008-06-25, 07:52
UPDATE: i have successfully un tarred the 1gb memory partion, but i am trying to figure out how to mount the damn thing.

You've done the hard part! Really! It's super easy from here on.

Now you put the debian.img.ext2 file on the root folder of your SD card, and then you install one of the two .deb files that I attached to this post (http://www.internettablettalk.com/forums/showpost.php?p=194523&postcount=82).

Install either the mmc1 deb (http://www.internettablettalk.com/forums/attachment.php?attachmentid=1906&d=1214213976) or the mmc2 deb (http://www.internettablettalk.com/forums/attachment.php?attachmentid=1907&d=1214213988) using the Application Manager and then run your Debian apps by choosing your new menu icons. It's that simple. If you just want to mount it and get the Debian command line, there's an icon for that too.

maxzar100
2008-06-25, 07:55
nooooooooooooooooooooooooooooo its that easy dam it, i already curputed my memory card trying to make it into partions and mount it. DOooooooooooooom.


UPDATE: i have fixed the corrupted memory guide, but now i have to untar it again....... yyyyyyyyyy (sadd face)

ok then im gonna just use the installer, and see what happens, I really want fire fox 3 and open office I WILL DO ANYTHING!!!

qole
2008-06-25, 08:11
I really want fire fox 3 and open office I WILL DO ANYTHING!!!

<raises one eyebrow ominously and smiles dangerously>

Anything?

maxzar100
2008-06-25, 08:14
just making sure:

do i need to un tar the debian image, or just the 1gb partion.

qole
2008-06-25, 08:31
Untar the Debian image onto /media/mmc1 or /media/mmc2 ... you now have a big 1GB file called debian.img.ext2 on your SD card.
Navigate to this page on your tablet. Click on either the mmc1 deb (http://www.internettablettalk.com/forums/attachment.php?attachmentid=1906&d=1214213976) or the mmc2 deb (http://www.internettablettalk.com/forums/attachment.php?attachmentid=1907&d=1214213988), depending on where your Debian image is located. Install the file with Application Manager when the browser asks you.
Enjoy OpenOffice, Firefox, etc.

maxzar100
2008-06-25, 08:37
strange. it didnt work. it installed everything, but none of the apps load....

maxzar100
2008-06-25, 08:44
oh i see, i didnt extract the disk image, only the fake 1gb of memory. Im extracting the disk image now. Have you tried out the DS or PS1 emulator for the n800


should i reinstall the .deb file, because i installed it before i extracted the Debian image.

qole
2008-06-25, 08:53
should i reinstall the .deb file, because i installed it before i extracted the Debian image.

No. Just put the "debian.img.ext2" file in the right place and try your icons again. It will work if you have the file in the right place.

As I said above, try a small application first, like the matchbox keyboard. (you have to choose the matchbox kbd icon a second time to make it go away)

If that works, then go on to try bigger things.

maxzar100
2008-06-25, 09:17
dude its working thanks so much. the problem was that you had to restart after the installation

qole
2008-06-25, 10:17
dude its working thanks so much. the problem was that you had to restart after the installation

That's a very interesting piece of information. I'll make sure to include that in future how-to tutorials. Thanks.

pipeline
2008-06-25, 11:07
Should I include the ext2.ko and mbcache.ko files? Do they come "stock" with OS2008?


They are stock files, so i wouldnt think you would want to add.

Your bzip2 dependency probably works in red-pill mode since thats how bzip2 needs to be installed (wont show in list otherwise). Thats probably not something you want to make users do though.

maxzar100
2008-06-25, 17:46
i hope you make another guide of this and release it to the public. This is the best Debian installer, + it has apps. Too badd its really slow, but thats probably how it is on all of the debian builds used on nokia tablets. Now that i have installed Debian, i also installed the Azuerus program. How would i access/ add programs to the menue that i install using debian

qole
2008-06-25, 17:54
Now that i have installed Debian, i also installed the Azuerus program.

Holy crap! You installed Azureus!? And it works?! Dude!

As for adding icons, you have to go into the command line, sorry.

The menu items for OS2008 are all in:


/usr/share/applications/hildon


and they are all named <application>.desktop

I would suggest you copy one of the existing menu items (ooo.desktop for OpenOffice is a good one) and find the line that says,


Exec=sudo debian hilda openoffice


and change openoffice to the name of your application. You also need to change the name, generic name, and the icon. The icon is the hardest one, since the Debian icons are hidden away in the chroot most of the time... I had to copy them out of the chroot manually, it was ugly.

qole
2008-06-25, 19:16
Now if only i could apt-get install monodevelop :)

Why doesn't it work? It looks like it should install. All the dependencies are there...

Ahh... "Depends: libxul0d but it is not installable"

EDIT: Looks like the missing library is in Testing / Lenny. Have you tried installing it with the testing repo added?

EDIT2: I added the Lenny repo in Synaptic and installed monodevelop. The install seems to have worked. But I have no idea what to do with it.

EDIT3: I got to a Debian prompt, typed "monodevelop" and (a few hours later ;) ) up popped a very cramped-looking development environment. I think if this app decided to have a race with molasses in January, the brown goop might just win.

thp
2008-06-25, 20:21
I like the idea of having a debian chroot on my tablet and worked on a better integration while still being able to use a "full" debian desktop without the maemo UI on the left and top. With a bit of script magic, it's possible to have a simple menu entry that will start a desktop session (WindowMaker in my case) and still be able to switch to the maemo desktop while the debian session is running.

The Debian session also puts a tray icon on the maemo desktop with which one can see that debian is running and also switch to the debian session - see the video for a visual explanation ;)

Here's a demonstration: http://video.google.com/videoplay?docid=-1367124103884440661&hl=en

What do you think?

qole
2008-06-25, 20:33
With a bit of script magic, it's possible to have a simple menu entry that will start a desktop session (WindowMaker in my case) and still be able to switch to the maemo desktop while the debian session is running.

The Debian session also puts a tray icon on the maemo desktop with which one can see that debian is running and also switch to the debian session - see the video for a visual explanation ;)

I must say that WindowMaker is a very responsive WM for the tablet.

I kept waiting for the explanation, but it was just a demo. Pretty cool looking, but no explanations anywhere. What script magic do you use? Do you use a nested X-Server? Do you think we could incorporate your desktop into the "Debian Appliance"?

maxzar100
2008-06-25, 22:27
i dont know if the azuerus worked, all i know is that it installed.

maxzar100
2008-06-25, 22:29
can i just run azeurus

maxzar100
2008-06-25, 23:42
ok, to run a program in the chroot xterm, i used hilda (program) without the brackets. I tried it out on iceweasel, using hilda iceweasel and it worked, so now i will try it out on azeurus, once i figure out how to correctly spell it rofl.

qole
2008-06-25, 23:50
That's right, 'hilda <app>'... I would seriously try a much lighter-weight bittorrent app...

maxzar100
2008-06-26, 00:06
well, i did increase my ram, by 86 mb, so im gonna give it a shot, i will keep you posted. Also, is there anyway to give iceweasel flash 9 or 10.


That post a few ahead of us about the windowed debian, the one by thp, looks really good. It is much more responsive then the one that you made. Maybe he will give you the script, so you can include it in your installer. Actually, remember seeing a post about that on a forum somewere... i will look for that script.

maxzar100
2008-06-26, 00:43
noooooo ok, i launched azeurus in xterm, using hilda azureus, and it started flashing a lot of text, but it never launched the window to start azureus. Is there any other way to access the files? Or see what packages are installed?

pipeline
2008-06-26, 01:42
[strike]Looks like the missing library is in Testing / Lenny. Have you tried installing it with the testing repo added?

EDIT2: I added the Lenny repo in Synaptic and installed monodevelop. The install seems to have worked. But I have no idea what to do with it.

EDIT3: I got to a Debian prompt, typed "monodevelop" and (a few hours later ;) ) up popped a very cramped-looking development environment. I think if this app decided to have a race with molasses in January, the brown goop might just win.

Hey if maxzar100 can try azureus sure i can dream of monodevelop :) Thanks for the info... i may try it for novelty sake. It actually doesnt work well on an eee so its not surprising that this is probably to much bloat. I really only need 15% of the functionality so maybe i will unload some of the optional dependencies from the metapackage.

maxzar100
2008-06-26, 03:53
no agogo i cant get the azuerus to work, it would be easier if THP would tell us how he got his version of debian working, it was a lot more user freindly and fast. The problem is that azuerus loads up in xterm, but then the azurus window never comes up DOoooooooooooooooooooooooooooooooooooooooooom.

debernardis
2008-06-26, 04:59
The Debian session also puts a tray icon on the maemo desktop with which one can see that debian is running and also switch to the debian session - see the video for a visual explanation ;)

Here's a demonstration: http://video.google.com/videoplay?docid=-1367124103884440661&hl=en

What do you think?

That looks really great :eek: congratulations, but now you have to teach us how you did it, please :D.

qole
2008-06-26, 06:02
That post a few ahead of us about the windowed debian, the one by thp, looks really good. It is much more responsive then the one that you made.

... it would be easier if THP would tell us how he got his version of debian working, it was a lot more user freindly and fast.

You're killing me, man.

You're comparing the speed of some trivial applets on a light-weight window manager to monsters like Firefox 3 and OpenOffice. "His" Debian is no more responsive than "my" Debian, because they're both Debian chroots.

I don't think you understood the demo video. The cool part was how he had a full screen window manager that he could switch to with a button on the status panel in OS2008. We've already experimented with putting a window manager "on top" of OS2008, and we weren't thrilled with the speed...

If you really crave the speed, make a new ext2 partition on your SD card and copy your chroot to there. I've found it gets better speed than this mounted file way. But you're required to know an awful lot of stuff to do that, which is exactly what I don't want here.

Please try the "Transmission" bittorrent client. I think you'll be much happier with the speed.

maxzar100
2008-06-26, 06:19
sorry, the speed was just slow for me that one time for some reason, when i increased my ram it is fine. And i do apreciate the apps and the simplicity of your installer package. Think about this, a person with no previous linux knowledge (me) who started using their n800 on friday (also me) was able to install a chroot debian. That has to say something.

Are you gonna make a maemo garage project?

One bug i found, is that i am unable to download any themes or apps for iceweasel. I get a 228 error. But no biggy. Also, it would be nice if i was able to move the keyboard around, so it wouldnt always block the webpage. Is that possible?

Anyway, if i gave you an app that can get ARP packets from a wireless network, would you make the 2007 verison a 2008 version? Then everyone else could use aircrack ptw. the program is called wlaninject. here is the link to the maemo garage site. OMG PACKET INJECTION MAYBE? (https://garage.maemo.org/projects/wlaninject/)

thp
2008-06-26, 10:51
Some steps I did to get the setup as depicted in the video:

- Mounting/setting up the chroot is via a python script (automatically detects if the chroot is already set up, will carry out the necessary actions to set it up - given the image file name - in case it's not done already)
- The launcher executes a session script inside the chroot which will take over the screen via a fullscreen Xephyr, place the icon on :0 (the icon will simply bring Xephyr to the front) and launch a windowmaker session inside Xephyr
- The windowmaker session has a special icon which will call another script that will switch back to the maemo desktop without shutting down the chroot session
- When the windowmaker session ends, the icon will be removed and xephyr closed

I'd post my scripts, but they are quite hack-ish at the moment. If one would take the time and clean them up and package them, you'd simply install one .deb for OS2008, place a disk image _anywhere_ (i.e. on mmc1 or mmc2 or usb, ...) and have the scripts manage everything. For the chroot, you either distribute the scripts I wrote inside the image (needs downloading of the image the first time) or simply provide a .deb for the Debian chroot that will be installed there.

Also, I'd like to do something like starting completely from scratch with debootstrap to create a debian chroot image "from scratch" without editing the Debian tarball that is used as a basis for this chroot environment (that's also what I currently use as a basis).

qole
2008-06-26, 17:51
Some steps I did to get the setup as depicted in the video:

- Mounting/setting up the chroot is via a python script (automatically detects if the chroot is already set up, will carry out the necessary actions to set it up - given the image file name - in case it's not done already)
- The launcher executes a session script inside the chroot which will take over the screen via a fullscreen Xephyr, place the icon on :0 (the icon will simply bring Xephyr to the front) and launch a windowmaker session inside Xephyr
- The windowmaker session has a special icon which will call another script that will switch back to the maemo desktop without shutting down the chroot session
- When the windowmaker session ends, the icon will be removed and xephyr closed

Thanks. Like I said, we (debernardis and I) have been experimenting (http://www.internettablettalk.com/forums/showthread.php?p=186794#post186794) with Xephyr and xfce4 (a simple script here (http://www.internettablettalk.com/forums/showthread.php?p=186817#post186817)), but we're not Python hackers, so things like icons in the OS 2008 status bar are beyond us. It looks like WindowMaker is probably better than xfce4; more snappy.

...you'd simply install one .deb for OS2008, place a disk image _anywhere_ (i.e. on mmc1 or mmc2 or usb, ...) and have the scripts manage everything. For the chroot, you either distribute the scripts I wrote inside the image (needs downloading of the image the first time) or simply provide a .deb for the Debian chroot that will be installed there.

That would be magnificent. If you scan back through this thread, you'll see that I've been looking for a scripter to get the scripts all cleaned up and working well. My stuff is so kludgy and ham-handed.

Also, I'd like to do something like starting completely from scratch with debootstrap to create a debian chroot image "from scratch" without editing the Debian tarball that is used as a basis for this chroot environment (that's also what I currently use as a basis).

Earlier in the thread, I posted a basic Debian Sid debootstrap tarball (http://rapidshare.com/files/122031522/debian-sid-armel-chroot.tgz.html); this is the rootfs created by debootstrap, with nothing installed yet (it is actually a bzip2 file). I later posted a completely empty, ext2 formatted image file (http://www.internettablettalk.com/forums/attachment.php?attachmentid=1910&d=1214239999). You mount the empty image file, and then untar the "clean" rootfs inside the mounted image.

The first thing you need to do when chrooting to this is "apt-get update", "apt-get install locales" and then "dpkg-reconfigure locales", otherwise apt-get will give you lots of locale errors every time you try to install something. But after that, you can build yourself any application set you want.

maxzar100
2008-06-26, 18:53
Do you think, if i added 1gb of virtual ram, out of my 8gb card, open office would run faster? I might try that and see how it helps. I found the code

First create a swap file like you do it normally (from the Control Panel).

Then run a XTerm and do these commands:

Code:

swapoff /media/mmc1/.swap
dd if=/dev/zero of=/media/mmc1/.swap bs=1024 count=256000
mkswap /media/mmc1/.swap
swapon /media/mmc1/.swap

The second command is specifying the size of the swap, here it is close to 256MB, you can tweak it to your liking. This operation can also take very long time so be patient.

After restart it should remain the same size. It will reset probably if you mess again with the swap settings in Control Panel.

wow, now i can allocate as much ram as a Desktop PC!!!!

debernardis
2008-06-26, 20:01
@maxzar100: I don't think this will give the boost you expect. When I didn't know yet that pdf were not functioning in ooo because the tempfs was too small, I tried to increase virtual memory to 256Megs the way you did. This was ineffective and ooo started as slow as with 128 Megs swapfile.

@thp:
I'd post my scripts, but they are quite hack-ish at the moment. If one would take the time and clean them up and package them, you'd simply install one .deb for OS2008
I'd like to play with your scripts - really because I liked so much your smooth starting of chroot and the way you went to and fro from the xephyr window to the hildon one. Please post. Nobody is less literate than me in python here but at least maybe I'll be able to learn something from them. Thanks :-)

maxzar100
2008-06-26, 22:34
@maxzar100: I don't think this will give the boost you expect. When I didn't know yet that pdf were not functioning in ooo because the tempfs was too small, I tried to increase virtual memory to 256Megs the way you did. This was ineffective and ooo started as slow as with 128 Megs swapfile.

@thp:

I'd like to play with your scripts - really because I liked so much your smooth starting of chroot and the way you went to and fro from the xephyr window to the hildon one. Please post. Nobody is less literate than me in python here but at least maybe I'll be able to learn something from them. Thanks :-)

yeah i would like to play with them too, mainly because of the moveable keyboard. Dont worry, ive never touched a linux device in my life untill a few days ago, theres no way you could be less literate then me.

qole
2008-06-27, 04:21
Some good news. OpenOffice.org has been bumped to version 1:2.4.1-3, and it no longer has packaging errors. Iceweasel (Firefox) 3 has been put in the main Debian repositories too, at version 3.0~rc2-2, which is only one revision away from Firefox 3.0 final (they just released rc3 as final).

I'll also be posting a clean Debian image in the next 24 hours with all the right pieces in place to make the chroot script work, but with a very minimal installed application list. This will allow hackers and such to install whatever they want without worrying about running out of space.

maxzar100
2008-06-27, 20:24
That would be great. Also, is there anyway to make the keyboard move around.

Matan
2008-06-27, 21:19
About unmounting: I found that killing all chrooted programs like this:


for i in [0-9]* ; do if ls -dl $i/root | grep -q /opt ; then kill $i ; fi ; done


And then unmounting in the correct order (basically reversed order of mounting), works everytime.

Now if there was only a way to prevent apt-get in the chroot from killing external daemons (ssh, hal, etc.), it would be great.

qole
2008-06-27, 21:32
That would be great. Also, is there anyway to make the keyboard move around.

Yes, the Matchbox-Keyboard doesn't move around. I included it because it iis the only Debian virtual keyboard that that I've found that is usable with OS2008.

Your best bet for a little keyboard that you can make disappear when you want it to is the xkbd port (http://pupnik.de/xkbd.html). You want the OS2008 version (http://pupnik.de/xkbd_0.8.15m-2_armel.deb). If you install it, you maybe should use debernardis' method given here (http://www.internettablettalk.com/forums/showthread.php?t=10101).

qole
2008-06-27, 21:33
Ok, here is a minimal Debian image, with locales installed and no hacks ("dpkg-reconfigure locales" still required for non-English locales). I've also installed ssh server so you can use this trick (http://www.internettablettalk.com/forums/showpost.php?p=191973&postcount=51) to ssh into your chroot and work on it remotely (even using x forwarding!)

You'll need to untar it and put it in the same place as the app-filled image. Use my instructions here (http://www.internettablettalk.com/forums/showthread.php?p=194523#post194523).

Minimal-Install 1GB Debian Image (http://qole.maemobox.org/debian-chroot-min-img.tar.bz2)

If you want the apps from the original package, and you are tight on space on your SD card, and you don't want to install anything else, here's a smaller image (730MB instead of 1GB) with all of the applications. It has no spare room for any more apps, however. It is purely an appliance for OpenOffice, AbiWord, and Iceweasel.

730MB Debian Application Image (http://qole.maemobox.org/debian-chroot-apps-img-smaller.tar.bz2)

qole
2008-06-28, 06:07
By the way, for anyone interested in trying out thp's setup (but, sadly, without the polish of his python-script-enhanced version), you'll need the following three packages:


xserver-xephyr (to put the secondary window manager over OS2008)
wmaker (the Window Maker desktop)
xvkbd (the "movable" virtual keyboard shown in the demo)


Write a script similar to the one under "Xephyr Method" in this post (http://www.internettablettalk.com/forums/showpost.php?p=186817&postcount=7), and then have fun.

thp
2008-06-30, 15:34
Will be posting my scripts sometime this week. Currenly busy with maths exam preparation, but then in the course of the week I'll take some time to do it. Please PM me at the end of this week in case I forget :)

debernardis
2008-07-01, 04:55
For those who use Johnx's beta3 debian rootfs (like me), please be aware that the last update tries to reinstall the (infamous) mtd - resulting in a malfunctioning apt-get with the practical impossibility to get rid of mtd from your chroot.

So, before updating-upgrading, better put mtd on hold:echo "mtd hold"|dpkg --set-selections

psykosis
2008-07-01, 14:23
Just thought I'd drop into this thread and report that I had complete success with the image files and deb installer and it is working flawlessly on my n800.

Next question - is there a nice way to expand the ext2 file to be larger for more playroom? I suppose ideally, I should just make a ext2 part. on my SD, but I kind of like the ability to store various image states easily on the HD.

qole
2008-07-01, 14:47
Just thought I'd drop into this thread and report that I had complete success with the image files and deb installer and it is working flawlessly on my n800.

Next question - is there a nice way to expand the ext2 file to be larger for more playroom? I suppose ideally, I should just make a ext2 part. on my SD, but I kind of like the ability to store various image states easily on the HD.

I would like to know if this is possible, too. So far, I have been tarring up my chroot (the filesystem, not the image file), making a new image file or untarring the empty 1GB one, mounting the empty image, and then untarring the chroot back into the new file. That's really slow...

psykosis
2008-07-02, 01:14
Doing a little google'n, seems there is a way with resize2fs - which is missing from Maemo, but ironically is on the Debian file. I tried copying it off the Debian file system and moving it over to Maemo's /sbin and it appears to run. I haven't reboot to unmount the image, but I bet this will work.

qole
2008-07-02, 05:54
I have spent the (Canadian long) weekend learning how to do if-then statements in shell scripts so that the chroot script is much faster and much more flexible (you can put your image on either SD card and it figures it out, and it can handle ext3 file systems now), figuring out how to give the Xephyr window an icon in OS2008 (using a tiny Python program! it works!), and modifying a script by PenguinBait (thanks, PenguinBait!) to download and untar the big chroot image file automatically, without having to know how to use the command line. It has been a very productive weekend. I should have an updated .deb very soon; I think I'm almost ready to start a new thread and make the big announcement...

psykosis
2008-07-02, 15:55
Played around with installing some applications (well, mainly games ;) - gotta keep productivity up) and thought I report my hits and fails if anyone else is interested.


Lordsawar - this is a Warlords 2 clone which runs amazingly well on the NIT, even though it appears to partially be programmed for 800x600 for some parts (like the introduction screen). While in game, I could not see anything "missing" and everything - minus naming a save file - is sylus driven. All in all, I'd say it is quite a success (and perhaps I'll need to figure out how to re-compile things and get it running under raw Maemo).


Pingus - I did not realize that there was already a Maemo port of this, however the debian install worked great with a few command line options (I ran with pingus -f -g 800x480 -s -m). The -s and -m is due to lacking of having SDL mixer installed, but likely would work with those. The screen updates were completely usable, at least in the first level I played, at 800x480 full screen.


kg - Sounded promising; an RPG similar to the Final Fantasy series. It ran, however it definitely needs some keyboard loving and unfortunately I don't have a floating keyboard installed yet since my reinstall. All in all, likely promising, especially for n810 folks.


falconseye - Why stop at nethack, or at least so I thought. It appears it only runs in 800x600 (I couldn't find a option to change it) and I cannot get past the first screen as the button to continue is hidden. However, as the source is available, this may be a good candidate for some mucking to get it scaled down and running in Maemo.


xconq - This turn-based strategy appears to be running and fitting on the tablet. To be honest, I didn't muck with it much, but nothing obvious was cut off and the speed appears to be quite usable.


milkytracker - This is a mod/IT/XM/etc. music tracker. It loads - it appears to be fitting relatively on the screen (perhaps things missing on the bottom?) - however, I need to get sdl-mixer installed to see if it will play. Likely won't be wonderfully usable without a real keyboard though...

debernardis
2008-07-02, 17:21
Another useful debian install --> mp3info-gtk which is a mp3 tagger, one kind of app that's lacking as far as I know for the IT. After installing, you can call it from the command line with "gmp3info". Then, you can craft a .desktop file.

But, really, better start another thread for debian apps. Much better, another forum section for debian?

psykosis
2008-07-02, 17:33
I would vote for another sub-form -- there is more possible threads for Debian than KDE, which has it's own, and it is a discrete, different environment and not really proper for "Apps".

qole
2008-07-02, 18:37
Much better, another forum section for debian?

I would vote for another sub-forum -- there is more possible threads for Debian than KDE, which has it's own, and it is a discrete, different environment and not really proper for "Apps".

Me three. I have no idea how to request such a thing, however...

Underscore
2008-07-02, 19:01
Me three. I have no idea how to request such a thing, however...
Me four. Just PM Reggie. Someone did that and he put up a whole new section for Android. ;) And Debian is so much farther along, I don't think he'll say no.

qole
2008-07-02, 19:22
I am putting together a new apps package for the big release. I want to include a lightweight WM for use with Xephyr and my new little Python script so that apps like OpenOffice will look their best.

While Window Maker is certainly lightweight, it is really too minimalistic to be usable by most newbies. xfce4 is nice, but it is almost too big and bloaty. I haven't tried JWM nor ICEWM, but I think I will end up choosing one of them. ICEWM has the benefit of looking like MS Windows, and the newbie crowd that I'm aiming for with this project will probably appreciate a familiar-looking WM...

Any comments on this?

EDIT: I'm going with IceWM because it is tiny and familiar unless someone can tell me why I should go with another one...

Benson
2008-07-02, 23:11
Me three. I have no idea how to request such a thing, however...

Me five, and now it's done. Here's how. (http://www.internettablettalk.com/forums/showthread.php?t=21532) :p

(I was going to PM Reggie about it in a day or so if he hadn't done something about it, but I thought discussion on the other proposals I made could be useful, too, so I did that first. Of course, Reggie never sleeps, so he got it already. :cool:)

debernardis
2008-07-03, 05:19
Icewm is good, light and very configurable - very nice look just out of the box! Go with it :-)

qole
2008-07-03, 16:57
Argh. I am trying to build a fresh chroot with all of the applications + xephyr and icewm. I ran out of space when trying to build it in my 1 GB image file, so I've sacrificed my bootable debian partition and I'm building it there. When it's done, I'll put it in the image file.

It gets really really ugly if you run out of space in the middle of a big apt-get install process.

maxzar100
2008-07-03, 19:25
icewm looks awesome, also, if possible can you include another blank .ex2 partion with bigger space so we can add apps? or will it fit on this one.

and please include gimp if you can.

thanks,
maxzar100

p.s. im working on getting a lite version of xp to work on the tablet. I have this iso of xp hackers edition the iso is only like 500 mb, and the actuall files needed to run windows come out to be about 2.4gb so its possible. we shall see soon....

psykosis
2008-07-03, 19:39
p.s. im working on getting a lite version of xp to work on the tablet. I have this iso of xp hackers edition the iso is only like 500 mb, and the actuall files needed to run windows come out to be about 2.4gb so its possible. we shall see soon....

What will you be using to emulate the x86 processor to run XP?


It gets really really ugly if you run out of space in the middle of a big apt-get install process.


I still need to test whether that resize2fs will work and not be painfully slow on the NIT+SD as I had this fun a couple times.
On the aspect of Window Managers, I tried out Enlightment on the Nokia and it seems to fly pretty well - a better experience than I did with XFCE and KDE - at least once I got the main enlightenment menu remapped to a hardware key.

qole
2008-07-03, 21:45
On the aspect of Window Managers, I tried out Enlightment on the Nokia and it seems to fly pretty well - a better experience than I did with XFCE and KDE - at least once I got the main enlightenment menu remapped to a hardware key.


I saw your Enlightenment screenshot. I must say it looks very nice. I have noticed that, while IceWM is tiny and fast, a big problem with IceWM is that there is really no GUI configuration available. It looks like you have to do all of your configuration in text files! Perhaps Enlightenment might be better? Does it have a GUI config?

psykosis
2008-07-03, 22:07
Depends what aspects you want to configure - things like color/themes/wallpapers or even the keybinder and whatnot are GUI configurable - the keybinder is a biggy since you can then map a hard key to run a command (such as that KDE right click script - which works great in Enlightenment as expected).

With that said, I have not located a way to modify the menus via the GUI - although such a beast probably does exist. There are quite a few "epplets" that add various functionality.

Now as far as resources used, I never really used Icewm before, but I get the general impression that it is lighter than enlightenment. Speedwise though - I found enlightenment to be very usable. I believe the install took maybe 8megs for the whole shebang, so I'd recommend taking a glance.

maxzar100
2008-07-03, 22:09
there is a bochs emulator for tablets, and dosbox witch works with 98 and 95. So im trying to get a light version of xp to work. Im making the image with dosbox on my pc first.

Benson
2008-07-03, 22:23
XP is NT, while 9x are DOS-based; dosbox does not have full compatibility, but enough for DOS-like systems. I seriously doubt XP will work at all (that way).

qole
2008-07-04, 00:22
One bug i found, is that i am unable to download any themes or apps for iceweasel.

Looks like the current version of Iceweasel installs extensions -- I was able to install the Adblock Plus and del.icio.us extensions. I haven't tried themes.

I think the problem before was that Mozilla wasn't officially supporting FF 3.0, so they were letting you attempt to install stuff for FF 2.0, and it was failing. That's my guess.

psykosis
2008-07-04, 01:56
I finally after running into the "out of space" jazz again decided to try the resize2fs ordeal, and it worked!

Step by step (in case anyone needs more details)

I opened up a Debian shell and copied /sbin/resize2fs over to /media/mmc1 and then under an OS2008 shell (as root) copied it from mmc1 over to OS2008's sbin. (and I think I had to chmod a+x resize2fs since the FAT SD killed the execute bit)
I rebooted, since I am too lazy to ensure the image is properly unmounted.
After rebooting, in an OS2008 shell (as root) I typed: "resize2fs /media/mmc1/debian.img.ext 1512M" - the 1512M can be changed, of course, to whatever your target size is.
Afterwards, I ran "e2fsck -f /media/mmc1/debian.img.ext2" to ensure there were no errors in the file system (I found a few, but they were fixed).
Install, install, install. :)


Warning: Before others do my "opps", remember that FAT doesn't like files larger than 2gb!

Loving this chmod bit, Qole!

maxzar100
2008-07-04, 04:12
Ok, thanks for checking on the iceweasel bug. Im waiting to install the new tar ball that you compile, the one with icewm. Thanks for all the hard work. Also, Im testing my xp .img file with my psp right now, i will see how it comes out. the img file is about 500mb, i left room in it so i can install halo or something ( hell, i man can dream cant he?)

qole
2008-07-04, 04:59
Hi, anybody with IceWM experience, where's the menu file for IceWM? I thought it would be in /usr/share/icewm, but that menu file is just a sample, and it bears no resemblance to the menu used in the actual WM. Same goes for the toolbar file. The preferences file, on the other hand, is actually used. There seems to be some system-wide menu thing going on, but I don't know where to look for that... any ideas? People familiar with Debian?

Just a quick screenshot of my IceWM setup for the chroot:

http://farm4.static.flickr.com/3185/2635805720_1d6398ee1c_o.png (http://www.flickr.com/photos/qole2/2635805720/)

psykosis
2008-07-04, 05:41
Looks like your IceWM is coming along well! I *think* a lot of the menus are rooted somewhere - Enlightenment's menu editor (GUI!) has stubs for a few external menus, which I am likewise confused with locating.

Found one really really big win for Enlightenment - it's virtual pager allows pretty easy handling of windows that are too large.

One question - has anyone gotten SDL Audio to work with Debian at all?

qole
2008-07-04, 06:14
One question - has anyone gotten SDL Audio to work with Debian at all?

Yes, you have to use the esound option... I got it working with the "abuse" game...

debernardis
2008-07-04, 06:32
As far as I know, configuration files are in the [home]/.icewm directory.
In my rudypuppy linux under .icewm I have these files: menu, preferences, keys, programs, startup (a script), theme, toolbar and winoptions.
I can send you those if needed.

psykosis
2008-07-04, 14:33
Yes, you have to use the esound option... I got it working with the "abuse" game...

I have tried export SDL_AUDIODRIVER=esd without any luck so far - is there some other setting somewhere I am missing? Depending on the program, some complain about not being able to open /dev/dsp (which indeed doesn't exist).

Update: Not sure what I did - but milkytracker suddenly decided to make noise! :)

qole
2008-07-04, 20:51
As far as I know, configuration files are in the [home]/.icewm directory.
In my rudypuppy linux under .icewm I have these files: menu, preferences, keys, programs, startup (a script), theme, toolbar and winoptions.
I can send you those if needed.

Those are user-specific files that override the system defaults. I figured out where the system defaults are located in Debian IceWM. For future reference:

/etc/X11/icewm/menu
/etc/X11/icewm/toolbar
/usr/share/icewm/preferences


I'm not yet sure where the active "keys" and "winoptions" are located. These files are in both directories.

I'm really really close to having a new version. I'm just packaging everything up, then testing the package, especially the image downloader script that I modified from penguinbait.

qole
2008-07-05, 09:51
I've done some test installs and uninstalls and re-installs and botched installs, and I'm ready to go live, just need to gather my strength to write up the big post with all the instructions and the FAQ and the notes etc etc etc... This is a huge improvement, the scripts are way better now, the Debian install is not hacked in any way, and the IceWM desktop and automated image installer work well...

The new image is pretty big, unfortunately, it took the installer more than half an hour to download the image and another very long time to unpack the image. But that's not bad if that's the biggest problem.

I think the biggest problem will be the fact that everyone will complain about what dogs these big desktop apps are. They just go so slowly! Especially Firefox.

psykosis
2008-07-05, 15:12
Yes - I have to admit that I grabbed the App image just to say I did and ran the software, however unfortunately they are, in reality, a bit to heavy for our dear old tablets. While it is definitely cool to see the OpenOffice logo flash up on my n800 (and I got a really good chance to see it), I cannot really see ever using it for anything productive due to the speed.

With that said, I think your efforts still are wonderful, Qole. I have had my n800 in my hands for more straight blocks of time than I have for quite some time, playing with the various options available under Debian. I have found while the modern apps run way too slow, there is has been a serious class re-union to the older apps of yester-years going on, apps that were written for double digit Mhz machines that utterly scream on our Nokia. I think these Gems of old likely will be the real strength of Debian on our Nokias.

qole
2008-07-05, 19:44
Finally, it's done (http://www.internettablettalk.com/forums/showthread.php?t=21629).

psykosis
2008-07-05, 22:59
Hey Qole - what is your secret to have Xephyr/IceWM having an icon under OS2008 to switch back? I have been manually wmctrl'ing it back up, but a simple "task" to switch back would be hot.

qole
2008-07-05, 23:25
I wrote a tiny Python app that pops open a window in OS2008 called "IceWM", then I used wmctrl to find the window ID, then I open Xephyr inside that window using the -parent parameter.

Amarantus
2008-07-08, 12:22
As an alternative to OS2008 which is better debian or kde ?

Benson
2008-07-08, 12:54
As an alternative to OS2008 which is better debian or kde ?
That question really doesn't make horribly much sense; I think you misunderstand what's going on here.

KDE runs as a window manager and associated apps on top of OS2008; not an alternative to OS2008, but to Matchbox and some Hildon apps.

Debian is a full free-standing distribution; the topic discussed in this thread, though, is using Debian in a chroot, so you have OS2008 running, providing all system services, and Debian providing applications and their (library) dependencies. You can run Debian as a boot-time alternative, but that's discussed in other threads... It's currently the most viable ITOS replacement, IMO, but Android also works (on N810s, mainly); just not many apps there yet.

HTH

Amarantus
2008-07-08, 13:57
Thank you Benson. Maybe I didn´t express mylself right , what I mean is it´s better use maemo with kde for productivity apps lilke koffice or use debian in chroot ? But you re right debian is much more intersting , especially if I could use java apps.

Benson
2008-07-08, 15:23
You can use Java apps without (or with) either; Jalimo uses GNU classpath, same as Debian's java implementation, IIUC, just easier with Debian chroot since you don't have to set it up yourself...

Koffice is faster, I think, than OOo, but OOo is more compatible with MSO, and more full-featured in general.

BoxOfSnoo
2008-07-10, 12:56
I haven't noticed others posting this question since the release of the easy install..

I am booting from MMC, and have 2.7G left on that partition, plenty I probably won't use. How can I either a) install the image file onto this (ext2) partition or b) install on mmc1 and transfer it over? I presume there's a lot more to the installer than unpacking the bz2 file...

I am downloading the image file to my desktop now, and deleting all my mp3s from mmc1...

Thank you, looking forward to trying this out!

BoxOfSnoo
2008-07-10, 14:46
Ok, still downloading the image, but I have a thought. Is everything else set up after the basic install and before downloading the image?

How about this:

immediately after the existing export= lines in /sbin/debian

if [ "$DEBIAN_IMG_ALT" != "" ]
then
export IMGOTHER=`ls -1 ${DEBIAN_IMG_ALT}debian*.img* | awk -v RS='Â¥' '{print $1}'`
fi

and then, in the appropriate spot...

export IMGFILE=$IMGMMC2
elif [ "$IMGOTHER" != "" ]
then
export IMGFILE=$IMGOTHER
else

All I would need to do is export the DEBIAN_IMG_ALT= variable setting before running the script. This should keep it easy for basic use and allow advanced users to be more specific.

Any thoughts?

qole
2008-07-10, 16:18
BoxofSnoo: That's cool!

I still think the ultimate thing would be to have the debian chroot script search the root fs as well as the mmc cards for image files, as well as unmounted partitions. If it finds multiple image files and/or unmounted partitions, it will ask you which you want to mount. This would let you chroot into other copies of maemo as well as debian, ubuntu, etc. You could have several images on your various cards and choose which one to chroot into...

... This is my plan for the next version of the "Easy Debian" package...

BoxOfSnoo
2008-07-10, 17:11
That would be awesome! But... probably take too long each launch...

Otherwise you could rescan on demand and use something like this:

find / -name debian*.img* 2>/dev/null

The 2> err redirect is purely to prevent seeing the common "too many open files" error. You could use grep or awk to filter just the ones you want, and get them into a list for on-the-fly selection...

qole
2008-07-10, 17:40
That would be awesome! But... probably take too long each launch...

Oh, I didn't mean search the whole file system, it would just look in a couple of places (probably "/" and maybe "/home/user") so that people with big partitions can use them to host their image.

Benson
2008-07-10, 17:55
I'd be inclined to have the main scripts read a config file, and have a separate script that can be run on-demand to try generating a config file by looking for debian root filesystems.

qole
2008-07-10, 18:12
That sounds cool, I look forward to seeing it! I've just learned how to do if-then statements in shell scripts, reading/writing config files is a bit over my head. But if you held my hand...

Benson
2008-07-10, 18:37
Writing's the hard bit, since you have to figure out what to write...

Make your config file look like:
IMAGEFILE=/media/mmc2/debian.img
MOUNTPOINT=/debian/
PARAMETER3=value3
PARAMETER4=value4
(That is to say, statements interpretable by the shell, leaving settings in shell variables; you can do actual commands and stuff as well as assignments...)
Then, in your shell script, you include the file with . like so:
#!/bin/sh
#first read our config file:
. /home/user/.debchrootrc

#now do the real work...That causes the shell to jump over to .debchrootrc, continue reading and evaluating lines from it, and when it drops out of .debchrootrc, returns to the including script.

For writing, you wind up with something like:
#...
#By this point, all the actual values have been discovered, guessed, prompted for, or otherwise obtained, and assigned into the correct variables.
echo '#This file auto-generated by qole's debfooconfigurizer script.' > /home/user/.debchrootrc
echo 'IMAGEFILE="'"$IMAGEFILE"'"' > /home/user/.debchrootrc
echo 'MOUNTPOINT="'"$MOUNTPOINT"'"' > /home/user/.debchrootrc
echo 'PARAMETER3="'"$PARAMETER3"'"' > /home/user/.debchrootrc
echo 'PARAMETER4="'"$PARAMETER4"'"' > /home/user/.debchrootrc

qole
2008-07-10, 21:23
I have found while the modern apps run way too slow, there is has been a serious class re-union to the older apps of yester-years going on, apps that were written for double digit Mhz machines that utterly scream on our Nokia. I think these Gems of old likely will be the real strength of Debian on our Nokias.

Could you please post some of your "gems" in the Debian Apps That Run Well On The Tablet (http://www.internettablettalk.com/forums/showthread.php?t=21719) thread?

qole
2008-07-10, 21:36
I think I will have my chroot script look for the config file, and if it doesn't find one, it will look in a very few specific locations for a specifically named chroot image.

I will then make a new package (called something like advanced-chroot-config) that will use Bundyo's port of Zenity to interact with the user in setting up a variety of options, including using a partition instead of an img file, and then write this to a config file that will then be used by the chroot script. The new package will also include Matan's unmount script (http://www.internettablettalk.com/forums/showthread.php?p=196824#post196824) for shutting down your chroot so you can switch to a new one, and maybe some other chroot-related utilities if we can think of stuff that would be useful.

Benson
2008-07-10, 21:53
Sounds pretty clean from here. Let me know if you run into any trouble with the scripting.

nevathan
2008-07-12, 08:31
Does This Work On Nokia 770

offensivebias
2008-07-13, 16:44
I finally after running into the "out of space" jazz again decided to try the resize2fs ordeal, and it worked!

Step by step (in case anyone needs more details)

I opened up a Debian shell and copied /sbin/resize2fs over to /media/mmc1 and then under an OS2008 shell (as root) copied it from mmc1 over to OS2008's sbin. (and I think I had to chmod a+x resize2fs since the FAT SD killed the execute bit)
I rebooted, since I am too lazy to ensure the image is properly unmounted.
After rebooting, in an OS2008 shell (as root) I typed: "resize2fs /media/mmc1/debian.img.ext 1512M" - the 1512M can be changed, of course, to whatever your target size is.
Afterwards, I ran "e2fsck -f /media/mmc1/debian.img.ext2" to ensure there were no errors in the file system (I found a few, but they were fixed).
Install, install, install. :)


Warning: Before others do my "opps", remember that FAT doesn't like files larger than 2gb!

Loving this chmod bit, Qole!

Hello,

I've been looking for quite a while for an easy way of installing a full linux distro on my n810, and I must say you guys have done an incredible job. The image of qole is working flawlessly. 1000xthanks

I had a question about the partition size. I have a microsd card of 8 GB, most of it I emptied for the debian image of qole. The problem is when I try to install xfce4, I run out of space and it becomes really ugly. So I read this thread (and others) to find a solution and I tried psykosis one but it didn't work. Instead the terminal tells me after this command:

/home/user # resize2fs /media/mmc1/debian.img.ext2 1950M
resize2fs: error while loading shared libraries: libe2p.so.2: cannot open shared object file: No such file or directory

Is this missing library easily installable, is there an other way to resize the image or should I go for a complete personalized chroot install (as it seems you were all doing at the beginning of this thread) ?

note: I have been using linux (debian and ubuntu) for quite a while but am not an experienced user at all. So writing python or C code is not really something I can handle It would be nice if someone would have a not too complicated solutions :).

Again thank for everything.

offensivebias
2008-07-15, 09:49
UPDATE OF THE PREVIOUS POST:

Finally I found a way around without risking my n810 at all, for anyone interested:

what you need:
- a computer with linux
- resize2fs on it
-> to install it ( normally in root or with sudo):
--> debian and ubuntu: apt-get install <program>
--> gentoo: emerge <program>, I think, it has been a while since I last touched a gentoo box)
- optional: SD card reader + adapter to (micro/mini)sd depend of which of the 3 you use.

steps:
1. Either connect your IT to your pc or get the card out (caution: do not take it out if in use, safest way to make sure: power off your IT) and put it in the card reader.
2. go in the terminal or if in X launch a terminal emulator
3. type cd /<your path to your (micro/mini)sd/
4. e2fsck -f <your debian image file name>
-> it check if everything is allright with the filesystem
5. resize2fs <your debian image file name> 1950M
(As psykosis said you can change the size but if your (micro/mini)sd card is formatted in fat, like mine, the file better not be bigger than 2gb)

And that's it, a loooot more room for installing cool apps :)

thank you very much for the resize2fs trick psykosis I wouldn't have found it myself.

offensivebias
2008-07-15, 14:02
It's me again,

I've got some other problems, so if you chroot debian pros could help me it would be a very nice. :)

my first problem concerns hal and apt-get. I installed a lot of packages and now each time I use apt-get it is written: (sorry it's in french)

paramétrage de hal (0.5.11-2) ...
dpkg : erreur de traitement de hal (--configure) :
le sous processus post-installation script a retourné une erreur de sortie d'état 1
I think that with all the installs I made some minor manipulation went wrong with hal but I don't know what.

my second problem is about launching properly xfce 4. I can launch xfce from the chroot debian terminal with:
startxfce4
But it isn't fullscreen and it doesn't look like a clean launch at all compared to qole's icewm icon. I looked in the icon of qole and found out that it was this command:
debwm icewm xpice
I tried:
debwm xfce xpice
and
debwm startxfce4 xpice
in an OS2008 terminal but it is not fullscreen and completely buggy (I only see the wallpaper)

But xfce works, when I type startxfce4 in the chroot terminal, the menu, the bar ... they work. So I'm sure there isn't much to do for it to go as flawless as qole's icewm, just that a stupid guy like me don't know what to do to make it work. :)

fatalsaint
2008-07-15, 14:15
the xpice is a command qole wront on the debian side that statically launches IceWM.. if you want to launch XFCE you need to copy the xpice command in the debian root shell (so launch Debian Chroot):

cp /usr/bin/xpice /usr/bin/wmxfce


Then edit the /usr/bin/wmxfce .. there is a line that specifically says icewm-session.. change that to xfce-session (i think - it might be xfce4-session or similar.. type xfce in a debian chroot and hit tab twice).


su user -c 'export DISPLAY=:1; icewm-session'

To something like:

su user -c 'export DISPLAY=:1; xfce4-session'


As far as full screen.. read back a page or two - i think there is some python dependencies you need..

fatalsaint
2008-07-15, 14:31
Here's the post from qole regarding the python dependencies... it was in the other thread as well:

Yeah, if the window isn't going fullscreen, you should definitely try a reboot. The bottom bar is there, but it is hidden because you shouldn't be seeing it in a window.

Ah, I have an idea! Do you have python2.5 (http://repository.maemo.org/extras/pool/diablo/free/p/python2.5/python2.5_2.5.2-1osso3_armel.deb) and python2.5-gtk2 (http://repository.maemo.org/extras/pool/diablo/free/p/python-gtk2/python2.5-gtk2_2.12.1-1osso4_armel.deb) installed? Because I use a tiny Python script to open the window that the IceWM starts in. If you don't see the window pop open, with instructions about logging out before closing the window, you probably need the Python stuff.

Also: I get that hal reconfigure error all the time as well now.. but it doesn't actually hinder the installation of my apps.

qole
2008-07-15, 16:54
I think offensivebias isn't getting fullscreen because he isn't using my Debian script that starts the Xephyr nested X-Server and then sets the display to :1. I think he's actually starting xfce4 directly in OS2008... That produces some seriously weird (but somehow really cool :D ) stuff.

Make sure you use fatalsaint's method for copying and modifying the xpice script.

As for hal, just "apt-get remove hal" ... you don't need it and it won't install right on the tablet. If you can't get it to uninstall, tell me and I'll tell you how to hack dpkg to get it to work. But I hope you can just get it to uninstall. dbus is the other package that doesn't install right.

offensivebias
2008-07-15, 18:52
I was able to uninstall with no problem hal, thanks.

For xfce, qole was right, I was launching "debwm xfce xpice" in an 0S2008 terminal because I thought that the icewm icon qole created was launching from 0S2008. I did what you said about xpice, but how do I launch "debwm xfce wmxfce" on an icon like icewm ? Or if too complicated to explain in which terminal should I launch it ?
(because when I input "debwm xfce wmxfce" in a debian chroot terminal, it tells me command not found and when I launch it from a 0S2008 terminal the host window appears, sadly, debian and xfce do not follow :confused: ).
Maybe I should put something else too in the wmxfce ? I tried to replace "icewm-session" with "xfce-session" and "startxfce4" (the command to start xfce on a normal computer).

thank you all for the very quick reply to my previous post

note: with "startxfce4" in wmxfce, when I launch "debwm xfce wmxfce" in an OS2008 terminal, I get for a brief period a time a minimized black screen with the mouse in x form (like the first moments when x starts, I can move it) and it disapears to leave only the host window, I get the following in the 0S2008 terminal:
oups sorry forgot to paste the output

~ $ debwm xfce wmxfce

~ $ Setting up the chroot...

ls: /media/mmc2/debian*.img*: No such file or directory

using image file: /media/mmc1/debian.img.ext2

Using ext2 file system

.

..

...

mount: mounting /media/usb on /debian/media/usb failed

....

Everything set up, running chroot...

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6

_XSERVTransOpen: transport open failed for inet6/Nokia-N810-23-14:1

_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

/usr/bin/startxfce4: X server already running on display :1

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

xfce4-session: Unable to access file /home/user/.ICEauthority: Permission non accordée

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.


note: with xfce4-session it gives


~ $ debwm xfce wmxfce

~ $ Setting up the chroot...

ls: /media/mmc2/debian*.img*: No such file or directory

using image file: /media/mmc1/debian.img.ext2

Using ext2 file system

.

..

...

mount: mounting /media/usb on /debian/media/usb failed

....

Everything set up, running chroot...

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6

_XSERVTransOpen: transport open failed for inet6/Nokia-N810-23-14:1

_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

xfce4-session: Unable to access file /home/user/.ICEauthority: Permission non accordée

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

qole
2008-07-15, 19:10
I did what you said about xpice, but how do I launch "debwm xfce wmxfce" on an icon like icewm ? Or if too complicated to explain in which terminal should I launch it ?
(because when I input "debwm xfce wmxfce" in a debian chroot terminal, it tells me command not found and when I launch it from a 0S2008 terminal the host window appears, sadly, debian and xfce do not follow :confused: ).
Maybe I should put something else too in the wmxfce ? I tried to replace "icewm-session" with "xfce-session" and "startxfce4" (the command to start xfce on a normal computer)

First, I realized that fatalsaint's instructions need one little bit more to make things work smoothly. Find this line in your Debian script:

Xephyr :1 -br -screen 800x480x16 -dpi 96 parent `wmctrl -l | grep -i icewm | awk '{print $1}'` -ac &


This line starts the Xephyr nested X-Server. It looks for a host window titled "icewm" and then uses that window. So if you want to call your host window something else (like xfce4), you have to change the "icewm" in that line to "xfce4". Basically, you change "icewm" to whatever your first parameter of "debwm" is.

Now, the "debwm" command is in OS2008, so you have to run that from an OS2008 terminal, not a Debian chroot terminal. You can troubleshoot your Debian wmxfce script by opening two terminal windows, the standard osso-xterm window and Debian chroot terminal. In the osso-xterm window, enter:
openwindow.py xfce4
This will open the host window for xfce4.

Now, in the Debian chroot, you run wmxfce (make sure you've made the change above). If it doesn't work, or if it starts up in something other than the xfce4 host window, post the errors, and I'll help out.

When it all works, you can run this from a non-Debian OS2008 terminal or make a menu item to do this automagically:


debwm xfce4 wmxfce


EDIT: Just in case you didn't notice, I have a special affection for xfce4; I pestered JohnX about making it the default window manager for bootable Debian, and it was the first WM I got running using this method, see this post (http://www.internettablettalk.com/forums/showthread.php?p=186817#post186817) back on the first page.


http://farm3.static.flickr.com/2059/2532880923_4603f6b4d1.jpg (http://www.flickr.com/photos/qole2/2532880923/)

fatalsaint
2008-07-15, 19:41
I also forgot to add that you may need to chmod +x /usr/bin/wmxfce - shouldn't if it was copied from an executable; but it might be necessary as I haven't tried it in practical application on this yet...

To add an icon the panel you can do one of two things.. Install Personal Menu; go into the Control Panel; and edit "Personal Menu"..

The other thing is to copy the /usr/share/applications/hildon/debwm.desktop to something like /usr/share/applications/hildon/wmxfce.desktop .. Edit it; and change the Title and Commands to their respective ones.

ETA: I did some googling and I think the command is actually xfce4-session .. not xfce-session... so try that one inside of wmxfce..

fatalsaint
2008-07-15, 19:59
Qole - quick thought;
in your next edition/release.. any chance you could make debwm take 4 arguments, and change xpice to something more generic (startwm) and have it take 2 arguments..

debwm IceWM startwm IceWM icewm-session

this makes it dynamic.. your shortcuts and stuff will still launch iceWM by default.. but this makes it so users can simply add their own menu icon by running:

debwm xfce4 startwm xfce4 xfce4-session

The code would look something like this:


#/usr/bin/startwm
Xephyr :1 -br -screen 800x480x16 -dpi 96 parent `wmctrl -l | grep -i $1 | awk '{print $1}'` -ac &
....
su user -c 'export DISPLAY=:1; $2'


There might be a way to clean that up a bit .. obviously the first and third arguments need to be the same as they both represent the window managers title.. if there was some way to pass that title using just the first argument would be nice but I haven't tried any of this on my table.. i might do it while I'm bored here at work though..

fatalsaint
2008-07-15, 21:22
Ok.. it was a little harder than I originally thought...I added this to the beginning of xpice:


title=$1
wmanager=$2


Then there is 2 wmctrl lines that reference IceWM.. must replace both those lines with $title.. the Xepyr line becomes:

Xephyr :1 -br -screen 800x480x16 -dpi 96 parent `wmctrl -l | grep -i $title | awk '{print $1}'` -ac &


The launcher line becomes:


su user -c "export DISPLAY=:1; ${wmanager}"


And then in the debwm file..


#!/bin/sh
# $1 = display name
# $* = Debian Command

openhostwin.py $1 &
shift
sleep 5
sudo debian $* &



I don't know if you'd be even remotely interested in doing this.. but that's what I had to do to get it working. Then of course the changes to the launcher in the menu system in the post above. Makes it dynamic for the end user to launch their own WM.. however it obviously requires the end user to know things like the wm launcher command.. and to keep $1 and $3 of the debwm the same... so not sure if it's much better or not lol.

offensivebias
2008-07-15, 22:14
Xfce is the first you got working, that's right (forgot it). I couldn't get openwindow.py working, is it one of your other script ? (I quickly reread the thread but couldn't find it, I'm really not good at coming in the middle of a thread), I wasn't able to find it either with a <sudo find / -iname 'openwindow.py'> so it isn't in my system.

fatalsaint
2008-07-15, 22:26
Xfce is the first you got working, that's right (forgot it). I couldn't get openwindow.py working, is it one of your other script ? (I quickly reread the thread but couldn't find it, I'm really not good at coming in the middle of a thread), I wasn't able to find it either with a <sudo find / -iname 'openwindow.py'> so it isn't in my system.

From what you outputted to me in the above post.. I think it was working it was just failing to execute the right bin.. since it failed to execute it finished the script which kills the Xephyr window manager and takes you back to the white screen...

Change the wmxfce to execute xfce4-session instead of startxfce4..

Also change the two wmctrl lines that have IceWM in them to the name that you are passing to debwm.. then launch debwm the way you were doing it earlier from inside an OS2008 terminal..

debwm xfce4 wmxfce

qole
2008-07-15, 22:44
Xfce is the first you got working, that's right (forgot it). I couldn't get openwindow.py working, is it one of your other script ? (I quickly reread the thread but couldn't find it, I'm really not good at coming in the middle of a thread), I wasn't able to find it either with a <sudo find / -iname 'openwindow.py'> so it isn't in my system.

Sorry, as you can see from fatalsaint's posts, it is actually "openhostwin.py" :o

Also, fatalsaint, I don't understand why you don't just use the first parameter for the window title on "both sides"...


debwm IceWM xfce4 startwm xfce4-session


then, in debwm:

openhostwin.py $1 &
sleep 5
sudo debian $2 $1 $3 &

fatalsaint
2008-07-15, 22:47
Sorry, as you can see from fatalsaint's posts, it is actually "openhostwin.py" :o

Also, fatalsaint, I don't understand why you don't just use the first parameter for the window title on "both sides"...


debwm IceWM xfce4 startwm xfce4-session


then, in debwm:

openhostwin.py $1 &
sleep 5
sudo debian $2 $1 $3 &


AH.. I knew there'd be a way :o .. like i said in my very first post.. somehow using the 1st for both.. just didn't see a way off hand.. what you said should work fine.. I'll try it..

ETA: It worked beautifully... I like this way of doing it; extremely easy to boot into alternate WM's - tonight I am going to install Window Maker, Open Box, XFCE, and just make different icons in my Personal Menu to launch each different one.. Just to be able to launch one.. play around in it for a bit.. logout.. launch the next..

See if I can tell which one seems to run the smoothest :).

fatalsaint
2008-07-16, 04:56
Update if anyone cares:
I love the more dynamic method.. I now have a functional XFCE, OpenBox, Window Maker, and IceWM... all with their own Menu Launch buttons in Personal Menu. Only problems I experienced is OpenBox, with a lack of right click, is extremely difficult to work with.. and something is fubar'd that is causing Window Maker's configuration applet to seg fault when I try and change the mouse left click from Select Window, to open Application Menu... this worked fine when I did the manual chroot with untar'ing of the bootable debian.. so something in this new debian is disagreeing with wmaker. Wmaker still functions fine, and the keyboard page works great, so a simple map of Ctrl+A gives me my app menu.. not a show stopper for Wmaker.

IceWM and XFCE are, so far, flawless... and all of these I didn't have to make any changes to the scripts after the initial changes explained earlier.. just a simple apt-get install, and a Menu Creation away and you've got a new desktop waiting for you.

very cool.

Offensivebias - I can confirm that it is xfce4-session that will launch XFCE.

Qole - I did notice something funny.. the way you do the grep to find the window ID .. I named my window ID OpenBox; and also had MicroB open to a page that had OpenBox in the title.. So it maximized my Browser and tried using it :D :D.. Definitely need to use unique names in that..

offensivebias
2008-07-16, 06:44
Hello,

Thanks to you both, qole and fatalsaint, it looks like with your advices I almost have a working xfce!
I made two attempts, in the 1st I just changed the line qole told me to modify. In the second I also
changed "IceWM" to "xfce4" as fatalsaint told me. This is the output of the first attempt (I couldn't get the 2nd try output because the host window was maximized and I have to reboot my n810, so the output of the terminals are lost, sorry):

OS2008 terminal output

BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

~ $ openhostwin.py xfce4

Debian chroot terminal output

Setting up the chroot...

ls: /media/mmc2/debian*.img*: No such file or directory

using image file: /media/mmc1/debian.img.ext2

Using ext2 file system

.

..

...

mount: mounting /media/usb on /debian/media/usb failed

....

Everything set up, running chroot...

[root@Debian: /]nano /usr/bin/wmxfce

[root@Debian: /]wmxfce

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6

_XSERVTransOpen: transport open failed for inet6/Nokia-N810-23-14:1

_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

xfce4-session: Unable to access file /home/user/.ICEauthority: Permission non accordée

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

[root@Debian: /]Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

fatalsaint
2008-07-16, 16:15
yeah.. that all looks normal.. make a menu item to launch it and you'll never see it. You are just seeing all the font directories Xephyr's X server is trying to find, not finding them, and so it's skipping the directory.

As long as XFCE is loading - you're good.

qole
2008-07-16, 17:15
offensivebias, I'm not clear: is xfce4 loading? If not, what, exactly is happening instead? Are you seeing the black screen with the X cursor? If so, is it starting in the xfce4 window? Are you getting xfce4 to start?

Remember that you can hit the "home" key to get a menu of open apps, even if the xfce4 window is fullscreen.

Also, you probably ran xfce4 as root, and so you probably need to fix your permissions like so:


From the Debian chroot prompt:

chown user:users /home/user/.ICEauthority
chown user:users /home/user/.cache
chown user:users /home/user/.dbus/session-bus

offensivebias
2008-07-16, 19:53
No it still doesn't launch. I tried both of your solutions. Sorry, I'll explain more clearly than my last post. I was also able (thanks qole) to get the output of the terminals with the 2nd wmxfce configuration.

1st (qole's):
->the wmxfce file:

#!/bin/sh
export DISPLAY=:0
wmctrl -r IceWM -b toggle,fullscreen
Xephyr :1 -br -screen 800x480x16 -dpi 96 -parent `wmctrl -l | grep -i xfce4 | awk '{print $1}'` -ac &
sleep 3
su user -c 'export DISPLAY=:1; xfce4-session'
export DISPLAY=:0
killall Xephyr
wmctrl -r IceWM -b toggle,fullscreen

->OS2008 terminal output:

BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

~ $ openhostwin.py xfce4

->debian chroot terminal output:

chroot set up already!

Everything set up, running chroot...

[root@Debian: /]wmxfce

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6

_XSERVTransOpen: transport open failed for inet6/Nokia-N810-23-14:1

_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

xfce4-session: Unable to access file /home/user/.ICEauthority: Permission non accordée

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

[root@Debian: /]

->what I do and happens on the screen:
-I type in the OS2008 terminal "openhostwin.py xfce4"
-the host window is created
-I type in the debian chroot terminal "wmxfce"

2nd (fatalsaint's):
->the wmxfce file:

#!/bin/sh
export DISPLAY=:0
wmctrl -r xfce4 -b toggle,fullscreen
Xephyr :1 -br -screen 800x480x16 -dpi 96 -parent `wmctrl -l | grep -i xfce4 | awk '{print $1}'` -ac &
sleep 3
su user -c 'export DISPLAY=:1; xfce4-session'
export DISPLAY=:0
killall Xephyr
wmctrl -r IceWM -b toggle,fullscreen

->OS2008 terminal output:

BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

~ $ openhostwin.py xfce4

->debian chroot terminal output:

chroot set up already!

Everything set up, running chroot...

[root@Debian: /]wmxfce

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6

_XSERVTransOpen: transport open failed for inet6/Nokia-N810-23-14:1

_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

xfce4-session: Unable to access file /home/user/.ICEauthority: Permission non accordée

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

[root@Debian: /]

->what I do and happens on the screen:
-I type in the OS2008 terminal "openhostwin.py xfce4"
-the host window is created
-I type in the debian chroot terminal "wmxfce"
-the host window is put in front and maximized
-a fullscreen black screen with an x in the center briefly appears and disappears
-the maximized host window is seen again

fatalsaint
2008-07-16, 19:59
That second is the way it's supposed to be.. a big black screen with an X is the Xephyr X window.. for some reason or another your xfce4-session is not launching.

In the Debian terminal type in xfce and press tab twice.. see if you have an xfce4-session available.

(have you already run apt-get install xfce4??)

offensivebias
2008-07-16, 20:21
HIHAAAAAA IT WORKS!

qole:I did what you said about chown files in the "/home/user", in fact there was a bunch a files (even ".Xauthority" and the bash history file) who where root:root when I "ls -l -a"ed the repertory) and now it's slow, wrong keyboard, but IT WORKS ! :) :) :) :) I am so happy!

thank you so much guys!

qole
2008-07-16, 22:53
Hooray! Stupid permissions.

offensivebias
2008-07-17, 08:45
I am currently trying to make xfce4 lighter, if I am able to get it work faster I'll post how to.

my objective: only get the desktop, filemanager and panel launch.

offensivebias
2008-07-17, 15:38
I don't know if I was really able to make it quicker, but I definitely freed some RAM (there is only 128MB on the n810 so any 500k app is good to deactivate).

The first thing is to install sysv-rc-conf and disable as much services as possible, but remember, what I don't need could be very useful to you so be careful when you deactivate things.
for example, if you do not do some debug or are not on an island with nothing else to read, I think you can pretty safely disable all the log pregrams (bootlogd, klogd, ...), it didn't affect my debian at all. I also disabled avahi (I don't need to discover dudes to chat with or network printers when I a on a hotspot). If you don't know what a service is, don't disable it, check on the net (I always google in something like sysv-rc-conf <service name>) and if you think it is not needed, get rid of it.

The second thing I did loaded a little bit the RAM, but let you check its status and also the CPU, it is pretty similar to the applet qole put in his tarball for IceWM exept it's for XFCE, the name of the package is called "xfce4-systemload-plugin".

My third operation was to remove a bunch of stuff I didn't need on XFCE (splash screen, desktop management by XFCE (careful, it takes away the wallpaper and the icons), removed the theme and icon management packages (see http://www.xfce.org/documentation/4.2/userguide/xfce4-components to know what component you need or not).

The fourth thing is more kind of an advice, use light, and if possible, terminal based programs, I do that on my laptop, and it is really nice because you think it doesn't make a difference to launch cmus (a really cool command line music player) instead of Rythmbox or amarok, but as I replaced as much as I could bulky, heavy programs with lightweight command line apps (or light x programs if you can't do otherwise), my desktop became much more efficient. On my core 2 duo laptop it was not really the power and load time (it still has an small impact), but more that you get yourself more effective. The reason is, you look for a program that suits you, learn its command (that's the tough par where you need to leave the mouse in the cage :( ), but then, you become really quick. So I guess it can't hurt the n810 and other IT if you use light programs either :).

These are all advices from personal experience, some could be wrong so any comment would be appreciated to correct them.

fatalsaint
2008-07-17, 15:44
So... You turned XFCE into IceWM :D :D (kidding)...

Glad it's working faster for you.. I noticed how atrociously slow it was when I booted it and so I'm sticking with IceWM. Window Maker runs about as fast as IceWM but I'm not a fan of Window Maker's interface.

offensivebias
2008-07-18, 07:44
Yeah, basically that's what I did. :) Faster ? Well it went from very slow to slow so... lol. :D
Anyway, a friend of mine noticed something, when you type mount in the chroot environment, there is no /media/mmc(1/2) output, but they are both accessible (so they are mounted). Just a detail but maybe qole could include in the next version of his script something that copies the fstab of maemo in the debian one ? Is it feasable ? (I don't know much about scripting)

Benson
2008-07-18, 15:53
You would want mtab, not fstab, but mounting is always weird with chrooting. You could conceivably fix it temporarily, but it'll get all de-synced as soon as you mount or umount anything.

offensivebias
2008-07-20, 11:08
Ah, ok, was just a suggestion. Thanks for the intel.

qole
2008-07-20, 18:05
Darken, I've been trying to get tslib working in Debian, but running ts_test returns the error:


/dev/touchscreen/ucb1x00: No such file or directory


Where is the tslib config file? It seems to need to be pointed somewhere else, like maybe /dev/input/event3 ...

Also, the Xephyr tutorials suggest using evdev with Xephyr for mouse support. Also, I wonder if Xephyr needs a valid xorg.conf file with correct input device configuration?

Perhaps the problem is that Xomap isn't passing all of the touchscreen information to Xephyr, since that's what's happening, the host X server receives the events and then passes them to the nested server...

Darken
2008-07-20, 18:29
Propably /etc/ts.conf

and magic is here: export TSLIB_TSDEVICE=/dev/input/event3 :))

It works even I did not enter -mouse parameter

qole
2008-07-21, 01:19
So you DID get it working with Xephyr?

I was just going to post that you seem to need some env. variables, as they say here (http://www.opentom.org/Tslib).

EDIT: we should probably use this one too (copy the file from maemo first)

export TSLIB_CALIBFILE=/etc/pointercal


I also copied pressure.so from maemo's /usr/lib/ts/plugins to Debian's /usr/lib/ts and then loaded it in the /etc/ts.conf like maemo does.

ts_test reports success, I will try with mtpaint in Icewm now...

EDIT2: Abiword tap-and-hold right-click works, tablet pressure in mtpaint doesn't. I gotta fiddle with the tslib drivers some more I guess...

Darken
2008-07-21, 01:42
Yes, after configuring libts I did

Anyway, can Xephyr do something, what Xomap can't? From user point of view, it's absolutely same.

Who is developer of Xomap? I would like to find out, why I can't switch between DISPLAYs. Xomap should be based on kdrive, and Kdrive has this feature some time ago.

Benson
2008-07-21, 03:15
I think you're assuming :0 is on VT #7, but I don't think that's probably true. For experimentation, at least, use chvt. There's a working binary of that around somewhere, and it's certainly available in the chroot... And if the problem is that Xomap still doesn't work, it could be the best solution.

qole
2008-07-21, 03:51
Update: the 'module_raw input' in /etc/ts.conf causes ts_test to hang the system.

Trying to find a module_raw that works...

Darken
2008-07-21, 07:38
I think you're assuming :0 is on VT #7, but I don't think that's probably true. For experimentation, at least, use chvt. There's a working binary of that around somewhere, and it's certainly available in the chroot... And if the problem is that Xomap still doesn't work, it could be the best solution.

You are right. I also tried mapping to VT 2 and VT3 before. But even when I sending this signal, Xomap ignores it. Thank you for telling me about chvt, I didn't know this tool. chvt 2 and chvt3 can really move among two independent Xomap instantion (on :0 and :1)

Darken
2008-07-21, 07:57
I created new bug in maemo bugzilla https://bugs.maemo.org/show_bug.cgi?id=3474

qole
2008-07-21, 20:52
While I am very interested to see if Darken can get two Xomap instances running with some kind of switching mechanism, I still haven't given up on Xephyr (it is just so slick to be able to give your secondary X-server an icon in the primary X-server)...

So, I want to try to get pressure working.

As far as I know, Xephyr is an xorg x-server, which means it should respect the xorg x-server configuration.

I found and installed the xserver-xorg-input-tslib (http://packages.debian.org/sid/xserver-xorg-input-tslib) package in Debian, and I added an input item to my /etc/X11/xorg.conf file:

Section "InputDevice"
Identifier "TSC2301 touchscreen"
Driver "tslib"
Option "Device" "/dev/input/event3"
EndSection


I need to figure out:
how to properly set up the xorg.conf file to use the tslib touchscreen
how to get Xephyr to respect the xorg.conf file


I can't ask the bootable Debian guys for any of these config files, since you have to use the Xomap server.

Does anyone know where I can look at a working xorg xserver setup with a tslib touchscreen? I'm sure I'm just forgetting to add a section to the xorg.conf or a couple of X-related environment variables, or something straightforward like that.

Benson
2008-07-21, 21:20
Xephyr is based on kdrive, not xfree/xorg... I don't think it can use xorg.conf.

Benson
2008-07-21, 22:02
While I am very interested to see if Darken can get two Xomap instances running with some kind of switching mechanism, I still haven't given up on Xephyr (it is just so slick to be able to give your secondary X-server an icon in the primary X-server)...

Well... that's not necessarily the only option, as you could rig up a window that, when deiconified, runs chvt 3, and promptly reiconifies itself; the only finicky part is ensuring you can get back from :1 equally well. If we're able to get this VT-swapping slickly and smoothly working, it could be helpful for, e.g. KDE, as well as for chroot stuff.

I'm gonna put some effort into fiddling with multi-VC options, though I'm perfectly content using osso-statusbar-cpu to hop back and forth. (Actually, probably using osso-statusbar-cpu to hop forth, and fvwm2-buttons to hop back, to be pedantic.)

BTW, wondering about your status on several counts: What's your current view on on-screen keyboards? I think you'd said you were ditching matchbox; what are you planning for the replacement? (I'm getting a little irritated with it...)
How close is Bundyo-Build to release? And how different is the Debian script? (I'm working on some changes to it, and was going to send it to you once I'm satisfied, but if you're near a new release, and that's changed much, I'd like to compare with it...)

qole
2008-07-21, 22:45
If we're able to get this VT-swapping slickly and smoothly working, it could be helpful for, e.g. KDE, as well as for chroot stuff... I'm gonna put some effort into fiddling with multi-VC options...

I am very excited by this, and will be very eager to hear your discoveries. I will continue to mess about with Xephyr in the meantime...

What's your current view on on-screen keyboards? I think you'd said you were ditching matchbox; what are you planning for the replacement? (I'm getting a little irritated with it...)

It is Debian xvkbd that is irritating me. matchbox-keyboard has problems, too, like being super-tiny, weird resizing issues, and hiding half the screen in OS2008, but it's the best one I've found in Debian.

How close is Bundyo-Build to release? And how different is the Debian script? (I'm working on some changes to it, and was going to send it to you once I'm satisfied, but if you're near a new release, and that's changed much, I'd like to compare with it...)

I was going to release it in the next couple of days, but it was going to be a very basic bugfix release (clean up things like clock/timezone, image file location, etc), with Bundyo's window opener being the major enhancement. I would be very interested in using a real programmer's script; I have little formal CS training, and my amateurish scripts show it... quite painfully. So, please, let's collaborate!!

Benson
2008-07-21, 22:50
Hmmm... That's too bad. It seems matchbox-keyboard only goes to display :0, no matter what. Which is pretty broken, if you're trying to use it with non-hildonized apps in :1, and leave :0 mainly stock. I was hoping you'd found something all-round better.

I'll be tossing a scriptful tarball up here momentarily...

qole
2008-07-21, 22:55
Hey all,

My research into Xephyr and xorg stuff has led me to xinit, a much more elegant way to start an X-server and window manager. This led me to improve the /usr/bin/xpice script.

Here is my current script, with the tslib and gtk stylus stuff in it as well.

EDIT: improved wmctrl use by getting Window ID first, also added the two WM variables.

Debian /usr/bin/xpice

#!/bin/sh
##################################
#Change these two variables to the WM of your choice.
export WMNAME="IceWM"
export WMEXEC="icewm-session"
##################################
export DISPLAY=:0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/etc/pointercal
export GTK_MODULES=libgtkstylus.so
export PARWIN=`wmctrl -l | grep -i $WMNAME | awk '{print $1}'`
wmctrl -i -r $PARWIN -b toggle,fullscreen
xinit /bin/su user -c 'export DISPLAY=:1; $WMEXEC' -- /usr/bin/Xephyr :1 -br -screen 800x480x16 -dpi 96 -parent $PARWIN +kb -ac
export DISPLAY=:0


The first and last lines (export DISPLAY) are probably completely redundant.

qole
2008-07-21, 23:03
Hmmm... That's too bad. It seems matchbox-keyboard only goes to display :0, no matter what. Which is pretty broken, if you're trying to use it with non-hildonized apps in :1, and leave :0 mainly stock. I was hoping you'd found something all-round better.

That has NOT been my experience. Here's a screenshot of Debian matchbox-keyboard running in IceWM on display :1

http://farm4.static.flickr.com/3106/2653297869_e5433e4413_o.png (http://flickr.com/photos/qole2/2653297869/)

Benson
2008-07-21, 23:51
Well, I think that was a case of operator error; somewhere in my chrooting setup I'm stomping on DISPLAY... :o

But xvkbd is looking quite nice to me (once I figured out it was going to :0 too, and fixed that).


EDIT:

(Attachment from N800 arrived.)

Some of these scripts aren't directly relevant; there's one in there to set the mouse to rightclick for the next five seconds, for example. There's three (matchboxwm and fvmb/mbfv) for switching window managers. I haven't actually ripped your xpice yet anyway, nor installed icewm, as I'm looking at getting (native) fvwm as my principal alternate wm.

Important things are chiefly the debian script, and some stuff in /debian/etc/bootchroot and /debian/root/bin/ for tracking state of chroot vs. boot config files. I'm not sure these are needed though; I think a harmonized config can exist that's the same for booting Debian and Diablo.

I did realize that I left out the config file (/etc/debchroot.conf) that debian now reads; it's reproduced here:#Config for Debian chroot
export IMGFILE=/dev/mmcblk0p2
export IMGFS=ext3
In the absence of that file, it carries on with your existing autoconfig for loopback images; if that does exist, however, and defines IMGFILE, it detects whether it's a regular file (loopback image) or block special file (boot partition) and mounts accordingly. I also fixed a bug or two (ext3 wasn't loading all modules, for one), and made a couple tweaks here and there. There's more work that can be done, clearly, but I think it's decently tidy now.

If you like it as it stands, and don't feel too strongly about particular indentation styles, I'd kind of like to reformat it and resubmit that (after I finish making a couple more functional changes...). I find the indentation style you were using difficult to follow, but I stuck with it for easy merging of changes. If you prefer what you were doing, that's fine too.

qole
2008-07-22, 03:03
But xvkbd is looking quite nice to me...

I have been having some serious problems with xvkbd crashing due to focus problems in IceWM.

I haven't actually ripped your xpice yet anyway...

See my post above for the full xpice script. I think it is working very well now.

I did realize that I left out the config file (/etc/debchroot.conf) that debian now reads...

...What do you think about making the config file a user-editable file in the /home/user folder? (/home/user/.chroot maybe?)

If you like it as it stands, and don't feel too strongly about particular indentation styles, I'd kind of like to reformat it and resubmit that (after I finish making a couple more functional changes...). I find the indentation style you were using difficult to follow, but I stuck with it for easy merging of changes. If you prefer what you were doing, that's fine too.

Please see above for my disclaimers about lack of formal CS education. Indent as you please, but, also, please comment fully.

I will wait for your version 2 (reformatted).

I will be away from the Internet for two or three days, starting tomorrow...

Benson
2008-07-22, 16:09
OK, for the benefit of anyone else reading (and curious what script changes will show up in Bundyo-Build), and even the Qole himself, should he inadvertently stumble into a lost pocket of civilization with a convergently-evolved wifi standard. :D (And also to remind me what I said I'd do... ;))

chroot
All scripts will be reformatted (indentation styles are one of the classic flamewar causes, so I'll take the liberty to proclaim they'll be reformatted properly!).

It'll also include an updated version of xpice, again reformatted.
I'll try to ensure they are well commented throughout, though that's never been my strong point.

Config will be in /home/use/.chroot, and will (likely) involve options for xpice, as well. Maybe (up to Qole) xpice will be renamed something else, and be easily changeable for different window managers; even if so, default behavior (in the absence of a config file, or with the shipped config file, if any) will be the same.

FVWM/multi-Xomap
Separately, and if Darken doesn't beat me to it, I may be releasing an independent script-up for running a second N+1th Xomap on a second N+1th VC, and using native FVWM (with an N800-friendly config) on it. (If Darken beats me with the release, I'll just sit back and gripe about his... :D)

This is a separate project with no chroot required, more like PB's KDE, but much less ambitious. It does provide a dandy place to run some chroot apps, though, hence its mention here.

FVWM, BTW, also has a set of impressive capabilities for small-screen work; any window may be scrollbarred by the WM, for instance, and you can set up virtual desktops larger than the screen, as well as normal independent desktops. I haven't been using IceWM, so I don't know how much it can do, but I suspect with a proper config FVWM2 will be better for most power users.

Other benefits, while I'm bragging, include full-screen resolution (rather than windowed) (EDIT: Guess I'm wrong here; Xephyr is running fullscreen in Qole's screenshot above.) and somewhat improved efficiency from direct-to-FB rendering (although that shouldn't be much different) and finally no impact from matchbox/hildon grabbing keys, popping notifications up, etc...

geneven
2008-07-23, 09:06
I'm not particularly up to this techie thread, but I do want to put my vote in for Fluxbox as an alternate window manager -- it seems to be popular, and I have reluctantly started abandoning Window Maker in favor of Fluxbox. What I love about Window Maker is the ease of docking applications -- you can basically just move an application over to the dock, and that's that, permanently.

But Fluxbox has a "slit" that is not quite as easy, but is usable -- and it takes up less screen real estate, which would be important on a tablet. There are of course a lot of different "boxes", but I don't have much experience with them. I see that "openbox" actually exists among my installable applications, but I don't know how to use it. I use Fluxbox with an application called wmdrawer, which I learned about in Window Maker, but it's even more useful in Fluxbox. You click it and, accordian-like, a menu of programs scoots out for you to select from. This and things like auto-hide would be great on a tablet, it seems. Unfortunately, from some points of view, setting up Fluxbox properly is a very command-line intensive sort of operation, until you set it up to avoid that. But it is fast, flexible, and frugal with system resources, which is the key to its popularity.

Stskeeps
2008-07-23, 09:23
Well, there's one thing I've been wondering about, - The Debian chroot project(s) and patches have same problems as the bootable Debian for tablets - that we distribute around big tar.gzs (which we don't do anymore) and such and add patches manually and stuff.

If any of you are interested in using my installer (which allows partioning, mkfs, debootstraps and installs packages on top) from http://trac.tspre.org/projects/nit-debian and maybe have a joint project regarding Debian on tablets (both boot and chroot).

Since we would probably share many of the same user interface packages to get things working under Xomap/on the tablet etc, I'd be more than interested to create support in installer for a chroot install.

I also have packages generating specific environments, and installer supporting installation goals so people could have nit-env-fluxbox, nit-env-xfce4, or, nit-env-theirown.

If any interest exists for this, I'm always up for discussion in private messages here (or on this thread), or on #maemo on IRC :)

The installer is already quite configurable and the base package system is quite easy to work with, so it would be possible to have different configs for chroot Debian and bootable Debians.

Benson
2008-07-23, 16:17
EDIT: Note: I've only skimmed your project's SVN, so I could be understanding some of it wrong...

Well, there's one thing I've been wondering about, - The Debian chroot project(s) and patches have same problems as the bootable Debian for tablets - that we distribute around big tar.gzs (which we don't do anymore) and such and add patches manually and stuff.

If any of you are interested in using my installer (which allows partioning, mkfs, debootstraps and installs packages on top) from http://trac.tspre.org/projects/nit-debian and maybe have a joint project regarding Debian on tablets (both boot and chroot).To me, that's the way this ought to be installed, long-term; the installation/filesystem image side, though, belongs to the vacationing Qole. While I'm reluctant to speak for him (and even more reluctant to search his old posts ;)), I think he's expressed interest in going with your install system. I'm not sure if a merge before the upcoming release is feasible timewise, so we'll definitely have to wait to hear on that. I'm optimistic, though.

Since we would probably share many of the same user interface packages to get things working under Xomap/on the tablet etc, I'd be more than interested to create support in installer for a chroot install.
Sounds good. I'll have scripts ready for Qole by tomorrow, and those scripts are most of the Maemo-side stuff. Seems like that can be packaged up as a .deb, which gets installed through your installer.

I also have packages generating specific environments, and installer supporting installation goals so people could have nit-env-fluxbox, nit-env-xfce4, or, nit-env-theirown.

If any interest exists for this, I'm always up for discussion in private messages here (or on this thread), or on #maemo on IRC :)
For now, at least, this thread's the natural place, so Qole can catch up after his return.

The installer is already quite configurable and the base package system is quite easy to work with, so it would be possible to have different configs for chroot Debian and bootable Debians.
That's one thing I hope we can avoid; I think it's possible to align the systems sufficiently that the same install works for both chroot and boot purposes.

So far (in my understanding; I've not actually used Qole's image yet), the only thing that needs to be done (on the Debian side) is to add one package depending on Xephyr and containing an improved xpice-like system for starting the X server in the correct window; probably using Xsession, instead of hardcoding one WM. (Technically, that's not even a fundamental requirement, as we're capable of running multiple Xomap instances, or even running chroot apps in :0, with matchbox...)

That doesn't interfere with anything for booting. The only conflicts I've seen are /etc/passwd stuff, which can be harmonized by keeping the same username/UID pairs in both systems. Do you know of other issues that would force boot and chroot to be separate?

I'd hope we can get it just to one extra package to be installed Maemo side, which provides generic chroot-to-debian capability, and optional packages on each side to provide some sort of X server + WM capability...

fatalsaint
2008-07-23, 16:30
I have the current bootable Debian working fine under qole's script after apt-get install xserver-xephyr wmctrl .. modified his latest debian script since it wants to use his image file and not directory path.. but it all runs fine and I have IceWM launching using the C compiled host2win app here ('http://www.internettablettalk.com/forums/showthread.php?t=21809').

Seems to work just fine... I don't copy over the passwd/group files, and I don't mount over my user directory.. I'm not sure why Qole did.. the user account UID/GID seem the same on both so permissions should be fine.. but the mpd user and the /home/user/music folder is required by the mpd app.. so if I leave them alone I have experienced no issues.. and even started mpd in IceWM chrooted and listened to music beautifully...

I prefer it this way to Qole's image because I can opt to boot to it if I want.. or for when I don't want to put up with my wireless problems I just boot into Diablo and Chroot in.. Absolutely love it.

ETA: Hah.. I had my device in Offline Mode in Maemo chrooted to IceWM.. went to maemo and /etc/init.d/btcond stop, and in IceWM /etc/init.d/bluetooth restart .. and I got bluetooth switched from maemo to the debian side lol. Not extremely useful.. but still cool; have bluetooth in offline mode with wireless still totally disabled. (course any battery saved would be killed by the chroot environment.. hah.)

Stskeeps
2008-07-23, 17:44
After reading through 24 pages of Debian chroot posts.., just a summary and some questions / various coherent and incoherent stuff

"In-maemo" packages/editings:

* 'Debbie script'/Hilda etc that executes command in chroot (and mounts if needed), no X session needed, and views in maemo Xserver
* Methods for starting full debian X session, like /etc/init.d/chroot-start-xephyr-xsession is a way to do

* Application .desktop files that runs the debbie/chroot script for easy access, using matchbox as WM (maemo's)
* Maybe matchbox movable windows hack & sudo tricks

- My installer can download and dpkg -i stuff that's needed to support this through easy configuration

Ways of storing installation image:
* ext2/ext3 image files
* tar zxf onto a partition (johnx's beta3)

I'm personally not fond of image files but I guess they're good enough when there's no partitioner (which we do have in NIT-Debian).
Or for scenarios where we have a "easy debian" deb (that would bootstrap the system and set default settings?) - but I haven't seen "bootable" ext2/3 images?

X-server possibilities:

Straight to OS2008 X display.. (chroot run)
Xephyr (ability to have in a Maemo WM window, both fullscreen and not?)
VNC method (slow..?)
Xserver-omap on another virtual console (enabling switch between Maemo and Debian in both user interfaces through chvt?)
- does this have performance penalty?
- advantages of this would be similar scripts for boot and chroot for starting X session? (see http://trac.tspre.org/projects/nit-debian/browser/trunk/nit-base-packages/x-session/etc/init.d/x-session).
- I do all the GTKSTYLUS etc tricks in Xsession instead, but I guess that also means that the goal is a X session, not just a debian app with target on Maemo X display..


Maemo-Debian interaction, /etc/group, /etc/users..:

Just viewing differences of those between maemo and my setup..
for the sake of the tablet-user (which i have a package creating), there's nothing saying that we can't have the useradd command
set a specific UID/GID (29999/29999) for the user when adding. Is there any other technical reason why they should be shared?

DBUS communication? What issues are there with communicating with in-Maemo hald/dbus from Debian?

Maemo-Debian UI interaction - scripts that "make life easier" when in chroot such as switch back to OS2008, etc.
I guess it would be possible to detect if we booted or we chrooted, either through environment variables or other things,
so we could have a package adding different tricks for UI interaction with Maemo, that just doesn't
initialize in booted Debian (and maybe some that doesnt activate in chrooted Debian either).

Besides some of the observations given in this, I see no reason whatsoever that chroot and boot version can't be two sides of the same thing
- and maybe even that the installer sets up chroot initially but user can also choose to dual-boot and boot into the same Debian session.


In any case, it could be interesting to combine the creativity of the chroot people and the booting people to give a better user experience, instead
of two groups working on exact same thing..

Benson
2008-07-23, 18:47
One thing to note: while I'm editing/rewriting some scripts for qole, this is definitely his project, and I'm using a strange hybrid of it and Beta3; when he gets back, it may be revealed that I completely goofed some of my understanding on these issues...
After reading through 24 pages of Debian chroot posts.., just a summary and some questions / various coherent and incoherent stuff

"In-maemo" packages/editings:

* 'Debbie script'/Hilda etc that executes command in chroot (and mounts if needed), no X session needed, and views in maemo Xserver
* Methods for starting full debian X session, like /etc/init.d/chroot-start-xephyr-xsession is a way to do

* Application .desktop files that runs the debbie/chroot script for easy access, using matchbox as WM (maemo's)
* Maybe matchbox movable windows hack & sudo tricks

- My installer can download and dpkg -i stuff that's needed to support this through easy configuration

Ways of storing installation image:
* ext2/ext3 image files
* tar zxf onto a partition (johnx's beta3)

I'm personally not fond of image files but I guess they're good enough when there's no partitioner (which we do have in NIT-Debian).
Or for scenarios where we have a "easy debian" deb (that would bootstrap the system and set default settings?) - but I haven't seen "bootable" ext2/3 images?
AFAICT image files are only used for chrooting; it's possible, I think, to boot from an image file, but makes little sense. The one thing that is gained is the ability to resize to minimize disk usage, without repartitioning, but I don't see repartitioning as all that evil. In either case, resize2fs is needed.

X-server possibilities:

Straight to OS2008 X display.. (chroot run)
Xephyr (ability to have in a Maemo WM window, both fullscreen and not?)
VNC method (slow..?)
Xserver-omap on another virtual console (enabling switch between Maemo and Debian in both user interfaces through chvt?)
- does this have performance penalty?
- advantages of this would be similar scripts for boot and chroot for starting X session? (see http://trac.tspre.org/projects/nit-debian/browser/trunk/nit-base-packages/x-session/etc/init.d/x-session).
- I do all the GTKSTYLUS etc tricks in Xsession instead, but I guess that also means that the goal is a X session, not just a debian app with target on Maemo X display..

VNC is slow; Xephyr's definitely the way to go for nested access.

I'm pretty sure there's no performance penalty for 2nd Xomap; no benchmarks, though. Correct that chvt is needed to switch, and at present seems the only way. (I'm running this right now.)

It has the advantage of being completely independent of the chroot, and also completely useful outside the chroot; I've already got plans to work on this as a separate project, designed to work cleanly with or without chroot, with the plan to get it in extras-devel. (And thence to extras, eventually.)

It probably also benefits from similarity with Xsisusb startup, at some point...

Actually, just realized this can be accomplished two ways. What I'm doing is running Maemo FVWM2 in Maemo Xomap, and using this all-Maemo X session to run individual chroot (and Maemo) apps. But you could also chroot to Debian and launch a new Debian Xomap, and a Debian WM... Interesting.

Actually, maybe (Debian? or not?) [xg]dm is the answer? At least gdm, I know, can be used to spawn new X servers on an as-desired basis. It should be possible to use that directly on boot, and also through chroot (or also run a Maemo ?dm for chroot use)... Just thinking out loud, I'm not sure on the details.

(Also, I hadn't even got to figuring out where the gtkstylus setting was done, so it's presently not implemented in chroot on mine. Thanks for that info!)

Maemo-Debian interaction, /etc/group, /etc/users..:

Just viewing differences of those between maemo and my setup..
for the sake of the tablet-user (which i have a package creating), there's nothing saying that we can't have the useradd command
set a specific UID/GID (29999/29999) for the user when adding. Is there any other technical reason why they should be shared?
Well, in my case, at least, any user or group owning files on my SD's first partition (for general purpose storage and data transfer) must be the same, because I'm running ext3 there. Mainly those are user.users, but it's safe to keep them the same. Beyond that, I'm not sure of any other reasons. (Honestly, I should check that they are the same; I inadvertently wiped my boot /etc/passwd with the chroot version, but so far everything works.)

DBUS communication? What issues are there with communicating with in-Maemo hald/dbus from Debian?That's one for Qole, as I'm not doing it the same way.

Maemo-Debian UI interaction - scripts that "make life easier" when in chroot such as switch back to OS2008, etc.
I guess it would be possible to detect if we booted or we chrooted, either through environment variables or other things,
so we could have a package adding different tricks for UI interaction with Maemo, that just doesn't
initialize in booted Debian (and maybe some that doesnt activate in chrooted Debian either). I had some effort at this for keeping separate passwd,group, etc., but was hoping to ditch it. The way I was trying to keep things straight did not work well, and needs some rethinking.

Besides some of the observations given in this, I see no reason whatsoever that chroot and boot version can't be two sides of the same thing
- and maybe even that the installer sets up chroot initially but user can also choose to dual-boot and boot into the same Debian session.Possibly; I think having both set up is the most generally useful scenario, if we can pull it.

In any case, it could be interesting to combine the creativity of the chroot people and the booting people to give a better user experience, instead
of two groups working on exact same thing..
Absolutely; I think we'll come out ahead if these projects can be merged.

fatalsaint
2008-07-23, 19:05
On Maemo:

# cat /etc/passwd
user:!:29999:29999::/home/user:/bin/sh


On Debian:

# cat /etc/passwd
user:x:29999:29999::/home/user:/bin/sh


The important thing is the 29999.. the user account permissions will work same without copying the maemo passwd file over the debian passwd file. Most other maemo users appear to have the same UID/GID as well.. It also appears the Maemo passwd file has not been shadowed <booooooooooo!>. That shouldn't make a difference one way or the other.. the UID/GID are the important ones and all the ones I'm seeing where they are the same, are the same.

Well.. except messagebus and haldaemon...

Benson
2008-07-23, 19:23
It also appears the Maemo passwd file has not been shadowed <booooooooooo!>. That shouldn't make a difference one way or the other.
Especially since none of the accounts have passwords... ;)

fatalsaint
2008-07-23, 19:25
Yeah but still... i set a root password and there it is in silly encrypted old-style passwd form instead of where it should be, in shadow :D

They may not come with passwords out of the box.. but they come with the ability to set them.. should have shadowed the empty password file :D

Benson
2008-07-23, 19:36
Well, don't use passwords. Real men use public-key authentication. :p

psykosis
2008-07-25, 13:36
While I could find methods on the board to make a "switch" key to allow for toggling between right click and left click, I had not found a direct way to make a simple "press a button and touch for right click" that is more transparent, however I have found a solution that seems to be working great, at least for my Enlightenment environment, however I am fairly confident it would work under IceWM, etc.


Install xbindkeys (as root)apt-get install xbindkeys
Edit the .xbinkeysrc file (as user) vi ~/.xbindkeysrc
Add these lines to .xbindkeysrc

"r-mouse"
F8
"l-mouse"
release + F8

Create the r-mouse and l-mouse scripts As root, create a /usr/bin/r-mouse file that contains:

#!/bin/sh
/usr/bin/xmodmap -e "pointer = 1 2 3"
and as root, create a /usr/bin/l-mouse file that contains:

#!/bin/sh
/usr/bin/xmodmap -e "pointer = 3 2 1"
Make these scripts executable: As root:

chmod a+x /usr/bin/l-mouse
chmod a+x /usr/bin/r-mouse
Run xbindkeys: as user, run xbindkeys and then while your holding F8 (aka the "-" key on the n800), and touches should be a right click.


On an semi-related note, I tried modifying the program that was a solution to the right click issue on the Zaurus, however it appears to have some issues (I could only, depending how I set it up, have the right clicks register for windows or for the desktop, not both). If anyone wants to play with it, here is the binary (http://nit.psykosis.net/mousec) and source (http://nit.psykosis.net/mousec.cpp). The program takes two arguments:
cmouse [Button] [State] where Button = 1(left), 2(middle), 3(right) and State = 0(Release), 1(Press), and 2(Press and Release)

qole
2008-07-25, 18:36
Benson, can you please get me your correctly formatted chroot script asap? I want to post my Bundyo-Benson-Build this weekend. All I'm aiming for in this release is a clean-up of the maemo side; updating the chroot side will require a lot more work and some clever scripting...

qole
2008-07-25, 21:59
@ Stskeeps:

I do believe there should be two projects, or at least two sub-versions of a single project.

I don't think it needs to be divided along the chroot / boot line, however; nor does it need to be divided along any other technical line, like where you put your rootfs (image file, bootable partition, directory in a big bootable maemo partition, etc).

The "Tablet Debian" project needs to have two sub-projects:

Advanced users (both bootable and chroot)
Plug-and-play / Easy set-up (probably chroot / multi-WM via xomap or Xephyr)


My interest, as you may have noticed, is the plug-and-play flavour.

The highest priority in this is to ensure that it "just works." Someone with no Linux background can buy a tablet at Best Buy, come home and set it up, get the hang of OS2008, then install Debian within the hour. All technical aspects are servants of that goal. The most important question to ask when working on this project is, "will this make things easier?"

There should never be a point when the user has to touch the command line. Every choice should have a gui menu. Also, the impact on the existing OS2008 should be as small as possible. Don't install anything that isn't absolutely necessary. The project should have as few maemo dependencies as possible (preferably none), and it should be dead-simple to uninstall.

Also, since new users have higher expectations, we should focus on speed and optimization of applications.

The advanced user flavour is also important, but the priorities are different:

making sure things are very flexible (I want to boot and chroot to my Debian rootfs... in fact, I want to be able to choose which of my three Debians I want to mount and use!),
menu-driven gui is not necessary here, the user should know how to edit a config file and apt-get install from the root prompt, etc. Of course, good clear instructions are always important.
making sure that we have access to advanced features of Debian (sshd, cupsd, wireless, bluetooth, etc)
installing as little as possible "out of the box"; the user should start with a basic debootstrap rootfs, then they can add "layers", such as "(1) make bootable," and "(2) add xfce4 window manager"
backwards compatibility with plug-and-play Debian; users can install plug-and-play and then, when they're ready, "upgrade" their rootfs to the advanced flavour

Benson
2008-07-26, 01:31
Well, here it comes...

debian
Reads configuration from ~/.chroot; all defaults are the same.
Since hilda is now obsolete (see below) it now drops a file in /debian/tmp/ to mark chroot ready; this is actually more robust, as cancelling after the filesystem is mounted won't leave it persuaded everything's cool.
The mount point may be changed from the default of /debian

debbie:
debbie with no arguments now drops you to a non-privileged chrooted shell.
hilda is now obsolete; debbie now passes su through to debian, as needed for above; eliminating one Debian-side script is a nice side-benefit.)
DISPLAY is preserved, if it exists. (I think it should always be set, normally to :0.0, but not sure.) Good for multi-Xomap, USB-VGA, or otherwise multi-X-server configs, with no change for standard config.
User to drop to is now configurable; defaults to user, of course, but can be set...
Reads the same ~/.chroot as debian

.chroot
Example config with defaults documented in comments.

Overall comments: Changed a lot of things that were set as environment variables (export FOO=bar) are now shell variables (FOO=bar); indentation is changed to "correct" :p style, efforts to safely quote things to prevent complete breakage in the event of empty or space-containing definitions...

EDIT: Updated tar. All better now, sorry about that.

debernardis
2008-07-26, 08:07
Benson, could you control your tar file please? sbin/debian appears damaged.