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.
2 Answers
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.
- 306
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:
#!/bin/bash
# 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"
#!/bin/bash
# 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.shin 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.