Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables operational? #15

Closed
cdahinten opened this issue Feb 8, 2021 · 3 comments
Closed

Environment variables operational? #15

cdahinten opened this issue Feb 8, 2021 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@cdahinten
Copy link

Hello @beganovich,

while configuring a Invoice Ninja V5 test installation Ubuntu 20.04.2 LTS. I was not able to route snappdf to another chromium installation (https://software.opensuse.org/download/package?package=ungoogled-chromium&project=home:ungoogled_chromium)

$ sudo nano /etc/environment

SNAPPDF_EXECUTABLE_PATH="/usr/bin/chromium"
SNAPPDF_SKIP_DOWNLOAD=true

$ source /etc/environment
$ echo $SNAPPDF_EXECUTABLE_PATH

reboot+relogin.

But Invoice Ninja always used the downloaded chrome with snappdf download and not the given path. I also pulled a new chrome during recent updates. As a "hack" I replaced the snappdf chrome-binary with a symlink to my local chromium, but I was wondering, if I made a mistake or overlooked something.

Do you have a idea, what could be wrong?

@beganovich beganovich self-assigned this Feb 9, 2021
@beganovich beganovich added the question Further information is requested label Feb 9, 2021
@beganovich
Copy link
Owner

Hey there, I followed the steps you provided and it seems to not work for me either (Ubuntu 20.04). However, setting these variables in the .bashrc or .profile.d/ seems to be working just fine. Can you try one of the following:

https://www.tecmint.com/set-unset-environment-variables-in-linux/

@cdahinten
Copy link
Author

Hey @beganovich,

all of the recommend places worked for me as an env-command shows, but I missed some out details:

I thought the environment-variables shoud be available to the www-data user, but thats an no-login one. So there is no success of writing .bashrc or .profile.d/ nor creating ~/.profile since there is no session.

sudo -u www-data env is not listing these SNAPPDF_EXECUTABLE_PATH e.g. in any case.

I succeeded in setting these snappdf-vars in the server settings of ngnix by adding these lines to the server{}-block:

fastcgi_param SNAPPDF_EXECUTABLE_PATH '/usr/bin/chromium';
fastcgi_param SNAPPDF_SKIP_DOWNLOAD true;

This could be an advise for the documentation of snappdf – it works really stable an fast on a Raspberry 4 Pi 8GB test-setup.

@beganovich
Copy link
Owner

Hey there, thanks for the awesome feedback & help with this. This is now part of the documentation. 👍

Ref. commit: 34f8d2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants