Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3893

Troubleshooting • Re: How to run commands on boot/startup for "Bookworm" OS (Raspberry pi 4b)

$
0
0
Sorry for the confusion on the link! Apparently I didn't have the proper link pasted and missed it when I double checked the post. Everything should work now lol. Thagrol's post above though certainly goes into far more detail on both this and other topics, so I would recommend those who see this page consult that link as opposed to mine unless you're looking for a very quick and simple breakdown of a single function.

Here's my feedback but it's probably not what you were expecting or hoping for.
  • Page 1:
    • Upon Startup/Boot
      This is not running code on startup or boot. This is running code when the specific user logs in to the desktop. That's not the same thing though the default automatic login behaviour of RPiOS makes it appear so.
    • This method is only applicable to Pi models running Raspberry Pi OS Bookworm with 2GB RAM or more and where they have not been configured to use X11 instead of Wayland.
    • other Pi with the same OS
      • You've not said which OS you are talking about.
      • Untrue. All Pi models with less than 2GB RAM running Bookworm use X11 not Wayland/Wayfire so the old methods still apply to them.
    • non-bold code in the images.
      I don't see any relevant bold text in the images. The only bold text I see is the section headers in wayfire.ini and the shell prompts.
  • Page 2:
    • Below are the specs for my Raspberry Pi 4’s OS
      That's an partial spec of both hardware and software.
    • This method is applicable for any kind of process you want to run, whether it’s a python script, a terminal command, or a “good morning” message.
      It will probably work with most things but is not appropriate for all use cases.
    • The October 2023 Raspberry Pi “Bookworm” OS
      That should have been on page one.
    • Wayfire and Wayland instead of X11 and Mutter
      Inconsitent ordering. Wayland replaces X11, Wayfire replaces Mutter so "Wayland and Wayfire instead of X11 and Mutter".
    • X11 and Mutter
      Are you sure about that - my understanding was it uses X11 and LXDe. I could be wrong here though.
    • Because of this, almost all the old guides/solutions with regards to troubleshooting won’t be very helpful. Thankfully, the newer version process is still very easy to do, as will be shown in this section
      Only the old method invoing the autostart file(s) is non-functional. Other methods still work.
  • Page 3:
    • bloviating
      ????
    • stored in the following directory for ease of explanation: /home/<type_user_here>/Documents/<type_file_here.py>
      That's a file not a directory. The directory would be /home/<type_user_here>/Documents/
    • To run a command on startup, we’re going to edit the wayfire.ini file using the following command in the terminal:
      sudo nano ~/.config/wayfire.ini
      The sudo command gives us root permissions
      No, No, No. Absolutely not. Sudo is not required and should not be used here. wayfire.ini should be owned by your user, should have the same primary group as your user and only read permission for group and other.
    • and the nano command lets us edit the file we have pathed to
      We haven't "pathed" anywhere. We've told nano which file to open.
  • Page 4:
    • No mention that the [autostart] section may already exist.
    • No mention that "<type_any_name>" must be unique with that wayfire.ini.
    • sudo reboot
      A reboot is not required. Just logout of the desktop and back in.
  • Page 5:
    • Executing Multiple Prompts
      They're not prompts, they're commands or programs.
    • I also have code to run a shell script with a python environment
      • Shell scripts don't need python environments. If that shell script activates a python venv then runs a python program there are other way of achieving this.
      • There's no real need to explain what the shell script does.
    • any command you want to run, you can run
      Not quite any. Usual security and $PATH restrictions apply. Use of some commands would be very ill advised.
  • General:
    • You never explain what "<" and ">" mean. Someone unfamiliar with that particular convetion may assume they are required.
    • Both hyperlinks and "what my substitutes are for the non-bold code" are underlined.

Statistics: Posted by thagrol — Fri May 31, 2024 10:20 pm



Viewing all articles
Browse latest Browse all 3893

Trending Articles