1

I'm using ranger and when I navigate to a folder with audio files and press enter it plays mp3 files in terminal.

The terminal audio program isn't my default as when I double click from GUI a different program opens.

I want to figure out what program Ranger is using so I can try using it manually for wave files, which aren't opening in Ranger.

Any suggestions on finding out what program is being used?

enter image description here

  • 1
    you could try strace or similar (e.g. sysdig) to see what is being exec'd – thrig Jun 26 '18 at 1:51
2

The applications which ranger uses are defined in the rifle.conf.

These are the default settings under Fedora for audio related stuff:

#--------------------------------------------
# Audio without X
#-------------------------------------------
mime ^audio|ogg$, terminal, has mplayer  = mplayer -- "$@"
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
mime ^audio|ogg$, terminal, has mpv      = mpv -- "$@"
ext midi?,        terminal, has wildmidi = wildmidi -- "$@"

#--------------------------------------------
# Video/Audio with a GUI
#-------------------------------------------
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
mime ^video,       has mpv,      X, flag f = mpv -- "$@"
mime ^video,       has mpv,      X, flag f = mpv --fs -- "$@"
mime ^video,       has mplayer2, X, flag f = mplayer2 -- "$@"
mime ^video,       has mplayer2, X, flag f = mplayer2 -fs -- "$@"
mime ^video,       has mplayer,  X, flag f = mplayer -- "$@"
mime ^video,       has mplayer,  X, flag f = mplayer -fs -- "$@"
mime ^video|audio, has vlc,      X, flag f = vlc -- "$@"
mime ^video|audio, has totem,    X, flag f = totem -- "$@"
mime ^video|audio, has totem,    X, flag f = totem --fullscreen -- "$@"

Locate your ranger config folder(usually $HOME/.config/ranger), open the rifle.conf file and search for those lines.

  • I don't have a rifle.conf in that folder. The folder does exists and contains these sub-folders: bookmarks history tagged – Philip Kirkbride Jul 24 '17 at 20:29
  • 1
    Look for the file in /usr/share/doc/ranger/config – jsus Jul 24 '17 at 20:32
  • so ranger has re-invented mailcap(5)? – cas Jul 25 '17 at 2:28
  • Where is rifle.conf located? @jsus – alper Jun 6 '18 at 9:19
-1

After startup, ranger creates a directory ~/.config/ranger. To copy the default configuration to this directory issue the following command:

$ ranger --copy-config=all

rc.conf - startup commands and key bindings
commands.py - commands which are launched with :
rifle.conf - applications used when a given type of file is launched.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.