LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 744|回复: 5

关于.bash_profile和.profile

[复制链接]
发表于 2008-12-16 17:17:10 | 显示全部楼层 |阅读模式
learning the bash shell 上说先找.bash_profile再找.bash_login再找.profile. 三个文件只有一个起作用。
可我的gentoo同时有.bash_profile和.profile 。

我的fcitx的启动程序命令是放在.profile 下的,如果移到.bash_profile下总会有写小问题。

请问gentoo下, .bash_profile 和 .profile 到底什么关系。

另外,大家读英文learning bash shell 花了多少时间,我觉得3天很难看完。

谢谢

还有下面的这几句话是什么意思。
One advantage of bash's ability to look for either synonym is that you can retain your .profile if you have been using the Bourne shell. If you need to add bash-specific commands, you can put them in .bash_profile followed by the command source .profile. When you log in, all the bash-specific commands will be executed, and bash will source .profile, executing the remaining commands. If you decide to switch to using the Bourne shell you don't have to modify your existing files.
发表于 2008-12-16 19:14:23 | 显示全部楼层
1. gentoo不会修改bash的行为
2. 启动图形界面程序的命令不应该放在bash的启动文件里
回复 支持 反对

使用道具 举报

发表于 2008-12-16 20:10:48 | 显示全部楼层
没读过 learning bash shell, bash 编程是跟 beginning linux programming 学的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-16 21:16:30 | 显示全部楼层
Post by zhllg;1924824
1. gentoo不会修改bash的行为
2. 启动图形界面程序的命令不应该放在bash的启动文件里


我用的是gnome,那么启动fcitx的命令放在哪合适?谢谢
我一直放在.profile,用的挺顺的。
回复 支持 反对

使用道具 举报

发表于 2008-12-17 00:48:48 | 显示全部楼层
自然是X启动时会读取的脚本
.xinitrc or .xsession
回复 支持 反对

使用道具 举报

发表于 2008-12-17 01:07:32 | 显示全部楼层
还可以放这里:
#cat /etc/X11/xinit/xinitrc.d/99fcitx
fcitx -d
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表