Experiment - Khrooty4Daily
Not much feedback
here (but thanks to those wo did reply :)), but, hey - let's give it a go anyway!
I've cleaned up and uploaded a copy of Khrooty4Daily which you can find
here. A few notes before people download it:
- I'm going in completely blind here, and have no idea if this will work across distros - it could easily simple fail for most people at the first hurdle.
- A chroot is not as insulated as a VM - in particular, processes started in the chroot are not separated from those started outside the chroot.
- Again unlike a VM, it's possible for apps in a chrooted environment to e.g. crash/ lockup your X session.
- Based on John's blog here, it seems at least possible that the chrooted KDE4Daily session won't run concurrently with an existing KDE4 session, which is a big shame, if true.
- I have some difficulty unmounting /dev/ from the chroot, apparently necessitating a reboot if I want to delete the chroot. Important Note: Under no circumstances should you attempt to delete the chroot without properly unmounting it!
Potential doom and gloom aside (I prefer to err on the side of caution :)), it would be great if at least a handful of people - preferably spanning a goodly range of distros - could download and try it and report their findings here :) As mentioned, I've not tried this before outside of Kubuntu 8.04, so if any step fails for you, please post here.
So, from the top, open a shell and navigate to where you want the chroot to be. You will need root access. Download it:
wget "http://home.kde.org/~kde4daily/Khrooty4Daily4.2-experimental.tar.bz2"
Check the md5sum:
md5sum Khrooty4Daily4.2-experimental.tar.bz2
dad7d49fe39e416ff36f3ab59bf23229 Khrooty4Daily4.2-experimental.tar.bz2
Extract *as root* (should take up <2.5 GB). The "p" flag is important, here: we want things that should have root ownership (e.g. kcheckpass) to have root ownership.
tar -xjpf Khrooty4Daily4.2-experimental.tar.bz2
Quick spot-check that the permissions are OK:
ls -l kde4daily-chroot/usr/bin/kcheckpass
-rwsr-sr-x 1 root root 14934 2008-12-06 10:33 kde4daily-chroot/usr/bin/kcheckpass
We now need to mount /sys, /proc and /dev in the correct places in the chroot - please refer to the warning about /dev, above. Again *as root*:
mount -o bind /proc kde4daily-chroot/proc
mount -o bind /sys kde4daily-chroot/sys
mount -o bind /dev kde4daily-chroot/dev
If all has gone well, you are now ready to chroot into your new Khrooty4Daily environment! *As root*, do:
chroot kde4daily-chroot /bin/bash
You will now be running as the root user inside your Khrooty4Daily chroot. You might want to change the password of kde4daily at this point. Let's switch to our kde4daily user:
su - kde4daily
The command-prompt should be red.
The story so far ...Let's do a quick update:
kde4daily-update
Ok, now to try starting up a GUI session. I believe it's possible to run apps from the chroot transparently inside your current X session, or give Khrooty4Daily a full-blown X session of it's own or even, I would guess, to eventually add it as a selectable option to KDM, but I don't really feel comfortable with that, so I'll just use Xephyr for now. Install Xephyr from your distros packages, and start it up. I'll use screen :1 as I only have one display - you might need to use a different number. There may or may not be xhost authorisation required - please let me know :) Let's use a 1024x600 screen. *Outside* of your chrooted session, launch Xephyr:
Xephyr -screen 1024x600 :1
Now from within your chrooted session, do
export DISPLAY=localhost:1
startkde
The localhost appears to be necessary. The :1 should obviously match the :n you used when launching Xephyr. All being well, Khrooty4Daily should launch in your Xephyr window!
Success!Obviously, if something has gone wrong before you get to this point, please let me know. If not, let's do something daring - let's compile Amarok!
In your Khrooty4Daily session, open up a Konsole and navigate to the KDE4DAILY_SOURCE_DIR (this is just a convention - you can bung it anywhere you want, but it's simpler this way for the time being.)
cd $KDE4DAILY_SOURCE_DIR
Amarok lives in the multimedia (extragear) module (http://websvn.kde.org/trunk/extragear/multimedia/). Due to the way the KDE build system is arranged, we'll have to check out and run cmake on the whole module, although we'll only be actually compiling Amarok itself. Check out the source; we'll put it into a directory called extragear-multimedia to differentiate it from ordinary multimedia:
svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/multimedia extragear-multimedia
Let's make a corresponding build dir for doing out-of-source builds. Again, I'll use $KDE4DAILY_BUILD_DIR by convention:
mkdir $KDE4DAILY_BUILD_DIR/extragear-multimedia
cd $KDE4DAILY_BUILD_DIR/extragear-multimedia
Khrooty4Daily provides the cmakekde command as described on techbase, but this command implicitly does a make && make install on the whole module, whereas we want to do cmake on the whole module, but only make && make install inside the amarok dir. So I provided the onlycmakekde command. This is roughly analogous to the "./configure" step of autotools:
onlycmakekde $KDE4DAILY_SOURCE_DIR/extragear-multimedia
Ordinarily you'd have to hunt around for dependencies at this stage, but Khrooty4Daily is jam-packed with them :)
Almost too easy ...Now we just need to compile amarok. Make yourself a nice cup of tea during this step - you've earned it! If you have a multi-core CPU, you might want to tweak the "make" parameters.
cd amarok
make VERBOSE=1 && make install
If all goes well (it did at the time of writing), Amarok should be installed and ready to launch! I can't get the Xine backend to work (almost certainly my fault) so I have to change the backend to GStreamer in The Multimedia section of System Settings.
Switching to the GStreamer Backend
Kind of!
Groovy!Funky Music not included :)
To exit the chroot, simply
exit
from the chroot session until you get back to the shell on the host machine that you entered the chroot from. It doesn't appear to be necessary to unmount your /proc, /sys and /dev unless you're fed up with the chroot and want to delete it, so I always leave mine mounted. If and when you do decide to delete khrooty4daily, you will need to unmount it. From the directory containing khrooty4daily, and as root:
umount kde4daily-chroot/proc
umount kde4daily-chroot/sys
umount kde4daily-chroot/dev
As mentioned, the unmount of /dev might fail.
DO NOT attempt to delete kde4daily-chroot until it has been cleanly unmounted! You may need to reboot in order to achieve this. When you are 100% sure that it is no longer mounted, simply delete the kde4daily-chroot directory - this step will need to be performed as root, so it's best to do it from the command-line.
And that's it! Assuming everything went OK, and you haven't followed the instructions too blindy and deleted khrooty4daily, you can check out source for other modules or apps from kde-apps.org and compile them, hack on them, install kdevelop3 from the repositories or kdevelop4 from SVN, whatever floats your coding boat, and get stuck in. Maybe sign up for
Klassroom, or help out with the million and one other tasks that could all use an extra pair of hands :)
Good hunting!