Spaces:
Sleeping
Sleeping
File size: 1,362 Bytes
013de3c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
## dev env
The Native Messaging host manifest file is located at `/Library/Google/Chrome/NativeMessagingHosts/com.rebrowse.host.json`.
### 1. each time: Copy json file and host.py to under Application Support.
1. Run `sh place_host.sh <extension ID>`
2. Confirm
- host.py
- com.rebrowse.host.json
```
cat ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.rebrowse.host.json
{
"name": "com.rebrowse.host",
"description": "Rebrowse Python backend",
"path": "/Users/norikakizawa/Projects/hf-rebrowse/rebrowse-copy/native_host/host.py",
"type": "stdio",
"allowed_origins": [
"chrome-extension://cgiklkopeclbljnchnmlicaipolfojim/"
]
}
```
## 2. All-time: Add a simlink
1. Create symlink to let `com.rebrowse.host.json` point to `native_host/host.json`
```
sudo ln -s /Users/{username}/Projects/rebrowse/native_host/host.json /Library/Google/Chrome/NativeMessagingHosts/com.rebrowse.host.json
```
2. To verify, you can run this command.
```
ls -l /Library/Google/Chrome/NativeMessagingHosts/com.rebrowse.host.json
```
It should return
```
lrwxr-xr-x@ 1 root wheel Date Time /Library/Google/Chrome/NativeMessagingHosts/com.rebrowse.host.json -> /Users/{username}/Projects/rebrowse/native_host/host.json
```
## Monitor Log for Native Host
```
cat /tmp/rebrowse_host_emergency.log
``` |