简体   繁体   中英

Change default system file copier in Linux

I have coded a python app to manage file copies on linux, I want to know how can I get it to process copy/paste calls, like those launched by pressing ctrl + c/ ctrl + v or right click / Copy..., or drag and drop, instead of using system copier.

Can I do this for all deb based linux dist. or its on different ways for Ubuntu, Mint, Debian, and so on????

Forgive my English and thanks in advance!

Short answer: no, you can't.

Long answer: the component that does "copy&paste" is not alone defined by the distribution. This is a function of the desktop system / window manager. In other words: there is no such thing as the "default system file" copier for "Linux".

There are file mangers like dolphin for KDE; or nautilus on gnome that all come with their own implementation of file copy. Some good, some not so much (try copying a whole directory with thousands of files with nautilus).

But the real question here: why do you want to do that? What makes you think that your file-copy implementation that requires an interpreter to run ... is suited to replace the defaults that come with Linux? Why do you think that your re-invention of an existing wheel will be better at doing anything?!

Edit: if your reason to "manage" system copy is some attempt to prevent the user from doing certain things ... you should better look into file permissions and such ideas. Within a Linux environment, you simply can't manage what the user is doing in the first place by manipulating some tools. Instead: understand the management capabilities that the OS offers to you, and use those!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM