/usr/bin/lock 的来源在哪里?
我有一台带有雪豹的 Mac。我经常使用 tmux(或 GNU screen)在终端上工作,当我离开时,我会远程 ssh 返回到我的计算机。问题是有时我必须离开电脑一两分钟。当发生这种情况时,我不希望人们浏览并访问我的命令行,而且我也不认为每次都值得整个 CTRL-a、d、退出、打开终端、ssh 到机器、tmux 连接就会发生这种情况。
Screen 提供了一个 CTRL-a,x 来锁定屏幕(前提是我在该会话中至少输入一次密码,因为它不会读取系统密码)或在 tmux(首选)中提供时钟功能。
所有文档都指出多路复用器会查找 /usr/bin/lock 或 /usr/bin/lck。由于这是 Linux 和 BSD 系统上的低级实用程序,我在哪里可以找到源代码以便将其移植到 Mac OS X?
I have a Mac with snow leopard. I often work off the terminal using tmux (or GNU screen) When I walk away I remote ssh back to my computer. The thing is sometimes I have to step away from the computer for a minute or two. When that happens I don't want people to glance over and have access to my command line and I also don't think it is worth the whole CTRL-a,d,exit,open terminal, ssh to machine, tmux attach each time that happens.
Screen offered a CTRL-a,x that locked the screen (provided I enter in a password at least once that session because it won't read the system password) or in tmux (preferred) a clock feature.
All the documentation points to the fact that the multiplexers look for /usr/bin/lock or /usr/bin/lck. Since that is a low level utility found on linux and BSD systems where can I find the source so I can port it to Mac OS X?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
tmux 来自 OpenBSD;您可以通过 OpenBSD 查看其锁定 CVSweb 用于
src/usr.bin/lock/
。Mac OS X 与 FreeBSD 的关系更为密切;你可以通过 FreeBSD SVN ViewVC 查看其lock代码
head/usr.bin/lock/
(CVS 和 Perforce 也可用)。任何一种都需要修改才能在 Mac OS X 上进行编译。
主要的功能差异在于
-p
选项的身份验证方法(“使用登录密码/身份验证”):OpenBSD 代码使用其FreeBSD 使用自己的身份验证系统,而 FreeBSD 使用 crypt(3),这不适用于大多数 Mac OS X 帐户。tmux comes from OpenBSD; you can view its lock through OpenBSD CVSweb for
src/usr.bin/lock/
.Mac OS X is more closely related to FreeBSD; you can view its lock code through FreeBSD SVN ViewVC for
head/usr.bin/lock/
(CVS and Perforce are also available).Either one will require modification to even compile on Mac OS X.
A major functionality difference will be in the authentication method for the
-p
option (“use login password/authentication”): the OpenBSD code uses its own authentication system, and FreeBSD uses crypt(3) which will not work for most Mac OS X accounts.man -P "less -p lock" tmux,按 n 直到对结果满意?
man -P "less -p lock" tmux, press n until satisfied with results?