Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
44
rated 0 times [  44] [ 0]  / answers: 1 / hits: 47680  / 2 Years ago, sat, may 14, 2022, 8:08:50

I just installed the ubuntu 11.10, and I want to install a plugin for gEdit.



I unpacked the plugin to the following folder: ~/.gnome2/gedit/plugins but in the gedit doesn't show up the plugin.


More From » gedit

 Answers
3

gEdit 3



The version of gEdit in Oneiric & above is v3 built using gtk+3 libraries. The plugin folder locations are slightly different than from gEdit v2.



Every plugin needs at least two files.



One file (pluginname.plugin) is to tell gedit:




  • where the plugin can be found,

  • what it's called,

  • a short description,

  • who is the author, etc.



This file is in the .desktop format.



The second file is the actual code.



Both of these files need to be placed in either:




  • the system-wide plugins directory /usr/lib/gedit/plugins/, or

  • in the user plugins directory, which may have to be manually created - ~/.local/share/gedit/plugins/.



Installing Plugins



First create the plugin folder:



mkdir -p ~/.local/share/gedit/plugins


Now create a .plugin file using gedit N.B. these files have the format:



[Plugin]
Loader=python
Module=examplepy
IAge=3
Name=Example py
Description=A Python plugin example
Authors=Jesse van den Kieboom <[email protected]>
Copyright=Copyright © 2006 Jesse van den Kieboom <[email protected]>
Website=http://www.gedit.org


source






For your v2 plugin you already have a file called project-manager.gedit-plugin so you can rename it:



mv project-manager.gedit-plugin project-manager.plugin


Then edit the plugin file and change the section header to "[Plugin]"



You will now see this in your gedit plugin list.



However for me it threw errors about "import gedit, gtk, gtk.glade".



You need to change the source code to import the gtk+3 variants - called python introspection.



An excellent tutorial for converting from gtk+2 to gtk+3 see




[#43467] Saturday, May 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ickump

Total Points: 234
Total Questions: 124
Total Answers: 111

Location: Jordan
Member since Fri, Apr 8, 2022
2 Years ago
ickump questions
Mon, Aug 16, 21, 08:46, 3 Years ago
Mon, Aug 22, 22, 02:44, 2 Years ago
Sun, Oct 2, 22, 07:13, 2 Years ago
;