3

This is not the same question as: "Manage external tools" not popping up dialog where the dialog box doesn't pop-up after selecting Manage External Tools from the gedit Tools menu.

My problem is the Manage External Tools option doesn't appear in the Tools menu at all.

I've checked off to use the plug-in within the Preferences sub-menu:

gedit external tools.png

I've even quit and reloaded gedit after enabling the plug-in.

My current version is:

$ gedit --version
gedit - Version 3.18.3

Does anyone know why the Manage External Tools option isn't appearing?


Results of namei:

$ namei -l ~/.config/gedit/tools
f: /home/rick/.config/gedit/tools
drwxr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x rick rick rick
drwx------ rick rick .config
drwxr-xr-x root root gedit
                     tools - No such file or directory

Based on steeldriver's comment I ran:

sudo chown -cR rick:rick /home/rick

and all is well now.

  • everything OK with .config permissions (e.g. namei -l ~/.config/gedit/tools)? – steeldriver Jun 09 '18 at 17:38
  • @steeldriver actually "not OK" I think. I've updated question with results. – WinEunuuchs2Unix Jun 09 '18 at 17:59
  • OK so perhaps there was an ill-advised sudo gedit at some point? See for example Why should users never use normal sudo to start graphical applications? – steeldriver Jun 09 '18 at 18:16
  • @steeldriver I asked a question about root owning /home/rick/.config/gedit a month ago: https://askubuntu.com/questions/1031303/root-owns-some-files-in-home-user-should-i-be-concerned So now it's time to follow the answer and change ownership back. If you care to read the question for reference and then post an answer here on this question, I'll upvote and accept it. Thanks :) – WinEunuuchs2Unix Jun 09 '18 at 18:21
  • Before answering . . . did changing the ownership back actually fix the issue? – steeldriver Jun 09 '18 at 19:51
  • @steeldriver I can manage external tools now and run an external tool. The only issue is even though I give the name "gedit-vars" it gets the name "New Tool" and when I later added "shellcheck" it gets the name "New Tool 2". I tried renaming the files new-tool and new-tool-2 on disk but that just makes them disappear from the menu and I have to rename them back. – WinEunuuchs2Unix Jun 09 '18 at 19:52
  • @steeldriver To answer your question, yes it works now. The script naming issue I regard as a separate problem unrelated to ownership issues. – WinEunuuchs2Unix Jun 09 '18 at 20:02

1 Answers1

4

This can happen if gedit is unable to write to its configuration directory, perhaps because of a directory ownership or permission issue. You can check using namei e.g.

namei -l ~/.config/gedit/tools
f: /home/steeldriver/.config/gedit/tools
drwxr-xr-x root        root        /
drwxr-xr-x root        root        home
drwxr-xr-x steeldriver steeldriver steeldriver
drwx------ steeldriver steeldriver .config
drwxr-xr-x steeldriver steeldriver gedit
drwxrwxr-x steeldriver steeldriver tools

Files and directories below ~ should be owned by you, not root - the latter is usually a sign of having used sudo to run the application previously: see Why should users never use normal sudo to start graphical applications? Find and fix any such issues using chown and/or chmod as appropriate, as advised in root owns some files in /home/user should I be concerned?

steeldriver
  • 136,215
  • 21
  • 243
  • 336