Re: run script in xfce -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux