LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-10-2018, 11:13 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro
Posts: 6,339

Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
Deluge mime types, opening movie files 'default' player changes


I got Deluge, downloaded a movie, going through Deluge, I select open, it opens the movie in a player (VLC). but not always. mp4 movie sometimes it opens dragon player which in turn just shows some graphics crap but not the movie itself. got tired of that, so I removed dragon player ( I don't ever use it anyways),to force it to hopefully open VLC, then gave it another try, and this time it opened the same movie in FireFox and started playing instead.

the MIME editor is set for VLC for both mp4 types it is showing in there on is a movie and the other one is showing that music staff.

Deluge has no where I seen an option to select the player to use for default hwne going through Deluge to open a file, if it is a movie then use same said defualt movie player.

Last edited by BW-userx; 03-10-2018 at 11:15 AM.
 
Old 03-11-2018, 08:48 AM   #2
kevmccor
Member
 
Registered: Aug 2004
Location: Texas
Distribution: slackware
Posts: 81

Rep: Reputation: 21
I hope someone will explain the mime type system in Slackware in this thread. Programs often give themselves the mime default, but these are not necessarily the programs one wants as the default. I use fluxbox and I have not found a good way to manage mime types.
 
Old 03-11-2018, 09:12 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro
Posts: 6,339

Original Poster
Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
You just sparked a thought. The desktop file might be a place to look. I think they do mime types in there too. When I get a chance to get my laptop running I’m going to look into it. I’m on my phone right now.

Last edited by BW-userx; 03-11-2018 at 09:17 AM.
 
Old 03-11-2018, 01:38 PM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,200

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
https://www.linuxquestions.org/quest...1/#post5768895
 
2 members found this post helpful.
Old 03-12-2018, 09:14 AM   #5
kevmccor
Member
 
Registered: Aug 2004
Location: Texas
Distribution: slackware
Posts: 81

Rep: Reputation: 21
Looking at the thread #post5768895, I come up with the following method:

1) identify the mime type of the file in question
Code:
 xdg-mime query filetype path_to_file
2) locate the *.desktop file for the desired application
Code:
 ls /usr/share/applications/  (/usr/share/applications/kde/)
3) set the mime-type default application
Code:
 xdg-mime default application.desktop mime/type
4) test the result
Code:
 xdg-mime query default mime/type
Note the xdg-mime man page recommends only using the command as a regular user during a desktop session.
 
1 members found this post helpful.
Old 03-12-2018, 09:30 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro
Posts: 6,339

Original Poster
Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
Quote:
Originally Posted by kevmccor View Post
Looking at the thread #post5768895, I come up with the following method:

1) identify the mime type of the file in question
Code:
 xdg-mime query filetype path_to_file
where it states file type what is it talking about on exact format of this wording.
in man xdg-mime it shows,

Code:
EXAMPLES
           xdg-mime query filetype /tmp/foobar.png

       Prints the MIME type of the file /tmp/foobar.png, in this case
       image/png

           xdg-mime query default image/png
here, i get I have no idea what you're talking about errors.

mkv
Code:
 
$ xdg-mime --help
   xdg-mime -- command line tool for querying information about
   file type handling and adding descriptions for new file types

Synopsis

   xdg-mime query { filetype | default } ...

   xdg-mime default application mimetype(s)

   xdg-mime install [--mode mode] [--novendor] mimetypes-file

   xdg-mime uninstall [--mode mode] mimetypes-file

   xdg-mime { --help | --manual | --version }

Use 'man xdg-mime' or 'xdg-mime --manual' for additional info.
 
$ xdg-mime mp4   
xdg-mime: unknown command 'mp4'
Try 'xdg-mime --help' for more information.
 
$ xdg-mime mkv "/media/data/deluge-completed/The Man In The Iron Mask (1998)/The.Man.In.The.Iron.Mask.1998.BrRip.720p.x264.YIFY.mkv"
xdg-mime: unknown command 'mkv'
Try 'xdg-mime --help' for more information.
 
$ xdg-mime video "/media/data/deluge-completed/The Man In The Iron Mask (1998)/The.Man.In.The.Iron.Mask.1998.BrRip.720p.x264.YIFY.mkv"
xdg-mime: unknown command 'video'
Try 'xdg-mime --help' for more information.
userx@slackwhere101:~
mp4
Code:
$ xdg-mime query "/media/data/deluge-completed/Viral (2016) [1080p] [YTS.AG]/Viral.2016.1080p.BluRay.x264-[YTS.AG].mp4"
xdg-mime: unknown query type '/media/data/deluge-completed/Viral (2016) [1080p] [YTS.AG]/Viral.2016.1080p.BluRay.x264-[YTS.AG].mp4'
Try 'xdg-mime --help' for more information.
from man page example
Code:
      xdg-mime query default image/png
so I try this,
Code:
 
$ xdg-mime query video/mkv
xdg-mime: unknown query type 'video/mkv'
Try 'xdg-mime --help' for more information. 


 
$ xdg-mime query video/mp4
xdg-mime: unknown query type 'video/mp4'
Try 'xdg-mime --help' for more information.
Quote:
Originally Posted by kevmccor View Post
2) locate the *.desktop file for the desired application
Code:
 ls /usr/share/applications/  (/usr/share/applications/kde/)
3) set the mime-type default application
Code:
 xdg-mime default application.desktop mime/type
4) test the result
Code:
 xdg-mime query default mime/type
Note the xdg-mime man page recommends only using the command as a regular user during a desktop session.
using this command
Code:
 xdg-mime default application.desktop mime/type
appears to have fixed this issue, thus far.

Thanks.

Last edited by BW-userx; 03-12-2018 at 09:43 AM.
 
Old 03-19-2018, 04:31 PM   #7
kevmccor
Member
 
Registered: Aug 2004
Location: Texas
Distribution: slackware
Posts: 81

Rep: Reputation: 21
Quote:
so I try this,
Code:
Code:
 
$ xdg-mime query video/mkv
xdg-mime: unknown query type 'video/mkv'
Try 'xdg-mime --help' for more information. 
 
$ xdg-mime query video/mp4
xdg-mime: unknown query type 'video/mp4'
Try 'xdg-mime --help' for more information.
You are missing an argument: xdg-mime query default video/mkv

I think xdg-mime query requires either "default" or "filetype" to know what to do and the last argument is the specific item.
--> xdg-mime query default mime-type or xdg-mime query filetype path_to_file
 
1 members found this post helpful.
Old 03-19-2018, 04:41 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro
Posts: 6,339

Original Poster
Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
Quote:
Originally Posted by kevmccor View Post
You are missing an argument: xdg-mime query default video/mkv

I think xdg-mime query requires either "default" or "filetype" to know what to do and the last argument is the specific item.
--> xdg-mime query default mime-type or xdg-mime query filetype path_to_file
O'Kay I see what you're saying. thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I think this falls under MIME types but default types BW-userx Linux - General 0 01-03-2016 12:49 AM
[SOLVED] Wine set it as default handler for many mime-types. TruongAn Linux - Software 4 12-25-2010 01:42 PM
mime-types/default actions for new file extensions? lumix Linux - Newbie 1 07-09-2008 03:31 PM
Adobe Acrobat, mime-types and pdf files positrox Linux - Software 1 12-01-2005 06:31 AM
CGI in C: need help determining mime types of files Sm0k3 Programming 1 01-26-2004 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration