How to kill synergy/evict all connections

1,631

Solution 1

I was having the same issue with server running on Fedora 16 and client on Windows 7. I finally found that the problem was that although I was stopping the client application from the PC toolbar there were actually client processes still running which were consequently keeping a connection open with the PC's name.

I killed in task manager restarted and that solved my problem.

Solution 2

have you tried ps -ef | grep synergy instead

Share:
1,631

Related videos on Youtube

StuStirling
Author by

StuStirling

Updated on September 18, 2022

Comments

  • StuStirling
    StuStirling almost 2 years

    I'm not sure if this is the correct way to go about but I will try and explain what I want to do.

    I have an Activity which creates a fragment called TemporaryFragment with a label. What I want to do is create and start a service with a Timer in it and that Timer then updates the time in that TextView.

    The way I am thinking of going is somehow, when the Service is started, passing the TextView from the Activity to the Service and then the Service keeping a reference to it.

    Another possible way is to make the Activity become a listener of the Service and then calling a method in the Service to update the TextView.

    Any thoughts would be great and maybe some options.

    Thanks in advance.

    ADDITION I'm sorry, I should also specify that I need this timer to run in the background. So when the application is sent to the background, I need the timer to carry on and only stop when I tell it to.

    • pl1nk
      pl1nk about 12 years
      Have you resolved your question?
    • Mikey
      Mikey about 12 years
      I'm not sure. I'll play around with it more and try to accept an answer. I've just been being real careful about trying not to reboot anything.
  • StuStirling
    StuStirling almost 12 years
    I am going to try and implement this option. One problem, when create the handler private final Handler handler = new Handler(this); it wants me to remove the context?
  • chrulri
    chrulri almost 12 years
    As you can see in my code example, this (MainActivity) implements the Callback interface (calling the handleMessage(..) method)
  • StuStirling
    StuStirling almost 12 years
    sorry I have added an addition to my question above
  • StuStirling
    StuStirling almost 12 years
    sorry I have added an addition to my question above
  • StuStirling
    StuStirling almost 12 years
    sorry I have added an addition to my question above
  • chrulri
    chrulri almost 12 years
    You cannot update something in an Activity which is already gone (e.g. background). You may continue updating it as soon as the activity is re-startet (e.g. onStart())
  • biegleux
    biegleux almost 12 years
    Still you can use Handler and call removeCallbacks() only in onDestroyView() or onDestroy() method of your fragment. Also in onPause() you can set a flag to not update UI while still execute some counting in your task and in onResume() you set the flag back to update UI. This way your task is execute while the fragment and it's particular view exists and updates it only if is visible.
  • StuStirling
    StuStirling almost 12 years
    so I come from an iOS background and the apps have the ability to continue running in the background. Is that not the case in android, when you go back out of an application thats it?
  • chrulri
    chrulri almost 12 years
    Activities are only active as long as they are in foreground. They may be destroyed if they are not used anymore. Read more about this: here But this does not mean that your application gets terminated. You are able to run more stuff in background using a Service. BUT, it does not make any sense to update UI stuff (e.g. Views in an activity) which is not visible/available to the user. As I said, you may update the UI when the Activity is re-started. What is your goal?
  • StuStirling
    StuStirling almost 12 years
    Basically, the idea behind the timer is eventually I am going to add some tracking into my application and therefore need it to continue running even if the application isn't in the foreground
  • chrulri
    chrulri almost 12 years
    Well this is definitly another use case. See my other answer.
  • StuStirling
    StuStirling almost 12 years
    would i need to bind or just start my service. I do probably need to access it again whilst its running so I'm thinking I need to bind. However, does that mean it will still run when the application is sent to background?
  • chrulri
    chrulri almost 12 years
    You need to start the service with START_STICKY as return value in onStartCommand(..). Start it by any activity or on application start using Context#startService(..) and stop it whenever you want with Context#stopService(..) whereas your activities can bind and unbind as often as you want. reference: developer.android.com/reference/android/app/…
  • StuStirling
    StuStirling almost 12 years
    I have got it working and comunicating with the activity by passing the service a handler and then send a message back
  • H.Karatsanov
    H.Karatsanov about 4 years
    @biegleux if we apply this solution in context of an activity, if it okay to create a separate Thread for it just to take off some from the main Thread?