Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RPi2TC startup issue
09-04-2015, 09:22 AM,
#1
RPi2TC startup issue
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
Reply
09-04-2015, 09:27 AM,
#2
RE: RPi2TC startup issue
Please verify that RunLMSS is having sufficient rights. (as example "chmod 777" and "chmod + x" )
Can you run RunLMSS manually?
-= Feel Free to use the Search function in the upper right corner =-
Reply
09-04-2015, 09:37 AM, (This post was last modified: 09-04-2015, 09:40 AM by DAFlippers.)
#3
RE: RPi2TC startup issue
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
Reply
09-04-2015, 11:45 AM,
#4
RE: RPi2TC startup issue
I was right.... edit sudoers to include:

rpitc ALL=(ALL) NOPASSWD: ALL

resolves the issue.

David
Reply
17-03-2016, 09:37 AM, (This post was last modified: 11-10-2017, 12:39 PM by Callietechno010.)
#5
RE: RPi2TC startup issue
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)