Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-03-23 06:51:42

am-priority
Member
Registered: 2022-03-23
Posts: 2

How to add a script launch button to the top panel of xfce?

There is a script written in python. How can I add an icon for running this script next to the layout switching icon?

Offline

#2 2022-03-23 08:16:19

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: How to add a script launch button to the top panel of xfce?

Hi and welcome to our lovely forum.

This page may provide answers.

The Add New Items window allows you easily add new plugins onto your panel. It can be accessed by right-clicking on the desired panel and selecting Panel → Add New Items….
You can quickly add an item to a panel by dragging it directly from the list and on to the panel you wish to add it to.

You'd have to add a launcher, then right-click and select it properties. There are two plus icons: click the little one with a blank page to add a new empty item.
You'll be presented with another dialog that will help you create a new launcher. Type in its name (required), add a comment (optional) and select the full path to your python script (make sure it has its shebang). You can also select an icon for it.
M8iJbcvl.pngagxnu1Dl.png


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#3 2022-03-23 08:17:45

ruuwa
Member
Registered: 2022-02-09
Posts: 22

Re: How to add a script launch button to the top panel of xfce?

Perhaps try right-click the panel > Panel > Add New Items > Launcher and then right-click the Launcher > Properties > Add a new empty item? And put in "python script.py" or something similar. Never tried it with python, only bash.

If you need the xfce terminal to be open, then try "xfce4-terminal -x" or "-e". Same difference with gnome terminal described here I think https://askubuntu.com/questions/1072688 … e-terminal .

edit: Oops, someone else has answered it while I was typing this.

Last edited by ruuwa (2022-03-23 08:19:21)

Offline

#4 2022-03-23 10:40:27

am-priority
Member
Registered: 2022-03-23
Posts: 2

Re: How to add a script launch button to the top panel of xfce?

Thanks!

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, 8 queries executed - Memory usage: 536.7 KiB (Peak: 537.55 KiB) ]