在 RHEL/CentOS 上自动启动协同
我有一个 Red Had Enterprise Linux 5 和一个 CentOS 5 机器,我试图将它们配置为在启动时自动连接到协同服务器。 我已按照 http://synergy2.sourceforge.net/autostart.html 上的指南进行操作,并且配置它们的方式与我配置以前的 Ubuntu 7.10 盒子的方式相同,但这似乎只让我完成了一半。 目前,synergy 在登录屏幕上连接,但一旦我登录,它就不会再出现。
我将以下几行添加到 /etc/gdm/{Init,PostLogin,PreSession}/Default :
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc fried-chicken # Init,PreSession only
所有文件均由 root:root 拥有,具有 755 权限,我只是不确定这里缺少什么。
I have a Red Had Enterprise Linux 5 and a CentOS 5 box, both of which I am trying to configure to automatically connect to a synergy server on startup. I have followed the guide at http://synergy2.sourceforge.net/autostart.html and configured them the same way I configured previous Ubuntu 7.10 boxes, and this only seems to get me half way there. Currently, synergy connects at the login screen, but once I login, it doesn't come back up.
I added the following lines to /etc/gdm/{Init,PostLogin,PreSession}/Default :
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc fried-chicken # Init,PreSession only
All files are owned by root:root with 755 permissions, I'm just not sure what I'm missing here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试 Synergy Autostart wiki 页面。
Try the Synergy Autostart wiki page.
尝试在脚本中添加类似
wall 'test'
的内容,看看是否会显示在控制台上。 如果是这样,您知道脚本正在被调用,但这是协同问题。 如果没有,则根本不会调用该脚本。Try adding something like
wall 'test'
to the script and see if that shows up on the console. if so, you know the script's being called but it's a problem with synergy. If not, the script isn't being called at all.只是想补充一点:当遵循 Matt 关于在 /etc/gdm/Init/Default 中调用 /usr/bin/synergyc 的建议时,请确保您不在那里使用 -f 选项,否则脚本将永远不会退出,您就赢了无法登录。
Just want to add: when following Matt's advice about putting a call to /usr/bin/synergyc in /etc/gdm/Init/Default, ensure you don't use the -f option there or the script will never exit and you won't be able to log in.
我在 RHEL 5.4 上使用以下内容添加到 /etc/gdm/{Init,PostLogin,PreSession}/Default
在所有情况下,将脚本添加到任何现有脚本之后,但之前“0 号出口”。
这对我有用。 我认为只要您使用默认 X 会话,它就应该可以工作,如果使用任何自定义会话,您可能必须将脚本移动到适当的位置。
I use the following on RHEL 5.4 added to /etc/gdm/{Init,PostLogin,PreSession}/Default
In all cases, add the script after any existing script, but before the "exit 0".
This works for me. I think it should work as long as you use the Default X Session, if any custom Sessions are used, you will probably have to move the script to the appropriate place.