Author Topic: Spacefm  (Read 8568 times)

Offline IgnorantGuru

  • Jr. Member
  • **
  • Posts: 10
    • IgnorantGuru's Blog
Re: Spacefm
« Reply #15 on: February 05, 2012, 05:38:41 AM »
IgnorantGuru,     
One question - is there a way to use inotify without the need to provide the root password for mounting/umounting?     


Use of inotify has no impact on mounting/unmounting, it is only used to detect changes in directory contents, and has nothing to do with root passwords.

If you are using the default udisks build (built without --enable-hal), then I don't see how you can be getting any prompt for a root password when clicking Mount or Unmount, unless you are explicitly selecting Root > Unmount from the devices context menu.  Do you mean you are getting an error 'Only root can unmount...'?  If so, then udisks may not be properly authorized - usually a system configuration problem.

You can test this by opening a terminal and using udisks directly to mount/unmount the device (replace 'sdX' with the correct device file):
Code: [Select]
udisks --mount /dev/sdX
udisks --unmount /dev/sdX

If you are able to do that without errors, then generally spacefm will be able to as well - it uses those same commands.  If you receive an error, then it is usually due to options in fstab preventing the device from being mounted as a user ('Error only root can unmount...', or udisks is not authorized through consolekit/policykit ('Not Authorized') - a system config issue.

You can also participate in this thread to help clarify what is happening.  There is simply no code to ask for a root password during normal user mount/unmount (in the udisks build) - if root is required then you'll just get an error.  So first we need to clarify exactly what you're doing and what response you're getting.  Thanks.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Spacefm
« Reply #16 on: February 05, 2012, 05:56:39 AM »
Hi,
We still use HAL... and also /etc/PolicyKit/PolicyKit.conf files. When a partition is not mounted in /etc/fstab, the device for which root password is asked for (or not asked for) is configured in PolicyKit.conf. The default configured for PCLinuxOS at least in the repos for 32bits is not to ask a password. :)

Neal ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline IgnorantGuru

  • Jr. Member
  • **
  • Posts: 10
    • IgnorantGuru's Blog
Re: Spacefm
« Reply #17 on: February 05, 2012, 06:07:11 AM »
Hi,
We still use HAL... and also /etc/PolicyKit/PolicyKit.conf files. When a partition is not mounted in /etc/fstab, the device for which root password is asked for (or not asked for) is configured in PolicyKit.conf. The default configured for PCLinuxOS at least in the repos for 32bits is not to ask a password. :)

Thanks for the info and your other post too.  When built without --enable-hal, spacefm completely ignores hal and does all device management via udisks.  It doesn't matter to a udisks build of spacefm whether you have hal installed or not.  It certainly sounds like you're using the udisks build, so it's just a question of where this root password prompt is coming from - I don't believe it's from spacefm.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10602
  • MLUs Forever!
Re: Spacefm
« Reply #18 on: February 05, 2012, 06:10:45 AM »
I accept I do not have a typical set up ...... using KDE4 ......  internal HDD partitions are not enumerated in fstab .....  they get mounted 'on the fly' if and when needed. They are listed in the Dolphin sidebar where they can be mounted/unmounted at will. They get mounted under /media.

When using SpaceFM, any attempt to mount one of those partitions results in a request for a root password.

Also, if one of those partitions is mounted via Dolphin, then close Dolphin, any attempt to unmount the partition using SpaceFm also triggers a request for root password.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Spacefm
« Reply #19 on: February 05, 2012, 06:14:03 AM »
If you are using the default udisks build (built without --enable-hal), then I don't see how you can be getting any prompt for a root password when clicking Mount or Unmount, unless you are explicitly selecting Root > Unmount from the devices context menu.  Do you mean you are getting an error 'Only root can unmount...'?  If so, then udisks may not be properly authorized - usually a system configuration problem.

This is a screenshot of the error message I get with the PCLinuxOS test rpm on OB when clicking on "Unmount" -


I'm a bit stumped by the "another user" bit as I have disabled the usual FM from auto anything.  Could there be something else in the system conflicting? 
Linux Registered User # 529407


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Spacefm
« Reply #20 on: February 05, 2012, 06:22:29 AM »
The request for a root password affects PCManFM as well (64bit test system). I suppose the 2 are related.     

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10602
  • MLUs Forever!
Re: Spacefm
« Reply #21 on: February 05, 2012, 06:28:42 AM »
The request for a root password affects PCManFM as well (64bit test system). I suppose the 2 are related.     

Not here on the 32 bit KDE .......  no password request from PCManFM
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline IgnorantGuru

  • Jr. Member
  • **
  • Posts: 10
    • IgnorantGuru's Blog
Re: Spacefm
« Reply #22 on: February 05, 2012, 06:30:42 AM »
Ok thanks for the screenshot.  That authorization prompt is definitely not coming from spacefm - I don't recognize it.  I believe what is happening is that when spacefm runs udisks to mount/unmount, something in the system config (eg policykit) is asking for that authorization.  So there is nothing I can do about that - you need to determine what in the system is doing that.  Also keep in mind that some volume management software runs as a daemon in the background and will affect mounting behavior (eg gvfsd setup with thunar).

If you run spacefm from a terminal you'll get to see some debug info in the terminal while its running - it will show you the exact udisks commands being run to mount/unmount.  You can run these same commands yourself in a terminal to see what errors and behavior you get.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Spacefm
« Reply #23 on: February 05, 2012, 06:35:14 AM »
It appears to be caused by the udisks policy.     
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy -- lines #22 to #32:     
Code: [Select]
  <action id="org.freedesktop.udisks.filesystem-mount-system-internal">
    <description>Mount a system-internal device</description>
    <description xml:lang="da">Montér en intern enhed</description>
    <message>Authentication is required to mount the device</message>
    <message xml:lang="da">Autorisering er påkrævet for at montere et fil system</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10602
  • MLUs Forever!
Re: Spacefm
« Reply #24 on: February 05, 2012, 06:36:29 AM »
Code: [Select]
$ spacefm
TASK_COMMAND=/usr/bin/udisks --mount /dev/sdb9 --mount-options noexec,nosuid,noatime,sync
SPAWN=/bin/bash -c /tmp/spacefm.tmp/70dfd7a7-exec-tmp.sh

.....  the above on an attempt to view/mount a partition ......
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Spacefm
« Reply #25 on: February 05, 2012, 06:38:35 AM »

As a guess but perhaps users should belong to a particular permission group to allow then to mount and unmount partitions?

That could account for the "another user" as atm the user account has not been added to the correct user permission group?

Are there any differences in permission default groups users belong to in 32bit and 64bit LXDE installs?

Jase



I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline IgnorantGuru

  • Jr. Member
  • **
  • Posts: 10
    • IgnorantGuru's Blog
Re: Spacefm
« Reply #26 on: February 05, 2012, 06:41:03 AM »
This is a screenshot of the error message I get with the PCLinuxOS test rpm on OB when clicking on "Unmount" -

Also, unrelated, from your screenshot it appears you are affected by this bug which I am attempting to resolve.  It is abnormal to see multiple tasks listed for a single action like you are.  This bug has thus far been impossible to reproduce so now that I know PCLinuxOS sometimes exhibits it, maybe I'll give that a try.  To clarify, this is unrelated to the udisks issue - just ignore the additional tasks listed, it is a cosmetic issue only.


Offline Taco.22

  • Sr. Member
  • ****
  • Posts: 481
Re: Spacefm
« Reply #27 on: February 05, 2012, 06:54:53 AM »
This is a screenshot of the error message I get with the PCLinuxOS test rpm on OB when clicking on "Unmount" -

Also, unrelated, from your screenshot it appears you are affected by this bug which I am attempting to resolve.  It is abnormal to see multiple tasks listed for a single action like you are.  This bug has thus far been impossible to reproduce so now that I know PCLinuxOS sometimes exhibits it, maybe I'll give that a try.  To clarify, this is unrelated to the udisks issue - just ignore the additional tasks listed, it is a cosmetic issue only.

Oh great, now I have this mysterious bug as well!!  :D
I had a look at the link and if it's any consolation it only happens when I try to "Unmount".  I can transfer files OK-  that doesn't seem to trigger the Manager. 
Linux Registered User # 529407


Offline IgnorantGuru

  • Jr. Member
  • **
  • Posts: 10
    • IgnorantGuru's Blog
Re: Spacefm
« Reply #28 on: February 05, 2012, 07:51:10 AM »
You might have a look here for general udisks authorization info - that is to help people troubleshoot a udisks 'not authorized' error.  You're not seeing the error but it's probably related.  Udisks can be a pain with its policykit dependence, but the good news is that once you get the system configured udisks is generally very reliable.

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: Spacefm
« Reply #29 on: February 05, 2012, 08:03:13 AM »
Hi,
I start trying. With Archie's package I don't even see my internal partitions. To unmount the plugged in usb stick I am prompted for the root password. When I plug it in, I have a side entry which shows me twice the content ! One for the uuid, and once for "disk".

I uninstalled Archie's package and searched for hal devel package. I just installed these packages:

Quote
Updating / installing
  libattr1-devel-2.4.43-1pclos2009.i586  ############################## [100%]
  libcap-devel-2.17-1pclos2010.i586      ############################## [100%]
  libhal1-0.5.14-4pclos2010.i586         ############################## [100%]
  libhal-devel-0.5.14-4pclos2010.i586    ############################## [100%]
  libdbus-glib-1_2-devel-0.96-1pclos2011 ############################## [100%]
Done.


additionnally to the other devel packages necessary, and the configure with --enable-hal has worked. The ones above in blue are the ones I installed the other ones are depends.

Here is the end of the ./configure --enable-hal command:
Quote
SpaceFM...................................... : Version 0.6.1

Prefix....................................... : /usr/local
Udisks support............................... : no
Linux HAL support............................ : yes
Linux inotify support........................ : yes
64-bit Large file support.................... : yes
Desktop icon integration..................... : yes

The binary will be installed as /usr/local/bin/spacefm

http://spacefm.sourceforge.net/




The make is now finished. I'll do the make install. Done. Now starting spacefm I get this message:

Quote
$ spacefm

** (spacefm:26449): WARNING **: No root settings found in /etc/spacefm/  Setting a root editor in Preferences should remove this warning on startup.   Otherwise commands run as root may present a security risk.


And in a window:
Quote
Unable to access /media/696a1c9c-ceae-4a83-a954-ef2a0e2e00a4

Permission non accordée


The second line says "Permission denied". ^^

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode