(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 Sep 2020, 22:45
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
ROX-xdg 1.5
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 2 of 3 [33 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
musher0

Joined: 04 Jan 2009
Posts: 15041
Location: Gatineau (Qc), Canada

PostPosted: Thu 19 Sep 2019, 18:01    Post subject:  

foxpup wrote:
musher0 wrote:
the next Puppy authority after God
"Next after God"???
Really, musher0 !?
He is The Puppy Authority. God does not stand a chance here Wink

I don't have anything to say about the matter of mimetypes btw. I am a total noob. Embarassed

Hi foxpup,

Well... BarryK described himself as the "benevolent dictator of PuppyLinux" when he
was actively involved in developing it! To me, that's pretty close to "only master on
board after God", the traditional designation of the captain of a ship! Smile

You know nothing about mimetypes, but perhaps you can tell us if you ever had any
problem launching files from a ROX window? That's what this is about.

I'm all for better "mouse traps", and for personal innovations, and mistfire is certainly
a talented coder, but I just don't see the need here for a new approach.

BFN.

_________________
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9400
Location: Perth, Western Australia

PostPosted: Thu 19 Sep 2019, 19:21    Post subject:  

There is a problem...

The ROX right-click menu has "Open as text" which no longer works.

It relies on /etc/xdg/rox.sourceforge.net/MIME-types/text, the old one, which has "exec defaulttexteditor $@" in it.

Oh dear, how to get around this? Other than modifying the source code in rox, I can't see how.

Besides, Easy|Puppy already has default handlers for /etc/xdg/rox.sourceforge.net/MIME-types/text, audio, image, video, application, and my understanding is that if say video_blahblah does not exist, then rox will fall back to using 'video' which will call the default handler.

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 5524
Location: Ontario

PostPosted: Thu 19 Sep 2019, 19:33    Post subject:  

Quote:
The ROX right-click menu has "Open as text" which no longer works.

I never use this feature. I prefer 'Open with' folder links.
______________________________________
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9400
Location: Perth, Western Australia

PostPosted: Thu 19 Sep 2019, 19:53    Post subject:  

OK, think have sorted it. The old system has to be kept, but so can mistfire's new system be used.

With mistfire's system on its own, there is that problem of "Open as text". Also, there are some files that do not open anymore, such as application/x-notecase.

What I have done is kept all of the old handler scripts, as well as the new symlinks 'audio', 'image', 'video' and 'application', but not the 'text' symlink.

What that does is behave as before, but if there is no handler for, say png images, that is, no 'image_png' or 'image_x-png', then rox will fall back to using 'image' which is mistfire's system.

Of course, we could just have 'image' with "exec defaultimageviewer $@" in it, which kind of makes mystfires system unnecessary.

Hmmm, click on an application, say 'asunder', it does not open in the new system. The fallback should be to just run the application.

Not looking too good for the new system!

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Thu 19 Sep 2019, 20:22    Post subject:  

Thanks @Barry for the comment. I think audio video application scripts will be retain. Also I will change the post-install scripts in order to act rox-xdg as fallback script. In order to coexist old and new system.
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Thu 19 Sep 2019, 20:31    Post subject:  

ROX-xdg 1.4 released

* Some improvements
* Changes in post-install scripts. This new system coexists with the old as fallback.
* audio, video, text, and image script removed. Only application scripts.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9400
Location: Perth, Western Australia

PostPosted: Thu 19 Sep 2019, 20:37    Post subject:  

@mistfire,
Your system has been good for me, as it has made me rethink how it all works, though I decided not to use it, see the appendage to my blog post:

http://bkhome.org/news/201909/rox-filer-dynamic-handling-of-mimetypes.html

The benefit of studying your work has revealed to me a shortcoming in the "old" system as implemented in WoofQ, and I created fallbacks, as reported in the above link.

My fix in WoofQ seems not appropriate for woof-CE. Looking at the woof-CE github, there is no rox mime handling in rootfs-skeleton, so they expect it all to be in the rox pet -- so any fixes would have to be in whoever creates the rox pet.

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Thu 19 Sep 2019, 20:39    Post subject:  

BarryK wrote:
@mistfire,
Your system has been good for me, as it has made me rethink how it all works, though I decided not to use it, see the appendage to my blog post:

http://bkhome.org/news/201909/rox-filer-dynamic-handling-of-mimetypes.html

The benefit of studying your work has revealed to me a shortcoming in the "old" system as implemented in WoofQ, and I created fallbacks, as reported in the above link.

My fix in WoofQ seems not appropriate for woof-CE. Looking at the woof-CE github, there is no rox mime handling in rootfs-skeleton, so they expect it all to be in the rox pet -- so any fixes would have to be in whoever creates the rox pet.


Thats okay. I will just leave this package here on this forum.
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Thu 19 Sep 2019, 20:47    Post subject:  

Based on Barry's observation. audio, image, video, and text can simply use the following script.

for audio and video
Code:
#!/bin/sh
exec defaultmediaplayer "$@"


for image
Code:
#!/bin/sh
exec defaultimageviewer "$@"


for text
Code:
#!/bin/sh
exec defaultexteditor "$@"


However I noticed that the application/* has a different story.

Here are the examples:
Code:
application/x-7z-compressed
application/x-7z-compressed-tar
application/x-ace
application/x-alz
application/x-annodex
application/x-ape
application/x-ar
application/x-arj
application/x-bittorrent
application/x-btsnoop
application/vnd.rn-realaudio


So I made a new approach. Only application script on MIME-types folder must retain to act as fallback mode to search default app at xdg level. So in this manner still the rox-xdg provides more flexibility and retains being dynamic. Rather ROX-xdg is now a plugin for rox-filer
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9400
Location: Perth, Western Australia

PostPosted: Thu 19 Sep 2019, 21:35    Post subject:  

@mistfire,
Yes, I think that your last post pretty much sums it up.

I made another modification to my blog post:

http://bkhome.org/news/201909/rox-filer-dynamic-handling-of-mimetypes.html

I need to think some more about the 'application' mime type. Not now, have to rush off to a family gathering.

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Thu 19 Sep 2019, 22:28    Post subject:  

@musher0

Calm down, don't panic. The recent rox-xdg can coexist with the old system and yet enhance the rox-filer's flexibility. Thanks to Barry.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Thu 19 Sep 2019, 23:26    Post subject:  

BarryK wrote:
There is a problem...
The ROX right-click menu has "Open as text" which no longer works.
It relies on /etc/xdg/rox.sourceforge.net/MIME-types/text, the old one, which has "exec defaulttexteditor $@" in it.
Oh dear, how to get around this? Other than modifying the source code in rox, I can't see how.
What do you mean by "the old one"? Call it the "neglected one". Your problem arises because mistfire places his scripts into the directory /root/.config/rox.sourceforge.net/MIME-types. IMO this is wrong. The scripts should go into /etc/xdg/rox.sourceforge.net/MIME-types.

These are the directories where ROX looks for its run scripts, in following order. Note that ROX first scans directories 1) - 3) for mime subtypes, e.g. image_png. If not found it scans again for main types, e.g. image.
    1) /root/.config/rox.sourceforge.net/MIME-types
    2) /etc/xdg/rox.sourceforge.net/MIME-types
    To be compatible with very very old ROX versions it then checks the now deprecated
    3) /root/Choices/MIME-types

IMO 3) shouldn't be used anymore. All scripts should go to 2). These are the defaults. 1) should be reserved for user specific associations where the user can override the defaults.

Now to your "Open as text" problem: When you "Open as text" (or Shift+click) ROX does not rely on /etc/xdg/rox.sourceforge.net/MIME-types/text. Firstly, the mime type it looks for is text/plain. Currently ROX relies on /root/Choices/MIME-types/text_plain, but with its low priority and mistfire's scripts now in /root/.config/rox.sourceforge.net/MIME-types ROX will never find it.

Solution 1: Remove /root/Choices/MIME-types/text_plain. ROX will fall back to type text and run mistfire's script. Haven't tested, but should work.

Solution 2: With text_plain in 1) and mistfire's scripts in 2) it will work.
Back to top
View user's profile Send private message 
foxpup

Joined: 29 Jul 2016
Posts: 1141

PostPosted: Fri 20 Sep 2019, 04:04    Post subject:  

@musher0

You are probably right BK is no longer Puppy God himself since he left Puppy to the Community.
God of Puppy is now the main dev at woof CE, who is almost invisible and the Community who is everywhere an nowhere, like many traditionnal gods. lol

I do sometimes have trouble launching things by clicking in ROX.
Sometimes it is a bad/non-existing (default) application.
If it is an unknown type of file, there is an item in the right-click menu to appoint the default handler app. It seems to work for me like that.
If I have msWord (on wine) next to LibreOffice and AbiWord, I can detail what app takes what kind of text document. Exclamation
For me that is all I need. But I can imagine there is room for improvement.
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Fri 20 Sep 2019, 04:55    Post subject:  

ROX-xdg 1.5 released

*Some improvements on rox-xdg-open script
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9400
Location: Perth, Western Australia

PostPosted: Fri 20 Sep 2019, 07:09    Post subject:  

MochiMoppel wrote:
These are the directories where ROX looks for its run scripts, in following order. Note that ROX first scans directories 1) - 3) for mime subtypes, e.g. image_png. If not found it scans again for main types, e.g. image.
    1) /root/.config/rox.sourceforge.net/MIME-types
    2) /etc/xdg/rox.sourceforge.net/MIME-types
    To be compatible with very very old ROX versions it then checks the now deprecated
    3) /root/Choices/MIME-types

IMO 3) shouldn't be used anymore. All scripts should go to 2). These are the defaults. 1) should be reserved for user specific associations where the user can override the defaults.

Now to your "Open as text" problem: When you "Open as text" (or Shift+click) ROX does not rely on /etc/xdg/rox.sourceforge.net/MIME-types/text. Firstly, the mime type it looks for is text/plain. Currently ROX relies on /root/Choices/MIME-types/text_plain, but with its low priority and mistfire's scripts now in /root/.config/rox.sourceforge.net/MIME-types ROX will never find it.


Thanks for the clarification about text/plain

Yes, in WoofQ, I have put all the rox mimetype handling and open-with handling into /etc/xdg/rox.sourceforge.net

I just now had a look at the woof-CE github repo, and there is no rox mime handling stuff in it, I guess because they want to keep it file-manager-neutral. Then it is up to whoever creates the rox PET to build the mime handling into the right paths.

In WoofQ, I have considered rox to be an integral part of EasyOS and Quirky, so it is built-in, and will override whatever mime handling is in the rox PET.

But ha ha, yes, there are different "gods" running the show now.

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 3 [33 Posts]   Goto page: Previous 1, 2, 3 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1302s ][ Queries: 12 (0.0366s) ][ GZIP on ]