Comments (14)
In the Tools menu, Filer has "Open as Root" but it seemingly does nothing
I don't know what is going on there, but if it's sudo-ing itself there shouldn't be a problem.
We don't want polkit
And that shan't change. PolicyKit is a mess of C libraries that love randomly crashing and dumpling their core.
Set the SUDO_ASKPASS environment variable to /usr/local/bin/askpass (the experimental builds ship it already)
Do you mind if I made a new askpass that gives a bit more explanation as to why it needs a password? A bit like the GNOME "An app is trying to do something that needs administrative permission. We ask for your password just to be on the safe side." That way the user knows what's going on, and the app still needs their consent, but you don't need a fully-fledged polkit implementation.
from filer.
Right now the main question is, how to intercept the error message shown above and bring up the "sudo itself" logic instead.
We need to find where the code that triggers the copying/moving etc. is and need to find a way for how to run it as root.
from filer.
I tried to find the definition for fm_job_run_async
with grep on all of the source files, and it only came up with two references and no definition. Nothing in any headers either...
from filer.
Sorry @linuxkettle I didn't mean to delete comments, just wanted to hide those that didn't add new information. Pressed the wrong button.
Most likely Filer is (still) using libfm for those actions. (Possibly we'll need to replace this by a small helper program written in Qt that could be run as root when needed to perform the operations.)
from filer.
from filer.
I wonder if it's defined in a system-wide header file?
P.S. my C compiler doesn't work
Edit
It isn't in any files in /usr/include.
from filer.
sudo pkg install libfm
installs it.
from filer.
That won't work if you change anything in the libfm folder, will it? Because as-is, isn't the libfm in the pkg repositories from the upstream PCManFM?
from filer.
Are we using libfm
or libfm-qt
for Filer? Because both are subdirectories of /usr/share/include
, but libfm-qt
has an extra folder called core
in it for all of the file operations. So it might be that Filer is compiling against those headers for the file and folder actions, in which case we need to find a way to copy those files and use modified versions of them.
from filer.
Ah yes. Somehow Filer is compiling against these headers without any problems. The libfm
folder you've got is incomplete, so no wonder I can't find the file I/O code in in: it isn't there.
from filer.
I've added a PR now.
from filer.
I don't know enough about GLib or C++ to add the sudo code myself, but it looks like you'll need it at libfm-qt/core/filetransferjob.cpp
in an else case of the if loop on line 309.
from filer.
Possibly this could be used?
Blocked by:
sandsmark/polkit-dumb-agent#5
from filer.
Related KDE patch:
https://invent.kde.org/frameworks/kio/-/merge_requests/143
They are using polkit, which is imho too complicated and convoluted, but maybe we can use something simpler like sudo or https://github.com/sandsmark/polkit-dumb-agent.
from filer.
Related Issues (20)
- Dragging a document onto the white area of an opened folder window crashes HOT 10
- The file filer on the LiveCD does not show the hard disk where hello os is installed
- Right-click menu customization options
- Global Menu should receive keyboard command combinations even if a file browser window is the focused window.
- Wayland does not support QWindow::requestActivate()
- plasmashell Global Menu 2.0 does not show the menu for the desktop
- The name of the hard disk is displayed incorrectly on the desktop HOT 1
- Add play feature for audio and video HOT 4
- Hinged folders
- Recursive calculation of folder sizes
- The selection of text is too wide but the selection of icons is normal
- Desplay-preference "Wallpaper mode and image file position" needs to be swapped HOT 1
- The specified location for moving files to the desktop is wrong HOT 1
- The desktop should not scroll when dragging the Icon HOT 1
- The media remains on after the media is removed HOT 1
- Right-clicking still displays the Paste option even if there is no copy.
- Media (Go Computer) folder does not display Hello system hard drive
- Go Computer Link Inconsistent
- Malicious Ukrainian translations HOT 5
- File names that are not in English cannot be opened.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filer.