I have not dealt much with env variables. Recently I am starting to use some application that use them instead of config files to get input from the user. As an example there is a program for managing clipboard history named ‘clipmanu’. Its deamond called clipmenud uses $CM_SELECTION to get which clipboards to use. I have tried to set a value for it and put it in my bashrc, but got no results. Does anyone knows how I should set this up? I am on EOS and suing XFCE. The dev thinks there is an issue on packaging or something , but I guess maybe I am doing something wrong.
Can you elaborate a bit more. The new thing I learnt from your comment was that adding it to .bashrc doesn’t work on systemd. But how I should give another value to clipmenud. I starts on system boot so I should give it somewhere before that. I have a script that I had set to executes and it works for the most part but not this one.
In the link I posted above there are several suggestions for how to set environmental variables for systemd user services.
Please read through that.
I would try the method in the first point:
For users with a $HOME directory, create a .conf file in the ~/.config/environment.d/ directory with lines of the form NAME=VAL. Affects only that user’s user unit. See environment.d(5) for more information.
It is not working, I think I named the file wrongly. It says this in the link:
Example 1. Setup environment to allow access to a program installed in /opt/foo
but what is this number in start of the filename. I have created a file on ~/.config/environment.d/.conf and put my value in it but nothing happens after restarting system.d . I guess I should not use .conf as the filename but don’t know what to use from the example.
After rebooting it works now , thank you very much for your help.
Do you know how can I set up basic env variables? Like for example $EDITOR and $BROWSER too? I had in the past have a difficult time setting these up in bashrc and make them work consistently all over the system.