jitouch icon indicating copy to clipboard operation
jitouch copied to clipboard

If Jitouch doesn't run automatically

Open aaronkollasch opened this issue 2 years ago • 16 comments

I've heard some reports of Jitouch not launching on its own, even if Jitouch runs fine when run manually from a terminal. Using a terminal should not be necessary; Jitouch should automatically launch when its Preference Pane is opened for the first time, and whenever you log in afterwards. If not, you can report your issue below.

Here are some troubleshooting tips for making Jitouch run in the background:

The Jitouch background process is managed by launchctl. Normally, launchctl will launch Jitouch and keep it running, saving its outputs to ~/Library/Logs/com.jitouch.Jitouch.log. To check if Jitouch is running this way, run the command

launchctl list | grep Jitouch

in the terminal. You should see a result like:

<PID>	0	com.jitouch.Jitouch.agent

If there is no PID and the second number is nonzero, the LaunchAgent is not running.

To force restart the LaunchAgent, run these commands:

launchctl unload ~/Library/LaunchAgents/com.jitouch.Jitouch.plist
launchctl load ~/Library/LaunchAgents/com.jitouch.Jitouch.plist

If this doesn't work, report below. Note that clicking "On" in the Jitouch Preference Pane also runs launchctl load ... command behind the scenes.

If launchctl list shows Jitouch is running, the ji icon should be visible in the menu bar. If not, report below. Also, check the log at ~/Library/Logs/com.jitouch.Jitouch.log for any error messages.

@DongGilKim @skidevil91 let me know if this helps!

aaronkollasch avatar May 21 '22 02:05 aaronkollasch

Jitouch only works after commanding : /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch

First, I closed Jitouch by closing the terminal that is working with the commanding above and followed your instruction. To check if Jitouch is running this way, run the command ~/Library/Logs/com.jitouch.Jitouch.log in the terminal. I see a result like:

61012 0 com.jitouch.Jitouch.agent

launchctl unload ~/Library/LaunchAgents/com.jitouch.Jitouch.plist launchctl load ~/Library/LaunchAgents/com.jitouch.Jitouch.plist This code does not work at all. When I closed the terminal commanding /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch, Jitouch just shut down.

  1. My new MacBook(M1 Max) will come in a week. I will install Jitouch on it. What is the latest instruction to follow?

By the way, I really express my appreciation for your all efforts about Jitouch. You know, now we cannot live without Jitouch on our mac, it is so essential.

DongGilKim avatar May 25 '22 17:05 DongGilKim

so launchctl unload ~/Library/LaunchAgents/com.jitouch.Jitouch.plist and launchctl load ~/Library/LaunchAgents/com.jitouch.Jitouch.plist are two separate commands to run one after another, and they shouldn't produce any output unless there's an error. I'm surprised it isn't working. Could you run the command tail ~/Library/Logs/com.jitouch.Jitouch.log and look for any error messages? Perhaps there's a accessibility permissions error?

What version of macOS and Mac are you using right now?

The instruction for installation is simply to run the installer at https://github.com/aaronkollasch/jitouch/releases/latest, then open the Jitouch preference pane in System Preferences. No terminal commands necessary. If Jitouch doesn't start when you open the preference pane (or show a popup asking for permissions in Privacy -> Accessibility), then restart your computer and it should load. Hopefully you shouldn't need to restart, though. Let me know how it goes!

aaronkollasch avatar May 27 '22 22:05 aaronkollasch

i just tried, using monterey 12.4, and here's what happened for me: downloaded the install-jitouch.pkg from link above, ran installer. tried to open up preference pane in system preferences and got the attached error (could not load jitouch preference pane).

Screen Shot 2022-06-02 at 8 33 15 PM

restarted computer, tried to open jitouch preference pane again in system preferences. this time it opened, but the ji icon is not showing in the menu bar (even though the "show icon in menu bar" option is checked), and the gestures on my magic mouse are not working (the one I use the most to check is the 3 fingered click to show desktop).

when i run

launchctl list | grep Jitouch

in terminal, i get this result:

932 0 com.jitouch.Jitouch.agent

so not sure what's going on?

i also want to say - i REALLY appreciate all your help trying to troubleshoot this. jitouch has made itself so essential i can't imagine working without it!

skidevil91 avatar Jun 03 '22 00:06 skidevil91

So what I think is going on is macOS is supposed to display a permission request to give Jitouch access to the Accessibility API, but it doesn't show for some reason. The terminal result shows that Jitouch is running, but it's waiting to receive permissions.

So, the first thing to try is killall Jitouch in the terminal, which will force Jitouch to restart and perhaps trigger the permissions dialog.

If that doesn't work, you will need to find Jitouch.app in Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/ and drag it into the list of apps under System Preferences -> Security & Privacy -> Privacy -> Accessibility. Then run killall Jitouch. Hopefully, that works.

aaronkollasch avatar Jun 03 '22 01:06 aaronkollasch

running killall Jitouch didn't seem to do anything. I also couldn't seem to find the Preference Panes folder you referenced. However, Jitouch IS already listed in system preferences > security & privacy > privacy > acceesibility. See screenshots, if helpful. Screen Shot 2022-06-02 at 10 19 05 PM Screen Shot 2022-06-02 at 10 19 26 PM Screen Shot 2022-06-02 at 10 19 40 PM Screen Shot 2022-06-02 at 10 19 48 PM Screen Shot 2022-06-02 at 10 19 55 PM

skidevil91 avatar Jun 03 '22 02:06 skidevil91

UGGH and FWIW, running

sudo -s

and then

pkill -f "Jitouch" sleep 5 nohup ~/Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch > /dev/null 2>&1 &

also no longer gets the Ji logo to show in menu bar, and gestures not working. so now I'm in a worse off state with no way to get it to work :(

skidevil91 avatar Jun 03 '22 02:06 skidevil91

So it looks like you have Jitouch.prefPane installed in /Library/PreferencePanes/Jitouch.prefPane, not ~/Library/PreferencePanes/Jitouch.prefPane, so the command you gave wouldn't point to the Jitouch executable. Not sure why it's moved – but it could be that the Jitouch in the Accessibility preferences is also pointing to the wrong place.

  • Probably the easiest approach is to remove Jitouch from the Accessibility list entirely, then run killall Jitouch and the accessibility popup should show.
  • Another thing to try is switching Jitouch to "Off" then "On" in System Preferences.
  • Otherwise, add Jitouch manually: To find Jitouch.app you can right-click the prefPane in screenshot 2, and click "Show Package Contents", then go to Contents/Resources and find Jitouch.app. Or, run open /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources in the terminal. Drag Jitouch.app into the Accessibility list (first removing the existing Jitouch), then run killall Jitouch.

Otherwise, can you check the file ~/Library/Logs/com.jitouch.Jitouch.log for error messages? Can you also check the output of ps ax | grep "[J]itouch"? It should show some numbers followed by /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch.

aaronkollasch avatar Jun 03 '22 03:06 aaronkollasch

Just to be clear, Jitouch.prefPane will only install into "Macintosh HD > Library > PreferencePanes" or "Macintosh HD > Users > your user > Library > PreferencePanes", and shouldn't be installed into both. Judging by your screenshots, it's only installed into the base /Library, which is fine.

You shouldn't need to use your old command, as the LaunchAgent ensures that Jitouch is already running in the background. The ps ax | grep "[J]itouch" command can confirm that.

To check what's going wrong with the Jitouch process, run open ~/Library/Logs/com.jitouch.Jitouch.log to open the logfile in Console.app, then run killall Jitouch. If you see a line appear in Console.app like Could not create CGEventTap. Allow Jitouch in System Preferences -> Privacy -> Accessibility. then there's a permissions issue. For that, try the steps I've listed above.

Sorry it's not working immediately.

aaronkollasch avatar Jun 03 '22 04:06 aaronkollasch

Hello,

My new MacBook has exact same issue before. Screen Shot 2022-06-03 at 4 12 08 PM Screen Shot 2022-06-03 at 4 10 49 PM I installed Jitouch from your latest link. I initially had same issue below: Screen Shot 2022-06-03 at 4 14 42 PM So I go to "Users > Library > PreferencePanes" and the double clicked Jitouch.prefPane Screen Shot 2022-06-03 at 4 15 42 PM

So the problem is Jitouch does show up in Privacy as below: I think I need permission. Screen Shot 2022-06-03 at 4 12 46 PM

I can only execute Jitouch with the below command: Here Jitouch is working through permission from accessibility of terminal /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch Screen Shot 2022-06-03 at 4 19 04 PM You can see that terminal has accessibility from the above screenshot.

What should I do now?

DongGilKim avatar Jun 03 '22 20:06 DongGilKim

So strange that System Preferences can't open the prefPane the first time, I think a bunch of people have gotten that now.

You need to give Jitouch.app accessibility permissions. Try these two things:

  • Try turning Jitouch off and on from its preferences window. That may get the permissions request to show.
  • Run open /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/ and the drag Jitouch.app into the list of Accessibility apps allowed to control your computer.

Then run killall Jitouch and the Ji icon should appear and gestures should start working.

If that doesn't work, can you send the results for

  • ps ax | grep "[J]itouch"
  • launchctl list | grep Jitouch
  • tail ~/Library/Logs/com.jitouch.Jitouch.log

aaronkollasch avatar Jun 03 '22 20:06 aaronkollasch

"Try turning Jitouch off and on from its preferences window. That may get the permissions request to show" -> This one does not work.

"Run open /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/ and the drag Jitouch.app into the list of Accessibility apps allowed to control your computer." -> This one exactly works bro!!! I am so happy!!! Gosh I did not know that I can just drag it into the Accessilbity apps. I restarted the computer and still works well. You can add this information to the main page, so other people get through easily!

Again thank you so much for your all efforts. I cannot imagine maclife without Jitouch! :)

DongGilKim avatar Jun 03 '22 21:06 DongGilKim

Awesome, I'm glad to hear it! You are very welcome :)

aaronkollasch avatar Jun 03 '22 23:06 aaronkollasch

Hi. I'm also in desperate need for this app and eternally grateful for your work, so here's my feedback on my install on a MBP 11,3 running Monterey.

  1. Installed with the .pkg, did not work at first.
  2. Checked Jitouch.app on Accessibility list. Fine. Then checked if I could make the menubar icon work... neither.
  3. I tried with the command /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch posted by @DongGilKim and voilà! Not only it finally worked, but resolved the 'no working after wake up' issue as well! Thanks both of you!!

MaxRF avatar Jun 05 '22 01:06 MaxRF

Hi all, An update on my side:

I re-installed Jitouch 2.8, opened the preference pane, but couldn't get the ji logo to show up in menu bar even though it was listed in accessibility.

I then tried the command above that @DongGilKim and @MaxRF had success with: /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/Jitouch.app/Contents/MacOS/Jitouch and that worked! For the record, this is the results that appeared in terminal after inputting that command:

*** Recognized (0x6b) family*** (26 cols X 18 rows) *** Recognized (0xb0) family*** (60 cols X 2 rows) *** Recognized (0x70) family*** (10 cols X 15 rows)

I haven't yet seen if it persists after wake-up but will report after that.

However I did try to restart computer to see what would happen, after restart clicking on the preference pane in system preferences opened jitouch but didn't get the ji logo to load in menu bar, so I had to use the above terminal again to get the logo to appear and the gestures to work.

skidevil91 avatar Jun 08 '22 14:06 skidevil91

Hi,

I'm glad Jitouch is working for you! I'd still like to get it to launch automatically – you shouldn't have to run a terminal command on every restart.

The app that requires accessibility permissions will be Terminal.app if you run Jitouch from the terminal and Jitouch.app for the automatic launch agent. It could be that you have Terminal.app added to the Accessibility permissions, but not Jitouch.app, or that the Jitouch in the list is actually pointing to the wrong location.

Could you try these steps:

  • remove Jitouch from the Accessibility permissions list
  • open /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/ and then drag Jitouch.app into the list
  • killall Jitouch, or restart

and does that get Jitouch to run in the background?

aaronkollasch avatar Jun 08 '22 14:06 aaronkollasch

That worked! Followed instructions above, jitouch was working, restarted computer, and now it's still working. @aaronkollasch/jitouch @.***> - you are a genius and I can't tell you how much I appreciate your help. THANK YOU!!!

On Wed, Jun 8, 2022 at 10:51 AM Aaron Kollasch @.***> wrote:

Hi,

I'm glad Jitouch is working for you! I'd still like to get it to launch automatically – you shouldn't have to run a terminal command on every restart.

The app that requires accessibility permissions will be Terminal.app if you run Jitouch from the terminal and Jitouch.app for the automatic launch agent. It could be that you have Terminal.app added to the Accessibility permissions, but not Jitouch.app, or that the Jitouch in the list is actually pointing to the wrong location.

Could you try these steps:

  • remove Jitouch from the Accessibility permissions list
  • open /Library/PreferencePanes/Jitouch.prefPane/Contents/Resources/ and then drag Jitouch.app into the list
  • killall Jitouch, or restart

and does that get Jitouch to run in the background?

— Reply to this email directly, view it on GitHub https://github.com/aaronkollasch/jitouch/issues/23#issuecomment-1150024774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZH3R3NIVQKREOZBRRJIDODVOCXNHANCNFSM5WRENZ5Q . You are receiving this because you were mentioned.Message ID: @.***>

skidevil91 avatar Jun 08 '22 15:06 skidevil91