On 2017-07-26 02:14 PM, fjvico wrote:<br>
> `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/` <br>
<br>
I'm not sure if it's outright banned/impossible, but it's highly unusual <br>
for a .deb package to install stuff into user's home directory. I think <br>
because it probably needs the apt-get lock which requires root, and then <br>
it would put it in /root/.config/geany/... instead, I presume, or at <br>
best make the file unmodifiable by the user who's home directory it got <br>
plopped into.<br>
<br>
directory. So, the plugin is intended to be active when Geany is <br>
launched by the application, meaning that it should be included in <br>
`~/.config/geany/geany.conf` in the form:<br>
> `active_plugins=/home/<user>/.config/geany/plugins/togglebars.py;`<br>
> But the name of the user is not known at the time of installation. Alternative solutions like<br>
> `active_plugins=~/.config/geany/plugins/togglebars.py;`<br>
> `active_plugins=$HOME/.config/geany/plugins/togglebars.py;`<br>
> don't work. How can it be included this file independently of the user name?<br>
> <br>
> Also, this plugin demands `geanypy`, which is placed in:<br>
> `active_plugins=/usr/lib/x86_64-linux-gnu/geany/geanypy.so;`<br>
> what depends on the architecture. Does this plugin need to be precompiled? Can it be placed somewhere else?<br>
> <br>
> <br>
<br>
I would recommend installing the `togglebars.py` plugin into the <br>
system-wide plugins dir `$prefix/lib/geany` (if I remember correctly) <br>
and making the package depend on `geany-plugin-py` so it gets installed <br>
as well.<br>
<br>
Also as elextr mentioned, it's probably not a good idea to force <br>
geanypy/togglebars.py to be loaded automatically either, not only <br>
because you can't know what config directory to actually modify (I have <br>
several Geany's each using separate config dirs besides the default), <br>
but also because you could mess up their config (imagine Geany's already <br>
open, it will clobber your changes), or Geany could change the internal <br>
format/fields used in the config file at any time.<br>
<br>
Regards,<br>
Matthew Brush<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1562#issuecomment-318220851">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ_CepXxeiXu1snp0QyRoPuHJiGTMks5sR9gygaJpZM4Okf3i">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ0mNKmByC11mbJAywSo9YDAm9TAxks5sR9gygaJpZM4Okf3i.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1562#issuecomment-318220851"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@codebrainz in #1562: On 2017-07-26 02:14 PM, fjvico wrote:\n\u003e `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/` \n\nI'm not sure if it's outright banned/impossible, but it's highly unusual \nfor a .deb package to install stuff into user's home directory. I think \nbecause it probably needs the apt-get lock which requires root, and then \nit would put it in /root/.config/geany/... instead, I presume, or at \nbest make the file unmodifiable by the user who's home directory it got \nplopped into.\n\ndirectory. So, the plugin is intended to be active when Geany is \nlaunched by the application, meaning that it should be included in \n`~/.config/geany/geany.conf` in the form:\n\u003e `active_plugins=/home/\u003cuser\u003e/.config/geany/plugins/togglebars.py;`\n\u003e But the name of the user is not known at the time of installation. Alternative solutions like\n\u003e `active_plugins=~/.config/geany/plugins/togglebars.py;`\n\u003e `active_plugins=$HOME/.config/geany/plugins/togglebars.py;`\n\u003e don't work. How can it be included this file independently of the user name?\n\u003e \n\u003e Also, this plugin demands `geanypy`, which is placed in:\n\u003e `active_plugins=/usr/lib/x86_64-linux-gnu/geany/geanypy.so;`\n\u003e what depends on the architecture. Does this plugin need to be precompiled? Can it be placed somewhere else?\n\u003e \n\u003e \n\nI would recommend installing the `togglebars.py` plugin into the \nsystem-wide plugins dir `$prefix/lib/geany` (if I remember correctly) \nand making the package depend on `geany-plugin-py` so it gets installed \nas well.\n\nAlso as elextr mentioned, it's probably not a good idea to force \ngeanypy/togglebars.py to be loaded automatically either, not only \nbecause you can't know what config directory to actually modify (I have \nseveral Geany's each using separate config dirs besides the default), \nbut also because you could mess up their config (imagine Geany's already \nopen, it will clobber your changes), or Geany could change the internal \nformat/fields used in the config file at any time.\n\nRegards,\nMatthew Brush\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1562#issuecomment-318220851"}}}</script>