LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2005, 09:53 PM   #1
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Rep: Reputation: 15
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
 
Old 03-21-2005, 10:20 PM   #2
kryptonite0110
Member
 
Registered: Mar 2005
Posts: 59

Rep: Reputation: 15
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
 
Old 03-22-2005, 07:22 AM   #3
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
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??
 
Old 03-22-2005, 09:19 AM   #4
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Rep: Reputation: 15
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.
 
Old 03-22-2005, 10:59 AM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 03-22-2005, 07:51 PM   #6
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 03-23-2005, 12:19 PM   #7
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Rep: Reputation: 15
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
 
Old 03-23-2005, 01:13 PM   #8
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
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.
 
Old 03-23-2005, 08:46 PM   #9
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Original Poster
Rep: Reputation: 15
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
 
Old 03-23-2005, 11:50 PM   #10
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Original Poster
Rep: Reputation: 15
oh, and where would I get gmplayer?

Lol, thanks again

Bill
 
Old 03-24-2005, 12:23 PM   #11
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
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.
 
Old 03-28-2005, 11:18 AM   #12
Lier
Member
 
Registered: Jan 2005
Location: Argentina
Distribution: SUSE 9.0, 9.2, 10.0, Slackware 10.2 and slamd64
Posts: 135

Rep: Reputation: 15
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.
 
Old 03-28-2005, 11:35 AM   #13
Kermlet
LQ Newbie
 
Registered: Feb 2004
Distribution: Mandrake 10 Official
Posts: 23

Rep: Reputation: 15
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!
 
Old 03-28-2005, 03:03 PM   #14
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
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
 
Old 03-28-2005, 09:08 PM   #15
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Original Poster
Rep: Reputation: 15
Awesome, thank you,

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

Thanks again

Bill
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command line and GUI kpachopoulos Linux - Newbie 3 08-22-2004 09:13 AM
New MPlayer errors - command line works, GUI doesn't Trey2501 Linux - Newbie 8 03-07-2004 07:59 PM
Command line to GUI Jon84 Slackware 34 03-12-2003 08:54 PM
mplayer - command line and gui esteeven Linux - Software 7 12-06-2002 07:38 PM
gui vs. command line sdfjk Linux - Newbie 1 10-05-2002 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration