You are not logged in.

#1 2014-06-05 08:40:07

Osiris
Member
Registered: 2003-01-18
Posts: 160
Website

Set environment variable for user session

Hello,

seems to be a simple question... but how to set an environment variable for an user session? That means graphical (KDE) applications and shell (zsh) and everything else, like a login without X.

Setting it in ~/.xinitrc like proposed by the wiki shows no effect at all. (I'm using KDM)

Using .zshenv shows no effect on GUI apps.

Isn't there some cool systemd user session stuff?

Thanks!

Offline

#2 2014-06-05 16:46:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Set environment variable for user session

With regards to the xinitrc, How are you starting X?  Using startx?   Also. if you could provide the exact syntax that did not work, it would be helpful

Also, is there a chance there is something coming along after you set the variable that changes it again?
What environmental variable are you attempting to set?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2014-06-05 17:24:03

sonoran
Member
From: sonoran desert
Registered: 2009-01-12
Posts: 192

Re: Set environment variable for user session

Try exporting your environment variable in /etc/profile.

Offline

Board footer

Powered by FluxBB