maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   [Debian] Running Debian in a chroot (https://talk.maemo.org/showthread.php?t=20342)

fatalsaint 2008-07-15 22:26

Re: Running Debian in a chroot
 
Quote:

Originally Posted by offensivebias (Post 203357)
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

Re: Running Debian in a chroot
 
Quote:

Originally Posted by offensivebias (Post 203357)
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"...

Code:

debwm IceWM xfce4 startwm xfce4-session
then, in debwm:
Code:

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


fatalsaint 2008-07-15 22:47

Re: Running Debian in a chroot
 
Quote:

Originally Posted by qole (Post 203372)
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"...

Code:

debwm IceWM xfce4 startwm xfce4-session
then, in debwm:
Code:

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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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
Code:

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
Code:

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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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:
Code:

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

Re: Running Debian in a chroot
 
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:
Code:

#!/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:
Code:

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:
Code:

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:
Code:

#!/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:
Code:

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:
Code:

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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
Hooray! Stupid permissions.

offensivebias 2008-07-17 08:45

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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....ce4-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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
Ah, ok, was just a suggestion. Thanks for the intel.

qole 2008-07-20 18:05

Re: Running Debian in a chroot
 
Darken, I've been trying to get tslib working in Debian, but running ts_test returns the error:

Code:

/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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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.

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

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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
Quote:

Originally Posted by Benson (Post 205315)
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

Re: Running Debian in a chroot
 
I created new bug in maemo bugzilla https://bugs.maemo.org/show_bug.cgi?id=3474

qole 2008-07-21 20:52

Re: Running Debian in a chroot
 
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 package in Debian, and I added an input item to my /etc/X11/xorg.conf file:
Code:

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

I need to figure out:
  1. how to properly set up the xorg.conf file to use the tslib touchscreen
  2. 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

Re: Running Debian in a chroot
 
Xephyr is based on kdrive, not xfree/xorg... I don't think it can use xorg.conf.

Benson 2008-07-21 22:02

Re: Running Debian in a chroot
 
Quote:

Originally Posted by qole (Post 205590)
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

Re: Running Debian in a chroot
 
Quote:

Originally Posted by Benson (Post 205627)
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...

Quote:

Originally Posted by Benson (Post 205627)
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.

Quote:

Originally Posted by Benson (Post 205627)
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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
Code:

#!/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

Re: Running Debian in a chroot
 
Quote:

Originally Posted by Benson (Post 205650)
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/...433e4413_o.png

Benson 2008-07-21 23:51

Re: Running Debian in a chroot
 
1 Attachment(s)
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:
Code:

#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

Re: Running Debian in a chroot
 
Quote:

Originally Posted by Benson (Post 205664)
But xvkbd is looking quite nice to me...

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

Quote:

Originally Posted by Benson (Post 205664)
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.

Quote:

Originally Posted by Benson (Post 205664)
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?)

Quote:

Originally Posted by Benson (Post 205664)
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
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

Re: Running Debian in a chroot
 
EDIT: Note: I've only skimmed your project's SVN, so I could be understanding some of it wrong...

Quote:

Originally Posted by Stskeeps (Post 206126)
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.

Quote:

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.

Quote:

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.

Quote:

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

Re: Running Debian in a chroot
 
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.

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

Re: Running Debian in a chroot
 
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-d...it.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..


All times are GMT. The time now is 10:28.

vBulletin® Version 3.8.8