[Github-comments] [geany/geany] Activate local plugin from configuration file (#1562)

Matthew Brush notifications at xxxxx
Thu Jul 27 00:22:11 UTC 2017


On 2017-07-26 02:14 PM, fjvico wrote:
> `togglebars` plugin is to be made available for Geany in an application that install from a deb file and copies `togglebars.py` in the `~/.config/geany/` 

I'm not sure if it's outright banned/impossible, but it's highly unusual 
for a .deb package to install stuff into user's home directory. I think 
because it probably needs the apt-get lock which requires root, and then 
it would put it in /root/.config/geany/... instead, I presume, or at 
best make the file unmodifiable by the user who's home directory it got 
plopped into.

directory. So, the plugin is intended to be active when Geany is 
launched by the application, meaning that it should be included in 
`~/.config/geany/geany.conf` in the form:
> `active_plugins=/home/<user>/.config/geany/plugins/togglebars.py;`
> But the name of the user is not known at the time of installation. Alternative solutions like
> `active_plugins=~/.config/geany/plugins/togglebars.py;`
> `active_plugins=$HOME/.config/geany/plugins/togglebars.py;`
> don't work. How can it be included this file independently of the user name?
> 
> Also, this plugin demands `geanypy`, which is placed in:
> `active_plugins=/usr/lib/x86_64-linux-gnu/geany/geanypy.so;`
> what depends on the architecture. Does this plugin need to be precompiled? Can it be placed somewhere else?
> 
> 

I would recommend installing the `togglebars.py` plugin into the 
system-wide plugins dir `$prefix/lib/geany` (if I remember correctly) 
and making the package depend on `geany-plugin-py` so it gets installed 
as well.

Also as elextr mentioned, it's probably not a good idea to force 
geanypy/togglebars.py to be loaded automatically either, not only 
because you can't know what config directory to actually modify (I have 
several Geany's each using separate config dirs besides the default), 
but also because you could mess up their config (imagine Geany's already 
open, it will clobber your changes), or Geany could change the internal 
format/fields used in the config file at any time.

Regards,
Matthew Brush


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1562#issuecomment-318220851
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170727/9ac623bd/attachment.html>


More information about the Github-comments mailing list