• 2 Posts
  • 120 Comments
Joined 5 months ago
cake
Cake day: June 13th, 2024

help-circle











  • theunknownmuncher@lemmy.worldtoLinuxsucks@lemmy.worldSudoedit
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    2 days ago

    That is a neat idea. You can implement this change in vim (or the editor of your choice), and open a pull request to contribute it if you wish! Another idea would be for the editor to automatically re-open itself with escalated privileges, maybe caching your changes to a temporary file so that you do not lose anything (could be dangerous if editing sensitive data that shouldn’t be written to a temporary location, or if you didn’t understand that you were opening a system file that you should be cautious in [but I can think of ways to mitigate that problem, too! Like just notifying the user that the editor needs to escalate the privilege]). I think it is important to realize that none of these solutions are the responsibility of the operating system itself, but instead the programs that you are choosing to use (Notepad/vim)

    Modern versions of vim do warn the user up-front when they open a readonly file for editing, which I think is a nice solution, but sure, it doesn’t explicitly offer to save the file in your home directory for you. This is still always an option though (:w ~/myfile), and if you don’t know how to use your text editor to save a file and need that level of hand-holding, then maybe you shouldn’t have sudo access in the first place?


  • theunknownmuncher@lemmy.worldtoLinuxsucks@lemmy.worldSudoedit
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    2 days ago

    That very well may be a toxic trope in the Linux community, but in this specific case, I’d say it actually is the user’s fault.

    Since you believe it is the operating system’s fault, I am curious how would you like the operating system to behave differently than this, when a user interacts with a file that they have read permissions but not write permissions? What should it do? The cool thing about Linux is that if you have a better idea, you are free to implement it and make it reality, and maybe even contribute it so that others can benefit too

    Personally, I feel this behavior is already the best way to go, and why it works this way in all operating systems (at least that I am aware of). I understand that it makes it easy for the user to make this mistake, but I think it would be wrong to block the user from reading a file that they have permissions to read, obviously it would be wrong to allow them to write when they do not have permission, and at least (on Linux) they are given the option to save their changes to an alternative location that they have write permissions for, and warned when opening a readonly file for editing. Is there a better way?


  • Kudos for being willing to try it and see!

    One very minor detail to note, in your test you weren’t actually overwriting the original file that you opened, but instead Notepad appended a .txt to the filename, which is its default behavior, but you still got the same type or error because you didn’t have write permission for any file in that directory.







  • Omg absolutely, what a workhorse. I ended up slapping on a custom vBIOS, aggressive overclock, and swapped the AIB’s air cooler for a little closed loop 120mm water cooler. I ran it until it died in 2020, and if it was still functional today, I’d still be using it. RIP what a loss. The 6GB of VRAM were starting to get tight and DX12 was starting to age it, though, but it was still totally holding up for what I use a GPU for.

    Now I am on a 6900XT with the navi21 XTXH chip in it. I bet I’ll skip at least as many generations with this as I did with the 980Ti. It’s so fast and efficient. In some games, the fans don’t even spin, and it just passively cools with the heatsink.

    I play on a CRT in either 1600x1200@85Hz or 1024x768@120Hz capping it at 170fps in 85Hz or 360fps in 120Hz, and it holds those solid and stable in the games that I play. I’m not interested in 4k gaming or anything silly like that (but I’m sure others would say that I’m the silly one lol). The biggest factor that was holding me to the 980Ti was the flawless onboard DAC and native analog output. In order to use the 6900XT, I dropped a bunch of money on a DAC with a VMM2322 for it