LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2007, 04:13 PM   #1
tcv
Member
 
Registered: Apr 2003
Location: Billerica, MA
Posts: 114

Rep: Reputation: 15
Apps starting from GUI vs. CLI


Hey folks,

I have a problem I hope someone can help shed some light on. I am running Ubuntu Feisty.

Earlier this week, I successfully installed gnome-mplayer and the gecko-mediaplyer plug-in for Firefox. When I first tried it, I had some instability problems and during the course of troubleshooting I was able to narrow it down to a reproducible event.

Here's how it lays out:

On the following page (http://www.apple.com/trailers/newline/rushhour3/), gecko-mediaplayer and, subsequently, gnome-mplayer are invoked three times.

If I run firefox from the command-line under my own user account (not sudo or su), then I can successfully access this page and launch any of the trailers on the page.

If I run firefox from Gnome by the icons, Firefox-bin jumps to 75% CPU and higher and never completes the page. I can see that gnome-mplayer is invoked three times by checking out the process list, but Firefox hangs.

So, my first question is: Can there be something different between how firefox loads from the CLI versus double-clicking an icon in Gnome?

And any other thoughts are greatly appreciated.

Cheers,

Mike...
 
Old 06-09-2007, 05:08 PM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
You need to find out how each is being launched. For the CLI, this is easy, just type:
Code:
which firefox
That should spit out the exact path to the firefox executable/wrapper script, or it'll tell you of any aliases for the word firefox. For the GUI launcher, check the properties of the icon and note what command is being used to launch the firefox process.

If the two results are the same, that is to say that which is being called from the CLI matches the GUI, then that's weird. If not, then you may be part of the way to resolving the problem. The easiest way to do that might be to simply apply the CLI method to the GUI launcher.

Hope that makes sense!
 
Old 06-09-2007, 07:10 PM   #3
tcv
Member
 
Registered: Apr 2003
Location: Billerica, MA
Posts: 114

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pwc101
You need to find out how each is being launched. For the CLI, this is easy, just type:
Code:
which firefox
That should spit out the exact path to the firefox executable/wrapper script, or it'll tell you of any aliases for the word firefox. For the GUI launcher, check the properties of the icon and note what command is being used to launch the firefox process.

If the two results are the same, that is to say that which is being called from the CLI matches the GUI, then that's weird. If not, then you may be part of the way to resolving the problem. The easiest way to do that might be to simply apply the CLI method to the GUI launcher.

Hope that makes sense!
It does, thank you. :-) And I've done some more tests. It's ... ahm ... weird.

First:

Code:
tcv@tcv-feisty:~$ which firefox
/usr/bin/firefox
There are two icons for Firefox. One of them, which is inside Applications->Internet, doesn't give me a right-click option to look at the properties. The other does give me an option to look at the properties. There ain't much in there. I'll lay it out:

Type: Application
Name: Firefox Web Browser
Command: firefox %u
Comment: Browse the World Wide Web

Now here are the tests I performed and the results. "Pass" means the full page loaded. "Fail" means the page did not load. (Uh, sorry. You probably figured that one out.)

Test 1: Specified the hard path in the Application Launcher properties to "/usr/bin/firefox %u"
Result: FAIL

Test 2: Change Type in Application Launcher properties to "Application in Terminal"
Result: PASS

Test 3: Create a new Application Launcher pointing to /usr/bin/firefox
Result: FAIL

Two questions come to mind:

1. /usr/bin/firefox is a script. It's not a binary. Is it possible there is some sort of check in there that determine from where the application was launched?


2. The gecko-mediaplayer plug-in produces output when it encounters something to do. Where does this output go when there's no "terminal" to show it? Could that be a problem?



Cheers,

Mike Whalen


[[EDIT: /usr/bin/firefox is a link. The target path is: /usr/lib/firefox/firefox which is the script.]]

Last edited by tcv; 06-09-2007 at 07:23 PM.
 
Old 06-09-2007, 07:50 PM   #4
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
1. /usr/bin/firefox is a script. It's not a binary. Is it possible there is some sort of check in there that determine from where the application was launched?

No, it would be the same either way.


2. The gecko-mediaplayer plug-in produces output when it encounters something to do. Where does this output go when there's no "terminal" to show it? Could that be a problem?

The fact that you're not viewing the output in a terminal window doesn't change anything.
 
Old 06-09-2007, 09:07 PM   #5
tcv
Member
 
Registered: Apr 2003
Location: Billerica, MA
Posts: 114

Original Poster
Rep: Reputation: 15
Huh. So, if I read this right, then it's literally running the exact same way from the GUI or the CLI. That's odd that it would behave differently.

Is there a way for me to watch what Firefox does as it starts? Perhaps I can produce logs and see if there's anything different between the two captures?

I don't know. I'm graspin' at straws here. ;-)

Last edited by tcv; 06-09-2007 at 09:09 PM.
 
  


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
boot CLI vs GUI weazy Linux - Software 2 08-04-2006 09:15 PM
CLI and GUI Question desmondlewissmith Linux - Software 1 01-20-2006 03:46 PM
Programming on Linux -- CLI to GUI nodisk Programming 15 12-25-2005 03:06 PM
Starting CLI programs in aterm when logging in ethics Linux - General 0 11-29-2005 06:34 PM
changing gui from cli twistedrhymes Linux - Newbie 3 06-14-2005 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:50 PM.

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