LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apps starting from GUI vs. CLI (https://www.linuxquestions.org/questions/linux-newbie-8/apps-starting-from-gui-vs-cli-560507/)

tcv 06-09-2007 04:13 PM

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...

pwc101 06-09-2007 05:08 PM

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!

tcv 06-09-2007 07:10 PM

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.]]

masonm 06-09-2007 07:50 PM

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.

tcv 06-09-2007 09:07 PM

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. ;-)


All times are GMT -5. The time now is 03:41 AM.