You are not logged in.
Neither the whisker-menu nor the panel's quicklauncher plugin will use environment variables, it seems. Or perhaps I'm doing something wrong.
I have set the following environment variable in my .bashrc:
export CALIBRE_USE_SYSTEM_THEME=1
This is working fine; if I launch calibre from command-line or from the verve panel plugin, calibre uses my preferred theme.
If I launch from the whisker-menu or from the quicklauncher, I don't get the proper theme, just some burning-white glow designed to sear retinas and induce schizophrenia.
I have tried a script to launch calibre so that it will use my theme. I have tried two options: setting the environment variable and using gtk-launch. gtk-launch is currently uncommented in the example below, but I've tried both individually. Both options work from command-line, and from the verve plugin.
Contents:
#!/bin/sh
#env CALIBRE_USE_SYSTEM_THEME=1 calibre
gtk-launch calibre-gui
Neither works from the quicklauncher. I've also tried putting the above env line and the gtk-launch line directly into the quicklauncher.
I have tried editing the /usr/share/applications/calibre-gui.desktop file and changing the Exec line:
Exec=env CALIBRE_USE_SYSTEM_THEME=1 calibre --detach %F
This works from command-line and from verve, but no go from whisker-menu or quicklauncher.
What is happening? Why do the whisker-menu and the quicklauncher seem to ignore the environment variables? Especially, I don't understand why it would strip them from my script and the desktop files, it's weird. Do I need to set this variable somewhere else for XFCE?
Aloha!
Last edited by rogue_ronin (2018-01-17 20:51:18)
Offline
No wonder your script doesn't work: the line setting the environment has been commented out. What you want is this:
CALIBRE_USE_SYSTEM_THEME=1
on a line of its own, followed by launching the program. Strictly speaking, of course, this isn't Xfce specific, it's just basic bash scripting.
Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.
Offline
I understand that, and as I explained I tried both options in the script. The implication should have been clear that I had one commented out at a time. Apologies if I somehow made that unclear.
To be explicit: the issue is not the commenting; I have tried it without the commenting and with a lot of different methods as described in the original post.
I am trying to launch it from the whisker-menu and from the quicklauncher plugin and I cannot get it to use the environment variable. I am asking why these two methods of launching ignore the environment variable when it is properly invoked, either from the script or from the command property in the menu/launcher.
Thanks for trying to help. I'm hoping someone has knowledge of why I cannot assign the environment variable in either quicklauncher or whisker-menu.
Aloha.
Offline
Try this:
Exec=bash -c "env CALIBRE_USE_SYSTEM_THEME=1 calibre --detach %F"
... and/or take a look at this: https://unix.stackexchange.com/question … /4628#4628
Offline
Well, that worked! Big thanks, and bigger thanks for the link.
Looks like I have to get my dotfiles in order. Man, the boot and login process under linux has tremendous complexity.
Aloha!
Offline
Great! Happy to help, it's nice to be aloha-ed!
Offline
Found this thread today then I decided to solve the same problem. Tanks alcornoqui for the help.
But another way to solve it is to put this in /etc/environment (In Devuan).
CALIBRE_USE_SYSTEM_THEME=1
-----
The fun thing (or not so fun) is that in Gnome it work then you have this in /etc/profile.d/Calibre.sh (make the Calibre.sh yourself).
export CALIBRE_USE_SYSTEM_THEME=1
(I tested Gnome in a previous XFCE4 system there Calibre doesn't fit with the theme. But in Gnome it worked ok. Today then i went back to XFCE4 i scratched my head and tried to found out how I could make Calibre looks ok in XFCE4 also. It should. And now it does.)
Offline
Cool. Thanks for sharing. And welcome to the forums!
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 544.66 KiB (Peak: 545.5 KiB) ]