6

I work in an office with lots of computers, and I am on a different workstation every day. Is there a bitcoin client I can keep on a FireWire/USB drive?

Bitcoin-Qt on Mac leaves all the files in the home directory - the block chain, the wallet, etc. Someone else is going to be using this computer tomorrow! I want to keep all those files, and even the application itself, on a portable drive.

1

2 Answers 2

7

Somebody posted a portable client, but I don't trust them, so I'll show you how to make your own.

Windows guide

  1. Download the windows .zip from bitcoin.org

  2. Unpack it. Go into that directory.

  3. Make a file called launch.txt
    Put this in it:

     start bitcoin-qt.exe -datadir=data
    
  4. Rename it to launch.bat

  5. Make a folder called data

It should look like this. Double-click launch.bat to start it. If files show up in the data folder you made, then you've done things correctly.

Macintosh guide

Download the Mac .dmg from bitcoin.org

Find the Bitcoin-Qt.app file, and copy it to to your flash drive.

Go to Launchpad, type in 'terminal'. Hit enter.

When the terminal comes up, type:

cd /path/to/flash/drive
mkdir data
cd Bitcoin-Qt.app/Content/MacOS
nano start.sh; chmod +x start.sh

Type in:

#!/bin/bash
dir1=$(cd "$(dirname "$0")"; pwd)
dir=`echo $dir1 | sed 's/"/\\"/g' | tr -d '\n'`
data="$dir/../../data"
"$dir"/bitcoin -datadir="$data"

Now hit Ctrl-O, enter, Ctrl-X. You should be back at the terminal.

cd ..
nano Info.plist

Find the lines that look like this:

    <key>CFBundleExecutable</key>
    <string>Bitcoin-Qt</string>

Change it to:

    <key>CFBundleExecutable</key>
    <string>start.sh</string>

Now hit Ctrl-O, enter, Ctrl-X. You should be back at the terminal. Now we just need to give it a better name.

cd ../..
mv Bitcoin-Qt.app BitcoinPortable.app

Try running your BitcoinPortable.app. If you see files show up in the data directory next to it, then you've done things correctly!

Thanks to Pygy for the script
Note: I don't have a Mac, so this is untested.

3
  • cd Bitcoin-Qt.app/Content/Resources cd ../MacOS why not just cd Bitcoin-Qt.app/Content/MacOS?
    – o0'.
    Commented Mar 29, 2013 at 17:29
  • 1
    Works for Dogecoin too. Had to point the installer to the external drive and then follow your instructions (on Windows). Thanks! Commented Feb 17, 2014 at 14:04
  • 1
    Doesn't work for me. After the 'nano Info.plist' it creates a new file, so it's not possible to change those lines... Commented Jun 8, 2014 at 22:19
2

This is what worked for me on MAC OS 10.6.8 with Bitcoin-Qt 0.8.1-beta. I'm combining and editing the Pygmy script and Nick ODells answer, there were a few typos.

Also note, I opened the application with right-click >> "Show Package Contents" and then edited the files with the finder, and TextWrangler. No Terminal required!

1) Create new directory in Bitcoin-Qt.app/Contents/Resources and name it data

2) Navigate up a level and then open the MacOS folder

3) In that folder, create a new file called start.sh

4) open that new file in a text editor and write:

#! /bin/sh
dir1=$(cd "$(dirname "$0")"; pwd)
dir=`echo $dir1 | sed 's/"/\\"/g' | tr -d '\n'`
data="$dir/../Resources/data"
"$dir"/Bitcoin-Qt -datadir="$data"

note that the last line contains the name of the only other file in the MacOS folder (Bitcoin-Qt). That's important! Because that is the program that will be executed a the end of the script you just wrote. Also, that fourth line has to link to the 'data' folder we created in step #1

5) Navigate back up a level to Bitcoin-Qt.app/Contents/ and open the file called Info.plist

6) Find the lines that look like this:

<key>CFBundleExecutable</key>
<string>Bitcoin-Qt</string>

Change it to:

<key>CFBundleExecutable</key>
<string>start.sh</string>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.