Menu

How to get NCID to Autostart (GUI)

Help
2016-02-15
2016-02-20
  • Sine Botchen

    Sine Botchen - 2016-02-15

    From the command line I can run "NCID &" and the GUI will come up. How can I get it to auto-launch after booting? (Using an RPi.) Since the server is already running could I add the above to rc.local and then chmod rc.local to 755?

     
  • Todd Andrews

    Todd Andrews - 2016-02-15

    Hi Sine,

    Unfortunately the rc.local method won't work because the ncid GUI needs to be launched after user login and not after system boot. I see that the NCID User Manual does not have steps on how to do this on the RPi so I'm including them below. I'll use them as the basis for the User Manual so do let me know if you run into difficulty in following them.

    These steps are based Method 1 as seen in this post. It will cause all user accounts to automatically launch the ncid GUI when they login.

    Do this if ncidd is running locally on the RPi:

    sudo sh -c 'echo "@ncid" >> /etc/xdg/lxsession/LXDE-pi/autostart'
    

    If ncidd is on a different server or port, specify the IP address or host name, followed by the port number.

    Examples:

    ncidd running at 10.0.1.9 on default port 3333:

    sudo sh -c 'echo "@ncid 10.0.1.9" >> /etc/xdg/lxsession/LXDE-pi/autostart'
    

    ncidd running at 10.0.1.9 on port 3334:

    sudo sh -c 'echo "@ncid 10.0.1.9 3334" >> /etc/xdg/lxsession/LXDE-pi/autostart'
    

    The next time the user(s) login the ncid GUI will start automatically.

     
  • Sine Botchen

    Sine Botchen - 2016-02-18

    I tried option #1 but it didn't work. Type the command in terminal is accepted (i.e., I don't get any error message such as command not found or anything) but nothing happens when I reboot. The system automatically logs in using the default raspberry pi username/password. I've confirmed that the code does insert @ncid into the auto stat file, it just doesn't seem to recognize it. Will the GUI auto launch if any incoming call comes in? That may be a work around.

    This may or may not be related, but I've also notice that my Pi doesn't retain my keyboard layout preference. Each time I reboot it reverts back to UK layout. That could indicate a bigger problem with the Pi. Hmmm..

     
    • Todd Andrews

      Todd Andrews - 2016-02-19

      Hi Sine,

      The ncid GUI comes right up when I login. It doesn't require a call to come in first.

      If you launch LXTerminal and type ncid, does the GUI start? <- You already said this worked in your original post, sorry I forgot.

      I'm thinking it might be a PATH issue. You could try editing /etc/xdg/lxsession/LXDE-pi/autostart and change @ncid to be @/usr/bin/ncid.

       

      Last edit: Todd Andrews 2016-02-19
  • Sine Botchen

    Sine Botchen - 2016-02-18

    BTW, it seems that you cannot change the keyboard layout via GUI (and have it keep the changes). You have to sudo raspi-config and muddle thru a text-based menu to set the keyboard layout. Not related to NCID, but I figured I'd throw that out there in case someone else had the same issue.

     
    • Todd Andrews

      Todd Andrews - 2016-02-19

      I feel your pain. :D I have a hard time getting mouse button handed-ness to stick to lefty mode.

       
  • Sine Botchen

    Sine Botchen - 2016-02-19

    Added the above to autostart, but no GUI. Also tried plugging it into a phone line to see if an incoming call would launch the GUI. It didn't. I am thinking about totally reinstalling without using the .deb package method.

     
  • Todd Andrews

    Todd Andrews - 2016-02-19

    Hi Sine,

    I didn't know it, but a new version of Raspbian was released this year called "Jessie". According to this post:

    Jessie creates a user autostart file, so the global file at /etc/xdg/lxsession/LXDE-pi/autostart is not used.



    What do you get if you do:

    fgrep PRETTY /etc/os-release
    

    I get: PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"

    While researching this, there seems to be conflicting info about the path to the new user-based autostart file. Since I'm still on "wheezy" I'm not able to test it for your version.

    Could you post the output after doing the following:

    find ~/ -name autostart -ls
    

    And to edit the flie:

    sudo find ~/ -name autostart -exec nano {} \;
    

    Add @ncid to the end of the file and save the changes with these keystrokes:

    ctrl-x
    Y
    ENTER
    

    I don't know how else to restart LXDE so I guess just reboot and try it out.

     

    Last edit: Todd Andrews 2016-02-19
  • Sine Botchen

    Sine Botchen - 2016-02-20

    That seems to have worked!

    Results of os-release: Raspbian GNU/Linux 8 (jessie)

    Find autostart: /home/pi/.config/xsession/LXDE-pi/autostart
    /home/pi/.config/autostart

    It's weird that the other autostart had stuff in it as well (in addition to the @ncid that I added twice). Anyway, adding it to the one that lives under .config seems to have done the trick.

    Haven't used pico in decades and the nano line caused a bit of a flashback ;) Thanks for all your help!

     
  • Todd Andrews

    Todd Andrews - 2016-02-20

    Hi Sine,

    You're very welcome. And thank you, too, for reporting this. I've updated the INSTALL-Raspbian instructions based on our exchanges here and they'll be published with the next release of NCID.

     

Log in to post a comment.