You are not logged in.

#1 2009-10-29 11:21:07

PingPing
Member
From: /dev/null
Registered: 2009-07-24
Posts: 39
Website

[SOLVED] How do I play .mp3 in mocp by clicking on it in the file mgr?

I'm running Openbox and PCmanFM.
I'm using Sakura as my terminal.
I've set up a ~/.local/share/applications/mocp-usercreated-0.desktop as:

[Desktop Entry]
Encoding=UTF-8
Name=mocp
Exec=/usr/bin/sakura -e '/usr/bin/mocp -T white_on_black' 
MimeType=audio/mpeg
Icon=exec
NoDisplay=true

and my ~/.local/share/applications/defaults.list is:

[Default Applications]
audio/mpeg=mocp-usercreated-0.desktop

but when I open PCmanFM, navigate to my Music directory and click on any .mp3 file it doesn't work.

Can anyone tell me what I need to do? sad

Last edited by PingPing (2009-10-30 19:55:41)

Offline

#2 2009-10-29 11:34:27

Liquid
Member
Registered: 2009-10-27
Posts: 13

Re: [SOLVED] How do I play .mp3 in mocp by clicking on it in the file mgr?

/usr/bin/mocp-single.sh

/usr/bin/sakura -e '/usr/bin/mocp -T $1'

Open with: /usr/bin/mocp-single.sh

** Don't forget to chmod it ( +x ).

Offline

#3 2009-10-30 20:01:10

PingPing
Member
From: /dev/null
Registered: 2009-07-24
Posts: 39
Website

Re: [SOLVED] How do I play .mp3 in mocp by clicking on it in the file mgr?

Thanks Liquid.  What you suggested didn't quite work but it got me thinking.
I took what you suggested, played around with it and eventually solved the problem with the following mocp-single.sh script:

#!/bin/sh
/usr/bin/mocp -cap $1 & /usr/bin/sakura -e '/usr/bin/mocp && killall mocp'

Offline

Board footer

Powered by FluxBB