! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Running xfce4 under vnc xfce4-session report "Another session manager is alre...
Status:
RESOLVED: MOVED
Product:
Xfce4-session
Component:
General

Comments

Description Ross Williamson 2011-04-14 20:27:40 CEST
xfce4-session reports "Another session manager is already running"

Will not start in a vnc session. I can not find any instances of xf* in ps aux
Comment 1 torquil 2011-05-25 11:31:37 CEST
I have the same problem. Can xfce4-session not be run independently on two different X displays?

It seems to be necessary to run xfce4-session in the VNC xstartup file, since simply running xfwm4 there will not give me e.g. any mouse menu in the VNC root window. But it doesn't work due to this error.
Comment 2 narrenschip1 2013-03-13 15:53:31 CET
Same problem here.

How to trigger the bug:
 1) Log into a XFCE4 session on the console
 2) start a VNC desktop with 'startxcfe4' in your ~/.vnc/xstartup
 3) log into the VNC session and admire the blank screen

There's 1 very crude workaround I know of and that's starting the VNC session before starting a XFCE4 session on the console.

I found this while googling around for a solution:
commit b0eec65b45fe4417351ca86f85095232df6d2f95
Author: Benedikt Meurer <benny@xfce.org>
Date:   Thu Dec 11 17:09:25 2003 +0000

    Added check to see if another session is already running.

Dog only knows why Benny thought it was a good idea to allow only 1 XFCE4 session running. But for some reason or another an XFCE4  session running inside VNC is not detected.


Can someone PLEASE have a look at this, or point me to a practical workaround. Fooling around with xfwm4 and xfce4-panel in my .vnc/xstartup file didn't work. xfce4-panel also complains about 'There is already a running instance'.

For me this is a real showstopper for rolling out XFCE4 as the default desktop in our department.
Comment 3 narrenschip1 2013-03-13 16:08:20 CET
(In reply to comment #2)

PS: This bug is also present in XFCE4 4.8 (on Debian Wheezy)
Comment 4 Jérôme Guelfucci editbugs 2013-03-16 18:05:30 CET
*** Bug 9918 has been marked as a duplicate of this bug. ***
Comment 5 Jérôme Guelfucci editbugs 2013-03-16 18:05:40 CET
*** Bug 9916 has been marked as a duplicate of this bug. ***
Comment 6 Alexis Huxley 2014-01-29 13:15:09 CET
For those interested, you can see the code that was introduced at http://git.xfce.org/xfce/xfce4-session/tree/xfce4-session/manager.c?id=b0eec65b45fe4417351ca86f85095232df6d2f95.

In addition, I found a nice workaround, which was to strip the enviromnent
in ~/.vnc/xstartup before calling xfce4-session. The code in this the
above-mentioned change suggested it would be enough to strip SESSION_MANAGER, 
but this did not prove to be enough, so I stripped everything apart from what I
knew I needed. This gave me the following xstartup script, which worked for me:

guest@mandala:~$ cat ~/.vnc/xstartup 
#!/bin/bash

env -i /bin/sh -c "export PATH=$PATH;
                   export XAUTHORITY=$XAUTHORITY;
                   export DISPLAY=$DISPLAY;
                   export HOME=$HOME;
                   export LOGNAME=$LOGNAME;
                   export USER=$USER;
                   /usr/bin/xfce4-session"
guest@mandala:~$ 

I hope that helps somebody!
Comment 7 Alexis Huxley 2014-01-29 13:57:34 CET
Minor refinements to workaround script at http://dione.no-ip.org/wordpress/computing/configuring-desktop-environment/
Comment 8 Jon Niehof 2014-10-17 17:15:21 CEST
Following up on Alexis' workaround, it is sufficient to undefine SESSION_MANAGER and DBUS_SESSION_BUS_ADDRESS. This does not need to be done in xstartup, but can be done when starting the vnc session:
env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS vncserver
which leaves xsession alone.
One could also edit the vncserver script and fandango on %ENV before the system call, which might be easier than editing every user's .xsession.
Comment 9 Ilya Basin 2019-01-05 15:37:36 CET
I start Xvnc using the lightdm feature as described here: https://wiki.archlinux.org/index.php/LightDM#VNC_Server
I don't use the vncserver wrapper. The environment is already clean: only PATH is set.

It is to show the greeter, I guess, and let the user type the password in the greeter's dialog.

Therefore, I don't see a way to prevent the greeter from setting SESSION_MANAGER and DBUS_SESSION_BUS_ADDRESS
Comment 10 Ilya Basin 2019-01-05 16:44:59 CET
My workaround is to unset DBUS_SESSION_BUS_ADDRESS at the beginning of /etc/lightdm/Xsession, however, the unneeded dbus-daemon started by its parent remains
Comment 11 Git Bot editbugs 2020-05-26 00:42:12 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-session/-/issues/6.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #7502

Reported by:
Ross Williamson
Reported on: 2011-04-14
Last modified on: 2020-05-26
Duplicates (2):
  • 9916 Running xfce4 under vnc xfce4-session report "Another session manager is already running"
  • 9918 Running xfce4 under vnc xfce4-session report "Another session manager is already running"

People

Assignee:
Xfce Bug Triage
CC List:
6 users

Version

Attachments

Additional information