Using Gnucash from multiple computers?

Geert Janssens geert.gnucash at kobaltwit.be
Tue Oct 14 16:55:35 EDT 2014


On Tuesday 14 October 2014 22:43:31 Geert Janssens wrote:
> On Tuesday 14 October 2014 13:24:15 John Ralls wrote:
> > On Oct 14, 2014, at 11:57 AM, Sean Clarke <seanchk at gmail.com> wrote:
> > > Hi John,
> > > 
> > > Ok I'm not sure if I've done this right (which means I pretty sure
> > > I
> > > haven't!)
> > > 
> > > I created a .bashrc file and put it in /home
> > 
> > No, not /home. That’s the enclosing dir for all users. Based on
> > below
> > you want /home/sean/.bashrc
> > 
> > > I created a new folder in Google Drive called gnucash
> > > 
> > > The full path to that folder is /home/sean/Google Drive/gnucash
> > > 
> > > 
> > > The content of my .bashrc file (I found an example of one online
> > > and
> > > copied it)
> > > 
> > > PS1='\u$'	# The prompt contains the user's login name.
> > > 
> > > HISTSIZE=50	# Save 50 commands for when the user presses the up
> > > arrow.
> > > 
> > > # All the directories to search for commands.
> > > PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11
> > > 
> > > # To prevent the user from accidentally ending a login session,
> > > # disable Ctrl-D as a way to exit.
> > > IGNOREEOF=1
> > > 
> > > stty erase "^H"	# Make sure the backspace key erases.
> > > 
> > > GNC_DOT_DIR="$home/sean/Google Drive/gnucash”
> 
> While none of the extra information is harmful, you probably don't
> want it in there either. It subtly alters the behaviour of your
> interactive shell.
> 
> If you didn't have a .bashrc in your home directory (being /home/sean)
> you can start with an empty file and just put these two lines:
> GNC_DOT_DIR="/home/sean/Google Drive/gnucash"
> export GNC_DOT_DIR
> 
> (This assumes that is the real path to your Google Drive directory. If
> not adapt to your taste).
> 
> If you did already have a .bashrc file, you could just append those
> two line to the end.
> 
> > No, $home is “” unless you’ve set it to something. The automatically
> > set variable is $HOME, and it points to /home/sean. Say echo $HOME
> > to see.
> > 
> > In order for the environment variables declared in .bashrc to affect
> > anything they must be exported; that can be done on the last line
> > that defines them in the .bashrc or separately. For example export
> > GNC_DOT_DIR=“$HOME/Google Drive/gnucash"
> > 
> > > I've restarted the PC but don't see anything different happening.
> > 
> > Restarting is for Windows. You need only log out and back in.
> > 
> > However, if you’re starting from a desktop icon or “Activities” menu
> > or similar, you’ll need to consult your distro’s documentation to
> > see
> > how to set the environment for those. They may not read the
> > bash-specific files, so you might need to use .profile or .login
> > instead.
> 
> True. .bashrc is only read for an interactive shell (ie one in which
> you enter text commands directly). For environment variables to be
> picked up by gnucash when starting from the system menu, you should
> add the above two lines to another file. On Fedora you'd use
> .bash_profile.
> 
> Maybe it's different on your system (was it Ubuntu ?)
> 
> One way to find out could be to open a terminal and enter "man bash".
> Scroll all the way down to the end (a long document) where you will
> find a section called "FILES". That section explains which files are
> being used at which time. You would want the file used for
> "The personal initialization file, executed for login shells"
> 
> I hope you're not getting swamped in all this low-level information :)
> 
> Geert
A few additional remarks:
1. Be careful with quoting. Since your path contains a space (in Google 
Drive) it must be enclosed in double quotes. I notice in the mail some 
quotes are in fancy style (“” instead of ""). This is not allowed in 
bash, so be careful if you copy and paste from the mail directly.

2. And you probably want to copy the contents of /home/sean/.gnucash 
into /home/sean/Google Drive/gnucash so all of your current state 
information is available.

Geert



More information about the gnucash-user mailing list