Conky script logging massive amount of error messages
Ubuntu 18.04, conky 1.10.8.
I have an internet radio player application called "Goodvibes" installed.
I have a conky "script" (correct term?) running. When Goodvibes is running, but the Goodvibes' state is "Stopped", then the conky script produces a message on the desktop that says, "Goodvibes is not playing." When Goodvibes' state is "Playing", then the conky script produces this output: The name of the station that is playing, the artist and track that is playing, , and the volume level and a volume bar. This all works fine.
The problem is when Goodvibes is not even running. In this case, the conky script produces a message on the desktop that says, "Goodvibes is not playing." That is what I want. However..... In this case conky is also flooding an error log with this message every three seconds: "Service org.mpris.MediaPlayer2.Goodvibes is not running."
I show the relevent section of the conky script below. I believe the problem is that, even though Goodvibes is not running, the execi and execpi commands in the conky script are still being "evaluated", but because Goodvibes is not running, I am getting these error messages.
Goodvibes works, and the conky script works - I'm just trying to modify the conky script so that when Goodvibes is not running, I still get the output of "Goodvibes is not playing", but without all the error messages about the service org.mpris.MediaPlayer2.Goodvibes not running.
How do I modify this conky script to accomplish that?
conky.text = [[
${if_match "${execi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus}" == "Playing"}
${color2}Goodvibes Info
Station: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^goodvibes:station:" | cut -d':' -f3-}
${color2}Artist - Track: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^xesam:title:" | cut -d':' -f3-}
${else}
${color2}Goodvibes is not playing.${color0}
${endif}
${color2}Volume (0 - 64): ${color0}${exec amixer -c 1 get Master | grep Mono:}
${color0} ${execbar amixer -c 1 get Master | grep -o -E '[0-9]{2}' | head -n3 | tail -n1}
]]
conky
add a comment |
Ubuntu 18.04, conky 1.10.8.
I have an internet radio player application called "Goodvibes" installed.
I have a conky "script" (correct term?) running. When Goodvibes is running, but the Goodvibes' state is "Stopped", then the conky script produces a message on the desktop that says, "Goodvibes is not playing." When Goodvibes' state is "Playing", then the conky script produces this output: The name of the station that is playing, the artist and track that is playing, , and the volume level and a volume bar. This all works fine.
The problem is when Goodvibes is not even running. In this case, the conky script produces a message on the desktop that says, "Goodvibes is not playing." That is what I want. However..... In this case conky is also flooding an error log with this message every three seconds: "Service org.mpris.MediaPlayer2.Goodvibes is not running."
I show the relevent section of the conky script below. I believe the problem is that, even though Goodvibes is not running, the execi and execpi commands in the conky script are still being "evaluated", but because Goodvibes is not running, I am getting these error messages.
Goodvibes works, and the conky script works - I'm just trying to modify the conky script so that when Goodvibes is not running, I still get the output of "Goodvibes is not playing", but without all the error messages about the service org.mpris.MediaPlayer2.Goodvibes not running.
How do I modify this conky script to accomplish that?
conky.text = [[
${if_match "${execi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus}" == "Playing"}
${color2}Goodvibes Info
Station: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^goodvibes:station:" | cut -d':' -f3-}
${color2}Artist - Track: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^xesam:title:" | cut -d':' -f3-}
${else}
${color2}Goodvibes is not playing.${color0}
${endif}
${color2}Volume (0 - 64): ${color0}${exec amixer -c 1 get Master | grep Mono:}
${color0} ${execbar amixer -c 1 get Master | grep -o -E '[0-9]{2}' | head -n3 | tail -n1}
]]
conky
add a comment |
Ubuntu 18.04, conky 1.10.8.
I have an internet radio player application called "Goodvibes" installed.
I have a conky "script" (correct term?) running. When Goodvibes is running, but the Goodvibes' state is "Stopped", then the conky script produces a message on the desktop that says, "Goodvibes is not playing." When Goodvibes' state is "Playing", then the conky script produces this output: The name of the station that is playing, the artist and track that is playing, , and the volume level and a volume bar. This all works fine.
The problem is when Goodvibes is not even running. In this case, the conky script produces a message on the desktop that says, "Goodvibes is not playing." That is what I want. However..... In this case conky is also flooding an error log with this message every three seconds: "Service org.mpris.MediaPlayer2.Goodvibes is not running."
I show the relevent section of the conky script below. I believe the problem is that, even though Goodvibes is not running, the execi and execpi commands in the conky script are still being "evaluated", but because Goodvibes is not running, I am getting these error messages.
Goodvibes works, and the conky script works - I'm just trying to modify the conky script so that when Goodvibes is not running, I still get the output of "Goodvibes is not playing", but without all the error messages about the service org.mpris.MediaPlayer2.Goodvibes not running.
How do I modify this conky script to accomplish that?
conky.text = [[
${if_match "${execi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus}" == "Playing"}
${color2}Goodvibes Info
Station: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^goodvibes:station:" | cut -d':' -f3-}
${color2}Artist - Track: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^xesam:title:" | cut -d':' -f3-}
${else}
${color2}Goodvibes is not playing.${color0}
${endif}
${color2}Volume (0 - 64): ${color0}${exec amixer -c 1 get Master | grep Mono:}
${color0} ${execbar amixer -c 1 get Master | grep -o -E '[0-9]{2}' | head -n3 | tail -n1}
]]
conky
Ubuntu 18.04, conky 1.10.8.
I have an internet radio player application called "Goodvibes" installed.
I have a conky "script" (correct term?) running. When Goodvibes is running, but the Goodvibes' state is "Stopped", then the conky script produces a message on the desktop that says, "Goodvibes is not playing." When Goodvibes' state is "Playing", then the conky script produces this output: The name of the station that is playing, the artist and track that is playing, , and the volume level and a volume bar. This all works fine.
The problem is when Goodvibes is not even running. In this case, the conky script produces a message on the desktop that says, "Goodvibes is not playing." That is what I want. However..... In this case conky is also flooding an error log with this message every three seconds: "Service org.mpris.MediaPlayer2.Goodvibes is not running."
I show the relevent section of the conky script below. I believe the problem is that, even though Goodvibes is not running, the execi and execpi commands in the conky script are still being "evaluated", but because Goodvibes is not running, I am getting these error messages.
Goodvibes works, and the conky script works - I'm just trying to modify the conky script so that when Goodvibes is not running, I still get the output of "Goodvibes is not playing", but without all the error messages about the service org.mpris.MediaPlayer2.Goodvibes not running.
How do I modify this conky script to accomplish that?
conky.text = [[
${if_match "${execi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus}" == "Playing"}
${color2}Goodvibes Info
Station: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^goodvibes:station:" | cut -d':' -f3-}
${color2}Artist - Track: ${color0}${execpi 3 qdbus org.mpris.MediaPlayer2.Goodvibes /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata | grep "^xesam:title:" | cut -d':' -f3-}
${else}
${color2}Goodvibes is not playing.${color0}
${endif}
${color2}Volume (0 - 64): ${color0}${exec amixer -c 1 get Master | grep Mono:}
${color0} ${execbar amixer -c 1 get Master | grep -o -E '[0-9]{2}' | head -n3 | tail -n1}
]]
conky
conky
asked 9 mins ago
dln949dln949
3611512
3611512
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1112121%2fconky-script-logging-massive-amount-of-error-messages%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1112121%2fconky-script-logging-massive-amount-of-error-messages%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown