{"id":18903621,"url":"https://github.com/mobinx/mac","last_synced_at":"2026-03-04T06:30:28.260Z","repository":{"id":224505290,"uuid":"763430705","full_name":"MobinX/Mac","owner":"MobinX","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-12T13:44:03.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-31T10:15:18.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MobinX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-26T09:29:41.000Z","updated_at":"2024-02-26T09:29:47.000Z","dependencies_parsed_at":"2024-02-26T10:52:24.638Z","dependency_job_id":"87453df2-4390-44fd-81ef-8cdf91baa479","html_url":"https://github.com/MobinX/Mac","commit_stats":null,"previous_names":["mobinx/mac"],"tags_count":0,"template":false,"template_full_name":"lollilol/fastmac-VNCgui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobinX%2FMac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobinX%2FMac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobinX%2FMac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MobinX%2FMac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MobinX","download_url":"https://codeload.github.com/MobinX/Mac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239888232,"owners_count":19713690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T09:05:57.155Z","updated_at":"2026-03-04T06:30:28.167Z","avatar_url":"https://github.com/MobinX.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastmac-gui\n\n\u003e Get a MacOS desktop over VNC, for free, in around 5 minutes\n\nThis repo extends upon fastmac, enabling the built in MacOS VNC server, doing a hacky trick to set a VNC password and a new admin user account, and adds ngrok to your system to set up a tcp tunnel for VNC/Apple Screen Sharing.\n\nThings you'll need to do:\n\n* Clone this repo\n* Add three secrets to your cloned repo:\n  * `NGROK_AUTH_TOKEN` with your auth key from https://dashboard.ngrok.com/auth\n  * `VNC_USER_PASSWORD` with the desired password for the \"VNC User\" (`vncuser`) account\n  * `VNC_PASSWORD` for the VNC-only password\n* Start the workflow (as described below)\n\nOnce the flow is started and you're in the status, you can view the 'you can VNC to...' section in the workflow log for your ngrok tunnel VNC address.\n\nTODO: find a better way to somehow broadcast that ngrok is up and has a tunnel address\n\n*NOTE* If you're using Apple Screen Sharing or RealVNC Viewer, use the system username and password (\"VNC User\"/your set password), NOT your VNC-only password!\n\n----\n# Lessons learned in my hacking this to bits:\n\n## We don't know the password to `runner`.\nOkay, let's reset the passwor-\n\n    # passwd runner\n    Changing password for runner.\n    Enter old password:\n\n... right. macOS, at some point, implemented SecureToken-based users. You can't reset the password with `passwd`, it asks for your old password -- even trying to change it from root!\n\nWorkaround: Create a new user, `VNC User` aka `vncuser`. We don't *really* need to run as runner, plus, we get the 'out of box' new user setup when we VNC in. Because we're root... we can just straight up add new users. Early iterations of this script I was still learning how to add users and got to see weird behavior when macOS doesn't have a home folder for a user (dumped right to a non-working desktop, for instance).\n\n## macOS Catalina won't let you purportedly configure VNC from the CLI, or at least, set the password anymore...\n\n`Warning: macos 10.14 and later only allows control if Screen Sharing is enabled through System Preferences`\n\nEasy fix: set the password by hand by hashing it into the preferences file. See http://hints.macworld.com/article.php?story=20071103011608872.\n\n## VNC is slow.\nWell, this thing isn't exactly GPU accelerated. It's running on an ESXi powered Mac sitting at MacStadium...\n\n----\n# fastmac\n\n\u003e Get a MacOS or Linux shell, for free, in around 2 minutes\n\nI don't have a Mac, but I often want to test my software on a Mac, or build software for folks using Macs. Rather than shelling out thousands of dollars to buy a Mac, it turns out we can use GitHub Actions to give us access to one for free! `fastmac` makes this process as simple as possible. Note that this only gives us access to a terminal shell, not a full GUI. See below for how to get started. Here's a little video that shows all the steps (click it for a full-size version):\n\n\u003ca href=\"https://files.fast.ai/images/fastmac.png\"\u003e\u003cimg src=\"https://files.fast.ai/images/fastmac-optimize.gif\" width=\"727\" /\u003e\u003c/a\u003e\n\n**NB**: Please check the [GitHub Actions Terms of Service](https://docs.github.com/en/github/site-policy/github-additional-product-terms#5-actions-and-packages). Note that your repo needs to be public, otherwise you have a strict monthly limit on how many minutes you can use. Note also that according to the TOS the repo that contains these files needs to be the same one where you're developing the project that you're using it for, and specifically that you are using it for the \"*production, testing, deployment, or publication of [that] software project*\".\n\n## Clone template\n\nFirst, [click here](https://github.com/fastai/fastmac/generate) to create a copy of this repo in your account. Type `fastmac` under \"repository name\" and then click \"Create repository from template\". After about 10 seconds, you'll see a screen that looks just like the one you're looking at now, except that it'll be in your repo copy.\n\n**NB**: Follow the  rest of the instructions in repo copy you just made, not in the `fastai/fastmac` repo.\n\n## Run the `mac` workflow\n\nNext, \u003ca href=\"../../actions?query=workflow%3Amac\"\u003eclick here\u003c/a\u003e to go to the GitHub actions screen for the `mac` workflow, and then click the \"Run workflow\" dropdown on the right, and then click the green \"Run workflow\" button that appears.\n\n\u003cimg width=\"365\" src=\"https://user-images.githubusercontent.com/346999/92965396-91320680-f42a-11ea-9bc3-90682e740343.png\" /\u003e\n\n## Access the shell using ssh or browser\n\nAfter a few seconds, you'll see a spinning orange circle. Click the \"mac\" hyperlink next to it.\n\nOn the next screen, you'll  see another spinning orange circle, this time with \"build\" next to it. Click \"build\".\n\nThis will show the progress of your Mac that's getting ready for you. After a while, the \"Setup tmate session\" section will open, and once it's done installing itself, it will repeatedly print lines like this:\n```\nWebURL: https://tmate.io/t/rXbusP3qkYsfALDSLMQZVwG3d\n\nSSH: ssh rXbusP3qkYsfALDSLMQZVwG3d@sfo2.tmate.io\n```\n\nCopy and paste the ssh line (e.g `ssh rXbusP3qkYsfALDSLMQZVwG3d@sfo2.tmate.io` in this case) into your terminal (Windows users: I strongly recommend you use [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10) if possible) and press \u003ckbd\u003eEnter\u003c/kbd\u003e.\n\nYou'll see a welcome message. Press \u003ckbd\u003eq\u003c/kbd\u003e to remove it, and you'll be in a Mac shell! The shell already has [brew](https://brew.sh/) installed, so you can easily add any software you need.\n\nInstead of using ssh in your terminal, you can paste the \"WebURL\" value into your browser, to get a terminal in your browser. Whilst this is adequate if you're in a situation that you can't access a terminal (e.g. you have to do some emergency work on your phone or tablet), it's less reliable than the ssh approach and not everything works.\n\n## Stop your session\n\nYour session will run for up to six hours. When you're finished, you should close it, since otherwise you're taking up a whole computer that someone else could otherwise be using!\n\nTo close the session, click the red \"Cancel workflow\" on the right-hand side of the Actions screen (the one you copied the `ssh` line from).\n\n## Auto-configuration of your sessions\n\nIn your `fastmac` repo, edit the `script-{linux,mac}.sh` files to add configuration commands that you want run automatically when you create a new session. These are bash scripts that are run whenever a new session is created.\n\nFurthermore, any files that you add to your repo will be available in your sessions. So you can use this to any any data, scripts, information, etc that you want to have access to in your fastmac/linux sessions.\n\n## Behind the scenes\n\n`fastmac` is a very thin wrapper around [tmate](https://tmate.io/), so all the features of tmate are available. tmate itself is based on [tmux](https://github.com/tmux/tmux/wiki), so you have all that functionality too. In practice, that means other people can connect to the same ssh session, and you'll all be sharing the same screen! This can be very handy for debugging and support. The integration with Github Actions is provided by [action-tmate](https://github.com/mxschmitt/action-tmate).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobinx%2Fmac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobinx%2Fmac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobinx%2Fmac/lists"}