Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
java jcontrol GTKLookAndFeel (SOLVED)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
onnadisto
n00b
n00b


Joined: 06 Aug 2012
Posts: 6

PostPosted: Mon Aug 06, 2012 4:43 am    Post subject: java jcontrol GTKLookAndFeel (SOLVED) Reply with quote

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
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Mon Aug 06, 2012 3:56 pm    Post subject: Reply with quote

Do not use the Openbox menu?
Back to top
View user's profile Send private message
onnadisto
n00b
n00b


Joined: 06 Aug 2012
Posts: 6

PostPosted: Tue Aug 07, 2012 2:44 am    Post subject: Reply with quote

WHY does openbox menu fail to pickup a bashrc export --> technically speaking
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Aug 07, 2012 7:03 am    Post subject: Reply with quote

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
View user's profile Send private message
onnadisto
n00b
n00b


Joined: 06 Aug 2012
Posts: 6

PostPosted: Tue Aug 07, 2012 4:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Aug 07, 2012 5:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
onnadisto
n00b
n00b


Joined: 06 Aug 2012
Posts: 6

PostPosted: Tue Aug 07, 2012 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum