Ah, I see. That's a bit different than I had envisioned. It sounds more like Debian's 'alternatives' framework.
xdg-open and friends choose a program based on filetype detection (for example, mimetype). Ideally, dtopen would use CDE's own action database to open a file, with the same result as if the user had opened the file from within the desktop file manager. Your wrapper (if I now understand correctly) assumes the filetype from user input (eg. which script is run), and then works off its own list. Both of these functionalities are related and useful, yet solve different problems. How about this? dtopen acts as xdg-open and friends by default, but has a flag to force the file type. So, for example: $ dtopen myfile # detect file type, take default CDE action $ dtopen -t video # no detection, open file in a video player $ dtopen -t image # no detection, open file in an image viewer Etc... we could also stick with symlinks over flags if you feel that is better for some reason (or provide both... *shrug*). Maybe CDE already has a script or program to open a file based on the action database, which would make this somewhat redundant. However, that would also make implementation easier, and I think there is value in having this conventional interface. I'd be happy to submit a patch if you like the idea. -mrt Original Message From: Jon Trulson Sent: Thursday, July 19, 2018 21:25 To: cdesktopenv-devel@lists.sourceforge.net Subject: Re: [cdesktopenv-devel] Integration of Antonis Tsolomitis' desktop_approots tarball, with some changes On 07/19/2018 08:15 PM, Matthew R. Trower wrote: > Hi Jon, > > Do I understand correctly that dtapp is meant to function in the same vein as > open, xdg-open, gnome-open, etc? > > As in, I can type > > $ dtapp mypic.jpg > > And my picture will open up in some suitable image viewer? If so, might you > consider continuing this naming convention by naming it dtopen? (or have I > misunderstood, and maybe it just returns a string?) > > It's not a critical point, but I thought I might mention it for consideration > before dtapp gets wired into everything and particularly before people start > using it/scripting with it =) > That's a good point. At XiG, I called it dthelper, but I didn't like that so I used dtapp for these commit(s). I don't really like that either. :) Right now, dtapp is just a simple shell script that is symlinked to various per-type specific "aliases" - ie: for images it would be dtapp_vimage "filename" to call a list of programs in order to display it (xv, display, etc). I didn't really like "dtapp" and "dtapp_vimage", etc though. I like your idea a lot better. dtopen would be the "base", it's symlinked aliases would be something like dtopen_image, dtopen_video, etc. Yes, I do like that name a lot better. I'll make the change. In the future, we can certainly enhance/replace dtopen if/when we like. Thanks for the suggestion! -jon > - mrt > Original Message > From: Jon Trulson > Sent: Thursday, July 19, 2018 21:05 > To: Antonis Tsolomitis; cdesktopenv-devel@lists.sourceforge.net > Subject: [cdesktopenv-devel] Integration of Antonis Tsolomitis' > desktop_approots tarball, with some changes > > Hi Antonis, > > I'm also CC'ing the CDE list for their information as well. > > I have finally managed to integrate much of the stuff you provided in > your desktop_approots tarball. WRT the icons, I just put them all in. > If someone has a problem and complains, they can just ask us to remove it. > > I did not incorporate your Greek versions of the .dt files. I don't > think CDE has enough in it to actually support the Greek locale, as > there is no Greek localization database. I am not sure if you just add > the Greek support on top of a built CDE, or what as there is currently > no support for installing the Greek locale. > > So I am confused. If you build CDE from scratch, how do you install it? > And does everything work properly in Greek? > > At any rate, until we know what's going on there, I did not add those > files as they would need to be redone anyway to reference appropriate > Greek messages via the NLS substitution that goes on when generating the > final .dt files for each locale. > > I made some other changes as well. I mentioned that I had created a > "helper" program at XiG that would look for a command in a command list > to do various things like display an image, display a video, etc. It's > now installed in /usr/dt/bin/dtapp. > > I created 4 new actions that use this new helper script: > > DisplayImage, DisplayVideo, DisplayPS, DisplayPDF > > These are now called on the appropriate files (DisplayImage for .png, > .jpg, etc files). > > The actions you provided for xv, xpdf, gv, and vlc are still present, > but no longer contain the data type definitions. Only Actions are > present in those files now. > > The video datatypes have been moved into a new videoTypes.dt file. All > that file is for, is to detect video files, display the proper icon > (video) and call the appropriate action (DisplayVideo). > > The other datatypes for PS, PDF, and images (jpg, png, etc) have been > moved into datatypes.dt (or replaced the disabled ones already there). > > So with these commits, all of your appgroups are present and will run > the appropriate program if it exists. > > And image, video, PDF and postscript files will now be handled by dtapp, > which will look for and call the first appropriate program found. > > In time we should also add support for audio handling, and maybe split > out some of the stuff in datatypes.dt into appropriate .dt files > (soundTypes.dt, etc). > > Thanks much for your contribution! > > -jon > > > > > > On 06/27/2018 07:54 AM, Antonis Tsolomitis wrote: >> >> Dear Jon, >> >> I attach two things. The desktop_approots.tgz which contains the setup >> for modern apps >> and the file icons.txt which contains the paths of the icons that are >> taken from GPL programs (except xv). >> >> To install desktop_approots on a system you execute as root: >> >> mv desktop_approots.tgz /etc/ >> tar -xzvf desktop_approots.tgz >> cd desktop_approots/ >> ./integrate_all_apps.sh >> >> Then you either logout-login or reload applications and actions. >> >> To deinstall, each folder in desktop_approots/ contains a deinstallation >> script. >> >> Please use the files I send now and not the older one as I corrected >> several things/bugs. >> >> All applications will appear in the Application manager of CDE and can >> be dragged and dropped on open drawers >> of the CDE panel. >> >> Now, I have taken some decisions for this. Some are obvious. For >> example, odt/doc/xls etc files open with >> libreoffice (careful: some systems call it soffice, others >> libreoffice-version. In such cases one must create >> links) >> >> Others are less obvious: >> >> 1. Media files open with vlc (I think is the most popular) >> 2. pictures open with xv. This I do not like because it is not a free >> program but a decision is needed. What to use? >> Eye of gnome? Eye of mate? something else. I chose xv as it looks >> good on CDE. But if you tell me to change it >> to something else I will gladly do it. >> >> 3. postscript files open with gv (not installed by default on most systems) >> 4. pdf files open with xpdf (again not installed by default on most >> systems. Any other suggestion is welcome) >> However the icon for pdf files is chosen to be the one for >> acroread. People are familiar with it. >> >> Finally one of the very useful applications for a desktop is pavucontrol >> called PulseAudioCtrl in Application Manager >> (group Sound&Video) >> since CDE lacks an app for sound. Actually I think that this application >> is absolutely needed. Maybe it should be even >> by default installed in some drawer of the panel. >> >> I also think that the default action of the mailer must change in the >> distribution of CDE to something else until dtmail >> gets fixed to work in a modern environment. Evolution of thunderbird are >> great choices. >> >> For any bugs or suggestions for improvement, please write to me. >> >> Thank you for your help, >> >> Antonis. >> >> > [...] > -- Jon Trulson "Fire all weapons and open a hailing frequency for my victory yodle." - Zapp Brannigan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel