Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Screen-Scaling for applications running as sudo
Screen-Scaling for applications running as sudo
I guess this does not just apply for KDE, but I'm not sure.
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. And if I run apps as sudo, they appear much too tiny. How can I set a scale factor for those too?
Does anyone know this?
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. And if I run apps as sudo, they appear much too tiny. How can I set a scale factor for those too?
Does anyone know this?
Re: Screen-Scaling for applications running as sudo
What apps are you running as root? And how are you invoking them, e.g. sudo gedit?Thomas123 wrote:... if I run apps as sudo ...
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: Screen-Scaling for applications running as sudo
Apart from the implications of running a non-root gui app as root, I doubt Thunar is supposed to be run that way which leads straight to the answer, which is that there is no way to fix your issue.
If you were referring to an app, that by its very nature needs to be run as root, that is, an app that prompts for the root password upon starting it, then that would be an issue.
If you were referring to an app, that by its very nature needs to be run as root, that is, an app that prompts for the root password upon starting it, then that would be an issue.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: Screen-Scaling for applications running as sudo
Now this is strange ... Dolphin can't even run as sudo anymore. The dolphin context-menu-root-actions are also not supported anymore. Now you say the above about thunar.
... How can I copy, move, delete files which require root-privileges without using the terminal then?
... How can I copy, move, delete files which require root-privileges without using the terminal then?
Re: Screen-Scaling for applications running as sudo
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Screen-Scaling for applications running as sudo
Use this instead if you want to run thunar with elevated privileges:Thomas123 wrote:sudo thunar
Code: Select all
pkexec thunar
And note that the GTK2+ toolkit employed by thunar does not allow for scaling of the UI elements so KDE-screen-settings [sic] cannot change that.
@phenest: the admin:// trick can only be used for editing or viewing files but not for moving or copying.
deadbang
Re: Screen-Scaling for applications running as sudo
The link you provided says you can. So I just tested it, and you can cut/copy/paste files and folders. In Nautilus anyway.Head_on_a_Stick wrote:@phenest: the admin:// trick can only be used for editing or viewing files but not for moving or copying.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Screen-Scaling for applications running as sudo
Oh really? In which case thanks for the correction and sorry for the noise
deadbang
Re: Screen-Scaling for applications running as sudo
And thank you for the handy tip.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D
Re: Screen-Scaling for applications running as sudo
Thank you guys for your help!
I tried Midnight Commander as you suggested. But it doesn't even support drag and drop. Just copying a file over into another folder seems to take 10 times as many clicks or keystrokes as normally.
Also: The admin:// trick works in thunar. (Not in dolphin though) ... and the size is ofc just fine. But trying to open a file with kate from there gives a launcher message: "unknown protocol „admin“."
Right now this all looks to me like a regression in usability instead of progress.
Am I missing something here? Why has this simple thing gotten so complicated?
Now this gives the same result as "sudo thunar": too small to use.Head_on_a_Stick wrote:Code: Select all
pkexec thunar
I tried Midnight Commander as you suggested. But it doesn't even support drag and drop. Just copying a file over into another folder seems to take 10 times as many clicks or keystrokes as normally.
But how does thunar do the trick in the normal user mode then? There the size is just fine.Head_on_a_Stick wrote:And note that the GTK2+ toolkit employed by thunar does not allow for scaling of the UI elements so KDE-screen-settings [sic] cannot change that.
Also: The admin:// trick works in thunar. (Not in dolphin though) ... and the size is ofc just fine. But trying to open a file with kate from there gives a launcher message: "unknown protocol „admin“."
Right now this all looks to me like a regression in usability instead of progress.
Am I missing something here? Why has this simple thing gotten so complicated?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Screen-Scaling for applications running as sudo
Yes but pkexec should always be preferred over sudo (if the program supplies a polkit configuration file, which thunar does) because it doesn't use elevated permissions for the entire GUI.Thomas123 wrote:Now this gives the same result as "sudo thunar": too small to use.Head_on_a_Stick wrote:Code: Select all
pkexec thunar
Well just use the shell then. I always find that quicker than a GUI file manager, especially for batch operations. I don't even have a graphical file manager installed on my systemThomas123 wrote:I tried Midnight Commander as you suggested. But it doesn't even support drag and drop. Just copying a file over into another folder seems to take 10 times as many clicks or keystrokes as normally.
Hmm, OK, I'm clearly speaking out of my ass there then (again). Sorry about that. I have no idea how to make a root thunar scale properly.Thomas123 wrote:But how does thunar do the trick in the normal user mode then? There the size is just fine.Head_on_a_Stick wrote:And note that the GTK2+ toolkit employed by thunar does not allow for scaling of the UI elements so KDE-screen-settings [sic] cannot change that.
The admin:// protocol is used by GVFS, which is a GNOME thing and so won't work with KDE applications.Thomas123 wrote:Also: The admin:// trick works in thunar. (Not in dolphin though) ... and the size is ofc just fine. But trying to open a file with kate from there gives a launcher message: "unknown protocol „admin“."
This bug report suggests that running thunar under the normal user (ie, without using pkexec or admin://) and then opening the system file with Kate should still allow you to edit the file because Kate will offer a polkit authentication window when you try to save the file.
There is a concerted effort under way be the developers of the various desktops to eliminate the bad practice of running GUI applications under root privileges, some adjustment may be required on the part of the user.Thomas123 wrote:Why has this simple thing gotten so complicated?
deadbang
Re: Screen-Scaling for applications running as sudo
Thank you again!
This makes things a bit clearer ... though not easier.
A graphical file manager is in my experience a huge win in convenience and time saving. For me it would be horrible to give it up.
BTW: pkexec kate (or kwrite) ... also gives an error: QXcbConnection: Could not connect to display.
Well, anyways, thank you for your help!
This makes things a bit clearer ... though not easier.
A graphical file manager is in my experience a huge win in convenience and time saving. For me it would be horrible to give it up.
BTW: pkexec kate (or kwrite) ... also gives an error: QXcbConnection: Could not connect to display.
Well, anyways, thank you for your help!
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Screen-Scaling for applications running as sudo
You're not supposed to run Kate as root but it still should be able to edit system files if you run it as your normal user, at least according to my linked bug report. So you don't need to run thunar as root at all, to copy and/or move system files use the admin:// protocol.Thomas123 wrote:BTW: pkexec kate (or kwrite) ... also gives an error: QXcbConnection: Could not connect to display.
deadbang
Re: Screen-Scaling for applications running as sudo
Yes, true, ... but double the work:
First I navigate to the file as admin, to rename it.
Second I need to navigate there again as normal user, to open it in Kate.
It used to be so easy and nice before. What a pitty.
First I navigate to the file as admin, to rename it.
Second I need to navigate there again as normal user, to open it in Kate.
It used to be so easy and nice before. What a pitty.
- wizard10000
- Global Moderator
- Posts: 557
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 76 times
- Been thanked: 85 times
Re: Screen-Scaling for applications running as sudo
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.
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
-- anais nin
Re: Screen-Scaling for applications running as sudo
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?
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?
- wizard10000
- Global Moderator
- Posts: 557
- Joined: 2019-04-16 23:15
- Location: southeastern us
- Has thanked: 76 times
- Been thanked: 85 times
Re: Screen-Scaling for applications running as sudo
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:Thomas123 wrote:"sudo systemsettings5"
Code: Select all
sudo chown -R user:user /home/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
we see things not as they are, but as we are.
-- anais nin
-- anais nin
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 71 times
Re: Screen-Scaling for applications running as sudo
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...
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...
MX Linux packager and developer
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Screen-Scaling for applications running as sudo
@Steve, I loved your insults in that thread, MX should have a fortune package for stuff like that
deadbang