在 Google 上搜索了一段时间后,我仍然无法(-.-)找到解决方案:
我想通过终端告知我的标准(如设置中所述)music/video player
。但例如play/stop/next
使用global command
and not命令。/usr/bin/banshee --next
这是我目前发现的:X86AudioNext(键盘键)、xmodmap(键盘键的组织)。
答案1
答案2
这个问题很老了,但似乎得到很多的浏览量,所以我将分享另一个对我有用的解决方案。
安装该playerctl
程序。它还提供了通过 MPRIS 控制播放器的方法,但可从 Ubuntu 存储库获取。
playerctl --help
Usage:
playerctl [OPTION…] COMMAND - Controller for media players
For players supporting the MPRIS D-Bus specification
Help Options:
-h, --help Show help options
Application Options:
-p, --player=NAME A comma separated list of names of players to control (default: the first available player)
-a, --all-players Select all available players to be controlled
-i, --ignore-player=IGNORE A comma separated list of names of players to ignore.
-f, --format A format string for printing properties and metadata
-F, --follow Block and append the query to output when it changes for the most recently updated player.
-l, --list-all List the names of running players that can be controlled
-v, --version Print version information
Available Commands:
play Command the player to play
pause Command the player to pause
play-pause Command the player to toggle between play/pause
stop Command the player to stop
next Command the player to skip to the next track
previous Command the player to skip to the previous track
position [OFFSET][+/-] Command the player to go to the position or seek forward/backward OFFSET in seconds
volume [LEVEL][+/-] Print or set the volume to LEVEL from 0.0 to 1.0
status Get the play status of the player
metadata [KEY...] Print metadata information for the current track. If KEY is passed,
print only those values. KEY may be artist,title, album, or any key found in the metadata.
open [URI] Command for the player to open given URI.
URI can be either file path or remote URL.
loop [STATUS] Print or set the loop status.
Can be "None", "Track", or "Playlist".
shuffle [STATUS] Print or set the shuffle status.
Can be "On" or "Off".