Forum › Forums › New users › New Users and General Questions › Help with PCmanFM – Folder Option to "Open as Root"?
- This topic has 32 replies, 6 voices, and was last updated Nov 7-7:25 pm by rej.
-
AuthorPosts
-
October 25, 2019 at 8:07 pm #28577Member
rej
Hi-
Trying to add entry – PCmanFM open folder as root.
What would be the files/extensions necessary or is it even possible for antiX?
No option after following these instructions (in the last line, also tried %u, %f):
Created a text file in ~/.local/share/file-manager/actions:
“Run as root”
[Desktop Entry]
Name = Open as Root
Tooltip = Open the folder as root
Icon = terminal
Profiles = on_folder;[X-Action-Profile on_folder]
Name = Open as Root
MimeTypes = inode/directory;
SelectionCount = 1
Exec = gksudo pcmanfm %sOctober 26, 2019 at 2:56 am #28582Member
Xecure
::Exec = gksudo pcmanfm %s
Try gksu instead of gksudo
Exec = gksu pcmanfmantiX Live system enthusiast.
General Live Boot Parameters for antiX.October 26, 2019 at 3:01 am #28583Member
VW
::I found this and I also remember it being discussed in this forum.
For the next major stable release of Debian (codenamed Buster), the
Debian GNOME team plans to default to GNOME on Wayland where gksu does
not even work.Therefore, the Debian GNOME team intends to either remove gksu or
replace it with a non-functional warning message. gksu is unmaintained
(last upload 2014) and is a security vulnerability.https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867236
Furthermore, I just found this.
In Ubuntu 18.04 LTS (or Debian Buster), you should use the gvfs admin backend instead of gksu or pkexec.
Which explains why I couldn’t get it to work on my other PC yesterday.
ktsuss seems to be another alternative using the KISS principle.
- This reply was modified 3 years, 6 months ago by VW.
- This reply was modified 3 years, 6 months ago by VW.
- This reply was modified 3 years, 6 months ago by VW.
“These are the times that try men's souls" - Thomas Paine
October 26, 2019 at 12:07 pm #28607ModeratorBobC
October 26, 2019 at 12:15 pm #28608Forum Admin
anticapitalista
::gksu works fine on antiX-19 – @VW – what didn’t work exactly?
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
October 26, 2019 at 3:57 pm #28620Member
VW
::It’s working fine today. It’s an ongoing experiment; I have that PC driving a 40 inch LED TV, with a wireless mouse and keyboard and it could be that all these wireless bits and pieces are on close frequencies and are interfering with each other. Every so often it just acts crazy. The TV remote and the sound bar remote are also wireless.
“These are the times that try men's souls" - Thomas Paine
October 27, 2019 at 9:35 pm #28669Memberrej
::Xecure-
Thank you for your help.
I was able to get it to work with the original script by installing a package – “pcmanfm-qt”.
Unfortunately, PCmanFM in IceWM does not recognize USB drives.
———————
VW-
Thanks – I am surprised that it has not happened yet.
Interesting post @ jeremy.bicha.net
October 27, 2019 at 9:54 pm #28670ModeratorBobC
October 27, 2019 at 10:10 pm #28671ModeratorBobC
::Nevermind, I’m a goof. I got it installed and working, and could run as root and open the flashdrive via /media, but the “Devices” option doesn’t work.
- This reply was modified 3 years, 6 months ago by BobC.
Attachments:
October 30, 2019 at 9:26 am #28736Memberrej
::Hi BobC-
As always, thanks for your help.
SpaceFM (and Rox filer) see my text files as executable in antiX 19.
antiX 17 did not have this issue at all, antiX 19 does. This file manager behavior occurs on the install media as well as the final release fully installed, configured, updated & upgraded, so it is not something I have found a way to resolve in Beta 2 through final release, although relentlessly trying.
All install media created with I.S.O.s through antiX website, with antiX live USB maker, MD5sum computed.
A variety of laptops tried, produce same results. My 19 final setup is identical to 17.
To change each text file to ‘read and write’ would not be an option.
There are hundreds of various imported files – mostly text [created with Leafpad], mixed with .mp4, .odt, .png, .xcf, etc.
2 Screenshots are my antiX 17 – SpaceFM & Rox Filer test text files.
2 Screenshots are antiX 19 install media – SpaceFM & Rox Filer test text files.
PCmanFM and Thunar recognize the text files properly as text files. Neither can eject drives with SLiM desktop manager. IceWM does not recognize the USB drives in PCmanFM.
Since Beta2 through Final release, I have used a 2 file manager setup with SpaceFM & Thunar. SpaceFM for ejecting drives and Thunar for recognizing files correctly. SpaceFM is a great file manager – been using it in 17. Does everything I need. Thunar does everything also, if is is run with LightDM. IceWM and Fluxbox have black wallpaper in LightDM. I need to be able to see my files correctly, with full titles, and get flash drives and large USB hard drives in and out quickly. SpaceFM is great because it can be configured to do so much more than other file managers.
SpaceFM sees the text files correctly on the external USB drives. As soon as files or folders with files in it are dragged and dropped into the home/documents, they turn into “executable” instantly. Rox filer sees all text files as “executable” whether on an external USB drive or imported into the home folder.
More than fixing this, I would like to understand why it is happening at all. There may be no answer.
Found this, yet do not understand it or if it is related as I have tried other kernels:
————
“This tells me that this is likely a low-level (maybe kernel module) bug in sshfs. Since bash gives this result, I suggest reporting it against sshfs and see what they say.”
————October 30, 2019 at 2:21 pm #28752Anonymous
::hundreds of various imported files
To track down the bug (or is it simply ther result of a misconfiguration?)
we probably need to hear:imported from where? (?from a fat32-formatted partition, which did not preserve original permissions)
imported by whom? (normal user copy, or copy operation performed within a sudo-permissioned spaceFM instance?) Ask for confirmation, even though the screenshot shows a blue (normal user) spaceFM titlebar icon
Found this, yet do not understand it or if it is related
https://github.com/IgnorantGuru/spacefm/issues/437Unless your workflow includes use of sshfs or such, the issue in ticket #437 (and in #175, quoted below) seems unrelated
https://github.com/IgnorantGuru/spacefm/issues/175#issuecomment-9661210
(spaceFM author, IgnorantGuru, commented on Oct 22, 2012)fyi, this and similar issues are sshfs issues, because spacefm is a fairly dumb front-end only. When you enter a network URL, it runs udevil or the custom protocol handler. When the command completes, it checks to see if the URL is mounted, and if so, opens the directory. (With ssh, you need to open the directory by clicking on it in the devices list, because ssh is not run as a task – see my comment in #176 on this).
udevil in turn is a simple front-end to mount. You can run udevil directly with the same URL to debug. Running udevil –verbose will show you the mount command it issues, which you can also test directly. mount in turn uses the fuse/sshfs mount helper to mount ssh.
Because udevil is mount front-end, it mounts sshfs as root, and generally only gives the user write access (sets uid=your user by default). This is analogous to mounting sshfs in fstab, except that udevil lets you do so at any time and as a normal user. Thus any sshfs keys may need to be installed to /root, similar to the fstab situation. Or I think you can specify other credentials.
If you want to mount sshfs as a normal user instead, you can simply run sshfs directly rather than udevil. In spacefm this can be accomplished with a custom protocol handler script or a custom command. Eventually spacefm may run sshfs directly rather than udevil, but this hasn’t been coded.
So the good news is that if you get sshfs mounting via mount as root, it should work fine in udevil and spacefm. But getting it to that point is up to you.
Read this open issue ticket and gauge whether it matches the problem you’re encountering:
https://github.com/IgnorantGuru/spacefm/issues/679October 30, 2019 at 5:31 pm #28763ModeratorBobC
::Hmmmm, Not that this would actually FIX the bug, but this might help…
1. use a SpaceFM root session if you need to for mounting a device or changing permissions. Select them all (you can mark directories too) and hit copy.
2. use a SpaceFM normal user session to paste the files into somewhere under /home and in a separate folder, paste them in. They will now be owned as you.
3. in the normal user session, mark all that you need to change (Ctrl+A for all) the any particular permission to a certain value for, then right click, then click properties, then permissions. In the box that comes up, dash means leave whatever is there alone, check sets it, and empty clears it.
4. in the normal user session, check the permissions are correct, now move them where you want them to goNovember 1, 2019 at 10:45 am #28812Memberrej
::skidoo-
Thank you.
antiX 17 & 19 are on the same device.
Files are from antiX 17 partition.
Used regular SanDisk Cruzer and Kingston Datatraveler flash drives to copy/transfer (as well as media creation for installing). Default format is fat32.
Normal user – usually copy and paste (select all) from entire folder with all files. Very basic. No terminal.
No use of sshfs.
Please let me know if this information is what you have asked for or if anything else is needed. Would be great to unravel the mystery after so long of trying to resolve.
I have used MX 19 and Debian “Buster” as testing grounds, and this file problem does not occur in either, with SpaceFM. It does occur in every antiX 19 installation of every laptop tested (clean, fresh install, not snapshot of installed version from another device).
The Attached files are from a ThinkPad T420 installation.
rj@antix19rj:~
$ inxi -F
System:
Host: antix19rj Kernel: 4.19.73-antix.1-amd64-smp x86_64 bits: 64
Desktop: Xfce 4.12.4
Distro: antiX-19_x64-full Marielle Franco 16 October 2019
Machine:
Type: Laptop System: LENOVO product: 42365MO v: ThinkPad T420
serial: <root required>
Mobo: LENOVO model: 42365MO serial: <root required> UEFI [Legacy]: LENOVO
v: 83ET79WW (1.49 ) date: 09/05/2016
Battery:
ID-1: BAT0 charge: 22.9 Wh condition: 23.3/47.5 Wh (49%)
CPU:
Topology: Dual Core model: Intel Core i5-2540M bits: 64 type: MT MCP
L2 cache: 3072 KiB
Speed: 798 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 800 2: 808
3: 797 4: 928
Graphics:
Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
driver: i915 v: kernel
Display: x11 server: X.Org 1.20.4 driver: modesetting unloaded: fbdev,vesa
resolution: 1600×900~60Hz
OpenGL: renderer: Mesa DRI Intel Sandybridge Mobile v: 3.3 Mesa 18.3.6
Audio:
Device-1: Intel 6 Series/C200 Series Family High Definition Audio
driver: snd_hda_intel
Sound Server: ALSA v: k4.19.73-antix.1-amd64-smp
Network:
Device-1: Intel 82579LM Gigabit Network driver: e1000e
IF: eth0 state: down mac: 00:21:cc:c8:66:a9
Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi
IF: wlan0 state: up mac: 8c:70:5a:c0:b6:34
Drives:
Local Storage: total: 727.48 GiB used: 9.16 GiB (1.3%)
ID-1: /dev/sda vendor: Seagate model: ST750LX003-1AC154 size: 698.64 GiB
ID-2: /dev/sdd type: USB vendor: Kingston model: DataTraveler 2.0
size: 28.84 GiB
Partition:
ID-1: / size: 34.20 GiB used: 7.83 GiB (22.9%) fs: ext4 dev: /dev/sda6
Sensors:
System Temperatures: cpu: 38.0 C mobo: N/A
Fan Speeds (RPM): cpu: 1998
Info:
Processes: 189 Uptime: 32m Memory: 7.68 GiB used: 461.4 MiB (5.9%)
Shell: bash inxi: 3.0.36
rj@antix19rj:~
$November 1, 2019 at 10:49 am #28816Memberrej
::BobC-
This worked nicely for the files, but the folders including the one I created for the test, are owned by root now, and accessible or deletable only through root.
Thought I followed your instructions but must have done it incorrectly.
Tried the steps through root user and regular user several times.
At one point, I was attempting to get rid of all the error notifications by checking “X” or cancel, one by one and suddenly every file in that created folder, opened up at once – there were 30-40 sub-folders and hundreds of files. Every command listed within the files opened the application attached to the printed command. For instance, there is a Firejail file containing the configuration commands for adding programs to Firetools – each browser and application listed in the file opened the attached application including the browsers. The desktop became buried, flashing wildly as hundreds of items were unfolding. I quickly logged out to stop it.
The files that were not in folders changed their permissions to r&w, but the folders did not work out so well. I would need to take the files out of all the folders from the home folder, empty them, change permissions and copy them back, which could take a very long time with the amount of folders and sub-folders.
- This reply was modified 3 years, 6 months ago by rej.
November 1, 2019 at 12:16 pm #28819ModeratorBobC
::Rej, I think you should reduce the number of variables involved. I did what I said on a stock a antiX 19 system using IceWM and spacefm,
and intentionally changed the permissions on things before copying them, and then checked the ownership and permissions on what was created. It was very important to do the copies from the root window and all creation and pasting to the user window.Maybe other things you have installed or configured are causing trouble.
There is something else weird going on.
-
AuthorPosts
- You must be logged in to reply to this topic.





