timminn 发表于 2006-10-21 04:37:13

[求助] 启动 自动运行脚本

想在KDE 开启的时候, 自动开启一个thunderbird, 再开一个远程桌面连接窗口.

在 ~/目录下面的 .profile 文件写入脚本, 内容负在最后面.

出现两个问题:
1# .profile脚本是随着linux启动就运行的. 而不是随着kde启动才运行. 我希望linux启动的时候不执行脚本, 等到启动kde的时候才执行.
2# .profile里面我先执行的是thnderbird, 但是在我关闭thunderbird窗口之前, rdesktop命令不会被自行.
我希望开完thunderbird窗口之后直接继续开rdesktop的窗口.

不知道怎么解决, 谢谢高人指点.
#!/bin/bash

echo $LOGNAME

/usr/bin/mozilla-thunderbird

echo 'Remote Control, C or N for Cancel: '
read Cancel

if [ $Cancel != 'N' ] && [ $Cancel != 'n' ] && [ $Cancel != 'C' ] && [ $Cancel != 'c' ]
then
if [ -z $Cancel ] then
rdesktop -a16 -rsound:remote -g1280x960 -ufatty www.rdest.net
else
echo 'Remote Control Cancel'
fi

lophyxp 发表于 2006-10-21 08:05:54

吧.profile放到~/.kde/share/autorun下,(大约是这个目录,记不太清。反正就是~/.kde下的一个autorun目录)
页: [1]
查看完整版本: [求助] 启动 自动运行脚本