linuxmuster/linuxmuster-linbo7

FR: download linbo GUI theming files

Closed this issue ยท 30 comments

The linbo gui has the ability to be themed since a few versions. The required code was never ported to Linbo 7 though. See: linuxmuster/linuxmuster-linbo#186

Would be nice to have that included :)

Documentation for the theming is available here: https://github.com/linuxmuster/linuxmuster-linbo-gui/wiki/Theming

We could also discuss the location of the files before this is implemented. What d you think (also @kiarn @PLanB2008 )?

Ahhh I was wondering why this is not working anymore. This should be fixed.

The location is okay in my opinion. Maybe we should do something like /srv/linbo/icons/custom ... I was thinking about this when I added some custom OS Icons to an installation

I would even go as far as creating /srv/linbo/themes/<name> to make it clean and consistent to how images are stored:

/srv/linbo/temes
  - theme1/
    - theme.conf
    - icon1.svg
    - icon2.svg
  - theme2/
    - theme.conf
    - icon1.svg
    - icon2.svg

What do you thin about this approach?

Ya I see the benefits of your approach. This case we could easily have multiple themese. +1 for this approach

EDIT: Keep in mind, there is a difference between Custom OS Icons (Global in my opinion), and multiple linbo themes (only icons for this specific theme)

Yes, the OS icons are not tied to the theme :)

I think the gui related stuff should be filed under /srv/linbo/gui to have it properly separated from plain linbo. So the linbo_gui package may manage this subdirectory independently. What do you think about that?

So there could be also an init hook directory linbofs.init.d for instance, which will be packed into linbofs by update-linbofsand sourced on boot.

That is a great idea! Then I could package the scripts for linbofs.init.d in the linbo_gui64_7.tar.lz and manage them independently.

Then we also have to move /srv/linbo/icons to /srv/linbo/gui/icons, but I think, that's fine.

kiarn commented

Then we also have to move /srv/linbo/icons to /srv/linbo/gui/icons, but I think, that's fine.

Ok, then I have to adapt this in the Webui.

I'd prefer to do this in lmn 7.2
Otherwise, I have to implement everything twice in the GUI.

I'd prefer to do this in lmn 7.2

Yep, we should do it for lmn 7.2 / linbo 4.1.

So if we all agree to do it like that, we can start to implement it :)
@PLanB2008 you have the last word

That is a great idea! Then I could package the scripts for linbofs.init.d in the linbo_gui64_7.tar.lz and manage them independently.

Nope. The init stuff has to be available on boot. So to pack it in the archive is pretty useless. The future linbo_gui package unpacks its content like that:

โ””โ”€โ”€ srv
    โ””โ”€โ”€ linbo
        โ””โ”€โ”€ gui
            โ”œโ”€โ”€ icons
            โ”œโ”€โ”€ linbofs.init.d
            โ”œโ”€โ”€ linbo_gui64_7.tar.lz
            โ””โ”€โ”€ themes

And the linbofs.init.d will then be put into linbofs?

Yep. But if go deeper into it I see that is also thinkable, that linbo.sh invokes gui scripts after downloading and unpacking the gui archive. It does not have to be in init.sh.

In theory, this could also simply be done by the gui itslef, we don't really need extra scripts for this. This would make it simpler I think.

For sure, the gui can do this itself on startup.

Ok, so now we know how it'll be don in 7.2 but could you include the downloading like in 7.0 into 7.1? Otherwise theming does not work in the current stable version.

Ok, I'll fix this in 4.0 and main branches. In fact the only task is to keep the icons folders in sync.

Well, technically we don't need to download the whole icons folder, only the used ones and the used theme file.

These are so few kb, that hardly makes any difference.

We decided, that the linbo client will download the folder on boot if configured.

To combine this:

  • the linbo client syncs the server's gui folder /srv/linbo/gui to /cache/gui
  • including only icons and theme defined in start.conf
    Right?

Yes

So, how is theme defined in start.conf?

I think, the best would be to have

[Linbo]
...
Theme=MyTheme

Where MyTheme will be in /srv/linbo/gui/themes/MyTheme/

Theming files are downloaded to /cache/gui using the structure mentioned above. On an unpartitioned client, which has no cache partition, the files will be downloaded to /tmp/gui. Note: At runtime, the GUI will find the corresponding files under /icons and /themes.

So I can just always use /icons and /themes?
I'll implement this in the GUI once there is a package available for testing :)

Yes, then it is the same whether with or without cache.