this post was submitted on 31 Mar 2025
8 points (100.0% liked)

VS Code

905 readers
12 users here now

founded 2 years ago
MODERATORS
 

If I open a text file that needs root privileges to modify, I get this error:

Failed to save 'this_file': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.

That's fine, that's expected.

But when I click on "Retry as Sudo", I get this error:

Failed to save 'this_file': Unable to find pkexec or kdesudo.

This happens though pkexec is installed on my machine, at /usr/bin/pkexec; and I granted VSCodium access to it through Flatseal. How do I fix this?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 4 days ago* (last edited 4 days ago)

I think you need a polkit authentication agent installed and running to prompt you for your password.

Alternatively you can sudo codium path/to/file (assuming you have aliased codium to use your flatpak)