For Programmers: Free Programming Magazines  


Home > Archive > Java Help > January 2006 > Applet display on wrong screen









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Applet display on wrong screen
santiago538@yahoo.com

2006-01-20, 7:10 pm

Hi,

I am using Mozilla 1.6, with the Java plugin v1.4.2 on the Solaris 8
platform. When I enter something like "mozilla --display=:0.1
MyAppletContainer.html" from a console opened on display :0.0, Mozilla
will open correctly on display :0.1, but the applet will display in its
own window on display :0.0!

If this is not a Java problem, please redirect me (as I'm sure you'll
do). Otherwise, is this a known problem? Is there a workaround?

Thanks

Nigel Wade

2006-01-24, 7:58 am

santiago538@yahoo.com wrote:

> Hi,
>
> I am using Mozilla 1.6, with the Java plugin v1.4.2 on the Solaris 8
> platform. When I enter something like "mozilla --display=:0.1
> MyAppletContainer.html" from a console opened on display :0.0, Mozilla
> will open correctly on display :0.1, but the applet will display in its
> own window on display :0.0!
>
> If this is not a Java problem, please redirect me (as I'm sure you'll
> do). Otherwise, is this a known problem? Is there a workaround?
>
> Thanks


I wouldn't like to lay blame anywhere.

This command might workaround the problem for you:

(DISPLAY=:0.1;mozilla MyAppletContainer.html)

the () make it run the command in a new sub-shell, the reason for this is that
it won't mess with the DISPLAY environment setting for the existing shell.
Hopefully the JVM will get the DISPLAY environment variable correctly and
display on :0.1.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
santiago538@yahoo.com

2006-01-24, 7:05 pm


Nigel Wade wrote:
> santiago538@yahoo.com wrote:
>
>
> I wouldn't like to lay blame anywhere.
>
> This command might workaround the problem for you:
>
> (DISPLAY=:0.1;mozilla MyAppletContainer.html)
>
> the () make it run the command in a new sub-shell, the reason for this is that
> it won't mess with the DISPLAY environment setting for the existing shell.
> Hopefully the JVM will get the DISPLAY environment variable correctly and
> display on :0.1.
>


Thanks Nigel,

For some strange reason it work with bash, but sh will ignore the
DISPLAY setting. Not really a viable workaround for my requirements,
but that is a question for another group. Thanks once again!

James

Thomas Weidenfeller

2006-01-24, 7:05 pm

santiago538@yahoo.com wrote:
> For some strange reason it work with bash, but sh will ignore the
> DISPLAY setting.


export DISPLAY

/Thomas
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS...ng/java/gui/faq
http://www.uni-giessen.de/faq/archi...g.java.gui.faq/
Gordon Beaton

2006-01-24, 7:05 pm


On Tue, 24 Jan 2006 10:17:12 +0000, Nigel Wade wrote:
> (DISPLAY=:0.1;mozilla MyAppletContainer.html)
>
> the () make it run the command in a new sub-shell, the reason for
> this is that it won't mess with the DISPLAY environment setting for
> the existing shell. Hopefully the JVM will get the DISPLAY
> environment variable correctly and display on :0.1.


Even

DISPLAY=:0.1 mozilla MyAppletContainer.html

(i.e. no subshell, but also no semicolon) will leave the current
shell's DISPLAY setting alone, and simply pass a modified envirnment
to mozilla.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Nigel Wade

2006-01-24, 7:05 pm

santiago538@yahoo.com wrote:

>
> Nigel Wade wrote:
that[color=darkred]
>
> Thanks Nigel,
>
> For some strange reason it work with bash, but sh will ignore the
> DISPLAY setting. Not really a viable workaround for my requirements,
> but that is a question for another group. Thanks once again!
>
> James


If DISPLAY isn't already an environment variable you need to export it after
it's set:

(DISPLAY=:0.1;export DISPLAY;mozilla MyAppletContainer.html)

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
santiago538@yahoo.com

2006-01-24, 7:06 pm


Nigel Wade wrote:
> santiago538@yahoo.com wrote:
>
> that
>
> If DISPLAY isn't already an environment variable you need to export it after
> it's set:
>
> (DISPLAY=:0.1;export DISPLAY;mozilla MyAppletContainer.html)
>



Thanks, that works too.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com