Hi all.
Repeatedly loading an extension from OnDemand works for most extensions but not others. It appears related to a mismatch between the .tcz extension name and executable and how OnDemand handles this scenario.
For a non-problematic extension, emelfm for example, I can open an instance of emelfm from OnDemand, close when done and re-open repeatedly during the same session from OnDemand no problem. If i try the same with beaver2.tcz or vlc2.tcz for example, CPU usage spikes to 100%, numerous vlc2 processes are created and repeated killall vlc2 must be issued.
Placing a soft link in the extension's /bin directory appears to fix, see below. Now beaver can be closed and re-opened as many times as desired from beaver2 OnDemand without issue. This simple fix appears to:
- negate the need to create a seperate vlc or beaver menu entry in the Window Manager menu/just use OnDemand
- prevents the processor spike/infinite loop scenario
- ...especially if the user forgets the extension was alreadly loaded from OnDemand
- and actually opens the application upon first OnDemand selection (not just loads it)
Would like to update the extension wiki here:
http://wiki.tinycorelinux.net/wiki:creating_extensions#all_extension_creators_please_note...but wouldn't mind testers to confirm this behaviour/fix. If okay, will add a wiki entry similar to:
Mismatch between extension name and primary executable: If the extension and executable names differ, creating a soft link in the extension's /bin folder linking the extension name to the executable name prevents issues when calling the extension from the OnDemand menu. Example:
Extension name: beaver2.tcz
Executable: beaver
Soft link beaver2 to the executable beaver: tc@box:/tmp/squashfs-root/usr/local/bin$ ln -s beaver beaver2