Registered Member
|
Hello all, I used a little command line on Linux Mint.
I want to adapt it to konsole but this way doesn't work, it just opens two terminals :
Can you help me ? I use it after copying large number of files to USB and I want to be sure there is no data left in cache. Thanks
finally on KDE Neon !!
|
Registered Member
|
Hi!
There is a runCommand-method in Konsole available via dbus. I'm using yakuake as dropdown-terminal, but it will work for konsole too if you replace yakuake with konsole-$id (and of course your window/session-id)
|
Registered Member
|
I have no idea how to use that, but after more digging and trying I found my answer :
finally on KDE Neon !!
|
Registered Member
|
DBus is an interprocess communication system that allows you to trigger methods, connect and react to signals, ... It is worth a look.
Your solution will run without a visual feedback if you do not spawn a graphical terminal before running it. You could use Konsole to run such a command and keep the window open, e.g.
This will hold the window open, even after 'echo Done' returns. Another approach would be a logfile, or a notification after finishing sync. The && command only triggers if the process before it is returning without errors, so in your example the last 'sleep 2' would only trigger if sync is finished without error. Consider using a message on failure, for example
|
Registered Member
|
I tried with this one in FreeFileSync after it finishes ... but nothing shows up.
finally on KDE Neon !!
|
Registered Member
|
So FreeFileSync does trigger the command? Perhaps it is missing the $PATH or runs another shell interpreter. Try it with full path
If it does not show up, check the logfiles of FreeFileSync or `journalctl -xe` for messages. I do not know FreeFileSync, so it is just an idea. |
Registered Member
|
yap ! that was it ! Thank you !! so for me this is what I was searching for :
finally on KDE Neon !!
|
Registered Member
|
Great
Now you could enhance it with a failcheck, like `sync || notify-send "Sync FAILED" "There was an error syncing, please check!"`. || is the opposite of &&, so instead of running on success of the previous process, it only runs if the previous process failed. Have fun |
Registered Member
|
Ok so this doesn't work in qbittorrent, at the end of a download I made this
and I get this :
I presume the problem is in my sintax ? It can't be because it's an appimage because it has acces to /usr/bin/konsole, but not to /usr/bin/bash ??
finally on KDE Neon !!
|
Registered Member
|
''usr/bin/bash' is missing the root-directory, you have to use an absolut path: /usr/bin/bash
|
Registered Member
|
nope,
it's the same
finally on KDE Neon !!
|
Registered Member
|
Can you check the whole line again? There is missing an apostrophe. Is your bash located in /usr/bin/bash? try `which bash` or `type bash` to get the resolved absolute path.
|
Registered Member
|
It's there :
After lots of baby steps I discover the final form !! :
Thank you again !
finally on KDE Neon !!
|
Registered Member
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]