Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2018 16:20:45 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Victor Sudakov <vas@mpeks.tomsk.su>
Cc:        sergio lenzi <nervoso@k1.com.br>, freebsd-questions@freebsd.org
Subject:   Re: Alternative to x11/gnome3 ?
Message-ID:  <20180801162045.f3653b7d.freebsd@edvax.de>
In-Reply-To: <20180801024324.GA20419@admin.sibptus.transneft.ru>
References:  <CACDfs3qSdo6cS0F-DVMq2RDMsm-ktBc53k-xNwYwzex1X915-g@mail.gmail.com> <20180511090813.GA21919@admin.sibptus.transneft.ru> <1526039986.18202.5.camel@k1.com.br> <20180731014358.GA925@admin.sibptus.transneft.ru> <20180731195608.40cee639.freebsd@edvax.de> <20180801024324.GA20419@admin.sibptus.transneft.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 1 Aug 2018 09:43:24 +0700, Victor Sudakov wrote:
> Polytropon wrote:
> 
> [dd]
> 
> > > 
> > > The idea is that a second (third etc) user should be able to login
> > > without the first user logging out (and closing all her programs
> > > thereby), as available on Linux and Windows ("logoff" vs "switch
> > > user").
> > 
> > This kind of session management was first prominently
> > introduced on Mac OS X (early v10).
> 
> I think "fast user switching" was first prominently introduced in
> Windows XP in 2001. When was Mac OS X v10 released?

In March 2001 (according to bsd-family-tree). But if I
remember correctly, there were some CDE hacks that allowed
something comparable on Solaris before that time, probably
around 1995... but I don't know how Solaris did that (or
if it really was some "user hack" in that one installation
I saw it happening).



> > > > the switching you are looking for was available on mate 1.12 I
> > > > think... 
> > > > 
> > > > the distribution uses GDM 2.18.9  with  the full gdmsetup & friends... 
> > > > On NetBSD we use gdm 2.20.11   that is quite the same one... and yes,
> > > > we have mate 2.19 on NetBSD-8.0 for raspberry pi.
> > > 
> > > Am I right that gdm is the absolute requirement for user switching to
> > > work, no other display manager can do that?
> > 
> > It is a combination both of the desktop environment being
> > able to store program states (which programs opened, with
> > which files, in which state) and restore them again, maybe
> > like a form of "memory to file and back". 
> 
> No, this is not the way it works, at least on Linux. I've researched
> how it works on my son's Ubuntu. All programs of logged-in users
> remain running, it's not done via storing program state, killing and
> restoring them. In fact, every logged-in user has her own Xserver.
> Only one Xserver at a time is "the current graphical console" and has
> access to the video card, but they all are in the ps output.

Interesting concept!

Many years ago, I've experimented with running two X servers
on the same machine, equipped with two GPUs. Dedicating one
USB keyboard and mouse to each server, two users could be
logged in at the same time (2 persons using 1 PC).

I can imagine that the user switching works the same (two
"sets of programs", i. e., two login shells + attached X
session and programs), except that only one of the X outputs
can be shown at a time, and there is a means to interactively
switch them.



> I don't know however how these multiple Xservers are managed and
> selected, perhaps gdm does all the job, or systemd... Never figured
> out.

If the same concept applied to Gnome 2 on FreeBSD, there
is no systemd, so I can imagine gdm being the manager here,
with an interactive hook inside the current user's Gnome
session (logout -> control back to gdm; still a user there?
user can "re-connect", else display normal login dialog
with user selection list).

I should have examined this more closely when Gnome 2 was
_the_ Gnome distribution... ;-)



> > Gnome 2 could do
> > this in combination with gdm. While the gnome session was
> > responsible for the storing / restoring part, gdm would
> > do the login of a different user, and also keep track of
> > users still logged in (in "stored state").
> > 
> > As Mate and Cinnamon claim to be Gnome 2 forks, it's at
> > least left to imagination that they should also include
> > this kind of functionality.
> 
> So, what is my chance of getting a working "fast user switching" solution
> with Mate? Is there a way for me as an average X user to enable this
> functionality, without much hacking?

As Mate doesn't have gdm, and we currently can assume that
gdm is required, it probably won't work with Mate except you
can get gdm somewhere into that mix. Or you decide to try
Cinnamon - do _they_ use gdm (from Gnome 2)?

I don't understand what has been so wrong with Gnome 2 that
it needed Gnome 3 to make it much wrongerer... ;-)



> > > And while we are at it, I have a couple of questions on Mate
> > > (now I have mate-1.18.0 from the vanilla FreeBSD packages):
> > > 
> > > 1. How do I totally disable all volume automounting in Mate/Caja? I'm quite
> > > happy with the system automonter and don't need no gvfs and other
> > > userland mounts (even more because they don't support Cyrillic
> > > filenames correctly).
> > 
> > There is a gvfs configuration entry (via gconf2, if I remember
> > correctly) that lets you select which devices or filesystem
> > types to mount or _not_ to mount. 
> 
> I want to mount none. In fact, I want that even gvfsd is not started.
> Possible?

Mount prevention can be done using HAL configuration as
pointed out before. For gvfs, I'm not sure it can be
disabled entirely (or even removed), as a lot of programs
seem to depend on it, but it is possible to stop it from
messing with mount actions.

The Ubuntu + KDE equivalent is this:

	gconftool --type Boolean --set /apps/nautilus/preferences/media_automount false

I'm sure for gvfs in Mate, there is a similar key. You
can use the graphical tool "dconf-editor" to search and
browse the configuration setting hierarchy for a key
that contains "automount", it should be the one to set
to "false".

You do remember what REGEDIT.EXE /V is, don't you? ;-)

There also seems to be an environment variable that can
stop gvfs from using FUSE: GVFS_DISABLE_FUSE=1 (to be set
for the user or globally).



> > In the past, I had the exact opposite problem: I _wanted_ to
> > use the automounter from Gnome, but it didn't always work.
> > Gnome's automounter relies on HAL, so maybe changing the HAL
> > configuration is also a way to deal with it. So fiddling with
> > HAL, fighting system permissions from devfs.conf and devd.conf,
> > creating a "umount wrapper" which also calls media eject for
> > optical devices, and even adding a desktop icon "USB unmount"
> > were required to make it _partially_ work...
> > 
> > From https://www.freebsd.org/gnome/docs/halfaq.html you can
> > check questions 2, 3, and 6.
> 
> Thanks, maybe I'll try all that 
> "/desktop/gnome/volume_manager/automount_drives false" stuff.

I'm not sure if Mate inherited the same naming convention
for their configuration, but it's worth a try.



> How do I set this globally for all my users, not just for the current user?
> I did not find such an option for gconftool-2.

Same problem here. I had to manually make all required changes
to each user individually (things like program autostart,
screen size, etc.). I think nobody inside the Linux-centric
GUI world cares about global settings. :-)



> > > 2. The sound control app in Mate is completely unrelated to the real
> > > sound system of FreeBSD (as of 11.2 and mate-1.18.0). The volume and
> > > input/output controls do nothing. I have to use the good old
> > > /usr/sbin/mixer and "sysctl hw.snd.default_unit" to manipulate with
> > > sound. Is this my misconfiguration or Mate's fault?
> > 
> > Is it using the wrong mixer? Can you select a different mixer
> > device for the Gnome / Mate mixer control?
> 
> What's "Mate mixer control" ? The Mate sound app lists all my
> soundcards correctly (maybe it just takes them from /dev/sndstat) but
> selecting any of the devices and trying to set parameters (set volume
> or test speakers) does exactly nothing.

Okay, so you've already checked that more than one mixer
can be present in the system (/dev/mixer*), and none can
be manipulated.



> > I fully understand that most GUI software is ported from Linux,
> > it's not a native BSD development result, so maybe it expects
> > some ALSA instead of the standard OSS...
> 
> A question to you as you said you are a Mate user. Does this sound app
> work personally for you? Can you at least set the volume and run the
> speaker test from it?

I can only talk about the normal volume control accessed
from the top bar: It works. The one slider present changes
the master volume. The result can be checked from a terminal
with the system's "mixer" command afterwards.

Sidenote: I'm not a Mate user, but I have a few Mate users.
I'm primarily a WindowMaker user myself. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180801162045.f3653b7d.freebsd>