Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a Windows XP VM solely for the purpose of using Quicken. I have all my documents in my home folder including the Quicken files, to which the VM sees via a Samba share.

If the Ubuntu One sync daemon is running while I'm using Quicken, I cannot edit or modify transactions due to however U1 locks the file. So I made a script to stop the U1 daemon before the VM starts, then start it back up again after the VM shuts down if it was running to begin with.

All was working well, or so I thought. If I have a lot to do in Quicken therefore having the VM open for longer than 20 minutes, the U1 sync daemon will start up again and start syncing my files, causing Quicken to at least prevent me from editing anything and at worst locking up which forces me to shut it down and lose work.

How can I prevent the daemon from starting again unless I tell it to?

Below is the script I am currently using:

#!/bin/bash
u1exist=yes
u1running=no
vm=a7a66504-3370-4462-89b1-25b5ee833528
vmcomment="Windows XP"

# silly check, is VirtualBox installed?
hash /usr/lib/virtualbox/VirtualBox 2>/dev/null || { echo >&2 "This is a wrapper script for VirtualBox, which is not installed on this machine.  Aborting."; exit 1; }

#check to see if UbuntuOne is even installed
hash u1sdtool 2>/dev/null || { u1exist=no; }

printf "%s" "UbuntuOne sync-daemon running: "
if [ "$u1exist" == "yes" ]; then
    # check to see if the sync-daemon is running
    ustat=`u1sdtool -s | awk 'BEGIN {FS=" "} /is_connected/ {print $2}'`
    if [ "$ustat" == "True" ]; then
        u1running=yes
    fi
    echo $u1running
else
    echo "does not exist."
fi

if [ "$u1running" == "yes" ]; then
    echo "Turning off UbuntuOne syncing while VM is running. Don't worry, we'll turn it back on when the VM is shut down!"
    u1sdtool -q
fi

echo "Starting virtual machine..."
/usr/lib/virtualbox/VirtualBox --comment $vmcomment --startvm $vm

if [ "$u1running" == "yes" ]; then
    # only turn U1 back on if it was running to begin with
    printf "%s" "Turning UbuntuOne sync-daemon back on: "
    u1sdtool -c
    echo "done."
fi

Edit: Meant to include that I am using Ubuntu 12.04.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

First, open the U1 Program:

Open the U1 Program

Then, you can either disable it at startup or temporarily. To disable at startup, go to the settings tab and uncheck the box saying "Connect automatically when the computer starts":

Disable Startup

To disconnect temporarily, simply click on the disconnect button at the top right of the U1 program:

Disconnect

You can always turn it back on when you're done.

share|improve this answer
    
So obvious yet this didn't occur to me. Fixed, thank you!! –  Heather Feb 1 '13 at 13:12
    
@Heather You're welcome. Glad I could help. –  Vreality Feb 1 '13 at 13:30
    
+1 Excellent answer. –  BryceAtNetwork23 Mar 8 '13 at 3:06
    
@BryceAtNetwork23 Thank you. :) Pictures always help illustrate a point. –  Vreality Oct 4 '13 at 12:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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