LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Running MPlayer from the GUI, not the command line... (https://www.linuxquestions.org/questions/linux-software-2/running-mplayer-from-the-gui-not-the-command-line-304527/)

xbill311x 03-21-2005 09:53 PM

Running MPlayer from the GUI, not the command line...
 
Hi all,

K, really really dumb question... I've installed Mplayer from RPM, and It runs fine when I use the shell to open it (still in KDE, that is). I'm still learning Linux, so bear with me. :)

How would I create an icon for me to click on to open Mplayer? Not that I don't enjoy spitting commands into the shell, as that is how I've been learning. I feel dumb for even asking the question, but right now I'm still working on the basics. Former Windows user. :)

Oh, by the way, I'm running Red Hat 9.

Anyway, thanks again, and I'm sure I will have more dumb questions soon, lol.

Bill

kryptonite0110 03-21-2005 10:20 PM

i don't know the *RIGHT* way to do it, but the way i always did it was to create a shell script...
create a file containing:

#!/bin/sh
mplayer

and then run chmod +755 filename
then cp filename ~/Desktop/
(~ stands for home directory)
if it doesn't work tell me

mickyg 03-22-2005 07:22 AM

I may be wrong on this one but I'm pretty sure mplayer is a command line only app, if you want a gui front end to it look for gmplayer.

krytonite0110 - I'm suprised that works, I would have thought it would fall over asking for a file to play??

Lier 03-22-2005 09:19 AM

I think the same as mickyg, you need to run gmplayer from an icon you can't run mplayer without the giving it the file and other stuff to start playing.
And if you want to create a link to the aplication on the desktop (i'm using SuSE 9.2 with KDE) on the desktop right-click then create new->file->link to aplication... and then in the "aplication" tab just put gmplayer and then ok, that will work.

PTrenholme 03-22-2005 10:59 AM

Quote:

Originally posted by mickyg
I may be wrong on this one but I'm pretty sure mplayer is a command line only app, if you want a gui front end to it look for gmplayer.
[snip]

Since a mention of KDE was made, I'd suggest that an instalation of "kplayer" might work. It does for me.

In any case, to add an item to the KDE menu, just go to the "menu editor" (usually in the "More Preferences" section of the "Preferences" item, and click on "Add Item." Enter the item name (Your choice, it's just for display.) and the command you want to run in the "Command" line. Click on the (blank) icon and select an icon from the displayed list (if you want an icon -- blank is just the default, which works too).

Move the item to the place you which to locate it, and click the "Save" button. (Alternatively, move to where you want the item and then click the "Add Item" button and proceed as described above.)

CAUTION: If you rearrange your menu items in the menu editor by moving a whole group of items (e.g., a "tree branch") do a "Save" right after doing the move. I've lost menu items by skipping the "Save"

Here's a screen-shot of my kplayer setup. (Oh, the MPlayer items you see are links to "gmplayer," which works well too.

xbill311x 03-22-2005 07:51 PM

Cool, thanks, I'll give those progs a shot.

Here's a related question: If I can't run mplayer from an icon in the GUI, can I simply associate certain filetypes to mplayer and have them automatically open through mplayer once I double-click them?

Thanks :)

Bill

Lier 03-23-2005 12:19 PM

NO, if you want to use the GUI of mplayer you have to run gmplayer in a term, if it doesn't work, you'll need to install it

auditek747 03-23-2005 01:13 PM

I agree with PTrenholme on this one.
If your using KDE, then KPlayer is exellent. (MPlayer frontend)
It's set up quite nicely right out of the box.
You can set it to associate with your media files and then just
click and go.
If you don't mind playing with it a little, you can watch DVD's with subs
and TV.

xbill311x 03-23-2005 08:46 PM

Hi,

Downloaded kplayer, and I'm trying to install it, so hopefully that will do the trick.

Hmmm...anyone know what this means?

checking for X... configure: error: Can't find X includes. Please check your installation and add the correct paths!


Thanks guys :)

Bill

xbill311x 03-23-2005 11:50 PM

oh, and where would I get gmplayer?

Lol, thanks again :)

Bill

auditek747 03-24-2005 12:23 PM

GMPlayer is part of MPlayer.
Read the install docs.
If you compile from source, you need to pass an option to ./configure.

./configue --with-x

maybe?

If you install from rpm, try:

gmplayer

from a term.

Lier 03-28-2005 11:18 AM

To install gmplayer you need to install mplayer from source, and write "./configure --enable-gui" instead of "./configure". Or you can find a rpm file with gmplayer.
I know Kplayer and it's nice too, the problem (checking for X... configure: error: Can't find X includes. Please check your installation and add the correct paths!) it's that you need devel packages to install some aplications from source, the package missing it's something like xorg-x11-devel-6.8.1-15 it's depends on the version you have installed. If you usually don't install from source, you can find a rpm file to install kplayer.

Kermlet 03-28-2005 11:35 AM

i've been writing a small HOWTO for getting mandrake set up how i want it. it's not redhat, but the procedures should be really close here. This is the portion that deals with mplayer, gmplayer, and the mplayerplug-in. I got this information from various places on the web, so sorry that i'm not giving credit where it is due, i just compiled what worked for me. feedback is welcome. Hopefully this will help you out.

------------
Installing mplayer (with gui)
-This can get complicated, especially if you're not used to compiling things from source. Of course, you can just use the stock mplayer-gui rpm from Drake, but why when compiling from source is so much better/fun? Seriously though, this is a program where compiling from source has its advantages. First get the latest files:
a) latest mplayer source (mplayerhq.hu)
b) latest essential codecs file (mplayerhq.hu)
c) latest mplayer plugin source (mplayerplug-in.sourceforge.net)

Follow the steps:

A) Unpack essential codecs file somewhere. Create directory (as root) /usr/local/lib/codecs. in terminal (as root): type chown yourusernamehere /usr/local/lib/codecs to give yourself access to this directory. Then copy all the files from the unpacked essential codecs file into /usr/local/lib/codecs.

B) Unpack mplayer source code somewhere. in terminal (root) navigate there and type ./configure --enable-gui this is going to take a few seconds. if everything you need is installed, it'll tell you to go on and compile the program. if you get some errors, you need to install what it asks for. Common for me was:
i) "X11 support required for GUI compilation" that means you need to install the X11 devel rpm (Xfree86 devel).
ii) missing GTK devel packages error means you need to install install libgtk devel rpms. they show up as libgtk+2.0-devel or libgtk+1.2-devel. I highly suggest taking the 1.2 route, since it seems impossible to get all the dependencies for 2.0

C) Once everything is configured, you need to type 'make' (without quotes) at the command line as root. This will take awhile. Assuming no errors, after it is done, type 'make install'. Sweet! Now mplayer is installed, but we still need to do some things for the gui.

D) download font of choice (mine was font-arial-iso-8859-1.tar.bz2). extract file. *THIS IS IMPORTANT* In extracted directory, choose directory of the font size you want. copy *ONLY* the contents of that directory to /usr/local/share/mplayer/font

E) download skin of choice (mine was Blue-1.2.tar.bz2) Extract file. Copy *ONLY* the contents of extracted directory to /usr/local/share/mplayer/Skin/default ('default' directory must be created)

F) Type 'gmplayer' in console (as any user) and you should be up and running. create your own icon.

G) mplayerplug-in for mozilla:
i) First, download latest source (mplayerplug-in.sourceforge.net). Unpack it somewhere. You'll need the gecko sdk. Get it at http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases choose the latest release, and then download the gecko sdk tar file that matches your architecture. extract that somewhere.
ii) in console, navigate to your unpacked mplayerplug-in directory. type ./configure --with-gecko-sdk=/path/to/geckosdkhere
iii) change to root, and then type 'make' If all is well, two files will be created in the directory you just configured:
- mplayerplug-in.so
- mplayerplug-in.xpt
copy these somewhere to be used later without having to build them if you reinstall. you will need to copy mplayerplug-in.so to the plugins directory of your firefox install and mplayerplug-in.xpt into the components directory of firefox. That is all you need. Testing can be done at apple's quicktime page for cinematic previews and various other pages where streaming media is used.
-------------
good luck!

kencaz 03-28-2005 03:03 PM

Re: Running MPlayer from the GUI, not the command line...
 
Quote:

Originally posted by xbill311x
Hi all,

How would I create an icon for me to click on to open Mplayer? Not that I don't enjoy spitting commands into the shell, as that is how I've been learning. I feel dumb for even asking the question, but right now I'm still working on the basics. Former Windows user. :)

Bill

It is possible to run Mplayer as a shortcut from the KDE desktop with a small script file. You will need to create a playlist.

1st) Create the playlist using your .mp3 song folder.

here's how I made mine from terminal window. (of course the path would be diff for yours)

find /home/kencaz/mp3 -name "*.mp3" -print > playlist.txt

2nd) Create the script file using any editor. I named mine "mplayer"

#!/bin/bash
konsole --noclose -e mplayer -playlist /home/kencaz/mp3/playlist.txt

3rd) use 'chmod' to give your script execute permission.

chmod +x mplayer

4th) Create a shortcut on your Desktop to your ./mplayer script file.

KC

xbill311x 03-28-2005 09:08 PM

Awesome, thank you,

Your're suggestions should help me immensly. I will let you all know how it turns out.

Thanks again :)

Bill


All times are GMT -5. The time now is 10:38 AM.