PDA

View Full Version : How to install new programs when running from CDR?



BlueGirl
12-15-2004, 07:11 AM
I am using knoppix 3.6 and it has a live installer feature which seems to enable it to install new programs which are already on the distribution disk, but how can I install all the software I already have which are tar.gzipped and are not Debian distributions. I tried to install Bestcrypt using the usual 'make - make install' but it failed during the 'make install' because it tried to store some files to the CD which of course is read only. Just to make clear that I want to run knoppix from the CDR and I don't want to install it on hard disk. Also I want to run completely diskless, so any newly installed programs would have to go onto the ramdisk.

Apologies if this is in the documentation but I can't access it at the moment!

Thanks for any help

BlueGirl

shah
12-15-2004, 08:52 AM
You can't install the usual way.
You can install using klik client
http://klik.berlios.de/


:D :D

BlueGirl
12-15-2004, 02:30 PM
Thanks for that shah. That is the sort of thing I was after, however there are two problems. First there doesn't seem to be a version of Bestcrypt for download and second because I'm on dial-up it would be a great hassle to download the three apps I want every time I boot knoppix. Unless there is a way to make the download from klik reside permanently on a hard drive and point klik to this as the 'download site' during future installations.

More generally if I try to install an app and it fails because it tries to write to the CD, is it not possible to redirect the installation of the app to a folder on the ramdisk? I would think that this is possible but I am a bit of a newb so don't really know.

Thanks for you help.

BlueGirl
12-15-2004, 02:34 PM
Oh one more drawback of click is that it only appears to work on knoppix 3.3 according to the website, and I am using 3.6

KanotixUser
12-15-2004, 02:49 PM
Oh one more drawback of click is that it only appears to work on knoppix 3.3 according to the website, and I am using 3.6

Most will probably still work just give them a try, if it doesn't just delete the entire folder and no harm done.

Use a persistant home to save your programs, and use the myonfig=scan boot cheat.

rrfish72
12-15-2004, 05:38 PM
Bluegirl, it does work in 3.6. Google klik and go to thesoftware store site. Copy and paste the wget..... stuff into the run command box in the K menu and there you go. It will take you to the active site where everything will work. KanotixUser's cheat should be knoppix myconf=scan (or config=scan)

KanotixUser
12-15-2004, 10:56 PM
KanotixUser's cheat should be knoppix myconf=scan (or config=scan)


oops, thanx rrfish72, typed that with one hand and my 5 month old baby girl in the other, hehe, a little distracted.

BlueGirl
12-16-2004, 01:09 PM
Thanks rrfish72 and kanotixuser. I'm getting closer to what I want now, but I'm still confused about one thing. Will creating a persistent home allow me to download the apps with klik and then re-install them each time I reboot knoppix from cd? This is important because I am trying to run knoppix and any new apps in ramdisk only. I don't mind having the apps source on a hard drive, but the hard drive must never be used after the initial app install, i.e. the apps must not run on the hard drive. Can I do this?

KanotixUser
12-16-2004, 02:55 PM
Thanks rrfish72 and kanotixuser. I'm getting closer to what I want now, but I'm still confused about one thing. Will creating a persistent home allow me to download the apps with klik and then re-install them each time I reboot knoppix from cd? This is important because I am trying to run knoppix and any new apps in ramdisk only. I don't mind having the apps source on a hard drive, but the hard drive must never be used after the initial app install, i.e. the apps must not run on the hard drive. Can I do this?\\

Do you have a usb jump drive? you can set your persistent home on it

bfree
12-20-2004, 02:56 AM
Thanks rrfish72 and kanotixuser. I'm getting closer to what I want now, but I'm still confused about one thing. Will creating a persistent home allow me to download the apps with klik and then re-install them each time I reboot knoppix from cd? This is important because I am trying to run knoppix and any new apps in ramdisk only. I don't mind having the apps source on a hard drive, but the hard drive must never be used after the initial app install, i.e. the apps must not run on the hard drive. Can I do this?
If you use a persistent home then your home directory will be stored on your hard disk and therefore the applications will run from the hard disk. If you wanted to you could simply copy your klik installed applications to a folder on the hard disk and copy them back across after a reboot (so the apps would run from ramdisk) or you could even make a knoppix.sh (which is run using the config cheatcode) which will copy them across after the reboot.

probono
12-20-2004, 09:59 AM
If you are using "next generation" klik, then you can copy the klik installed AppDirs _any_ Linux(!) partition (not neccessarily into the $HOME and then run them directly from there).

With klik's new Compressed Application Images (cmg files), you can put those anywhere you want, including Non-Linux partitions (FAT USB-Sticks). For more information, please see http://klik.atekon.de/docs/?page=Compressed%20Application%20Images
For instructions on how to use, please see
http://klik.atekon.de/docs/?page=How%20to%20use

Greetings,
probono

wsg
01-04-2005, 11:30 AM
From http://klik.atekon.de/docs/?page=How%20to%20use

Client
In order to use klik, you need to have the klik client installed. Kanotix BH 9 and newer have this by default (when running from the Live CD), and for other Knoppix derivates you can follow the following instructions:

* Make sure you are really using one of the supported distribution versions
* Press Alt-F2 and paste:
* wget klik.atekon.de/client/install -O -|sh

Then you can point-and-klik install the software packages from this site.

.cmg files
Support for .cmg files is now installed by the klik client.

* Simply click on .cmg files in KDE to run them. (Or drag .cmg files on ~/.xAppRun in order to run them. The klik client sets KDE to open .cmg files with ~/.xAppRun automatically.)


I installed klik on KanotixBH8 LiveCD some time ago (from the berlios.de site) before your new changes.

(I run "diskless", booting from CDROM.)

Do I need to delete the older version and install the newer one?

Thanks...

wsg
01-04-2005, 12:39 PM
Well, I (partially) answered my own question...by trying to download "sillypoker".

klik said I needed to update it...and did so. Then I went ahead with the "sillypoker" download.

klik says "90%", whereas 100% of 46.1 KB shows complete.

I opened the file ' .zAppRun ' (it's the only new thing I could find in my HOME folder) with KWrite, and here are the contents:

#!/bin/sh

# by probono at myrealbox dot com
# thanks to bfree
# GPL

#
# ok we need dialogs now
#
if [ -z "$DIALOG" ] ; then
# Determine which dialog to use in which situation:
# Xdialog (in all other cases)
DIALOG=Xdialog
# kdialog (in case there is no console available and we are running KDE)
( ps -e 2>/dev/null | grep kdeinit >/dev/null 2>&1 ) && DIALOG=kdialog
# dialog (in case there is a console available)
GUIMODE=$(tty)
( echo $GUIMODE | grep /dev/tty[:digit:] >/dev/null ) && DIALOG=dialog
fi

# Setup defaults for whatever dialog we are using
case $DIALOG in
kdialog)
DIALOG_OPTIONS=" --caption klik" ;
KLIKDIR=":klikdir" ;;
Xdialog|dialog)
DIALOG_H=12
DIALOG_W=60
DIALOG_OPTIONS=" $DIALOG_H $DIALOG_W" ;
KLIKDIR="~" ;;
esac

derror(){
case $DIALOG in
kdialog)
$DIALOG --error "$1" $DIALOG_OPTIONS
;;
Xdialog|dialog)
$DIALOG --msgbox "ERROR: $1" $DIALOG_OPTIONS
;;
esac
}

# check fstab and warn if neccessary entries are not there
# better use /media/klik according to FSH?
if [ -z "$(cat /etc/fstab | grep app/7)" ]
then
derror "Your /etc/fstab is not yet prepared for mounting .cmg images.
As root, please make /mnt/app writeable and add the following lines:

################################################## ##############
/mnt/app/1/image /mnt/app/1 auto user,noauto,ro,loop,exec 0 0
/mnt/app/2/image /mnt/app/2 auto user,noauto,ro,loop,exec 0 0
/mnt/app/3/image /mnt/app/3 auto user,noauto,ro,loop,exec 0 0
/mnt/app/4/image /mnt/app/4 auto user,noauto,ro,loop,exec 0 0
/mnt/app/5/image /mnt/app/5 auto user,noauto,ro,loop,exec 0 0
/mnt/app/6/image /mnt/app/6 auto user,noauto,ro,loop,exec 0 0
/mnt/app/7/image /mnt/app/7 auto user,noauto,ro,loop,exec 0 0
################################################## ##############"
exit 1
fi

# rewrite cmdline to use absolute instead of relative paths, thanks bfree
NEWCMD=$(perl -e '$newcmd=shift(@ARGV);foreach $arg (@ARGV){ @part=split(/\=/,$arg); foreach $part (@part){ (-e "$ENV{PWD}/$part") && ($part="$ENV{PWD}/$part");}$newcmd.=" ".join ("=",@part);} print "$newcmd";' $@)
set -- $NEWCMD

# if no arguments are passed and
# there is a .cmg in the same directory as this
# script, then use the .cmg
DIRNAME=$(dirname $0)
if [ -z $1 ]
then
CMG=$(find "$DIRNAME" -iname '*.cmg'|head -n 1) || exit 1
echo "Found $CMG, using it"
else
CMG="$1"
shift
fi

make path to CMG absolute, thanks bfree
case $CMG in
/*) ;;
*) CMG=$(pwd)/$CMG ;;
esac

# determine which filesystem is used as .cmg
file $CMG | grep ": data" >/dev/null && FS=squash # who knows a better way to recognize it?
file $CMG | grep "Compressed ROM" >/dev/null && FS=cram
file $CMG | grep "ISO 9660" >/dev/null && FS=iso

if [ -n "$FS" ]
then
NUMBERS="7 6 5 4 3 2 1"
for NUMBER in $NUMBERS
do
[ -e "/mnt/app/$NUMBER" ] || MNTNUM=$NUMBER
done
case $FS in
squash) MOUNT=/mnt/squash/$MNTNUM ;;
*) MOUNT=/mnt/app/$MNTNUM ;;
esac
mkdir -p $MOUNT || exit 1
ln -s $CMG $MOUNT/image || exit 1
mount $MOUNT || derror "Unable to mount $MOUNT"
else
# NOTE: exit now cause our cmg isn't mounted
derror "$CMG does not appear to be either a squashfs, iso9660 or a cramfs file"
exit 1
fi

#
# execute the wrapper
# the wrapper should take care to keep running until its app closes
#

# we need this so that on the cmdline, pipes etc work
CMDLINE="yes"
( tty | grep ^/dev/tty >/dev/null ) && CMDLINE=""
( tty | grep ^/dev/pts >/dev/null ) && CMDLINE=""
if [ "$CMDLINE" = "yes" ] ; then
RESULT=$($MOUNT/wrapper $@ 2>&1) || error "$RESULT"
else
$MOUNT/wrapper $@
fi

# kill all child processes
kill $(pidof -x -o %PPID) 2>/dev/null

# unmount and clean up
umount $MOUNT
rm -f $MOUNT/cramfs
rm -r $MOUNT/

Hope this means something to some of you here... :roll:

Any help or comments?

Thanks...

bfree
01-04-2005, 04:56 PM
You should also have a sillypoker.cmg file on your desktop which you will just need to click (in KDE) to run it.

wsg
01-04-2005, 06:43 PM
Thanks, bfree...

As close as I can tell, this error seems to point to, at least, part of the problem: -- It's what I get when I click on the sillypoker desktop icon...

Your /etc/fstab is not yet prepared for mounting .cmg images.
As root, please make /mnt/app writeable and add the following lines:
################################################## ##############
/mnt/app/1/image /mnt/app/1 auto user,noauto,ro,loop,exec 0 0
/mnt/app/2/image /mnt/app/2 auto user,noauto,ro,loop,exec 0 0
/mnt/app/3/image /mnt/app/3 auto user,noauto,ro,loop,exec 0 0
/mnt/app/4/image /mnt/app/4 auto user,noauto,ro,loop,exec 0 0
/mnt/app/5/image /mnt/app/5 auto user,noauto,ro,loop,exec 0 0
/mnt/app/6/image /mnt/app/6 auto user,noauto,ro,loop,exec 0 0
/mnt/app/7/image /mnt/app/7 auto user,noauto,ro,loop,exec 0 0
################################################## ##############

.................................................. ..............................................
I also see these files (but I'm not certain they are relevant here):

file:/tmp/kde-knoppix/de.xkm
file:/tmp/kde-knoppix/fr.xkm
file:/tmp/kde-knoppix/konqueror-crash-PJFoQa.log
file:/tmp/kde-knoppix/ksycoca ***
file:/tmp/kde-knoppix/us.xkm

***1 MB

bfree
01-04-2005, 06:57 PM
I think there was a little bug in the klik installl recently. Try installing it again. It should make those changes for you, or if not it should give you a message telling you it didn't and telling you that you can just run the file klik-cmg-install-root (which is in your home directory) as root to make the changes.

wsg
01-04-2005, 07:03 PM
" Try installing it again"

Do I have to DELETE the previously installed stuff first? Or, will the re-install automatically over-ride it?

Thanks...

bfree
01-04-2005, 07:17 PM
No need to delete anything, just install it again.

wsg
01-04-2005, 08:11 PM
Did so...Same result as before:

klik ERROR:

Your /etc/fstab is not yet prepared for mounting .cmg images.
As root, please make /mnt/app writeable and add the following lines:
################################################## ##############
/mnt/app/1/image /mnt/app/1 auto user,noauto,ro,loop,exec 0 0
/mnt/app/2/image /mnt/app/2 auto user,noauto,ro,loop,exec 0 0
/mnt/app/3/image /mnt/app/3 auto user,noauto,ro,loop,exec 0 0
/mnt/app/4/image /mnt/app/4 auto user,noauto,ro,loop,exec 0 0
/mnt/app/5/image /mnt/app/5 auto user,noauto,ro,loop,exec 0 0
/mnt/app/6/image /mnt/app/6 auto user,noauto,ro,loop,exec 0 0
/mnt/app/7/image /mnt/app/7 auto user,noauto,ro,loop,exec 0 0
################################################## ##############

bfree
01-04-2005, 08:14 PM
ok, you will have to follow the instructions it is giving you. As root you need to make a directory called /mnt/app and make it writable by you (you could just "chmod 777 /mnt/app"), then you need to edit /etc/fstab and add the lines you have listed below. It's a bit strange that you are getting the errors though :-( I'm in #klik on irc.freenode.net at the moment if you want to try and figure it out, not sure how much longer I'll be there for though :-(

wsg
01-04-2005, 09:28 PM
OK...got it now...but the game shows with all TEXT names representing the CARDS...rather than images :cry:[/b]

wsg
01-05-2005, 01:59 PM
Well, following shutdown and reboot, both the /mnt/app directory and the lines added to /etc/fstab are no longer there. So the bug must be burrowed deeper than we thought :cry:

BTW, the 'sillypoker.cmg' still shows on the desktop, and I still get that same error message when I click on it :(

backlit
01-06-2005, 06:35 PM
I'm getting the same error.
Here's what's happening with me:

Runnning Koppix3.7 with a PHD(256 USB flash)

* install klik (seems fine)
* installl superkaramba (seems fine, but hangs at 90% for a sec, add asks for comments on the install before it reaches 100%)
* superkaramba.cmg displays on the desktop
* run superkaramba.cmg by clicking on it (runs fine)
* downloaded some themems for superkaramba.cmg (they run fine too)
* reboot (desktop loads, superkaramba.cmg is still there)
* run superkaramba.cmg by clicking on it (it fails with the following error)

Your /etc/fstab is not yet prepared for mounting .cmg images.
As root, please make /mnt/app writeable and add the following lines:
################################################## ##############
/mnt/app/1/image /mnt/app/1 auto user,noauto,ro,loop,exec 0 0
/mnt/app/2/image /mnt/app/2 auto user,noauto,ro,loop,exec 0 0
/mnt/app/3/image /mnt/app/3 auto user,noauto,ro,loop,exec 0 0
/mnt/app/4/image /mnt/app/4 auto user,noauto,ro,loop,exec 0 0
/mnt/app/5/image /mnt/app/5 auto user,noauto,ro,loop,exec 0 0
/mnt/app/6/image /mnt/app/6 auto user,noauto,ro,loop,exec 0 0
/mnt/app/7/image /mnt/app/7 auto user,noauto,ro,loop,exec 0 0
################################################## #############

* tried to drag and drop superkaramba.cmg onto .zAppRun (same error)
* if I make the above changes, they get lost after a reboot
* the only obvious fix for me is to reinstall klik after every reboot, which isn't something I really want to do

In early December, before the cmg stuff was added, klik installed to a visible folder within my home directory by default, and so did the apps I installed. Everything ran fine, and even after reboot, klik ran the previously installed programs just fine. I hope this info can help reslove the bug, because I'm a huge fan, and I just want it to run as smoothly as it used to.

Thanks,

wsg
01-06-2005, 08:55 PM
Thank you, backlit, for posting your very similar experiences to mine.

You did a great job of describing the problem with all the specifics.

I, too, still have a program, previously installed, which is still working despite the more recent failures.

Sorry it has to be (for now) a negative experience :(

But lets hope that help is on the way :wink:

probono
01-06-2005, 10:26 PM
Hi, for all of you who are using the Live CD:

at reboot, the file /etc/fstab is dynamically (re-)created by Knoppix, and the klik-specific entries are lost. So you have to add them back after every reboot. Fortunately, there is an easy solution:

Simply put in your knoppix.sh (search the forum if you don't know what knoppix.sh is):


cat >> /etc/fstab <<\EOF
/mnt/app/1/image /mnt/app/1 auto user,noauto,ro,loop,exec 0 0
/mnt/app/2/image /mnt/app/2 auto user,noauto,ro,loop,exec 0 0
/mnt/app/3/image /mnt/app/3 auto user,noauto,ro,loop,exec 0 0
/mnt/app/4/image /mnt/app/4 auto user,noauto,ro,loop,exec 0 0
/mnt/app/5/image /mnt/app/5 auto user,noauto,ro,loop,exec 0 0
/mnt/app/6/image /mnt/app/6 auto user,noauto,ro,loop,exec 0 0
/mnt/app/7/image /mnt/app/7 auto user,noauto,ro,loop,exec 0 0
EOF


Greetings,
probono

wsg
01-07-2005, 02:20 AM
Thanks, probono...I've entered that code into knoppix.sh -- and will go on from there...I'm guessing that I will have to now re-install klik...as well as re-install "sillypoker". Can you please verify ??

Thanks once more for all your help ... :)

bfree
01-07-2005, 03:29 AM
Thanks, probono...I've entered that code into knoppix.sh -- and will go on from there...I'm guessing that I will have to now re-install klik...as well as re-install "sillypoker". Can you please verify ??

Thanks once more for all your help ... :)
If you have a persistent home dir then it will hold klik and the apps you install with it. The only additional step required is adding the fstabs lines, so if you are using a config script (knoppix.sh) to do this then things should just work.

wsg
01-07-2005, 09:50 AM
Thanks, bfree...


I did re-install "sillypoker" and this time it went to 100% (vs. 90% in previous attempts).

The program is now working :D

I'm not sure if "Program-Specific" Questions should be posted here (or is there another forum for these??)..

But, here's a question about "sillypoker":

The klik page for "sillypoker" says:

The program in this package contains support for the standard text interface and the curses interface. Not sure what the "curses interface" is / means...but all I have is text for the cards.

I did make the change in the"sillypoker" OPTIONS panel from text to images, but that made no difference.

I imagine that I need a separate download of card images :?

BTW, I DO have card images in the "ace-of-penguins" program which I previously klik'd...They were apparently included in the single download for that program...

probono
01-09-2005, 01:52 PM
"The program in this package contains support for the standard text interface and the curses interface" means that it contains only two different text interfaces (curses is also text only). Perhaps there is another application with a different name that provides a graphical version.

Greetings,
probono

wsg
01-10-2005, 05:01 PM
Thanks, probono...