I'd like to do the same thing as is described here, but using shell scripting (preferably in bash) instead of python. It seems like such a thing should be possible using dbus-monitor, but I'm not very familiar with dbus, and it's not clear to me how to take the concepts described in the solution to the python question and apply them to the dbus-monitor tool.
How to continuously monitor rhythmbox for track change using bash
5.3k Views Asked by jbeard4 At
1
There are 1 best solutions below
Related Questions in BASH
- How do I recursively find and replace only in files named index.php on Linux webserver?
- Delete the extra space after special character in all the lines of text file
- Calling a python function with options from shell script
- bc: prevent "divide by zero" runtime error on multiple operations
- Multiple commands with find and xargs, also accounting for special characters
- How to split a directory into parts without compressing or archiving?
- concat a lot of files to stdout
- Honoring quotes while reading shell arguments from a file
- No laravel sync folders in homestead vagrant on windows
- Grouping commands in curly braces and piping does not preserve variable
- SWI Prolog pass a goal with non-zero arity through the command line arguments
- Evaluating condition of if statement in awk using a second file
- How to customise bash completion to pick only a custom set of commands?
- Bash regular expression execution hangs on long expressions
- Bitwise OR in bash arguments with square brackets
Related Questions in DBUS
- Cannot disable systemd service
- BlueZ 5.30: D-Bus GATT API - Simply Discover and Connect to a BLE device in C
- how I can get return code of org.gnome.SessionManager.CanShutsown in JS?
- Connecting to Bluetooth Device using bluetooth_client_connect_service() - gnome-bluetooth 3.8.2.1
- dbus c program - send(with reply) and receive using method_call
- "No D-BUS daemon running" when running phpunit test
- How to export DBUS_SESSION_BUS_ADDRESS
- DBus how to start service
- how to decode dbus.Array fromat to hex or string in python
- LEAdvertisingManager1 missing from DBus.ObjectManager.GetManagedObjects
- What is the correct way to read advertisement packets from a BLE sensor using bluez 5.43 and DBus
- D-Bus related runtime crash when trying to open SDL2 window
- The trait bound `dbus::arg::Get` is not satisfied when using the Rust DBUS library
- DBus configuration wild card
- How do you create a dictionary that maps onto an array in GLib?
Related Questions in RHYTHMBOX
- Rhythmbox - Get current track path
- Rhythmbox how to add entry to side pane?
- Speeding up ssh in batch files
- How do I get the currently playing song in Rhythmbox using Python
- How do I invoke Twisted from a plugin to a GTK program that is already running the main loop?
- Rhythmbox and Android - MTP sync issue
- How to continuously monitor rhythmbox for track change using python revisited
- Subscribe-to-podcast fails - wants 2 arguments, not 1?
- Bananian and iPod sync with Rhythmbox
- Rhythmbox plugin to access podcast files doesn't see them
- gtk_css_value_inherit_free: code should not be reached
- How do I query for data in Rhythmbox
- Start a python webserver from a rhythmbox plugin
- rb plugin the hot key not working
- Check if Rhythmbox is running via Python
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Here's the simplest way I could find:
It produces output like this:
It also prints the currently playing song when started up. If that is not what you want, look at the contents of
$lineand see if it containsNameAcquiredorplayingUriChanged. If it containsNameAcquired, skip it.The main difference between the Python version and this bash version is that the Python version uses DBus to get the playing song information. I couldn't find a good way to do that using bash, but
rhythmbox-client --print-playingseems to work well.