How to access Google Drive from Wazaterm

You can use SSHFS to copy files, but it will be convenient if you can access a cloud-based drive. Because SSHFS can only be used on OS bundled with Unix-like OS or VM. For example, if you want to copy the screenshot from your iPad to Wazaterm, you can do it after copying it to your Mac, but it's a bit time-consuming. Also I don't necessarily have a Mac at hand.

FUSE filesystem over Google Drive

Use the FUSE filesystem over Google Drive package.

How to install

$ sudo add-apt-repository ppa:alessandro-strada/ppa
$ sudo apt-get update
$ sudo apt-get install google-drive-ocamlfuse

If you don't have a GUI, like Wazaterm, you need to use the following steps to authenticate.)

$ echo $'#! /bin/sh\necho $* > /dev/stderr' > xdg-open
$ chmod 755 xdg-open
$ PATH=`pwd`:$PATH google-drive-ocamlfuse
$ rm xdg-open

If you click on the link and go through Authentication, you will see a message in the terminal that says Access token retrieved correctly. (I did not check the 30 days one)



$ mkdir gdrive
# mount
$ google-drive-ocamlfuse -headless ~/gdrive/
# umount
$ fusermount -u gdrive

The command is long, so it might be a good idea to set Alias.

# some rc file
alias mountg='google-drive-ocamlfuse -headless ~/gdrive/'
alias umountg='fusermount -u ~/gdrive'