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.4k Views Asked by jbeard4 At
1
There are 1 best solutions below
Related Questions in BASH
- When does Bash read heredocs?
- Why `set -o pipefail` gives different output even though the pipe is not failing
- Run an external command within jq to manipulate each values of a particular key
- API key 401 error in .env.development file
- How to "Enable mobile data" on a Huawei E3372 4G USB dongle using a bash script in Windows
- ImageMagick / Bash : pipe ignored(?) when filename format variable used
- MacOS Bash-Script: while read p and echo
- Parse command line arguments and write useful usage message without additional code
- JQ JSON - Values to Array
- why variable substitution is so different?
- postbank_pdf2csv: how to setup with Cygwin in Windows?
- Custom Bash functions & custom statements - Need some advice
- unexpected operator == in square brackets when trying to use gum lib
- How to disable a bash builtin inside a docker container
- Use sed or rename find series of alphabet then replace with with the same alphabet and a dash -
Related Questions in DBUS
- Why does my D-Bus signal, implemented with Python dasbus library, not show up?
- Writing value to GATT characteristic via DBUS results in "garbage" value during subsequent read
- Connect wifi service with dbus-native
- Parsing DBUS response type as Array of Dictionary or Map using C++
- How can I trigger shutdown or logout in KDE Plasma via QDbus in Python?
- Zbus create proxy builder without destination
- Am I wrong or Dunst+notify-send violates the Desktop Notification Specification?
- Python DBus unknown method or interface
- Unable to Parse Dictionary Response in sd_bus_message_read() After Successful String Retrieval
- Having trouble toggling Bluetooth functionality using sd-bus in C
- What are the known pitfalls of periodic vs continuous Bluetooth device discovery in Bluez/Linux?
- Client in BLE for raspberry Pi 4 using BlueZ
- How can I make my D-Bus service exit automatically when idle?
- Why do I get "Unexpected reply type" from notify-send when using this Haskell notification server?
- Docker container (KASMvnc + obsidian) not able to play sound : bdus error
Related Questions in RHYTHMBOX
- Is it possible to automatically save playlists (to files) in Rhythmbox
- Rhythmbox - Get current track path
- gtk_css_value_inherit_free: code should not be reached
- Rhythmbox plugin. Get one number limited of songs
- Bananian and iPod sync with Rhythmbox
- rhythmbox unstable after pause/play from python script
- Which widgets are used in Rhythmbox there
- Subscribe-to-podcast fails - wants 2 arguments, not 1?
- How to continuously monitor rhythmbox for track change using python revisited
- Reading a file from Rhythmbox plugin
- How to show a dialog pane with a progress bar in Python
- How to know if Rhythmbox is playing music or something else
- Rhythmbox and Android - MTP sync issue
- how to display an accelerator for a Gio.MenuItem
- How do I invoke Twisted from a plugin to a GTK program that is already running the main loop?
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 # Hahtags
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.