Export JAVA options only if we have X session running.

This commit is contained in:
Stanislav Nikitin 2015-08-14 21:43:54 +05:00
parent 6158b4238f
commit 6314db1861

View File

@ -1,4 +1,7 @@
# Java-specific exports.
# More or less pretty fonts in Java programs.
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
export JAVA_FONTS=/usr/share/fonts/TTF
# It should be exported only if we have X session running.
if [ ! -z ${DISPLAY} ]; then
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
export JAVA_FONTS=/usr/share/fonts/TTF
fi