etc.

Synergy

_침묵_ 2006. 8. 26. 05:01

시너지(Synergy)KVM(Keyboard, Video, Mouse)스위치 대신 네트워크를 사용해서 키보드와 마우스를 공유하는 프로그램이다.

 

소개 페이지:http://network.hanbitbook.co.kr/view.php?bi_id=1223

홈 페이지:http://synergy2.sourceforge.net/

 

자세한 내용은 해당 링크를 참조 하면 될 듯.

 

 

-----

아래 내용은 홈페이지에 있는 내용인데,한글로 보고 싶어서.. -0-;;

 

 

Starting synergy automatically (Synergy자동 시작)

You can configure synergy to start automatically when the computer starts or when you log in. The steps to do that are different on each platform. Note that changing these configurations doesn't actually start or stop synergy. The changes take effect the next time you start your computer or log in.

Windows

Start synergy and click theConfigure...button by the textAutomatic Startup. TheAuto Startdialog will pop up. If an error occurs then correct the problem and clickConfigureagain.

 

On theAuto Startdialog you'll configure synergy to start or not start automatically when the computer starts or when you log in. You need Administrator access rights to start synergy automatically when the computer starts. The dialog will let you know if you have sufficient permission.

 

If synergy is already configured to automatically start then there will be twoUninstallbuttons, at most one of which is enabled. Click the enabled button, if any, to tell synergy to not start automatically.

 

If synergy is not configured to start automatically then there will be twoInstallbuttons. If you have sufficient permission to have synergy start automatically when the computer does then theInstallbutton in theWhen Computer Startsbox will be enabled. Click it to have synergy start for all users when the computer starts. In this case, synergy will be available during the login screen. Otherwise, click theInstallbutton in theWhen You Log Inbox to have synergy automatically start when you log in.

Unix

Synergy를 이용하려면X서버가 있어야 한다.당근 서버가 실행되어 있고,해당 서버에 연결하는 데에 인증을 받아야Synergy가 작동한다.디스플레이 매니저를 이용하여Synergy를 쉽게 이용할 수 있는데,디스플레이 매니저 환경 파일을 수정하려면root권한이 있어야 한다.만약 root권한이 없다면.xsession을 이용해login한 후에Synergy를 이용할 수도 있다.

Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. It's best to have the display manager start synergy. You'll need the necessary (probably root) permission to modify the display manager configuration files. If you don't have that permission you can start synergy after logging in via the.xsessionfile.

일반적으로, 3가지 스크립트 파일을 수정해야 한다.첫 번째는 사용자 로그인 이전에Synergy를 시작할 것이고,두 번째는Synergy의 복사본을 죽일(kill)것이고,마지막으로 세 번째는 사용자 로그인 이후에 다시Synergy를 시작할 것이다.

Typically, you need to edit three script files. The first file will start synergy before a user logs in, the second will kill that copy of synergy, and the third will start it again after the user logs in.

수정해야 할 스크립트는 시스템 마다 다르게 구성되어 있을 것이고,위치 또한 각각일 것이다.수정하고자 하는 내용이 어디에 들어가든 상관은 없지만,일반적으로 스크립트가 내용의 마지막까지 실행되지 않는 경우가 있으므로 가능하면 스크립트의 위쪽에 위치하도록 하는 것이 좋다.

The contents of the scripts varies greatly between systems so there's no one definite place where you should insert your edits. However, these scripts often exit before reaching the bottom so put the edits near the top of the script.

각각의 파일들의 위치와 이름은 사용하고 있는OS나 디스플레이 매니저에 따라 다르다.보통 그 위치는/etc/X11에 있다.만약kdm을 사용한다면/etc/kde3/usr/kde/version/share/config를 살펴보면 될 것이다.일반적으로 아래 표와 같이 사용된다.

The location and names of these files depend on the operating system and display manager you're using. A good guess for the location is/etc/X11. If you use kdm then try looking in/etc/kde3or/usr/kde/version/share/config. Typical file names are:

  

  

xdm

  

kdm

  

gdm

1

 

xdm/Xsetup

 

kdm/Xsetup

 

gdm/Init/Default (*)

2

 

xdm/Xstartup

 

kdm/Xstartup

 

gdm/PostLogin/Default (*)

3

 

xdm/Xsession

 

kdm/Xsession

 

gdm/Sessions/Default (*, **)

*) TheDefaultfile is used if no other suitable file is found.gdmwill trydisplayname(e.g.:0) andhostname(e.g.somehost), in that order, before and instead ofDefault.
**) gdm may use
gdm/Xsession,xdm/Xsessionordm/Xsessionifgdm/Sessions/Defaultdoesn't exist.

 

Synergy클라이언트 사용을 위해,첫 번째 파일에 아래 내용을 추가한다. :

For a synergy client, add the following to the first file:

/usr/bin/killall synergyc

sleep 1

/usr/bin/synergyc [<options>] synergy-server-hostname

 

물론synergyc에 대한 경로는 사용자가 설치한 위치를 써야한다.

Of course, the path to synergyc depends on where you installed it so adjust as necessary.

 

두 번째 파일에 아래 내용을 추가한다. :

Add to the second file:

/usr/bin/killall synergyc

sleep 1

 

그리고 세 번째 파일에 아래 내용을 추가한다. :

And to the third file:

/usr/bin/killall synergyc

sleep 1

/usr/bin/synergyc [<options>] synergy-server-hostname

 

Note that<options>must not include-for--no-daemonor the script will never exit and you won't be able to log in.

 

The changes are the same for the synergy server except replacesynergycwithsynergysand use the appropriate synergyscommand line options. Note that the first script is run as root so synergys will look for the configuration file in root's home directory then in/etc. Make sure it exists in one of those places or use the--config config-pathnameoption to specify its location.

 

Note that some display managers (xdm and kdm, but not gdm) grab the keyboard and do not release it until the user logs in for security reasons. This prevents a synergy server from sharing the mouse and keyboard until the user logs in. It doesn't prevent a synergy client from synthesizing mouse and keyboard input, though.

 

If you're configuring synergy to start only after you log in then edit your.xsessionfile. Add just what you would add to the third file above.

Mac OS X

[By Tor Slettnes]

There are three different ways to automatically start Synergy (client or server) on Mac OS X:

1.      The first method involves creating aStartupItemat the system level, which is executed when the machine starts up or shuts down. This script will run in the background, and relaunch synergy as needed.

Pros:

Synergy is persistent, so this allows for a multi-user setup and interactive logins.

Cons:

The synergy process does not have access to the clipboard of the logged-in user.

2.      The second method will launch Synergy from theLoginWindowapplication, once a particular user has logged in.

Pros:

The synergy process inherits the$SECURITYSESSIONIDenvironment variable, and therefore copy/paste works.

Cons:

Once the user logs out, synergy dies, and no remote control is possible.

3.      The third method is to launch a startup script from the "Startup Items" tab under System Preferences -> Accounts.

Pros:

Does not require root (Administrator) access

Cons:

Once the user logs out, synergy dies, and no remote control is possible.

The text below describes how to implement a Synergy client using the first two methods simultaneously. This way, Synergy is always running, and the clipboard is available when someone is logged in. A Mac OS X Synergy server setup will be quite similar.

1. Create a System Level Startup Item

  • Open aTerminalwindow, and become root:$ sudo su -
  • Create a folder for this item:# mkdir -p /Library/StartupItems/Synergy
  • In this folder, create a new script file by the same name as the directory itself,Synergy. This script should contain the following text:

#!/bin/sh . /etc/rc.common   run=(/usr/local/bin/synergyc -n $(hostname -s) -1 -f synergy-server)   KeepAlive () { proc=${1##*/}   while [ -x "$1" ] do if ! ps axco command | grep -q "^${proc}\$" then "$@" fi   sleep 3 done }   StartService () { ConsoleMessage "Starting Synergy" KeepAlive "${run[@]}" & }   StopService () { return 0 }   RestartService () { return 0 }   RunService "$1"

However, replacesynergy-serverwith the actual name or IP address of your Synergy server.

Note that this scripts takes carenotto start Synergy if another instance is currently running. This allows it to run in the background even when synergy is also started independently, e.g. from theLoginWindowapplication as described below.

  • Make this script executable:# chmod 755 /Library/StartupItems/Synergy/Synergy
  • In the same folder, create a file namedStartupParameters.plistcontaining:

{ Description = "Synergy Client"; Provides = ("Synergy"); Requires = ("Network"); OrderPreference = "None"; }

That's it! If you want to test this setup, you can run the startup script as follows:

# /Library/StartupItems/Synergy/Synergy start

Any errors, as well as output from Synergy, will be shown in your terminal window.

Next time you reboot, Synergy should start automatically.

2. Run Synergy When a User Logs In

Each time a user successfully logs in via the console, theLoginWindowapplication creates a unique session cookie and stores it in the environment variable$SECURITYSESSIONID. For copy and paste operations to work, Synergy needs access to this environment variable. In other words, Synergy needs to be launched (directly or indirectly) via theLoginWindowapplication.

However, in order to kill any synergy processes started at the system level (as described above), we need root access. Thus, launching Synergy within the User's environment (e.g. via the Startup Items tab in System Preferences -> Accounts) is not an option that work in conjunction with the method above.

Fortunately, theLoginWindowapplication provides a "hook" for running a custom program (as root, with the username provided as the first and only argument) once a user has authenticated, but before the user is logged in.

Unfortunately, only one such hook is available. If you have already installed a Login Hook, you may need to add the text from below to your existing script, rather than creating a new one.

  • Launch a Terminal window, and become root:$ sudo su -
  • Find out if a LoginHook already exists:# defaults read com.apple.loginwindow LoginHookThis will either show the full path to a script or executable file, or the text:The domain/default pair of (com.apple.loginwindow, LoginHook) does not existIn the former case, you need to modify your existing script, and/or create a "superscript" which in turn calls your existing script plus the one we will create here.

The rest of this text assumes that this item did not already exist, and that we will create a new script.

  • Create a folder in which we will store our custom startup script:# mkdir -p /Library/LoginWindow
  • In this folder, create a new script file (let's name itLoginHook.sh), containing the following text:

#!/bin/sh prog=(/usr/local/bin/synergyc -n $(hostname -s) ip-address-of-server)   ### Stop any currently running Synergy client killall ${prog[0]##*/}   ### Start the new client exec "${prog[@]}"

  • Make this script executable:# chmod 755 /Library/LoginWindow/LoginHook.sh
  • Create a login hook to call the script you just created:# defaults write com.apple.loginwindow LoginHook /Library/LoginWindow/LoginHook.sh

More information on setting up login hooks can be found atApple.

When running the Synergy client, you may need to use the IP address of the Synergy server rather than its host name. Specifically, unless you have listed the server in your local/etc/hostsfile or in your local NetInfo database, name services (i.e. DNS) may not yet be available by the time you log in after power-up.synergycwill quit if it cannot resolve the server name.

(This is not an issue with the previous method, because theStartupParameters.plistfile specifies that this script should not be run until "network" is available).

3. Good Luck!

Remember to look in your system log on both your server and your client(s) for clues to any problems you may have (/var/log/system.logon your OS X box, typically/var/log/syslogon Linux boxes).

 

'etc.' 카테고리의 다른 글

Keyboard Shortcut Reference Posters for Visual Studio  (0) 2007.02.01
시간대  (0) 2006.12.07
FreeNX를 이용한 원격 X 디스플레이  (0) 2006.09.20