Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2017 19:16:59 -0800
From:      David Christensen <dpchrist@holgerdanske.com>
To:        freebsd-questions@freebsd.org
Subject:   Second attempt at FreeBSD-11.0-RELEASE-i386, Xorg, and Xfce graphical desktop
Message-ID:  <18a5de5c-bc3a-c2e8-32c1-ea0a12d446ac@holgerdanske.com>

next in thread | raw e-mail | index | archive | help
freebsd-questions:

I currently use Debian 7 (Wheezy) with Xfce for a graphical desktop on 
my home LAN, but Wheezy is no longer fully supported (security updates 
only) and things are starting to break.  Debian 8 is not appealing.  I 
am looking for a successor.


BSD appeals to my desire for "programming systems product" -- my FOSS 
usage has been largely based on "monkey see, monkey do"; I want to 
understand, without having to crawl the source code:

https://www.pearsonhighered.com/program/Mc-Kusick-Design-and-Implementation-of-the-Free-BSD-Operating-System-The-2nd-Edition/PGM224032.html

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/

https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/

https://www.freebsd.org/cgi/man.cgi

https://www.michaelwlucas.com/os/af2e (needs updating)


Therefore, I have been evaluating various BSD distributions over the 
past several weeks using a computer with an Intel DQ67SW motherboard, 
i7-2600S CPU, 8 GB RAM, and 16 GB SATA SSD:

1.  FreeBSD requires assembling the pieces.

2.  PC-BSD is obsolete.

3.  TrueOS Desktop is the successor of PC-BSD.  Lumina was interesting, 
but IPv4 was broken OOTB.  Attempts to fix it revealed that the project 
is still unstable.

4.  GhostBSD looks polished, but crashes as soon as I try to use it.


So, I am making a second attempt at FreeBSD using:

FreeBSD-11.0-RELEASE-i386-memstick.img


The console and SSH worked as expected.  I integrated the computer into 
my LAN, updated, installed a few packages, set up toor, set up my user 
account, etc.:

dpchrist@freebsd:/usr/home/dpchrist $ freebsd-version
11.0-RELEASE-p7

dpchrist@freebsd:/usr/home/dpchrist $ uname -a
FreeBSD freebsd 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu 
Sep 29 03:40:55 UTC 2016 
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386


I then installed Xorg per the FreeBSD Manual section 5.3:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-install.html


During installation, the following was displayed:

Make sure that the freetype module is loaded.  If it is not, add the 
following
line to the "Modules" section of your X Windows configuration file:

     Load "freetype"

Add the following line to the "Files" section of X Windows configuration 
file:

     FontPath "/usr/local/share/fonts/dejavu/"

Note: your X Windows configuration file is typically /etc/X11/XF86Config
if you are using XFree86, and /etc/X11/xorg.conf if you are using X.Org.


I then configured Xorg per the instructions above and per manual section 
5.4:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html

dpchrist@freebsd:/usr/home/dpchrist $ grep wheel /etc/group
wheel:*:0:root,freebsd,dpchrist

dpchrist@freebsd:/usr/home/dpchrist $ grep vt /boot/loader.conf
kern.vty=vt

dpchrist@freebsd:/usr/home/dpchrist $ cat /usr/local/etc/X11/xorg.conf
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/share/fonts/misc/"
	FontPath     "/usr/local/share/fonts/TTF/"
	FontPath     "/usr/local/share/fonts/OTF/"
	FontPath     "/usr/local/share/fonts/Type1/"
	FontPath     "/usr/local/share/fonts/100dpi/"
	FontPath     "/usr/local/share/fonts/75dpi/"
	FontPath     "/usr/local/share/fonts/dejavu/"
EndSection

Section "Module"
	Load  "glx"
	Load  "freetype"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
         ### Available Driver options are:-
         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
         ### <percent>: "<f>%"
         ### [arg]: arg optional
         #Option     "NoAccel"            	# [<bool>]
         #Option     "AccelMethod"        	# <str>
         #Option     "Backlight"          	# <str>
         #Option     "DRI"                	# <str>
         #Option     "ColorKey"           	# <i>
         #Option     "VideoKey"           	# <i>
         #Option     "Tiling"             	# [<bool>]
         #Option     "LinearFramebuffer"  	# [<bool>]
         #Option     "SwapbuffersWait"    	# [<bool>]
         #Option     "TripleBuffer"       	# [<bool>]
         #Option     "XvPreferOverlay"    	# [<bool>]
         #Option     "HotPlug"            	# [<bool>]
         #Option     "ReprobeOutputs"     	# [<bool>]
         #Option     "XvMC"               	# [<bool>]
         #Option     "ZaphodHeads"        	# <str>
         #Option     "TearFree"           	# [<bool>]
         #Option     "PerCrtcPixmaps"     	# [<bool>]
         #Option     "FallbackDebug"      	# [<bool>]
         #Option     "DebugFlushBatches"  	# [<bool>]
         #Option     "DebugFlushCaches"   	# [<bool>]
         #Option     "DebugWait"          	# [<bool>]
         #Option     "BufferCache"        	# [<bool>]
	Identifier  "Card0"
	Driver      "intel"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection


Running 'startx' at this point launched TWM, which seemed to work at a 
basic level (I am not a TWM user).


(I could find no way to stop TWM -- clicking on the desktop and 
selecting the Exit item caused all the windows to go goofy, but still 
left TWM running.  More poking, RTFM, STFW, etc., failed to produce a 
solution.  I got lucky and tried typing 'exit' into all the terminal 
windows.  Typing 'exit' into 'login' terminal window causes TWM to exit.)


I skipped manual sections 5.5 (fonts) and 5.6 (xdm).


(During my previous evaluation, I could find no way to exit XDM. 
Someone suggested pushing the power button.  STFW I found a guy who 
wrote Tcl/Tk code for shutdown and restart buttons -- too much work.)


I then installed Xfce per manual section 5.7:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x11-wm.html


Upon installation, the following was displayed:

To be able to shutdown or reboot your system, you'll have to add .rules
files in /usr/local/etc/polkit-1/rules.d directory. Which looks
like this (replace PUTYOURGROUPHERE by your group):

polkit.addRule(function (action, subject) {
   if ((action.id == "org.freedesktop.consolekit.system.restart" ||
       action.id == "org.freedesktop.consolekit.system.stop")
       && subject.isInGroup("PUTYOURGROUPHERE")) {
     return polkit.Result.YES;
   }
});

For those who have working suspend/resume:

polkit.addRule(function (action, subject) {
   if (action.id == "org.freedesktop.consolekit.system.suspend"
       && subject.isInGroup("PUTYOURGROUPHERE")) {
     return polkit.Result.YES;
   }
});


I added the suggested file, using my login group:

toor@freebsd:/root # cat 
/usr/local/etc/polkit-1/rules.d/60-restart-stop.rules
polkit.addRule(function (action, subject) {
   if (action.id == "org.freedesktop.consolekit.system.suspend"
       && subject.isInGroup("dpchrist")) {
     return polkit.Result.YES;
   }
});


I created the Xorg resource script per the manual:

dpchrist@freebsd:/usr/home/dpchrist $ cat .xinitrc
exec /usr/local/bin/startxfce4 --with-ck-launch


startx now launches Xfce, which seems to mostly work:


1.  Application Menu -> Log Out dialog Shut Down and Restart options are 
grayed out.


I would like to get the Shut Down and Restart capabilities working in 
Xfce.  On my previous attempt, someone suggested that I need to use a 
specific group (operator?).  I would prefer to use or create a group 
specifically for X users (xusers?).


2.  Upon log out, I see a fair amount of text on the console; some of 
which implies issues:

dpchrist@freebsd:/usr/home/dpchrist $ cat startx.script
Script started on Mon Jan 16 17:16:59 2017
Command: startx
xauth:  file /home/dpchrist/.serverauth.786 does not exist


X.Org X Server 1.17.4
Release Date: 2015-10-28
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 11.0-RELEASE-p7 i386
Current Operating System: FreeBSD freebsd 11.0-RELEASE-p1 FreeBSD 
11.0-RELEASE-p1 #0 r306420: Thu Sep 29 03:40:55 UTC 2016 
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
Build Date: 12 January 2017  06:45:48AM

Current version of pixman: 0.34.0
	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: Mon Jan 16 17:16:59 2017
(==) Using config file: "/usr/local/etc/X11/xorg.conf"
/usr/local/bin/startxfce4: X server already running on display :0
xfce4-session: No GPG agent found

(xfsettingsd:823): GVFS-RemoteVolumeMonitor-WARNING **: remote volume 
monitor with dbus name org.gtk.vfs.HalVolumeMonitor is not supported
DBG[workspaces.c:456] 
xfce_workspaces_helper_wait_for_window_manager_destroyed(): found window 
manager after 1 tries

(xfce4-panel:821): GVFS-RemoteVolumeMonitor-WARNING **: remote volume 
monitor with dbus name org.gtk.vfs.HalVolumeMonitor is not supported

(xfdesktop:825): GVFS-RemoteVolumeMonitor-WARNING **: remote volume 
monitor with dbus name org.gtk.vfs.HalVolumeMonitor is not supported

(xfdesktop:825): GVFS-RemoteVolumeMonitor-WARNING **: remote volume 
monitor with dbus name org.gtk.vfs.GPhoto2VolumeMonitor is not supported

(xfce4-session:809): 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:809): Gtk-CRITICAL **: IA__gtk_widget_set_visible: 
assertion 'GTK_IS_WIDGET (widget)' failed

(xfce4-session:809): 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 (II) Server terminated successfully 
(0). Closing log file.


Command exit status: 0
Script done on Mon Jan 16 17:17:12 2017


I would also like to understand and fix the various warnings and errors 
displayed on the console.


Please advise.  Citations/ references would be appreciated.


TIA,

David



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18a5de5c-bc3a-c2e8-32c1-ea0a12d446ac>