You are not logged in.

#1 2018-03-11 15:59:40

hiveNzin0
Member
Registered: 2011-10-02
Posts: 84

[SOLVED]Starting apps from a shell, no HiDPI settings

edit :

I had bad environment variables in my zshrc file.

export QT_AUTO_SCREEN_SCALE_FACTOR=0

solved the issue

---------------


Hi !

I have a Dell XPS 15 with a 4k screen and another external 4k monitor.

I am using KDE and configured it as per the documentation here https://wiki.archlinux.org/index.php/HiDPI but I have a problem when I start an application from the terminal (Konsole, Terminator, ...).
When the app starts, it doesn't handle the hidpi configuration so the interface looks bigger and not scaled properly.

If I start the app like Kate using the start menu, the interface is properly scaled.

This is causing me some problems with application like anaconda-navigator since it cannot be launch from the start menu (or I didn't find how to do that).
When I start "anaconda-navigator" from a terminal, the navigator is unusable since the interface is too big.

Any idea what to do to solve this problem ?

Thank you.

Last edited by hiveNzin0 (2018-03-15 18:39:04)

Offline

#2 2018-03-15 12:13:45

hiveNzin0
Member
Registered: 2011-10-02
Posts: 84

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

Hi,

am I the only one with this problem ? I can't seem to find a similar problem on google.

Offline

#3 2018-03-15 12:44:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,399

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

Where are you exporting the environment variables? If you simply set the scale factor and the like within the GUI KDE provides, there's a chance that the environment config is not propagated to a traditional shell depending on where they are exported from within KDE.

Offline

#4 2018-03-15 13:25:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,056

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

tr '\0' '\n' < /proc/$PID/environ

replace $PID with the actual pid of either process (good and bad UI)

Offline

#5 2018-03-15 17:46:42

hiveNzin0
Member
Registered: 2011-10-02
Posts: 84

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

V1del wrote:

Where are you exporting the environment variables? If you simply set the scale factor and the like within the GUI KDE provides, there's a chance that the environment config is not propagated to a traditional shell depending on where they are exported from within KDE.

I have this in my ~/.zshrc

export GDK_SCALE=2
export QT_AUTO_SCREEN_SCALE_FACTOR=2

If I use kde-open5 to open kate, it works, the window manager settings are used. Unfortunately, I cannot use that to open anaconda-navigator. Kde-open must only work with kde application I suppose.

Offline

#6 2018-03-15 17:49:02

hiveNzin0
Member
Registered: 2011-10-02
Posts: 84

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

I can see the scale factor for Qt and GTK app. Maybe there is another scale factor I didn't setup and that anaconda-navigator is expecting.

seth wrote:
tr '\0' '\n' < /proc/$PID/environ

replace $PID with the actual pid of either process (good and bad UI)

anaconda-navigator started from the terminal

[18:47:21 - gillouche@arch:~]$ tr '\0' '\n' < /proc/28826/environ
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
LANG=en_US.UTF-8
DISPLAY=:0
SHLVL=2
LOGNAME=gillouche
XDG_VTNR=1
KDE_SESSION_VERSION=5
PWD=/home/gillouche
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
CONDA_SHLVL=0
XDG_SESSION_CLASS=user
MAVEN_OPTS=-Xmx512m
XAUTHORITY=/home/gillouche/.Xauthority
COLORTERM=truecolor
XDG_SESSION_ID=c2
KDE_SESSION_UID=1000
DESKTOP_SESSION=/usr/share/xsessions/plasma
QT_SCREEN_SCALE_FACTORS=eDP-1=2;DP-1=2;HDMI-1=2;DP-2=2;HDMI-2=2;
XDG_SESSION_DESKTOP=KDE
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/16830,unix/arch:/tmp/.ICE-unix/16830
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
TERMINATOR_UUID=urn:uuid:3195bf1e-618e-48f6-8bf9-e6ef881738e2
MAIL=/var/spool/mail/gillouche
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
_=/opt/anaconda/bin/anaconda-navigator
TERMINATOR_DBUS_NAME=net.tenshu.Terminator20x1a6021154d881c
VTE_VERSION=5003
TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2
SHELL=/usr/bin/zsh
XCURSOR_THEME=Breeze_Snow
GRADLE_HOME=/usr/share/java/gradle
XDG_SESSION_TYPE=x11
QT_AUTO_SCREEN_SCALE_FACTOR=2
GTK_MODULES=canberra-gtk-module
XDG_CURRENT_DESKTOP=KDE
TERM=xterm-256color
XCURSOR_SIZE=0
OLDPWD=/home/gillouche
HOME=/home/gillouche
XDG_SEAT=seat0
KDE_FULL_SESSION=true
USER=gillouche
GS_LIB=/home/gillouche/.fonts
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_RUNTIME_DIR=/run/user/1000
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/gillouche/Workspace/scripts/own/python:/home/gillouche/Workspace/scripts/own/shell:/opt/anaconda/bin
SHELL_CONFIG_DIR=/home/gillouche/Workspace/dotfiles/shellconf
ZSH=/home/gillouche/.oh-my-zsh
UPDATE_ZSH_DAYS=3
EDITOR=vim
ARCHFLAGS=-arch x86_64
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=C
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
QT_PLUGIN_PATH=/usr/lib/kde4/plugins/
GDK_SCALE=2

kate started from the menu

[19:28:00 - gillouche@arch:~]$ tr '\0' '\n' < /proc/3965/environ 
CONDA_SHLVL=0
GS_LIB=/home/gillouche/.fonts
KDE_FULL_SESSION=true
LANG=en_US.UTF-8
DISPLAY=:0
OLDPWD=/home/gillouche
QT_SCREEN_SCALE_FACTORS=eDP-1=2;DP-1=2;HDMI-1=2;DP-2=2;HDMI-2=2;
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_VTNR=1
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
XDG_SESSION_ID=c2
USER=gillouche
DESKTOP_SESSION=/usr/share/xsessions/plasma
GRADLE_HOME=/usr/share/java/gradle
PWD=/home/gillouche
HOME=/home/gillouche
XCURSOR_SIZE=0
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_SESSION_DESKTOP=KDE
GTK_MODULES=canberra-gtk-module
MAIL=/var/spool/mail/gillouche
SHELL=/usr/bin/zsh
XDG_SESSION_CLASS=user
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XCURSOR_THEME=Breeze_Snow
XDG_CURRENT_DESKTOP=KDE
XDG_SEAT=seat0
SHLVL=1
MAVEN_OPTS=-Xmx512m
LOGNAME=gillouche
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/home/gillouche/.Xauthority
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
QT_AUTO_SCREEN_SCALE_FACTOR=0
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
_=/usr/bin/kwrapper5
SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/1350,unix/arch:/tmp/.ICE-unix/1350
DESKTOP_STARTUP_ID=arch;1521138474;185677;1401_TIME912147

These properties seem interesting :
QT_SCREEN_SCALE_FACTORS=eDP-1=2;DP-1=2;HDMI-1=2;DP-2=2;HDMI-2=2;
QT_AUTO_SCREEN_SCALE_FACTOR=0

Last edited by hiveNzin0 (2018-03-15 18:33:22)

Offline

#7 2018-03-15 17:54:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,056

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

Please wrap shell output in "code" tags.

This is only one environment, apparently for a process started from zsh. The interesting bit is the difference in the environment of a process started through the start menu.

Offline

#8 2018-03-15 18:37:58

hiveNzin0
Member
Registered: 2011-10-02
Posts: 84

Re: [SOLVED]Starting apps from a shell, no HiDPI settings

Indeed, sorry. There are some differences regarding the scale factor.

I removed the env variables I had in my zshrc and put export QT_AUTO_SCREEN_SCALE_FACTOR=0 instead and now it is working.

Thanks a lot.

Offline

Board footer

Powered by FluxBB