You are not logged in.
I noticed when I start i3 from LightDM, the font size is smaller compared to when I start i3 from TTY (using "startx" command).
This screenshot was taken when I started i3 from TTY.
https://i.imgur.com/MTGq1uu.png
This screenshot was taken when I started i3 from LightDM.
https://i.imgur.com/01cMb1i.png
Is there any idea to fix the scaling of LightDM?
Mod Edit - Replaced oversized images with links.
CoC - Pasting pictures and code
Last edited by nrcngominh (2020-02-01 05:25:19)
Offline
Welcome to the forums nrcngominh ![]()
You haven't given us any relevant information to go on...
Please post the contents of your startx and lightdm configuration files.
Offline
Welcome to the forums nrcngominh
You haven't given us any relevant information to go on...
Please post the contents of your startx and lightdm configuration files.
My bad, I'm sorry. Here is my X configuration
$ cat ~/.xinitrc
xrdb -merge ~/.Xresources
exec dbus-launch i3
$ cat ~/.Xresources
Xft.dpi: 120
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgbHere is my LightDM configuration
$ cat /etc/lightdm/lightdm.conf | grep "^[^#]"
[LightDM]
run-directory=/run/lightdm
[Seat:*]
greeter-session=lightdm-gtk-greeter
session-wrapper=/etc/lightdm/Xsession
[XDMCPServer]
[VNCServer]
$ cat /etc/lightdm/Xsession
#!/bin/sh
#
# LightDM wrapper to run around X sessions.
echo "Running X session wrapper"
# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
fi
done
# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
if [ -f "$file" ]; then
echo "Loading resource: $file"
xrdb -merge "$file"
fi
done
# Load keymaps
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
if [ -f "$file" ]; then
echo "Loading keymap: $file"
setxkbmap `cat "$file"`
XKB_IN_USE=yes
fi
done
# Load xmodmap if not using XKB
if [ -z "$XKB_IN_USE" ]; then
for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
if [ -f "$file" ]; then
echo "Loading modmap: $file"
xmodmap "$file"
fi
done
fi
unset XKB_IN_USE
# Run all system xinitrc shell scripts
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
for script in $xinitdir/*; do
echo "Loading xinit script $script"
if [ -x "$script" -a ! -d "$script" ]; then
. "$script"
fi
done
fi
# Run user xsession shell script
script="$HOME/.xsession"
if [ -x "$script" -a ! -d "$script" ]; then
echo "Loading xsession script $script"
. "$script"
fi
echo "X session wrapper complete, running session $@"Here is my xsessions
cat /usr/share/xsessions/*
[Desktop Entry]
Name=i3
Comment=improved dynamic tiling window manager
Exec=i3
TryExec=i3
Type=Application
X-LightDM-DesktopName=i3
DesktopNames=i3
Keywords=tiling;wm;windowmanager;window;manager;
[Desktop Entry]
Name=i3 (with debug log)
Comment=improved dynamic tiling window manager
Exec=i3-with-shmlog
Type=Application
Keywords=tiling;wm;windowmanager;window;manager;Last edited by nrcngominh (2020-02-01 04:38:06)
Offline
$ cat ~/.xinitrc
xrdb -merge ~/.Xresources
exec dbus-launch i3Lose the dbus-launch and see the second note in https://wiki.archlinux.org/index.php/Xinit#xinitrc
As for the font: "xdpyinfo | grep resolution" in either session will likely show different results?
Try to add "xrandr --dpi 120" in the lightdm wrapper.
Online
$ cat ~/.xinitrc xrdb -merge ~/.Xresources exec dbus-launch i3Lose the dbus-launch and see the second note in https://wiki.archlinux.org/index.php/Xinit#xinitrc
As for the font: "xdpyinfo | grep resolution" in either session will likely show different results?
Try to add "xrandr --dpi 120" in the lightdm wrapper.
Result of "xdpyinfo | grep resolution" is "resolution: 96x96 dots per inch" in either session.
After I add "xrandr --dpi 120" to /etc/lightdm/xsession, the result in i3 from LightDM is "resolution: 120x120 dots per inch" but the font size doesn't change.
Offline
I found the problem.
I have a ~/.profile file that be sourced by /etc/lightdm/Xsession but not by .xinitrc.
$ cat ~/.profile
export GDK_SCALE=1.25
export GDK_DPI_SCALE=0.8
export QT_AUTO_SCREEN_SET_FACTOR=0
export QT_SCALE_FACTOR=1.25
export QT_FONT_DPI=96After I remove this file, the font size goes back to normal.
Thank you.
Offline