View previous topic :: View next topic |
Author |
Message |
r0shi n00b
Joined: 20 Jul 2004 Posts: 62
|
Posted: Thu Apr 05, 2007 11:12 pm Post subject: mplayer script |
|
|
how can i create a script that executes mplayer in a terminal? |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Fri Apr 06, 2007 12:31 am Post subject: Re: mplayer script |
|
|
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 |
|
|
r0shi n00b
Joined: 20 Jul 2004 Posts: 62
|
Posted: Fri Apr 06, 2007 3:43 am Post subject: |
|
|
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 |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Fri Apr 06, 2007 6:00 am Post subject: |
|
|
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 |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Fri Apr 06, 2007 6:11 am Post subject: |
|
|
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 |
|
|
|