Opendigitalradio / dablin

DAB/DAB+ receiver for Linux (including ETI-NI and EDI AF playback)
GNU General Public License v3.0
123 stars 27 forks source link

Gtk-WARNING - Debian 9 Mate #34

Closed LyonelB closed 6 years ago

LyonelB commented 6 years ago

Hi,

I can not start the dablin_GTK program

odr@debian:~$ dablin_gtk
DABlin v1.7.0 - capital DAB experience
Plays a DAB/DAB+ audio service from a frame-aligned ETI-NI stream.
  https://github.com/Opendigitalradio/dablin

No protocol specified
Unable to init server: Impossible de se connecter : Connexion refusée

(dablin_gtk:4833): Gtk-WARNING **: cannot open display: :0

and when I'm root, it's works

basicmaster commented 6 years ago

Hi Lyonel,

hmm, this is strange. You definitely don't need to be root to use dablin. Did you install dablin via the package sources or did you compile it yourself? Just to eliminate that option: Are you possibly logged in remote on the affected PC e.g. via SSH?

LyonelB commented 6 years ago

Hello I compile it myself

$ su
$ adduser odr
$ visudo -f /etc/sudoers
$ exit
$ su odr
$ sudo apt-get install libmpg123-dev libfaad-dev libsdl2-dev libgtkmm-3.0-dev
$ git clone https://github.com/Opendigitalradio/dablin.git
$ cd dablin
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install

I'm not logged in remote on the affected PC

basicmaster commented 6 years ago

Hmm, and you are logged in to the MATE desktop also as odr?

LyonelB commented 6 years ago

No, i'm logged in to the Mate with the default user then with odr

Le 13 févr. 2018 22:41, "Stefan Pöschel" notifications@github.com a écrit :

Hmm, and you are logged in to the MATE desktop also as odr?

basicmaster commented 6 years ago

OK, in that case the reason is that the MATE desktop is running under a different user as dablin itself - the X server then does not allow the odr user to access the display.

Is there a specific need to execute dablin as odr? If so, you could use xhost to allow access, e.g. xhost +local: (please check the man page, to prevent any possible security issues).

LyonelB commented 6 years ago

Yes ! It works with the default user.

But ...

  odr@debian:~$ xhost +local
  No protocol specified
  xhost:  unable to open display ":0"
basicmaster commented 6 years ago

There is a colon at the end of the xhost command that is missing here.

LyonelB commented 6 years ago

odr@debian:~$ xhost +local: No protocol specified xhost: unable to open display ":0"

basicmaster commented 6 years ago

And the command has to be executed under the user of the MATE desktop (not as odr) to share the existing display with other users like odr. :-)

LyonelB commented 6 years ago

Oups.

graffiti@debian:~$ xhost +local:
non-network local connections being added to access control list
graffiti@debian:~$ su odr
Mot de passe : 
odr@debian:/home/graffiti$ cd
odr@debian:~$ /home/odr/ODR-Mux/dab/mmbtools-aux/zmqtest/zmq-sub/zmq-sub 127.0.0.1 18081 | dablin_gtk -s 0xF005
zmq-sub ETI reader version g3fe85b5
connecting to tcp://127.0.0.1:18081
connect 0
subscribe 0
DABlin v1.7.0 - capital DAB experience
Plays a DAB/DAB+ audio service from a frame-aligned ETI-NI stream.
  https://github.com/Opendigitalradio/dablin

** (dablin_gtk:9142): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 1001), but by uid 1000! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
basicmaster commented 6 years ago

I get the same message and after some seconds the dablin GUI is shown. However when I try to play a station, dablin crashes, as no audio device is available. I guess that this has a similar reason and requires further commands.

So is there a particular reason why you have to execute dablin as odr? It would be much easier to run it as the current user and I cannot think of any limitations doing that.

basicmaster commented 6 years ago

As this issue is solved, at least regarding the dablin part, I close here for now.