I am trying to set up Raspberry Pi model 3b+ as a router. I am using Raspbian stretch and installed kate as my code editor. Then I noticed when using kate with sudo, the text and menu is smaller than without using sudo.

2 instance of kate, with and without sudo

So I started 2 instance of kate, one with sudo and the other without sudo

  • The left one is started normally (from start menu at left top)
  • The right one is started with sudo -b kate.
  • Both have the same monitor resolution (1360x768)
  • Even if I zoom out on the normal kate to make the text smaller, the menu size is still larger than the one started with sudo

This strange behavior makes me wonder, so I have several questions:

  1. Can someone explain why the text size and menu size (or app resolution) is different when starting kate with/without sudo?
  2. Is it possible to make kate start with smaller text (as if started using sudo) by default?
  3. Does this behavior applies to (some) other applications?
  4. Is it possible to make other apps smaller too? Because IMO some apps also have large text.

UPDATE: differences Now I have changed both font size to 9pt and I still notice menu text are larger and the one with sudo displays 6 more lines. I still don't know what causes this behavior, but changing font size to 9 is good enough for me.

2 Answers 2


I don't know kate, but presume it is a GUI application.

It is generally inadvisable to run X11 applications as root, but if you want to do so you should use gksudo.

Your underlying problem is probably the root environment which is not configured. gksudo has options to preserve environment.

PS It seems strange to run an interactive editor in the background.

  • So if I use gksudo can I protect myself from the exploit mentioned by David?
    – wthe22
    Commented Mar 25, 2019 at 11:19
  • I would like to mention that sudo -E will also preserve the current environment. @wthe22 All people here tell you that you should not use root for working. On Unix systems root is not a user for normal work. There are many special conditions for root that make applications work as not expected. And it is always a security risk to use root continuously as working user. It is only meant to configure the protected system so it can be used by normal user.
    – Ingo
    Commented Mar 25, 2019 at 12:32

To change the default font in Kate go to the Settings menu, then Configure KateColors & FontsFont.

You should avoid opening GUI applications as root, since X11 applications can be exploited this way.

  • It works, and thanks for mentioning the exploit. btw I still notice menu text are still larger, still makes me wonder what cause this to happen.
    – wthe22
    Commented Mar 25, 2019 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.