Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Unix Operating Systems Software

Building a Better 'Mobile $HOME'? 41

numbski asks: "As a systems administrator, I find myself moving from machine to machine to machine on a daily basis. I happen to be a FreeBSD/MacOS X nut, so on a given day I move from my 17" iMac at home, to my 12" Powerbook at work, to any one of my 16 FreeBSD Servers. That's not to mention any of the Win2k Servers that have Cygwin loaded. All of that said, there is a longing in me to have a simple $HOME that all of my systems use and understand. I've considered the Knoppix way of dealing with this problem using a USB key device from this previous Slashdot article, however I don't know how many systems I could get away with consistently having my USB device picked up and used correctly without scripting changes to fstab, not to mention the issue of choosing a filesystem that just about every OS will recognize: FAT32. Windows is going to be unhappy no matter what I'm afraid, as it doesn't understand symlinking. c:\Documents and Settings\$USER can't just be moved off to another volume. The one glimmer of hope I have is this article on ftpfs and webdavfs. Using these one should be able to set up a single, persistent home that follows you from machine to machine over the internet. I guess I would like to know how others have gone about setting up a mobile $HOME. I look forward to having all of my preferences, dotfiles, and bookmarks follow me around."
This discussion has been archived. No new comments can be posted.

Building a Better 'Mobile $HOME'?

Comments Filter:
  • No good answer (Score:5, Informative)

    by Phexro ( 9814 ) on Monday April 07, 2003 @08:12PM (#5682526)
    Unfortunately, you have two issues to deal with. First and foremost is simply getting access to your data, and the second (and harder) is making that data usable to whatever os/apps you may be using.

    For example, I use Konqueror on my Linux box(en), but use Mozilla on Mac OS X. How do you get bookmarks from one browser to work on the other?

    As for the first problem, NFS works enough for LANs, but I sure wouldn't want to use it over the public 'net.

    Coda [cmu.edu] seems promising, but I've never found a distro that actually supports it, and there's a fair amount of manual stuff you have to do to use it. I've never managed to get it working properly, but from what I understand, it's somewhat similar to CVS in that you have to update/commit. This has the advantage of working when disconnected.

    InterMezzo [inter-mezzo.org] also has some promise, but I haven't played with it as of yet.

    USB keys seem like a better idea, until you realize that if you lose the little sucker, you're SOL. So, keep backups. Also, I keep a ridiculous amount of stuff in my home directory - multiple GBs - so being able to move a few hundred MB at a time just doesn't work for me.
    • Re:No good answer (Score:4, Interesting)

      by martinde ( 137088 ) on Monday April 07, 2003 @08:37PM (#5682656) Homepage
      An alternative to a true distributed filesystem is Unison [upenn.edu] , a user-space daemon that keeps filesystems automagically synced using rsync. I have not used it myself, but I saw reference to it nested somewhere in here [slashdot.org] and thought it looked interesting.
      • I use it to sync a couple of desktops and a laptop to my server. Back when I had a job, I also had a couple of workside home directories in the loop.

        It's not Coda-formerly-AFS, not by any means, but it was far, far easier to set up. I've tried and failed with Coda several times, and found it impossible to screw up with Unison, nor even to lose files.

        With the addition of a frequent cronjob to synchronize, it provides pretty much all of the features I want. Conflicts aren't resolved; I receive an email i
        • I had a go to make Unison work for me, but I'm afraid it didn't go too well. This was due to me being too lazy to persevere with the system than any fault with Unison.

          As the MOBILE $HOME topic crops up on /. on a regular basis, and you seem happy with your solution, is there any chance you would put together a step-by-step guide on setting up the solution you described, suitable for newbies as well as the more advanced user?
          • Sadly, I'm a debian user, so my setup procedure consisted largely of running apt-get. The other parts were adding a crontab entry and writing a simplistic bash script to send me the email. Here's the step-by-step:

            1.#> apt-get install unison-gtk

            2. crontab -e
            55 * * * * ~/bin/unisonify

            3. vi ~/bin/unisonify

            [clip from here]
            #!/bin/bash
            MAXERR=0
            ERRMSG=/tmp/unierr. t xt

            unison default > $ERRMSG
            ERRLST=$?
            MAXERR=$(( $ERRLST || $MAXERR ))

            if [ $MAXERR -ne 0 ]; then
            mail -s "`uname -n` unison errors" $
    • I agree that there is no good solution. I used to use rsync to keep 5 or 6 machines up to date with my latest changes to $HOME, but the following has got me as close to having a single home dir as I have ever been.

      I use NFS over CIPE tunnels [gotdns.org] to get around the roaming problems. That link is to a bit that I wrote up about doing this, but the short version is below:

      1) set up NFS so that one monster server has your home directory.
      2) For trusted networks, just use nfs to mount the server's home directory on
    • Coda [cmu.edu] seems promising, but I've never found a distro that actually supports it, and there's a fair amount of manual stuff you have to do to use it. I've never managed to get it working properly, but from what I understand, it's somewhat similar to CVS in that you have to update/commit. This has the advantage of working when disconnected.

      Or, you could just use CVS over SSH like I do. This has its pluses and minuses.

      On the good side, it is low tech and robust. It requires no root level support

  • by WGR ( 32993 ) on Monday April 07, 2003 @08:12PM (#5682530) Journal
    Why should $HOME be the same on each system. Why not have a expression in .login or Windows login.bat create a value that points to the Home location on each machine?
    For example on a Windows XP machine your login profile script would do
    set HOME="%HOMEDRIVE%\%HOMEPATH%"

    in Cygwin it would be
    export HOME="$HOMEDRIVE/$HOMEPATH"

    etc. depending on the OS.
    So you would use $HOME (or %HOME% in Windows) whenever you wanted the home location.
  • My incarnation (Score:4, Informative)

    by Jahf ( 21968 ) on Monday April 07, 2003 @08:14PM (#5682540) Journal
    I'm about to implement a mobile $HOME at my home ... my plan is to use a main server to store the data. I'm plannint to use the Intermezzo fs for my laptops so that they can run connected to the network or not (Intermezzo caches data, so I can take my laptop on the road, continue to work on documents, and when I plug back into my home network it will populate my edits back to the server). For these machines and my linux desktop I'm planning to roam everything in $HOME so that I have a single install of custom fonts, Star Office, mozilla settings, etc.

    However, I'm giving up on having a roaming desktop between Windows boxes and my wife's iMac. For those I'm just using Samba / Netatalk to link to the documents and bookmark files but not roaming anything else. It's just not worth the hassle for me to try and make those systems any more portable.

    I did consider using the Unison service to do synchronization between Windows and Linux, but I think I'm happier with Intermezzo since I can afford the dedicated partition space on the Linux machines. I really do wish that Intermezzo could support the sharing of individual files, but then it would just be a synchronizer, not a filesystem.

  • I like the Windows link... http://fsf.org

    Of course, in my browser at least, that should be http://www.fsf.org [fsf.org]
  • the 1% of the time when there are network problems and you indavertantly left something you need in your "always accessable everywhere" network mounted home directory you're shit out of luck.

    even more so if whatever way you use to "mount" this network home directory blocks when the network/server is inaccessable.
    • even more so if whatever way you use to "mount" this network home directory blocks when the network/server is inaccessable.

      I've had this problem before. One night my ISP changed all my IP addresses (I use their dhcp) and in the morning everything had locked up on nfs read requests to the file server.

    • Hence the beauty of a caching network-based filesystem like Intermezzo. If it's offline, you use your cache. This requires hard drive space, but gives much more flexibility and still retains the good bits (except for no local space requirements) of other networked filesystem schemes.

      I believe NFSv3 supports caching, too, though I don't believe it has the same synchronization abilities as Intermezzo.
  • As was pointed out already, there are two problems here - one is having a universally readable piece of hardware, and the other is how to keep configuration across different systems.
    I solve the 2nd problem by having 2 directories, called .laptop and .desktop
    and a directory called .cur_dot that is linked on my laptop to .laptop, and on the desktop - .desktop (!) .kde is linked to .cur_dot/.kde
    dot files that need to be the same on both systems sit in .common_dot, and are linked correctly. So .tcshrc is linked
  • by BroadbandBradley ( 237267 ) on Monday April 07, 2003 @09:29PM (#5682997) Homepage
    but it's not a total solution.
    What I want to do is base it around Mozilla.
    The Plan is to keep the profile directory on a website, and use Mozilla Roaming profiles to log in from different machines.(doesn't work yet) If there's files I need I'll keep them in the profile directory. If all your machines are connected, and all your tools are browser based, then that's all you'd need.
    Here's to hoping that I can get ZillaVilla.com [zillavilla.com] up and running sometime this century. if anyone has any feedback, contributions, Ideas, insight, whatever, don't hesitate to send them my way via ZillaVilla.com/forum [zillavilla.com]

    • Watch out that some of the mozilla configuration in one operating system is sometimes incompatible with the mozilla configuration with another operating system. All the data files for e-mail, bookmarks, and such are all compatible though.
  • CVS (Score:2, Informative)

    by DrewFish ( 23138 )
    I keep the inportant bits of my system in a CVS repository. It's not the most elegant, as it requires some work to "stitch" the checked out directory into all the places programs look for configuration info.

    Plusses: tolerant of transient network trouble; can keep per-machine mods (just don't check them in); one universal distributed set of vim tweaks, yeah!

    Minuses: each ~/.config file symlinked into the directory (ugg); per-machine mods requires a bit of a CVS dance sometimes; most probably unix-only

    A
    • I have done this, even across windows machines. Of course, I'm not a typical windows user in that I tend to live in Cygwin when I use windows. Anyways, I have in my .bashrc
      if [ -n "$LINUX" ]; then ...
      fi
      and
      if [ -n "$WINDOWS" ]; then ...
      fi

      Plus a bunch of stuff that is common between machines. I also have some tests for "what domain am I on?" to set a couple of options. It works reasonably well. I have been toying with the idea of using replicated HOME dirs via Unison [upenn.edu] (as I mentioned in another thread) b
      • by Shaleh ( 1050 )
        a friend and former co-worker had an article in Linux Journal (or was it Mag?) about how to put $HOME into cvs.

        His approach is to break it up into functional groups and then checkout the groups he needs or fit the current location/use. Even all of his email lives in cvs. It is quite amazing.

        Having seen many a distributed homedir server die or disappear in my time, I would rather have to only depend on the network for setup. Personally I have been waiting for a project like arch or subversion to mature
  • An idea... (Score:4, Interesting)

    by Ayanami Rei ( 621112 ) <rayanami AT gmail DOT com> on Monday April 07, 2003 @11:24PM (#5683620) Journal
    1) In Win2K...
    Change the Logon path for yourself... run
    mmc.exe %SYSTEMROOT%\system32\lusrmgr.msc
    And find yourself, go to properties, then profile, then set the Logon path to the drive letter (and perhaps a safety-subfolder) that contains your user profile when the USB key is attached. AFAIK it supports UDF filesystems on zip-like things as well (you may need UDF tools like DirectCD if it doesn't work)

    2) In Unix...
    In FreeBSD and Linux, you should be able to create and write to UDF filesystems on anything that looks like a SCSI device (IE a USB flash disk). And OSX 10.1 is UDF-ready for reading and writing on arbitrary devices (incl. usb hard disks/flash disks). Set up your /etc/fstab file to recognize but not automagically mount /mnt/dongle (noauto), then configure your automounter to mount it when you access it. Make sure you add support for umass under FreeBSD, and usb-storage in Linux. Then, set up an auto.home NIS map and again use your favorite automounter to map /home/yourname to /mnt/dongle.
  • Admittedly I only have two machines to worry about, but since Perforce allows you two free clients, you can check in all your .zshrc and miscellaneous binaries into a Perforce repository. Mapping to my home directory is as simple as //users/wsargent/home/... //myclient/wsargent/...

    and I don't have to mess around with CVS directories.
  • Even at home, not just at work, I use several computers. I tried having a "mobile home" various ways, like the pathetic Netscape Roaming Profiles. I ended up settled on just using Yahoo to handle all my mail ("mail plus" product), address book, notepad, and file storage ("briefcase" product). I determined that all I really needed everywhere was the administrative office-keeping stuff (mail) and some files to download (briefcase). All the software development and systems administration stuff that had to
  • CVS works for me (Score:3, Interesting)

    by kuhneng ( 241514 ) on Tuesday April 08, 2003 @03:33AM (#5684596) Homepage
    I'm doing exactly what you're talking about using CVS.

    Everything I care about lives in huge CVS project, currently hosted on a laptop. In my case, this comes to 7GB, mostly in my photo gallery.

    For servers (Solaris) at work, everything shares one NFS mounted home directory, which has a checkout of everything but my photos (due to quota limits). My personal work machine (Win2k, yuck) has its own complete checkout, with a few partial checkouts to put configuration files where different programs want them. My home machine (OS X) has a complete checkout.

    This setup works for everything except bookmarks, where I find myself using IE on Windows, Netscape in Unix, and Safari on OS X. For bookmarks, I've moved to the "My Yahoo" service, which keeps everything online and accessable with one click from my home page.

    By the way, I'd strongly recommend configuring CVS to default to binaries unless told otherwise for this kind of config. It's a nasty surprise to realize that CVS just mangled all of your .xyz binary files trying to do linefeed conversion, just because you forgot to tell it otherwise.
  • The big danger of ftpfs and similar jollies is that it has no way of file locking. Or writing to/reading from a random place in a file, but that's minor compared to the locking issue.

    I solved it by (warning, I'm turning into a fanboy now) buying an ibook and rsync'ing across to the server whenever practical.

    Dave
  • Actually, on Win2K you have NTFS reparse points, which you could in principle use to make your USB device available as C:\Documents and Settings\%USERNAME%
    • You could always use the subst command to map a logical drive to a directory... yeah, I know it's not Linux, but it's occasionally useful.

      Map, say, T: to \\yourfiles\whereever

      Then use /cygdrive/t or whatever

      Excuse me, no manuals to hand, above could be wrong in detail.

  • VNC? (Score:3, Insightful)

    by Gudlyf ( 544445 ) <.moc.ketsilaer. .ta. .fyldug.> on Tuesday April 08, 2003 @11:20AM (#5686166) Homepage Journal
    I know of many people (including myself) who set their "real" working environment on one system running a VNC server, then connect to that from home, the road, etc. via SSH. Not the fastest solution, but it works.

    Then if you're really ambitious, build a VNC client for all of the OS's you'll be working on and put them on a CD for portability.

  • I think the simplest solution is to set up an etc/ path under ~ on an up-al-the-time machine and then script a CVS checkout of that directory in one of your .whatever scripts. Then source everything in ~/etc/. Alias exit to do a CVS commit. You can make this stuff pretty painless with public key authentication (not interactive) and ssh.

    If need be, you could CVS all of ~/, but do whatever you think is best for your needs.
  • I've already tried hosting an OSX home directory over NFS, and it just doesn't work. Too many programs expect HFS+ functionality (resource forks, attributes, etc.). Since HFS+ is a functional superset of most other filesystems you should be able to host other OS's homes on an OSX machine (then share it out with Samba, NFS, etc.). With journaling now, it's not entirely suicidial either.
  • I setup a server at my parents house. It's a simple SMB/web server. When I lived at home I just mapped to it.

    Now most of my files are still on the server, I just ssh into and copy them to the webserver.

    It works for a few files.

    For the bookmarks, I exported my IE bookmarks to a HTML page and posted that on my server. It helps when you own a domain for this.

    I guess a future project would be to script everything so my ibook at home would zip and ftp the file onto my server.

    Then the server would extract
  • Use a decent version-control system that can run over SSH. Create a repository on a central server, and "cvs checkout" onto every machine.

    Then pick the files you want to share (bookmarks, bashrc, cron jobs, scripts, your TODO list, ~/bin), move them to the "cvs checkout"'d directory and leave symlinks to them from the old locations.

    When you change them, do "cvs commit", and "cvs update" periodically on all machines.

    Hey presto -- works great... occasionally you may have to fix conflicts by hand after a "c
  • by Anonymous Coward
    ...is a folder called "My Documents". Just double-click the icon on your desktop.

    Please feel free to concact us again anytime.

    Jason
    Agent 83832
    HP/Compaq Support
  • Built into the NTFS filesystem are "reparse points", the ability to mount volumes as folder paths.

    This way, it would be *trivial* to mount your USB thumbdrive as C:\Documents and Settings\$USER\, just have it symlinked that way and make sure the drive is plugged in when you boot. Otherwise it might get messy.

    NTFS also supports hardlinking...not quite the same thing as symlinks, but rather close...The real trouble is that most of these things aren't supported using the default tool set, you must add it usi
  • Make a SMB share somewhere containing all your dotfiles and things you want to get to from elsewhere. This may or may not work very well for other types of files/documents/etc.

    In each homedirectory on each real machine:
    $ mkdir ~/dotfiles
    $ cp (or mv) dotfiles to ~/dotfiles
    $ ln -s all the .* files in ~/ to the copies in ~/dotfiles

    (omit any files that are specific to the machine and which you don't want to use the master for)

    In a shell-login script (.profile or .login) DON'T MOVE THESE AS DESCRIBED ABOVE

    P
  • The answer is and always has been rsync. Having many copies of stuff around is both cheap & improves reliability - just rsync from time to time over ssh to keep your files up to date. crontab it & don't worry about your operating system.

    -Jay
  • Take a look at http://www.fs.net [fs.net] ... There was an article in the ;login Dec 2002 [usenix.org] issue

    "SFS is a secure, global network file system with completely decentralized control. SFS lets you access your files from anywhere and share them with anyone, anywhere."

Solutions are obvious if one only has the optical power to observe them over the horizon. -- K.A. Arsdall

Working...