You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Some files require root permissions to be edited, but sometimes those files are already modified when one realizes those files require said permissions. It would be nice if Atom could ask for the root password and apply the changes instead of having to close the file, close Atom, open Atom with root privileges and re-edit the file.
Reacted by Edwin Khoo, Timo, hongar, Pierre Martin, David Castner, Jarvis, Eduardo Daniel Cuomo, Yogesh, Manuel Hegner, Daniel-Khodabakhsh and 5 more
Reacted by Daniel-Khodabakhsh, Robin Rosenstock and Digiwizkid
I just tried that with .144 on Linux. Instead of saving the changes, or maybe warning that the changes weren't saved, Atom actually shows the devs console with this message:
This is currently supported in OSX when writing a file, but not when reading. With the addition of atom-archive/node-runas#14 we can support this in read (though with a blocking read all at once).
Word. Problem is that because of the privilege escalation, the read needs to happen in another process. So the 'right' way would need to be some kind of ipc streaming (via stdout?) in runas.
That would be an option, yes. Escalate the "reader" process and then send the content of the file to Atom.
One major drawback of that is that you'll be actually sending X amount of data via IPC (or any other mechanism) from one process to another. What happens if you open a 60mb file? Sending 60mb via IPC doesn't sound like a good idea.
A better approach would be to create a privileged "reader" process than can both send and receiver signals from Atom. When the "reader" is running, Atom can ask the "reader" just for the right chunks of the file (for example, from line 1 to line 100 or from byte 943 to byte 1237). That way you'll have a no-blocking reader that won't be resource-hungry.
Not a full solution, but the package susave provides an ok workaround for me. Unfortunately it hasn't been updated in a few years—I had to disable "Try Default Save," and even then it doesn't seem to communicate to Atom that the file has been updated. Just wanted to share for anyone else finding this issue.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
kevinsawicki commentedon Nov 10, 2014
What platform are you on? I thought this was already supported on Mac OS X
alexandernst commentedon Nov 10, 2014
I just tried that with .144 on Linux. Instead of saving the changes, or maybe warning that the changes weren't saved, Atom actually shows the devs console with this message:
lee-dohm commentedon Nov 10, 2014
@kevinsawicki Should this be considered a bug since it is supported on Mac but either not supported or not working on Linux?
kevinsawicki commentedon Nov 10, 2014
@lee-dohm Yeah, it should be.
alexandernst commentedon Nov 10, 2014
Also, please note that I'm not really sure how would that work on Windows, which also requires special permissions (kind of).
benogle commentedon Jan 9, 2015
This is currently supported in OSX when writing a file, but not when reading. With the addition of atom-archive/node-runas#14 we can support this in read (though with a blocking read all at once).
alexandernst commentedon Jan 9, 2015
Read all at once is a complete no-no. It will be slow and it will block the entire editor.
benogle commentedon Jan 9, 2015
Word. Problem is that because of the privilege escalation, the read needs to happen in another process. So the 'right' way would need to be some kind of ipc streaming (via stdout?) in runas.
alexandernst commentedon Jan 9, 2015
That would be an option, yes. Escalate the "reader" process and then send the content of the file to Atom.
One major drawback of that is that you'll be actually sending X amount of data via IPC (or any other mechanism) from one process to another. What happens if you open a 60mb file? Sending 60mb via IPC doesn't sound like a good idea.
A better approach would be to create a privileged "reader" process than can both send and receiver signals from Atom. When the "reader" is running, Atom can ask the "reader" just for the right chunks of the file (for example, from line 1 to line 100 or from byte 943 to byte 1237). That way you'll have a no-blocking reader that won't be resource-hungry.
alexandernst commentedon Jan 9, 2015
Btw, having in mind what I just said, this seems just the right moment to think about issue #307
Refactor Atom to actually use reader processes to read files and ask those readers only for the exact amount of data required by the user.
7 remaining items
TimTinkers commentedon Nov 28, 2018
I don't think @benogle works on Atom anymore. Since this is Atom's oldest Linux bug maybe it should be reassigned.
dluxcru commentedon Jan 15, 2019
Just so atom developers know, this is still something we Linux users need. Especially since gksu is dead.
covertg commentedon Mar 24, 2019
Not a full solution, but the package susave provides an ok workaround for me. Unfortunately it hasn't been updated in a few years—I had to disable "Try Default Save," and even then it doesn't seem to communicate to Atom that the file has been updated. Just wanted to share for anyone else finding this issue.
lock commentedon Nov 25, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!