Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Autostart kate - small font

  1. #1

    Default Autostart kate - small font

    I want to start kate automatically when KDE starts up and also when resuming from sleep. In the first case a KDE autostart script works perfectly. In the second case, I put a script in /usr/lib/systemd/system-sleep; this also works, but has a problem - kate is launched with an unreadably small menu font. The font in the main editing pane is ok, however. Does anyone know how to fix the small menu font in this case?

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,010
    Blog Entries
    1

    Default Re: Autostart kate - small font

    Quote Originally Posted by ian_gay View Post
    I want to start kate automatically when KDE starts up and also when resuming from sleep. In the first case a KDE autostart script works perfectly. In the second case, I put a script in /usr/lib/systemd/system-sleep; this also works, but has a problem - kate is launched with an unreadably small menu font. The font in the main editing pane is ok, however. Does anyone know how to fix the small menu font in this case?
    Can you show your working script? How do you handle launching it with the desired environment variables etc?
    Last edited by deano_ferrari; 20-Feb-2021 at 21:16.
    openSUSE Leap 15.2; KDE Plasma 5

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,010
    Blog Entries
    1

    Default Re: Autostart kate - small font

    Quote Originally Posted by deano_ferrari View Post
    Can you show your working script? How do you handle launching it with the desired environment variables etc?
    Further to the above, your script should set the appropriate DISPLAY and XAUTHORITY environment variables.
    openSUSE Leap 15.2; KDE Plasma 5

  4. #4

    Default Re: Autostart kate - small font

    Quote Originally Posted by deano_ferrari View Post
    Further to the above, your script should set the appropriate DISPLAY and XAUTHORITY environment variables.
    Thanks for your reply.
    DISPLAY is set correctly. What is the appropriate setting for XAUTHORITY?

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,010
    Blog Entries
    1

    Default Re: Autostart kate - small font

    Quote Originally Posted by ian_gay View Post
    Thanks for your reply.
    DISPLAY is set correctly. What is the appropriate setting for XAUTHORITY?
    That depends on the display manager. Do you have .Xauthority in the user's home directory?

    In you user's active session, check
    Code:
    ls $HOME/.Xauthority
    Perhaps something like this will be sufficient
    Code:
    declare -x XAUTHORITY="/home/<your_user>/.Xauthority"
    AFAIU with gdm at least, the pertinent location is now /run/user/1000/gdm/Xauthority
    Last edited by deano_ferrari; 21-Feb-2021 at 00:14.
    openSUSE Leap 15.2; KDE Plasma 5

  6. #6

    Default Re: Autostart kate - small font

    Quote Originally Posted by deano_ferrari View Post
    That depends on the display manager. Do you have .Xauthority in the user's home directory? In you user's active session, check
    Code:
    ls $HOME/.Xauthority
    Perhaps something like this will be sufficient
    Code:
    declare -x XAUTHORITY="/home//.Xauthority"
    AFAIU with gdm at least, the pertinent location is now /run/user/120/gdm/Xauthority
    Thanks. I've had a serious crash with the system involved. Will try this after it's recovered.

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,010
    Blog Entries
    1

    Default Re: Autostart kate - small font

    Quote Originally Posted by ian_gay View Post
    Thanks. I've had a serious crash with the system involved. Will try this after it's recovered.
    You should also be launching kate as the desired user (rather than as root).
    openSUSE Leap 15.2; KDE Plasma 5

  8. #8

    Default Re: Autostart kate - small font

    Quote Originally Posted by ian_gay View Post
    Thanks. I've had a serious crash with the system involved. Will try this after it's recovered.
    System is still down. Tried on old system running 15.1, same problem, setting XAUTHORITY has no effect.

    So I thought maybe it's picking up font size from the root account. So I ran systemsettings as root, and changed the menu font size. And I found:

    BUG IN PLASMA 5 ?
    Changing the menu font settings with systemsettings5 has _no effect_ on the actual fonts used in menus. (True for both root and normal user accounts) On a really old system, running 13.1, a change to menu font in systemsettings shows up in menus of all KDE apps, as you would expect.

    So where is menu font actually set in Plasma 5, and how do you change it?

  9. #9
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,010
    Blog Entries
    1

    Default Re: Autostart kate - small font

    Quote Originally Posted by ian_gay View Post
    System is still down. Tried on old system running 15.1, same problem, setting XAUTHORITY has no effect.

    So I thought maybe it's picking up font size from the root account.
    Yes, it is - which is why I already asked you to post your working script, and my hint about not executing it as root user.
    openSUSE Leap 15.2; KDE Plasma 5

  10. #10

    Default Re: Autostart kate - small font

    Quote Originally Posted by deano_ferrari View Post
    Yes, it is - which is why I already asked you to post your working script, and my hint about not executing it as root user.
    OK, here's my script

    Code:
    #! /bin/bash  
    if [ "$1" = "post" ]; then   
    su ian -c 'DISPLAY=:0 /usr/bin/kate /home/ian/misc/ian.rem' 
    fi

Page 1 of 2 12 LastLast

Posting Permissions

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