Bug 11616

Summary: libreoffice/thunderbird will not run through ssh - dbus error
Product: Mageia Reporter: Frank Griffin <ftg>
Component: RPM PackagesAssignee: All Packagers <pkg-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: doktor5000, mageia, onizar.tomi0, pablo
Version: CauldronKeywords: Triaged
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Frank Griffin 2013-11-07 16:18:20 CET
Trying to run LO from an ssh command line gives the following errors:

[ftg@ftgme2 ~]$ soffice
LibreOffice(31449)/kdeui (kdelibs): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch) 
[ftg@ftgme2 ~]$ 

This used to work fine.  I first noticed this trying to open LO attachments in Thunderbird running through ssh; you'd get the splashscreen popup, and then it would just silently fail.

Reproducible: 

Steps to Reproduce:
Comment 1 Frank Griffin 2013-11-07 16:24:39 CET
If I issue the command in the message, soffice works.
Manuel Hiebel 2013-11-08 19:48:31 CET

Keywords: (none) => Triaged
Assignee: bugsquad => thierry.vignaud

Comment 2 Manuel Hiebel 2013-11-08 19:49:25 CET
*** Bug 11615 has been marked as a duplicate of this bug. ***
Manuel Hiebel 2013-11-08 19:50:12 CET

Source RPM: libreoffice => systemd ?
CC: (none) => mageia
Assignee: thierry.vignaud => bugsquad
Summary: libreoffice will not run through ssh - dbus error => libreoffice/thunderbird will not run through ssh - dbus error

Comment 3 Colin Guthrie 2013-11-08 22:35:28 CET
I've always had issues with running e.g. Firefox on a remote system because it cannot connect to the session bus. This is pretty much a by product of not starting a proper user session (e.g. launching dbus) when logging in to a remote machine.

This isn't particularly a recent problem nor something with e.g. systemd, but just a by product of more things using dbus.

Longer term, we *can* fix this. It'll be fixed by using systemd user sessions. This means that logging into a text session, be it via SSH or on a tty will start a user session manager in the same way X11 startup sequence starts soemthing equiv to this.

Actually pam_systemd does alreayd start a systemd user session for you, but it's not yet matured to the state where it will actually be able to do things like starting dbus for you and then ensuring that's available to applications (by exporting the DBUS_SESSION_BUS_ADDRESS env var to the shell). But long term this is the goal.

So not sure what to say for now... This is just the by product of more things wanting dbus.
Comment 4 Frank Griffin 2015-01-02 16:02:47 CET
Ping ?
Florian Hubold 2015-04-01 21:15:29 CEST

CC: (none) => doktor5000

Comment 5 Pablo Saratxaga 2015-07-09 19:24:46 CEST
Here is a section of my ~/.bash_profile (run when a new session is created) when

CC: (none) => pablo

Comment 6 Pablo Saratxaga 2015-07-09 19:29:57 CEST
Here is a section of my ~/.bash_profile (run when a new session is created) when an incoming ssh and graphical session is detected, it looks if a usable dbus is present, if yes exports the DBUS_SESSION_BUS_PID, if not launches a new one.

if it seems sufficiently correct/robust it could be put on /etc/profile

It works very well for incoming sessions from windows (putty+Xming)

  # set dbus for remote connections
  if [ -n "$SSH_CLIENT" -a -n "$DISPLAY" ]; then
        machine_id=$(LANGUAGE=C hostnamectl|grep 'Machine ID:'| sed 's/^.*: //')
        x_display=$(echo $DISPLAY|sed 's/^.*:\([0-9]\+\)\(\.[0-9]\+\)*$/\1/')
        dbus_session_file="$HOME/.dbus/session-bus/${machine_id}-${x_display}"
        if [ -r "$dbus_session_file" ]; then
                export $(grep '^DBUS.*=' "$dbus_session_file")
                # check if PID still running
                ps $DBUS_SESSION_BUS_PID | tail -1 | grep dbus-daemon >& /dev/null
                [ "$?" != "0" ] && \
                        export $(dbus-launch) >& /dev/null
        else
                export $(dbus-launch) >& /dev/null
        fi
        unset machine_id x_display dbus_session_file
  fi
Samuel Verschelde 2016-10-16 15:27:19 CEST

Assignee: bugsquad => pkg-bugs
Source RPM: systemd ? => (none)

Comment 7 Frank Griffin 2019-02-19 22:53:30 CET
Working now.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 8 Freya Saunders 2020-11-30 13:53:34 CET
Bugs and all majesty of the town are identified for the approval of the turns. The statement of the team and https://topessaybrands.com/review/academized-com-review/ is filled for the approval for the themes. The society’s engaged for the toy light for the approval for the signature for the field for members.

CC: (none) => onizar.tomi0