this post was submitted on 29 Mar 2025
14 points (100.0% liked)

Linux

6786 readers
189 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of [email protected] and The GIMP

founded 2 years ago
MODERATORS
14
submitted 2 days ago* (last edited 1 day ago) by [email protected] to c/[email protected]
 

SOLVED If any lost souls find themselves here in a similar situation let it be known that the file that worked for me was creating a file at '%h/.config/systemd/user/google-drive-ocamlfuse.service' with the following content:

[Unit]
Description=FUSE filesystem over Google Drive
After=network.target

[Service]
ExecStart=google-drive-ocamlfuse %h/googledrive
ExecStop=fusemount -u %h/googledrive
Restart=always
RestartSec=300
Type=forking

[Install]
WantedBy=default.target

Howdy, I have very recently installed Opensuse Tumbleweed alongside Windows 10 (On a seperate drive) and am trying to get things setup to where I can fully transition to linux. One of the first things I have hit a wall on is getting a file to execute on boot using systemd.

I am trying to use this package to be able to access my google drive from Dolphin. And so far it works okay. Except that it doesn't survive a reboot. I have to run the command:

google-drive-ocamlfuse ~/googledrive

after each reboot in order for the google drive directories to be accessible. So I googled how to make that happen automagically on boot and found this guide that helped me get a startup script going.

I created /usr/local/bin/ocamlfuseStartup.sh as a file that contains the command from before:

google-drive-ocamlfuse ~/googledrive

and verified that it works as intended when I enter ./ocamlfuseStartup.sh from that directory.

I then created another file at /usr/lib/systemd/system/startup.service that contains the following:

[Unit]
Description=Startup Script

[Service]
ExecStart=/bin/bash /usr/local/bin/ocamlfuseStartup.sh

[Install]
WantedBy=multi-user.target

I have no idea what the /bin/bash portion is for because I found it from a googling but without it I get the following error:

startup.service: Main process exited, code=exited, status=203/EXEC

However with it I get this error:

startup.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

which I take to mean that there is something wrong with my ocamlfuseStartup.sh file maybe? But since it works when I manually execute the file I'm kind of at a loss.

I found this thread where it seemed like someone else was having a similar issue but I didn't really grok what they were talking about.

Any and all help is greatly appreciated!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 2 days ago

Oh, and further down, there's a way with systemd instead.