2012/01/08

User env & non-interactive ssh

HP-UX has /etc/PATH which is read by /etc/profile except when you use ssh for remote command execution.

The trick to get a custom PATH is to add this to authorized_keys:

...
environment="BASH_ENV=.profile" ssh-dss AAAAB3NzaC1k{rest of relevant key}
...



Also check that this is set in sshd_config:

PermitUserEnvironment yes

check before/after with: ssh server env

2012/01/07

Back-words & fore-words

xsel to move text selections back and forth from a tvtwm nested in a Xephyr and another display (e.g. the parent):

"C"   = m4 : all : f.exec "xsel -o | xsel --display :0.0 -i"
"V"   = m4 : all : f.exec "xsel --display :0.0 -o | xsel -i"


Super_L+C copies the current selection in a tvtwm managed display to :0.0
Super_L+V copies the current selection from :0.0 into the tvtwm managed display selection

mod4 (m4)  is Super_L, mapped to the MSWin key, when:
  1. Windows Key is Super_L from xev 
  2. Super_L is mapped inside Xephyr to mod4
And the mapping from inside the Xephyr display can be determined by:

$ xmodmap -p|grep Super_L
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
$

The opposite direction from KDE4 to Xephyr:

System-Settings->Shortcuts and Gestures->Custom Shortcuts->Edit->New->Global Shortcut->Command/URL

The two new shortcuts can be put into a their own group and then exported/imported.