rodizio1 / EZ-WifiBroadcast

Affordable Digital HD Video Transmission made easy!
GNU General Public License v2.0
817 stars 200 forks source link

Quick Question: autostarting wifibroadcast #75

Closed tictag closed 6 years ago

tictag commented 6 years ago

@rodizio1 I just spent the entire of yesterday trying to find out how wifibroadcast auto-started. I went through: rc.local, .bashrc, init.d directory, systemd & cron auto-start systems (Google was my friend) and could only find where the "WifiBroadcast v1.4RC4 ....." text is displayed via /init.d/raspi-config. I can clearly see from the bootup sequence behaviour that the "profile" bash script in /wifibroadcast-scripts is how wifibroadcast is executed but just can't find where this script is called from.

QQ: Where is the "profile" bash script called from?

matiaspl commented 6 years ago

Mind the dot. It's in /root/.profile

15.01.2018 12:29 "tictag" notifications@github.com napisał(a):

@rodizio1 https://github.com/rodizio1 I just spent the entire of yesterday trying to find out how wifibroadcast auto-started. I went through: rc.local, .bashrc, init.d directory, systemd & cron auto-start systems (Google was my friend) and could only find where the "WifiBroadcast v1.4RC4 ....." text is displayed via /init.d/raspi-config. I can clearly see from the bootup sequence behaviour that the "profile" bash script in /wifibroadcast-scripts is how wifibroadcast is executed but just can't find where this script is called from.

QQ: Where is the "profile" bash script called from?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bortek/EZ-WifiBroadcast/issues/75, or mute the thread https://github.com/notifications/unsubscribe-auth/AB049r2KB395FRuLisEcm2B8PKJT4C6Fks5tKzadgaJpZM4ReRzn .

tictag commented 6 years ago

Wow, what a learning curve. So I've now learned that wifibroadcast auto-logs into the console on boot using systemctrl set-default multi-user-target, that something called a 'symbolic link' exists between /etc/systemd/system/autologin@.service and /etc/systemd/system/getty.target.wants/getty@tty1.service, which is configured to login as root and that the .profile file is autorun on login to the console, so by executing tx_rawsock within .profile in root's home directory wifibroadcast automatically runs.

oh, and grep doesn't search through hidden files unless you explicitly tell it to.....grrrr.

Linux sucks.

rodizio1 commented 6 years ago

Yes, there is autologon configured in systemd for tty1-tty12. After logon, the shell (bash in this case), is started which then starts the .profile script. The .profile scripts then looks on what tty it is running to decide what functionality (video rx, osd, telemetry, joystick r/c, etc.) is to be run on that tty.

Yeah, Linux is a mess.

Edit: If you don't like the console and remember Norton Commander from ancient DOS times, type "mc" :)

tictag commented 6 years ago

LOL! Hilarious! Never seen Linux 'blue screen' before ;)