On Wednesday 19 November 2008, "Dotan Cohen" <[EMAIL PROTECTED]> wrote about 'Re: Which files do what: .bashrc and friends': >1) Is a login shell run when the user logs onto KDE (even though he >does not see a konsole window)?
Nope a login shell is when bash is executed with the -l option, or having an argv[0] starting with '-'. If you want things to run when KDE starts up, you can use .kde/env and .kde/Autostart. All readable files in .kde/env are sourced by the /usr/bin/startkde script, which is run by /bin/sh. All .desktop files in .kde/Autostart are "activated" (by kdeinit or somesuch, around the same time your session is restored; .desktop file are like things in KMenu, they might open a file, start a program, whatever). >2) Is an interactive shell the term used for opening a konsole window? Yes. An interactive shell is any shell where stdin AND stderr are terminals (tty or pty). When konsole (and other X11 terminal applications) use a shell, they attach stdin, stdout, and stderr to a pseudo-terminal (pty; slave side) created by them. (This leaves non-interactive shells; those when stdin or stderr are not attached to a terminal.) An example: [EMAIL PROTECTED]:~$ grep keychain .bash_profile [[ -t 0 ]] && [[ -x ~/bin/keychain-load.bash ]] && eval "$(~/bin/keychain-load.bash)" [EMAIL PROTECTED]:~$ cat bin/keychain-load.bash #! /bin/bash # Starts and loads the keychain, interacting with the user as needed. # May start gnupg-agent, but doesn't prompt for keys because gnupg-agent # regularly times out keys. # Since interaction is clearly available, we clear the keychain before adding # keys (assume user is an attacker). if [ -x /usr/bin/keychain ]; then SSH_KEYS=('id_dsa') eval "$(/usr/bin/keychain --eval --inherit any-once --stop others \ --clear "[EMAIL PROTECTED]")" fi [EMAIL PROTECTED]:~$ grep -A 1 keychain .bashrc if [ -x ~/bin/keychain-start.sh ]; then . ~/bin/keychain-start.sh fi [EMAIL PROTECTED]:~$ cat bin/keychain-start.sh #! /bin/sh # Starts keychain or initializes the environment, but requires no interactivity. if [ -x /usr/bin/keychain ]; then { eval "$(/usr/bin/keychain --eval --quiet --inherit any-once --stop others --noask --lockwait 0)"; } >/dev/null 2>&1 fi [EMAIL PROTECTED]:~$ cd .kde /home/bss/.kde [EMAIL PROTECTED]:~/.kde$ ls env Autostart Autostart: keychain-load.desktop env: gtk-qt-engine.rc.sh keychain-start.sh ssh-askpass.sh [EMAIL PROTECTED]:~/.kde$ # env/keychain-start.sh is a hard link to ~/bin/keychain-start.sh [EMAIL PROTECTED]:~/.kde$ cat Autostart/keychain-load.desktop [Desktop Entry] Name=Load Keychain Comment=Start agents and add keys to them. Exec=/home/bss/bin/keychain-load.bash Terminal=true StartupNotify=false Type=Application Encoding=UTF-8 -- Boyd Stephen Smith Jr. ,= ,-_-. =. [EMAIL PROTECTED] ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.org/ \_/
signature.asc
Description: This is a digitally signed message part.