I don’t think that anyone is saying that sudo is bad. That isn’t the point of this topic.
The question is “Is run0 better?”. The answer is “It depends”
The take away from this topic shouldn’t be, “Don’t use sudo”. That isn’t the point.
I don’t think that anyone is saying that sudo is bad. That isn’t the point of this topic.
The question is “Is run0 better?”. The answer is “It depends”
The take away from this topic shouldn’t be, “Don’t use sudo”. That isn’t the point.
Exactly. I don’t think anyone even eluded to sudo
being “bad.”
That command does not exist in any arch distro
I’m sure it’s one of his aliases.
@dalto, remediated:
Having a persistent authentication feature means that the authentication mechanism is available in memory or some file somewhere. Prime target for malicious actors to target. Just to save a few key strokes I hope that this is not done.
@Archie1, just like on permanent storage, RAM access should be protected by the kernel. Unlike on permanent storage, it’s even randomised. (Read-after-free attacks would allow access to filesystem data, too, so I don’t consider this a significant vulnerability in that context.)
However, I’ll be surprised if it cannot be disabled in a configuration file. Do you see evidence otherwise?
It is managed by polkit so it can be configured like any other polkit rule.
Run0 is less powerful over sudo.
For example running parted with wayland wm end with not opening because missing access to display… In sudo you just add this to sudoers or use sudo -e…
And change launcher for parted as terminal app and add sudo and other stuff like specific gtk theme…
But with Run0 this don’t work. Because it will not open terminal. And there is nothing like /etc/sudoers or sudo -e
You can set environment variables with run0
using the --setenv
flag. For GParted specifically you can run it like this:
run0 --setenv=WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" gparted
This is similar to how you would do it with pkexec
. See this related note from the ArchWiki: https://wiki.archlinux.org/title/Running_GUI_applications_as_root#Using_pkexec
Probably you mean “sudo -E
”.
You shouldn’t use sudo -E
except for testing; it passes the entire user environment to root, which is pretty much never appropriate. Instead, you should identify what specific environment variables need to be preserved for whatever you are trying to achieve and explicitly set them.
Yeh I know about sudo -E I’m using it only before I identified if the problem isint in something else.
And for parted and Run0 add second command like GTK_THEME=Adwaita:dark and it will not launch. At least for me.
Again, for setting environment variables in run0
you need to use the --setenv
flag.
Adding GTK_THEME=Adwaita:dark
to the previous example will look like this:
run0 --setenv=WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" --setenv=GTK_THEME=Adwaita:dark gparted
No it work only from terminal but u cant use this command in gparted.desktop … run0 just dont work … sudo works easy.
So if you know how to make it work in gparted.dekstop please techme … Searching this answer over internet “0” results.
And yes i like run0 from the start but its unusable for lots of things → or the documentation is so stupid i dont understad it
You shouldn’t use run0
or sudo
in your desktop file. You don’t need to, you can just set the environment variables you need in the desktop file and run it as-is. GParted will automatically use Polkit to get elevation.
Like I said, there is no reason to use run0
in your desktop file. But if you insist, an easy way to do it is just paste the line you already have working into the desktop file and run it from a shell.
[Desktop Entry]
Name=GParted
GenericName=Partition Editor
Comment=Create, reorganize, and delete partitions
Exec=sh -c 'run0 --setenv=WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" --setenv=GTK_THEME=Adwaita:dark gparted'
Icon=gparted
Terminal=false
Type=Application
Categories=GNOME;System;Filesystem;
Keywords=Partition;
StartupNotify=true
I’ve been using it for a couple months now (without sudo
installed) to test it out and I haven’t run into any problems so far. Probably there are some edge cases where run0
cannot do something that sudo
can, but I personally haven’t run into any. I definitely have not found it to be “unusable for lots of things”.
Thanks I will test it when I get home.
For me without root privileges it dosent work… I don’t know why. Mayby I’m missing something in system… But I don’t know what. This is only app that has problem with it.
And I’m not using it often and every time I need it I can’t remember the command to launch it so I editet the desktop file and forbit pacmam from update it
Only other app that has problem is Gnome-calclutaor but there I need only the GTK_THEME variable (becaus ignoring dark theme settings).
Can you please paste your full command and error, including any journal logs related to the errors, that you get starting gparted with run0?
Or better yet, just with nothing at all .. as gparted should already validate using polkit and user reports that somehow ‘doesnt work’.
Maybe GVFS or policykit is not installed? It is extremely unlikely but still.
If you reed properly without root it cant open display and nothing hapend.
Specificly
(gpartedbin:2128): Gtk-WARNING **: 21:22:01.863: cannot open display: :0
BluishHumility : Nice it works … Awersome … Thanks
A paraphrased “missing access to display” is not the same as providing an error message.
I read your posts fine.
This is edited over a longer reply but I think this all still indicates a broken system. Not a reason to augment the gparted desktop file.
Ta.