Skip to content

Instantly share code, notes, and snippets.

@bdrewery
Created October 17, 2009 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bdrewery/212374 to your computer and use it in GitHub Desktop.
Save bdrewery/212374 to your computer and use it in GitHub Desktop.
FreeBSD patch for non-root screen
To run screen as non-root:
chmod 0111 /usr/local/bin/screen
chown nobody:utmp /usr/local/bin/screen
# Run this. Add into /etc/rc.local as well if you have clear_tmp_enable="YES"
install -d -o root -g wheel -m 1777 /tmp/uscreens
Add this to /usr/local/etc/pkgtools.conf in the AFTERINSTALL block as so for auto fixing screen on portupgrade:
AFTERINSTALL = {
'sysutils/screen' => sprintf('chmod 0111 /usr/local/bin/screen; chown nobody:utmp /usr/local/bin/screen;'),
}
--- pty.c.orig 2009-06-07 16:07:51.000000000 -0500
+++ pty.c 2009-06-07 16:10:40.000000000 -0500
@@ -314,7 +314,7 @@
#endif
/***************************************************************/
-
+/*
#if defined(HAVE_OPENPTY) && !defined(PTY_DONE)
#define PTY_DONE
int
@@ -331,7 +331,7 @@
return f;
}
#endif
-
+*/
/***************************************************************/
#ifndef PTY_DONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment