Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: adrian on June 08, 2012, 01:43:07 PM

Title: Ondemand?
Post by: adrian on June 08, 2012, 01:43:07 PM
I've been looking at this feature, but I can't really find anything.  I was guessing that it doesn't load the loop device until you either run a command in it or you explicitly request it be loaded, but it doesn't seem to be doing that.

Can someone tell me exactly what ondemand does?  I also noted a ondemand script on the system.  How does this work?  I'm using TCL 4.5.4.

Also, I did find a little info on it (sort of) but it is out of date as it referenced things that were not in the GUI.  That page is here (http://distro.ibiblio.org/tinycorelinux/overview.html).  But even that didn't really say what it did.

Thanks all,


A
Title: Re: Ondemand?
Post by: Rich on June 08, 2012, 03:55:59 PM
Hi adrian
If you install an application using AppBrowser as  OnDemand, you will see it listed under  OnDemand  in the
popup menu when you click on the desktop. Clicking on the application should then mount and run it.
Title: Re: Ondemand?
Post by: adrian on June 08, 2012, 10:32:49 PM
I didn't, but according to the the web site I linked to in my last message, it said a OnBoot can be switched to a OnDemand, though the info is out of date.  I think I found what the equivalent is on the new version, but it is not working as *I* think it should work, which could be that I'm not understanding what it is supposed to do.  Was my description correct?


A

Title: Re: Ondemand?
Post by: Rich on June 08, 2012, 10:43:43 PM
Hi adrian
In previous versions of Tinycore you could use AppsAudit to move applications between OnBoot and OnDemand.
I believe that function has now been incorporated directly into AppBrowser.
Title: Re: Ondemand?
Post by: adrian on June 09, 2012, 05:37:04 PM
Yes, as I said, I did find it.  But also, it doesn't seem to do what I think it does.  Is my description that I made correct?


A
Title: Re: Ondemand?
Post by: Rich on June 09, 2012, 08:03:51 PM
Hi adrian
It doesn't  loop mount the extension until you tell it to. OnBoot and OnDemand basically are intended to define
whether applications get mounted when you boot.
Title: Re: Ondemand?
Post by: adrian on June 09, 2012, 10:14:35 PM
K, so it is what I thought.  So, the questions are now
1. Is it possible to mount the loop device for the application from the command line? and...
2. What doe the ondemand script do?  And how do I use it?

I tried to put dosfstools, libcups and syslinux as ondemand as a test using the Apps tool, but those are still mounted.

Further, when I look at the OnDemand, OnBoot pages in the Apps applications, there is a list on the left that are apps that are neither OnDemand nor OnBoot.  (I've attached a screen shot to show what I mean)  So what are they?  OnBoot until they are as OnDemand?

I think I want the X stuff, and install stuff as OnDemand, is that possible?

Thanks,


A
Title: Re: Ondemand?
Post by: Rich on June 09, 2012, 10:36:45 PM
Hi adrian
Quote
there is a list on the left that are apps that are neither OnDemand nor OnBoot.
Those would be dependencies of other applications. Whether an application is OnDemand or OnBoot, when
it gets mounted, its dependencies get mounted automatically.
Quote
I tried to put dosfstools, libcups and syslinux as ondemand as a test using the Apps tool, but those are still mounted.
Either they are dependencies of extensions that are being mounted, or you did not reboot after making that change.
Switching between the two in a running system does not take effect until you reboot.
Title: Re: Ondemand?
Post by: adrian on June 09, 2012, 11:03:48 PM
Ok, so how do I demand them back?


A
Title: Re: Ondemand?
Post by: Rich on June 09, 2012, 11:13:16 PM
Hi adrian
What do mean "demand them back" ?
Title: Re: Ondemand?
Post by: adrian on June 09, 2012, 11:41:39 PM
:) I mean, I wanna use them now.

And is there a command to tell them to go away?  (I don't want them mounted)


A
Title: Re: Ondemand?
Post by: Rich on June 09, 2012, 11:52:36 PM
Hi adrian
Quote
And is there a command to tell them to go away?  (I don't want them mounted)
No. That is not the purpose of OnDemand. OnDemand is for applications you rarely use if for example you don't
want them showing up in the Applications menu. I personally don't use it and simply install all applications
OnBoot.
Quote
I mean, I wanna use them now.
Right click on the desktop or the titlebar of any window, go to OnDemand in the popup menu, and click on
the application.
Title: Re: Ondemand?
Post by: adrian on June 10, 2012, 12:01:52 AM
There appears to be in the /mnt/sda1/tce/ondemand folder a bunch of executables which, when run, will mount the loop devices.  That's cool, but sometimes I get an error message and some don't appear to have dependencies that seem logical. 

I.e. I load wbar, so why doesn't Xprogs, Xlibs & Xvesa load (and maybe others?) also mount?

Same if I mount Xprogs.  I try and run startx and it says:

cat: can't open '/etc/sysconfig/Xserver': No such file or directory

Quote from: Rich
No. That is not the purpose of OnDemand. OnDemand is for applications you rarely use if for example you don't
want them showing up in the Applications menu. I personally don't use it and simply install all applications
OnBoot.

Hmmm...  This is pretty cool in that my system starts up way faster, and yet I still have access to other commands if I want them while doing maintenance.  It's just too bad that it doesn't go just that extra step to bring them up and down more easily from the command line, though it is almost there.



A
Title: Re: Ondemand?
Post by: adrian on June 10, 2012, 12:16:32 AM
Hi adrian
Quote
there is a list on the left that are apps that are neither OnDemand nor OnBoot.
Those would be dependencies of other applications. Whether an application is OnDemand or OnBoot, when
it gets mounted, its dependencies get mounted automatically.
Hmmmm. This doesn't appear to be correct.  If I remove an item from OnBoot (move it to the left panel) it will appear on the left panel when I go to OnDemand and vice versa.  This appears to be a 3rd state which appears to be OnBoot as well.


A
Title: Re: Ondemand?
Post by: Rich on June 10, 2012, 12:24:29 AM
Hi adrian
Quote
I.e. I load wbar, so why doesn't Xprogs, Xlibs & Xvesa load (and maybe others?) also mount?
That sounds like a question better answered by roberts.
Quote
It's just too bad that it doesn't go just that extra step to bring them up and down more easily from the command line, though it is almost there.
If you want to install/uninstall applications on the fly, you should consider looking at SCMs.
Quote
This doesn't appear to be correct..........
Fine, the left panel contains any extensions that are not listed in OnBoot or OnDemand. For the most part those
should be dependencies which should NOT be added to OnBoot or OnDemand. When you removed that item
you told the system not to make it available the next time you boot.
Title: Re: Ondemand?
Post by: curaga on June 10, 2012, 04:52:26 AM
Xprogs, Xlibs and your choice of X server are assumed to be installed, and so not listed in each and every dep file.
Title: Re: Ondemand?
Post by: adrian on June 10, 2012, 09:53:50 AM
Xprogs, Xlibs and your choice of X server are assumed to be installed, and so not listed in each and every dep file.

Oh, that's a shame.  I know everyone is into the GUI thing, but as a minimal system, it should not assume that there is a GUI attached. :(

While looking around in the system, I found the package dependency listing command.  I made a shell script to recursively show all the dependencies as known by the package manager.

I've attached it here if anyone is interested.


A
Title: Re: Ondemand?
Post by: curaga on June 10, 2012, 10:22:19 AM
It's a fact that a huge part of the extensions require X. Listing the common components in each of those dep files would increase the load time unnecessarily for each such extension.

Certainly it's a bit more hassle if you usually use only a cli and then load some GUI app. But if you're loading a GUI app on purpose, surely you're also loading an X server (we don't force any choice, you can pick Xvesa, Xfbdev, Xorg, etc) and so can load the two other related extensions.
Title: Re: Ondemand?
Post by: adrian on June 10, 2012, 11:37:38 AM
It's a fact that a huge part of the extensions require X. Listing the common components in each of those dep files would increase the load time unnecessarily for each such extension.
Really?  How much time could that possibly be?  There should be a simple way of doing it where the overhead is less than negligible.

Certainly it's a bit more hassle if you usually use only a cli and then load some GUI app. But if you're loading a GUI app on purpose, surely you're also loading an X server (we don't force any choice, you can pick Xvesa, Xfbdev, Xorg, etc) and so can load the two other related extensions.
Well, that's nice that a user is not bound to a particular X server package, but that doesn't mean anything really.

I've updated that showdep script if anyone is interested.  It now can show if a dependency is not currently loaded.


A
Title: Re: Ondemand?
Post by: solorin on June 10, 2012, 09:44:06 PM
adrian,

it's all text files. nobody is stopping you from appending the necessary X dependencies to the .dep files locally. a task which is also amenable to scripting.

cheerio,
solorin
Title: Re: Ondemand?
Post by: roberts on June 11, 2012, 10:51:24 AM
Xvesa, Xprogs, Xlibs, flwm, and wbar are pseudo extensions. Once part of the base but now factored out by way of community request.  Curaga is spot on with his answer that adding to every extension would cause a needless slow down. Plus the possible conflict with xserver when Xorg is preferred or required. Sometimes using a computer requires a little common sense.

Ondemand is really quite simple creating small load scripts accessed by way of menu and wbar selection.

If you want unloading use scm style extensions.
Title: Re: Ondemand?
Post by: adrian on June 11, 2012, 03:03:54 PM
Ok, whatev.   I will just not load the X stuff unless I'm going to do maintenance and that's easily scriptable.  No biggie. :)


A