p-e-w/plotinus

Install as user (without root)

vmavromatis opened this issue · 7 comments

Hi, first of all great project! I'm writing a script that manages extensions/themes and would like to include this for the Unity theme.

I'm trying to install as user so use ~/.local/share rather than /usr/local/ directory which CMAKE defaults to.

So from my understanding, the 2 important files is the libplotinus.so library and the .xml file. There is also the entry on the /etc/environment.

Regarding the entry I believe I can append
GTK3_MODULES=$ΗΟΜΕ/.local/share/lib/libplotinus.so; export GTK3_MODULES
on .profile instead of having an entry on /etc/environment that requires root.
Regarding the files I can "trick" cmake to install locally with:
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/.local . && make && make install
and the xml gets placed properly in ~/.local/share/glib-2.0/schemas however the .so gets placed wrongfully in ~/.local/lib/ rather than ~/.local/share/lib

Do you have any idea how to fix that, or any better solution overall? Thank you very much in advance.

PS: any plans on turning this into a GNOME extension?

p-e-w commented

@bill-mavromatis: No idea, sorry. My knowledge of CMake is limited. What is the problem with libplotinus.so being placed in ~/.local/lib?

@GNOME-IS-LIFE: Please don't do that.

Thank you for the reply. I will look if I can use that folder instead. I was merely wondering if there is a way of installing locally rather than requiring root access. You may close this if you wish, I will follow issue #20 to check distro packages and maybe add ask the users of my script for root access when they install this package. I hope you are OK with my script linking to your package (I will include your name & licence too)

Putting GSettings schema files in non-standard locations is not supported, as far as I remember (also my information may be outdated as I haven't worked with such things since 3.14). You may want to ask on a GSettings-related forum/IRC channel/mailing list.

@gergelypolonkai It's possible to place schema files in a local dir and use glib-compile-schemas ~/.local/share/glib-2.0/schemas/ to compile them (check here https://developer.gnome.org/gio/stable/glib-compile-schemas.html)

@bill-mavromatis i will add this into gnome shell as an extension. In fact is added to the gnome shell providers right now. When you search for an application inside the dash, you also will see a category for the global menu, that provide also the same as the hud. Just it's a category and find a menu actions inside several categories it's not user friendly, so i will provide a more convenient search soon.

Anyway, i think this is come from the wrong side. Is not more easy add it a package inside launchpad and then just add the repository, update and then install it from the bash script? Also will be more helpfully provide a Dbus api, to implement an extension that can use as backed this program...

But well, this is just because i think there are better alternatives, but this is possible.

p-e-w commented

@lestcape: Plotinus now has a D-Bus API.

@p-e-w Thanks, i think something like this will be the more convenient for gnome, maybe to be used with an interface like that: https://github.com/daniellandau/switcher

I really have more-less what you have but is set directly inside gjs. Also i recently added a hud menu to search for menu action in a more convenient way than as a gnome search provider.

I don't know if you explored the Wayland support, i think probably you do that. But anyway i will shared what i see. The worse problem it's with xid, we don't have that in wayland, but apparently we can iterate for all windows and request the dbus sender and path, i don't know how for qt windows, because i think i can not used get_gtk_window_object_path (as is not a gtk windows). If i have real progress under wayland i will shared it with you.