Two issues

Hello, FreeBSD users! I've recently migrated from Archlinux and so far I'm happy with FreeBSD. However, gnome is being naughty.

I have two problems:
1. GDM crashes after a few seconds of being loaded up
2. Nautilus mounting issues

Problem 1:
Whenever I FreeBSD, gdm loads up and works for a few seconds up to 30 seconds. I can login, and enter gnome-shell, however once these 30 seconds are up, I am logged out and gdm crashes with the following messages on screen:

GLib-GObject: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
gdm_settings_get_value: assertion 'GDM_IS_SETTINGS (settings)' failed

So usually I wait for it to crash and use startx

.xinitrc file:
Code:
exec ck-launch-session gnome-session

Problem 2:
Whenever I plugin a fat32 usb, it automatically works and mounts. However, if I unplug the usb drive, nautilus shows that the usb is still mounted. If I try to unmount it, it doesn't work. If I reboot the system, it goes away.

If I have an external hard disk with the ntfs filesystem plugged in, nautilus displays the name of the drive, however it does not have it automatically mounted and if I try to mount it, it doesn't mount.

Inside /media, I can see hal lock file in there but not the disk folder that is usually generated when a disk is plugged in.

fusefs is installed, loaded and working. fusefs-ntfs is also installed and ntfs-3g is linked to sbin


/etc/rc.conf
Code:
clear_tmp_enable="YES"
hostname="Trinity"
ifconfig_re0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
webcamd_enable="YES"
hald_enable="YES"
dbus_enable="YES"
gnome_enable="YES"
cupsd_enable="YES"
devfs_system_ruleset="system"

/etc/devfs.rules
Code:
[system=10]
add path 'dri/*' mode 0666 group video
add path 'da*' mode 0660 group usb
add path 'usb/*' mode 0660 group usb
add path 'usb *' mode 0770 group cups
add path 'ugen *' mode 0660 group cups
add path 'usb/0.1. *' mode 0660 group cups
add path 'usb/1.1. *' mode 0660 group cups
add path 'usb/1.2. *' mode 0660 group cups
add path 'cd0' mode 0660 group usb

/etc/devfs.conf
Code:
perm    devstat 0444

#Mount
own     acd0 root:usb
perm    acd0 0660

#Mount USB permissions to usergroup usb
own     /dev/da0 root:usb
perm    /dev/da00 0660

#Mount CD permissions to usergroup usb
own     /dev/cd0 root:usb
perm    /dev/cd0 0660

own     /dev/ntfs/ root:usb
perm    /dev/ntfs 0660

own     /dev/pass0 root:usb
perm    /dev/pass0  0660

own     /dev/xpt0 root:usb
perm    /dev/xpt0   0660

own     /dev/mdctl root:usb
perm    /dev/mdctl  0660

own     /dev/md0 root:usb
perm    /dev/md0    0660

/etc/sysctl.conf
Code:
vfs.usermount=1
kern.corefile=/tmp/%N.core

/boot/loader.conf
Code:
kern.vty=vt
cuse4bsd_load="YES"
cuse_load="YES"
fuse_load="YES"

$ id hamzan
Code:
uid=1001(hamzan) gid=1001(hamzan) groups=1001(hamzan),0(wheel),44(video),193(cups),145(webcamd),1002(usb)


$ uname -a
Code:
FreeBSD Trinity 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
So usually I wait for it to crash and use startx

.xinitrc file:
Code:
exec ck-launch-session gnome-session

Shouldn't this be in your ~/.xsession file and not ~/.xinitrc?

/etc/rc.conf
Code:
hald_enable="YES"
dbus_enable="YES"
gnome_enable="YES"

I'm not using Gnome but I think that dbus and hal are loaded twice here.
Code:
gnome_enable="YES"
loads everything that Gnome needs.
 
You were right about hal & dbus loading twice. I tweaked rc.conf file and when I rebooted, gdm worked, but then it crashed and restarted itself. I entered login details, but then it hung. So I rebooted and the same happened but it didn't hang this time.

Here are the error messages:

Code:
Oct 23 15:11:59 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.25" (uid=92 pid=1669 comm="gnome-shell --mode=gdm ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:00 Trinity dbus[677]: [system] Activating service name='org.freedesktop.GeoClue2' (using servicehelper)
Oct 23 15:12:00 Trinity dbus[677]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Oct 23 15:12:00 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.25" (uid=92 pid=1669 comm="gnome-shell --mode=gdm ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:08 Trinity last message repeated 7 times
Oct 23 15:12:10 Trinity gdm[781]: Failed to remove greeter program access to the display. Trying to proceed.
Oct 23 15:12:11 Trinity gnome-keyring-daemon[1683]: couldn't register in session: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Oct 23 15:12:11 Trinity pulseaudio[1725]: [(null)] oss-util.c: '/dev/dsp0' doesn't support full duplex
Oct 23 15:12:11 Trinity pulseaudio[1725]: [(null)] oss-util.c: '/dev/dsp2' doesn't support full duplex
Oct 23 15:12:13 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.61" (uid=1001 pid=1728 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:13 Trinity dbus[677]: [system] Activating service name='org.freedesktop.GeoClue2' (using servicehelper)
Oct 23 15:12:13 Trinity dbus[677]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Oct 23 15:12:19 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.61" (uid=1001 pid=1728 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:20 Trinity dbus[677]: [system] Activating service name='org.freedesktop.GeoClue2' (using servicehelper)
Oct 23 15:12:20 Trinity dbus[677]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Oct 23 15:12:20 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.61" (uid=1001 pid=1728 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:20 Trinity last message repeated 4 times
Oct 23 15:12:27 Trinity hp-upgrade: hp-upgrade[1790]: warning:  distro is not found in AUTH_TYPES
Oct 23 15:12:27 Trinity kernel: WARNING pid 1798 (python2.7): ioctl sign-extension ioctl ffffffff80087467
Oct 23 15:12:36 Trinity sm-msp-queue[1470]: unable to qualify my own domain name (Trinity) -- using short name
Oct 23 15:12:37 Trinity gdm[781]: GLib-GObject: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
Oct 23 15:12:37 Trinity gdm[781]: GLib-GObject: invalid unclassed pointer in cast to 'GdmSettings'
Oct 23 15:12:37 Trinity gdm[781]: gdm_settings_get_value: assertion 'GDM_IS_SETTINGS (settings)' failed
Oct 23 15:12:37 Trinity last message repeated 2 times
Oct 23 15:12:37 Trinity gnome-session-binary[1686]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 23 15:12:37 Trinity gnome-session-binary[1686]: WARNING: App 'gnome-settings-daemon.desktop' exited with code 1
Oct 23 15:12:37 Trinity gnome-session-binary[1686]: WARNING: App 'gnome-shell.desktop' exited with code 1
Oct 23 15:12:37 Trinity gnome-session-binary[1686]: WARNING: Could not connect to ConsoleKit: Unable to find session for cookie
Oct 23 15:12:37 Trinity console-kit-daemon[762]: WARNING: Error waiting for native console 9 activation: Inappropriate ioctl for device
Oct 23 15:12:39 Trinity devd: notify_clients: send() failed; dropping unresponsive client
Oct 23 15:12:40 Trinity gdm[781]: Freeing conversation 'gdm-password' with active job
Oct 23 15:12:40 Trinity gdm[781]: GdmDisplay: display lasted 2.413017 seconds
Oct 23 15:12:40 Trinity gdm[781]: gdm_settings_get_value: assertion 'GDM_IS_SETTINGS (settings)' failed
Oct 23 15:12:40 Trinity last message repeated 2 times
Oct 23 15:12:44 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.80" (uid=92 pid=1916 comm="gnome-shell --mode=gdm ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:45 Trinity dbus[677]: [system] Activating service name='org.freedesktop.GeoClue2' (using servicehelper)
Oct 23 15:12:45 Trinity dbus[677]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Oct 23 15:12:45 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.80" (uid=92 pid=1916 comm="gnome-shell --mode=gdm ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:12:45 Trinity last message repeated 5 times
Oct 23 15:12:46 Trinity gdm[781]: gdm_settings_get_value: assertion 'GDM_IS_SETTINGS (settings)' failed
Oct 23 15:15:01 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.80" (uid=92 pid=1916 comm="gnome-shell --mode=gdm ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:01 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.80" (uid=92 pid=1916 comm="gnome-shell --mode=gdm ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:03 Trinity gnome-session-binary[1893]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 23 15:15:03 Trinity gdm[781]: Failed to remove greeter program access to the display. Trying to proceed.
Oct 23 15:15:03 Trinity gdm[781]: gdm_settings_get_value: assertion 'GDM_IS_SETTINGS (settings)' failed
Oct 23 15:15:03 Trinity gnome-keyring-daemon[1935]: couldn't register in session: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Oct 23 15:15:03 Trinity pulseaudio[1977]: [(null)] pid.c: Stale PID file, overwriting.
Oct 23 15:15:03 Trinity pulseaudio[1977]: [(null)] oss-util.c: '/dev/dsp0' doesn't support full duplex
Oct 23 15:15:03 Trinity pulseaudio[1977]: [(null)] oss-util.c: '/dev/dsp2' doesn't support full duplex
Oct 23 15:15:05 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.116" (uid=1001 pid=1981 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:05 Trinity dbus[677]: [system] Activating service name='org.freedesktop.GeoClue2' (using servicehelper)
Oct 23 15:15:05 Trinity dbus[677]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
Oct 23 15:15:06 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.116" (uid=1001 pid=1981 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:06 Trinity hp-upgrade: hp-upgrade[2024]: warning:  distro is not found in AUTH_TYPES
Oct 23 15:15:07 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.116" (uid=1001 pid=1981 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:07 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.116" (uid=1001 pid=1981 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:07 Trinity kernel: WARNING pid 2038 (python2.7): ioctl sign-extension ioctl ffffffff80087467
Oct 23 15:15:07 Trinity dbus[677]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.116" (uid=1001 pid=1981 comm="/usr/local/bin/gnome-shell ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.1" (uid=0 pid=762 comm="/usr/local/sbin/console-kit-daemon --no-daemon ")
Oct 23 15:15:07 Trinity last message repeated 2 times
 
Do you have an ~/.xsession file? I'm getting the impression that gnome or gdm is missing something important at startup and aborts because of that. Afaik when X is started with startx, it uses ~/.xinitrc, when you use a display manager, it uses ~/.xsession.
 
I'm pretty sure GDM doesn't use ~/.xsession at all, but I recommend skipping GDM entirely anyway. You'll need it installed to actually launch a GNOME session, but back when I messed around with GNOME on FreeBSD GDM would crash frequently, and if you log into GNOME via GDM compositing won't work due to some Linux-specific garbage or other. Just use startx. This would require moving everything back to ~/.xinitrc

As for the mounting issues, it looks like you've just written out the default permissions for all those device nodes anyway (root owns them by default, only root may manipulate them by default). The vfs.usermount sysctl gives users the ability to mount filesystems they own, not just any filesystem. That might not resolve the issue, but it should be a good starting point.
 
Unfortunately I already have the option vfs.usermount=1 added in /etc/sysctl.conf but to no avail. Thankfully I can manually mount them, but such an issue gets annoying overtime.

And about gdm, I completely agree with you. Going to disable it.

But I hope someone soon would be able to help with the mounting problem.
 
Unfortunately I already have the option vfs.usermount=1 added in /etc/sysctl.conf but to no avail.

Yes, I saw that. What I'm saying is that vfs.usermount=1 allows users to mount the filesystems they own on nodes that they own. It gives unprivileged users permission to use the mount(8) command on filesystems they own; it does not give them permission to mount any filesystem at all anywhere at all.

In /etc/devfs.conf, you've given ownership of everything to the root user---who already owned them to begin with and was always able to mount them. Try giving ownership of the necessary nodes to your own user.
 
Hello, FreeBSD users! I've recently migrated from Archlinux and so far Problem 1:
Whenever I FreeBSD, gdm loads up and works for a few seconds up to 30 seconds. I can login, and enter gnome-shell, however once these 30 seconds are up, I am logged out and gdm crashes with the following messages on screen:

GLib-GObject: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
gdm_settings_get_value: assertion 'GDM_IS_SETTINGS (settings)' failed

So usually I wait for it to crash and use startx

.xinitrc file:
Code:
exec ck-launch-session gnome-session

Problem 2:
Whenever I plugin a fat32 usb, it automatically works and mounts. However, if I unplug the usb drive, nautilus shows that the usb is still mounted. If I try to unmount it, it doesn't work. If I reboot the system, it goes away.

If I have an external hard disk with the ntfs filesystem plugged in, nautilus displays the name of the drive, however it does not have it automatically mounted and if I try to mount it, it doesn't mount.

Problem 1 — Use slim login manager (x11/slim), here is a 'how to' for gnome-shellhttps://forums.freebsd.org/threads/48747/#post-318414

Problem 2 — don't know what about NTFS partitions, I never used to use this file system on my FreeBSD system, but you always need to unmount FAT usb/memory sticks before unpluging (!), with nautilus, or by command line ( umount /media/<your_device>).
(Also there is no UTF-8 support on file systems mounted with hal by default, even if your system locale is UTF-8 locale, to enable, read this post — https://forums.freebsd.org/threads/57329/#post-328724).
 
In /etc/devfs.conf, you've given ownership of everything to the root user---who already owned them to begin with and was always able to mount them. Try giving ownership of the necessary nodes to your own user.

But I thought that when you include root:group that specified group inherits the permissions of root? Otherwise I wouldn't be able to mount usb sticks in the first place.

Problem 2 — don't know what about NTFS partitions, I never used to use this file system on my FreeBSD system, but you always need to unmount FAT usb/memory sticks before unpluging (!), with nautilus, or by command line ( umount /media/<your_device>).
(Also there is no UTF-8 support on file systems mounted with hal by default, even if your system locale is UTF-8 locale, to enable, read this post — https://forums.freebsd.org/threads/57329/#post-328724).

Your solution seemed interesting. Since I am using ntfs-3g (fusefs), there was an entry for it there. However, it uses the option locale instead of -L. I set it to locale=en_US.UTF-8 but when I attempt to mount the ntfs disk, it tells me "Invalid mount option".

I removed this and inserted -L=en_US.UTF-8, yet still the same error occurs.

And note: My system-wide language is set to en_US.UTF-8.
 
Jesus christ, I'm going to reinstall Archlinux. FreeBSD is not a good choice as a desktop, in my humble opinion.

Thank you guys for your help!
 
But I thought that when you include root:group that specified group inherits the permissions of root?

Group permissions must be explicitly set. A group never inherits the permissions granted to a file's owner. Also, as ILUXA alluded to, once a filesystem is mounted the system will consider it to be mounted until you explicitly dismount it. You can't just yank a disk out. Nautilus may work differently on Linux, but I'd bet that if you looked at your logs after pulling a disk out without properly "ejecting" it you'll find error messages.
 
Same two problems with me on my second (old) desktop. On newer PC I have xfce installed with ports and it is fine but old PC gnome installed with packages with default settings and the same two problems.
 
Back
Top