PDA

View Full Version : A few Next Generation Tips and Tricks



bfree
01-07-2005, 04:59 AM
If you don't want to use cmg then don't, simply copy everything from /tmp/klik to your Desktop to get all the applications on your Desktop in AppDirs (or you could put them somewhere else), then you could delete the cmg files. You can only do this before you reboot or something else cleans the /tmp directory.

Decide you want the cmg file back again? Then run (lets assume the package you klik installed is called trickpack)

mkfs.cramfs -v "~/Desktop/trickpack/" "~/Desktop/trickpack.cmg"
Want to make some changes to the AppDir and repackage it as a new cmg? You could do something like

dpkg -x trickpack-data.deb ~/Desktop/trickpack/
and then repeast the above mkfs line to build a new cmg!

While you a running a cmg, you should be able to find the contents of the AppDir again in /mnt/app/N where N is the lowest free number that was available when you ran it. Supposing trickpack is the only cmg you are running and have run then you could do:

mkdir ~/Desktop/trickpack && cp -a /mnt/app/1/* ~/Desktop/trickpack
Otherwise (once you are not already using 7 apps) you could do (on kanotix/knoppix anyway)

ln -s /mnt/app/7/image ~/Desktop/trickpack.cmg && mount /mnt/app/7 && mkdir ~/Desktop/trickpack && cp -a /mnt/app/7/* ~/Desktop/trickpack && umount /mnt/app/7 && rm /mnt/app/7/image

Finally I'll re-emphasise what probono has said, you need to have a home directory which has had klik installed in it since the latest changes to the klik install (no harm installing again) as this gives you the klik client and the setup to run the cmg files AND you must also have a correct /etc/fstab, you can use a config script to easily add the required lines to /etc/fstab on each reboot, if you are on a hard disk installed system then your /etc/fstab should retain the changes once you've made them.

EDIT

Knew there was more, to run an progrom from the command line you can do (to run the trickserve binary in the trickpack cmg with arguments)

~/.zAppRun ~/Desktop/trickpack.cmg trickserve -c=./trick.conf

lilsirecho
01-07-2005, 07:12 AM
Nice tips.

An added tip for some users of the Klik system is to ensure that there is a /mnt/app directory provided by the Knoppix 3.7 December08,2004 download which permits the running of applications. If it isn't there do the following:(root)

mkdir /mnt/app
Chmod 777 /mnt/app

Happy .cmg'ing!

lilsirecho
01-07-2005, 07:45 AM
bfree;
I am irish, too!

I have downloaded the Klik system into another OS archlinux.

The fstab entries appear, I have access to the .cmg files on desktop, I have created a /mnt/app directory but have no entries in that directory.

I understand that the system uses cramfs (rom) and such a file system is available in the OS but not yet enabled( Have to re-configure).

I have to change the fstab entries for the /mnt/app 1 thru 7 to reflect the proper protocol for archlinux but am unaware of whether all this change will do any good in applying Klik to the archlinuxOS.

I only assume that I could use cramfs for de-compressing and that the fstab can be changed to recognize both the cramfs and the /mnt/app entries.

It is a ro system and should be possible to utilize it in archlinuxOS.

Do you have any suggestions?

bfree
01-07-2005, 11:18 AM
I have downloaded the Klik system into another OS archlinux.

The fstab entries appear, I have access to the .cmg files on desktop, I have created a /mnt/app directory but have no entries in that directory.

This is correct. The entries are created by the script which runs the cmg file. All you need is a /mnt/app you can write to.

If it doesn't work as is on archlinux (doesn't support cramfs) you can either just use the appdir or you can make an img that archlinux does understand (or you could even edit ~/.klik to create a different kind of image in the first place). You could just make a regular iso image of the appdir named as a .cmg and it should work (providing archlinux supports loop mounting, I'm not sure what archlinux is so ...).

I can't remember the most versitile and correct mkisofs incantation, I'll try and check it out again soon and report back the magic line. You could mke2fs on a file if you wanted, it's up to you, as long as the systems kernel can mount the filesystem as type auto.

Then all you need to worry about is if the OS you are trying has all the required packages, klik assumes you have the least common denominator of all the packages in the supported distributions and won't include any required packages from these. You can use my dpkg -x step from above to add some more required packages into an AppDir if required though. Let's just say life can be much easier on a supported distro, though many packages will work all over the place, it all depends on the dependencies :-P

Hope that makes sense.

lilsirecho
01-07-2005, 07:02 PM
Thanks much for the comments and the reminder about dependencies.

I am learning the Klik system!

lilsirecho
01-11-2005, 06:09 PM
I have configured my archlinux kernel 2.6.10-1 to enable "cramfs".

I do not know if it is required for decompress of .cmg files.

I found previously that my Knoppix /mnt/app had to be addressed to change permissions and have done so in archlinux as well.

You remarked about utilizing mkisofs to modify the .cmg images but haven't as yet identified the particulars. Perhaps it would help my efforts to get Klik running in arch.

I have tried using arch...mount -o loop.. and succeeded in getting a .cmg image file into /mnt/app but it did not run.

I have tried to use the "run" command with .cmg files with no success.

I note the fstab entries in klik include a "loop" statement which most likely enables the decoding.

Thank you for your responses and help.

I haven't given up .......

bfree
01-11-2005, 06:57 PM
I have configured my archlinux kernel 2.6.10-1 to enable "cramfs".

I do not know if it is required for decompress of .cmg files.

Cramfs is the default, that doesn't mean a cmg must be cramfs though, the ooo2 cmg file is actually an iso with transparent (to linux) compression (at least I believe it is).


I found previously that my Knoppix /mnt/app had to be addressed to change permissions and have done so in archlinux as well.

You remarked about utilizing mkisofs to modify the .cmg images but haven't as yet identified the particulars. Perhaps it would help my efforts to get Klik running in arch.

You can use mkisofs to create the transparent compressed iso type cloop files. From the klik docs page:


mkzftree inputdirectory/ outputdirectory/
mkisofs -z -r -v -U -o output.cmg outputdirectory/



I have tried using arch...mount -o loop.. and succeeded in getting a .cmg image file into /mnt/app but it did not run.

What did you try to run? /mnt/app/wrapper ? If this existed then cramfs shouldn't be the problem. Did you get an error message? Perhaps you need to add exec to your mount options? Why not setup the fstab as recommended so it will be mounted at /mnt/app/1?


I have tried to use the "run" command with .cmg files with no success.

Is that the ~/.zAppRun? Again if it is what errors did you get? Did you setup the fstab as recommended?


I note the fstab entries in klik include a "loop" statement which most likely enables the decoding.

Once your kernel has cramfs support it should work, cramfs is recognised to mount automatically but the complete translation of the recommended fstab line into a mount command is (taking /mnt/app/1 as an example):

mount -o user,noauto,ro,loop,exec /mnt/app/1/image /mnt/app/1
The way this actually works is that the .zAppRun script makes a symbloic link pointing to the cmg file as follows:

mkdir /mnt/app/1
ln -s ~/Desktop/some.cmg /mnt/app/1/image
Then it mounts it, and it deletes the link (and the directory actually) afterwards.

lilsirecho
01-11-2005, 07:42 PM
Cramfs has been entered into my kernel config as a module and entered into /etc/rc.conf module listing.

I have attempted to run the desktop .cmg files with right click ...select AppRun.

I have also tried the "run command" ...click and drag .cmg into "run Command" and receive Kde error "cannot run /mnt/app1"

I have entered all the Klik details in fstab.

You mention "exec" which is not yet in the fstab listing. I assume if I add it , it would have to be added to all seven entries of /mnt/app.

One thing I did gave a clue...I opened the "tmp/klik/galculator" file in Konqueror and performed "click and drag" AppRun to "Wrapper". The result is given below:
----------------------------------------------------------------------------------------------------------

tmp/klik/galculator/usr/bin/galculator: error while loading shared libraries: libglade-2.0.so.0: cannot open shared object file: No such file or directory
------------------------------------------------------------------------------------------------------------
I expect that some of the Klik material will not perform for dependencies absent.

If I perform the usual "mount" command ....what coding would be necessary to mount the galculator.cmg image file in /mnt/app?

The /mnt/app directory has been chmod full permissions.

If I use the "Run Command" what should be entered? If I have no entry in /mnt/app, is an entry created when I run right-click...AppRun?

I hope I have given you some useful feedback.

bfree
01-12-2005, 02:41 AM
I have entered all the Klik details in fstab.

You mention "exec" which is not yet in the fstab listing. I assume if I add it , it would have to be added to all seven entries of /mnt/app.



exec
Permit execution of binaries.

Yes add it to all 7 entries.


If I perform the usual "mount" command ....what coding would be necessary to mount the galculator.cmg image file in /mnt/app?

Please try the following in a command line and report any errors?


mount -o user,noauto,ro,loop,exec /mnt/app/Desktop/gcalculator.cmg /mnt/app/1
/mnt/app/1/wrapper
umount /mnt/app/1

Note that the program should run when you run /mnt/app/1/wrapper, or offer you a dialog box of programs to choose.

lilsirecho
01-12-2005, 03:53 AM
Had a power outage here and have to re-do things to try your suggestions.

I have the exec in fstab as an original install of Klik material for all seven files.

Will reinstall the Klik and try the mount.

lilsirecho
01-12-2005, 04:01 AM
I ran the "mount" program as you outlined it and received the following: ( Galculator.cmg has an icon on the Desktop, the program resides in /tmp/klik/galculator)
------------------------------------------------------------------------------------------------------------
[root@n6re ~]# mount -o user,noauto,ro,exec /mnt/app/Desktop/galculator.cmg /mnt/app1
mount: special device /mnt/app/Desktop/galculator.cmg does not exist
[root@n6re ~]#

bfree
01-12-2005, 04:10 AM
I ran the "mount" program as you outlined it and received the following: ( Galculator.cmg has an icon on the Desktop, the program resides in /tmp/klik/galculator)
gcalculator.cmg IS on the desktop, not just an icon. The stuff in /tmp was used to build it. You can test if it has a hope of running by doing

/tmp/klik/galculator/wrapper
If this doesn't work then the cmg isn't going to work either (probably missing dependencies as you are not using a supported distro).

------------------------------------------------------------------------------------------------------------
[root@n6re ~]# mount -o user,noauto,ro,exec /mnt/app/Desktop/galculator.cmg /mnt/app1
mount: special device /mnt/app/Desktop/galculator.cmg does not exist
[root@n6re ~]#
Ooops, sorry, I forgot the loop, the user is uneccessaryand you missed out a / in /mnt/app/1. Should be:

mount -o loop.noauto,ro,exec /mnt/app/Desktop/galculator.cmg /mnt/app/1

lilsirecho
01-12-2005, 04:23 AM
The following occured when I performed the corrected "mount" command:__________________________________________ ________

[root@n6re ~]# mount -o loop.noauto,ro,exec /mnt/app/Desktop/galculator.cmg /mnt/app/1
mount: mount point /mnt/app/1 does not exist
[root@n6re ~]#


I could set up /mnt/app/1 with the chmod I needed in Knoppix.

I haven't done the /tmp/klik/wrapper yet....

bfree
01-12-2005, 04:27 AM
The following occured when I performed the corrected "mount" command:__________________________________________ ________

[root@n6re ~]# mount -o loop.noauto,ro,exec /mnt/app/Desktop/galculator.cmg /mnt/app/1
mount: mount point /mnt/app/1 does not exist
[root@n6re ~]#


I could set up /mnt/app/1 with the chmod I needed in Knoppix.

I haven't done the /tmp/klik/wrapper yet....
Ok, first try just clicking on the cmg you have (klik is installed? fstab is updated? /mnt/app is writable). Any errors or does it now work?
Next try the /tmp/klik/galculator/wrapper and again report and errors if it doesn't work.
Finally if it still isn't working, yes you will also need to mkdir /mnt/app/1 (no need to chmod or anything as you are the one using it). Just remember to delete it when you are finished using it.

lilsirecho
01-12-2005, 04:32 AM
Ran the following (looks familiar!):
---------------------------------------------------------------------------------------------------------------
[root@n6re ~]# /tmp/klik/galculator/wrapper
/tmp/klik/galculator/usr/bin/galculator: error while loading shared libraries: libglade-2.0.so.0: cannot open shared object file: No such file or directory
[root@n6re ~]#

So there is a dependency problem which prevents the app from being mounted in /mnt/app/1.

My guess is that this might be universal for all the .cmg's in my limited number of librairies.

I could load up on all librairies available and try again later. But...other failures may occur in other areas as well.

Thanks for your patient and helpful answers. :D

bfree
01-12-2005, 04:36 AM
Ran the following (looks familiar!):
---------------------------------------------------------------------------------------------------------------
[root@n6re ~]# /tmp/klik/galculator/wrapper
/tmp/klik/galculator/usr/bin/galculator: error while loading shared libraries: libglade-2.0.so.0: cannot open shared object file: No such file or directory
[root@n6re ~]#

So there is a dependency problem which prevents the app from being mounted in /mnt/app/1.

You may or may not have a problem with the mounting of the cmg files, you previously would have when you didn't have the exec option in fstab. This app won't run for you though as is because you are missing a library (at least one library). You could try and follow the previous advice on adding packages into your cmg if your brave!

lilsirecho
01-12-2005, 04:45 AM
As I said, the exec entry was always there from day one.

I am not brave, a little crazy mebbe!
I did try other .cmg files but they had lib problems, too.

I suspect that to be only the first encountered dependency!

I was able to run the same galculator.cmg from the Klik file after opening by click and drag the AppRun file therein to the wrapper file therein. It gave the same lib file not found. And AppRun another .cmg resulted in a different lib file not found using the same technique.

Happy New Year!