Print at Dec 20, 2025, 6:56:22 PM
Posted by tk1138 at Mar 11, 2018, 12:26:54 PM
hdpi revisited on Linux
hello,

I trying to get Sweet Home 3D to display better, larger text, in Linux running with a 4K monitor. I've downloaded the latest version, 5.7.

Java is locally installed, from webupd8 ppa.
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)


but it looks like the distribution has its own local jre8?
I created this file "SweetHome3D.l4j.ini" and placed it in
the expanded installed directory and in ./lib from there.
the file has this single line :

Dcom.eteks.sweethome3d.resolutionScale=2


I thought I had this displaying nicely in an older version of Sweet Home 3D, 5.2 release. but this doesn't seem to work in 5.7?

Is there something else I can do to make the text look larger in Linux? I'm use a pre-release of xubuntu Bionic 18-04.

thanks

Posted by tk1138 at Mar 11, 2018, 12:29:28 PM
Re: hdpi revisited on Linux
typo. it was in 5.4 when I tried this last. It was a while ago, and I dont remember if I just worked around the problem and used a regular DPI monitor.

Posted by Puybaret at Mar 11, 2018, 2:23:12 PM
Re: hdpi revisited on Linux
The SweetHome3D.l4j.ini file is only for windows and you forgot to add an hyphen if in front of -D Java option.
Under Linux, you should edit the SweetHome3D file and add all the options cited in the FAQ Texts in the furniture catalog are not displayed correctly or icons in the toolbar appear very small on my computer. How can I fix that?. If you add only the -Dcom.eteks.sweethome3d.resolutionScale=2 option, it won't work because it's possible to change font size only in Metal look and feel.

There's no need to install Java since the installer provided in Download page already comes with a copy of Java 8. Anyway, I'm not sure that Sweet Home 3D is able to work under Java 9.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by tk1138 at Mar 11, 2018, 4:59:41 PM
Re: hdpi revisited on Linux
Thanks. I tried this modification -


cat SweetHome3D
#!/bin/sh

# Retrieve Sweet Home 3D directory
PROGRAM=`readlink "$0"`
if [ "$PROGRAM" = "" ]; then
PROGRAM=$0
fi
PROGRAM_DIR=`dirname "$PROGRAM"`

# Run Sweet Home 3D
exec "$PROGRAM_DIR"/jre8/bin/java -Xmx1024m -Dcom.eteks.sweethome3d.resolutionScale=2.5 -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dswing.plaf.metal.controlFont=Dialog-11 -Dswing.plaf.metal.userFont=SansSerif-11 -Dswing.plaf.metal.systemFont=SansSerif-11 -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1b.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dcore.jar:"$PROGRAM_DIR"/lib/java3d-1.6/j3dutils.jar:"$PROGRAM_DIR"/lib/java3d-1.6/vecmath.jar:"$PROGRAM_DIR"/lib/java3d-1.6/gluegen-rt.jar:"$PROGRAM_DIR"/lib/java3d-1.6/jogl-java3d.jar:"$PROGRAM_DIR"/jre8/lib/javaws.jar -Djava.library.path="$PROGRAM_DIR"/lib/java3d-1.6 -Djogamp.gluegen.UseTempJarCache=false -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer com.eteks.sweethome3d.SweetHome3D -open "$1"


and when I start up, I get this ---


$ ./SweetHome3D
Exception in thread "main" java.lang.InternalError: XXX0 profile[1]: GL3bc -> profileImpl GL4bc !!! not mapped
at com.jogamp.opengl.GLProfile.computeProfileMap(GLProfile.java:2071)
at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1924)
at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1875)
at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1843)
at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80)
at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216)
at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297)
at com.jogamp.opengl.GLProfile.get(GLProfile.java:1021)
at com.jogamp.opengl.GLProfile.get(GLProfile.java:1050)
at com.jogamp.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:803)
at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:131)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:858)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267)
at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:317)
at java.awt.GraphicsDevice.getBestConfiguration(GraphicsDevice.java:207)
at com.eteks.sweethome3d.j3d.Component3DManager.<init>(Unknown Source)
at com.eteks.sweethome3d.j3d.Component3DManager.getInstance(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.addComponent3DRenderingErrorObserver(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.init(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.main(Unknown Source)


I see an initial splash screen.. and it just hangs.

Posted by Puybaret at Mar 11, 2018, 5:24:29 PM
Re: hdpi revisited on Linux
Then try with SweetHome3D-Java3D-1_5_2 script.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by tk1138 at Mar 11, 2018, 10:15:13 PM
Re: hdpi revisited on Linux
yes, that worked, thank you.

$ cat SweetHome3D-Java3D-1_5_2
#!/bin/sh

# Retrieve Sweet Home 3D directory
PROGRAM=`readlink "$0"`
if [ "$PROGRAM" = "" ]; then
PROGRAM=$0
fi
PROGRAM_DIR=`dirname "$PROGRAM"`

# Run Sweet Home 3D
exec "$PROGRAM_DIR"/jre8/bin/java -Xmx1024m -Dcom.eteks.sweethome3d.resolutionScale=2.5 -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dswing.plaf.metal.controlFont=Dialog-11 -Dswing.plaf.metal.userFont=SansSerif-11 -Dswing.plaf.metal.systemFont=SansSerif-11 -classpath "$PROGRAM_DIR"/lib/SweetHome3D.jar:"$PROGRAM_DIR"/lib/Furniture.jar:"$PROGRAM_DIR"/lib/Textures.jar:"$PROGRAM_DIR"/lib/Examples.jar:"$PROGRAM_DIR"/lib/Help.jar:"$PROGRAM_DIR"/lib/iText-2.1.7.jar:"$PROGRAM_DIR"/lib/freehep-vectorgraphics-svg-2.1.1b.jar:"$PROGRAM_DIR"/lib/sunflow-0.07.3i.jar:"$PROGRAM_DIR"/lib/jmf.jar:"$PROGRAM_DIR"/lib/batik-svgpathparser-1.7.jar:"$PROGRAM_DIR"/lib/j3dcore.jar:"$PROGRAM_DIR"/lib/j3dutils.jar:"$PROGRAM_DIR"/lib/vecmath.jar:"$PROGRAM_DIR"/jre8/lib/javaws.jar -Djava.library.path="$PROGRAM_DIR"/lib -Dcom.eteks.sweethome3d.applicationId=SweetHome3D#Installer com.eteks.sweethome3d.SweetHome3D -open "$1"