ARMTC Forum
RPi2TC startup issue - Printable Version

+- ARMTC Forum (https://forum.armtc.net)
+-- Forum: Raspberry Pi 2/3 – Thin Client Project (https://forum.armtc.net/forumdisplay.php?fid=15)
+--- Forum: Old RPiTC2/3 old beta discussion (https://forum.armtc.net/forumdisplay.php?fid=16)
+--- Thread: RPi2TC startup issue (/showthread.php?tid=1553)



RPi2TC startup issue - DAFlippers - 09-04-2015

Hi,

I need to autostart a program during boot. I have scripts that run after X has started and when root and these work perfectly in standard Raspian image but don't with the RPi2TC image. The scripts have been stripped to a minimum for clarity.

In /etc/X11/Xsession.d/ there is 95LMSS:

Code:
#!/bin/bash
### BEGIN INIT INFO
# Provides:          LMSS
# Required-Start:    
# Required-Stop:
# Default-Start:     5
# Default-Stop:
# Short-Description: Run LINUX Mouse Switching
### END INIT INFO

echo "Start 95LMSS" >$HOME/LMSSlog.txt
sudo /usr/bin/RunLMSS
echo "End 95LMSS" >>$HOME/LMSSlog.txt

and in /usr/bin/ there is RunLMSS:
Code:
#!/bin/bash
#
#
#
echo "In RunLMSS - Start " >>$HOME/LMSSlog.txt
echo "Hello"
sudo /usr/bin/LMSS >>LMSSlog.txt &
echo "After LMSS" >>$HOME/LMSSlog.txt
echo "RunLMSS about to exit 0" >>$HOME/LMSSlog.txt
exit 0

Starting RPi2TC displays video and then 'blank' screen. If I open another console (Ctrl+Alt+F2) and type 'startx' everything works perfectly. If I look at the log files they are:

root - LMSSlog.txt:
Quote:Start 95LMSS
In RunLMSS - Start
After LMSS
RunLMSS about to exit 0
End 95LMSS

rpitc - LMSSlog.txt:
Quote:Start 95LMSS

Any thoughts as to why the second script is not being called?

David


RE: RPi2TC startup issue - DaWast - 09-04-2015

Please verify that RunLMSS is having sufficient rights. (as example "chmod 777" and "chmod + x" )
Can you run RunLMSS manually?


RE: RPi2TC startup issue - DAFlippers - 09-04-2015

Ok I commented out
sudo /usr/bin/RunLMSS
and it now goes to desktop
opening terminal and typing
sudo /usr/bin/RunLMSS
works perfectly - I forgot to mention I had already done this.

Could it be sudo causing the issue?

David


RE: RPi2TC startup issue - DAFlippers - 09-04-2015

I was right.... edit sudoers to include:

rpitc ALL=(ALL) NOPASSWD: ALL

resolves the issue.

David


RE: RPi2TC startup issue - Callietechno010 - 17-03-2016

Hello,

I had also similar type of problem in my project. Then i prefer best raspberry pi books for solution, i think you also prefer this for quick solution.

Thanks