-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wayfire Replaced - Do we know how the new environment works with the script now? #52
Comments
Of course they will replace it just in time for my first setup! First time messing with a RPi and been struggling to understand why it was not working. Now I know. Watching this issue. TY. |
I was able to make it launch at startup with this : |
No changes would be needed if you stick with wayfire. But, that's swimming against the tide, and not a long term strategy. We're better off changing the approach of how the browser & keyboard toggle is autostarted. Here's my proposal (feel free to share alternative ideas): #53 |
the above command didnt work for me. what worked for me though, |
same exact issue here. the gui worked first boot then broke after reboot. what's the location of the config file to add sites manually? |
Seems like instead of starting |
what's the last known working rpi OS, that will work as described on the main page? latest 24-11-19 32/64 bit versions don't work. thanks |
this worked for me too (thanks). To get the portal working again, I reran the curl script, which starts the portal. I have to do that every time I change config, but this is workable for me. actually, every time the script is run, a new entry is added to the startup file. So, the script's not idempotent, and you end up with multiple instances started? |
The piosk needs to use systemd to manage its three scripts that are running. Here is an example of a systemd service that should be used instead of the way piosk currently sets itself up to be autorun: install in /etc/systemd/system/ and then run sudo systemctl daemon-reload, sudo systemctl enable piosk-browser and sudo systemctl start piosk-browser (repeat for other two) piosk-browser.service[Unit] [Service] [Install] Note that it has a small sleep delay before the service fires, and it depends on graphical.target so it will launch (with a delay) after the GUI comes up, and it hijacks the pi user's environmental variables for the X display adapter. Note that this will only work if the user is named "pi". If you configured the raspberry pi user with a different username then you'd have to adjust this. The savvy developer could include these three files as a template in the install script and then use sed to add in the actual user name so that it would always work. You'd need a seperate version of this for the switcher.sh and also one to run the index.js if you wanted it to switch tabs and have the webserver running, here are the ones I used: piosk-switcher.service[Unit] [Service] [Install] piosk-webserver.service[Unit] [Service] [Install] Ideally you should have three of these, including one to run your index.js. Putting things in rc.local is ugly, there is no functionality to restart it if it fails and a bunch of other things. This will solve the "after X hours the piosk stops switching tabs" issue which is undoubtedly the switcher.sh script failing for some random reason or another, but systemd will automatically restart it as long as "browser.sh" is running. Edit: I removed the After/Requires section in piosk-switcher.service as this seems to get hung up on boot often and just replaced it with a 30 second delay and hoping for the best, which seems to work well! |
@SpiraMirabilis you've already done the hard work, just go ahead and send a PR... That'd be great! As I've said in some other issue... I will only get time by the last week of December (or early January), to clear my GitHub backlogs, depending on how many issues has Santa piled up for me. |
@debloper I went ahead and did so. I had to re-write the setup.sh and cleanup.sh completely. In this new version the piosk package installs itself in and runs from /opt/piosk rather than ~/piosk. if you want to change that, feel free. |
Just a thought: these scripts can also be run via pm2. I feel this is simpler, as nodejs is already installed. as part of setup: # install pm2 globally
sudo npm install pm2 -g
# Start the browser service and switcher service
pm2 start /home/cf_pi5/piosk/scripts/browser.sh --name "browser" --interpreter bash
pm2 start /home/cf_pi5/piosk/scripts/switcher.sh --name "switcher" --interpreter bash
# Save this processes to startup
pm2 save
# will save in /home/cf_pi5/.pm2/dump.pm2
# To make it start on system boot
pm2 startup running
copy paste execute that and you are good to go.
|
Since pm2 uses systemd itself, this is just using systemd with extra steps and extra points of failure, though? |
hmmm, I guess it's a familiarity thing then - "What library are you more familiar with?". I am sure there are equivalents to |
I'm going to test it, but I was curious if we have some changes to make.
The text was updated successfully, but these errors were encountered: