Re: Can we install a gtk program without root privileges?



On 12/01/2016 08:49 AM, Stefan Salewski wrote:
My Nim editor https://github.com/ngtk3/NEd can be launced from the
directory with the binary by typing

./ned file.nim

For testing that is fine. But to make it work from an arbitrary
directory something like

# And for making gsettings available system wide one method is, as root
# https://developer.gnome.org/gio/stable/glib-compile-schemas.html
# echo $XDG_DATA_DIRS
# /usr/share/gnome:/usr/local/share:/usr/share:/usr/share/gdm
# cd /usr/local/share/glib-2.0/schemas
# cp org.gtk.ned.gschema.xml .
# glib-compile-schemas .
#

# as root
cp nimdark1.xml /usr/share/gtksourceview-3.0/styles/
cp nim.lang /usr/share/gtksourceview-3.0/language-specs/

is necessary as described in the doc. That is fine for myself, but I
can understand that other people fear to damage their system when doing
root actions.

Problem seems to be the gsettings path and additional the gtksourceview
directories. May there exist a way to make it work at least on Linux
without root privileges?

According to the gtksourceview docs you can use a local directory for
the specs and styles:

$HOME/.local/share/gtksourceview-3.0/

Presumably on Unix machines.  I would hazard a guess that there is also
probably an environment variable that gtksourceview could look at to
specify a custom directory so you could make up your own search path.

On Windows, if GTK still behaves as it used to, you can place everything
relative to the GTK dlls' path.  So you'd end up with a folder with your
EXE in it, along with the DLLs, and then the lib and share folders
inside of that folder, where you'd place things that'd normally be in /usr.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]