Hello,
I have an application that opens from using an script inside a folder, therefore it was missing from the application list in the task bar. following the steps in here: Add a menu item to KDE Launcher - Ask Ubuntu i succesfully added the app to the list of applications menu. Furthermore, I also pinned to the task bar as I use it quite frequently, nevertheless i am facing the issue that it opens in a ‘second’ icon instead of the icon itself… how can i solve this so, there is only one icon, the one of the pin app, and if i open an instance of the app it stays over the pinned icon?
thanks in advance
Could you post that app contents’. It’s in ~/.local/share/applications.
Paste the contents of the application that is in ~/.local/share/applications.
Something like this:
[Desktop Entry]
Comment[nl_BE]=
Comment=
Exec=/home/john/Scripts/onlyOne.sh
GenericName[nl_BE]=onlyOne
GenericName=onlyOne
Icon=flashlight-on
MimeType=
Name[nl_BE]=Toggle onlyOne
Name=Toggle onlyOne
NoDisplay=false
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Furthermore, are the script and the application executable?
Hello,
right now the file looks like this:
[Desktop Entry]
Comment=
Exec=/home/franco/SALOME-9.11.0/salome
Icon=/home/franco/SALOME-9.11.0/sat/data/templates/Application/resources/appicon.png
Name=Salome 9.11
NoDisplay=false
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
the “salome” in the Exec is a python script.
Is that script executable as the exec? I mean, if you run that exact same command from a terminal, does it launch? If it does, I suggest you get rid of your current pinned one and drag the app straight from ~/.local/share/applications to the panel. If you still get the same error, that script calls for a separate window which in case your tasks are grouped show in the same icon and if they’re not, a separate task.
Is that script executable as the exec? I mean, if you run that exact same command from a terminal, does it launch?
yup
If it does, I suggest you get rid of your current pinned one and drag the app straight from ~/.local/share/applications to the panel.
emmm… how? I mean I run the script, it opens a window and I have in the task bar the ‘second’ icon, but if i do right click the ‘pin’ message is grayed.
what you want me to place at ~/.local/share/applications ???.
Unpin what you currently have and then simply drag the application from ~/.local/share/applications to the panel. I dunno what the script does and if your tasks are grouped or not, but if it still opens a new task, that script calls for a new window.
As an example:
Thanks for your patience, here is what happens:
as you can see in the second image it creates a second icon.
ps. the content of the file i dragged to pin is the one in my previous message
Here’s what I mean. Let’s say I have a pinned application which points at a script that, for example, opens firefox in two separate windows. The pinned one will be highlighted, but another task will appear ( grouped or not). And from the looks ( they’re different) of the icons on your panel, I think that is what’s happening. If you don’t pin it and you launch it from the menu, you’ll probably get that yellow-ish icon task.
but it doesnt ‘exist’ in the menu, it was me that I created the one with the blue icon, by following the instruction in here: Add a menu item to KDE Launcher - Ask Ubuntu
Yes, I know that. That doesn’t matter. Like I said, I dunno what the script does, but it DOES open a new window, that’s for sure.
Here, made a quick example. The desktop application points to a script that opens two separate terminal windows. Although the application is pinned, it’ll show two additional tasks. Cause that’s exactly what the script tells it to do, open two new instances.
yeah I get what you mean, but as the script comes with the app… does several configuration and settings… it is not as in your case of simply lanch an instance of a terminal
thanks in any case!
Same principal. If you don’t want two tasks, I’m afraid you’ll have to unpin it and run it from the menu.
Yeah, sorry I didn’t provide you with a more… elaborate help example.