You are not logged in.

#1 2018-03-17 15:13:23

codedmart
Member
Registered: 2016-11-07
Posts: 25

Questions around HiDPI, i3, and dbus

I am trying to figure out how I am suppose to start everything properly. Here is what I have right now in ~/.xinitrc:

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

if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
  eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi

xrbd -merge ~/.Xresources &

export QT_AUTO_SCREEN_SCALE_FACTOR=1
export GDK_SCALE=2
export GDK_DPI_SCALE=0.5

exec /etc/gdm/Xsession dbus-launch i3

This feels wrong to me as now if I

echo $DBUS_SESSION_BUS_ADDRESS

I see

unix:abstract=/tmp/dbus-im3LUsZJCy,guid=b73f6a4342f10c18d686344f5aad2c78

Which I feel like I read is wrong. If I remove the

dbus-launch

before

i3

Then I feel like dbus is not properly used because if I start gnome-terminal using dmenu or rofi the gtk ui seems to respect some HiDPI settings but not others. If I run

tr '\0' '\n' < /proc/16682/environ <-- pid of gnome-terminal

I don't see anything about

GDK_SCALE

or other env variables I set in ~/.xinitrc. If I remove

/etc/gdm/Xsession

The ui isn't scaled at all and is tiny. What and where should I be running things for this to work properly. I know what I have now is wrong because I can't run mailspring anyone as it complains about not being able to properly store my password. Yet this was working because I added

dbus-launch

before i3.

Offline

#2 2018-03-17 16:16:11

scottro
Member
From: NYC
Registered: 2002-10-11
Posts: 466
Website

Re: Questions around HiDPI, i3, and dbus

Have you seen the ArchWiki's HiDPi article?  It has several useful tips on using .Xdefaults, xrandr, and so on.
https://wiki.archlinux.org/index.php/HiDPI

Last edited by scottro (2018-03-17 16:20:10)

Offline

#3 2018-03-17 16:28:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,550

Re: Questions around HiDPI, i3, and dbus

First thing, get rid of that dbus-launch block in .xinitrc. That's handled by systemd --user now.

Offline

#4 2018-03-17 18:04:21

codedmart
Member
Registered: 2016-11-07
Posts: 25

Re: Questions around HiDPI, i3, and dbus

@scottro: Yes I have followed and tried various things from that wiki page.

@Scimmia: I agree with that but here is where I start not understanding some things. If I just use

exec /etc/gdm/Xsession i3

Most applications work fine. But there are a few instances that I have noticed so far where they do not. Specifically gnome-terminal and if I start totem from navigating to a video file in nautilus and launching it that way. If I launch totem from dmenu or rofi the ui is correct. Here is what I am noticing with gnome-terminal and totem when they ui is not scaled properly.

Incorrect scaling with totem when launched from selecting a video within nautilus

[~]-> ps ax | grep totem
14152 ?        Sl     0:03 /usr/bin/totem --gapplication-service
14455 pts/0    S+     0:00 grep --color=auto totem
[~]-> tr '\0' '\n' < /proc/14152/environ
SHELL=/bin/bash
DBUS_STARTER_ADDRESS=unix:path=/run/user/1000/bus,guid=afebe148f6df592e053963815aad5544
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
MAIL=/var/spool/mail/bmartin
JOURNAL_STREAM=9:20163
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus,guid=afebe148f6df592e053963815aad5544
INVOCATION_ID=c286608249354a6696e8733f5d59897a
USER=bmartin
XAUTHORITY=/home/bmartin/.Xauthority
DBUS_STARTER_BUS_TYPE=session
LANG=en_US.UTF-8
MANAGERPID=928
HOME=/home/bmartin
LOGNAME=bmartin

Correct scaling with totem when launching from dmenu or rofi

[~]-> ps ax | grep totem
17484 ?        Sl     0:00 totem
17660 pts/0    S+     0:00 grep --color=auto totem
[~]-> tr '\0' '\n' < /proc/17484/environ
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:
LANG=en_US.UTF-8
DISPLAY=:0
INVOCATION_ID=5798b8a54580472db01c635800b7aecf
GDK_SCALE=2
EDITOR=vim
VIRTUAL_ENV_DISABLE_PROMPT=1
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_VTNR=1
XDG_SESSION_ID=c1
USER=bmartin
GDK_DPI_SCALE=0.5
PWD=/home/bmartin
HOME=/home/bmartin
JOURNAL_STREAM=9:18150
DESKTOP_STARTUP_ID=i3/rofi/1149-7-arch_TIME728119
GTK_MODULES=canberra-gtk-module
MAIL=/var/spool/mail/bmartin
WINDOWPATH=1
SHELL=/bin/bash
TERM=linux
FREETYPE_PROPERTIES=truetype:interpreter-version=40
SHLVL=3
XDG_SEAT=seat0
PROMPT_COMMAND=customPromptCommand
LOGNAME=bmartin
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/home/bmartin/.Xauthority
QT_AUTO_SCREEN_SCALE_FACTOR=1
PATH=/home/bmartin/.nix-profile/bin:/home/bmartin/.bin:/home/bmartin/.local/bin:/home/bmartin/.nix-profile/bin:/usr/local/bin:/home/bmartin/.gem/ruby/2.4.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/bmartin/.fzf/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
_=/usr/bin/rofi

I see the same issue if I launch gnome-terminal from dmenu or rofi where the scale is wrong. But if I launch gnome-terminal using dbus-launch then the ui scales properly.

Offline

Board footer

Powered by FluxBB