I need to run the command sudo vulkaninfo
each time the system starts up (I know how to do it when system wakes up from sleep, i.e. in /usr/lib/pm-utils/sleep.d/somescript
). This command should be global, so all users will run this command at startup. I tried adding a script to profile.d under /etc/profile.d, but that resulted in me not being able to login. rc.local is only local, so that will not work. What options do I have?
Edit: I need to be able to do this from a terminal, as I am creating a script that automates my system setup, so programs will not work. So for example I need a command that can create the file, append the command and move the file to where system startup files are located.