I am running arch-linux with KDE and the plasma desktop. I downloaded the minitube application to stream youtube videos outside of the browser. When I started the application it would not work as expected and reported back:
Error downloading https://www.****** server reply:forbidden.
A search online told me that I need a youtube API key to get it to access youtube and work. This can either be set at compile time or in an environmental variable. When installed as a pre-compiled application using the package manager, it sets a file at
/etc/profile.d/minitube.sh where the variable may be set.
The api-key may be obtained here as shown at the beginning of this youtube video or described here. Make sure to enable the API key (you may have to create a project to get to this stage) and then create a browser-key, not a server key! Note this key and set it in the minitube.sh file.
Unlike mentioned in some posts, the preset variable name is correct and should be kept at GOOGLE_API_KEY and not changed to APP_GOOGLE_API_KEY. Now you can set the environmental variable by sourcing the file with
source /etc/profile.d/minitube.sh or by logging out and back in.
Now, I moved the minitube.sh file from the system wide profile in
/etc/profile.d/ into the user profile space at
~/.profile/minitube.sh and that may be the reason for the following problem. In any case, the application only found the GOOGLE_API_KEY variable when started from the terminal. The KDE/Plasma session didn’t have the variable set. I thus set a symbolic link
~/.kde4/env/minitube.sh -> ~/.profile/minitube.sh which solved that problem. Now it works when called as any other application form the desktop.