kwood / simbl

Automatically exported from code.google.com/p/simbl
0 stars 0 forks source link

SIMBL doesn't inject itself into Finder on launch #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Restart the system, with a SIMBL plugin enabled that is supposed to be 
injected into Finder
2. The SIMBL plugin is *not* injected into Finder
3. Restart Finder, and the plugin is then injected

What is the expected output? What do you see instead?
I expect SIMBL to inject itself into all running applications on the initial 
boot.

What version of the product are you using? On what operating system?
Latest version, 0.9.6c, on Snow Leopard.

I think SIMBL agent only seems to recognise newly launched applications after 
it has been 
started. Is there anyway to either:
a) Start SIMBL Agent before Finder
or
b) Make it realise there are applications which have not yet been injected on 
start up, and inject 
plugins into them.

Original issue reported on code.google.com by prashant.is.here@gmail.com on 27 Sep 2009 at 6:36

GoogleCodeExporter commented 8 years ago
a) No, I don't think it's possible to launch before the Finder, but I could be 
wrong.

b) This is technically possible. The Agent could check applications on spawn, 
but there are some details about 
duplicate injection that need to be addressed.

c) You can run an AppleScript to just force the load of SIMBL into the Finder.  
Open the SIMBL.osax dictionary in 
the Script Editor and you'll see how to do it. FYI, I wouldn't *really* 
recommend hacking the Finder - seems like 
more harm than good could come of that.

Original comment by ms...@gmail.com on 29 Sep 2009 at 5:50

GoogleCodeExporter commented 8 years ago
To discover the list of running applications, use the following code:

NSWorkspace *ws = [NSWorkspace sharedWorkspace];
NSDictionary *appDict;
for (appDict in [ws launchedApplications]) {
// inject into app
}

Original comment by crazor on 8 Nov 2009 at 8:49

GoogleCodeExporter commented 8 years ago
I suspect a bug I'm experiencing with SIMBL is associated (if not directly 
caused by) the bug described in this thread.

What I am experiencing is that SIMBL isn't correctly injecting on applications 
that are automatically started at login. Specifically I have Terminal.app on my 
"Login Items" which has the Visor plugin added to it via SIMBL, but the plugin 
isn't activated when Terminal startes. Only when I terminate the auto started 
instance, and restart it manually will the plugin become activated.

It seems like it would be a nice feature if SIMBL could detect these 
prior-to-SIMBL instantiated applications and inject any plugins active for them.

Original comment by mic...@gmail.com on 10 Aug 2010 at 12:26

GoogleCodeExporter commented 8 years ago
This behaviour got worse for me with the DP's of 10.7.

Before, I had to restart only Finder, all other software launched after login 
got their injection ;)

With 10.7, I have to relaunch everything that is launched after login.

Since 10.7 has this new feature to reopen every application that was running 
when the user asked to shut down or reboot, this will get very annoying when 
Lion comes out.

Other than that, SIMBL is fine on Lion btw.

Original comment by crazor on 9 Apr 2011 at 7:35

GoogleCodeExporter commented 8 years ago
How's this patch? Should also take care of issue 53.

I'm running it locally; I'll let you know if I experience any ill effects.

Original comment by jedik...@gmail.com on 3 Aug 2011 at 6:35

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for sending this. I'm wary of injecting until the application is done 
loading all of its classes. I don't know enough about the loading process to 
say if an earlier event will cause trouble.

Also, I'm not sure if both events are necessary - seems like you can't get 
didFinishLoading without the other notification firing first.

Original comment by ms...@gmail.com on 4 Aug 2011 at 6:05

GoogleCodeExporter commented 8 years ago
You could inject the bundle and add a call to the initialization method to the 
application's runloop so that it is only executed after the first round of 
event processing.

I'll have to look up how one could add jobs to the runloop; I saw some code 
last week but can't remember the details right now...

Original comment by crazor on 5 Aug 2011 at 4:24

GoogleCodeExporter commented 8 years ago
Uh, I didn't change the notifications. I just called injectSIMBL: for all 
running applications at the time the SIMBLAgent starts running. Because it uses 
AppleScript events it's going to wait for each target application's run loop 
anyway.

(The rest of the patch is just refactoring, no behavior changes.)

Haven't experienced any problems running this version (on 10.7).

Original comment by jedik...@gmail.com on 16 Aug 2011 at 8:44

GoogleCodeExporter commented 8 years ago
I think it's the right way to fix this issue. I was thinking about the same 
kind of fix. Any chance to have this fixed upstream?

Original comment by azeit...@gmail.com on 16 Aug 2011 at 9:17

GoogleCodeExporter commented 8 years ago
I'll have a closer look. My question about duplicate notifications hasn't been 
addressed, so I'll have to manually verify the behavior.

As for injecting into the Finder, I'm pretty reluctant to allow that by default.

Original comment by ms...@gmail.com on 17 Aug 2011 at 1:28

GoogleCodeExporter commented 8 years ago
How do you install that patch to fix the injection in OS X Lion?

Original comment by timmy.wr...@gmail.com on 2 Sep 2011 at 6:10

GoogleCodeExporter commented 8 years ago
How can I install the patch???

Original comment by rome...@gmail.com on 23 Sep 2011 at 2:41

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I compiled SIMBL with the patch above. Here are the bundle _and_ the 
installation package.

Original comment by join.f...@gmail.com on 5 Jan 2012 at 3:31

Attachments:

GoogleCodeExporter commented 8 years ago
Looks like the pkg and osax attached to comment 14 works for me, although the 
sizes seemed significantly smaller than before.  Now, I don't have to restart 
any apps to load SIMBL after reboots.  Thanks!

Original comment by jaeho.shin on 6 Jan 2012 at 1:04

GoogleCodeExporter commented 8 years ago
The patch seems not working for me on Lion. I have installed just the pkg.
I need to restart the Finder to have color siderbar from SIMBL inject in the 
Finder like before. Any advise ?

Original comment by yves.blu...@gmail.com on 6 Jan 2012 at 7:42

GoogleCodeExporter commented 8 years ago
I installed the package alright, but I can't find where to drop that .osax 
file. It's an applescript, but where does it go? And is it necessary to fix the 
issue? I didn't do anything with the  simple.osax file, but I installed the 
package and I'm still having the same issue. If someone could clear that up. 
Thanks.

Original comment by timmy.wr...@gmail.com on 8 Jan 2012 at 3:08

GoogleCodeExporter commented 8 years ago
UPDATE:

Found where to put the .osax file. I removed SIMBL, removed plugins, removed 
the scripting add-on. Reinstalled SIMBL reinstalled the plugins, dragged over 
the new .osax file. STILL does not fix the startup issue... why???

Original comment by timmy.wr...@gmail.com on 8 Jan 2012 at 3:21

GoogleCodeExporter commented 8 years ago
UPDATE 2: Requires complete uninstalled, re-install, then FULL restart (not 
login/out for some reason). You also have to quit the SIMBLE Agent process with 
Activity Monitor, then copy over the modded .osax file to: 
/Library/ScriptingAdditions

Works like a charm!

Original comment by timmy.wr...@gmail.com on 8 Jan 2012 at 3:23

GoogleCodeExporter commented 8 years ago
This patch is not all gold, as it has some issues.  

Issue 1.  I am doing a global inject *  for all apps. and after using this 
patch, some of my apps no longer globally inject (i.e. Skype doesn't take the 
injection but without patching with this patch Skype DOES) so something in the 
patch is changing core functionality that normally should work.

Issue 2.  I have a solid state HD.  I can boot up my mac in 8 seconds and I am 
at the finder with everything loaded in 13.  With this patch I have to wait 
almost a minute for SIMBL to inject into running apps, everything pauses that 
would load (system stuff, like Hands Off, Hazel, Teleport, Size UP, etc.. they 
all wait for SIMBL to figure out what this patch is trying to accomplish.) 

in the time it takes waiting I could quit and reopen any app thats launched 
without SIMBL injection and also resolve problem #1 at the same time.

any ideas why SIMBL no longer works on Skype after this patch? 

Original comment by spammer....@gmail.com on 6 Feb 2012 at 12:41

GoogleCodeExporter commented 8 years ago
Well, I applied de SIMBL-0.9.9b-LionPatched.zip on my MacBookPro 15" 02/2011 
and did a repair permissions on my HD.

Eveything is OK now !

Original comment by AROBAS...@gmail.com on 8 Feb 2012 at 4:27

GoogleCodeExporter commented 8 years ago
Ive also applied this patch, and it seems to work well. I'm going to deploy it 
in my updated Safari plugin 'Safari Cookies'.

Original comment by sweetpproductions@gmail.com on 2 Mar 2012 at 11:43

GoogleCodeExporter commented 8 years ago
To fix this on a case-by-case basis as alluded to in Comment 1 part (c), create 
an AppleScript such as:

tell application "Terminal"
    inject SIMBL into Snow Leopard
end tell

That will inject SIMBL into the running Terminal application. Thanks to
http://colonelpanic.net/2010/07/terminal-nirvana-on-snow-leopard-with-simbl-viso
r/
for providing the details.

Original comment by neit...@gmail.com on 1 May 2012 at 2:36