Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-06-18 16:00:09

makitso
Member
From: Minneapolis Minnesota
Registered: 2017-05-02
Posts: 12
Website
LinuxChrome 137.0

[SOLVED] shell script

Running xubuntu xfce 4.20

I have a test.sh script on my desktoip:

#! /bin/bash
echo "  Begin"
echo ls -al
sleep 5
echo "  Finished"

Is it possible to execute this script directly (either by clicking on the file or right click "execute" via thunar) and have the script output show on my display?

Last edited by makitso (2025-06-19 19:40:59)

Offline

#2 2025-06-19 00:23:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,022
LinuxFirefox 139.0

Re: [SOLVED] shell script

You mean something like this?

#! /bin/bash

cat << EOF > /tmp/script
#!/bin/bash
echo "  Begin"
ls -al
sleep 1
echo "  Finished" 
EOF

chmod +x /tmp/script

xfce4-terminal -H -T "Script Output" -x /tmp/script
	
exit 0

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-06-19 11:56:11

makitso
Member
From: Minneapolis Minnesota
Registered: 2017-05-02
Posts: 12
Website
LinuxChrome 137.0

Re: [SOLVED] shell script

Well kinda.

I suspect xfce / thunar won't allow me to do what I want unless I either use a launcher or something like your script.

The xfce4-terminal -H -T "Script Output" -x /tmp/script is the clue that I was missing.  So, I will mark this topic solved.

Thanks

P.S.  How do you marked this topic [Solved] ?

Last edited by makitso (2025-06-19 11:59:35)

Offline

#4 2025-06-19 12:16:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,022
LinuxFirefox 139.0

Re: [SOLVED] shell script

makitso wrote:

P.S.  How do you marked this topic [Solved] ?

Edit your original post in this thread and in the subject line, prepend "[SOLVED]".


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-06-19 12:16:43

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 746
LinuxFirefox 139.0

Re: [SOLVED] shell script

P.S.  How do you marked this topic [Solved] ?

Edit your original post title and add [Solved] to the beginning.


I AM CANADIAN!
Siduction
Debian Sid
Xfce 4.20 with Wayland/Labwc

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 553.41 KiB (Peak: 554.26 KiB) ]