I cannot seem to solve this mystery, when I open gedit from the menu, all the plugins work perfectly find. But when I open Gedit via the terminal, I can no longer use the plugins and when I try to turn them on, I get this:
I have tried to google around myself, but I'm getting no where.
I have check, regardless of where I open Gedit (terminal or menu), the path to the program is the same. I.E /usr/bin/gedit
Can you give more information? Is this the “Code Comment” plugin you’re trying to use? What error do you get when you try to enable it?
FYI, the plugin needs to know the type of language/file you’re using so that it can use the relevant “comment” system(//, # etc). So unless that condition is met, you aren’t gonna be able to use the plugin…
(Sorry, I had this picture on my first post, but being a new member I could only post one picture, and I forgot to reply to my thread with this picture)
You can go to the /usr/lib/gedit/plugin directory, find your plugin file and change Loader=python3 to Loader=python to see if that makes any difference…
Also can you check if you have all the necessary packages installed for libpeas? apt-cache policy libgirepository-1.0-1 libc6 libglib2.0-0 libgtk-3-0 libpeas-common libpython3.6
Kindly Post the output as preformatted text(select the output and press Ctrl+Shift+C).
“Just to rule it out, when you’re running gedit from the terminal, are you running it with sudo or as another user, or just as your own user?”
I was running it as my own user. That said, I tried sudo gedit. And that worked fine. I tried chmod to give everyone permission, that did not seem to work.
“You can go to the /usr/lib/gedit/plugin directory, find your plugin file and change Loader=python3 to Loader=python to see if that makes any difference…”
"Also can you check if you have all the necessary packages installed for libpeas?
apt-cache policy libgirepository-1.0-1 libc6 libglib2.0-0 libgtk-3-0 libpeas-common libpython3.6
Kindly Post the output as preformatted text(select the output and press Ctrl+Shift+C)."
Was not at /usr/lib/gedit/plugin. I will find it tonight, I have to go for a few hours.
I have seen reports on the internet about folks getting the same type of error even though this bug had been fixed way long ago! And yes anaconda might be responsible so uninstall it and see what happens…
On a side note, you can check the /usr/share/gedit/plugins directory for the plugin files if you didn’t find them earlier…
If it's working when starts from the menu and not from the terminal, it's because the menu is starting gedit in a different environment.
I found next line in gedit's desktop file /usr/share/applications/org.gnome.gedit.desktop DBusActivatable=true
There is an explanation in here: https://wiki.gnome.org/HowDoI/DBusApplicationLaunching
Particularly this line:
Starting processes with D-Bus activation ensures that each application gets started in its own pristine environment, as a direct descendent of the session -- not in the environment of whatever its parent happened to be.
So, to start it from the terminal and have plugins working you'll have to start gedit via dbus.