Bug 385454 - konsole becomes uninteractive after running any bash script
Summary: konsole becomes uninteractive after running any bash script
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-07 02:49 UTC by Bronson
Modified: 2017-10-23 16:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot of issue.... (54.39 KB, image/jpeg)
2017-10-07 02:49 UTC, Bronson
Details
sample script (235 bytes, application/x-shellscript)
2017-10-10 06:22 UTC, Bronson
Details
simpler script (36 bytes, application/x-shellscript)
2017-10-11 06:41 UTC, Bronson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bronson 2017-10-07 02:49:13 UTC
Created attachment 108215 [details]
screenshot of issue....

Running Manjaro KDE edition. 
Have had this frustrating bug since using KDE on neon and now on Manjaro.
When executing a script, the console becomes unusable. 
So basically each time I need to execute a script, i need to open a new konsole or new tab. 
It fails to return to the prompt after executing the script...
Comment 1 Kurt Hindenburg 2017-10-07 14:52:28 UTC
The easiest way to determine if the issue is Konsole, try running the script in xterm and/or other terminals (gnome-terminal, etc)
Comment 2 Bronson 2017-10-09 08:19:02 UTC
ive tried the same script in xterm, and it works fine.
So this is definately a konsole issue.

I have fonts set to 120dpi, not sure if this would cause some issue like this? But I do have this same issue on every other kde machine I have around the house....
Comment 3 Kurt Hindenburg 2017-10-10 01:57:45 UTC
Ok but without the script, I have no way of debugging this
Comment 4 Nate Graham 2017-10-10 02:16:20 UTC
Can you provide the script in question?
Comment 5 Bronson 2017-10-10 06:22:34 UTC
Created attachment 108263 [details]
sample script
Comment 6 Bronson 2017-10-10 06:24:13 UTC
Thanks for looking into this, its incredibly frustrating!
Ive added my sample script. It happens with any script I run about 90% of the time.
Comment 7 Kurt Hindenburg 2017-10-10 14:05:15 UTC
Well I'm puzzled on why this would not work in your system/Konsole, but then work in xterm.

It works here w/o issue.

Perhaps a python bug?  I have 2.7.12

Have you asked on Manjaro's forums/sites?
Comment 8 Bronson 2017-10-11 06:41:40 UTC
Created attachment 108273 [details]
simpler script
Comment 9 Bronson 2017-10-11 06:42:08 UTC
its certainly not python. Ill ask the manjaro guys if they can help, but it also happens on kde neon.
Comment 10 Christoph Feck 2017-10-12 18:25:02 UTC
If even a simple "echo" script does not return to the prompt, it is unrelated to Python.

Is this reproducible with a freshly created user account? Are you using bash or a different default shell?
Comment 11 Bronson 2017-10-14 07:30:00 UTC
So ive tested this booting directly off the KDE manjaro bootable usb, and it has the same issue.

So ive also posted on the manjaro forums, hopefully someone there may have a fix?
https://forum.manjaro.org/t/konsole-becomes-uninteractive-after-running-any-bash-script/32879


Can I take it that these scripts are running fine on your machines?  
If so, what OS are you running KDE on?
Comment 12 Bronson 2017-10-14 07:30:32 UTC
(In reply to Christoph Feck from comment #10)
> If even a simple "echo" script does not return to the prompt, it is
> unrelated to Python.
> 
> Is this reproducible with a freshly created user account? Are you using bash
> or a different default shell?

Im using bash, the default on manjaro
Comment 13 Bronson 2017-10-20 07:27:28 UTC
I have tried removing the .bashrc files from my home folder and also /etc/bash/ and still have the issue.

Are there any other files that may affect this?
Comment 14 Bronson 2017-10-20 20:40:29 UTC
Ok ive made some progress!

Ive found that if i run the script through the existing konsole window it is actually working. So manually typing ./echo.sh into the console works fine.

The problem only comes when I run the script through dolphin! Which is how I usually run my scripts. Right click > Run in Konsole. If I do it this way I always get the bug. Can anyone else test this?
Comment 15 Kurt Hindenburg 2017-10-21 00:46:46 UTC
That's the correct behavior for how the konsolerun.desktop is coded; the hold means don't close; I think what you expect is not how 'Run in Konsole' actually means.

[Desktop Action runInKonsole]
TryExec=konsole
Exec=konsole --hold -e %f
Comment 16 Bronson 2017-10-21 05:35:53 UTC
ok thanks, ill change that to work as intended.
You can close this bug then.
Comment 17 Bronson 2017-10-21 06:37:15 UTC
actually, is there any way to change this to the behaviour I expect?
I want run in konsole to launch the console, run the script, and return to prompt. Ive have a play with the commandline options and there looks to be no way to do this.
Any ideas?
Comment 18 Bronson 2017-10-21 06:42:56 UTC
Adding to the end of my file I found a workaround!
$SHELL
Comment 19 Kurt Hindenburg 2017-10-21 14:41:58 UTC
Good to hear - I wonder if other people have the same confusion about what 'Run in Konsole' means.
Comment 20 Bronson 2017-10-21 21:29:28 UTC
I suspect anyone with a windows background would expect this behaviour.

Is it possible to add a setting to konsole to change this behaviour? 
As i think its a better solution than adding $shell to any script id like to run that way.