Can no longer open snapshots dialog from cli (or as action in file manager)
⚠️Be aware that his is not a task for beginners or learners.⚠️ ⚠️You'll need some skills and experience with Python coding.⚠️
👣Your next steps
- Carefully read the thread. It is old and long.
- If this is your first contribution in this project please introduce your self and tell us about your skills, wishes and plans. Also let us know how you found the issue and the project.
- Don't ignore the previous step.
- Read the existing contributors documentation.
- We can develop the next steps in the further discussion. Don't hesitate to ask.
Original posting
I might be missing something here. Before (when still using backintime-gnome) it was possible to directly opening the snapshot dialog via the CLI or using a custom action from a file-manager, by supplying the path of interest.
Was this option removed in the latest version, or did the syntax change?
You're right. I removed it by accident when I rewrote argument parsing. Will add it back soon :v:
Thanks for the clarification.
(and thanks for this great piece of software)
Classifying this as both a Bug and a Feature Request, because a functionality was accidentally lost and should be newly implemented.
Can someone please explain the lost feature to me. Opening a snapshot dialog via CLI? How have you done this and why is it needed? The CLI has not (or should not have) Qt code in it and therefor is not able to open Qt dialogs.
It has been a while back since I've last used this software/feature so details are a bit hazy (and I seem to have lost my config files).
How i've done it: Most likely ... from a terminal window (CLI) calling the backintime binary supplying the (absolute) path using some flag.
Why i did it: Either because it was the easiest solution to open backintime focusing on the correct path. Or (the most likely case knowing me) The snapshot window is smaller, and thus less intrusive. Which was beneficial when all I wanted was to perform a quick restore (or inspect if restore is even possible). I mainly used the restore button sub-menu's "Restore to..." functionality (which acted as described in the main window "https://backintime.readthedocs.io/en/latest/mainwindow.html#files-toolbar").
Why was it deemed necessary:
The main use case was to correct for user mistakes. Be it deletion (using rm, so no trash for me) or accidental overwritten the wrong file.
When that happens I usually already was at the filesystem location of interest or could quickly arrive there since most programs allow for "open file explorer at location from last save".
From there on it was a simple CLI call to backintime or a custom action from the file-explorer. Which was easier to do than opening the backintime main window and navigating to the path of interest.
The file-explorer custom action is another benefit of the "call binary and supply path routine". This is something a user can "easily" implement for it's file-explorer of choice without the need for backintime to supply plugins for multiple known file-explorers.
Hope this explanation is of help.
Thanks for explaining. You mean you used $ backintime foobar (not backintime-qt) and then a GUI window came up?
No problem, after all I did raise the issue :wink:
From a history dive it turned out I was using the following commands (as stored in thunar's uca.xml)
<action>
<icon>$someArbitraryIcon</icon>
<name>Previous Versions</name>
<unique-id>$someUniqueNumber</unique-id>
<command>/usr/bin/backintime-qt4 -s %f</command>
<description>Restore previous (file) versions using backintime.</description>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
<action>
<icon>$someArbitraryIcon</icon>
<name>Previous Versions (root)</name>
<unique-id>$someUniqueNumber</unique-id>
<command>pkexec '/usr/bin/backintime-qt4' -s %f</command>
<description>Restore previous (file) versions using backintime (as root).</description>
<patterns>*</patterns>
<directories/>
<audio-files/>
<image-files/>
<other-files/>
<text-files/>
<video-files/>
</action>
Where %f inserts the path to the first selected file/directory.
For the pkexec command I created a custom polkit rule (in case you were wondering why it was there)
Thanks for the reply.
It is a nice to have feature. But I vote to keep it as it is. The BIT code is not in shape to add something like this. And looking into the age of this Issue, lack of response from other users or not existing similar issues it seems that it is a rare used feature.
Then I'd like to add one "other user response" here. I'd also like to integrate BIT into my file manager's context menu.
OK, the task would be to dive back into the code around the year 2016 and see what Germar removed. I am open to reviewing pull requests, but currently BIT has more fundamental issues that I want to fix or getting under control. As far as I know, the current team of maintainers does not have the resources to implement such things themselves.