You are not logged in.
I'm revisiting this topic as I have a new XUbuntu 15.10 installation and I have the same problem:
xfce4-session-logout fails with a session error. I get a dialog:
Received error while trying to log out
Could not get owner of name
'org.xfce.SessionManager': no such name
X starts (using lightdm) and I select an XFCE4 session and log in.
My session init script runs but xfce4-session is not running.
Here are processes related to "session"
$ ps -efl | grep session | grep -v grep
4 S root 1434 981 0 80 0 - 57566 wait 12:13 ? 00:00:00 lightdm --session-child 12 21
4 S sasdjb 1451 1434 0 80 0 - 3137 wait 12:13 ? 00:00:00 /bin/bash /usr/sbin/lightdm-session startxfce4
1 S sasdjb 1517 1 0 80 0 - 9721 poll_s 12:13 ? 00:00:00 dbus-launch --sh-syntax --exit-with-session
1 S sasdjb 1518 1 0 80 0 - 10902 ep_pol 12:13 ? 00:00:01 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
0 S sasdjb 1583 1 0 80 0 - 51707 poll_s 12:13 ? 00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
I thought the display manager was supposed to start the session? (http://linux.die.net/man/1/xfce4-session says that at least)
http://manpages.ubuntu.com/manpages/viv … ce4.1.html says "startxfce4 - initialize an Xfce session".
$ type xfce4-session
xfce4-session is /usr/bin/X11/xfce4-session
/var/log/lightdm/lightdm.log shows
....
[+22.81s] DEBUG: Seat seat0: Greeter stopped, running session
[+22.81s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+22.81s] DEBUG: Session pid=1434: Running command /usr/sbin/lightdm-session startxfce4
[+22.81s] DEBUG: Creating shared data directory /var/lib/lightdm-data/sasdjb
[+22.81s] DEBUG: Session pid=1434: Logging to .xsession-errors
[+22.83s] DEBUG: Activating VT 7
[+22.83s] DEBUG: Activating login1 session c2
[+22.84s] DEBUG: Seat seat0 changes active session to c2
[+22.84s] DEBUG: Session c2 is already active
[+28.10s] DEBUG: User /org/freedesktop/Accounts/User394 added
Offline
My session init script runs but xfce4-session is not running.
Which session init script are you referring to?
Here are processes related to "session"
$ ps -efl | grep session | grep -v grep 4 S root 1434 981 0 80 0 - 57566 wait 12:13 ? 00:00:00 lightdm --session-child 12 21 4 S sasdjb 1451 1434 0 80 0 - 3137 wait 12:13 ? 00:00:00 /bin/bash /usr/sbin/lightdm-session startxfce4 1 S sasdjb 1517 1 0 80 0 - 9721 poll_s 12:13 ? 00:00:00 dbus-launch --sh-syntax --exit-with-session 1 S sasdjb 1518 1 0 80 0 - 10902 ep_pol 12:13 ? 00:00:01 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session 0 S sasdjb 1583 1 0 80 0 - 51707 poll_s 12:13 ? 00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
xfce4-session should be in that list.
$ type xfce4-session xfce4-session is /usr/bin/X11/xfce4-session
??? Why is xfce4-session in /usr/bin/X11? The default xubuntu install has it in /usr/bin. If /usr/bin/X11 is not in your path, then the system will never know how to find the xfce4-session executable to start it.
But more importantly, how is that your Xfce install is different from stock Xubuntu? What changes have you made?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
This is pretty stock XUbuntu 15.10 - I just installed it on Jan 15 2016.
On my system /usr/bin/x11 is a symlink to /usr/bin (I suppose for backwards compatibility for scripts that expect some X clients to be in /usr/bin/X11).
/usr/bin/x11 just happens to appear in my PATH before /usr/bin/ so `type` showed the first match. `type -a` shows it is in /usr/bin.
# type -a xfce4-session
xfce4-session is /usr/bin/X11/xfce4-session
xfce4-session is /usr/bin/xfce4-session
You say xfce4-session should be running. When I log on with lightdm in an XFCE4 session, it is not running. That is the gist of my question:
Why is it not running, and how do I fix it (so that xfce4-session-logout will work). Do I need to change lightdm.conf and if so how?
My ~/.xsession script runs at login. I have a ~/.config/xfce4/xinitrc script but it does not run, only .xsessionrc
hope this helps.
thanks
Offline
This is pretty stock XUbuntu 15.10 - I just installed it on Jan 15 2016.
My ~/.xsession script runs at login
Stock Xubuntu doesn't come with a ~/.xsessionrc file. Can you post it's contents?
/usr/bin/x11 just happens to appear in my PATH before /usr/bin/
As well as your path:
echo $PATH
Why is it not running,
I'm guessing something related to the above two or its crashing on startup. Try running "/usr/bin/xfce4-session" manually and see what happens - maybe some error messages will display.
Also look at your log files (~/.xsession-errors and ~/.cache/upstart/startxfce4.log) to see if there is anything there about xfce4-session.
Can you also create a new test user account. Don't change any of the startup or configuration files and see if it works and whether xfce4-session starts?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
A test account works - I get a desktop with xfce4-panel and xfce-panel is running.
It appears if ~/.config/xfce4/xinitrc exists then XFCE4 will run that and not use xfce4-session at all.
I verified that by creating a simple xinitrc file for the new test user:
echo xfce4-terminal > ~/.config/xfce4/xinitrc
chmod +x ~/.config/xfce4/xinitrc
and logging out and logging back in. The terminal started, but there is no xfce4-session, no panel, no window manager, etc.
How to I run a xfce4 session *and* run a startup script? I want to do that because my script
sets critical environment variables that I want all my apps to inherit. Those env vars do not get set when I start with no startup script.
I don't want to run xfce4-panel, xfwm4; I want to run openbox / plank etc. -- thinks I launch from my xinitrc after setting my
env vars.
Is there some doc on the whole startup/login/session sequence, what scripts get run, etc.?
Offline
Ok. So you want to run openbox (instead of xfwm4), plank (instead of xfce4-panel), you want xfce4-session to still manage the session, and you want to set some environment variables. Got it.
1. Remove all of the .xsession and xinitrc files that you created in your user configurations and log out and back in again to get back to a regular xubuntu desktop.
2. Go to Settings Manager > Session and startup > Session tab and "Clear saved sessions". (from the Whisker Menu, look for Session and Startup in the Settings submenu.)
3. While still in the Sessions Tab, change the xfwm4 Restart Style to "Never" and while xfwm4 is still selected, click on "Quit Program"
4. Do the same for xfce4-panel.
5. Alt+F2 and execute "openbox". (It will show up in the sessions list).
6. If you don't want xfdesktop to manage the desktop (wallpaper, icons, desktop menu), then also change its Restart Style to Never and quit the program here. (Otherwise you won't see the openbox desktop menu).
7. Go to the Application Autostart tab and add an entry for plank.
8. Go back to the Session tab and "Save Session".
9. Log out and back in again to test:
xfce4-session-logout -l
10. For environment variables, first determine if you need session or system ones. There is information in that link on how to set them in Ubuntu (session goes into ~/.pam_environment or ~/.profile and system goes into /etc/environment or /etc/profile.d).
Caveat: I've never used this setup - just went through the steps now to figure out how to do it. Hopefully this works for you as well.
Is there some doc on the whole startup/login/session sequence, what scripts get run, etc.?
Not that I am aware of, but Xfce is usually started by running the "startxfce4" executable (in Xubuntu, see the desktop files in /usr/share/xsessions that lightdm will use). startxfce4 is a script file. You can trawl through it to see what gets executed and when. If no local xinitrc file exists, it will use /etc/xdg/xfce4/xinitrc. This file contains all the code to start the components of Xfce (including xfce4-session), so if it is overridden, you will run into problems.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Online
Can you call it in your custom script, as the #1 item?
Regards,
MDM
Offline
Ok. So you want to run openbox (instead of xfwm4), plank (instead of xfce4-panel), you want xfce4-session to still manage the session, and you want to set some environment variables. Got it.
Thanks! With this info I was able to get my session running as I want. I put all my startup stuff that was in xinit into a different script and added that to my xfce4-session-settings (which created a .desktop file in ~/.config/autostart). all my apps are also running with the correct env from my ~/.login.
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 615.97 KiB (Peak: 632.81 KiB) ]