You are not logged in.

#1 2024-08-26 14:03:36

calyx
Member
Registered: 2024-08-26
Posts: 23

dpi issue when logging in via display manager but not with startx

Hi all,

I have a (to me at least) strange issue.

When I log in to my system using a display / login manager (lemurs), some applications have really large fonts and icons.
When I log in via tty, and then run startx, all looks good.

I believe this is related to the setting Xft.dpi: 120 in my .Xresources. When I run startx this seems to be read and applied properly. However, this value seems to be (at least partly) ignored when lemurs run.

My .xinitrc loads / merges the .Xresources, so I do not see why this is not working. Any help would be appreciated.

Last edited by calyx (2024-08-26 14:14:02)


calyx — outer covering of a flower

Offline

#2 2024-08-26 16:52:37

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

Re: dpi issue when logging in via display manager but not with startx

I believe this … seems

xrdb -q | grep -i dpi
xdpyinfo | grep resol

Online

#3 2024-08-26 17:31:23

calyx
Member
Registered: 2024-08-26
Posts: 23

Re: dpi issue when logging in via display manager but not with startx

Thanks a lot for getting back to me, @seth!

Doing this after having started a startx session:

$ xrdb -q | grep -i dpi
Xft.dpi:	120
$ xdpyinfo | grep resol
  resolution:    256x261 dots per inch

Doing this after having used lemurs login manager:

$ xrdb -q | grep -i dpi
$ xdpyinfo | grep resol
  resolution:    256x261 dots per inch

This is my .xinitrc:

#!/bin/sh

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

# merge in defaults and keymaps

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

# start some nice programs

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

# start window manager

if [ ${XWM} == "i3" ] ; then
    exec i3
elif [ ${XWM} == "qtile" ] ; then
    exec qtile start
else
    echo "error: unknown environment variable XWM: '${XWM}'"
fi

This is my .Xresources:

Xcursor.theme: Qogir-dark
Xcursor.size: 16
Xft.dpi: 120

Last edited by calyx (2024-08-26 17:40:59)


calyx — outer covering of a flower

Offline

#4 2024-08-26 18:10:29

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

Re: dpi issue when logging in via display manager but not with startx

Does lemurs even run the xinitrc or just the i3.desktop session service?
Have some marker in the xinitrc, eg. "date > /tmp/xinitrc.date" and see whether that gets update when starting the  session w/ lemurs

Online

#5 2024-08-26 18:31:46

calyx
Member
Registered: 2024-08-26
Posts: 23

Re: dpi issue when logging in via display manager but not with startx

Good idea.

Yes, .xinitrc is executed. I did as suggested, and the results are below.

.xinitrc with debugging markers:

#!/bin/sh

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

# merge in defaults and keymaps

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

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

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

    # debug
    date > /tmp/xinitrc.date.1
fi

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

# start some nice programs

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

# debug
date > /tmp/xinitrc.date.2

# start window manager

if [ ${XWM} == "i3" ] ; then
    exec i3
elif [ ${XWM} == "qtile" ] ; then
    exec qtile start
else
    echo "error: unknown environment variable XWM: '${XWM}'"
fi

result:

$ ls -al /tmp/xinitrc*
-rw-r--r-- 1 poq poq 29 Aug 26 13:27 /tmp/xinitrc.date.1
-rw-r--r-- 1 poq poq 29 Aug 26 13:27 /tmp/xinitrc.date.2

Last edited by calyx (2024-08-26 18:32:31)


calyx — outer covering of a flower

Offline

#6 2024-08-26 18:48:35

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

Re: dpi issue when logging in via display manager but not with startx

Are qtile and/or "exec xterm" likewise affected?
(Since you're setting the xrdb value, something must unset it…)
Is that the only value set/cleared from xrdb?

You could also log "xrdb -q | grep -i dpi" at various stages of the xinitrc (though I expect it to be set after the the xrdb merge and before the i3 exec)

Sidebar: "xrandr --dpi 120"

Online

#7 2024-08-26 19:56:10

calyx
Member
Registered: 2024-08-26
Posts: 23

Re: dpi issue when logging in via display manager but not with startx

Thanks for your help, @seth. I appreciate your inputs. However, still no luck.

After having spent too much time on this issue, I decided to simply uninstall Lemurs and stick to tty login. That works fine, and I do not need a fancy login screen. So, all is good.


calyx — outer covering of a flower

Offline

Board footer

Powered by FluxBB