MyDSLgui


Forum: myDSL Extensions (deprecated)
Topic: MyDSLgui
started by: Rapidweather

Posted by Rapidweather on Nov. 08 2004,22:37
I've placed several mydsl applications in the CD, some in /optional and some in the root of the cd. If I use the MyDSLGUI to load one of the apps in /optional, such as Firefox, or Gimp, then I cannot open my cdrom drawer to play a music cd, for instance. I boot with the "toram" option, and this should allow me to remove the DSL cdrom, and put a music cd in the drive and play it. I can open the drawer before I start the MyDSLGUI, but not after I do that.
---
I tried to umount cdrom, but it says the drive is busy.
---
I looked in TOP, to see if perhaps there was a process I could kill, so as to release the cdrom drive, but there was not one.
---
I note that even after I "load" the applications from the /optional directory on the cd, that when I actually start the app via the Menu, or
Desktop Icon, then the cdrom drive spins a bit. Apparently it is needed
from then on, even if you start the application, and then try and get the cdrom drive unmounted.
---
I looked at the mydslgui.pl script, and cannot determine what may be done to unload, if that is the word, the script, so the cdrom drive can be used.
---
I'll have to move the applications over to a USB pen drive, or to a hard drive partition, and keep none of them in the root of the cd, or in /optional in the cd. That then would keep the cd drive free, and I can play music cd's or whatever other use I may have for the drive, IF I boot with
"toram". Failing to do that, and the drive is locked for the duration of the session, whether or not one has
mastered in .dsl applications into the cd.
---
Any suggestions?
???

Posted by cbagger01 on Nov. 08 2004,23:42
Are you using any *.uci or *.ci extensions?

These extensions require direct access to the storage device because the files are not stored in the RAMdisk.

try typing:

mount

on a blank line and see what your currently mounted filesystems are listed.

Posted by Rapidweather on Nov. 09 2004,00:43
I am using the opera.uci and the firefox.uci.
---
When I do "df" in an rxvt, I discovered that they are now part of the filesystem,
and so I decided to write a little script, accessed via the menu, to unload them if
I want to play music cd's for a while.
---
Code Sample
#!/bin/bash
#
# closeuci, version 0.1
# For Rapidweather Remaster of DSL Linux.
# file location, /home/dsl/.fluxbox/closeuci
# unmount opera.uci and firefox.uci
# If you have more .uci's, modify this script.
# these .uci's are in /optional in the cdrom
# you mastered them in the DSL cd
# made part of the filesystem via mydslgui
# This script is accessed via menu item:
# Menu - > Apps - > Tools - > Unlock CD Drawer.
# unmount any of these, mounted or not.
sudo umount /mnt/cdrom/optional/firefox.uci
sudo umount /mnt/cdrom/optional/opera.uci
# now that all uci's are unmounted, print this:
echo " All uci's have been unmounted from the filesystem."
# Now unmount the cdrom drive, so we can open the drawer.
sudo umount /mnt/auto/cdrom
# now that the cdrom drive is unmounted, print this:
echo "The cdrom drive is unmounted, the drawer can be opened"
# None of this could be seen in the GUI, so let Dillo tell it.
# You need to make this little html page for Dillo to use:
dillo -f /home/dsl/html/cdrom_open.html &>/dev/null &
# end closeuci
exit 0

---
Here is the menu item:
Code Sample
[submenu] (Tools) {}
        [exec] (myDSL Click and Load){mydslgui.sh}
[exec] (Unlock CD Drawer) {/home/dsl/closeuci}
        [exec] (Net MAN) { rxvt -rv -T "Internet MAN" -e /usr/local/bin/getman}

---
Notice that I put it next to the MyDSL Click and Load.
Also, one could simply run this in an rxvt, and not have the fancy Dillo
message, with this html:
Code Sample
<html><head><title>cdrom drive now open</title>
<body bgcolor="#c0c0c0">
<center>
<br><br>
<hr width="440" size="4" align="center"><br>
<font color="#000000">
<table border="2" bgcolor="#dcdcdc" width="95%" cellspacing="3" cellpadding="3">
<tbody>
<tr><td align="center" bgcolor="#eeeeee"><p>
<font color="BLACK"><h3>
You may now open the CDROM<font color="BLACK"> drive drawer and remove the CD.</p>
<p>The CDROM drive may now be used to play music cd's, for instance. </p>
<p>Earlier in this session, you loaded either Firefox or Opera<br> using the MyDSL Click and Load GUI, <br>
and the CDROM drive drawer was locked. </font></h3></p>
<p><B><font color="BLACK">If you wish to use either Firefox or Opera again, you will need <br>
to replace the DSL cdrom in the drawer, and run the MyDSL Click and Load GUI.  </font></B></p>
<h3>For more information, look at the<A HREF="getting_started.html"> Getting Started Guide.</a></h3><br><br>
<p>The /home/dsl/closeuci script has been made for Rapidweather Remaster Version 0.2.8, and is used to unlock the
CDROM drive drawer if MyDSL .uci applications are mastered into the CD, and are loaded into the system using
the MyDSL Click and Load GUI.
The cdrom drive drawer is locked by the MyDSL Click and Load GUI when these apps are loaded.
The closeuci script unloads the Firefox and Opera uci's and unlocks the cdrom drive drawer.
</p>
<br><br>
</td></tr></tbody></table>
<br>
<hr width="440" size="4" align="center">
<br><br>
</center></body></html>

---
All this has a limited usefulness in that only a few master in the MyDSL applications, and only the .uci's are affected. I have a bunch of Dock Apps in
the root of the CD, and in /optional I have Gimp 1.2 and Abiword, both .dsl's
and Opera and Firefox, the offending .uci's.
---
The location of the closeuci is given in the script, and I "chmod +x closeuci" and
also chgrp to staff and chown to dsl, then copy it over to my /etc/skel for inclusion in the next build. Same thing with the menu item, and the html.
---
The DSL development team is invited to rewrite this script to a nicer form,
and use it if you want or need it. It's possible to include this in the mydslgui.pl
script, to completely unload the .uci applications, to allow the cdrom drive, hard drive partition, or pen drive to be unmounted. Everyone would have to think about why this might need to be done. I do know that a "toram" boot option is
necessary to be able to get a music cd in the drive, without it, one cannot.
With the addition of the very useful and fast .uci's into the cd, we have another way where the cd drive can get locked.
---
:;):

Posted by Rapidweather on Nov. 09 2004,00:51
One must close Firefox and/or Opera, or the script will fail to do what it is supposed to.
This gives you a failsafe, in case you run this script and are
using one of the applications, it will not crash or disappear on you. I need to
think about that, perhaps I will just run the script from the menu using an
rxvt, and leave out the dillo part. If the script fails, then the dillo part runs
anyway, giving a false message. Rough way to do it would be to use "killall's" to
drop Firefox or Opera if they are open. Opera will complain next time, but Firefox
won't.
---
 :;):

Posted by roberts on Nov. 09 2004,01:10
The ability to "unload" umount the uci is already part of DSL.

You can use elemfm to navigate to the uci and then double-click and the uci is mounted. Later if you double-click again it is "unloaded" umounted. You can also use the mydsl button in elemfm with the same results. You can also use the cli mydsl-load with the same results.

Posted by Rapidweather on Nov. 09 2004,02:20
I'll get busy and work with that a while.
---
If I find out anything interesting, I'll get back in here.
 :D

Posted by Rapidweather on Nov. 10 2004,01:15
roberts is right.
I did tests with my script, and eventually, the system gets to the
point where the MyDSL apps will not load anymore. I get a message, "can't find
/dev/cloop8".
So, the Official DSL way is the _way_ to do it, Use the MyDSL GUI to load
the applications, and when through with them, use the MyDSL GUI to unload them.
The use of emelfm gives a response in the bottom pane, however, that you
can see. At this point, 0.8.2, the MyDSL GUI does not have "unload" buttons, or any other way to _know_ what you have, and need to do.
---
I have this little message in my Remaster of 0.8.2 that tells what to do
when you want to unload the apps, and use the CDROM to play music:
----------------------------------------------------------------------------------
Quote

Rapidweather Remaster Version 0.2.8, Beta

Based on Damn Small Linux 0.8.2

What's Different about Version 0.2.8?

The Getting Started Guide provides detailed information about
the Rapidweather Remaster series. Version 0.2.8 is different
in that Mozilla Firefox and Opera are not mastered in to the
filesystem, as with other Rapidweather Remaster versions.
All of the additional applications are added to the root of the
CD, and are MyDSL applications that need to be loaded into the
running system.

About this CD:

Here are some guidelines for setting up the system:

The following applications are included in the /optional directory
in the CD, and are to be loaded using the MyDSL Click and Load GUI,
accessed with the MyDSL icon on the desktop:

Mozilla Firefox, Opera 6.12, Gimp 1.2, and Abiword.

You may load any or all of them, and then start the programs
using the Menu.

Important: Should you want to unload any of the applications,
or all of them that you have loaded, so that the CDROM drive
drawer may be opened, follow this procedure:

1. The applications in the /optional directory in the CD are MyDSL
  applications that are not part of the filesystem until they are
  loaded into the system as described above. Once any of them are
  loaded, then the CDROM drive drawer is locked.

2. If you use the MyDSL Click and Load GUI to load an application,
  it may be used to unload it, by clicking on the application again.
  Be sure that the application is closed before doing that.
 
3. The MyDSL Click and Load GUI will not reflect that the application
  is unloaded, as it is only designed to load applications.
 
4. Another way to unload an application found in the /optional
  directory in the CDROM, is to open a root shell (top menu item),
  and start emelfm. Navigate to the /mnt/auto/cdrom/optional directory
  on the CDROM, and highlight the application that you wish to either
  load or unload. Click on the MyDSL button in the center panel of
  emelfm. In the output pane at the bottom of emelfm, you will see
  a message.
 
  A loaded application will show:
 
  opera.uci successfully mounted! (an example for Opera 6.12)
 
  Then, to unload the application, click the MyDSL button again.
  This message will appear:
  /mnt/auto/cdrom/optional/opera.uci on /opt/opera type iso9660 (ro,loop=/dev/cloop1)
  Although this does not say that the application is unloaded, this is
  all that you will see, and the application is now unloaded.
 
5. At this point you can use the menu item to unmount the CDROM drive
  from the filesystem, so the CDROM drive door can be opened.
  If you have booted the system with the boot option "toram", then
  you can do this. Otherwise, you cannot.
 
6. Once the CDROM drive drawer is opened, and the DSL CD is removed, you
  may replace the CD with a music CD, and use the menu item for XMMS
  Play CD to play music on your system.
 
7. Should you now want to load one or more of the MyDSL applications,
  replace the DSL CD in the CDROM tray, and use the MyDSL Click and
  Load GUI, or emelfm to load them into the filesystem, so they can
  be run using the menu.
 

The Dock Apps are in the root of the CD, and are
already loaded, ready for menu access.

Rapidweather Remaster Version 0.2.8 Beta is a work in progress,
and some of the changes are experimental.

--------------------------------------------------------------------------------
I have done extensive load and unload, play CD, etc using this method,
and have no problems.
----
So, any of you trying out my code sample in the earlier posts, be forewarned
that it did not stand up to the test of time, and I discarded it, in favor of
the Official DSL way.
I did decide to add this to my fluxbox menu, to allow some control of the
CDROM drive, once the MyDSL applications are unloaded, and I am
wanting to open the drive drawer:

Code Sample
[submenu] (CDROM Drive)  {}        
[exec] (Mount) {rxvt -rv -T "Mount_CDROM" -e sudo -H mount /dev/cdrom -t iso9660 /mnt/auto/cdrom }
[exec] (Unmount) {rxvt -rv -T "Unmount_CDROM" -e sudo -H umount /mnt/auto/cdrom }
       [end]

---
I don't know if the latest DSL has any changes to the MyDSL Click and Load GUI that has an "unload" section, buttons, etc.
That would be simpler to use than emelfm, although once you get used to
using emelfm, it's very nice for this load/unload work.
---
Note for Remasterers:
Also, it is useful to master- in the file /opt/mydsl-drives that shows "cdrom"
if one is going to put the MyDSL applications in /optional in the CD.
That way, you don't have to fill it out in the MyDSL GUI, it comes up ready to
use, with your applications already there.
If you want, add it to your filetool.lst, and once you use the MyDSL GUI, the file will be in /ramdisk/opt/mydsl-drives for your backup to pick up.
That may be easier for the non-remastering folks.
---
:;):

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.