Angstrom start-up processes [beaglebone]
Create a new file in /lib/systemd/system/ (rfidreader.service in my example) with content like:
[Unit]
Description=Start Python RFID reader
[Service]
WorkingDirectory=/...Python script path.../
ExecStart=/usr/bin/python rfidreader.py
KillMode=process
[Install]
WantedBy=multi-user.target
Then execute the following command to install the service:
systemctl enable rfidreader.service
To start the service, you can either reboot or execute:
systemctl start rfidreader.service
To check if the service is running and get the latest outputs from the script:
systemctl status rfidreader.service
Auto login on BeagleBone White + Angstrom 3.2
Turned out that a RF module attached to my beaglebone was being powered via USB, and this module should be activated by my test program mentioned in the question. So, when I unplugged my BBone USB cable, I was actually separating its GND from the RF Module's ground.
In short, I just had to use the same source in the entire circuit and keep the autologin configuration explained in the topic I also mentioned in my question.
Angstrom Linux on Beagleboard boots into sleep mode
This seems to have fixed the issue I was having, firstly I'd suggest updating any outdated packages by opening a terminal and typing
opkg update
this should only take ~1 minute, aftewards type
opkg upgrade
This can take anywhere from ~10minutes to ~6 hours maybe even more, so be patient, just leave the device alone until it has finished.
then open the following file
nano /etc/X11/xorg.conf
and add the following
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection
Section "Monitor"
Option "DPMS"
Identifier "Builtin Default Monitor"
EndSection
This should also disable any screensavers etc... which was also ideal for my requirements.
Reboot your device, and it should be good to go.
Automatic login on Angstrom Linux
I found a nice way to achieve it. This works for me with Angstrom (on a Beagleboard xM Rev C4).
Make sure agetty is installed (/sbin/agetty is the standard location). It should be included in every Linux Angstrom image.
Create a script file in any location, for example /home/root/autologin.sh. Edit it and add the following:
#!/bin/sh
exec /bin/login -f rootMake it executable with the command
chmod a+x autologin.sh
Edit the file /etc/inittab. Comment out (by adding a “#” at the beginning) the following line
1:2345:respawn:/sbin/getty 38400 tty1
and add the following line:
1:2345:respawn:/sbin/agetty -l /home/root/autologin.sh -n 38400 tty1 linux
Hope this helps out there.
Beaglebone inittab issue
inittab has been replaced by systemd
This is how I did it for the serial console. You can probably adapt it easily for tty1 by replacing "serial-getty@..." by "getty@...", but I haven't tested it.
cp /lib/systemd/system/serial-getty@.service /etc/systemd/system/autologin@.service
rm /etc/systemd/system/getty.target.wants/serial-getty@ttyO0.service
ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyO0.service
Create the following script file in any location (/home/root/autologin.sh in my case)
#!/bin/sh
exec /bin/login -f root
Make it executable
chmod a+x autologin.sh
Edit /etc/systemd/system/autologin@.service and update the ExecStart command by adding the -n (Do not prompt the user for a login name) and -l (Invoke the specified login_program instead of /bin/login) options.
ExecStart=-/sbin/agetty -n -l /home/root/autologin.sh -s %I 115200
How do I auto-launch a custom webserver on BeagleBone Black?
The bbb uses systemd and service files to control how services start -- there's a README on your bbb in /etc/init.d that provides some info and links. There are also some good pages on systemd at http://fedoraproject.org/wiki/Systemd. There are many services configured by default. Try typing: systemctl list-units This will give you a list of services and some minimal status info. Each of the listed services is configured by (usually) simple service files that tell systemd how to start and these files are in /lib/systemd/system for the most part. I'm not entirely sure what you are asking in your first question, but it sounds like you want to get rid of the "built-in" webserver -- I'm pretty new to bbb myself, and I don't know the answer for sure, but if I find out more I'll post it here.
Related Topics
Kaldi Toolkit Installation Error on Ubuntu 16.04
How to Continously Run a Unix Script in Background Without Using Crontab.
Rename Multiple Files - Linux/Ubuntu
Bus Error Opening and Mmap'Ing a File
Linux Intel 64Bit Assembly Division
How to Set Just Year with Linux Date Command
What Does "Warning: Not Changing User" Mean in Neo4J
How to Convert Multiline File into a String in Bash with Newline Character
Git Status Between Windows and Linux Does Not Agree
Cygwin Xwin Server Randomly Loses Connection
Setting an Acpi Field in Linux
How to Install Cross Compiled Cups to Target Board
Get Apache Total CPU Usage in (Linux)
Format and Filter File to CSV Table
Running a Program Through Ssh Fails with "Error Opening Terminal: Unknown."