You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I open up another terminal, for example - kgx - or even cool-retro-term. I want a new instance of cool-retro-term with a specific command, so I type in:
It works. Another window pops up with the correct output for tagging files:
Please enter tags, separated by " "; abort with Ctrl-C; complete 10 tags with TAB
.--------,
| o ? |
`--------'
Top nine previously used tags in this directory:
article (1) ⋅ book (2) ⋅ dictionary (3) ⋅ finance (4) ⋅ languages (5) ⋅ legal (6) ⋅ personal (7) ⋅ politics (8) ⋅ tech (9)
Tags:
But now let's do exactly the same, but from Nautilus automated script. (I know what you want to reply - "It's a Nautilus issue" - please, let me explain in full).
My .sh script basically amounts to running the same command as above. Identical:
How do I know this? By outputting the wanna-be-result into a file. The script:
#!/bin/bash
# Declare an array to store file paths
file_paths=()
# Split the selected file paths into an array
IFS=$'\n' read -d '' -ra file_paths <<< "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
# Iterate through the array and format the paths
for file in "${file_paths[@]}"; do
# Enclose each file path in quotation marks and append it to the array
formatted_file="\"$file\""
formatted_paths+=("$formatted_file")
done
# Join the array into a single string with space-separated items
formatted_paths="${formatted_paths[*]}"
# Open new instance of the terminal and run filetags <filepaths>
# THIS IS THE DEBUG LINE TO COMPARE FINAL COMMANDS
echo "cool-retro-term -e /bin/bash -c 'source ~/.bashrc; filetags $formatted_paths'" > try.txt
cool-retro-term -e /bin/bash -c 'source ~/.bashrc; filetags $formatted_paths'
And the moment of truth, let's compare try.txt to my manual command:
They are the same!
And yet, if I launch my Nautilus script, the cool-retro-term opens... starts complaining about missing pip packages (as if the .bashrc environmental vars weren't properly loaded) and exits within milliseconds.
How do I fix this? I debugged this to my limit, trying for three days now.
The text was updated successfully, but these errors were encountered:
I have the same issue and want it fixed... I tried to execute cool-retro-term from standard terminal - works, from scripts (such as bash, Python scripts and even Cinnamon launchers and launching command through KDE Connect) - doesn't work.
The interesting thing is, when trying to execute cool-retro-term with --verbose, it doesn't tell that there's errors, it only tells that qml is loading, then storing the settings.
What i found out is that it keeps running if you append & sleep 5 into the command, but the window instantly closes when launched... I consider this a bug now.
Let's say I open up another terminal, for example -
kgx
- or even cool-retro-term. I want a new instance of cool-retro-term with a specific command, so I type in:For example:
It works. Another window pops up with the correct output for tagging files:
But now let's do exactly the same, but from Nautilus automated script. (I know what you want to reply - "It's a Nautilus issue" - please, let me explain in full).
My .sh script basically amounts to running the same command as above. Identical:
How do I know this? By outputting the wanna-be-result into a file. The script:
And the moment of truth, let's compare
try.txt
to my manual command:They are the same!
And yet, if I launch my Nautilus script, the cool-retro-term opens... starts complaining about missing pip packages (as if the .bashrc environmental vars weren't properly loaded) and exits within milliseconds.
How do I fix this? I debugged this to my limit, trying for three days now.
The text was updated successfully, but these errors were encountered: