https://bugs.kde.org/show_bug.cgi?id=514340

--- Comment #2 from motoschifo <[email protected]> ---
Here is an example from .bashrc file:

--- Code Start ---
export PATH="$PATH:~/bin"
--- Code End ---

The solution I found is to replace krunner with my own scripts.
Now I can launch:
 - file manager with local folder
 - file manager with volume folder
 - any scripts/commands

This little script has no history or anything else: it execute my commands with
no wait, no mouse selection, etc. and it can't introduce errors. 
For example, in krunner I need to wait the GUI to refresh (if I press Enter the
app is not displayed istantaneosly) and the top selected command is often
invalid or not correct, because an app is installed new and the name came
first.
I don't know if krunner will introduce this kind of changes, now I replaced
META+R with my script. If anyone is interested, this is the command executed as
script (the script is in my user folder, it's not globally installed):
sh /home/USER/bin/run.sh


--- Code Start ---
#!/bin/bash

# defaults
FILE_MANAGER="dolphin"
TERMINAL="bash -i -c"
#TERMINAL="konsole --noclose -e bash -c"

# Display the KDE input dialog box
CMD=$(/usr/bin/kdialog --title "Quick Run" --inputbox "Enter the command or a
folder name:" "")

# Exit is the command is empty
if [ $? -ne 0 ] || [ -z "$CMD" ]; then
    exit
fi

if [ -d "${CMD}" ]; then
    # It's a volume folder
    ${FILE_MANAGER} "${CMD}" &
elif [ -d "${HOME}/${CMD}" ]; then
    # it's a local user folder
    ${FILE_MANAGER} "${HOME}/${CMD}" &
else
    # it's a script or application
    ${TERMINAL} "$CMD" &
fi
--- Code End ---

I hope this can be useful to improve krunner behaviour.
Remarks: I wrote that script to use on my system, it may contains errors,
please double check it before using.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to