So I've seen questions like this one looking for help uploading music with Google Music on Linux, but none really seem to confront the notion of solely using the command line. I've downloaded the software from Google and dug around in those files for anything useful but wasn't able to come up with any good solutions.

  • What's your question here exactly? If you're looking for a pre-made product to do this for you, that would be considered off-topic. Otherwise the question is pretty vague. You'll probably want to approach this as two different tasks (to start): one for watching the folder and firing a script, and the other for scripting the upload via the Google client. Jan 17, 2014 at 17:34

2 Answers 2


I think what you appear to be looking for is https://github.com/thebigmunch/gmusicapi-scripts - a set of python scripts to upload, download or bi-directionally sync tracks. This, in turn, draws from https://github.com/simon-weber/Unofficial-Google-Music-API should you wish to use these python libraries for your own projects.


Per user Joachim's, answer describes a command line approach to both installing and setting up for sync, on a headless linux server no less. To wit:


# Uncomment if 32-bits
# wget "http://dl.google.com/linux/direct/google-musicmanager-beta_current_i386.deb" -O /tmp/gmm.deb
# Uncomment this is 64-bit
# wget "http://dl.google.com/linux/direct/google-musicmanager-beta_current_amd64.deb" -O /tmp/gmm.deb
sudo dpkg -i /tmp/gmm.deb
sudo apt-get -f install
sudo apt-get install x11vnc
echo "Now you can must create the headless-script"
echo "Found here: http://development.giaever.org/pastebin/Ubuntu/google-musicmanager/gmm-headless-script.sh"


# Save as: $HOME/gmm-headless-script.sh
export DISPLAY=:2
Xvfb :2 -screen 0 1024x768x16 &
google-musicmanager -a GMAILUSER -p PASSWORD -s /path/to/music -m SERVERNAME &
x11vnc -display :2 -bg -nopw -listen localhost -xkb
# remember to chmod +x this file = make excutable.
# run in terminal: chmod +x $HOME/gmm-headless-script.sh

From the linked answer:

Hope they are useful. Read comments. Remember to edit: «GMAILUSER -p PASSWORD -s /path/to/music -m SERVERNAME» with you own data. (SERVERNAME could be whatever. Its just a name so you can identify your server from your Google-login.)

Type $HOME/gmm-headless-script.sh in terminal to start sync.

Essentially the scripts:

  • have you download and install the linux version of the google music uploader
  • have you install a x11 server that uses vnc and framebuffer for output so you don't have to actually deal with x11, but the app will be able to run
  • instruct the music uploader to run, specifying the user account and sync from location.

Making this automatic would then be a matter of adding this to cron for repeat syncage, presumably once your initial upload had completed.

A thing to watch out for is excessively long sync / upload times that might lead to overlap of your cronned sync jobs.

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Cfinley
    Jul 31, 2014 at 15:39
  • Fair enough, will copypasta.
    – Gavin C
    Jul 31, 2014 at 15:40
  • 1
    Sadly this doesn't work. I think the Google API has changed. I had an exchange with Joachim about it to no avail.
    – wxl
    Aug 31, 2014 at 23:07

Not the answer you're looking for? Browse other questions tagged .