[GH-ISSUE #492] run client at system startup on macOS #382

Open
opened 2026-05-05 06:14:29 -06:00 by gitea-mirror · 15 comments
Owner

Originally created by @puzne2000 on GitHub (Nov 15, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/492

Barrier Version

2.3.2

Other info

This is a feature request which doesn't necessarily require coding.

I would like to have a macOS computer run a barrier client, so that I will not have to connect it to a keyboard or mouse. So I want the client to start running at system startup, or else I need to first login, and only then Barrier starts... This should be doable, but I don't know the OS well enough to do it myself and I don't have the time to figure it out. Would be nice if someone could just write nice clear instructions for how to do it...

Thanks

Originally created by @puzne2000 on GitHub (Nov 15, 2019). Original GitHub issue: https://github.com/debauchee/barrier/issues/492 ### Barrier Version ### 2.3.2 ### Other info ### This is a feature request which doesn't necessarily require coding. I would like to have a macOS computer run a barrier client, so that I will not have to connect it to a keyboard or mouse. So I want the client to start running at system startup, or else I need to first login, and only then Barrier starts... This should be doable, but I don't know the OS well enough to do it myself and I don't have the time to figure it out. Would be nice if someone could just write nice clear instructions for how to do it... Thanks
gitea-mirror added the
enhancement
label 2026-05-05 06:14:29 -06:00
Author
Owner

@puzne2000 commented on GitHub (Nov 17, 2019):

update:
tried running at startup using launchctl.

-- I wrote a script to run barrierc, made it executable, and ran it: it ran well.
-- I made a plist as described here:
https://medium.com/@fahimhossain_16989/adding-startup-scripts-to-launch-daemon-on-mac-os-x-sierra-10-12-6-7e0318c74de1

and indeed it ran my script and barrier started running at system startup as root (I checked). However, when run in this form even though it kept running in the background, it didn't really work and I could not use the mouse from the server on the client.

any help would be welcome..

<!-- gh-comment-id:554795184 --> @puzne2000 commented on GitHub (Nov 17, 2019): update: tried running at startup using launchctl. -- I wrote a script to run barrierc, made it executable, and ran it: it ran well. -- I made a plist as described here: https://medium.com/@fahimhossain_16989/adding-startup-scripts-to-launch-daemon-on-mac-os-x-sierra-10-12-6-7e0318c74de1 and indeed it ran my script and barrier started running at system startup as root (I checked). However, when run in this form even though it kept running in the background, it didn't really work and I could not use the mouse from the server on the client. any help would be welcome..
Author
Owner

@rodneyrod commented on GitHub (Nov 18, 2019):

@puzne2000 Is it running as the system user? It may be looking for config in a different location or might not have permission to view the config in your home directory.

<!-- gh-comment-id:554877838 --> @rodneyrod commented on GitHub (Nov 18, 2019): @puzne2000 Is it running as the system user? It may be looking for config in a different location or might not have permission to view the config in your home directory.
Author
Owner

@schroederjulius commented on GitHub (Nov 23, 2019):

Could you please upload the script you used to run barrier?

<!-- gh-comment-id:557784270 --> @schroederjulius commented on GitHub (Nov 23, 2019): Could you please upload the script you used to run barrier?
Author
Owner

@puzne2000 commented on GitHub (Nov 23, 2019):

Could you please upload the script you used to run barrier?

Hi,

ok the long version is below. The short version is that it seems that it tried to access
/var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt
in order to connect to the server, and it doesn't have permission for that.

And now for the long version: I ran a ps command (ps -x| grep barrier) while barrier was running, and copied the line with the barrier command to my script. The result was this:

#!/bin/sh
/Applications/Barrier.app/Contents/MacOS/barrierc -f --no-tray --debug INFO --name Flatty.local --enable-drag-drop --enable-crypto [192.168.0.174]:24800

Flatty.local is the bonjour name of the client (not that it matters), and the IP address is the local address of the server. I think I also tried to remove the -f, but I'm not sure.

As for the plist that I added to /Library/LauenchDeamons, it's file name is myBarrierLauencher.plist, and here it is:

Label myBarrierLauncher Program /Users/####/launchbarrier.sh KeepAlive

above I replaced my username with ####.

The owner of the plist is wheel, which I did with sudo chown. I then added the plist to the launch deamon via

sudo launchctl load -w /Library/LaunchDaemons/myBarrierLauncher.plist

after restarting the computer, barrier doesn't work. However, applying ps -efx |grep barrier yields

0   340     1   0  8:27PM ??         0:00.45 /Applications/Barrier.app/Contents/MacOS/barrierc --no-tray --debug INFO --name Flatty.local --enable-drag-drop --enable-crypto [192.168.0.174]:24800

The time stamp matches the time when I restarted the comp. Finally, here's a dump from /var/log/system.log that I got by cat /var/log/system.log|grep Barrier

Nov 23 20:24:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): This service is defined to be constantly running and is inherently inefficient.
Nov 23 20:24:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48683]): Service exited with abnormal code: 134
Nov 23 20:24:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:24:22 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48688]): Service exited with abnormal code: 134
Nov 23 20:24:22 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:24:32 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48692]): Service exited with abnormal code: 134
Nov 23 20:24:32 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:24:42 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48695]): Service exited with abnormal code: 134
Nov 23 20:24:42 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:24:52 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48699]): Service exited with abnormal code: 134
Nov 23 20:24:52 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:02 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48703]): Service exited with abnormal code: 134
Nov 23 20:25:02 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48706]): Service exited with abnormal code: 134
Nov 23 20:25:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:23 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48709]): Service exited with abnormal code: 134
Nov 23 20:25:23 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:33 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48715]): Service exited with abnormal code: 134
Nov 23 20:25:33 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:43 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48721]): Service exited with abnormal code: 134
Nov 23 20:25:43 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:53 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] ERROR: unable to connect to pasteboard, clipboard sharing disabled
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: started client
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: server fingerprint: ####
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: trustedServersFilename: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: Unable to open trustedServersFile: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt
Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] ERROR: failed to verify server certificate fingerprint
Nov 23 20:27:24 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 4 seconds. Pushing respawn out by 6 seconds.
Nov 23 20:27:24 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:24] ERROR: unable to connect to pasteboard, clipboard sharing disabled
Nov 23 20:27:24 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:24] NOTE: started client
Nov 23 20:27:24 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:24] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800
Nov 23 20:27:25 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:25] WARNING: failed to connect to server: cannot connect socket: Network is unreachable
Nov 23 20:27:26 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:26] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800
Nov 23 20:27:26 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:26] WARNING: failed to connect to server: cannot connect socket: Network is unreachable
Nov 23 20:27:27 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:27] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800
Nov 23 20:27:27 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:27] WARNING: failed to connect to server: cannot connect socket: Network is unreachable
Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800
Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: server fingerprint: ####
Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: trustedServersFilename: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt
Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: Unable to open trustedServersFile: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt
Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] ERROR: failed to verify server certificate fingerprint
Nov 23 20:27:28 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[425]): Service exited with abnormal code: 134

where I have erased the actual server fingerprints and replaced with #### (at least I tried).

thanks,

<!-- gh-comment-id:557823243 --> @puzne2000 commented on GitHub (Nov 23, 2019): > Could you please upload the script you used to run barrier? Hi, ok the long version is below. The short version is that it seems that it tried to access /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt in order to connect to the server, and it doesn't have permission for that. And now for the long version: I ran a ps command (ps -x| grep barrier) while barrier was running, and copied the line with the barrier command to my script. The result was this: #!/bin/sh /Applications/Barrier.app/Contents/MacOS/barrierc -f --no-tray --debug INFO --name Flatty.local --enable-drag-drop --enable-crypto [192.168.0.174]:24800 Flatty.local is the bonjour name of the client (not that it matters), and the IP address is the local address of the server. I think I also tried to remove the -f, but I'm not sure. As for the plist that I added to /Library/LauenchDeamons, it's file name is myBarrierLauencher.plist, and here it is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd > <plist version="1.0"> <dict> <key>Label</key> <string>myBarrierLauncher</string> <key>Program</key> <string>/Users/####/launchbarrier.sh</string> <key>KeepAlive</key> <true/> </dict> </plist> above I replaced my username with ####. The owner of the plist is wheel, which I did with sudo chown. I then added the plist to the launch deamon via sudo launchctl load -w /Library/LaunchDaemons/myBarrierLauncher.plist after restarting the computer, barrier doesn't work. However, applying ps -efx |grep barrier yields 0 340 1 0 8:27PM ?? 0:00.45 /Applications/Barrier.app/Contents/MacOS/barrierc --no-tray --debug INFO --name Flatty.local --enable-drag-drop --enable-crypto [192.168.0.174]:24800 The time stamp matches the time when I restarted the comp. Finally, here's a dump from /var/log/system.log that I got by cat /var/log/system.log|grep Barrier Nov 23 20:24:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): This service is defined to be constantly running and is inherently inefficient. Nov 23 20:24:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48683]): Service exited with abnormal code: 134 Nov 23 20:24:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:24:22 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48688]): Service exited with abnormal code: 134 Nov 23 20:24:22 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:24:32 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48692]): Service exited with abnormal code: 134 Nov 23 20:24:32 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:24:42 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48695]): Service exited with abnormal code: 134 Nov 23 20:24:42 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:24:52 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48699]): Service exited with abnormal code: 134 Nov 23 20:24:52 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:02 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48703]): Service exited with abnormal code: 134 Nov 23 20:25:02 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48706]): Service exited with abnormal code: 134 Nov 23 20:25:12 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:23 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48709]): Service exited with abnormal code: 134 Nov 23 20:25:23 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:33 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48715]): Service exited with abnormal code: 134 Nov 23 20:25:33 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:43 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[48721]): Service exited with abnormal code: 134 Nov 23 20:25:43 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:53 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] ERROR: unable to connect to pasteboard, clipboard sharing disabled Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: started client Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800 Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: server fingerprint: #### Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: trustedServersFilename: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] NOTE: Unable to open trustedServersFile: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt Nov 23 20:25:53 Flatty Barrier 2.3.2-Release[48752]: [2019-11-23T20:25:53] ERROR: failed to verify server certificate fingerprint Nov 23 20:27:24 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher): Service only ran for 4 seconds. Pushing respawn out by 6 seconds. Nov 23 20:27:24 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:24] ERROR: unable to connect to pasteboard, clipboard sharing disabled Nov 23 20:27:24 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:24] NOTE: started client Nov 23 20:27:24 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:24] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800 Nov 23 20:27:25 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:25] WARNING: failed to connect to server: cannot connect socket: Network is unreachable Nov 23 20:27:26 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:26] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800 Nov 23 20:27:26 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:26] WARNING: failed to connect to server: cannot connect socket: Network is unreachable Nov 23 20:27:27 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:27] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800 Nov 23 20:27:27 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:27] WARNING: failed to connect to server: cannot connect socket: Network is unreachable Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: connecting to '192.168.0.174': 192.168.0.174:24800 Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: server fingerprint: #### Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: trustedServersFilename: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] NOTE: Unable to open trustedServersFile: /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt Nov 23 20:27:28 Flatty Barrier 2.3.2-Release[340]: [2019-11-23T20:27:28] ERROR: failed to verify server certificate fingerprint Nov 23 20:27:28 Flatty com.apple.xpc.launchd[1] (myBarrierLauncher[425]): Service exited with abnormal code: 134 where I have erased the actual server fingerprints and replaced with #### (at least I tried). thanks,
Author
Owner

@rodneyrod commented on GitHub (Nov 24, 2019):

Is it possible to login as root, then copy your config to /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt?

This is because it's not your user that will be running Barrier, but rather the service or root account attempting to run it prior to user login and those accounts will expect the configs to be in a specific location for those accounts.

<!-- gh-comment-id:557845244 --> @rodneyrod commented on GitHub (Nov 24, 2019): Is it possible to login as root, then copy your config to /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt? This is because it's not your user that will be running Barrier, but rather the service or root account attempting to run it prior to user login and those accounts will expect the configs to be in a specific location for those accounts.
Author
Owner

@oristopo commented on GitHub (Nov 27, 2019):

@puzne2000 perhaps one problem is that /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt does not yet exist.
Attached zip includes barrierc-trust.sh, which will generate that file if run e.g.:

sudo barrierc-trust.sh [192.168.0.174]:24800

It is based on https://gist.github.com/dayne/e3a7f31f0624bf299faf9fadfe510322
adding quotes around paths for blank in ../Library/Application Support/..

With that file generated, macOS client works immediately by:

sudo launchctl load -w /Library/LaunchDaemons/com.github.debauchee.barrier.plist

..using the plist in attached zip, but fails during reboots:
(com.github.debauchee.barrier[610]): Service exited due to signal: Segmentation fault: 11 sent by exc handler[0]

I guess barrierc gets launched during reboot before mouse handling is ready..??

client.zip

<!-- gh-comment-id:558897705 --> @oristopo commented on GitHub (Nov 27, 2019): @puzne2000 perhaps one problem is that /var/root/Library/Application Support/barrier/SSL/Fingerprints/TrustedServers.txt does not yet exist. Attached zip includes barrierc-trust.sh, which will generate that file if run e.g.: sudo barrierc-trust.sh [192.168.0.174]:24800 It is based on https://gist.github.com/dayne/e3a7f31f0624bf299faf9fadfe510322 adding quotes around paths for blank in ../Library/Application Support/.. With that file generated, macOS client works immediately by: sudo launchctl load -w /Library/LaunchDaemons/com.github.debauchee.barrier.plist ..using the plist in attached zip, but fails during reboots: (com.github.debauchee.barrier[610]): Service exited due to signal: Segmentation fault: 11 sent by exc handler[0] I guess barrierc gets launched during reboot before mouse handling is ready..?? [client.zip](https://github.com/debauchee/barrier/files/3894790/client.zip)
Author
Owner

@oristopo commented on GitHub (Nov 27, 2019):

Another clue:
After successful macOS client launch by:

sudo launchctl load -w /Library/LaunchDaemons/com.github.debauchee.barrier.plist

.. then logoff (but leave running) that client, server mouse cannot move cursor onto client screen.
Mouse cursor does move off server screen, and correct client function resumes after login,
so barrierc continued running on the client, but, unlike Windows client, macOS client does not support cursor movement while user not logged in.

<!-- gh-comment-id:559051159 --> @oristopo commented on GitHub (Nov 27, 2019): Another clue: After successful macOS client launch by: sudo launchctl load -w /Library/LaunchDaemons/com.github.debauchee.barrier.plist .. then logoff (but leave running) that client, server mouse cannot move cursor onto client screen. Mouse cursor does move off server screen, and correct client function resumes after login, so barrierc continued running on the client, but, unlike Windows client, macOS client does not support cursor movement while user not logged in.
Author
Owner

@oristopo commented on GitHub (Nov 27, 2019):

When launched by root, server mouse works for
/Applications/Barrier.app/Contents/MacOS/barrierc
.. but keyboard does NOT.

A work-around:

  • on macOS client
  • enable barrierc by user at login by moving plist to ~/Library/LaunchAgents/
  • enable VNC server on macOS client by System Preferences->Sharing->Screen Sharing
  • on Barrier server, configure VNC client for login to Barrier client

Copy/paste does not work from Windows server to macOS client,
but works from client to server...

<!-- gh-comment-id:559162962 --> @oristopo commented on GitHub (Nov 27, 2019): When launched by root, server mouse works for /Applications/Barrier.app/Contents/MacOS/barrierc .. but keyboard does NOT. A work-around: * on macOS client - enable barrierc by user at login by moving plist to ~/Library/LaunchAgents/ - enable VNC server on macOS client by System Preferences->Sharing->Screen Sharing * on Barrier server, configure VNC client for login to Barrier client - login by VNC will launch barrierc - e.g. for non-macOS: https://www.tightvnc.com/download.html - for macOS: /System/Library/CoreServices/Applications/Screen Sharing.app Copy/paste does not work from Windows server to macOS client, but works from client to server...
Author
Owner

@github-actions[bot] commented on GitHub (Oct 1, 2020):

Is this issue still an issue for you? Please do comment and let us know! Alternatively, you may close the issue yourself if it is no longer an problem

<!-- gh-comment-id:701709443 --> @github-actions[bot] commented on GitHub (Oct 1, 2020): Is this issue still an issue for you? Please do comment and let us know! Alternatively, you may close the issue yourself if it is no longer an problem
Author
Owner

@axelson commented on GitHub (Oct 2, 2020):

This is still relevant

<!-- gh-comment-id:702867792 --> @axelson commented on GitHub (Oct 2, 2020): This is still relevant
Author
Owner

@puzne2000 commented on GitHub (Oct 3, 2020):

Just letting you know that the comp I was using Barrier to control died, may he rest in peace. Didn't yet decide if to buy another one or to just buy a second screen for my current comp - if I get another comp I'll try the suggested mediations and report here...

<!-- gh-comment-id:703120387 --> @puzne2000 commented on GitHub (Oct 3, 2020): Just letting you know that the comp I was using Barrier to control died, may he rest in peace. Didn't yet decide if to buy another one or to just buy a second screen for my current comp - if I get another comp I'll try the suggested mediations and report here...
Author
Owner

@chrisrimple commented on GitHub (Apr 6, 2021):

Another vote for this feature. My config:

  • Mid 2015 MacBook Pro running MacOS Mojave, as server
  • 2019 MacBook Pro running Big Sur, as client

Both laptops use external monitors and are normally closed. Even with Barrier set to Open At Login (via Dock settings), the client doesn't receive mouse/keyboard until Login has been completed. Unfortunately, this means that I have to open up the Big Sur laptop, login, then close it up again.

FWIW, I had the same problem with ShareMouse.

<!-- gh-comment-id:813802535 --> @chrisrimple commented on GitHub (Apr 6, 2021): Another vote for this feature. My config: - Mid 2015 MacBook Pro running MacOS Mojave, as server - 2019 MacBook Pro running Big Sur, as client Both laptops use external monitors and are normally closed. Even with Barrier set to Open At Login (via Dock settings), the client doesn't receive mouse/keyboard until Login has been completed. Unfortunately, this means that I have to open up the Big Sur laptop, login, then close it up again. FWIW, I had the same problem with ShareMouse.
Author
Owner

@Revadike commented on GitHub (Aug 31, 2023):

Bump!

<!-- gh-comment-id:1700435634 --> @Revadike commented on GitHub (Aug 31, 2023): Bump!
Author
Owner

@Falcon-16 commented on GitHub (Dec 6, 2025):

Bump! Would like to get this implemented so I can control when a laptop boots and log in and do things remotely, rather than having to log in physically on the laptop first!

<!-- gh-comment-id:3619468762 --> @Falcon-16 commented on GitHub (Dec 6, 2025): Bump! Would like to get this implemented so I can control when a laptop boots and log in and do things remotely, rather than having to log in physically on the laptop first!
Author
Owner

@nbolton commented on GitHub (Dec 7, 2025):

Barrier is no longer in development. Check out Deskflow (upstream) or Input Leap (fork).

https://github.com/deskflow/deskflow
https://github.com/input-leap/input-leap

If this is still an issue in those projects, we would appreciate a cross-post of this issue.

<!-- gh-comment-id:3621965981 --> @nbolton commented on GitHub (Dec 7, 2025): Barrier is no longer in development. Check out Deskflow (upstream) or Input Leap (fork). https://github.com/deskflow/deskflow https://github.com/input-leap/input-leap If this is still an issue in those projects, we would appreciate a cross-post of this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#382
No description provided.