Unix & Linux Asked on December 24, 2021
I’m using Kubuntu v20.04, which I launch using SDDM. The issue I’m facing is setting some environment variables for my Xsession. I use ~/.config/plasma-workspace/env/env.sh
to export my environment variables, however, I’m observing that a few variables aren’t getting set such as LD_PRELOAD
. I can confirm this because echo $LD_PRELOAD
returns nothing.
What should be a proper way of doing this?
These are my dotfiles: https://github.com/utkarshverma/dotfiles
After a long time, I finally came back to analysing this issue and embarrassingly found out that the exports were working, but I had two conflicting exports, through .zprofile
and .xsessionrc
for the same variable.
Also, I've noticed that for some reason, probably security related?, you can't simply inspect the LD_PRELOAD
variable. It will always return empty.
Though the answer isn't much, I do feel it would be worthwhile to share how I tracked down the issue.
.xsession-errors
which properly logs all stuff related to X. In that file, I could see that LD_PRELOAD
was being set twice on logon.grep -rnw ~/* -e "export LD_PRELOAD"
. It clearly indicated the respective files which had the lines, .zprofile
and .xsessionrc
and I was able to fix the issue.Update: It seems that
LD_PRELOAD
was beingunset
by KDE after sourcing~/.xsessionrc
that's whyexport
wasn't reporting anything. I've moved theexport
statement to~/.zshrc
for now.
Answered by Utkarsh Verma on December 24, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP