Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: Fonts are too small when root starts applications after "su -"

  1. #1

    Unhappy Fonts are too small when root starts applications after "su -"

    This is a recent install of Leap 15.1. I use Plasma.

    I configured fonts and themes both for a non-root user and root. Applications' windows, fonts and icons look good.

    But when I do
    Code:
    su -
    , become superuser in a terminal, and then start an application as root, then the window of that application looks bad: fonts are too small (in particular, fonts in popup boxes and menus), and the theme is an unusual one, one that I do not use.

    This applies to all applications started, for example, kate, firefox, konsole, yast2.

    I have forced the correct DPI for root and non-root user.

    I created a fresh user, and observed the same.

    Earlier, I could resolve a similar issue by setting up desired values in GTK settings and by forcing DPI, but with 15.1 this does not work.

    Any ideas?

  2. #2
    Join Date
    Jan 2017
    Location
    Nürnberg, Germany
    Posts
    139

    Default Re: Fonts are too small when root starts applications after "su -"

    I remember having a similar problem with sudo/kdesu etc, and I could alleviate it by setting my theme and font size in /root/.config/gtk-3.0/settings.ini by copying over my user settings to it with a text editor.
    Here’s my /root/.config/gtk-3.0/settings.ini:
    Code:
    [Settings]
    gtk-font-name=Helvetica Neue [LINO] 12
    gtk-theme-name=clearlooksphenix
    gtk-icon-theme-name=clearlooksphenix
    gtk-fallback-icon-theme=gnome
    gtk-toolbar-style=GTK_TOOLBAR_ICONS
    gtk-menu-images=1
    gtk-button-images=1
    I vaguely remember having to modify some other config file, but I can’t remember at the moment.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,601

    Default Re: Fonts are too small when root starts applications after "su -"

    I do not quite understand all the things you are describing.

    Normaly I start YaST from the end-users GUI (KDE) session by clicking on the icon, etc. All looks normal.

    Sometimes (e.g. when I want to see it in another language), I start it from a "Terminlal - superuser mode) which starts Konsole with su -) with e.g. LANG=C yast2 and I get the same "normal" windows.

    I know some use kdesu kate for editing root managed files, but I use vi from the su - terminal, thus I have no experience here.

    I of course never start FF as root, that being one of the more stupid trials to compromise my system.

    I never tried to set any KDE configuration values for root, because root never uses a GUI. As far as I understand it, The YaST windows are simply organised by the configurations of the GUI session (of the end-user).

    Could be that I do things in a complete different way then you, but I can not reproduce your problem here.
    Henk van Velden

  4. #4
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,409

    Default Re: Fonts are too small when root starts applications after "su -"

    Quote Originally Posted by ZStefan View Post
    Any ideas?
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,001
    Blog Entries
    3

    Default Re: Fonts are too small when root starts applications after "su -"

    From a root command line, you can probably do:
    [code]# HOME=/root systemsettings5[/HOME]
    and then configure font settings for the root user.

    Note: I have not tried this. And I am assuming, perhaps wrongly, that this is for KDE.
    openSUSE Leap 15.1; KDE Plasma 5;

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,627
    Blog Entries
    1

    Default Re: Fonts are too small when root starts applications after "su -"

    I have generally found across all OS (not just Linux) that configuring dpi produces unexpected and uneven results and never recommend that approach.

    Instead,
    I always recommend configuring themes and screen resolution using system and graphic environment tools... and have never had a reported program thereafter.

    Recommend returning all your dpi settings to default (there is often a "default" button to help you) and then use the other tools I described to modify appearance.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,409

    Default Re: Fonts are too small when root starts applications after "su -"

    Quote Originally Posted by tsu2 View Post
    Recommend returning all your dpi settings to default (there is often a "default" button to help you) and then use the other tools I described to modify appearance.
    There is not one single default. Xorg defaults to 96, but it can be overridden by xorg.conf*, xrandr and/or a startup switch.

    GUI tools to force DPI mostly use xrdb's Xft.dpi, the knob Gnome provides for "scaling". Xrdb's default is null, unless you are using gtk 3.17 or newer on any distro except current and recent openSUSE. GTK3's post-3.16 default is to replace null with 96 if nothing has set it non-null. openSUSE undid this misfeature in bug 1022830 after pleas to do so fell on deaf ears. GTK and QT apps take their direction from Xft.dpi if it exists. Among other apps, some do, some don't, among the latter, Xterm, Xmessage and their x11-tools kin. Last I checked many moons ago, WINE was epoxied to 96, and *Office nearly as bad, forcing all UI and content to be set either entirely from within, or a combination of within and an rpm theme.

    Over a dozen years ago, X would calculate correct physical DPI from EDID size and resolution. It still could if it wasn't disabled in order to match Windows' and Mac broken behavior forcing 96 regardless of actual physical. That it still could is evidenced by the fact that manually feeding DisplaySize to it in xorg.conf* results in accurate physical, or any arbitrary, DPI.

    How it works in Wayland I have no idea. I have yet to find a reason to try it, given its heritage, or developmental state.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  8. #8

    Unhappy settings.ini is ignored

    Quote Originally Posted by unix111 View Post
    I remember having a similar problem with sudo/kdesu etc, and I could alleviate it by setting my theme and font size in /root/.config/gtk-3.0/settings.ini by copying over my user settings to it with a text editor.
    Here’s my /root/.config/gtk-3.0/settings.ini:
    Code:
    [Settings]
    gtk-font-name=Helvetica Neue [LINO] 12
    gtk-theme-name=clearlooksphenix
    gtk-icon-theme-name=clearlooksphenix
    gtk-fallback-icon-theme=gnome
    gtk-toolbar-style=GTK_TOOLBAR_ICONS
    gtk-menu-images=1
    gtk-button-images=1
    I vaguely remember having to modify some other config file, but I can’t remember at the moment.
    This didn't help.

    The settings.ini file contained my previous settings. I tried with your suggestion.

    But any setting in this file is ignored when a graphical application is started after doing
    su -

  9. #9

    Unhappy Re: Fonts are too small when root starts applications after "su -"

    Quote Originally Posted by hcvv View Post
    I do not quite understand all the things you are describing.

    I know some use kdesu kate for editing root managed files, but I use vi from the su - terminal, thus I have no experience here.

    I never tried to set any KDE configuration values for root, because root never uses a GUI. As far as I understand it, The YaST windows are simply organised by the configurations of the GUI session (of the end-user).

    Could be that I do things in a complete different way then you, but I can not reproduce your problem here.

    Often I have a need in the following.

    I work as non-root user. Then, in the middle of that work, a need arises to do some work as root, for example, to do some manipulations with files and folders that need root access.

    I don't logout. Instead, I start dolphin as root after "su -". The dolphin comes onto screen with very small fonts and bad icons.


    To reproduce:

    Code:
    1) Use KDE.
    
    2)  Login as root and adjust fonts and themes, including for GTK applications. Achieve nice looks. This succeeds.
    
    3)  Logout or reboot.
    
    4)  Login as non-root and do the same. This also succeeds.
    
    5)  Don't logout. Open a terminal and there become root via su -
    
    6)  Start a popular graphical application, for example, kate, dolphin, yast2. 
    
    7)  Check whether the fonts and icons look good and similar to the configured ones.

  10. #10

    Unhappy Fonts in xmessage ansd xterm

    Quote Originally Posted by mrmazda View Post

    Fonts in xmessage look too small. About twice smaller than in your picture.

    Fonts in xterm look nice and perhaps a little big.

    However, I see a hint in the terminal after issuing "xmessage -h":

    Warning: Missing charsets in String to FontSet conversion
    Warning: Unable to load any usable fontset

Page 1 of 4 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •