$ which gedit
/usr/bin/gedit
$ ls -l /usr/bin/gedit
-rwxr-xr-x. 1 root root 18696 Nov 27 05:55 /usr/bin/gedit
$ gedit
$ # Nothing happens
$ sudo gedit
[sudo] password for user:
$ # gedit window starts
$ # I close the gedit window
$ sudo chmod 0777 /usr/bin/gedit
$ ls -l /usr/bin/gedit
-rwxrwxrwx. 1 root root 18696 Nov 27 05:55 /usr/bin/gedit
$ gedit
$ # Still nothing happens
$ uname -a
Linux linuxbox 5.4.8-200.fc31.x86_64 #1 SMP Mon Jan 6 16:44:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
From a comment at this question, I learned that journalctl --user shows "[l]ogs for end user applications". Running that command, I see no references to gedit.
Why is gedit only runnable with sudo? I am already user user in the log above; I don't understand why it is necessary to do sudo gedit to run this executable.
Update: The context of this question is that I observed that clicking the Text Editor icon in my GNOME 3 desktop environment resulted in nothing happening. From some scrapping about, I discovered the Text Editor icon corresponded to the gedit executable. Thinking that I might have some diagnosable stderr by running gedit from a shell, I did so, and captured the corresponding log above.
root- but from the log I posted, when I typesudo geditI am asked foruser's password - doesn't that mean the config files will be owned byuser? – StoneThrow Jan 15 '20 at 18:53user. I mean: I logged in as useruser, and I originally clicked theText Editoricon in my GNOME desktop environment, and found it failing. Some rummaging around, and I came to the understanding that theText Editoricon corresponded to thegeditexecutable. I thought I'd have some form of diagnosable stderr by runninggeditfrom a shell. Thus the log in the original post. – StoneThrow Jan 15 '20 at 18:57sudowill always ask for the password of the user executingsudo.sudo geditwould ask for the current user's password, then startgeditas root. Files created by thatgeditsession would be owned by root. You may want to look at whethergedit's configuration files on your non-privileged user's account are owned by root from having rungeditas root previously. – Kusalananda Jan 15 '20 at 19:08