geany / geany-themes

A collection of color schemes for Geany
Other
351 stars 123 forks source link

Themes not applying to sudo #50

Closed saltbr1nger closed 1 year ago

saltbr1nger commented 1 year ago

Hi guys, Linux noob here, running Mint 20.3. Have been using Geany as my text editor and have themed it the way that I like when it opens normally. However, when I execute it with sudo, it only recognizes the Default and Alternate themes: none of the themes I've downloaded show.

Can I do anything about this so that when I go sudo geany <file to be edited> I can display my desired theme?

elextr commented 1 year ago

First the disclaimer:

The Geany developers strongly discourage running Geany (or any IDE) as superuser. An IDE by its very nature makes it easy to execute arbitrary commands, programs, and worst of all programs users wrote. The files that need to be edited by superuser are simple and do not need a whole IDE, its best to use a simple editor of your choice. Any damage or difficulties related to running Geany as superuser are not the responsibility of the Geany developers.

Then the answer:

One of the things sudo can do is change the working directory to the new user, so Geany run as another user is not accessing the config in the original user directory any more.