Closed gsf closed 11 years ago
Turns out screen depends on an init script to add its /var/run/screen directory:
SCREENDIR=/var/run/screen
if [ -L $SCREENDIR ] || [ ! -d $SCREENDIR ]; then
rm -f $SCREENDIR
mkdir $SCREENDIR
chown root:utmp $SCREENDIR
fi
find $SCREENDIR -type p -delete
# If the local admin has used dpkg-statoverride to install the screen
# binary with different set[ug]id bits, change the permissions of
# $SCREENDIR accordingly
BINARYPERM=`stat -c%a /usr/bin/screen`
if [ "$BINARYPERM" -ge 4000 ]; then
chmod 0755 $SCREENDIR
elif [ "$BINARYPERM" -ge 2000 ]; then
chmod 0775 $SCREENDIR
else
chmod 0777 $SCREENDIR
fi
You can add the exact same thing to /etc/rc.local, and crouton will run it when you first enter the chroot. Not much crouton can do by default for you, since it will not parse and run init scripts automatically.
Thanks! I had figured out something similar.
Due to https://bugs.launchpad.net/ubuntu/+source/screen/+bug/574773 I thought I could add /etc/init.d/screen-cleanup to /etc/rc.local in the chroot, but it's an upstart script, so it's right out. I instead went stupid simple and added these lines:
mkdir /var/run/screen
chmod 775 /var/run/screen
chgrp utmp /var/run/screen
I could one-line those or move them into a script later on, but that works for now.
I :heart: crouton! I've been taking some notes on my setup at https://gist.github.com/5377654.
Thanks for sharing! I'm guessing you're using ssh just to get the newer hterm? Try the crosh window extension; it uses the ssh app's hterm to launch a shell in a new window.
Nice! I am using ssh just for a window, and that extension definitely simplifies things. One thing hterm still has over the crosh window, though, is a title bar that plays nicely with screen:
The crosh window will still come in handy, I'm sure. Anyway, I really can't thank you enough for turning my chromebook into a fantastic development machine.
I think this is a result of 8013ab1773ad59d821662502d9b3bf8b747e06f5, but I'm not sure how best to solve it.