Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 11 Dec 2017, 17:26
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Why does ROX filer ignore /usr/share/mime/globs? (Solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
LateAdopter

Joined: 27 May 2011
Posts: 282
Location: Reading UK

PostPosted: Sat 23 Sep 2017, 11:14    Post subject:  Why does ROX filer ignore /usr/share/mime/globs? (Solved)
Subject description: gnome-mpv does too
 

ROX filer in xenialpup64 and fatdog710, do not show valid MimeTypes for my .ts recordings and for my .m3u playlists.

The ROX documentation says:
Quote:
How does the filer decide what icon to show for a file, and which program to use to open it?

For each file, the filer starts by working out its MIME-Type, as follows:

If the file's user.mime_type extended attribute it set, then that is its MIME type.

If the file's name matches a pattern in one of the globs file (usually, /usr/share/mime/globs) then the line in that file gives the type.

If the contents of the file match a pattern in one of the magic files (usually, /usr/share/mime/magic) then that gives the type.

Otherwise, it is text/plain (looks like text), application/x-executable (marked as executable) or application/x-octet-stream (doesn't look like UTF-8 text).

Do not edit the globs and magic files directly, as they are generated from some XML files by the update-mime-database command. If the filer isn't getting the right type for a file, you can use MIME-Editor to change the rules.


The playlist files are identified as plain text even though *.m3u is a defined glob. If I add #EXTM3U at the start of the file they are recognised as audio.

The transport stream files recorded by tvheadend or my satellite receiver are identified as executables even though *.ts is a defined glob. The ones I have edited are identified as video.mp2t which is correct.

So it seems that ROX filer and gnome-mpv may be using the magic numbers but not the globs. But the Gnome developers guide says that globs are preferred.

The files are on a FAT32 drive so they can't have extended attributes.

I presume there is some underlying linux function that ROX and gnome-mpv are using that is not configured correctly.
The files in /usr/share/mime all look sensible.

Does anyone have any idea what might be wrong?
It's not possible to set a run action when the MimeType is incorrect.

Thanks
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 282
Location: Reading UK

PostPosted: Tue 26 Sep 2017, 11:01    Post subject:  

Having installed the GnomeVFS packages, files are now recognised by extension as well as magic number.
Since there may be several types of file with the same extension, it may not guess correctly. I had to edit /usr/share/mime/packages/freedesktop.org.xml to get it to identify .ts as video/mp2t
Also the way other files are identifed may change and break xenialpup64's file associations, which will need to be redefined.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9643
Location: Charleston S.C. USA

PostPosted: Tue 26 Sep 2017, 20:25    Post subject:  

Wonder if this would be an issue, if you had the files on a Linux formatted partition, which would be a Linux file system Idea
Fat32 format is a Windows file system.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 282
Location: Reading UK

PostPosted: Wed 27 Sep 2017, 05:18    Post subject:  

Hello bigpup

I think the extended attribute mechanism would only work if:... the file were written by a unix program that did set the extended attributes on a unix filesystem and then read by a unix program.

My TV media player accepts FAT32 or exFAT, my satellite receiver does FAT32 or NTFS.

Most linux programs are cross platform targeted at Windows and OSX.

For this problem the bugs/blame lie with Gnome/GTK+/XDG:
GnomeVFS was deprecated in favour of GVfs about nine years ago.
I tried installing GVfs but that did not fix it with either ROX or gnome-mpv.

ROX does not identify GnomeVFS as a dependency, but ROX seems to be largely unmaintained for about six years, so maybe GnomeVFS was a base package then.

I am now using gnome-mpv 0.12.0, from buster, which is current and does have a "show all files" option. But the latest build for Xenial is 0.10.0 which does not have "show-all-files" so I could only play by drag and drop or from the command line.

When tvheadend put up the packages for 4.2.x stable branch I will install it and see whether it would write extended attributes for a transport stream recording. I don't want to fiddle with my working copy of 4.1.

There is still a basic defect of the shared-mime-info system: It does not check that the contents of the file match the guessed MimeType. With the system working it guessed .ts was a trolltech text file and wanted to open it with the default text editor, But the linux file command already knows that the contents of transport stream is data not text. I had to delete the trolltech entry in the .xml file to get a sensible answer.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6770
Location: Auckland, New Zealand

PostPosted: Wed 27 Sep 2017, 05:50    Post subject:  

LateAdopter wrote:
Most linux programs are cross platform targeted at Windows and OSX.

Certainly not!
Maybe the big, really well known ones i.e. Libreoffice, VLC, Firefox... but they might only be more well known if you are considering the non-linux using population Smile

Quote:
ROX does not identify GnomeVFS as a dependency, but ROX seems to be largely unmaintained for about six years, so maybe GnomeVFS was a base package then.

I've never noticed any problems like this, although most of my experience is with quite old puppies (which weren't built from other distro's packages). I'd be interested to know if your problems are specific to xenialpup (which I have never used)... have you used any others

_________________
If you have or know of a good gtkdialog application, please post a link here

Classic Puppy quotes

ROOT FOREVER

Last edited by disciple on Wed 27 Sep 2017, 14:48; edited 1 time in total
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 282
Location: Reading UK

PostPosted: Wed 27 Sep 2017, 06:58    Post subject:  

disciple wrote:
I've never noticed any problems like this, although most of my experience is with quite old puppies (which weren't built from other distro's packages). I'd be interested to know if your problems are specific to xenialpup (which I have never used)... have you used any others?
Hello disciple

Since you ask I just checked:...
Fatdog 710 has the same problem as Xenialpup64.

Pemasu's Precise372 the globs work and it does have GnomeVFS already installed. Also it does identify .ts as trolltech linguist too.

I no longer have Lucid Puppy 5.2.8 bootable immediately. Sorry Playdayz.
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 282
Location: Reading UK

PostPosted: Mon 02 Oct 2017, 13:23    Post subject:  

bigpup wrote:
Wonder if this would be an issue, if you had the files on a Linux formatted partition, which would be a Linux file system Idea
Fat32 format is a Windows file system.

Hello bigpup
I installed tvheadend 4.2.3 from Launchpad on my Xenialpup64 remaster. I had to use the package for Zesty because my ffmpeg was too new for the one built for Xenial.
I set it to record to a unix filesystem but the resulting file did not have any extended attributes. It was identified as octet stream data on standard Xenialpup64 707 or 7085, but as video/mp2t Transport stream with GnomeVFS installed. The same as my other recordings.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0449s ][ Queries: 12 (0.0067s) ][ GZIP on ]