Is there a way to create a key binding that would allow me to mount my googledrive?











2















I was wondering is if there's a way to mount/unmount my google drive with a key binding without having to open a terminal.



I've opened the keyboard app and tried a few things with Application Shortcuts but nothing seems to work. Every command I've attached to my desired keybinding does nothing at all. Maybe I'm not using the correct command?









share















locked by Thomas Ward 7 hours ago


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.



















  • What command did you run?

    – Jacob Vlijm
    yesterday











  • At first just google-drive-ocamlfuse, which I realized was dumb. Then I tried google-drive-ocamlfuse ~/googledrive, which I thought would work, but did not. Then sudo google-drive-ocamlfuse ~/googledrive, just to see, maybe? Nope. I even tried su $<myusername> -l -c "google-drive-ocamlfuse -label $1 $*" in vain. I wasn't holding out hope for that one.

    – poutingcavity
    yesterday











  • Come on people, off topic? Seriously?

    – Jacob Vlijm
    12 hours ago






  • 1





    @poutingcavity FYI, Gallium is off-topic. However, the question being non-specific to that distribution makes it on-topic here and is useful to Ubuntu. For future use, if you have questions specific to another distribution, please ask on unix.stackexchange.com Also, please be mindful that on Ask Ubuntu you will receive only answers that can be solved with Ubuntu tools and that apply to Ubuntu (portable APIs and POSIX-compliant scripts are being exception).

    – Sergiy Kolodyazhnyy
    8 hours ago






  • 1





    @dessert The issue is relevant to Ubuntu and can be done with Ubuntu tools, and solutions can be done on Ubuntu. Sure OP asked initially about Gallium, however it's not specific to Gallium OS. It's a beneficial question for our environment so it can stay here.

    – Sergiy Kolodyazhnyy
    8 hours ago
















2















I was wondering is if there's a way to mount/unmount my google drive with a key binding without having to open a terminal.



I've opened the keyboard app and tried a few things with Application Shortcuts but nothing seems to work. Every command I've attached to my desired keybinding does nothing at all. Maybe I'm not using the correct command?









share















locked by Thomas Ward 7 hours ago


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.



















  • What command did you run?

    – Jacob Vlijm
    yesterday











  • At first just google-drive-ocamlfuse, which I realized was dumb. Then I tried google-drive-ocamlfuse ~/googledrive, which I thought would work, but did not. Then sudo google-drive-ocamlfuse ~/googledrive, just to see, maybe? Nope. I even tried su $<myusername> -l -c "google-drive-ocamlfuse -label $1 $*" in vain. I wasn't holding out hope for that one.

    – poutingcavity
    yesterday











  • Come on people, off topic? Seriously?

    – Jacob Vlijm
    12 hours ago






  • 1





    @poutingcavity FYI, Gallium is off-topic. However, the question being non-specific to that distribution makes it on-topic here and is useful to Ubuntu. For future use, if you have questions specific to another distribution, please ask on unix.stackexchange.com Also, please be mindful that on Ask Ubuntu you will receive only answers that can be solved with Ubuntu tools and that apply to Ubuntu (portable APIs and POSIX-compliant scripts are being exception).

    – Sergiy Kolodyazhnyy
    8 hours ago






  • 1





    @dessert The issue is relevant to Ubuntu and can be done with Ubuntu tools, and solutions can be done on Ubuntu. Sure OP asked initially about Gallium, however it's not specific to Gallium OS. It's a beneficial question for our environment so it can stay here.

    – Sergiy Kolodyazhnyy
    8 hours ago














2












2








2


1






I was wondering is if there's a way to mount/unmount my google drive with a key binding without having to open a terminal.



I've opened the keyboard app and tried a few things with Application Shortcuts but nothing seems to work. Every command I've attached to my desired keybinding does nothing at all. Maybe I'm not using the correct command?









share
















I was wondering is if there's a way to mount/unmount my google drive with a key binding without having to open a terminal.



I've opened the keyboard app and tried a few things with Application Shortcuts but nothing seems to work. Every command I've attached to my desired keybinding does nothing at all. Maybe I'm not using the correct command?







command-line mount keyboard shortcut-keys google-drive





share














share












share



share








edited 8 hours ago









Sergiy Kolodyazhnyy

71.7k9147313




71.7k9147313










asked yesterday









poutingcavitypoutingcavity

155




155




locked by Thomas Ward 7 hours ago


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.









locked by Thomas Ward 7 hours ago


This post has been locked while disputes about its content are being resolved. For more info visit meta.


Read more about locked posts here.















  • What command did you run?

    – Jacob Vlijm
    yesterday











  • At first just google-drive-ocamlfuse, which I realized was dumb. Then I tried google-drive-ocamlfuse ~/googledrive, which I thought would work, but did not. Then sudo google-drive-ocamlfuse ~/googledrive, just to see, maybe? Nope. I even tried su $<myusername> -l -c "google-drive-ocamlfuse -label $1 $*" in vain. I wasn't holding out hope for that one.

    – poutingcavity
    yesterday











  • Come on people, off topic? Seriously?

    – Jacob Vlijm
    12 hours ago






  • 1





    @poutingcavity FYI, Gallium is off-topic. However, the question being non-specific to that distribution makes it on-topic here and is useful to Ubuntu. For future use, if you have questions specific to another distribution, please ask on unix.stackexchange.com Also, please be mindful that on Ask Ubuntu you will receive only answers that can be solved with Ubuntu tools and that apply to Ubuntu (portable APIs and POSIX-compliant scripts are being exception).

    – Sergiy Kolodyazhnyy
    8 hours ago






  • 1





    @dessert The issue is relevant to Ubuntu and can be done with Ubuntu tools, and solutions can be done on Ubuntu. Sure OP asked initially about Gallium, however it's not specific to Gallium OS. It's a beneficial question for our environment so it can stay here.

    – Sergiy Kolodyazhnyy
    8 hours ago



















  • What command did you run?

    – Jacob Vlijm
    yesterday











  • At first just google-drive-ocamlfuse, which I realized was dumb. Then I tried google-drive-ocamlfuse ~/googledrive, which I thought would work, but did not. Then sudo google-drive-ocamlfuse ~/googledrive, just to see, maybe? Nope. I even tried su $<myusername> -l -c "google-drive-ocamlfuse -label $1 $*" in vain. I wasn't holding out hope for that one.

    – poutingcavity
    yesterday











  • Come on people, off topic? Seriously?

    – Jacob Vlijm
    12 hours ago






  • 1





    @poutingcavity FYI, Gallium is off-topic. However, the question being non-specific to that distribution makes it on-topic here and is useful to Ubuntu. For future use, if you have questions specific to another distribution, please ask on unix.stackexchange.com Also, please be mindful that on Ask Ubuntu you will receive only answers that can be solved with Ubuntu tools and that apply to Ubuntu (portable APIs and POSIX-compliant scripts are being exception).

    – Sergiy Kolodyazhnyy
    8 hours ago






  • 1





    @dessert The issue is relevant to Ubuntu and can be done with Ubuntu tools, and solutions can be done on Ubuntu. Sure OP asked initially about Gallium, however it's not specific to Gallium OS. It's a beneficial question for our environment so it can stay here.

    – Sergiy Kolodyazhnyy
    8 hours ago

















What command did you run?

– Jacob Vlijm
yesterday





What command did you run?

– Jacob Vlijm
yesterday













At first just google-drive-ocamlfuse, which I realized was dumb. Then I tried google-drive-ocamlfuse ~/googledrive, which I thought would work, but did not. Then sudo google-drive-ocamlfuse ~/googledrive, just to see, maybe? Nope. I even tried su $<myusername> -l -c "google-drive-ocamlfuse -label $1 $*" in vain. I wasn't holding out hope for that one.

– poutingcavity
yesterday





At first just google-drive-ocamlfuse, which I realized was dumb. Then I tried google-drive-ocamlfuse ~/googledrive, which I thought would work, but did not. Then sudo google-drive-ocamlfuse ~/googledrive, just to see, maybe? Nope. I even tried su $<myusername> -l -c "google-drive-ocamlfuse -label $1 $*" in vain. I wasn't holding out hope for that one.

– poutingcavity
yesterday













Come on people, off topic? Seriously?

– Jacob Vlijm
12 hours ago





Come on people, off topic? Seriously?

– Jacob Vlijm
12 hours ago




1




1





@poutingcavity FYI, Gallium is off-topic. However, the question being non-specific to that distribution makes it on-topic here and is useful to Ubuntu. For future use, if you have questions specific to another distribution, please ask on unix.stackexchange.com Also, please be mindful that on Ask Ubuntu you will receive only answers that can be solved with Ubuntu tools and that apply to Ubuntu (portable APIs and POSIX-compliant scripts are being exception).

– Sergiy Kolodyazhnyy
8 hours ago





@poutingcavity FYI, Gallium is off-topic. However, the question being non-specific to that distribution makes it on-topic here and is useful to Ubuntu. For future use, if you have questions specific to another distribution, please ask on unix.stackexchange.com Also, please be mindful that on Ask Ubuntu you will receive only answers that can be solved with Ubuntu tools and that apply to Ubuntu (portable APIs and POSIX-compliant scripts are being exception).

– Sergiy Kolodyazhnyy
8 hours ago




1




1





@dessert The issue is relevant to Ubuntu and can be done with Ubuntu tools, and solutions can be done on Ubuntu. Sure OP asked initially about Gallium, however it's not specific to Gallium OS. It's a beneficial question for our environment so it can stay here.

– Sergiy Kolodyazhnyy
8 hours ago





@dessert The issue is relevant to Ubuntu and can be done with Ubuntu tools, and solutions can be done on Ubuntu. Sure OP asked initially about Gallium, however it's not specific to Gallium OS. It's a beneficial question for our environment so it can stay here.

– Sergiy Kolodyazhnyy
8 hours ago










1 Answer
1






active

oldest

votes


















5














Short answer:



Mounting



/bin/bash -c "google-drive-ocamlfuse ~/path/to/foldershowinggoogledrive"


where path/to/foldershowinggoogledrive is the path relative to your homedir.



e.g. /home/you/googledrive -> ~/googledrive



No need for sudo!



Unmounting



Similarly, to unmount, if you use ~, you should use in a shortcut:



/bin/bash -c "fusermount -u ~/relative/mountpount"


Or if you use absolute path:



fusermount -u /absolute/path/to/mountpoint


Why /bin/bash -c?



You could use



google-drive-ocamlfuse /absolute/path/to/folder


but since you are using ~, you need the expansion handled by bash.





share


























  • Nope, still nothing. Hmmm... What could I be doing wrong?

    – poutingcavity
    yesterday











  • @poutingcavity It works, you must be doing something wrong, you created the folder, right?

    – Jacob Vlijm
    yesterday













  • @poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

    – Jacob Vlijm
    yesterday











  • HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

    – poutingcavity
    yesterday






  • 1





    @JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

    – Sergiy Kolodyazhnyy
    yesterday


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














Short answer:



Mounting



/bin/bash -c "google-drive-ocamlfuse ~/path/to/foldershowinggoogledrive"


where path/to/foldershowinggoogledrive is the path relative to your homedir.



e.g. /home/you/googledrive -> ~/googledrive



No need for sudo!



Unmounting



Similarly, to unmount, if you use ~, you should use in a shortcut:



/bin/bash -c "fusermount -u ~/relative/mountpount"


Or if you use absolute path:



fusermount -u /absolute/path/to/mountpoint


Why /bin/bash -c?



You could use



google-drive-ocamlfuse /absolute/path/to/folder


but since you are using ~, you need the expansion handled by bash.





share


























  • Nope, still nothing. Hmmm... What could I be doing wrong?

    – poutingcavity
    yesterday











  • @poutingcavity It works, you must be doing something wrong, you created the folder, right?

    – Jacob Vlijm
    yesterday













  • @poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

    – Jacob Vlijm
    yesterday











  • HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

    – poutingcavity
    yesterday






  • 1





    @JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

    – Sergiy Kolodyazhnyy
    yesterday
















5














Short answer:



Mounting



/bin/bash -c "google-drive-ocamlfuse ~/path/to/foldershowinggoogledrive"


where path/to/foldershowinggoogledrive is the path relative to your homedir.



e.g. /home/you/googledrive -> ~/googledrive



No need for sudo!



Unmounting



Similarly, to unmount, if you use ~, you should use in a shortcut:



/bin/bash -c "fusermount -u ~/relative/mountpount"


Or if you use absolute path:



fusermount -u /absolute/path/to/mountpoint


Why /bin/bash -c?



You could use



google-drive-ocamlfuse /absolute/path/to/folder


but since you are using ~, you need the expansion handled by bash.





share


























  • Nope, still nothing. Hmmm... What could I be doing wrong?

    – poutingcavity
    yesterday











  • @poutingcavity It works, you must be doing something wrong, you created the folder, right?

    – Jacob Vlijm
    yesterday













  • @poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

    – Jacob Vlijm
    yesterday











  • HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

    – poutingcavity
    yesterday






  • 1





    @JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

    – Sergiy Kolodyazhnyy
    yesterday














5












5








5







Short answer:



Mounting



/bin/bash -c "google-drive-ocamlfuse ~/path/to/foldershowinggoogledrive"


where path/to/foldershowinggoogledrive is the path relative to your homedir.



e.g. /home/you/googledrive -> ~/googledrive



No need for sudo!



Unmounting



Similarly, to unmount, if you use ~, you should use in a shortcut:



/bin/bash -c "fusermount -u ~/relative/mountpount"


Or if you use absolute path:



fusermount -u /absolute/path/to/mountpoint


Why /bin/bash -c?



You could use



google-drive-ocamlfuse /absolute/path/to/folder


but since you are using ~, you need the expansion handled by bash.





share















Short answer:



Mounting



/bin/bash -c "google-drive-ocamlfuse ~/path/to/foldershowinggoogledrive"


where path/to/foldershowinggoogledrive is the path relative to your homedir.



e.g. /home/you/googledrive -> ~/googledrive



No need for sudo!



Unmounting



Similarly, to unmount, if you use ~, you should use in a shortcut:



/bin/bash -c "fusermount -u ~/relative/mountpount"


Or if you use absolute path:



fusermount -u /absolute/path/to/mountpoint


Why /bin/bash -c?



You could use



google-drive-ocamlfuse /absolute/path/to/folder


but since you are using ~, you need the expansion handled by bash.






share













share


share








edited yesterday

























answered yesterday









Jacob VlijmJacob Vlijm

64.2k9126221




64.2k9126221













  • Nope, still nothing. Hmmm... What could I be doing wrong?

    – poutingcavity
    yesterday











  • @poutingcavity It works, you must be doing something wrong, you created the folder, right?

    – Jacob Vlijm
    yesterday













  • @poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

    – Jacob Vlijm
    yesterday











  • HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

    – poutingcavity
    yesterday






  • 1





    @JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

    – Sergiy Kolodyazhnyy
    yesterday



















  • Nope, still nothing. Hmmm... What could I be doing wrong?

    – poutingcavity
    yesterday











  • @poutingcavity It works, you must be doing something wrong, you created the folder, right?

    – Jacob Vlijm
    yesterday













  • @poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

    – Jacob Vlijm
    yesterday











  • HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

    – poutingcavity
    yesterday






  • 1





    @JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

    – Sergiy Kolodyazhnyy
    yesterday

















Nope, still nothing. Hmmm... What could I be doing wrong?

– poutingcavity
yesterday





Nope, still nothing. Hmmm... What could I be doing wrong?

– poutingcavity
yesterday













@poutingcavity It works, you must be doing something wrong, you created the folder, right?

– Jacob Vlijm
yesterday







@poutingcavity It works, you must be doing something wrong, you created the folder, right?

– Jacob Vlijm
yesterday















@poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

– Jacob Vlijm
yesterday





@poutingcavity wait, you do know that with ~, you are in the home directory, right? so path/to/foldershowinggoogledrive should then be relative to your homedir.

– Jacob Vlijm
yesterday













HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

– poutingcavity
yesterday





HAH! It worked. I'm not sure why it didn't before. But it worked. THANK YOU! Should I just use fusermount -u ~/googledrive in Application Shortcuts for unmount?

– poutingcavity
yesterday




1




1





@JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

– Sergiy Kolodyazhnyy
yesterday





@JacobVlijm You might want to consider adding fusermount as alternative command as well so that people see it in the answer instead of the comments (which are much easier deleted or moved to chats than answers themselves)

– Sergiy Kolodyazhnyy
yesterday



Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

Origin of the phrase “under your belt”?