Read no longer pauses bash script when using a program launcher

Upgrading Linux Mint to Version 19.1 (Tessa) seems to have broken the ability of a read command at the end of a bash script to pause the script so leaving the terminal window open. Such scripts work correctly when run directly in a terminal window, or by double-clicking on the script file from the file manager, but they fail to pause when run through a program launcher.

The script in question is used to safely eject USB drive (see Safely removing a USB drive with a bash script).

The fix (or at least a workaround) is provided in a post by Karsvo on the Ask Ubuntu forum. His technique is to use the following command in the program launcher:

gnome-terminal -e "bash -c ~/; bash"


Safely removing a USB drive with a bash script

Safely removing a USB flash drive

How to run a script without closing the terminal?

Mint 19.1: Bash scripts no longer work from desktop launcher

This entry was posted in Bash script, Mint and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s