Ksh .profile not read on login under Gnome desktop
I downloaded ksh for Debian and set up a .profile, but when I execute a terminal window under Gnome it fails to read the .profile or .kshrc. I experimented some with gnome-terminal options, but could not get it to read the files. I can execute the files manually ok. My user shell says ksh but the files are not read. Any suggestions appreciated. Thanks.
|
Did you change the shell in /etc/passwd? The password entry needs to look like
Code:
userid:x:1000:100:fname lname,,,:/home/userid:/bin/ksh Just in case you're not familiar with Korn Shell, your .kshrc gets read by .profile with something similar to this Code:
# set up the ksh environment |
I'm a retired admin. Used Korn for years (don't actually like bash). Yes, I did all that.
Linux 2.6.26-2-686:</home/dan[rufus]$echo $SHELL /usr/bin/ksh Linux 2.6.26-2-686:</home/dan[rufus]$echo $ENV /home/dan/.kshrc Linux 2.6.26-2-686:</home/dan[rufus]$. ./.profile Linux 2.6.26-2-686:</home/dan> [rufus]$grep dan /etc/passwd dan:x:1000:1000:dan,,,:/home/dan:/usr/bin/ksh Linux 2.6.26-2-686:</home/dan> [rufus]$ |
I don't know specifically about GNOME (don't like it or BASH either, too) but here's a thought.
KDE has two terminal utilities, one, a terminal emulator (/usr/bin/terminal), does not execute ~/.profile (just give a $ prompt); the other, /usr/bin/konsole, does execute ~/.profile. Anything like that in GNOME? Hope this helps some. By the way, does Debian support /etc/profile.d (with environment setup files)? Although this has nothing to do with the problem, I add a couple of files to /etc/profile.d for setting environment variables and things so I don't have to monkey with /etc/profile or my home .profile (well, except for .kshrc anyway). The one I use for Korn Shell may be of interest (assuming the existence of /etc/profile.d, that is): Code:
cat /etc/profile.d/ksh.sh |
Had a thought -- have you tried just running xterm? That ought to read /etc/profile for you.
|
Actually I noticed that and *thought* I posted a comment about it a few days ago. There is not profile.d but there is an xterm. So I imported some options from a script I used to use and tried: xterm -ls -geometry 140x40 -sb -rightbar -bg gray -fg black -title "[hostname]:~dan" -iconic -n "[hostname]:~dan"
This kind of works. It may be too many options, since it won't start as iconic, but everything else seems to work. The ls option causes it to read the profile. |
All times are GMT -5. The time now is 12:27 AM. |