Tips and Tricks | Trucs et Astuces
Subscription date : 28 October 2009
Messages : 415
|
You like to use Cairo-Dock on Linux, you like it so much that you removed the entire Gnome-panel out of your sight.
But you're using Skype, and nothing irritates you more than this launcher that creates a new instance of Skype each time.
Don't bother seeking your instance in the Systray, here is a solution:
(disclaimer: perhaps i am lagging, the solution exists for more that a year and a half from the moment i am writing this post, but as i didn't see any solution on this forum, i thought it'd be a good idea to share.)
You can install a script called "skype-single-instance", which you can download from here http://forum.skype.com/index.php?app=core&module=attach§ion=attach&attach_id=45021.
Just download this script, extract it, and move it to /usr/local/bin/
Then you can change your launcher command-line to
More info on http://forum.skype.com/index.php?showtopic=332401 and thanks to Jackwizard!
Also more plugins and scripts for Skype on http://forum.skype.com/index.php?showtopic=98654
Enjoy  |
fabounet, Thursday 04 November 2010 à 11:34
|
|
Subscription date : 30 November 2007
Messages : 17118
|
good trick
would you mind adding it to the wiki ? |
Subscription date : 28 October 2009
Messages : 415
|
I put this on my to-do list.
Also (when i find the time -- because right now i am really postponing my study in for Cairo-Dock ) i'll see to making an applet that creates launchers for applications that go to the systray (eg. Gwget).
PS: Perhaps you could host this script in case it is removed some time in the future. |
fabounet, Thursday 04 November 2010 à 16:34
|
|
Subscription date : 30 November 2007
Messages : 17118
|
thx !  |
Subscription date : 28 October 2009
Messages : 415
|
Hi there,
the skype-single-instance script has been removed from the forum.
Does any one of you have a copy of it? I just upgraded to Xubuntu 11.10 and lost it  |
Subscription date : 28 October 2009
Messages : 415
|
Oh I found it:
import dbus
import sys
import os
try:
remote_bus = dbus.SessionBus()
out_connection = remote_bus.get_object('com.Skype.API', '/com/Skype')
out_connection.Invoke('NAME single-instance')
out_connection.Invoke('PROTOCOL 5')
out_connection.Invoke('SET WINDOWSTATE NORMAL')
out_connection.Invoke('FOCUS')
except:
os.system("skype")
sys.exit()
|
fabounet, Friday 27 January 2012 à 12:59
|
|
Subscription date : 30 November 2007
Messages : 17118
|
thanks !
by the way, their Dbus API seems quite rich ... wouldn't it be possible to make an applet from it ? (like maybe the Pidgin applet). |
Subscription date : 28 October 2009
Messages : 415
|
I haven't looked at it. Also I got a bit frustrated with the Stack Exchange stuff because it forces you to log using embedded web browsers--while I wanted to make something a discrete. So for now I'm going to play around with Gnome Shell and see if I can hack in to make some extensions. |
fabounet, Tuesday 31 January 2012 à 14:02
|
|
Subscription date : 30 November 2007
Messages : 17118
|
ok, it would be interesting to have some comparison on making applets for both systems  |
Guest, Sunday 04 March 2012 à 04:29
|
|
|
for me it doesn't work, i've tried to run in terminal to see what's happening and I've got this:
xxxxxx@xxxxxx-ABCD1234:/usr/local/bin$ ./skype-single-instance
File "./skype-single-instance", line 8
remote_bus = dbus.SessionBus()
^
IndentationError: expected an indented block
any idea??
I'm in ubuntu 11.10 |
matttbe, Monday 05 March 2012 à 03:15
|
|
Subscription date : 24 January 2009
Messages : 12573
|
Indent was missing. Simply try with that: import dbus
import sys
import os
try:
remote_bus = dbus.SessionBus()
out_connection = remote_bus.get_object('com.Skype.API', '/com/Skype')
out_connection.Invoke('NAME single-instance')
out_connection.Invoke('PROTOCOL 5')
out_connection.Invoke('SET WINDOWSTATE NORMAL')
out_connection.Invoke('FOCUS')
except:
os.system("skype")
sys.exit()
|
Tips and Tricks | Trucs et Astuces
|