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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
Hi Sine,
Unfortunately the
rc.local
method won't work because thencid
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: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:ncidd
running at 10.0.1.9 on port 3334:The next time the user(s) login the
ncid
GUI will start automatically.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..
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<- You already said this worked in your original post, sorry I forgot.ncid
, does the GUI start?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
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.
I feel your pain. :D I have a hard time getting mouse button handed-ness to stick to lefty mode.
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.
Hi Sine,
I didn't know it, but a new version of Raspbian was released this year called "Jessie". According to this post:
What do you get if you do:
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:
And to edit the flie:
Add @ncid to the end of the file and save the changes with these keystrokes:
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
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!
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.