eyelash / xi-gtk

a GTK front-end for the Xi editor
Apache License 2.0
355 stars 23 forks source link

Problem with launching from build dir #30

Closed winks closed 7 years ago

winks commented 7 years ago

I have the following problem:

$ pwd
/home/florian/code/misc/xi-gtk/build
$ ./xi-gtk
# this works
$ cat ~/bin/xi-gtk 
#!/bin/bash
set -x
cd /home/florian/code/misc/xi-gtk/build/
exec ./xi-gtk
$ ~/bin/xi-gtk
# works

but if I run this wrapper (or a symlink) with dmenu, I get the same result as if xi-core is not in ~/.cargo/bin/

So I guess this is a dmenu problem, and I can accept that it's meant to be installed because it's not just a single binary, but I could easily enough fix that by running ninja install as a user with a custom prefix. If that's possible, could that be added to the instructions?

eyelash commented 7 years ago

Strange. One thing you could try is to set the XI_CORE environment variable to /home/florian/.cargo/bin/xi-core in your script before launching xi-gtk to see if that works. Generally I'm not a big fan of ninja install as a user with a custom prefix. ninja install does things like installing a desktop file and a D-Bus service file that can't just be at an arbitrary location.

winks commented 7 years ago

I am not a fan of installing stuff directly to /usr/local, I use GNU stow. ;)

Anyway, thanks for the quick reply, setting XI_CORE works like a charm.

eyelash commented 7 years ago

I'm also not a big fan of using ninja install directly (especially as root). The main use case for ninja install I see is to help you create a package for whatever package manager you are using.