Synergyc as init script

Greetings,
I am trying to start synergyc as an init script so that it will work with slim, i copied the init script from the wiki, however, i get the error Fri Apr 13 10:16:02 2012: /usr/bin/xset:  unable to open display ""
and the client never connects to the server.
thanks!
Adam

If you're using slim, just put it in your .xinitrc, it's much easier and tends not to throw as many errors (at least for me, anyway).

Similar Messages

  • Some init script ideas

    I'm packaging GNUstep... again (this time from CVS), and it requires a certain shell script to be sourced by every shell.  That's easy enough for any user to do by modifying their .foorc and adding it in there, but I thought I would just throw a command in the postinstall to symlink the shell script to /etc/profile.d, so every login shell would automatically source it.
    That's all fine and dandy, but xterms by default aren't login shells, so anybody using an xterm would find themselves without a working GNUstep build environment unless they set xterm to be a login shell in their .Xdefaults.
    Change #1) Make xterms login shells by default in Arch's xfree86 distribution
    Now that xterms are all login shells, and we can expect a user's shell to be a login shell by default, why not add scripts to profile.d for the various self-contained distributions that live in /opt (like gnome, kde, java, etc.) that automatically set up the paths for those binaries.  At the moment, it appears you have to do this manually (I have not installed gnome or kde though, maybe those maintainers are doing this).
    Change #2) Have packages that live in /opt add a script to profile.d setting up the paths and environment necessary to use those packages.
    Thirdly, there's two daemons that need to be started for GNUstep when xfree86 starts (specifically gdnc and gpbs).  Once again, this is something that can easily be done by a user editing their .Xsession, but I'd rather automate it.  In the spirit of Arch's init script system, I think it would be wise to make an xinit.d directory (possibly in /etc, or more to the keeping of X's directory structure, in /etc/xinit.d), full of files that are run whenever X is started.  These could be enabled and disabled in rc.conf just like init scripts in rc.d currently are.
    Change #3) Add an xinit.d directory, in the spirit of rc.d and profile.d, full of items that are run whenever X is started.
    Perhaps some of this has already been done, or perhaps there are other solutions.  I just think these changes would be well in the spirit of Arch, and a boon to package maintainers.
    Please give me your feedback either here or by mailing me at [email protected]
    -- Michael Baehr

    sarah31 wrote:most if not all /opt package sets have profile.d scripts.  some may not think so but one has to log out then in to enable them.
    Good Looks like profile.d is being used for the right purpose.  I should've expected it would be  :oops:
    Xentac wrote:Ok... but what happens if I'm running blackbox?  I probably don't want gdnc and gpbs started when I start X, it'd make me cry.  How would xinit.d help with that?
    I don't see why it'd make you cry.  Let me explain what gdnc and gpbs are:
    GNUstep Distributed Notification Center
    Handles messaging and notification between GNUstep applications
    GNUstep Pasteboard Server
    Handles rich copy and paste between GNUstep applications
    Basically, none of these would impact whatever environment you'd be running, and only GNUstep apps would use them.  In fact, you wouldn't even realize they were running as they'd just be sitting in the background like the valiant daemons they are, waiting to be called into service for the holy emperor GNUstep  :twisted:
    And in any case, with the whole xinit.d idea, you should be able to just disable it with a ! if you don't like it
    I might as well throw in my last idea, which I forgot to write before.
    I've noticed people complaining about Pacman upgrades wiping their pacman.conf, which is a problem if you're using several people's TURs and other external repositories like I am.  Instead, I propose doing what APT has been doing in a recent version with its new sources.list.d layout... having one directory (pacman.repo.d or something of its ilk) storing files for each repository, and enabling and disabling them in pacman.conf the way you do in rc.conf (with a bang).  This would be especially nice because somebody could install a package called, for example, "pacman-TUR", and have a repo file for each TUR, and then be able to enable or disable them.  This package would be updated every time a new TUR was added or one was removed, thus enabling people to easily track the latest repository happenings, while still maintaining control over what repos they use.
    Just a thought.

  • Init scripts

    It has been a while since I last posted, but I like arch.
    My question is regarding the init scripts used in arch.  Specifically, three common commands used in the init scipts, and they are "stat_fail","stat_done", and "add_daemon".
    Could some refer me a wiki, webpage or man page for them, and yes I see there definitions in /etc/rc.d/functions file.

    For example in add_daemon:
    add_daemon() {
            [ -d /var/run/daemons ] || mkdir -p /var/run/daemons
            touch /var/run/daemons/$1
    What is the variable $1 refer to?  I cannot see it defined anywhere else in the function or in the /etc/rc.d/functions script.  Could it be the function referred to in which /etc/rc.d/"script" is run; "script" being whatever init service that is started and stopped,  ie crond would be then touch /var/run/daemons/crond?
      For what it is worth I am just trying to improve my shell scripting skills.
    [/i]

  • Dhcpcd starting by wich init-script? [Solved]

    I have static ip on both eth devices.  These configured by netcfg: with if1 and if2 files in /etc/network.d/
    here they are:
    cat /etc/network.d/if1
    CONNECTION='ethernet'
    DESCRIPTION='ethernet connection to internet'
    INTERFACE='eth0'
    IP='static'
    ADDR='10.85.231.106'
    NETMASK='255.255.0.0'
    GATEWAY='10.85.231.65'
    DNS=('10.85.224.33')
    cat /etc/network.d/if1
    CONNECTION='ethernet'
    DESCRIPTION='ethernet connection to localnet'
    INTERFACE='eth1'
    IP='static'
    ADDR='192.168.225.222'
    NETMASK='255.255.255.0'
    But my resolve.conf sometimes is overwritten by dhcpcd.
    in /etc/rc.conf I don't have any property connected with net set except HOSTNAME="ramazotty" and NETWORK_PERSIST="no"
    my daemons are:
    DAEMONS=(hwclock syslog-ng network net-profiles sshd samba xinetd @cupsd dbus @netfs crond)
    Who in the world is starting dhcpcd?
    p.s. The parent is process 1:
    >ps -f `pidof dhcpcd`
    UID        PID  PPID  C STIME TTY      STAT   TIME CMD
    root       497     1  0 15:09 ?        Ss     0:00 dhcpcd -q
    Last edited by roginovicci (2012-10-26 09:16:04)

    FYI you don't need the network init script when you're using netcfg.
    This is not the answer you're looking for, just some useful information - unless you happen to be wrong about your rc.conf.

  • [SOLVED] netatalk and postfix init scripts (not systemd)

    Hey, does anybody have an older version of Arch running somewhere?
    I'm looking for init scripts for netatalk and postfix that I've just re-built from ABS on an outdated Arch system. However, both packages offer systemd support these days and no love for dissidents like myself.
    They are probably very simple to write on one's own, but I just want to make sure I don't overlook some important trick.
    If someone could possibly post those either here or on dpaste.org or whatever paste service you love, I would be a very happy person lol
    Last edited by iliv (2013-12-01 14:17:00)

    netatalk is in the AUR https://aur.archlinux.org/packages/netatalk/
    postfix: https://projects.archlinux.org/svntogit … a3365f273e

  • Suggestion for init scripts

    I like the simplified sysvinit scripts that Arch uses, but I think the file locations could be improved a bit.  /etc should be reserved for configuration files only; when you put init scripts in there as well the /etc folder gets a little cluttered.
    Since we already have an rc.d folder anyway that contains some of the init stuff, why not put all rc scripts, settings, and so forth in the same rc.d folder?
    I'm probably not the smartest person to be talking about optimal naming conventions and file locations for the sysvinit stuff... I renamed my rc.conf to CONFIG.SYS and my rc.sysinit to AUTOEXEC.BAT

    tomk wrote:Could you clarify your suggestion? All the application init scripts are already in /etc/rc.d, and the system init scripts e.g. /etc/rc.sysinit, are in standard locations. The rest of /etc consists of system-wide application configs, and their locations are determined upstream.
    Also, iBertus is right.
    Well, I wasn't talking about the rest of /etc - specifically the init scripts (rc.single, rc.multi, etc.)  Alas, I'm unfamiliar with the bsd init process (or at least I was before this discussion).  Since one of the packages we install from base is sysvinit, I *assumed* (there I go again) it was indeed a SysV init process, only modified for Arch purposes.  That is, I thought y'all just arbitrarily decided to put rc.multi et al in /etc. and I was suggesting, as long as you're arbitrarily changing stuff around, why not keep all the rc. stuff together in /etc/rc.d.  Now that I know you're just conforming to bsd standards, my premise (that it was an arbitrary decision) is meaningless so I withdraw the suggestion and stand corrected.
    shining wrote:Seeing how much the rest of your post makes sense, I am not even sure if that's supposed to be a joke.
    Wow, I should have stayed back in newbie corner where there's no such thing as a stupid question!  It is a joke... and I was serious.  That is, I really did rename rc.conf to config.sys and rc.sysinit to autoexec.bat, but specifically *because* it's a joke, even if I'm the only one who will ever see it.  Kinda like the APPLE ][ logo I use for my Fluxbox wallpaper.
    Thanks for the explanations, ibertus and tomk... I obviously have a lot to learn about Arch (and *nix in general) before I'm ready to pitch in with meaningful suggestions!

  • WOL, init scripts and KDE

    Hello
    So, I may be confused with how init scripts are working, but in this case there is something I do not get.
    I am trying to be an energy efficient geek, so I decided to set-up a Wake On Lan (WOL) on my home server. The WOL itself is working fine, no issue on this side, but in order to have this working after each reboot, and according to the wiki, I have to add the following code to my rc.local file to set the WOL flag to my network interface.
    ethtool -s eth0 wol g
    And here is the problem : by default, my "server" starts a kde session after the boot. So my inititab is like that :
    ## Only one of the following two lines can be uncommented!
    # Boot to console
    # id:3:initdefault:
    # Boot to X11
    id:5:initdefault:
    # Example lines for starting a login manager
    #x:5:respawn:/usr/bin/xdm -nodaemon
    #x:5:respawn:/usr/sbin/gdm -nodaemon
    x:5:respawn:/usr/bin/kdm -nodaemon
    #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
    With these settings, the WOL flag is not set correctly after the boot. Now, if I do not start kde, use a console login and change my inittab to :
    ## Only one of the following two lines can be uncommented!
    # Boot to console
    id:3:initdefault:
    # Boot to X11
    #id:5:initdefault:
    # Example lines for starting a login manager
    x:5:respawn:/usr/bin/xdm -nodaemon
    #x:5:respawn:/usr/sbin/gdm -nodaemon
    #x:5:respawn:/usr/bin/kdm -nodaemon
    #x:5:respawn:/usr/bin/slim >/dev/null 2>&1
    In this case, the command in rc.local is executed correctly and my WOL flag is set as I want. So, either kde overwrites the flag when it starts or the rc.local file is not executed.
    Anyone with a clue of what is going on and how to solve that ?
    Thanks !
    Last edited by Cobaltounet (2011-02-02 04:25:24)

    zenlord wrote:
    Since your problem is solved, it might be the right time to ask my question to you regarding WOL:
    My server broadcasts it's IP across the network to be discoverable as a uPNP-server. I'm guessing that functionality will be lost if it is turned off, so I should configure all my uPNP-clients to send a magical packet whenever I decide to use them (which would be nearly impossible: I don't see this possibility for a PS3...)
    I am not an expert in uPNP, but I am afraid that there is not a lot of solutions to your problem. If your server is powered off, then something has to wake him up. You can probably do that from your laptop/desktop or your router directly but I do not think a PS3 can do it. And having to send the magic packet manually each time you want to use a uPNP device kind of defeat the convenience of the uPNP.

  • Compiling init scripts as C

    Hello!
    A while back, I read that Blice (owner of http://its.alrig.ht/) had converted their init scripts to C to help the computer boot faster.
    Unfortunately, Blice's site seems to have disappeared, which is a shame since I'd like to read some of the information on his webpage.
    Anywho, my question is: anybody here have experience in converting startup scripts to C?
    I've rewritten the apache, ssh, and postfix startup scripts so far. I've put the code up on GitHub at http://github.com/ColinJones/binary-startup
    Any thoughts?

    I kind of like the idea myself. I would like to help with the development.
    After rethinking a bit, I don't think the hardest part to develop is the actually code, the part that is going to be challenging is the build script. I mean, if it is going to be according to my original idea, the program code itself is going to be simple but to be able to have simple program code when parsing rc.conf it means that the build script has to be a bit more complex, otherwise it will mean that the program code itself has to parse rc.conf. Well, that means if the rc.conf is going to be parsed in the first place. I think it should be parsed during build time, it will be a bit like mkinitcpio but for the initscripts but that is of course in my opinion.
    One of the first thing that needs to be done is probably do a prof-of-concept of a program + build script that can depending on the content of the config file build a program with different functionality. This is pretty much to simulate the DAEMONS array. A traditional way of doing this with statically linking is to including different files with the same interfaces and in case a functionality is not going to be present, use interface functions that are empty. This pretty much works when there isn't a lot of different functionality but I think there are to many possible DAEMONS to make this practical. I think a better way is to generate a config.h (or use a different name for the file) which contains a list of functional pointers to all the "modules" that should be included. In short, make the program aware of the function and include the file that contains the function to the linker and make the complete process dynamically.
    I might look in this prof-of-concept during the weekend.
    Last edited by PJ (2010-01-08 18:18:09)

  • Some init scripts disappeared?

    Hi
    I upgraded using pacman -Syu yesterday, then I found some init scripts(/etc/rc.d/nginx  /etc/rc.d/postgresql) disappeared.
    I searched about it but found nothing.

    peonone wrote:I searched about it but found nothing.
    Really?
    Read the front page news:
    https://www.archlinux.org/news/end-of-i … s-support/
    https://www.archlinux.org/news/final-sy … n-warning/

  • Arch32 init script in wiki incorrect ?

    Hi all,
    after the death of my 500GB SATA drive I had to (re)install arch64 on my box. For setting up the arch32 chroot I followed the guide as found in the wiki here:
    http://wiki.archlinux.org/index.php/Ins … _in_Arch64
    Unfortunately this new arch32 init script...
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    dirs=(/proc /proc/bus/usb /dev /dev/pts /dev/shm /sys /tmp /home)
    case $1 in
    start)
    stat_busy "Starting Arch32 chroot"
    for d in "${dirs[@]}"; do
    mount --bind $d /opt/arch32/$d
    done
    add_daemon arch32
    stat_done
    stop)
    stat_busy "Stopping Arch32 chroot"
    for d in "${dirs[@]}"; do
    umount -l /opt/arch32/$d
    done
    rm_daemon arch32
    stat_done
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0
    ...gives me the following error when I try to start the 32 bit chroot:
    :: Starting Arch32 chroot                                                [DONE]
    ./arch32_new: Zeile 16:  : Kommando nicht gefunden. <- this means command not found.
    Fortunately I had archived several pages from the wiki as pdf when I set back my first arch64 system. The old arch32 init script looks like this:
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    case $1 in
    start)
    stat_busy "Starting Arch32 chroot"
    mount --bind /proc /opt/arch32/proc
    mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb
    mount --bind /dev /opt/arch32/dev
    mount --bind /dev/pts /opt/arch32/dev/pts
    mount --bind /dev/shm /opt/arch32/dev/shm
    mount --bind /sys /opt/arch32/sys
    mount --bind /tmp /opt/arch32/tmp
    mount --bind /home /opt/arch32/home
    add_daemon arch32
    stat_done
    stop)
    stat_busy "Stopping Arch32 chroot"
    umount /opt/arch32/proc/bus/usb
    umount /opt/arch32/proc
    umount /opt/arch32/dev/pts
    umount /opt/arch32/dev/shm
    umount /opt/arch32/dev
    umount /opt/arch32/sys
    umount /opt/arch32/tmp
    umount /opt/arch32/home
    rm_daemon arch32
    stat_done
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0
    This one works perfectly for me.
    Questions:
    - Has anyone of you used the new script without error message ?
    - What could cause the "command missing" error message ?
    I can post the old script in the wiki if the new one has errors.
    Regards,
    D$

    The script does seem to be a little broken alright, try with this one (untested)
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    dirs=(proc proc/bus/usb dev dev/pts dev/shm sys tmp home)
    case $1 in
    start)
    stat_busy "Starting Arch32 chroot"
    for d in "${dirs[@]}"; do
    mount --bind /$d /opt/arch32/$d
    done
    add_daemon arch32
    stat_done
    stop)
    stat_busy "Stopping Arch32 chroot"
    for d in "${dirs[@]}"; do
    umount -l /opt/arch32/$d
    done
    rm_daemon arch32
    stat_done
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0

  • Init script startup

    How does the init script system on Arch work? Coming from Ubuntu, if I wanted to add a startup script I just added it to /etc/init.d and ran update-init.d to create the necessary symlinks.
    I've looked on the wiki and searched the forum, but not found much on it. If I wanted to add a startup script, what's the best approach? It seems like the recommended way is to add the script to rc.d and to add a line to execute it in rc.local.

    It doesn't matter if it's a daemon or not, look for example at the /etc/rc.d/alsa script. It sure isn't a daemon but it's still in /etc/rc.d/ and it's still called from the daemons array in rc.conf . No, there are no symlinks, which simply means there isn't a program neither.

  • Openrc init scripts source?

    I have been using openrc as my init system, with apg's method. I have had no issues, however, I would like to know if there is some kind of repo for openrc scripts, as till now, I have been writing many initscripts in my own.
    EDIT: I have also been extracting artoo's packages and using those initscripts, but it is a very few scripts.
    Last edited by aditya3098 (2014-10-29 15:21:23)

    To my knowlage there is no such a repo/site. Our openrc implementation is unofficial and community driven which means it gets less support, plus we have two incompatible implementations. One of us could start a github (or something like that) repo and keep all our home made scripts/rules etc. Would like to see that happen, and soon I may have something to contribute with.

  • Stuck during init scripts ...

    I did one quite big system update today, when were xorg packages about to install, suddenly x.org restarted itself. I had to repeat upgrade part of install and everything else seemed fine. But, when i was restarting pc, I noticed in shutdown scripts message like "umount: device is busy". After that, every time I try boot arch, boot stops at "Mounting local filesystems ... [BUSY]". Is possible to chroot to disk and content looks alright, I even tried fsck(in case that my understanding of how works is right)  partition with system but it doesnt helped at all ... Any advices will be greatly appreciated ...

    try chrooting in and redownloading various packages pertaining to bootup(with pacman). Like initscripts and filesystem and filesystem specific tools.
    You might have caught the bug in pacman that sometimes pacman doesn't install all files in packages. I've had this happen to me when i was installing lots of packages.

  • Sulogin in init scripts

    it is not nice that a server goes to sulogin after a reboot. if this is a remote server it is painfull to restart it (few hundreds of km away)
    and sulogin is not really necessary after a succesfull fsck

    yes, i would also like to see that sulogin is disabled ....
    for a server this means to pay a too high paid IT-guy to type 3 commands ....
    or, can anyone tell me where i can switch it off ??

  • Init scripts halting since kernel upgrade

    Since the upgrade to 2.6-33 (Arch64), my laptop is experiencing strange behaviour.  If I boot or shut down when my laptop is running on battery power, the machine keeps halting.  If I flick the WiFi on/off switch, it continues processing for a short while but I need to constantly switch the WiFi off and on in order to be able to boot or shutdown.  Alternatively, I can plug in the AC power cable and it will continue to work as it should.
    I don't think that the problem is related to the WLAN module as I have tried booting using no module, using the NDiswrapper module and using the ath5k module that I normally use with my ar5007.  In the meantime, the only thing I can do is revert to 2.6-32.

    I have had problems since the last kernel upgrade also....
    http://bbs.archlinux.org/viewtopic.php?id=95125
    Unfortunatly the resoultion was the same, downgrade the kernel to 2.6.32 and remove then reinstall nvidia packages which are compatible with this kernel

Maybe you are looking for

  • Layout changed when I added spacing around images.

    @charset "utf-8"; body { font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif; background: #363; margin: 0; padding: 0; color: #000; /* ~~ Element/tag selectors ~~ */ ul, ol, dl { /* Due to variations between browsers, it's best practices to zero pad

  • Palletization Data in the material master

    Hi, If I defined the palletization data in the warehouse management view of material master as follows: LE qty: 2 Unit : PC SU type: IP the system should separate the transfer orders into several items by  LE quantity when put away, for example, If I

  • Error Web Services RFC proxy - Application Server

    Hi, I configured the Web services consumer. The architecture requires passage through a proxy. Now when I check the RFC of WS from  Central istance the test is ok. While, when I check the same RFC from the application server, this asked by the user a

  • Lightroom Vs. Aperture - mini shootout

    As seen in my earlier thread, I've been playing with the 30 day trial of Lightroom trying to decide whether that tool is a better fit for my needs then Aperture. While I've only spent a few hours with this on a small project I think I've been able to

  • Installing Acrobat XI on Macbook Air

    I own a copy of Acrobat XI on DVD, and need to install it on a MacBook Air. Can I download a copy from the Adobe site and use that instead? I already have a serial number.