LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Any Suggestions?? (https://www.linuxquestions.org/questions/linux-general-1/any-suggestions-4175416548/)

JimiSc 07-13-2012 11:00 AM

Any Suggestions??
 
I am using opensuse 12.1 here at work to run a machine that's sole purpose is too open Firefox with a certain web address and that's pretty much it. So for now I am using a bash script I wrote that tells Firefox what URL to go to using:
export DISPLAY=:0
firefox http://<URL name>
then set up a cron job that runs that script and for the most part it works, just not like how i need it to work. The URL that I am telling Firefox to go then launches two other windows, and this is where I am having an issue. I am trying to get it to where one window opens on the left screen and the other window opens on the right screen, right now its open two the main URL on the left and the two secondary windows on the right Im wondering if it would be worth my time and sanity to try and write a script using java or something similar to tell it what to do with the two windows, or just keep fussing with the way I am doing it.

Thanks for any suggestions and help to this minor frustration I am having.

273 07-13-2012 11:52 AM

Could you not find the URLs of the popups and display them separately? I realise that means messing with Firefox profiles to get two instances running but it would allow you to open them where you wanted.

JimiSc 07-13-2012 12:14 PM

I have tried to open the popup's separately and all it does is still open them both on either the right side or the left side, I am looking for a way to always have them open up one on the right and one on the left. I have not tried to mess with the firefox profiles, can you expand a little more on this idea for me please.

273 07-13-2012 12:21 PM

What I meant was run something like:
Code:

export DISPLAY=:0.0
firefox http://<URL of first popup>
export DISPLAY=:0.1
firefox http://<URL of second popup>

But, if you do this Firefox may complain about there being an instance running already, though this just happens with certain twin-head setups I think and the answer would be to create separate profiles.
This thread touches on what I am suggesting:
http://www.linuxquestions.org/questi...splays-789402/

JimiSc 07-13-2012 12:38 PM

I will try that and see what happens, thank you for the tip.

JimiSc 07-13-2012 02:01 PM

Ok i have tried using the suggested code and I get the error cannot open DISPLAY =:0.1, I also tried it on my test machine that has the same setup and I get the same error. My test machine is using a nvidia card that has the correct drivers and X config, my other machine is just using the on board video.

273 07-13-2012 02:11 PM

Ah, shame, that trick should work if you're running as two separate X sessions. You could try echoing display on booth monitors and seeing if there is a way to differentiate them.
otherwise, I'm out of ideas I'm afraid.

JimiSc 07-13-2012 02:24 PM

No worries man, I do appreciate the suggestions. On my test machine I do have the two monitors configured as separate X screens, not sure if that is the same as separate x sessions. Either way I am gonna keep looking at what I can do and hope for the best.

Valery Reznic 07-14-2012 01:50 AM

Quote:

Originally Posted by 273 (Post 4727233)
What I meant was run something like:
Code:

export DISPLAY=:0.0
firefox http://<URL of first popup>
export DISPLAY=:0.1
firefox http://<URL of second popup>

But, if you do this Firefox may complain about there being an instance running already, though this just happens with certain twin-head setups I think and the answer would be to create separate profiles.
This thread touches on what I am suggesting:
http://www.linuxquestions.org/questi...splays-789402/

You can try to add -no-remote option to firefox

JimiSc 07-23-2012 02:24 PM

I have finally fixed my issue. Ok so the biggest thing I was missing was the Xinerama setting in the xorg.conf file. I had it set to "1" thus allowing me to drag windows over and what not and that was preventing me from actually being able to designate DISPLAY=:0.0 and DISPLAY=:0.1. Got it turned off and rebooted and viola it works. The next thing I had to set up was separate profiles in Firefox. Now all that is said and done I can now tell Firefox to open a separate window in both screens. Thank you all for the feed back to my little dilemma I was having.

273 07-23-2012 02:28 PM

Darn, I should have thought about Xinerama, I run separate X servers because whilst being able to move windows between monitors is useful not knowing which monitor a window will open on is too annoying.
Glad you're moving towards a solution :D. If your problem is solved, you should probably mark this thread solved.


All times are GMT -5. The time now is 07:08 PM.