Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-08-22 01:01:30

jfmxl
Member
Registered: 2015-05-21
Posts: 25

starting X and xfce

HI,

I'm in the midst of what looks to be a week long installation of gentoo and I'm using xfce as my window manager.

What ought I to put in my .xinitrc ... or how do you start xfce on your machines?

Offline

#2 2015-08-22 01:47:05

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: starting X and xfce

I'm in the midst of what looks to be a week long installation of gentoo

Pace yourself. Drink plenty of fluids....

.
     
On my Arch machine, I start X via startx. Specifically::

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -keeptty -nolisten tcp > ~/.xsession-errors 2>&1

I do the XDG_VTNR check so that only runs on tty1 and I log all messages to ~/.xsession-errors.

My ~/.xinitrc looks like:

#!/bin/bash

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

source /etc/xdg/xfce4/xinitrc

exit 0

The first part sources all of the support files in /etc/X11/xinit/xinitrc.d (dbus, sound events module) and the second part runs the Xfce built-in xinitrc file (which starts xfce4-session). I've edited this particular file to add after the start of xfce4-session (minus the +s of course):

    xfce4-session
  fi

+  # Cleanup after the session if desired
+  test -r $HOME/.logout && . $HOME/.logout
+  
  exit 0
fi

...so that I can create a ~/.logout file to manually run scripts/commands on logout.

.


For my Xubuntu machine, I just use the default lightdm DM.


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 ---

Offline

#3 2015-08-22 01:51:17

jfmxl
Member
Registered: 2015-05-21
Posts: 25

Re: starting X and xfce

Here's what happens now ...

jfl@wsgen ~ $ startxfce4
/usr/bin/startxfce4: Starting X server


X.Org X Server 1.16.4
Release Date: 2014-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.0.5-gentoo x86_64 Gentoo
Current Operating System: Linux wsgen 4.0.5-gentoo #7 SMP Thu Aug 20 13:45:45 ICT 2015 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-4.0.5-gentoo root=UUID=3018dffe-7bbe-4c4b-a2b6-fbff57e8dda8 ro
Build Date: 19 August 2015  05:41:32PM

Current version of pixman: 0.32.6
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Aug 22 08:42:55 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) [KMS] Kernel modesetting enabled.
xfce4-session: No GPG agent found

(xfce4-session:11045): xfce4-session-WARNING **: xfsm_manager_load_session: Something wrong with /home/jfl/.cache/sessions/xfce4-session-wsgen:0, Does it exist? Permissions issue?

(xfsettingsd:11064): libupower-glib-WARNING **: Couldn't connect to proxy: Could not connect: No such file or directory

(polkit-gnome-authentication-agent-1:11066): polkit-gnome-1-WARNING **: Error getting authority: Error initializing authority: Could not connect: No such file or directory

** (xfdesktop:11065): WARNING **: Thumbnailer failed calling GetFlavors

(xfdesktop:11065): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with dbus name org.gtk.Private.UDisks2VolumeMonitor is not supported

(xfsettingsd:11076): libupower-glib-WARNING **: Couldn't connect to proxy: Could not connect: No such file or directory

(xfwm4:11056): xfwm4-WARNING **: Error opening /dev/dri/card0: Permission denied

That doesn't look so good to me.

jfl@wsgen ~ $ ls -l  /home/jfl/.cache/sessions/xfce4-session-wsgen:0
ls: cannot access /home/jfl/.cache/sessions/xfce4-session-wsgen:0: No such file or directory
jfl@wsgen ~ $ ls -l  /home/jfl/.cache/sessions/
total 0
jfl@wsgen ~ $
jfl@wsgen ~ $ ls -l  /dev/dri/card0
crw-rw---- 1 root video 226, 0 Aug 22 02:23 /dev/dri/card0

Can you suggest a link to a good explanation of how to setup xfce, on gentoo?

Offline

#4 2015-08-22 01:57:52

jfmxl
Member
Registered: 2015-05-21
Posts: 25

Re: starting X and xfce

Sorry, I posted again before I saw your answer, I'll try to copy your method and see what happens.

Offline

#5 2015-08-22 02:05:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: starting X and xfce

Its been quite a few years since I installed and ran gentoo and I'm not sure I'll be able to provide much advice. However...

There is this guide. It talks about consolekit - do you have that installed?

.

jfl@wsgen ~ $ ls -l  /home/jfl/.cache/sessions/xfce4-session-wsgen:0
ls: cannot access /home/jfl/.cache/sessions/xfce4-session-wsgen:0: No such file or directory
jfl@wsgen ~ $ ls -l  /home/jfl/.cache/sessions/
total 0

I wouldn't worry too much about this - you won't have this file until you successfully log out at least once.

.

(xfwm4:11056): xfwm4-WARNING **: Error opening /dev/dri/card0: Permission denied

Maybe an issue with the video driver?


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 ---

Offline

#6 2015-08-22 02:08:36

jfmxl
Member
Registered: 2015-05-21
Posts: 25

Re: starting X and xfce

just for completeness ...

# clicked log out

(xfce4-session:11045): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

(xfce4-session:11045): Gtk-CRITICAL **: IA__gtk_widget_set_visible: assertion 'GTK_IS_WIDGET (widget)' failed

# clicked log out button

(xfce4-session:11045): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
xinit: connection to X server lost

waiting for X server to shut down xscreensaver: 09:04:50: SIGHUP received: restarting...
xscreensaver: 09:04:50: running as jfl/jfl (1000/1000)

xscreensaver: 09:04:50: Can't open display: :0.0
xscreensaver: 09:04:50: running as jfl/jfl (1000/1000)

xscreensaver: 09:04:50: Errors at startup are usually authorization problems.
              But you're not logging in as root (good!) so something
              else must be wrong.  Did you read the manual and the FAQ?

              http://www.jwz.org/xscreensaver/faq.html
              http://www.jwz.org/xscreensaver/man.html

(EE) Server terminated successfully (0). Closing log file.

I guess I'll read the manual and the FAQ ... although the screen saver seems the least of my problems.

Offline

#7 2015-08-22 02:59:33

jfmxl
Member
Registered: 2015-05-21
Posts: 25

Re: starting X and xfce

Well ... I made my initialization files look like yours ...

jfl@wsgen ~ $ [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -keeptty -nolisten tcp > ~/.xsession-errors 2>&1

... nothing happened ...

jfl@wsgen ~ $ echo $DISPLAY

jfl@wsgen ~ $ echo $?
0
jfl@wsgen ~ $ echo $XDG_VTNR

jfl@wsgen ~ $ echo $?
0

... so I just pretended everything was OK ..

jfl@wsgen ~ $ startx -- -keeptty -nolisten tcp > ~/.xsession-errors 2>&1

... cat ~/.xsession-errors

xauth:  file /home/jfl/.serverauth.11295 does not exist


X.Org X Server 1.16.4
Release Date: 2014-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.0.5-gentoo x86_64 Gentoo
Current Operating System: Linux wsgen 4.0.5-gentoo #7 SMP Thu Aug 20 13:45:45 ICT 2015 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-4.0.5-gentoo root=UUID=3018dffe-7bbe-4c4b-a2b6-fbff57e8dda8 ro
Build Date: 19 August 2015  05:41:32PM

Current version of pixman: 0.32.6
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Aug 22 09:40:44 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) [KMS] Kernel modesetting enabled.
xfce4-session: No GPG agent found

(xfwm4:11360): xfwm4-WARNING **: Error opening /dev/dri/card0: Permission denied

** (xfdesktop:11364): WARNING **: Thumbnailer failed calling GetFlavors

(xfdesktop:11364): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with dbus name org.gtk.Private.UDisks2VolumeMonitor is not supported

(xfsettingsd:11370): libupower-glib-WARNING **: Couldn't connect to proxy: Could not connect: No such file or directory

(polkit-gnome-authentication-agent-1:11366): polkit-gnome-1-WARNING **: Error getting authority: Error initializing authority: Could not connect: No such file or directory

(xfce4-session:11354): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

(xfce4-session:11354): Gtk-CRITICAL **: IA__gtk_widget_set_visible: assertion 'GTK_IS_WIDGET (widget)' failed

(xfce4-session:11354): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
xinit: connection to X server lost

waiting for X server to shut down xscreensaver: 09:41:48: SIGHUP received: restarting...
xscreensaver: 09:41:48: running as jfl/jfl (1000/1000)

xscreensaver: 09:41:48: Can't open display: :0.0
xscreensaver: 09:41:48: running as jfl/jfl (1000/1000)

xscreensaver: 09:41:48: Errors at startup are usually authorization problems.
              But you're not logging in as root (good!) so something
              else must be wrong.  Did you read the manual and the FAQ?

              http://www.jwz.org/xscreensaver/faq.html
              http://www.jwz.org/xscreensaver/man.html

(EE) Server terminated successfully (0). Closing log file.


I am presently trying the patience of at least one kind 'watchman' at gentoo ... but if you have any observations I'm all ears.

Thanks for your help.

Offline

#8 2015-09-08 19:37:51

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: starting X and xfce

Hi there, (occasional) gentoo user here.

This is what I do: at the end of ~/.bashrc I added:

if [ $(tty) = "/dev/tty1" ]; then
        exec startx
fi

i.e. starting on tty1 exec startx. Seems like a cleaner solution to me than relying on "$XDG_VTNR". And it's good idea to use exec, otherwise when you lock the screen and leave your computer, someone can come, ctrl+alt+f1, ctrl+c - and has access to shell smile

single line in ~/.xinitrc

exec startxfce4 --with-ck-launch

That's all that was needed in my case.

I remember having problems on gentoo, "--with-ck-launch" fixed them. Hope this helps.

Edit: also perhaps check groups the user is member of - among others, I have "wheel audio video"

Last edited by apurkrt (2015-09-08 19:52:01)

Offline

#9 2015-12-01 21:45:54

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: starting X and xfce

I was getting the same "(xfsettingsd:11076): libupower-glib-WARNING **: Couldn't connect to proxy: Could not connect: No such file or directory" error as jfmxl, followed by xfsettingsd crashing (you can see that in dmesg), on a new Gentoo installation. The result was that none of the Xfce settings were being taken into account (wrong theme, wrong keyboard layout…).

For me the solution was to enable the consolekit service: "rc-update add consolekit".

"startxfce4 --with-ck-launch" didn’t work, but now I can just "startxfce4" and my settings work fine.

Offline

Board footer

Powered by FluxBB