Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't log to System Server without logged user in Big Sur 11.4 #47

Open
ceztko opened this issue Jul 15, 2021 · 7 comments
Open

Can't log to System Server without logged user in Big Sur 11.4 #47

ceztko opened this issue Jul 15, 2021 · 7 comments

Comments

@ceztko
Copy link

ceztko commented Jul 15, 2021

I'm trying to use Vine Server because of poor performance of free VNC clients on Windows connecting to the stock "Remote Management" feature of MacOS. Vine Server has better performance and other basic features like copy and paste work so I'm very happy with that. What I'm trying to do is connecting to the "System Server" after a reboot, and the service apparently is not running. The machine has also the built-in "Remote Management" enabled on the TCP port 5900, so I can login with that and start a new session to the System Server which automatically starts on a different port (5901) after the user is logged. The UI caption seem to suggest that the System Server should start independently of any logged user so what I should expect here? Is there a bug in Vine Server, am I missing something or simply this is an unsupported scenario?

@kalaklanar
Copy link

I hate to "Me too", but this is why I stopped using the system server. Even if it started, it still had a problem with connections. I had to turn on auto-login for other reasons, so I just had it auto-launch on login. Before that, I'd connect to the Remote Management vnc server, log in, and let the Vine Server application start. Then I'd switch to the Vine server port.

@ceztko ceztko changed the title Can't log to System Server without logged user in Big Sur 11.04 Can't log to System Server without logged user in Big Sur 11.4 Jul 15, 2021
@stweil
Copy link
Owner

stweil commented Jul 15, 2021

Personally I have no own experience with that feature of Vine Server, so I have to check it myself. This will take a while because of other business, so if anybody else finds a solution I'll be happy to integrate it.

@ceztko
Copy link
Author

ceztko commented Jul 16, 2021

When selecting the "System Server" the process appear to be still launched with the credentials of the same user of the logged session. I'm expecting the process to be launched either with root or another administrative user. I guess this was the intended behavior so this may be more a bug/regression caused by a change in the OS.

@crystall1nedev
Copy link

A bit of a stale issue but I'm encountering this issue as well. I may have found a possible workaround, so stay tuned.

@crystall1nedev
Copy link

crystall1nedev commented Nov 1, 2021

So the workaround is a bit of a mess. I hope it's only temporary. Essentially, you need to write a bash script and launch daemon, and then give bash permission to control your computer with accessibility features. Noted issues:

  • You need to unload and reload the launch daemon if you log out, as the VNC server will have shut down.
  • If you use a while loop hoping to circumvent the above, logging out and logging back in freezes the VNC connection. The mouse still moves and you can still interact, but it won't look like it to the client.
  • You have to run it as root.

@ceztko
Copy link
Author

ceztko commented Nov 1, 2021

Macos is not my primary platform. The script you are using plus the commands to demonize it would be very appreciated.

@crystall1nedev
Copy link

crystall1nedev commented Nov 1, 2021

Here's com.osxvnc.systemserver.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>

    <key>Label</key>
    <string>com.osxvnc.systemserver.plist</string>
    <key>RunAtLoad</key>
    <true/>
    <key>EnvironmentVariables</key>
    <dict>
      <key>PATH</key>
      <string><![CDATA[/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin]]></string>
    </dict>
    <key>ProgramArguments</key>
    <array>
      <string>/bin/bash</string>
      <string>-c</string>
      <string>/Library/systemserver.sh</string>
    </array>
  </dict>
</plist>

Here's the /Library/systemserver.sh script

/bin/bash -c '"/Library/Application Support/VineServer/OSXvnc-server" -rfbport <vncport> -desktop <computer name> -rfbauth "/Library/Application Support/VineServer/.vinevncauth" -systemserver 1 -alwaysshared -restartonuserswitch N -unicodekeyboard 0 -keyboardloading y -pressmodsforkeys y -eventtap 3 -eventsource 2 -swapbuttons -rendezvous n'

(The original files are tailored towards my automatic booting of a noVNC server on this system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants