[Konsole-devel] [Bug 128772] Automated Input : inserting a command sequence by a hotkey

Marc Schoechlin ms-kdebugs at 256bit.org
Mon Jul 9 05:49:50 UTC 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=128772         




------- Additional Comments From ms-kdebugs 256bit org  2007-07-09 07:49 -------
>In KDE 4 there is a tool provided to create, edit and test key bindings from >within Konsole. 
>This means that you can create shortcuts which can emit any character >sequence to the terminal when pressed.   

If that means that i can define a sequence of i.e. 20 shell commands
(aliases, environment variables, ...) for one hotekey which can be inserted
by pressing the hotkey  -this could be solution...
 
>Back to your original comments, you said that updating bashrc on many systems >was hard for you.  Does this mean that you work with a different user account >on each system?! 

It seems that my description was detailed enough. If you maintain around 300 systems which run different operating-systems, many counries simply add the admins ssh-key to the root´s file "/root/.ssh/authorized_keys" :

- therefore i share the settings of the root-users with other admins
- software like IBM DB2 uses different accounts for every instance user
  -> i often login as root and execute a "su -" to change to other users

My current solution using xterm and fluxbox ;-)

- add the follfowing configuration to .Xresources
  ---
  XTerm*.Translations: #override \
    Ctrl<Key>X: insert-selection(SECONDARY)
  ---
- load the content of a file to the secondary clipboard buffer
  $ cat my-universal-unix-profile | xsel -i -s
- Login to a system as root, change the user with "su - <user>"
  and hit STRG+X

The hotkeys inserts the follwing profile:
---
[ "$BASH_VERSION" = "" ] && bash
uname -a|egrep " s96..0..*|s96.*pz[0-9]" && export PS1="\[\033\]\[[0;33;40m\]\u \h:\$ "

alias DATE="date \"+%Y-%m-%d_%H-%M-%S\""; alias bps="/usr/ucb/ps"; alias ggrep="/usr/local/bin/grep"
alias gdiff="/usr/local/bin/diff"; uname |grep -i Linux || export TERM=vt220
stty erase ^?
export EXINIT="set autoindent showmode showmatch ignorecase flash notimeout"
type -p less >/dev/null 2>&1 && export PAGER=less
lspath(){
  CURR="`/usr/*bin/nslookup $(uname -n) 2>/dev/null|awk '/'$(uname -n)'/{print $2}'`"
  if ( echo $1|egrep "^/" >/dev/null 2>&1); then
    echo -e "\n '${LOGNAME} ${CURR}:$1\n"
  else
    echo -e "\n '${LOGNAME} ${CURR}:${PWD}/$1\n"
  fi
}
uname |grep -i Linux || alias screen="SHELL=/usr/bin/bash TERM=vt100 screen"; alias less="less -n"
PROMPT_COMMAND='echo -ne "\033]0;${USER} ${HOSTNAME}: ${PWD}\007"'
export PATH=$PATH:/application/shared/install/client/bin
type less && export PAGER="less"
type vim  && alias vi="vim" && alias view="vim -R"
alias l="ls -la"; alias ll="ls -l" ; alias lf="ls -Fa"; alias sl="ls"; alias lt="ls -latr"; alias cdp="cd -P"
---



More information about the konsole-devel mailing list