# Associating .mp3 with mpg123 in mc



## balanga (Aug 26, 2018)

I've trying to figure out how misc/mc handles .mp3  files in its extensions menu (F9 -> c -> e -> u)...

It currently launches multimedia/vlc by this mechnism which I don't understand:-

```
shell/i/.mp3
<------>Open=/usr/local/libexec/mc/ext.d/sound.sh open mp3
<------>View=%view{ascii} /usr/local/libexec/mc/ext.d/sound.sh view mp3
```

I would like this to launch audio/mpg123 instead, but not sure how. Anyone know?


----------



## ShelLuser (Aug 26, 2018)

That same file has a huge documentation section on top which explains the entire format. Anyway, this should be obvious: right now it runs /usr/local/libexec/mc/ext.d/sound.sh to handle mp3 files, and according to that shellscript mpg123 is already the default:


```
do_open_action() {
    filetype=$1

    case "${filetype}" in
...CUT....
    mp3)
        if [ -n "$DISPLAY" ]; then
            (xmms "${MC_EXT_FILENAME}" >/dev/null 2>&1 &)
        else
            mpg123 "${MC_EXT_FILENAME}"
        fi
        ;;
```


----------



## balanga (Aug 27, 2018)

Thanks for the explanation, although on my system, when I press ENTER against a filename it invokes multimedia/vlc

My /usr/local/libexec/mc/ext.d/sound.sh is the original. I've never looked a it before.


----------

