Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mplayer script
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
r0shi
n00b
n00b


Joined: 20 Jul 2004
Posts: 62

PostPosted: Thu Apr 05, 2007 11:12 pm    Post subject: mplayer script Reply with quote

how can i create a script that executes mplayer in a terminal?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Apr 06, 2007 12:31 am    Post subject: Re: mplayer script Reply with quote

r0shi wrote:
how can i create a script that executes mplayer in a terminal?


Can you give some more details on what you are trying to do? I don't quite understand your question.
Back to top
View user's profile Send private message
r0shi
n00b
n00b


Joined: 20 Jul 2004
Posts: 62

PostPosted: Fri Apr 06, 2007 3:43 am    Post subject: Reply with quote

i want a launcher on my desktop for mplayer.
I want to be able to drag video files onto the launcher and it should be able to launch
the video window as well as the console for mplayer.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Fri Apr 06, 2007 6:00 am    Post subject: Reply with quote

Code:
xterm -e mplayer
Give that as the command in the command field.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Apr 06, 2007 6:11 am    Post subject: Reply with quote

r0shi wrote:
i want a launcher on my desktop for mplayer.
I want to be able to drag video files onto the launcher and it should be able to launch
the video window as well as the console for mplayer.


Mmm. if what you want is to launch mplayer when clicking that icon just create a new desktop icon in whatever desktop you are using, and put as command line "xterm -e mplayer" as suggested above. Depending on how the desktop manages the those icons, you might or might not need to add "$@" to the parameters list, I don't have a clue, its been ages since I used desktop icons at all.

Some desktops also configure the program name and parameters list in different fields in the window for such purpose. You will have to play a bit with that. Note that if you do so, the link will only do something if you drop something into it, other wise mplayer will be run without arguments, and the xterm window will close quickly.

If you need something more, you could do a bash wrapper and use it instead. The wrapper would check if there is a parameter, and, if there is, open it in mplayer using the command above, and if not, it could launch gmplayer or something else instead (that would be when you use the icon in the normal way, without drag and drop).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
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