You are not logged in.

#1 2018-09-12 14:26:03

ndgnuh99
Member
Registered: 2018-09-12
Posts: 2

[Solved] Qt apps opened with xfce4-whisker-menu ignore env variables

I'm trying to open some qt apps (eg: qt5ct) with xfce4-whisker-menu. Qt5ct (and other qt apps) runs fine when i run it from terminal (i'm using gnome-terminal). I have set the env variables in the .bashrc and restart my laptop.

~$ echo $QT_QPA_PLATFORMTHEME
qt5ct
~$ echo $QT_IM_MODULE
ibus

Running `qt5ct`,  from whisker-menu and terminal i get the same log:

Configuration path: "/home/username/.config/qt5ct"
Shared QSS paths: ("/home/username/.local/share/qt5ct/qss", "/usr/local/share/qt5ct/qss", "/usr/share/qt5ct/qss")
Shared color scheme paths: ("/home/username/.local/share/qt5ct/colors", "/usr/local/share/qt5ct/colors", "/usr/share/qt5ct/colors")

My .bashrc:

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=always'
alias l='ls --color=always -CF'
alias grep='grep --color=auto'
#PS1='[\u@\h \W]\$ '
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
export PATH=$PATH:$HOME/lampstack
export PATH=$PATH:/opt/genymobile/genymotion
export PATH=$PATH:/home/username/build/flutter/bin
export PATH=$PATH:/run/media/username/Windows/linux-stuff/java/jdk1.8.0_171/bin
export PATH=$PATH:/opt/mudfish/4.4.6/bin
export ANDROID_HOME=/home/username/Android/Sdk
export PATH=$PATH:/home/username/.yarn/bin
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export ANDROID_SDK_ROOT=$ANDROID_HOME
export ANDROID_SDK=$ANDROID_HOME

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

export AUR=https://aur.archlinux.org

alias emulator="/home/username/Android/Sdk/tools/emulator"
alias plzinstall="sudo pacman -S"
alias plzfind="sudo pacman -Ss"
alias plzremove="sudo pacman -Rsn"

[ "$XDG_CURRENT_DESKTOP" = "KDE" ] || [ "$XDG_CURRENT_DESKTOP" = "GNOME" ] || export QT_QPA_PLATFORMTHEME="qt5ct"
#export QT_QPA_PLATFORMTHEME=qt5ct
export QT_IM_MODULE=ibus

Here's a screenshot, qt5ct opened by gnome-terminal (left) and whisker-menu (right).
[url=https://i.imgur.com/QvCah8B.png]
  QvCah8Bl.png
[/url]
Other qt apps such as kate, texstudio, ... have the same behavior. GTK+ apps seem to run normally.
Sorry if i have bad English.

Last edited by ndgnuh99 (2018-09-12 16:22:59)

Offline

#2 2018-09-12 14:41:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: [Solved] Qt apps opened with xfce4-whisker-menu ignore env variables

Please use [ code ] and not [ quote ] tags for pasting output.

Your desktop shell does not source your .bashrc. put the relevant export into a more globally valid resource like /etc/profile (or the directory counterpart /etc/profile.d) or if you need per user ~/.pam-environment, see: https://wiki.archlinux.org/index.php/En … _variables

Offline

#3 2018-09-12 15:25:51

ndgnuh99
Member
Registered: 2018-09-12
Posts: 2

Re: [Solved] Qt apps opened with xfce4-whisker-menu ignore env variables

V1del wrote:

Please use [ code ] and not [ quote ] tags for pasting output.

Your desktop shell does not source your .bashrc. put the relevant export into a more globally valid resource like /etc/profile (or the directory counterpart /etc/profile.d) or if you need per user ~/.pam-environment, see: https://wiki.archlinux.org/index.php/En … _variables

I export the two variables to /etc/profile and it works. Many thanks!

Offline

Board footer

Powered by FluxBB