Screen-Scaling for applications running as sudo

If none of the more specific forums is the right place to ask

Re: Screen-Scaling for applications running as sudo

Postby wizard10000 » 2019-08-06 11:11

The root account has its own home directory and its own configuration. The way I used to make the root account match user settings in KDE was to run systemsettings as root so configurations were written to root's home directory.

kdesu, kdesudo, gksu or gksudo systemsettings5 will get you where you want to be.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 104
Joined: 2019-04-16 23:15
Location: southeastern us

Re: Screen-Scaling for applications running as sudo

Postby Thomas123 » 2019-08-06 12:24

Thank you for the hint, Wizard10000,

I was originally also thinking along these lines. Makes total sense.

But trying it: kdesu, kdesudo, gksu and gksudo are all not available in Buster anymore. ... if I am not missing something.

And "sudo systemsettings5" brings strange results. Changing the font size doesn't change anything in the result. But changing "forced DPI" or "Screen-Scaling" does indeed change the result for the root applications. But the normal user applications get also changed ... way too big then.
:-(
Do have any idea?
Thomas123
 
Posts: 36
Joined: 2018-10-29 09:18

Re: Screen-Scaling for applications running as sudo

Postby wizard10000 » 2019-08-06 14:19

Thomas123 wrote:"sudo systemsettings5"


Don't use sudo to start graphical applications as it will overwrite configurations in your home directory with files owned by root. Unless you use 'sudo -i' the root account inherits *your* environment variables (and writes root-owned files into *your* home directory). You may find some breakage already if you ran 'sudo systemsettings5'. To fix, as root:

Code: Select all
sudo chown -R user:user /home/user


Substitute your username for "user"

kdesu is in the repos and can be installed, but for occasional use 'sudo -i' will force graphical applications to write configs to /root instead of your home directory.

Code: Select all
sudo -i
*password prompt here*
systemsettings5


Hope this helps -
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 104
Joined: 2019-04-16 23:15
Location: southeastern us

Re: Screen-Scaling for applications running as sudo

Postby stevepusser » 2019-08-06 18:47

Users here have reported that the MX 19 kde-servicemenu-rootactions (which uses pkexec, BTW) works well in Buster, Bullseye, and Sid-based distros, and does allow you to run a root Dolphin:

http://mxrepo.com/mx/repo/pool/main/r/r ... rvicemenu/

It's the mx19+3 deb. We have a few other handy service menus, such as one that allows you to install any number of compatible local debs at once with apt(requires sudo), one for creating different kinds of archives, and the kim4 one for quick image processing with Imagemagick.

BTW, we had a wonderful newcomer to the MX forums yesterday. He asked questions about simple things, which is OK, but when pointed to our user manual for the answers in simple language, said he didn't want to "learn anything". He also complained about a drop-down list in a tweak applet, and when I pointed out that he had to click it to see the options, and that was common across all GUIs, including Windows, called me a condescending twat.

He got double his money back on the way out...
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Clipgrab 3.8.6, Hedgewars 1.0.0, PulseEffects 4.6.8, Telegram-desktop 1.8.15, Pale Moon 28.7.2, KeepassXC 2.5.1
User avatar
stevepusser
 
Posts: 11313
Joined: 2009-10-06 05:53

Re: Screen-Scaling for applications running as sudo

Postby Head_on_a_Stick » 2019-08-06 19:31

@Steve, I loved your insults in that thread, MX should have a fortune package for stuff like that :D
Don't break DebianHow to report bugs

SharpBang GNU/Linux® — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10695
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Screen-Scaling for applications running as sudo

Postby Thomas123 » 2019-08-07 09:32

Thank you wizard10000 for your help!

So what I did:

Code: Select all
sudo -i
sudo chown -R ich:ich /home/ich
systemsettings5


And in the settings which opens up then ... I changed font-sizes ... with no effect. But if I change DPI ... it effects all the applications I open after that as the normal user.
Thomas123
 
Posts: 36
Joined: 2018-10-29 09:18

Re: Screen-Scaling for applications running as sudo

Postby wizard10000 » 2019-08-07 13:55

Thomas123 wrote:...But if I change DPI ... it effects all the applications I open after that as the normal user.


That might be a global setting.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 104
Joined: 2019-04-16 23:15
Location: southeastern us

Re: Screen-Scaling for applications running as sudo

Postby Thomas123 » 2019-08-10 06:50

wizard10000 wrote:That might be a global setting.


Yes, changing the DPI and changing the overall scaling factor ... both seem to be global settings.

And changing the font size has no effect at all. Neither for the normal user nor for root.

:-(
Thomas123
 
Posts: 36
Joined: 2018-10-29 09:18

Re: Screen-Scaling for applications running as sudo

Postby L_V » 2019-08-10 09:03

Thomas123 wrote:So I have scaled my screen by a factor of 1.4 in the KDE-screen-settings.
Now this seems to only apply to the normal user.

This is unclear. Why do you need this ? What is the purpose ?
Thomas123 wrote:And if I run apps as sudo

sudo is a command to execute commands in a terminal , but certainly not to launch graphical applications.
This was the role of kdesudo until Buster.
https://packages.debian.org/stretch/kdesudo

Now it's a fact, kdesudo does not exist anymore. Is it a problem ?
Describe what you precisely want to achieve, and there is may be a solution.

Example, there is absolutely no problem in you user environment to have both user and root sessions open in the same user Konsole window.
(see profile feature of Konsole).
Image

As user, I can navigate in Dolphin in /etc/ directory, open /etc/fstab with kate or kwrite, edit fstab, and save it: a password will be requested because root is the owner of fstab.
I can also simply edit fstab in a terminal
Code: Select all
sudo -e /etc/fstab

Then, no problems, but solutions.
Thomas123 wrote:sudo thunar

Good summary: two words, two mistakes.
Why Thunar which is a gnome application in KDE, with Dolphin which is a very good file browser.
You are looking for problems.
L_V
 
Posts: 1171
Joined: 2007-03-19 09:04

Re: Screen-Scaling for applications running as sudo

Postby Thomas123 » 2019-08-10 10:15

Thank you L_V for your help!

L_V wrote:
Thomas123 wrote:So I have scaled my screen by a factor of 1.4 in the KDE-screen-settings.
Now this seems to only apply to the normal user.

This is unclear. Why do you need this ? What is the purpose ?


Why I have the scale factor of 1.4? ... Because otherwise everything on my screen is way too small to be useable. Yes, I could increase the size of fonts and symbols etc. separately, but certain things can not be addressed this way.


L_V wrote:Now it's a fact, kdesudo does not exist anymore. Is it a problem ?
Describe what you precisely want to achieve, and there is may be a solution.


I want to use a graphical file browser (preferably dolphin) to navigate to /etc/fstab for instance and other files like it and rename them, copy them, delete them etc. without putting in my password each time.

L_V wrote:Why Thunar which is a gnome application in KDE, with Dolphin which is a very good file browser.


Until now I just did: sudo dolphin.
Now this doesn't work in Buster at all. Sudo thunar does work, but thunar is displayed too small to be usable.
Thomas123
 
Posts: 36
Joined: 2018-10-29 09:18

Re: Screen-Scaling for applications running as sudo

Postby L_V » 2019-08-10 10:45

I wonder if you have the correct firmware.
Don't understand why you can't adjust your screen resolution with
Code: Select all
kcmshell5 kcm_kscreen

You should have something totally correct by default. I have never modified this setting.

If you insist with your "sudo thunar" or "sudo dolphin", it will be without me: you will need a specialist to explain how to make wrong things.
In Dolphin, you can have a terminal window with "F4" key, and to rename a root file...
Code: Select all
sudo mv abcd xyzt

Don't see what it complicated.
And I hope you don't have to rename root files every day: if so, be ready for more problems to come.
L_V
 
Posts: 1171
Joined: 2007-03-19 09:04

Re: Screen-Scaling for applications running as sudo

Postby Thomas123 » 2019-08-10 11:01

My screen resolution is set to the preferred monitor resolution. ... Maybe I just like things to be a bit bigger and easier to see also from a little more distance.

The scaling function is wonderful for everything else. And I guess it is there for a reason too and I am not the only one using it.

And yes of course ... the terminal is always here and everything can be done from the terminal and I am able to do so too. ... But for the last 10 years, that I am using Linux, it was so damn convenient to "sudo dolphin". Without any problem ever. Just wonderful!

You could do everything then, even double click to open fstab in a graphical text editor and modify it without having to type in your password once more (because dolphin was already running as root). And rename, and delete, and move etc. ... everything so easy and convenient in just one single place. ... and without having to type tons of characters. ... Now this seems to be gone. What a pity.

Maybe you will understand this feeling, once the terminal will be gone too and you will have to resort to typing in 0's and 1's again. ... ;-)
Thomas123
 
Posts: 36
Joined: 2018-10-29 09:18

Re: Screen-Scaling for applications running as sudo

Postby L_V » 2019-08-10 11:13

Thomas123 wrote:My screen resolution is set to the preferred monitor resolution. ... Maybe I just like things to be a bit bigger and easier to see also from a little more distance.
Then modify the fonts size and the icon size if necessary.
You have everything in systemsettings5 to do this.
I would not change the screen default resolution, but I don't have your screen and eyes to confirm.

For the other part, quite convinced you have bad practices: I will not help you with your "sudo any_graphic".
Quite sure you are going to break something in the coming weeks, and will ask for help.

+ keep in mind this if necessary for you. Dolphin root actions.
stevepusser wrote:http://mxrepo.com/mx/repo/pool/main/r/rootactions-servicemenu/
L_V
 
Posts: 1171
Joined: 2007-03-19 09:04

Re: Screen-Scaling for applications running as sudo

Postby Thomas123 » 2019-08-10 11:35

Like I wrote to you in my second to last post:

Thomas123 wrote: Yes, I could increase the size of fonts and symbols etc. separately, but certain things can not be addressed this way.


And to your:
L_V wrote:Quite sure you are going to break something in the coming weeks, and will ask for help.


Like I said: I used "sudo dolphin" for 10 years without any problems. There was no need to ask for help.

And yes, the Dolphin root actions are a workaround and not too bad. But also not available per default anymore, like they used to be.

It would be nice, to get a confirmation from you, regarding all the regressions I described in detail.
Thomas123
 
Posts: 36
Joined: 2018-10-29 09:18

Re: Screen-Scaling for applications running as sudo

Postby L_V » 2019-08-10 12:15

What you call "regression" is your perception, especially if you did not know the role of kdesudo or gksudo for Gnome (maybe developers lost their time).
A question not clear to me: why do you have to modify so often system files, and rename them ? I never do, or never in graphic mode.

We don't have the same use of a desktop, and the same need.
I am not the right person to help you in your direction.
Sorry.
L_V
 
Posts: 1171
Joined: 2007-03-19 09:04

PreviousNext

Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable