Categorize phone bookmarks while you're away
How phone bookmarks get categorized
Chrome on iPhone, iPad and Android has no extensions, so Indexarius cannot run there. A bookmark you save on your phone travels through Chrome sync to every computer signed in to the same account. The first one that has Chrome open with Indexarius categorizes it within seconds. If none is open, the bookmark waits, and is categorized the next time Chrome starts on one of them.
So if you would like phone bookmarks categorized, and filed into folders you can open on the phone, while your own computer is closed, keep one computer running Chrome with Indexarius. An old laptop or a small desktop that stays on is enough.
Option 1: an always-on computer with ordinary Chrome Recommended
This is plain Chrome, the way you use it every day, set to start by itself. It works on Chrome 116 or later.
- Start Chrome with a folder of its own for this, using the command for your system below. It runs apart from any Chrome you already use on that computer.
- In that window, sign in to Chrome with your Google account and turn on sync, with bookmarks included. Do this yourself: Google refuses sign-in from a browser that is being driven by automation software.
- Install Indexarius from the Chrome Web Store. In its setup, choose how it may file bookmarks into folders. With “Just label”, phone bookmarks are categorized but stay where they are.
- Make the computer stay awake and start that Chrome at login, as below.
If the computer is spare and nobody browses on it, you can skip the separate folder: use its ordinary Chrome and add Chrome to the apps that open at login.
macOS
First run, to sign in (in Terminal):
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--user-data-dir="$HOME/Library/Application Support/Indexarius Chrome" \
--profile-directory=Default --no-first-run
Then quit that Chrome and paste this. It adds a launch agent that starts the same Chrome each time you log in, and again if it quits, wrapped in caffeinate so the Mac does not sleep while it runs. Pasting it again replaces the old one:
mkdir -p ~/Library/LaunchAgents
cat > ~/Library/LaunchAgents/com.indexarius.chrome.plist <<EOF
<?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.indexarius.chrome</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/caffeinate</string>
<string>-is</string>
<string>/Applications/Google Chrome.app/Contents/MacOS/Google Chrome</string>
<string>--user-data-dir=$HOME/Library/Application Support/Indexarius Chrome</string>
<string>--profile-directory=Default</string>
<string>--no-first-run</string>
</array>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
EOF
launchctl bootout gui/$(id -u)/com.indexarius.chrome 2>/dev/null
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.indexarius.chrome.plist
- On a desktop Mac, in System Settings, Energy, turn on “Prevent automatic sleeping when the display is off” and “Start up automatically after a power failure”. On a laptop, the sleep setting is in Battery, Options, for when it is on the power adapter;
caffeinate -skeeps a laptop awake only while it is plugged in. - A launch agent runs once you are logged in. To come back by itself after a restart, turn on automatic login in Users & Groups (not offered while FileVault is on).
- To stop it:
launchctl bootout gui/$(id -u)/com.indexarius.chrome, and delete the file to keep it stopped after the next login.
Windows
Paste this in PowerShell. It puts a shortcut in your Startup folder, so Chrome starts each time you sign in to Windows, and then opens it once so you can sign in:
$chrome = "$env:ProgramFiles\Google\Chrome\Application\chrome.exe"
$link = (New-Object -ComObject WScript.Shell).CreateShortcut(
"$([Environment]::GetFolderPath('Startup'))\Indexarius Chrome.lnk")
$link.TargetPath = $chrome
$link.Arguments = "--user-data-dir=`"$env:LOCALAPPDATA\Indexarius Chrome`" --profile-directory=Default --no-first-run"
$link.Save()
Start-Process $chrome $link.Arguments
- If Chrome was installed for your account only, it is in
$env:LOCALAPPDATA\Google\Chrome\Application\chrome.exe; change the first line. - Never sleep while plugged in: Settings, System, Power, Screen and sleep, set sleep to Never; or run
powercfg /change standby-timeout-ac 0. - You can open the folder yourself with Windows key + R,
shell:startup.
Linux, including a machine with no screen
A systemd user service starts Chrome at boot. Without a screen, xvfb-run gives it a virtual one (install the xvfb package). Sign in once where you can see the window, at the machine or over remote desktop, with the same folder and flags:
google-chrome --user-data-dir="$HOME/.config/indexarius-chrome" \
--profile-directory=Default --no-first-run --password-store=basic
--password-store=basic makes Chrome keep its keys the same way with or without a desktop session, so the sign-in survives the service. Then quit Chrome and save this as ~/.config/systemd/user/indexarius-chrome.service:
[Unit]
Description=Chrome with Indexarius
[Service]
ExecStart=/usr/bin/xvfb-run -a /usr/bin/google-chrome --user-data-dir=%h/.config/indexarius-chrome --profile-directory=Default --no-first-run --password-store=basic
Restart=on-failure
RestartSec=30
[Install]
WantedBy=default.target
And turn it on. enable-linger lets it start at boot without anyone logging in:
systemctl --user daemon-reload
systemctl --user enable --now indexarius-chrome.service
sudo loginctl enable-linger "$USER"
Keep xvfb-run even on a machine with a desktop: the service starts at boot, before any desktop session, so Chrome has no screen of its own to open on. Check it with systemctl --user status indexarius-chrome.
Option 2: headless Chrome Experimental
Chrome can run with no window at all (--headless=new, Chrome 112 and later), and Indexarius works there: its own tests run that way. What we have not confirmed is whether Chrome sync keeps bringing bookmarks in when Chrome runs headless, so treat this as a trial and check it as below.
- Do Option 1's first run in a normal window: sign in, turn on sync, install Indexarius, choose filing. Quit.
- Start the same folder headless, in place of the normal command (on a Mac or Windows, use the Chrome path from Option 1):
google-chrome --headless=new --user-data-dir="$HOME/.config/indexarius-chrome" \
--profile-directory=Default --no-first-run --password-store=basic
If phone bookmarks do not arrive, go back to Option 1; on Linux, xvfb-run costs little.
How to check it works
- Save a bookmark on your phone. With filing on, it should show up on the phone inside the Indexarius folder (under Other bookmarks, or the Bookmarks bar if you chose that) within a minute or two: the computer categorized it, and sync carried the move back.
- With “Just label”, open Indexarius on that computer: the bookmark is listed, under its kind.
- In that Chrome,
chrome://sync-internalsshows whether sync is on and when bookmarks last came in.
Good to know
- Let one computer file. If several computers run Indexarius, set filing to “Just label” on all but one. They do not coordinate: two filing the same new bookmark before sync shows each the other's folders can each make their own Indexarius folder, and you would see two.
- Where phone bookmarks go. Filing takes new bookmarks out of Mobile bookmarks into the Indexarius folder, as it does with loose bookmarks on the computer, and the phone shows that folder too. With “File new bookmarks”, older ones already in Mobile bookmarks stay where they are; “File new + loose” takes them too.
- Account bookmarks and this computer's. Recent Chrome can keep the bookmarks in your Google account apart from the ones saved only on that computer, each with its own Bookmarks bar, Other bookmarks and Mobile bookmarks. Indexarius files each bookmark within its own set, so you may see two Indexarius folders: the account's, which your phone shows, and the computer's. A phone bookmark is filed into the account's, and never leaves your account.
- Privacy. Everything stays on that computer, as on yours: Indexarius has no server. The one thing that crosses is what Chrome sync already carries, your bookmarks and, if you turn it on, your tags and ratings. See the privacy page.
- The computer is your account. Anyone at that machine can open your bookmarks in that Chrome. Keep it somewhere you trust, with its own login.