My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
OnlineManual  
Instructions on installing and running google-docs-fs
Featured
Updated Dec 26, 2010 by d38dm8nw81k1ng@gmail.com

Contents

  1. System Requirements
  2. Getting google-docs-fs
  3. Installing
  4. How to use google-docs-fs
  5. Supported Filetypes
  6. How to debug google-docs-fs
  7. FAQ

System Requirements

All Systems

Linux/FreeBSD

  • Fuse - Comes with most Linux distributions. Can be installed on FreeBSD through Ports.

Mac OSX

Getting the latest stable version

The latest stable version can be found in the Downloads section. Select the version appropriate for your operating system.

Download using Mercurial

As of 24th September 2010, I have switched google-docs-fs over to using Mercurial for source control. To get a copy of the source, simply do:

hg clone https://google-docs-fs.googlecode.com/hg/ google-docs-fs

Installing

Linux/FreeBSD

To install google-docs-fs you can simply run the setup.py script from within the untarred directory:

./setup.py install

Install as root/su/sudo if you wish to install for all users.

Debian/Ubuntu

Ubuntu packages are now provided in the Downloads section, along with python-gdata, to make installation easier for Ubuntu users. It is also hosted on Launchpad.

Thanks to Luca Invernizzi for providing the Ubuntu package and python-gdata.

Arch Linux

google-docs-fs is included in AUR.

Thanks to tocer.

Fedora/Cent OS

There are no packages for RPM based distributions. If anyone would like to create an RPM for google-docs-fs and any dependencies I would be happy to host them here.

Mac OSX

There are two ways to install on OSX.

Original Instructions

To install on Mac OSX do the following:

  1. Ensure you have the Mac-specific libraries above installed.
  2. Download fuse-python.
  3. Run the following commands:
  4. sudo cp fuse.pc fuse.bak
    sudo sed -i 's#-I${includedir}/fuse -D_FILE_OFFSET_BITS=64#-I${includedir}/fuse -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64#g' \
    /usr/local/lib/pkgconfig
    sudo mv fuse.pc fuse.fix && sudo mv fuse.bak fuse.pc
  5. Install fuse-python and gdata-python-client.
  6. Download and install google-docs-fs

Thanks to Ben Samuel for this information.

Alternate Instructions

Alternate instructions provided by vucica.

Running

Use the gmount script to mount the file system:

gmount directory email@address.net

To umount the file system just use the gumount script as follows:

gumount directory

Do NOT invoke fusermount -u directly as doing this will not invoke the cleaning up of any leftover temporary files. You can ignore the following error:

rm: cannot remove `/home/x/.google-docs-fs': No such file or directory

as this means that there were no leftover temporary files to clean up.

Supported Filetypes

google-docs-fs supports the Microsoft Office filetypes: .doc .xls and .ppt

If you want to change this, you can directly edit gFile.py stored in either the site-packages or dist-packages of your Python directory. Change all occurrences of the filetypes you want to remove to the filetype of your choice.

google-docs-fs does not support the new feature of Google Docs which allows any file type to be stored. I am looking to add this in future releases.

Debugging

If you experience any problems with google-docs-fs and wish to help me debug it, get the latest SVN revision and see if that works. If it still doesn't, use the -d flag to enable debugging information:

gmount directory email@address.net -d

This will enable debug output in the terminal you are using. Note that you will have to use a different terminal to perform operations on the mounted file system. After you have mounted the file system using this method, perform the task that is giving you errors, then create a new Issue and attach all the output from the debug window. Your help with this is MASSIVELY appreciated =).

FAQ

Please see the FAQ if you have any questions. If your query is not covered there, then feel free to email me.

Comment by DennisSc...@gmail.com, Jun 20, 2010

can someone expand on the Mac OS X help?

In which directory is the cp to be executed? In the /usr/local/lib/pkgconfig? the sed command fails with sed: 1: "/usr/local/lib/pkgconfi ...": extra characters at the end of l command

I have both MacFUSE and pkg-config (0.25) installed

Comment by project member d38dm8nw81k1ng@gmail.com, Jun 26, 2010

My assumption is that it should be executed in the same directory as fuse.pc but I'm not sure.

Comment by ddoli...@gmail.com, Jul 2, 2010

I installed the package on Lucid - it is certainly there, I can see it through Synaptic. Do I need to do anything else? When I run the gmount command I get the following error:

ImportError?: No module named fuse

Comment by ddoli...@gmail.com, Jul 2, 2010

Okay, so I didn't have phython-fuse installed. I do now, and I am not getting any error messages. How do I bring the files from Google Docs (right now the directory is empty)?

Comment by project member d38dm8nw81k1ng@gmail.com, Jul 3, 2010

Hi, the directory should be populated automatically. It might take a short while as sometimes your file manager hogs FUSE when google-docs-fs is mounted.

Comment by i...@glaj-ge.ch, Jul 9, 2010

Some problem with the gmount command:

david@david-laptop:~$ gmount /data/google/ david@codap.org Password: fuse: bad mount point `/data/google/': No such file or directory Traceback (most recent call last):

File "/usr/local/bin/gmount.py", line 7, in <module>
gFile.main()
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 550, in main
gfs.main()
File "/usr/lib/python2.6/dist-packages/fuse.py", line 754, in main
main(d)
fuse.FuseError?: filesystem initialization failed

The directory /data/google exist... so what is the problem ?

David

Comment by wrstone3, Jul 23, 2010

Regarding the issue mentioned above:

The .deb package at least seems to need python-fuse. Installing the package thusly resolved the issue for me:

sudo apt-get install python-fuse
Comment by Clayton....@gmail.com, Aug 16, 2010

If I can't store any file type I want what good is it? Please fix this if at all possible. It's of no use to me or my colleagues without that feature.

Comment by project member d38dm8nw81k1ng@gmail.com, Aug 17, 2010

Hi,

A quick Google gives me this link:

http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingArbitraryFileTypes

It appears you need to have a paid Apps account with Google. Since this is just a hobby project, I don't want to pay for one for testing. The final issue is that support for any file type isn't supported in the stable version of the API (v2.0) and I'm not going to update this to v3.0 until Google "graduate" it from Labs.

I'll put this in as a feature request, and review it at a later date.

Scott W

Comment by scorp.de...@gmail.com, Nov 6, 2010

Some problem with the gmount command:

$ gmount my.user.name@gmail.com ./googlefs/ Password: Traceback (most recent call last):

File "/usr/local/bin/gmount.py", line 7, in <module>
gFile.main()
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 548, in main
usage = usage, dash_s_do='setsingle')
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 95, in init
self.gn = gNet.GNet(em, pw)
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gNet.py", line 44, in init
self.gd_client.ProgrammaticLogin?()
File "/usr/local/lib/python2.6/dist-packages/gdata/service.py", line 793, in ProgrammaticLogin?
raise BadAuthentication?, 'Incorrect username or password'
gdata.service.BadAuthentication?: Incorrect username or password

enter the password correctly. I can not understand what the problem is?

OS ubuntu 10.10 amd_x64 also found python-fuse google-docs-fs-1.0rc1_all.deb and python-gdata_2.0.7-1_all.deb

Comment by project member d38dm8nw81k1ng@gmail.com, Nov 7, 2010

Hi, you're entering it the wrong way around. You should be entering: gmount ./googlefs/ my.user.name@gmail.com

Cheers, Scott W

Comment by trip.and...@gmail.com, Nov 13, 2010

I'm getting the following error when mounting:

File "/usr/bin/gmount.py", line 5, in <module>

from googledocsfs import gFile
File "/usr/lib/python3.1/site-packages/googledocsfs/gFile.py", line 46
self.st_mode = stat.S_IFDIR | 0744
^

Comment by luca.cl...@gmail.com, Nov 14, 2010

Just installed the version 1.0rc1-1, including the latest python bindings. However this is what I get:

luca@luca-desktop:~$ gmount directory email@address.net -d Traceback (most recent call last):

File "/usr/local/bin/gmount.py", line 5, in <module>
from googledocsfs import gFile
ImportError?: No module named googledocsfs

I saw this is similar to another user in the past (issue closed) but I could not find a similar directory in my filesystem... Of course I tried with different options substituting the words "directory" and the email account.

Thanks for your help! Luca

Comment by project member d38dm8nw81k1ng@gmail.com, Nov 14, 2010

trip: It seems your problem is arising from using Python 3.x. I've never tested against Python 3. Try running the code through the Python 2 to 3 converter and see if you get any problems.

Comment by luca.cl...@gmail.com, Nov 15, 2010

I don't know if the last comment was addressed to me. I have Python 2.5, not 3.0... :(

Comment by ken...@ryatta.com, Nov 27, 2010

Any idea on why it fails are readlink? Thank you.

readlink: illegal option -- f usage: readlink [-n] ...? usage: dirname path /usr/local/bin/gmount: line 4: /gmount.py: No such file or directory

Comment by project member d38dm8nw81k1ng@gmail.com, Dec 1, 2010

Hi, I didn't implement readlink, or any link-related capability. This is probably why it doesn't work and simply returns a cryptic error.

Comment by javier.b...@gmail.com, Dec 7, 2010

Hi, im getting the same problem that you answered by november 07, i used this command: gmount /Documents/GDocs user.name@gmail.com

Im using ubuntu 10.04, and python-fuse google-docs-fs-1.0rc1_all.deb and python-gdata_2.0.7-1_all.deb

thanks

Comment by nickcl...@gmail.com, Dec 14, 2010

I was having some of the same issues, with the bad mount point thingy, so such file or directory, and then at the end it claims bad password. I used "gmount ./Documents/GDocs username@gmail.com" but first created the directory. In other words, I made a folder under Documents named "GDocs" then ran the above command, it asked my passowrd, and was done. Two minutes later and I have it mounted.

Any way I can speed this up? Its really nice and handy, but painfully slow. Thanks, and great work!

Comment by rogere84, Feb 9, 2011

I've got about 12gb of data on Google Docs, when I open the Directory to see the main Google Docs folder, I only see 2 of my collections, when in reality I have 12?

Should I log this?

Comment by pellegri...@gmail.com, Feb 24, 2011

tnks for this guide:-) But I try to use but I think that i have make some command wrong cause don't start with this error:

Traceback (most recent call last):

File "/usr/bin/gmount.py", line 7, in <module>
gFile.main()
File "/usr/lib/python2.7/site-packages/googledocsfs/gFile.py", line 548, in main
usage = usage, dash_s_do='setsingle')
File "/usr/lib/python2.7/site-packages/googledocsfs/gFile.py", line 95, in init
self.gn = gNet.GNet(em, pw)
File "/usr/lib/python2.7/site-packages/googledocsfs/gNet.py", line 44, in init
self.gd_client.ProgrammaticLogin?()
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 793, in ProgrammaticLogin?
raise BadAuthentication?, 'Incorrect username or password'
gdata.service.BadAuthentication?: Incorrect username or password

i have use the command: sudo gmount /media/googledocs/ myaccount@gmail.com but where i have to insert the password? it is probably here the problem but i dont know how can i solve.. tnks for now :-)

Comment by project member d38dm8nw81k1ng@gmail.com, Feb 24, 2011

Executing that command should give you two password prompts:

  • The first for sudo, which will be your computer's user password.
  • The second will be for Google Docs, which will be your usual Google password.

For about five minutes afterwards, the only password prompt that appears will be for your Google Docs password (as sudo grants permissions for about 5 minutes).

Comment by pellegri...@gmail.com, Feb 24, 2011

Ok tnks I have solve but when I click to icon it said wich program i want to use and if I write nautilus it tell me that it is not a folder...

Comment by Riel.Not...@gmail.com, Feb 25, 2011

If you get the Captcha requirement, you can unlock it for your account here:

https://www.google.com/accounts/DisplayUnlockCaptcha

Comment by Riel.Not...@gmail.com, Feb 25, 2011

Is it possible to add it to a cron job and enter the password in the commandline?

Comment by project member d38dm8nw81k1ng@gmail.com, Feb 25, 2011

Hi, No it's not, because when the password is entered on the command line, it is displayed in the process list. Because of this, I have no plans to add this feature in future. Cheers, Scott W

Comment by lahdekorpi, Mar 1, 2011

"ls: reading directory .: Invalid argument"

unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr /

unique: 2, success, outsize: 120
unique: 3, opcode: ACCESS (34), nodeid: 1, insize: 48
unique: 3, error: -38 (Function not implemented), outsize: 16
unique: 4, opcode: OPENDIR (27), nodeid: 1, insize: 48
unique: 4, success, outsize: 32
unique: 5, opcode: READDIR (28), nodeid: 1, insize: 80 readdir0? from 0 Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 169, in readdir
if file.GetDocumentType?() == 'folder':
AttributeError?: 'DocumentListEntry?' object has no attribute 'GetDocumentType?'
unique: 5, error: -22 (Invalid argument), outsize: 16
unique: 6, opcode: RELEASEDIR (29), nodeid: 1, insize: 64
unique: 6, success, outsize: 16

Comment by christop...@gmail.com, Mar 25, 2011

This is a really cool idea but dosent factor in the new two step authentication. The passwords that are one time generated for app use are too cumbersome for single use. With out a way to use a password stored in the keyring or on the command line. I find im forced to choose between this and 2-step and sadly after having my gmail account hacked you can bet im keeping 2step :( Awesome app though!!!!

Comment by guilo.gu...@gmail.com, Apr 25, 2011

Great soft. But we really should have this working for any file type. Thanks for your work

Comment by seekji...@gmail.com, May 20, 2011

I logged into my google account, and was able to access the file list. However, when I tried to open or cp or do anything with the file, I got an error massage. For example: $ cp abc.doc ../ cp: cannot open abc.doc for reading: Invalid argument What should I do?

Comment by dgtlmen...@gmail.com, Oct 9, 2011

Hi I was wondering if someone could help with this? i google for the problem solution, and Read FAQ, and online manual and still cant figure it out? here is the error:

user@lab1:~$ sudo gmount /home/user/gdocs/google-docs username@gmail.com Traceback (most recent call last):

File "/usr/local/bin/gmount.py", line 5, in <module>
from googledocsfs import gFile
ImportError?: No module named googledocsfs

Thanks in advance for help!

Comment by moosb...@gmail.com, Oct 24, 2011

Hi

Works for me on sqeeze and ubu 11.04 to dtgtlmen http://code.google.com/p/gdata-python-client/

thank you for your work cheers Josef

Comment by miha.zu...@unicca.net, Oct 28, 2011

Hi,

what about this:

Traceback (most recent call last):

File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 200, in readdir
self.setattr(path = p, entry = file)
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 501, in setattr
self.time_convert(entry.published.text.decode(self.codec)),
AttributeError?: 'NoneType?' object has no attribute 'text'
unique: 1313, error: -22 (Invalid argument), outsize: 16
unique: 1320, opcode: READDIR (28), nodeid: 1, insize: 80 readdir0? from 0

I can seen no documents in mount folder. When I do a ls I get "Invalid argument"

Thanks,

mikee

Comment by adrien.l...@gmail.com, Nov 7, 2011

I had the following error :

File "/usr/local/bin/gmount.py", line 5, in <module> from googledocsfs import gFile ImportError??: No module named googledocsfs

I simply did a symbolic link to the right version of python i am using

sudo ln -sf /usr/local/lib/python2.6/dist-packages/googledocsfs/ /usr/local/lib/python2.7/dist-packages/googledocsfs

Comment by RonaldEl...@gmail.com, Nov 21, 2011

I also had the "No module named googledocsfs" error. I tried your symbolic link (I'm a newbie and don't really know anything about that) and, now I get:

Traceback (most recent call last):

File "/usr/local/bin/gmount.py", line 5, in <module>
from googledocsfs import gFile
File "/usr/local/lib/python2.7/dist-packages/googledocsfs/gFile.py", line 30, in <module>
import gNet
File "/usr/local/lib/python2.7/dist-packages/googledocsfs/gNet.py", line 22, in <module>
import gdata.docs.service
ImportError?: No module named gdata.docs.service

Please help if you can. Thanks,

Ron

Comment by j...@herderschee.eu, Nov 26, 2011

Hi,

I just tried to install google-docs-fs and had the same problem. This on linux mint 11 (basically ubuntu with a different gnome configuration) with the .deb.

The .deb installs into /usr/local/lib/python2.6 and mint uses 2.7 by default. You van solve the problem in 2 steps:

1) install python2.6: sudo apt-get install python2.6
2) modify /usr/local/bin/gmount.py so that it uses python2.6:
#!/usr/bin/env python2.6

Than you should be able to run!

Comment by fr....@thechurchofstluke.org, Nov 26, 2011

Hi,

I tried the two step solution from j..@herderschee.eu and it seems to be using python2.6 now. Thanks, but I still got the same ImportError?. Here is the traceback:

Traceback (most recent call last):

File "/usr/local/bin/gmount.py", line 5, in <module>
from googledocsfs import gFile
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gFile.py", line 30, in <module>
import gNet
File "/usr/local/lib/python2.6/dist-packages/googledocsfs/gNet.py", line 22, in <module>
import gdata.docs.service
ImportError?: No module named gdata.docs.service

Any idea what I am doing wrong? By the way, here is the command I use: gmount /home/ron/gdocs me@mysite.org

Thanks,

Ron

Comment by fr....@thechurchofstluke.org, Nov 26, 2011

I may have solved my problem. I googled the error message and discovered that I had to have the google data library installed. I followed the instructions and it must have installed it for Python2.7 not 2.6 because I could run the test programs. I copied atom and gdata folders from Python2.7 to Python2.6 and it seems to work now except that when I try to open a folder in Google Docs it appears to be empty.

Thanks to those who got me oriented toward working with Python2.6

Ron

Comment by dietmar....@gmail.com, Jan 20, 2012

If you get the ImportError??: No module named gdata.docs.service Error, you do not have installed gdata. Just download the gdata-2.0.16.tar.gz untar and type python setup.py install as described in the manual contained within the gdata tar.gz.

Comment by JeremyDa...@gmail.com, Feb 7, 2012

First off, this program is great so thank you for taking the time to create it! I have several gmail accounts, and would like to somehow automount them at startup. Is there a way to do this (This computer is at my house, so I don't mind hardcoding the password if I need to)?

Thanks again,

Jeremy

Comment by an...@afterthoughtsoftware.com, Mar 9, 2012

Has anyone tried to access shared folders? The folders I own are fine, but I see nothing in shared folders.

Thanks, Andy

Comment by milen.ti...@gmail.com, Mar 12, 2012

Andy, there's an open issue for this bug. I've emailed the author with a suggestion to fix this. I think this script is great and a shared folders bug needs to be fixed.


Sign in to add a comment
Powered by Google Project Hosting