2012/12/18

Letters have no meaning

Xephyr occasionally gets more than a little confused about the current keyboard settings (caps lock get forced on... etc). One or more of the following sometimes restore normality:
  • xkbset nullify lock
  • setxkbmap gb
  • restart the window manager as a last resort 

2012/08/25

Into the Box

Mounting a box account as a file system on gentoo - as root:
  1. unmask net-fs/davfs2-1.4.7 in portage
  2. emerge -av davfs2
  3. gpasswd -a ${your_user} davfs2
  4. mkdir -p /dav/${your_user}
  5. chown ${your_user}:${your_user} /dav/${your_user}
  6. echo 'https://www.box.com/dav /dav/${your_user} davfs rw,user,noauto 0 0' >> /etc/fstab
Then as ${your_user}:
  1. mkdir -p ~/.davfs2
  2. echo "https://www.box.com/dav ${box_username} ${box_password}" >> ~/.davfs2/secrets
  3. chmod 0600 ~/.davfs2/secrets
  4. echo "use_locks 0" >> ~/.davfs2/davfs2.conf
  5. mount /dev/${your_user}
The output from from df is wrong, but whatever... from the davfs2 README:

- If the server does not support RFC 4331 (most servers don't), davfs2 cannot
  calculate the free disk space on the server. ... So davfs can't help but lie. I tried to
  make the numbers look funny, so you will notice they are faked.

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.