How to upload pictures to Picasa from Ubuntu in simple right-click

GoogleCL is a project intended to access Google services from Linux command line. Uploading the pictures to Picasa Web Album is one such service. Though the intention of this project is to make the services easily accessible from command line, I have written a simple GUI wrapper script to make this service available from GUI also. Here is how to get it installed.

Step-1. Installing the GoogleCL

Visit GoogleCL Download and download the latest .deb package file.

Install the package by double clicking the downloaded file or through command line (sudo dpkg -i googlecl_*.deb).

Step-2. One time Authentication of desktop

Now your desktop machine needs to get authenticated by Google (one time process) as part of initial configuration. To do this I am trying to list down my photos in Picasa. Then googlecl asks for my Picasa user name and provides a URL. Next I have to visit this URL in browser (by copying the link in GNOME Terminal) and Grant Access to this desktop. That is it. I have given below these steps in my machine.

(a) Enter “google picasa list” command and entering the user name

$ google picasa list
Did not find config / preferences file at /home/blackgod/.googlecl/config
… making new one.
Please specify user: <your-picasa-user-name>
(b) Google creates a authentication page and provides URL for the same.
(Hint: You can automatically launch your browser by adding “auth_browser = <browser>” to your config file under the GENERAL section, or define the BROWSER environment variable.)
Please log in and/or grant access via your browser at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2F4buv14DLANINMkldfsLDHW then hit enter.
(c) Visiting the URL in browser and click “Grant Access”

Grant Access to your desktop from Browser

(d) Back to Terminal and hit enter to get the list of photos in your Picasa.
IMG_0268.JPG,http://picasaweb.google.com/xxxxxxxxx/DropBox?authkey=sdkfsdfkshfksfzNifdgMA#538656249534598422435
lego_robot.JPG,http://picasaweb.google.com/xxxxxxxxx/DropBox?authkey=KDHefjjfoeDKHSKSsjndsf#39849343983785875
- – - – - – - – - – - – - -
- – - – - – - – - – - – - -
- – - – - – - – - – - – - -

Now we are ready to access Picasa from Command line.

Step-3. Creating album and uploading files from command line

Here is how to create a album called “Web Cam” using the Pictures in “Web Cam” directory.

google picasa create --title "Web Cam" "Web Cam/*.jpg"

Step-4. Uploading the album from File manager

The same can be done through File manager in Ubuntu (Nautilus). I have written a simple nautilus script to do this task. Download the below script and copy this to .gnome2/nautilus-scripts directory in your home directory. Ensure that the script has executable permission (chmod +x “Upload to Picasa”)

  Upload_to_Picasa (801 bytes, 65 hits)

Now go to File manager and select directory which you want to upload -> Scripts -> Upload to Picasa. Another way is to right click the file manager pan within the directory which you want to upload.

Selecting a dictionary -> Scripts -> Upload to Picasa (Click to enlarge)

Right click within folder -> Scripts -> Upload to Picasa (Click to enlarge)

Once selected “Upload to Picasa”, you will get Desktop notification bubble saying that your album is being uploaded in background.

Album is being uploaded notification

Once album upload is successful or failure, again you will get notification.

Album upload status update notification

I believe this script will be very useful. You are welcome to enhance this script for other tasks in Picasa and other services in Google.





More posts in this category


3 Comments on “How to upload pictures to Picasa from Ubuntu in simple right-click”

You can track this conversation through its atom feed.

  1. stomp_stompclap says:

    hello, excellent hack you created. I love this idea and how it simplifies the process.

    However, step 3
    google picasa create –title “Web Cam” “Web Cam/*.jpg”

    kept giving me the following error:
    Loading file 1000words/*.jpg to album 1000words
    Failed to upload 1000words/*.jpg. (601: Found , not path name or object with a .read() method)

    until I removed the quotation marks on the last argument. After that, it worked.

    thanks for this tutorial!

    1. Black God says:

      Hi stomp_stompclap,

      Thanks for the comment. I have corrected the quotation marks issue. It seems to be I have to use proper quotation mark html notation to publish in blog.

  2. Black God says:

    Hi tropicflite,

    Argument “title” should be prefixed with two hyphens. Can you try it out?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

RSSSubscribe to Comments on this post



Educate Elevate!

Well said!

If you have to gain all these other "soft skills" or business skills in order to just be a regular software engineer, then why keep working for someone else? One of the main reasons for being an employee is because it's (supposed to be) both easier and safer than striking out on your own. Instead of long hours and having to wear many hats, you can just concentrate on your own skill, and leave the business stuff to the people who specialize in that. Anyone familiar with the idea of specialized labor should understand this. The downside is (supposed to be) your pay is lower than it could potentially be by owning and operating your own business. If today's corporations want their regular rank-and-file employees to wear many hats, be multi-talented, and have a lot of business skills, then they're simply not doing their own jobs correctly. - Grishnakh (Slashdot user)

Archives

Google Page Rank

Creative Commons License
Black God by KaruppuSwamy Thangaraj is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at www.karuppuswamy.com.
Permissions beyond the scope of this license may be available here