So, I have seen some other answers out there on similar questions, and I think I'm getting closer to an answer on my specific question. However, none of the answers I've seen are exactly what I need just yet.
So, I know that you can load things at login for the fish shell in ~/.config/fish/config.fish
However, I was wanting to run this specific thing at login to the x environment (xfce for me):
# Rclone mount
if status is-interactive
if test -s /run/media/greg/Files/Dropbox/
if ping -qc 1 -W 3 1.1.1.1 > /dev/null
rclone mount --daemon Dropbox:/ /run/media/greg/Files/Dropbox/
else
echo "Dropbox was not successfully mounted"
end
end
end
It works likes this:
- If the folder in question is empty (test)
- If you can ping out to the world (1.1.1.1)
- Mount configured drive to location (Dropbox)
- Or echo it was not mounted
This appears to work when I open a terminal on the desktop (with the is-interactive
line or not), but I've tried other ways to get it to automount this drive when I gain access to the desktop and none have worked yet.
Does anyone have a simple solution to this problem?
Thanks all!