View previous topic :: View next topic |
Author |
Message |
onnadisto n00b
Joined: 06 Aug 2012 Posts: 6
|
Posted: Mon Aug 06, 2012 4:43 am Post subject: java jcontrol GTKLookAndFeel (SOLVED) |
|
|
My ~/.bashrc has the following export;
$HOME/.bashrc
Code: | export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' |
A. If I run jcontrol from a terminal
Code: | # /opt/oracle-jdk-bin-1.7.0.5/jre/bin/jcontrol
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel |
jcontrol runs with with the GTKLookAndFeel :-)
B. If i run jcontrol from my openbox menu;
Code: | $HOME/.config/openbox/menu.xml (snippet)
<item label="Java-jdk"><action name="Execute"><execute>/opt/oracle-jdk-bin-1.7.0.5/jre/bin/jcontrol</execute></action></item> |
the GTKLookAndFeel is ignored and it defaults to uglyfugly :-(
=======
SOLUTION
=======
Code: | # /etc/profile
###################################
## java font and gui improvement ##
###################################
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' |
Last edited by onnadisto on Thu Aug 09, 2012 4:08 am; edited 4 times in total |
|
Back to top |
|
|
ultraincognito Guru
Joined: 03 Jun 2011 Posts: 346 Location: Ukraine
|
Posted: Mon Aug 06, 2012 3:56 pm Post subject: |
|
|
Do not use the Openbox menu? |
|
Back to top |
|
|
onnadisto n00b
Joined: 06 Aug 2012 Posts: 6
|
Posted: Tue Aug 07, 2012 2:44 am Post subject: |
|
|
WHY does openbox menu fail to pickup a bashrc export --> technically speaking |
|
Back to top |
|
|
ultraincognito Guru
Joined: 03 Jun 2011 Posts: 346 Location: Ukraine
|
Posted: Tue Aug 07, 2012 7:03 am Post subject: |
|
|
Because only bash-based terminals are able to give the .bashrc content?
Also, I think, you can put a command like "Terminal -x 'jcontrol'" to the your Openbox menu. |
|
Back to top |
|
|
onnadisto n00b
Joined: 06 Aug 2012 Posts: 6
|
Posted: Tue Aug 07, 2012 4:13 pm Post subject: |
|
|
ultraincognito wrote: | Because only bash-based terminals are able to give the .bashrc content?
Also, I think, you can put a command like "Terminal -x 'jcontrol'" to the your Openbox menu. |
From my original question..
If I call jcontrol from a terminal GTKLookandFeel works
If I call jcontrol from an execute command in an openbox menu.xml; GTKLookandFeel fails to work
Code: | $HOME/.config/openbox/menu.xml (snippet)
<item label="Java-jdk"><action name="Execute"><execute>/opt/oracle-jdk-bin-1.7.0.5/jre/bin/jcontrol</execute></action></item>
<item label="Java-jdk"><action name="Execute"><execute>gnome-terminal -x jcontrol</execute></action></item>
<item label="Java-jdk"><action name="Execute"><execute>xterm -x jcontrol</execute></action></item>
<item label="Java-jdk"><action name="Execute"><execute>jcontrol</execute></action></item> |
It doen't matter how it is called, it just fails to pick up the java options set in bashrc...
So my question is still why this should happen. I'd like to understand the issue involved. It's not just about using jcontrol... |
|
Back to top |
|
|
ultraincognito Guru
Joined: 03 Jun 2011 Posts: 346 Location: Ukraine
|
Posted: Tue Aug 07, 2012 5:44 pm Post subject: |
|
|
onnadisto wrote: | <item label="Java-jdk"><action name="Execute"><execute>xterm -x jcontrol</execute></action></item |
No! I think "xterm -e jcontrol" would be better. |
|
Back to top |
|
|
onnadisto n00b
Joined: 06 Aug 2012 Posts: 6
|
Posted: Tue Aug 07, 2012 6:05 pm Post subject: |
|
|
ultraincognito wrote: | onnadisto wrote: | <item label="Java-jdk"><action name="Execute"><execute>xterm -x jcontrol</execute></action></item |
No! I think "xterm -e jcontrol" would be better. |
[-x => -e] agreed. The actual question is unchanged:
WHY are these two calls producing different results?
# xterm -e jcontrol ==> gtklookandfeel :-)
menu.xml :: <execute>xterm -e jcontrol</execute> ==> gtklookandfeel :-( |
|
Back to top |
|
|
|