I created a scriptA.sh
on the desktop and make it executable then this was it content:
#!/bin/bash
sudo -u userA bash -c 'PACKAGE_PATH=/home/userA/package1; cd /home/userA/scripts'
I want to double click on this to open terminal and run the two commands in it and keep terminal opened. But what actually happens after double clicking it and choosing to run with terminal
option, the terminal opens for a second and then closes itself. I don't know why this is happening, so I'd appreciate if anyone could please advise why this is happening and how to overcome it.