# Mopidy server for desktop users

**URL:** <https://discourse.mopidy.com/t/mopidy-server-for-desktop-users/5711>\
**Category:** Help and support\
**Created:** [March 4, 2023, 5:41pm UTC](https://discourse.mopidy.com/t/mopidy-server-for-desktop-users/5711 "2023-03-04T17:41:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcfa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/rcfa/32/2368_2.png) [@rcfa](https://discourse.mopidy.com/u/rcfa)\
**Post date:** [March 4, 2023, 5:41pm UTC](https://discourse.mopidy.com/t/mopidy-server-for-desktop-users/5711/1 "2023-03-04T17:41:12Z")

</div>

The plan is, to run mopidy as service, and then be able to log in as whatever user, and control it from the web interface.

What works:

- launching mopidy as a service at system boot time
- connecting to the Iris interface
- starting some music playback
- test tone with: gst-launch-1.0 audiotestsrc ! audioresample ! pulsesink
- test tone with: gst-launch-1.0 audiotestsrc ! audioresample ! alsasink

What doesn’t work:

- sound output of any sort, not with the default autosink, nor with alsasink or pulsesink

Platform: an old MacBook Air running Kali Linux with Xfce4

Config: (output of mopidyctl config)

> [core]  
> cache\_dir = /var/cache/mopidy  
> config\_dir = /etc/mopidy  
> data\_dir = /var/lib/mopidy  
> max\_tracklist\_length = 10000  
> restore\_state = false
> 
> [logging]  
> verbosity = 0  
> format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s  
> color = false  
> config\_file =
> 
> [audio]  
> mixer = software  
> mixer\_volume =  
> output = pulsesink  
> buffer\_time =
> 
> [proxy]  
> scheme =  
> hostname =  
> port =  
> username =  
> password =
> 
> [iris]  
> enabled = true  
> country = NZ  
> locale = en\_NZ  
> verify\_certificates = true  
> snapcast\_enabled = true  
> snapcast\_host = localhost  
> snapcast\_port = 1780  
> snapcast\_ssl = false  
> snapcast\_stream = Default  
> spotify\_authorization\_url = someURL  
> lastfm\_authorization\_url = someURL  
> genius\_authorization\_url = someURL  
> data\_dir = $XDG\_DATA\_DIR/iris
> 
> [file]  
> enabled = true  
> media\_dirs =  
> $XDG\_MUSIC\_DIR|Music  
> ~/|Home  
> excluded\_file\_extensions =  
> .directory  
> .html  
> .jpeg  
> .jpg  
> .log  
> .nfo  
> .pdf  
> .png  
> .txt  
> .zip  
> show\_dotfiles = false  
> follow\_symlinks = false  
> metadata\_timeout = 1000
> 
> [http]  
> enabled = true  
> hostname = 127.0.0.1  
> port = 6680  
> zeroconf = Mopidy HTTP server on $hostname  
> allowed\_origins =  
> csrf\_protection = true  
> default\_app = mopidy
> 
> [m3u]  
> enabled = true  
> base\_dir =  
> default\_encoding = latin-1  
> default\_extension = .m3u8  
> playlists\_dir =
> 
> [softwaremixer]  
> enabled = true
> 
> [stream]  
> enabled = true  
> protocols =  
> http  
> https  
> mms  
> rtmp  
> rtmps  
> rtsp  
> metadata\_blacklist =  
> timeout = 5000
> 
> [alsamixer]  
> enabled = true  
> card = 0  
> control = Master  
> min\_volume = 0  
> max\_volume = 100  
> volume\_scale = cubic
> 
> [beets]  
> enabled = true  
> hostname = 127.0.0.1  
> port = 8337
> 
> [internetarchive]  
> enabled = true  
> base\_url = someURL  
> collections =  
> audio  
> etree  
> librivoxaudio  
> audio\_bookspoetry  
> audio\_tech  
> audio\_music  
> audio\_news  
> audio\_foreign  
> audio\_podcast  
> audio\_religion  
> audio\_formats =  
> VBR MP3  
> 64Kbps MP3  
> image\_formats =  
> JPEG  
> JPEG Thumb  
> browse\_limit = 100  
> browse\_views =  
> downloads desc|Views  
> titleSorter asc|Title  
> publicdate desc|Date Archived  
> date desc|Date Published  
> creatorSorter asc|Creator  
> search\_limit = 20  
> search\_order =  
> cache\_size = 128  
> cache\_ttl = 86400  
> retries = 3  
> timeout = 10
> 
> [local]  
> enabled = true  
> max\_search\_results = 100  
> media\_dir = /var/lib/mopidy/media  
> scan\_timeout = 1000  
> scan\_flush\_threshold = 100  
> scan\_follow\_symlinks = false  
> included\_file\_extensions =  
> excluded\_file\_extensions =  
> .cue  
> .directory  
> .html  
> .jpeg  
> .jpg  
> .log  
> .nfo  
> .pdf  
> .png  
> .txt  
> .zip  
> directories =  
> Albums local:directory?type=album  
> Artists local:directory?type=artist  
> Composers local:directory?type=artist&role=composer  
> Genres local:directory?type=genre  
> Performers local:directory?type=artist&role=performer  
> Release Years local:directory?type=date&format=%25Y  
> Tracks local:directory?type=track  
> Last Week’s Updates local:directory?max-age=604800  
> Last Month’s Updates local:directory?max-age=2592000  
> timeout = 10  
> use\_artist\_sortname = false  
> album\_art\_files =  
> \*.jpg  
> \*.jpeg  
> \*.png
> 
> [mpd]  
> enabled = true  
> hostname = 127.0.0.1  
> port = 6600  
> password =  
> max\_connections = 20  
> connection\_timeout = 60  
> zeroconf = Mopidy MPD server on $hostname  
> command\_blacklist =  
> listall  
> listallinfo  
> default\_playlist\_scheme = m3u
> 
> [mpris]  
> enabled = true  
> bus\_type = session
> 
> [podcast]  
> enabled = true  
> browse\_root = Podcasts.opml  
> browse\_order = desc  
> lookup\_order = asc  
> cache\_size = 64  
> cache\_ttl = 86400  
> timeout = 10
> 
> [podcast-itunes]  
> enabled = true  
> base\_url = someURL  
> country = US  
> explicit =  
> charts = audioPodcasts  
> charts\_limit = 20  
> search\_limit = 20  
> timeout = 10  
> retries = 3
> 
> [scrobbler]  
> enabled = false ; Extension disabled due to config errors.  
> username = ; Must be set.  
> password = ; Must be set.
> 
> [somafm]  
> enabled = true  
> encoding = mp3  
> quality = fast  
> dj\_as\_artist = true
> 
> [soundcloud]  
> enabled = false ; Extension disabled due to config errors.  
> explore\_songs = 25  
> auth\_token = ; Must be set.
> 
> [tunein]  
> enabled = true  
> timeout = 5000  
> filter =
> 
> [dleyna]  
> enabled = true  
> upnp\_browse\_limit = 500  
> upnp\_lookup\_limit = 20  
> upnp\_search\_limit = 100  
> dbus\_start\_session = dbus-daemon --fork --session --print-address=1 --print-pid=1

I strongly suspect, that this is a privilege issue, as e.g.  
gst-launch-1.0 audiotestsrc ! audioresample ! alsasink  
works in a terminal session of the logged in user, but not in a terminal session of another (e.g. root) user.

mopidy as service obviously runs as user mopidy, but equally obviously, I’m not logged in as mopidy, but some other user, so in a way, in a secure system, one would expect that mopidy can’t just pipe audio into any login session of any user.

So…  
is there a way to

- EITHER authenticate mopidy/iris to send audio directly to the hardware output
- OR to authenticate mopidy/iris to send audio pulseaudio mixer of the the logged in user session
- OR have audio sent to the browser running the iris control interface, and have the browser play back the audio within the current log in session

NB: I can’t post the unmodified config, because discourse complains about “more than URLs in a post”, so I replaced all URLs with “someURL”, but they are not something that should matter in this context, but in a different context, that limitation could be quite a nuissance…

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 6, 2023, 12:02am UTC](https://discourse.mopidy.com/t/mopidy-server-for-desktop-users/5711/2 "2023-03-06T00:02:55Z")

</div>

Did you read the section in the docs about pulse and running as a service?

Also, I would expect there to be relevant log messages when you try and play a song.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/system/32/1_2.png) [@system](https://discourse.mopidy.com/u/system)\
**Post date:** [September 4, 2023, 12:03pm UTC](https://discourse.mopidy.com/t/mopidy-server-for-desktop-users/5711/3 "2023-09-04T12:03:02Z")

</div>

Closed on September 4, 2023, 12:03pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
