Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playerctl ( mpris ) does not work with musikcube on systemd-free distribution #668

Open
jvc84 opened this issue Mar 10, 2024 · 1 comment

Comments

@jvc84
Copy link

jvc84 commented Mar 10, 2024

I tried to use playerctl to control musikcube playback, but on Artix musikcube didn't provide any mpris interface.
Muiskcube mpris plugin supports libelogind instead of libsystemd but you need to replace it manually.

Installation of musikcube with mpris support on systemd-free distribution (originals of changed files will be saved as <filename>.<extention>.bak):

  1. Install musikcube from source:

    git clone https://github.com/clangen/musikcube.git --recursive 
    cd musikcube
    
  2. Replace libsystemd requirement with libelogind:

    sed -i.bak 's/libsystemd/libelogind/g' src/plugins/mpris/CMakeLists.txt
    

    optional:

    sed -i.bak 's/libsystemd-dev/libelogind/g' script/install-deps.sh
    
  3. Build according to this instruction:
    Install dependencies.

    cmake -G "Unix Makefiles" .
    make
    

    Troubleshooting:

    3.1 itemListMap

    Solution:
    replace itemListMap with itemMap in src/plugins/taglib_plugin/TaglibMetadataReader.cpp:

     sed -i.bak 's/itemListMap/itemMap/g' src/plugins/taglib_plugin/TaglibMetadataReader.cpp
     make
    

    3.2 <ncursesw/curses.h> / <ncursesw/panel.h>

    Solution: According to the instruction "you should invoke CMake with the -DNO_NCURSESW flag as follows: cmake -DNO_NCURSESW . instead of the more standard cmake . ", but it gives error:

     CMake Error: Parse error in command line argument: NO_NCURSESW
     Should be: VAR:type=value
    

    so you should remove ncursesw/ from #include:

     sed -i.bak 's/ncursesw\///g' src/musikcube/cursespp/cursespp/curses_config.h 
     make   
    

After make completed:

sudo make install      
  1. After installation libmpris.so may not appear in /usr/local/share/musikcube/plugins or /usr/share/musikcube/plugins. In this case:
    sudo cp bin/plugins/libmpris.so /usr/local/share/musikcube/plugins 
    sudo cp bin/plugins/libmpris.so /usr/share/musikcube/plugins 
    reboot 
    

You can check if mpris plugin is running in musikcube: settings>configure plugins - it should contain string:

[x] MPRIS interface (libmpris.so)  ...

That's it. I hope this helps someone. Also share improvements of my instruction if you faced any other issues.

@Gerodote
Copy link

It works, but you need to compile musikcube with specfic cmake flags. For openrc and other elogind related: -DUSE_ELOGIND=true .

Some times ago I wrote ebuild for gentoo and it was adapted with another patch to make it link against ncurses better, thanks to some smart guys. You can see some useful stuff there . For example, if you need mpris, it depends on your service-system : if systemd , then don't add anything, because it's default, if elogind, add the mentioned flag, if basu (*BSD OSs), then another flag.

You can see the gentoo's ebuild here, for example: https://gpo.zugaina.org/AJAX/Ebuild/54112928/View

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants