unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* File Managers shows many devices that are not drives, in i3 but not in GNOME
@ 2017-11-20 14:50 brendan.tildesley
  2017-11-20 16:04 ` ng0
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: brendan.tildesley @ 2017-11-20 14:50 UTC (permalink / raw)
  To: help-guix

In i3-wm my pcmanfm and nautilus, and probably other file systems display all these devices like:

pts
shm
store
systemd
user
cgroup
blkio
...

which browse to /dev/pts, /dev/sdm, /gnu/store, ... when clicked on.

These things shouldn't appear at all, additionally, my usb drives and extra hard drive are not automounted or recognised in pcmanfm/nautilus. I don't know how to begin debugging this so I'm wondering if anyone else understands what's going on.

My OS config is here: https://paste.debian.net/996688/
It occurs when my config is launched in a VM too so it isn't caused by my config files in HOME.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Managers shows many devices that are not drives, in i3 but not in GNOME
  2017-11-20 14:50 File Managers shows many devices that are not drives, in i3 but not in GNOME brendan.tildesley
@ 2017-11-20 16:04 ` ng0
  2017-11-21 13:16 ` Ludovic Courtès
  2017-12-23  0:14 ` Stefan Stefanović
  2 siblings, 0 replies; 5+ messages in thread
From: ng0 @ 2017-11-20 16:04 UTC (permalink / raw)
  To: brendan.tildesley; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

brendan.tildesley@openmailbox.org transcribed 0.8K bytes:
> In i3-wm my pcmanfm and nautilus, and probably other file systems display all these devices like:
> 
> pts
> shm
> store
> systemd
> user
> cgroup
> blkio
> ...
> 
> which browse to /dev/pts, /dev/sdm, /gnu/store, ... when clicked on.
> 
> These things shouldn't appear at all, additionally, my usb drives and extra hard drive are not automounted or recognised in pcmanfm/nautilus. I don't know how to begin debugging this so I'm wondering if anyone else understands what's going on.
> 
> My OS config is here: https://paste.debian.net/996688/
> It occurs when my config is launched in a VM too so it isn't caused by my config files in HOME.

I have the same in an older MATE Desktop (old == not including my new work) on an older,
randomly disfunctional computer. They show up on the Desktop as drives, and first appeared
many weeks ago. After a couple of reboots they disappear.
I think XFCE and iirc awesome show the drives aswell, so I did not consider it to be
a bug per se.
-- 
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
  WWW: https://n0.is

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Managers shows many devices that are not drives, in i3 but not in GNOME
@ 2017-11-21 11:46 brendan.tildesley
  0 siblings, 0 replies; 5+ messages in thread
From: brendan.tildesley @ 2017-11-21 11:46 UTC (permalink / raw)
  To: help-guix


> I have the same in an older MATE Desktop (old == not including my new work) on an older,
> randomly disfunctional computer. They show up on the Desktop as drives, and first appeared
> many weeks ago. After a couple of reboots they disappear.

Just rebooted once and they are still present.

> I think XFCE and iirc awesome show the drives aswell, so I did not consider it to be
> a bug per se.

It doesn't happen for me when I log into GNOME3.
It's certainly a bug of some kind but at least it's i3-specific. Where else to look?

Not sure if it's related, but i also have an issue with default applications. if i try to open a file with an unknown extension, the list of programs to open it with are empty.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Managers shows many devices that are not drives, in i3 but not in GNOME
  2017-11-20 14:50 File Managers shows many devices that are not drives, in i3 but not in GNOME brendan.tildesley
  2017-11-20 16:04 ` ng0
@ 2017-11-21 13:16 ` Ludovic Courtès
  2017-12-23  0:14 ` Stefan Stefanović
  2 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2017-11-21 13:16 UTC (permalink / raw)
  To: brendan.tildesley; +Cc: help-guix

Hi,

brendan.tildesley@openmailbox.org skribis:

> In i3-wm my pcmanfm and nautilus, and probably other file systems display all these devices like:
>
> pts
> shm
> store
> systemd
> user
> cgroup
> blkio
> ...
>
> which browse to /dev/pts, /dev/sdm, /gnu/store, ... when clicked on.
>
> These things shouldn't appear at all

That’s weird indeed.  Nautilus intends to display mount points (this is
from nautilusgtkplacesview.c):

--8<---------------cut here---------------start------------->8---
static void
update_places (NautilusGtkPlacesView *view)
{

[...]

  /* Add currently connected drives */
  drives = g_volume_monitor_get_connected_drives (priv->volume_monitor);

[...]

  /*
   * Since all volumes with an associated GDrive were already added with
   * add_drive before, add all volumes that aren't associated with a
   * drive.
   */
  volumes = g_volume_monitor_get_volumes (priv->volume_monitor);

  for (l = volumes; l != NULL; l = l->next)

[...]

  /*
   * Now that all necessary drives and volumes were already added, add mounts
   * that have no volume, such as /etc/mtab mounts, ftp, sftp, etc.
   */
  mounts = g_volume_monitor_get_mounts (priv->volume_monitor);

  for (l = mounts; l != NULL; l = l->next)
    {
      GMount *mount;
      GVolume *volume;

      mount = l->data;
      volume = g_mount_get_volume (mount);

      if (volume)
        {
          g_object_unref (volume);
          continue;
        }

      add_mount (view, mount);
    }

  /* load saved servers */
  populate_servers (view);

[...]

}
--8<---------------cut here---------------end--------------->8---

However, ‘g_mount_get_volume’ is expected to return NULL for “system
mounts”.  GLib’s gunixmounts.c attempts to determine whether a mount
point is a system mount by checking its file system type and mount
point:

--8<---------------cut here---------------start------------->8---
gboolean
g_unix_is_mount_path_system_internal (const char *mount_path)
{
  const char *ignore_mountpoints[] = {
    /* Includes all FHS 2.3 toplevel dirs and other specialized
     * directories that we want to hide from the user.
     */
    "/",              /* we already have "Filesystem root" in Nautilus */ 
    "/bin",
    "/boot",
    "/compat/linux/proc",
    "/compat/linux/sys",
    "/dev",

[...]

    NULL
  };

  if (is_in (mount_path, ignore_mountpoints))
    return TRUE;
  
  if (g_str_has_prefix (mount_path, "/dev/") ||
      g_str_has_prefix (mount_path, "/proc/") ||
      g_str_has_prefix (mount_path, "/sys/"))
    return TRUE;

  if (g_str_has_suffix (mount_path, "/.gvfs"))
    return TRUE;

  return FALSE;
}

static gboolean
guess_system_internal (const char *mountpoint,
		       const char *fs,
		       const char *device)
{
  const char *ignore_fs[] = {
    "auto",
    "autofs",
    "devfs",
    "devpts",
    "ecryptfs",
    "fdescfs",
    "kernfs",
    "linprocfs",
    "mfs",
    "nullfs",
    "proc",
    "procfs",
    "ptyfs",
    "rootfs",
    "selinuxfs",
    "sysfs",
    "tmpfs",
    "usbfs",
    "nfsd",
    "rpc_pipefs",
    "zfs",
    NULL
  };
  const char *ignore_devices[] = {
    "none",
    "sunrpc",
    "devpts",
    "nfsd",
    "/dev/loop",
    "/dev/vn",
    NULL
  };
  
  if (is_in (fs, ignore_fs))
    return TRUE;
  
  if (is_in (device, ignore_devices))
    return TRUE;

  if (g_unix_is_mount_path_system_internal (mountpoint))
    return TRUE;
  
  return FALSE;
}
--8<---------------cut here---------------end--------------->8---

This rule should let /gnu/store through, but it should clearly exclude
/proc, /sys, /run/systemd (tmpfs), etc.

I think we’ll have to attach gdb to nautilus to understand what’s going on.

> , additionally, my usb drives and extra hard drive are not automounted
> or recognised in pcmanfm/nautilus. I don't know how to begin debugging
> this so I'm wondering if anyone else understands what's going on.

Regarding auto-mount, I’ve noticed that “touching” the device node (as
in “cat /dev/sr0 > /dev/null”) triggers the auto-mount and UI
notification.

Does anyone know the big picture better?

> My OS config is here: https://paste.debian.net/996688/
> It occurs when my config is launched in a VM too so it isn't caused by my config files in HOME.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Managers shows many devices that are not drives, in i3 but not in GNOME
  2017-11-20 14:50 File Managers shows many devices that are not drives, in i3 but not in GNOME brendan.tildesley
  2017-11-20 16:04 ` ng0
  2017-11-21 13:16 ` Ludovic Courtès
@ 2017-12-23  0:14 ` Stefan Stefanović
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Stefanović @ 2017-12-23  0:14 UTC (permalink / raw)
  To: brendan.tildesley, help-guix

Hello,
I use i3 window manager myself and have solved this problem by 
installing gvfs package in my guix profile.

I started the nautilus file manager from the terminal emulator and I got 
the following warnings:
   invoking IsSupported() failed for remote volume monitor with dbus name
     org.gtk.vfs.UDisks2VolumeMonitor:: 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
     The name org.gtk.vfs.UDisks2VolumeMonitor was not provided by any 
.service files (g-dbus-error-quark, 2)
   invoking IsSupported() failed for remote volume monitor with dbus name
     org.gtk.vfs.MTPVolumeMonitor:: 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
     The name org.gtk.vfs.MTPVolumeMonitor was not provided by any 
.service files (g-dbus-error-quark, 2)
   invoking IsSupported() failed for remote volume monitor with dbus name
     org.gtk.vfs.GPhoto2VolumeMonitor:: 
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
     The name org.gtk.vfs.GPhoto2VolumeMonitor was not provided by any 
.service files (g-dbus-error-quark, 2)

The gvfs package provides the above mentioned dbus services.

To test this I installed it to my user profile by running:
guix package -i gvfs

I had to check the presence of the above mentioned dbus service files by 
running:
ls -l $GUIX_PROFILE/share/dbus-1/services/

And since I have fish as my default shell I had to run:
exec sh -c "source $GUIX_PROFILE/etc/profile; exec fish"
to properly set new environment variables.
(You can change the above command by replacing 'fish' with your shell 
command.)

At this point I started nautilus from the terminal emulator and the 
problem was solved.

Test this solution and of course you can add this package in your system 
profile.

This reply is a bit late but it may be useful to others who have similar 
problems.

-Stefan

On 11/20/2017 03:50 PM, brendan.tildesley@openmailbox.org wrote:
> In i3-wm my pcmanfm and nautilus, and probably other file systems display all these devices like:
>
> pts
> shm
> store
> systemd
> user
> cgroup
> blkio
> ...
>
> which browse to /dev/pts, /dev/sdm, /gnu/store, ... when clicked on.
>
> These things shouldn't appear at all, additionally, my usb drives and extra hard drive are not automounted or recognised in pcmanfm/nautilus. I don't know how to begin debugging this so I'm wondering if anyone else understands what's going on.
>
> My OS config is here: https://paste.debian.net/996688/
> It occurs when my config is launched in a VM too so it isn't caused by my config files in HOME.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-23  0:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-20 14:50 File Managers shows many devices that are not drives, in i3 but not in GNOME brendan.tildesley
2017-11-20 16:04 ` ng0
2017-11-21 13:16 ` Ludovic Courtès
2017-12-23  0:14 ` Stefan Stefanović
  -- strict thread matches above, loose matches on Subject: below --
2017-11-21 11:46 brendan.tildesley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).