You are not logged in.

#1 2017-11-15 16:53:59

SaphirShroom
Member
Registered: 2016-03-20
Posts: 13

Eclipse in High-DPI with i3wm

Hey all,

I have a 3200x1800 ("Quad HD") display and I'm using the i3 window manager. Unfortunately, Eclipse does not scale the UI elements correctly, so they end up being very small. The same goes for the font. I didn't find a setting to adjust Eclipse's DPI, so I assume I somehow have to configure this inside i3 or with X.

Here is my .xinitrc:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    xrdb -merge $sysresources

fi
if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"

fi
if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

xrandr --dpi 192
xrandr -s 3200x1800
sxhkd -c $HOME/.config/i3/i3sxhkd &
compton -b --config $HOME/.config/compton/i3compton.conf
redshift -l 47.0:9.0 -t 5700:3000 -m randr &
exec i3

As you can see, I already set my dpi within the xinitrc. This works within i3 - my system bar gets scaled properly for instance. However, it seems that Eclipse ignores this setting, because removing the line that sets the dpi does not change anything. The only way I can get Eclipse to properly scale the elements is by setting my screen resolution to 1920x1080, which is obviously not what I want.

I installed GNOME to check whether Eclipse will scale properly even under high resolution, and it does. The problem is apparently that Eclipse is missing some kind of setting or information.

Does anyone have a solution for this?

(this will probably not be too helpful, but here's my eclipse.ini file:)

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.550.v20170928-1359
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM

Offline

Board footer

Powered by FluxBB