Make Dropbox work with multiple OSes / multiple folders

This one’s completely due to my friend Debsankha.
Inquivesta, our science fest website, is a web app hosted via Google App Engine. We, the three developers of the app, use Dropbox to keep our files in sync. This’ll be a short article addressing two obvious issues I faced using the application.

1. How to make Dropbox sync to the same stuff from both Linux and Windows on a dual-boot machine.

The problem I came across while using Dropbox is the following: I have both Ubuntu and Windows installed on my laptop, and use one or the other at times to maintain and update the website. Therefore, it would have been great if I could install Dropbox in both these OSes and sync the same folder from both. I did install it on both OSes, but there was a stupid problem with syncing.

In Windows, when you set the directory in which you want your Dropbox shared folder, Dropbox makes a new folder called ‘My Dropbox’ inside that directory, and syncs it. There is no way to make it sync an already present folder, unless it’s named ‘My Dropbox’ (in which case you should select its parent directory in the Dropbox dialog box).

In Linux, the situation is exactly the same, except Dropbox now wants the name ‘Dropbox’ for its shared folder.

Therefore, you cannot sync the same folder from two OSes.
Stupid, stupid problem. I really think Dropbox should do something about it.

Anyway, Debsankha suggested something very simple and it worked. It’s to use a symlink, or a symbolic link, which is kind of like a shortcut in one place to files and folders in another place, but created at a low level.

Linux

In Linux, I made a symlink named ‘Dropbox’ to my Windows ‘My Dropbox’ folder, and set Dropbox to sync it. Now it was actually downloading files to/uploading files from my Windows Dropbox folder, without any redundant space consumption.

The way to make a symlink from ‘source folder’ to ‘destination directory’ (in my case ‘My Dropbox’ in Windows to ‘Dropbox’ in Linux) in Linux (Ubuntu) is the following:

  1. Using the GUI: Right-click the folder you want a symlink from, and select ‘Make Link’. Copy the symlink that’s created to whichever directory you want it in, and rename it if you want.
  2. From the terminal: Type the following in the terminal:
    $ ln -s ‘source folder’ ‘destination directory’
    Note that the symlink is placed in the ‘destination directory’. It’s not that ‘destination directory’ itself becomes a symlink. Think of the symlink as just a file, and it will be clear.

Windows

I had earlier tried to do a similar thing in Windows using a shortcut, and had concluded:

“It doesn’t. The shortcut syncs as a single .lnk file. Stupid.”

But a comment by Karl on this post has removed this disappointment. I’ll quote him:

“Yes, that is because ordinary Windows shortcuts are just .lnk files that Windows implements as a link to a file/folder, symlinks on the other hand are made on much deeper, filesystem level, the same level your files and folders are.

As of Windows Vista, Windows’s NTFS filesystem also supports symlinks. You can use the mklink command to create them. The syntax is:

mklink link target

In case you want to make a symlink of a directory, you need to use

mklink /D link target

command.

Please notice, that you need to do this using the administrator account (run command prompt as administrator), because the default security police prevents ordinary users from creating symlinks.”

Note that when you make a symlink in Windows, it looks exactly like the file/folder it’s linked to, so it is easy to confuse it for a file/folder actually residing there and taking up space, neither of which is happening. If you modify stuff in the target location, this will change to reflect that. CAUTION: This even works backwards for directory symlinks, so that deleting or modifying stuff contained inside the directory symlink affects the original files. However, the special case of deleting the whole directory that was the symlink itself, doesn’t delete the original directory.

2. How to make Dropbox sync files and folders outside its own folder.

I saw in the Dropbox website that people had a feature request: that Dropbox should be able to sync folders outside a single ‘Dropbox folder’. Dropbox has been delaying this update for a long time, and the users seemed to be very worked up about it. Frankly, now I don’t see what’s the holdup. It’s hilarious. There’s a very simple way to implement it using the above principle. In your Dropbox folder, just make a symlink of whatever file or folder you want synced, using the methods explained before for Linux and Windows.

This came as very obvious to Debsankha, who is used to working in Linux, and he wasn’t gonna post this anyway. I thought, what the heck, some people will definitely be helped with this info (like the ones shouting out their complaints in the Dropbox website).

Advertisements

Inquivesta Wallpaper

I designed this wallpaper for Inquivesta 2011. I just took the logo and inverted the colours. Hope you like it.

Inquivesta Wallpaper

By the way, I decided, right now, to participate in WordPress’ Post a Week 2011 Challenge (I’m not so sorry now that I migrated from Live Spaces – it’s frankly cooler here), starting with this post. And I’m going to be using all the dirty little tricks of the trade, including advance posting. Good luck to me.

Engraved Text!

While working on the Inquivesta website, I decided that I wanted to get rid of as many of the elements of the original template as possible, and replace them with my own stuff. Among them were the buttons. I tried a few things. The first idea was the Mandelbrot set, in a pillow sort of bevel:

mandelbrot1     mandelbrot2     mandelbrot3

But then I didn’t like the end result the next day I opened the page. So after a lot of work, I finally came up with this:

 

engraved

 

Yes! ENGRAVED TEXT! Drool on it!

Photoshop is impossible. I can’t believe it was first released in a floppy.

Want to learn HTML? Design a website!

The quote went something like the following: ‘The best way to teach yourself something is to write a book about it.’ I found out the truth of this statement over the past few days, when I was designing the Inquivesta 2011 website.

A week back, I knew more about shearing sheep than I did about writing HTML and CSS.

Today I am more or less familiar with both, and I rather like doing it. It is, of course, difficult to sit down to design a website without having had any sort of training, formal or informal, in HTML or CSS. But one wonderful thing about this approach is that you learn fastest this way. Yes, there remain loopholes and gaps in the thoery and understanding, but the fact that you change the code and continously check how it affects the result is a quick and interesting way to learn the code. If you go for a class of Web Designing, it’ll be boring. It’s the same way with drums. I found out that playing the lessons and studying the notation was boring. Of course, it’s important for a solid grounding, but it requires patience, which everyone seems to be running out of these days. Instead, you think of a pattern and try to pick it up, jam with some friends, have fun, it’s great that way. It’s just like health food doesn’t taste great, but junk food is heaven.

Debsankha, who is also part of our Design Team, once came up with the idea of learning French by watching Frenchmovies with English subtitles. It’s the same attitude. But now you see why it’s not health food: you learn it quick, but you don’t learn it well. Anyway, I guess he dropped the idea because foreign movies are hard to find. But an idea just struck me: why didn’t he just watch English movies with French subtitles?

Anyway, some crap monkey in the system is blocking the website that provides the hit counter for the Inquivesta website, so that’s a bit irritating.

It’s taking up a lot of my time, this Inquivesta. Sure, I’m learning stuff. I learnt to design documents and brochures, and HTML and CSS, and now I’m indulging in a bit of Webmaster tools, but it’s pushing out the other stuff that I must do for the grades. I keep recalling the Stay Hungry, Stay Foolish speech, but I know inside that it’s not going to help me when my Karma comes around.

Inquivesta 2011

So after a lot of hard work and the magic touch of ‘jugaar’ the sponsorship brochure for our college science fest, Inquivesta, was finally finished, and now a rough working version of the website has been put up here. We’ve also made good headway in finding sponsors.

I’m especially excited about the Rubix3 event. I’ve thought of some levels that will challenge players outside the turning-the-crank algorithm of cube-solving. I’m also excited about Photon, for which we must start the online submissions soon, as also for Nava Vishwa, and maybe iThink.

I’m especially proud of the Inquivesta logo, which I made, and the brochure, which I made with Rajarshi-da. I don’t know much about web-designing, but I’ve been given the responsibility to upload updated versions, so I’m trying to tinker around with the html and css files to introduce small improvements until bigger ones come along.