Dane Kouttron
Quick Tutorial: Google Drive on LinuxcncRunning Google Drive on Linuxcnc 2.8.4 without GNOME using google-drive-ocamlfuseMaking those 'quick' cnc file updates more seamless on linuxcnc |
||||||||||||||
I've previously used Dropbox for transferring files to my LinuxCNC 3xais rig, but ran into issues with Dropbox discontinuing support for Linux. This is, incredibly annoying. Linux CNC purposely chooses a lightweight desktop client and limited extra bundled in software, as its unlikely you're going to be live transcoding HD video footage or gaming while you're operating a CNC. As such the XFCE desktop was chosen over GNOME, its much more lightweight. There are two options for using google drive: Option 1:
Option 2:
If you're like me you'd prefer to not significantly modify your working CNC machine, lest ye enter the sea of sharks. Note this doesn't work and I'm including it as a reference, if you want the working procedure jump down the page [link] : First up, lets update and install the associated ppa for the github project. By adding a PPA it is telling your machine 'hey you can get updates from here'
After an update, then adding the repository I'm rewarded with:
Excuse Me? add-apt-repository should be pretty basic, it looks like its contained in the package 'software-properties-common' so lets install that first, then try installing the ppa And you get a "there's no release candidate error". This indicates your Linux version isn't directly supported, this seems odd as this is a 2020 OS build of Debian, not some artifact from 1992. A working install process for XFCE: Installing from Deb FileLets just find the pre-packaged deb file and install that directly. Here's the repository [link] If you're doing this via a remote terminal, you can grab the file and save it using wget. wget is a common tool for grabbing individual files or even copying entire websites. Comically wget is not installed by default, so lets install it. Lets use wget to grab the installation package and save it locally. Note I am in the /Downloads folder which you can cd to from your home directory. For my particular machine (x64 amd computer) I am grabbing google-drive-ocamlfuse_0.7.27-0ubuntu18.04.1_amd64.deb found here: Ok, lets grab it Now we can install from this file, all we need to do is a sudo apt install ./ (file name) Huzzah! We installed and it didn't throw a pile of errors. Lets go over to the CNC and give it a run for the first time. Note that launching from a remote terminal (for example running from Putty in windows, this is going to want to open a browser and sort out authenticating, which is not possible over just terminal. At your cnc machine just type in: Its happening! You should get a browser request to login and provide permissions. For the purposes of this project I used a non-primary google account (a development account I use for app-testing). I signed in and allowed google-drive-ocamlfuse access to my google drive. Lets give it a test run to make sure it 'works'. First off lets make a symlink to a location on your machine. I made this simlink on the desktop.This is not a file / folder its just a location. Finally we point google-drive-ocamlfuse to the 'gdrive' symlink LETS GO! Here's our drive, we can mount it open it save files and copy things back and forth, so long as that terminal is still open. Ok now how do we tell this to auto-mount on system start. How does it deal with loss of network (does it boot if ethernet is unplugged). This step was way more involved than i thought it would be. My initial plot was to have a 'launcher' on the desktop run 'google-drive-ocamlfuse ~/gdrive/. hahah no that does not work it throws an authentication error. I'm not the only one who ran into this though, we have some help from the ether [link]. Jump to "Mount using fstab with no password required" We're gonna make a small C program that runs on boot that handles mounting the directory. Yes this is getting ridiculous. Start by making a file called google-drive-ocamlfuse-mounter.c I was in the /Documents folder but this can be anywhere Paste in the following to that file. Compile it, and give it permissions Point it at the directory we made earlier. Note my username is linuxcnc, plug in whatever your username is here Lets doublecheck our UID and GID. Type in id and the UID and GID are printed out. They should both be 1000 if they are showing anything different just edit the fstab line below to indicate the difference Last up we edit /etc/fstab: Video time! it works even after re-start.Concluding Remarks:
Have you noticed that there are no
advertisements or ridiculous pop ups?
|
Post your comments! |
Comment Box loading
|