This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Adding links into the Task Bar via a command?

Tags: None
(comma "," separated)
emarqe
Registered Member
Posts
13
Karma
0
Hi,

Is there a way of adding a link into the task bar via a shell command? I know it can be done dragging and dropping the link into the task bar, but I need to do this automatically via a running script that detects certain events.

I tried editing ~/.kde/share/config/plasma-desktop-appletsrc and adding a config block like this:

Code: Select all
[Containments][3][Applets][50]
geometry=31,1,27,27
immutability=1
plugin=icon
zvalue=0

[Containments][3][Applets][50][Configuration]
Url=file:///home/user/Desktop/desktopfile.desktop


This will indeed work, but the session must close and reopen... or also a
Code: Select all
kquitapp plasma-desktop && plasma-desktop
command would work, but it produces a "black screen blink" for a second and I don't like this too much...

Any hints are very appreciated.

Thanks!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm afraid Plasma Desktop does not support this sort of integration. The only available integration is through the execution of Javascript within Plasma Desktop itself, which the user must manually execute (for security reasons).

In case something else is possible - what are you trying to achieve?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
emarqe
Registered Member
Posts
13
Karma
0
Thanks for answering.

In relationship with my previous topic, taking in account that I can indeed know when a user has mounted a device because the Thin-Client infrastructure has a daemon for that, I'd like to automatically add an "Eject device" icon in the user's task bar, so it's easier for them to handle their device.

At this moment I'm able to add a .desktop file on the user's desktop to safely eject their device. However, taking in account that an user could mount more than one device, it seems a bit "ugly" to me to add a desktop icon per device, so I think it's more handy adding a small icon into the user's taskbar. It's a shame it's not possible to do it dynamically.

If someone hasn't a more brilliant idea I'll have to resign to the current approach :-)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you can get a list of devices connected to their Thin Client, then you could use a shortcut to launch a "kdialog" powered script which then allowed them to choose the device to disconnect. This shortcut could reside permanently within the system tray.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
emarqe
Registered Member
Posts
13
Karma
0
Wow, that's indeed a nice option! I finally used a little script using
Code: Select all
kdedialog --menu
to achieve it!. Thanks so much!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]