Run command at startup, Fedora 25

what is the output of "ls -la /etc/systemd/system/"

@infigo

You could put the commands in .bash_profile in your home folder. Commands there are run upon logging in.

This:

try this

"sudo systemctl enable /etc/systemd/system/startup.service"

nope.
"Failed to enable unit: Invalid argument"
Again

try removing the "After=" part

then I get:
Failed to enable unit: Invalid argument
Wait...

On the service file add the option User= and (if needed) Group= with the user and group if needed, add it under the [Service] section.

Since your trying to use sudo in the script it sounds like you want it to run as root. You can remove sudo from the script.

you can use journalctl or systemctl status [service] to see more info on whats up with it.

Is your bash script exactly what it is? If so, your first line needs fixed, /bin/bash not /bin/bas

3 Likes

Well the h was missed. Good call but it is still not working.
No errors at least anymore and when i run -la on systemd/system startup.service does show up now

cat /sys/devices/platform/i8042/serio1/serio2/speed will comfirm it took.

nope it is on 97.
But if I run the command manually and it goes to 225 as I want it

Well Fedora didn't work out for me.... for now. Did not get my script work and did not bother get h264 to work as well but some day I will come back.
Ubuntu with gnome 3 instead (because I know that works)

This is the correct answer.

You can specify user=whoever in the [Unit] section to change the user it runs as.

3 Likes

Whats the difference? systemd on both right?

Nahh I can just put the two commands straight into rc.local and be done with that. Maybe not the most proper way but I want the trackpoint to work directly.
Will probably try to run fedora again this fall but for now ubuntu will do just fine

Tried and did not get it to work

Sorry to hear that. I would be happy to help if you're still trying to find a solution.

Will do.
I would like to use fedora since it is different from what everyone I know use (they use kali, arch and ubuntu) and it has some awesome features
But that is for another time

1 Like

Is that an honest mistake or is your shell scrpti missing a h?

should be #!/bin/bash

I know I'm being picky but there seem to be grammatical errors both in the script and in the startup.service, This could be a simple fix. I have been on/off of this thread due to work, but over a coffee I looked over the thread and saw the 'possible' mistakes. Can you confirm?

That is already fixed
And the spelling on the description I didn't bother to change since it is a description

I got ubuntu installed now.
But if you see something else wrong so please tell so I can get it to work next time

For info, that's ffmpeg-libs if memory serves me. It's in the rpmfusion repos.

1 Like