Gedit can't save files

7,231

Use the following steps to circumvent the issue: (this is a workaround, not a solution)

  • create a new user (E.g. mote2 for original user mote)
  • with the same groups as the other user (if you need details on that, leave a comment)

Now:

  1. open the file manager
  2. browse to the /home/mote directory
  3. copy (not move!) all the files from Downloads to /home/mote2/Downloads
  4. check you did a good job.
  5. Now delete /home/mote/Downloads
  6. Go back to step 3 and repeat for Documents, Videos, ...
  7. In a terminal type the following command: deluser mote --remove-home

Done!

Why? As you have seriously messed up some problems with the current's user profile, some setting somewhere in one of the .config files is causing a problem. As we can't solve this problem in a reasonable amount of time, it's best to just leave that profile behind and starting afresh!

Share:
7,231

Related videos on Youtube

mote
Author by

mote

Updated on September 18, 2022

Comments

  • mote
    mote almost 2 years

    Gedit can't save files. My Gedit has greyed out the 'Save' button, and only offers to 'Close without saving'. Other programs saves the same files without any problems and i seem to have enough rights. This happends with files all my home folder, even on a usb drive. With 'gksudo gedit' it works. But i have the permission for the file, and i can save the file if i open it with Libre office write instead, only gedit will not. If i make a test file on my desktop, that have the permission read and write, for Me, my group and others. I open it with gedit, i cannot save it. open it with libre office i can save it. with 'sudo gedit' it does not work, but with 'gksudo gedit' i can save it. i must have broken something in gedit?

    The only thing i have been messing with are changing the 'Run', 'Display or 'Ask' option for texts files in Nautilus, but i set it back. I also reinstalled gedit.

    I can't figure out what to do, please help.

    • Rinzwind
      Rinzwind over 9 years
      Make sure the directory gedit wants to save a file is owned by you and not by root. You probably changed the default save location to something owned by root by using sudo or gksudo...
    • mote
      mote over 9 years
      But, if i use 'LO Writer' in stead, i don't have any problems. And it, not only one directory, it everywhere, desktop, homefolder ext. drives. The problem are one with gedit.
    • Fabby
      Fabby over 9 years
      Could you do a ` gsettings list-recursively | grep --ignore-case gedit` and copy-paste the output to paste.ubuntu.com and provide a link back here and then drop a comment @Fabby?
    • mote
      mote over 9 years
      @Fabby I was installing ecryptfs-utils and did a lot in a SU terminal. Another user that tried to help me at the forums, thinks that i made problems in dbus. Unfortunately it's above my knowledge. ubuntuforums.org/showthread.php?t=2262774 Here are the pastebin of bith gedit and eog. All other apps and users work fine. paste.ubuntu.com/9912966
    • mote
      mote over 9 years
      @fabby, I was almost about to. The weird thing is that it's the only user affected. Other user work perfectly.
    • Fabby
      Fabby over 9 years
      I've got a solution for you then! :-) (And sorry for not asking first: Do you have this in the guest session as well???)
  • mote
    mote over 9 years
    Thanks, that was just the solution i had figured out my self. You get all the stars and upvotes i have. ;-) Thanks
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 5 years
    +1 This also works for problem files in Windows Subsystem for Linux (WSL) on my NTFS partition /mnt/e which is E:\ within windows. I've been struggling for a couple of hours trying various things but cp /mnt/e/bin/* /mnt/e/bin2/ was an easy fix!
  • Fabby
    Fabby over 5 years
    @WinEunuuchs2Unix Yup: it's a universal solution independent of OS.