You are not logged in.

#1 2013-12-29 08:54:11

synthead
Member
Registered: 2006-05-09
Posts: 1,337

[workaround] ~/.profile doesn't get read with slim & XFCE4?

I put a few exports in ~/.profile, but when logging in to XFCE4 via slim, the exports aren't present (tested by echo'ing the variables in Bash).  If I source it manually, it works, but they're there to establish proxy settings and is useless unless it's in the environment.

Last edited by synthead (2014-01-02 01:53:51)

Offline

#2 2013-12-29 09:18:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

DM (and DE's) have different and "helpful" ways of dealing with this. Xfce uses ~/.config/xfce4/xinitrc, apparently.

You could also try putting your proxy settings in ~/.pam_environment and see if either, or both, respect that.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-12-29 14:54:43

vorbote
Member
From: 8375 ft closer to the stars
Registered: 2011-02-07
Posts: 38
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

The usual way DMs and DEs deal with user variables is by using ~/.xprofile

What I do is to link  (*not* symlink!) ~/.profile to ~/.xprofile if my login shell is bash or ~/.zprofile to ~/.xprofile if using zsh. Notice that I do not modify ~/.profile because it sources .bashrc. I do all modifications in .bashrc so that they are sourced by virtual terminal sessions. The same goes for .zprofile (a modified copy of .profile) and .zshrc.


I break things and put them back together for fun and sometimes profit, because it is the only way to learn.

Offline

#4 2013-12-29 17:47:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

So that means all of your env variables are sourced for every term you open?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-12-29 18:39:57

vorbote
Member
From: 8375 ft closer to the stars
Registered: 2011-02-07
Posts: 38
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

@jasonwryan That's correct. It may sound crazy from a memory consumption point of view but it depends on use case. I keep my environment configuration to a minimum (something I learned the hard way when running out of stack space in Ultrix's sh and csh). The only thing consuming memory in my shell processes is the file completion code, that I want there anyway, but that could be turned off guarding it with a test againt $- in /etc/bash.bashrc or the equivalent in my local .zshrc so that it doesn't load in non-interactive shells.

If I understood your question wrongly, the answer would be "yes, the whole graphical session inherits the environment in my shell files". I guess. :-)

Last edited by vorbote (2013-12-29 18:41:25)


I break things and put them back together for fun and sometimes profit, because it is the only way to learn.

Offline

#6 2013-12-29 19:07:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

Thanks for clarifying. I haven't used a DE for a long time so I wasn't sure. Is there no more elegant way to manage that? It sounds sort of broken by default™ smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-12-29 19:30:32

vorbote
Member
From: 8375 ft closer to the stars
Registered: 2011-02-07
Posts: 38
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

Broken since times immemorial. Brings me memories of trying to setup my twm sessions back in college. All well erased with hard grain alcohol. :-)


I break things and put them back together for fun and sometimes profit, because it is the only way to learn.

Offline

#8 2013-12-29 19:33:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

So, a net win then? smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2013-12-29 20:18:11

vorbote
Member
From: 8375 ft closer to the stars
Registered: 2011-02-07
Posts: 38
Website

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

Absolutely. ;-P


I break things and put them back together for fun and sometimes profit, because it is the only way to learn.

Offline

#10 2013-12-30 06:10:03

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: [workaround] ~/.profile doesn't get read with slim & XFCE4?

I didn't want to maintain XFCE4's xinitrc junk in my own file, so I ended up just adding "source ~/.profile" in ~/.xinitrc.

Offline

Board footer

Powered by FluxBB