Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

baryon

macrumors 68040
Original poster
Oct 3, 2009
3,958
3,158
So the great thing about having a touch bar is... uh... I don't know. But it freezes a lot. I want to adjust the volume, and it won't respond. This happens daily. Restarting the process called "TouchBarServer" immediately solves the issue, but it takes several steps. Opening Activity Monitor, finding the process, quitting, confirming. I want to automate this so that it can be quit at the touch of a button or by launching an app or whatever.

I thought of creating an AppleScript or Automator workflow, but I'm having issues because I have no idea what I'm doing. Basically the issues revolve around having to type in my admin password and the applescript not prompting me to do so.

Anyway, if anyone has a better insight on how to do this, please share it with me! All I want is to be able to launch an AppleScript or Service that would, without any prompts or dialog boxes, just quietly force quit the process called "TouchBarServer".

Thanks!

EDIT:
I think I figured it out! I made an Automator Action with a "Run AppleScript" action, which contains this:

Code:
on run {input, parameters}
    do shell script "sudo pkill \"TouchBarServer\"" with administrator privileges
end run

I saved it as a Service and set it to receive no input, and to be available in any application. So it's always in the Application Name > Services menu. In System Preferences > Keyboard > Shortcuts I went down to Services and set a keyboard shortcut for this service. This way, when the the TouchBar freezes, I just press this command, put my finger on the fingerprint reader and I just continue working.

This is why I love Apple: They take away simple, proven, trusted technology, replace it with complicated, unnecessary, bloated, unstable and useless technology, charge you extra for it, but at least there's AppleScript. I'm telling you, we're living in the future!
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.