-
Notifications
You must be signed in to change notification settings - Fork 1
Home.Service.Linux Setup
Code A Software edited this page May 2, 2025
·
13 revisions
- To fix black screenshots with scrot on Ubuntu >= 21.10 see: https://askubuntu.com/a/1347651/692902
- To get screenshots from a
Raspberry PI, changedisplay_server_protocoltowayland(seeconfig.json)
Commands/Tools used:
sudo apt install scrot-
sudo apt install grim(for screenshots using Raspberry PI) sudo apt install sysstatsudo apt install curlsudo apt install lshw
⚠ WARNING: The version you can install on the Raspberry PI produces invalid json! Make sure lshw generates valid
json-data, otherwise it is recommended to compile it yourself:
git clone https://github.com/lyonel/lshw.git- make
- sudo make install
- Ensure that both scripts
screenshot.shandhw.share executable (usingchmod -x)
- Edit config.json (comments should be removed!):
{
"id": null, /* Will be set automatically */
"user": "server", /* Should not be root, but can be like pi */
"api": "http://192.168.10.10:83",
"location": null,
"device_group": null,
"os": 1, /* Android = 0 | Linux = 1 | LinuxMint = 2 | LinuxUbuntu = 3 | Windows = 4-9 | Unix = 10 | Other = 11 */
"type": 0, /* SingleBoardDevice = 0 | MiniPC = 1 | Notebook = 2 | Desktop = 3 | Server = 4 */
"is_signed_in": false, /* should be false on first start! */
"ip": null, /* Can be set if IP cannot be read */
"mac": null, /* Can bet set if Mac cannot be read */
"enable_screenshots": true,
"x_display_index": 0,
"display_server_protocol": "x11", /* x11 or wayland (scrot, grim) [Used for screenshots: RPI: wayland, Ubuntu-Desktop: x11 with https://askubuntu.com/a/1347651]*/
"enable_remote_file_access": true,
"check_for_updates_on_start": true, /* Updates will only work correctly, if Home.Service.Linux is running via systemd-service! */
"use_automatic_update_timer": false,
"automatic_timer_interval_hours": 24,
"dotnet_path": "/usr/bin/dotnet"
}- See here for installing
dotnet8for your linux distro! - Locate your
dotnetinstallation (.NET Core 8.0.x and ASP.NET Core 8.0.x are both required!) - Create a service file at
/etc/systemd/system/home.client.service:
[Unit]
Wants=network-online.target
After=network.target network-online.target
Description=HomeClient Service
[Service]
WorkingDirectory=/media/server/Server/andy/home.client
ExecStart=/usr/bin/dotnet /media/server/Server/andy/home.client/Home.Service.Linux.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
# Timeout to ensure that the service gets killed fast
TimeoutStopSec=5
SyslogIdentifier=homeclient
User=root
[Install]
WantedBy=multi-user.target
- Make sure your pathes are correctly setuped!
- Enable service:
sudo systemctl enable home.client.service - Start service:
sudo systemctl start home.client.service
- You can also maintain the service with
sudo service home status!