login_conf and aliases

On the console my aliases in .shrc and language settings from login_conf are honored. However, when I login from slim into an XFCE session, non of these settings are there. As if these files are not read. When I open a terminal I have no aliases and my XFCE session is in English and not in Dutch. How do I get my aliases and language setting into XFCE? Thanks for any advice!
 
What shell are you using?

You need to learn about the difference between login shells and other shells. Some execute .profile or .login, some execute .shrc or .bashrc or .tcshrc. It's all documented, and I'm being too lazy today to give a class on it (since I would have to look it up myself). My personal answer is: In my .profile, I have a line that executes my .shrc, but that's for my shell (I use bash), and I don't use Xwindows.
 
I’m using sh and expected that the window manager would honor the settings of that shell. That’s the way I’m used to it using Linux. I guess I have to set up more things by hand in FreeBSD. I’ll check my arch install to see what files contain what settings and use that info on my FreeBSD install.
 
I’m using sh and expected that the window manager would honor the settings of that shell.
It doesn't, never did actually.
That’s the way I’m used to it using Linux.
That's because most Linux distributions provide pre-configured applications. On FreeBSD you get the original configuration as supplied by the source (if the source supplies a configuration at all). That means you need to configure just about everything to make it do what you want.
 
Aliases:
Assuming you are using x11/xfce4-terminal: Preferences - General - Command: enable the "Run command as login shell" check box. You might want to disable the random fortune cookies displayed from ~/.profile.
Aflter seeing in /usr/local/etc/slim.conf:
Code:
# This command is executed after a successful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme

login_cmd        exec /bin/sh - ~/.xinitrc %session
Reset the setting in xfce4-terminal, set the ENV variable in ~/.xinitrc:

Code:
export ENV=$HOME/.shrc
export LANG=nl_NL.UTF-8
exec $1
 
Aflter seeing in /usr/local/etc/slim.conf:
Code:
# This command is executed after a successful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme

login_cmd        exec /bin/sh - ~/.xinitrc %session
Reset the setting in xfce4-terminal, set the ENV variable in ~/.xinitrc:

Code:
export ENV=$HOME/.shrc
export LANG=nl_NL.UTF-8
exec $1
Hmm, the code did not work as expected. The aliases and language is now in XFCE, but exec $1 did nothing. I had to put exec startxfce4 in .xinitrc for slim to work. I don't know why because the session file is in the correct place. No proble until I install another window manager and want to chose ;)
 
It doesn't, never did actually.

That's because most Linux distributions provide pre-configured applications. On FreeBSD you get the original configuration as supplied by the source (if the source supplies a configuration at all). That means you need to configure just about everything to make it do what you want.
Haha, that's no problem. It is just a learning curve. I really like FreeBSD but sometimes I don't know where to begin. Yes, I know, we have the handbook. I am just spoiled by the pre-configutation of linux. Many commands are different. Some minor and some simply do not exist. Like the commands lsblk and blkid which I often use to look at my disks. Geom and Gpart are different :)
 
Back
Top