LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fluxbox environment variables (https://www.linuxquestions.org/questions/linux-newbie-8/fluxbox-environment-variables-643479/)

ChrisAbela 05-20-2008 06:41 AM

Fluxbox environment variables
 
I am running Fluxbox on my brand new Slack 12.1 and when I run any terminal I noticed that I am not inheriting the environment variables laid out in /etc/profile. I had the same problem on Xfce and KDE but I cannot sort it out on Fluxbox. Should anyone be running on Fluxbox, I would appreciate any hints.

Chris

indienick 05-20-2008 07:52 AM

I ran into the same problem with WindowMaker - unfortunately, I couldn't find a fix for it. Constantly having to "source /etc/profile && source ~/.bashrc" was a pain in the butt.

vadkutya 05-20-2008 10:39 AM

do you have a .profile in your home dir? if so alter it according to your likings. if not try to create it and see how it goes. what exactly is the problem?

vadkutya

ChrisAbela 05-21-2008 10:05 AM

Thank you for the suggestion, but it does not work.
I am running runlevel 3 and the environment variables would be correct as long as I stay in TTY1-6, then I run Fluxbox via startx and I start a Terminal. At this point the variables are not inhereted. I am suspecting that I need to set up Fluxbox properly.

Running directly in runlevel 4 did not help.

ChrisAbela 05-22-2008 08:41 AM

For the sake of others who have (or shall) encounter the same problem I would like to post a temporary solution to this issue:

$cd
enter the following line in bold in .fluxbox/menu
....
[encoding] {UTF-8}
[exec] (Terminal) {terminal}
[exec] (rxvt) {rxvt}
.......
Open the new Terminal from the Fluxbox menu and then apply the usual Terminal settings:

Right Click>>Terminal
On the Terminal
Edit>>Preferences>>General
Tick Run command in login shell.

Hangdog42 05-22-2008 12:18 PM

I hope I don't get this one backwards.....

Slackware uses two files to customize your consoles:

~/.bash_profile - this is run when you log into the system
~/.bashrc - this is run when you open a new terminal (and being in fluxbox shouldn't affect this)

I've modified my environment variables in both, and I use fluxbox all the time.

In Slackware, modifying /etc/profile is kind of frowned upon simply because there is no guarantee that it will survive the next upgrade.

ChrisAbela 05-23-2008 07:10 AM

Yes you got it right.
Thanks for the help, ~/.bash_rc is the relevant file.
In my case I just sourced /etc/profile:
. /etc/profile
This keeps resetting my wallpaper but I will sort that out when I have time.
My compliments for your website.
It seems that there is a lot to learn about Fluxbox, so now I am hooked.

Have Fun!


All times are GMT -5. The time now is 08:51 PM.