.profile not being read/processed


#1

I am running Lumina on

uname -a
FreeBSD bsd.local 12.0-CURRENT 

I have had a problem setting the PATH for apps. For my regular user I have bash configured. Opening a terminal from the GUI, .bashrc is evaluated, i.e. PATH is set.

When starting geany or gvim by clicking the icon, they do not see the PATH and hence cannot execute compilers (path not found). Starting them from the terminal all is fine.

~/.profile and for that matter /etc/profile are clearly not processed. Settings made in there don’t show up.

The solution was to edit PATH in ~/.xprofile – then the environment variables are actually set.

Question: is that wanted behaviour? It really seems a very unlikely place for me for those settings.


#2

I don’t know enough to answer your question. But I’m sure someone more knowledgeable than myself will stop in at some point. However, I do know, that here we use “about” instead of uname. If you go to a terminal, and type “about” the information there will probably more helpful to the more knowledgeable users than the output of uname.
This is just a suggestion, from a newbie that has been around for a little bit.


#3

are you sure you are using bash?

by default, lumina is using csh

what does the following show;

cat /etc/passwd | grep < your user name >

edit:
damn markup language


#4

I don’t think that would show anything (maybe an error) since there is nothing after grep.

Maybe you meant cat /etc/passwd | grep username?


#5

@Groot thanks for the advice. New one to me. Here is my about cut by a couple of lines. Maybe that helps.

boot environment now (N) … initial NR 2018-06-15
       after restart (R) … initial NR 2018-06-15
boot loader …………………………………… BSD
            type ……………………… EFI
CPU ………………………………………………………… Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    number of cores ……………… 4
host ……………………………………………………… bsd.local
memory ………………………………………………… 16384 MB available, 14218 MB free
OS git branch ……………………………………………………………………………………… trueos-stable-18.03
OS git revision ………………………………………………………………………………… fa797a5a3
OS kernel build time ………………………………………………………… Mon 2018 Mar 26 00:24:47 UTC
OS kernel identity …………………………………………… (uname -i) GENERIC
OS platform (architecture) ……………………… (uname -m) amd64
OS release level ………………………………………………… (uname -r) 12.0-CURRENT
OS version and patch level …… (freebsd-version) 12.0-CURRENT
TrueOS package set ………………… STABLE
TrueOS version …………………………… TrueOS-Desktop-201803131015
uptime ………………………………………………… 3:13, 1 user, load averages: 0,55 0,60 0,66

More (TrueOS Desktop):

    desktop environment …… Lumina

#6

@RodMyers yep, I explicitly changed to bash. First time through configuration -> users later using

chsh -s bash NAME

Actually I thought /bin/sh (the default) is a bourne shell compatible one…

https://www.freebsd.org/doc/en/articles/linux-users/shells.html

Now looking at /etc/passwd

me:*:1001:1001:my name:/usr/home/me:/usr/local/bin/bash

If I revert to /bin/sh the problem is worse: since .profile is not processed, even in the terminal I do not have the proper path set. More precisely: anything I set in .profile has no effect. Setting it in .xprofile works

to test in .profile:

MYPROFIL=profil-greetings ; export MYPROFIL

in a terminal running /bin/sh

$ env | grep MY

brings up nothing. A similar test with bash and .bashrc works fine.


#7

can you search discourse? I “think” @beanpole135 helped with another issue similar to this one.


#8

I’ll have another go at searching, so far found nothing. Could be my bad search though :slight_smile:
Bit late here … tomorrows another day.

My guess, I have a conceptual problem, rather than looking at a bug. I wonder if the change to OpenRC has anything to do with it, but that should be lower level…


#9

type just “profile” and see what comes up


#10

Yes, there was this post

https://discourse.trueos.org/t/xresources-support/476/3

but not quite the same issue. Similar though.

however calling .profile with ${SHELL} ~/.profile failed for me. Created a garbage path (mostly same folders repeated)