On 10/19/2018 03:03 PM, Bob Goodwin wrote:
.
I have a bash script that runs in a user terminal but I can't get it to
run from an xfce launcher icon. I usually set up one without any trouble
but this refuses to work as expected.
This is what I have, the commented line works but the one before it is
simpler, either way the result is the same, permissions are set to 777.
All it produces from the launcher icon is a brief flash of the data and
then a blank screen.
[bobg@box83 ~]$ cat SambaFiles
#!/bin/bash
# SambaFiles
xfce4-terminal -H -x &
# /usr/bin/xfce4-terminal --maximize -e 'cd /mnt/box48' &
ls -ctr /mnt/box48/2018*
In a terminal "[bobg@box83 ~]$ ./SambaFiles" produces the desired
directory listing as does /home/bobg/SambaFiles, but neither works when
configured in the launcher from the gui.
Any suggestions appreciated,
*Bob*
The reason this doesn't work from a launcher is that as soon as the last
command executes, the script exits and the terminal closes. I have a
script on my desktop that needs to stay open long enough for me to view
the results, but alas, I haven't been able to set it back up again after
a major move, and I'm working from my laptop, without that script.
However, if memory serves, adding the following two lines to the end of
the script is all that's needed:
echo Press Enter to exit.
read a
Note that it doesn't matter what you type, because you never use the
contents of $a. It's just there to soak up whatever comes in from the
keyboard, ending when you press Enter. I may have the syntax wrong, and
if so, I'm sure somebody will be very, very happy to correct me.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx