Announcement

Collapse
No announcement yet.

Get Synergy running before login [with LDM]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get Synergy running before login [with LDM]

    Hi !

    My 1st post on this forum after many years of consulting. Thanks to members, I learned a lot round here...

    I decided to evaluate newer versions of Kubuntu lately, so that I can replace older machines running 8.04 and 10.04. I installed 12.04 64 bits and 13.10 32 bits on test machines to setup the configs (with my requirements). So far so good except a few things I need help with.

    My first problem concerns Synergy. I had to install Synergy 1.3.8 (because the "server" is 1.3.8). It works perfectly when I run synergyc <server>. But I need it running before login.

    According to Ubuntu documentation (https://help.ubuntu.com/community/SynergyHowto) :
    Autostart Synergy before logging in (LightDM)
    On the client, add the following line at the end of /etc/lightdm/lightdm.conf:
    greeter-setup-script=/usr/bin/synergyc <SERVER HOSTNAME>
    Where <SERVER HOSTNAME> is the name/IP of the server you are connecting to.
    but it doesn't work for Kubuntu

    Ubuntu's Wiki for LightDM indicates (https://wiki.ubuntu.com/LightDM):
    Autorun a Command
    You can run a command when the X Starts, when the greeter starts or when the user session starts

    Autorun a Command when X starts
    When lightdm starts X you can run a command or script, like xset perhaps.
    display-setup-script=[script|command]

    Autorun a Command when the Greeter starts
    You can do something similar when the greeter starts:
    greeter-setup-script=[script|command]

    Autorun a Command when the User Session starts
    If you want to spawn something when the user session starts, you can do it with:
    session-setup-script=[script|command]
    Tried these 3 options. None worked for me on Kubuntu 13.10 32 bits. I guess something's missing to have it working in KDE, when many users with Ubuntu/Gnome report success.

    Spent last 2 days trying to get it working, googled a lot, but nothing seems to work. Any ideas ? Has someone found a way to do it ?

    TIA...

    Bien à vous,
    Guillaume

    #2
    Have you tried using Xstartup instead of Lightdm?

    Please Read Me

    Comment


      #3
      Hi!

      Thx for your answer. No, I did not try yet... I only started to the read the doc about it this afternoon, while searching an answer everywhere.

      BTW, I finally got something working for Synergy to autostart with KDE autostart but AFTER logging in (so I still need a keyboard to type my password). Not bad but not good enough.

      I will investigate this Xstartup option. Do you have a good reference to start with ?

      Comment


        #4
        No, just a stab in the dark. I use Synergy, but only periodically so I didn't need to do what you're attempting.

        The issue is Synergy requires an X session to be running before it can start. You may be able to avoid the password issue by using a config file to store details.

        I would try the method listed here under Autostart Synergy before logging in (KDM) :

        https://help.ubuntu.com/community/SynergyHowto

        Also, your network connection must be up prior to Synergy. Usually not an issue if you're using wired ethernet.

        Please Read Me

        Comment


          #5
          OK... I knew this KDM method (well I had already read this page) but it is for KDE 3 and KDM. Kubuntu 13.10 has KDE 4 and LDM so most of the files mentionned here do not exist anymore (/etc/kde4/ folder is empty in 13.10).

          I also have the same situation with Synergy and Kubuntu 12.04 which has KDE4 and KDM. I will give it a try first. For the moment the KDE autostart "after logging in" solution is not so bad (and works the same way on 12.04 and 13.10)

          I also have XDMCP issues with LDM in 13.10. I think I will need more help soon.

          Thanks...

          Comment


            #6
            Sorry, I didn't notice the kdm3 reference. Xstartup is now in /etc/X11/. It looks to me like the GDM instructions have a good chance of working.

            Create a session file /etc/X11/Xsession.d/85synergyc with the following contents

            Code:
            /usr/bin/killall synergyc
            while [ $(pgrep -x synergyc) ]; do sleep 0.1; done
            /usr/bin/synergyc <SERVER HOSTNAME>
            and made the file executable, it should run when the X session is started.

            It certainly won't break anything so it's worth a try.

            Please Read Me

            Comment


              #7
              This gives me exactly the same situation (as with KDE autostart) : Synergy's activated just after logging in, but not before I need to type my password.

              Before doing what you suggest (with sudo privileges), I deactivated my autostart script (to be sure there is no conflict or confusion).

              You're right it was worth a try... Maybe I could try to name this file '79synergyc' to have it executed a little earlier ? What do you think ? Is there a log file I can check to get more information ?

              Comment


                #8
                This method is more interesting than the one with KDE autostart, as it works for all users. This is a good point.
                Last edited by DWAM_GDL; Dec 03, 2013, 06:05 PM.

                Comment


                  #9
                  Hi, DWAM_GDL!
                  I'm interesting in your problem as I want synergy to work before login in too.
                  Do you have any new thoughts?

                  Comment


                    #10
                    Hi Ilyaik

                    nothing more to tell. I followed Oshunluvr's advice : Create a session file /etc/X11/Xsession.d/85synergyc (see above)

                    It does not work before login (but just after), but I decided to never reboot, so I'm ok with it ! ;o)

                    I couldn't find a better way to deal with this issue. KDE autostart option is also working and gives the same result.

                    If you find something, let me know, I'm still interested.

                    Comment

                    Working...
                    X