Ubuntu 17.10 High DPI support
Hi,
The Rapidminer studio I installed for my linux system has small icons and texts due to the DPI of my screen. I found this link https://docs.rapidminer.com/studio/installation/hidpi.html regarding the fix but I do not know where to put the java option "-Dsun.java2d.uiScale=2" I tried leaving it here in the shell script
JVM_OPTIONS=$("$JAVA" "-Djava.awt.headless=true -Dsun.java2d.uiScale=8" -cp "${rmClasspath}" com.rapidminer.launcher.JVMOptionBuilder "$@) but it didn't change any scaling after running the script.
Below is the shell script to run the program
#!/bin/bash
############################################################
## ##
## Unix Start Script for RapidMiner Studio ##
## ##
## This script tries to determine the location of ##
## RapidMiner Studio, searches for a proper Java ##
## executable and starts the program. ##
## ##
############################################################
## remove _JAVA_OPTIONS environment variable for this run ##
## it could contain stuff that break Studio launching so we ignore it completely ##
unset _JAVA_OPTIONS
if [ -z "${RAPIDMINER_HOME}" ] ; then
RAPIDMINER_HOME="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
echo "RAPIDMINER_HOME is not set. Trying the directory '${RAPIDMINER_HOME}'..."
fi
##########################
## ##
## Searching for Java ##
## ##
##########################
# JAVA_HOME set, so use it
if [ ! -z "${JAVA_HOME}" ] ; then
if [ -x "${JAVA_HOME}/bin/java" ]; then
JAVA="${JAVA_HOME}/bin/java"
fi
fi
# otherwise, try to find java using which
if [ -z "${JAVA}" ] ; then
_jfnd="`which java`"
if [ -x "${_jfnd}" ]; then
JAVA="${_jfnd}"
else
echo 'Could not find the java executable in default path or ${JAVA_HOME}/bin/java.'
echo "Edit $0 and/or your local startup files."
exit 1
fi
unset _jfnd
fi
###############################################
## ##
## Launch RapidMiner and check for updates ##
## ##
###############################################
update_root=~/.RapidMiner/update
update_dir=${update_root}/RUinstall
update_script=${update_root}/UPDATE
LAUNCH=1
while [ ${LAUNCH} -eq 1 ]
do
# Performing possible update
if [ -d "${update_dir}" ]; then
if [ -w "${RAPIDMINER_HOME}" ] ; then
echo "======================================================================="
echo "Performing update. Copying files from '${update_dir}' to '${RAPIDMINER_HOME}'."
cp -rf "${update_dir}"/* "${RAPIDMINER_HOME}"
rm -rf "${update_dir}"
echo "Copy complete."
if [ -f "${update_script}" ] ; then
echo "Deleting obsolete files listed in ${update_script}."
{
while read COMMAND FILE
do
if [ "DELETE" = "${COMMAND}" ] ; then
# Strip rapidminer/ prefix
FILE=`echo ${FILE} | sed -e 's/^rapidminer\///'`
TO_DELETE=${RAPIDMINER_HOME}/${FILE}
if [ -f "${TO_DELETE}" ] ; then
echo "Deleting regular file ${TO_DELETE}"
rm "${TO_DELETE}"
elif [ -d "${TO_DELETE}" ] ; then
echo "Deleting directory ${TO_DELETE}"
rmdir "${TO_DELETE}"
else
echo "Cannot delete file ${TO_DELETE} (does not exist)"
fi
else
echo "Unknown update command: ${COMMAND}"
fi
done
} < ${update_script}
rm "${update_script}"
echo "Completed deletion of obsolete files."
else
echo "No update script found in ${update_script}."
fi
rm -rf "${update_root}"
echo "Update complete"
echo "======================================================================="
else
echo "======================================================================="
echo "ATTENTION: An update was downloaded, but we cannot write to"
echo " ${RAPIDMINER_HOME}. "
echo " Ignoring update. Please restart as super user."
echo "======================================================================="
fi
fi
# Compile launch parmateres
rmClasspath="${RAPIDMINER_HOME}"/lib/*:"${RAPIDMINER_HOME}"/lib/jdbc/*
JVM_OPTIONS=$("$JAVA" "-Djava.awt.headless=true -Dsun.java2d.uiScale=8" -cp "${rmClasspath}" com.rapidminer.launcher.JVMOptionBuilder "$@)
# Launch Studio
LAUNCH=0
if [ $# -gt 0 ]; then
eval \"$JAVA\" $JVM_OPTIONS -cp \"${rmClasspath}\" com.rapidminer.launcher.GUILauncher \"$@\"
else
eval \"$JAVA\" $JVM_OPTIONS -cp \"${rmClasspath}\" com.rapidminer.launcher.GUILauncher
fi
if [ $? -eq 2 ]
then
echo RapidMiner Studio will now relaunch
LAUNCH=1
fi
done
If anyone knows a solution without having to change my own screen resolution, I would very much appreciate it.
Thanks!
Answers
I figured it out. For anyone wondering, the parameter "..uiScale = 2" does not work in openjdk8. It's fixed in openjdk9
Thank you @zl1775. I know this is NOT an ideal way to change something as simple as the screen resolution. I have sent this on to the dev team and hopefully an easier method will appear in a future release.
Scott