Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-07-21 12:12:09

Sturdust
Member
Registered: 2017-07-21
Posts: 1

Add app shortcuts to top panel through the terminal

Hello.

Can someone help me. Is there a way to add app shortcuts to the top panel through the terminal?

Offline

#2 2017-07-21 17:54:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Add app shortcuts to top panel through the terminal

Hello and welcome.

Here is a series of steps that can be run from the command line that will add a launcher to a panel.

  1. Add a launcher to the panel:

    xfce4-panel --add=launcher

    (Note: if more than one panel, you will be graphically prompted for which panel to add to)
    .

  2. Get the new plugin ID:

    xfconf-query -c xfce4-panel -p /panels/panel-1/plugin-ids | tail -1

    (Note: you need to substitute "panel-1" with the panel name/number that you are adding to)
    .

  3. Create the launcher directory:

    mkdir ~/.config/xfce4/panel/launcher-14

    (Note: you need to substitute the "14" with the number of the launcher from the previous step)
    .

  4. Copy in the desktop file of the app you want the launcher for:

    cp /usr/share/applications/gimp.desktop ~/.config/xfce4/panel/launcher-14/

    (Note: you need to substitute the "14" with the number of the launcher from step 2)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2017-07-22 10:28:54

Starrdust
Member
Registered: 2017-07-22
Posts: 7

Re: Add app shortcuts to top panel through the terminal

I am sorry. It's my fault that I did not explain exactly what I need. I need to add the existing app to the panel using only the terminal command and without opening any windows.

Like this:

5b630d99688ce2fb24976db558eafe45.png

Offline

#4 2017-07-22 16:09:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Add app shortcuts to top panel through the terminal

I'm not sure I understand. Do you mean you want to add firefox, terminal and thunar launchers to the panel? I so, you can follow the above instructions 3 times - one for each app. Note though that there is no easy or existing way to programmatically move panel plugins around the panel from a terminal window.

Perhaps it might be better if you tried to explain what you are trying to accomplish? Why do you want to do this from a terminal? Why not just use the graphical tools to do it?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2017-07-22 18:13:47

Starrdust
Member
Registered: 2017-07-22
Posts: 7

Re: Add app shortcuts to top panel through the terminal

I reassemble for myself squashfs.filesystem through squashfs-tools and there is no graphical interface. I know how to do this on cinnamon but I do not know how to xfce. The command xfce4-panel --add=launcher causes the graphics window to open.

Offline

#6 2017-07-22 19:06:08

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Add app shortcuts to top panel through the terminal

Starrdust wrote:

he command xfce4-panel --add=launcher causes the graphics window to open.

Yes, if you have more than one panel. It needs to know which panel to target.

Are you trying to create a default setup of some sort? If so, there are better and easier ways to do this. Looks at the default panel file in /etc/xdg/xfce4/panel - perhaps you can just modify that. All new users will get that setup.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2017-07-22 19:19:56

Starrdust
Member
Registered: 2017-07-22
Posts: 7

Re: Add app shortcuts to top panel through the terminal

Can I somehow specify the panel number in the command?

Offline

#8 2017-07-22 19:51:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Add app shortcuts to top panel through the terminal

Starrdust wrote:

Can I somehow specify the panel number in the command?

Unfortunately no. It's not supported.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2017-07-22 20:07:20

Starrdust
Member
Registered: 2017-07-22
Posts: 7

Re: Add app shortcuts to top panel through the terminal

The terminal commands listed by you add a launcher to the end of the top panel, which I do not like. The same thing can be done even faster simply by typing:

xfce4-panel --add=launcher gimp.desktop

Such a popular DE, but commands for the terminal can not be found. Even if the moderator does not know how to do this, then what to say about ordinary users.

Last edited by Starrdust (2017-07-23 10:36:57)

Offline

#10 2017-07-23 14:48:01

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Add app shortcuts to top panel through the terminal

Starrdust wrote:

The terminal commands listed by you add a launcher to the end of the top panel, which I do not like. The same thing can be done even faster simply by typing:

xfce4-panel --add=launcher gimp.desktop

Good to know. Thank you for sharing.

Such a popular DE, but commands for the terminal can not be found. Even if the moderator does not know how to do this, then what to say about ordinary users.

Moderators are not infallible. Feel free to create an enhancement request at the bug tracker and also feel free to contribute the code to make this enhancement happen.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 561 KiB (Peak: 577.84 KiB) ]