Overview
An Anime Game Launcher includes a built-in feature to disable game telemetry by blocking telemetry servers at the system level. This enhances your privacy by preventing the game from sending usage data to tracking servers.How It Works
The telemetry disabling feature modifies your system’s/etc/hosts file to redirect telemetry server domains to 0.0.0.0, effectively blocking all connections to these servers.
Implementation: src/ui/main/disable_telemetry.rs
Technical Details
When you click the “Disable Telemetry” button, the launcher:- Retrieves telemetry server addresses for your game edition
- Generates hosts file entries that redirect each server to
0.0.0.0 - Appends these entries to
/etc/hostsusing elevated permissions
When Telemetry Disabling is Required
The launcher will showLauncherState::TelemetryNotDisabled when telemetry servers are not yet blocked.
Button Appearance:
- Icon: security-high-symbolic (shield icon)
- Label: “Disable Telemetry”
- Style: Suggested action (blue/highlighted)
This state appears before you can launch the game, ensuring telemetry is disabled before your first play session.
Execution Methods
The launcher uses different execution methods depending on your system environment.Root Access Method
Used on standard Linux systems:pkexecprompts for administrator password- Commands are executed with root privileges
- Blank lines are added before and after entries for readability
Flatpak Method
Used when running as a Flatpak application:Flatpak installations may have direct host filesystem access configured, eliminating the need for pkexec.
Environment Variables
LAUNCHER_USE_ROOT
You can override the default root access detection:- Value:
"1"to force pkexec usage - Default: Auto-detected based on Flatpak presence
Telemetry Server Sources
Telemetry servers are defined per game edition:Process Flow
User Initiates
Click the “Disable Telemetry” button when the launcher is in
TelemetryNotDisabled state.Execute Command
The launcher executes the appropriate command (pkexec or direct) based on your system configuration.Authentication: You may be prompted for your administrator password.
Error Handling
The launcher provides error feedback if telemetry disabling fails:Command Execution Failure
- User cancelled password prompt
- Insufficient permissions
- /etc/hosts file is read-only
Non-Zero Exit Status
Manual Verification
You can verify that telemetry has been disabled by checking your/etc/hosts file:
Hosts File Format
The launcher adds entries in the following format:Reverting Changes
If you need to re-enable telemetry for any reason:-
Open
/etc/hostswith elevated permissions: -
Locate the telemetry server entries (addresses redirected to
0.0.0.0) -
Delete or comment out those lines (add
#at the start) - Save the file
Re-enabling telemetry is rarely necessary but may be required for certain in-game features or troubleshooting.
Privacy Considerations
What is Blocked
- Analytics and tracking servers
- Usage statistics collection
- Telemetry data transmission
- Behavioral tracking endpoints
What is NOT Blocked
- Game update servers
- Authentication servers
- Content delivery networks (CDN)
- Multiplayer/online features
Disabling telemetry does not affect game functionality. All gameplay features, updates, and online interactions continue to work normally.
Security Notes
System Modification
Modifying/etc/hosts is a system-level change that:
- Requires administrator privileges
- Affects all applications system-wide
- Persists across system reboots
- Can be manually reverted at any time
pkexec Safety
The launcher usespkexec (PolicyKit) rather than sudo for several reasons:
- Better integration with desktop environments
- Graphical password prompt
- Granular permission control
- Audit logging
Troubleshooting
Password Prompt Doesn’t Appear
Possible causes:- pkexec is not installed
- PolicyKit is not configured
- Running in a restricted environment
polkit package or set LAUNCHER_USE_ROOT=0 to try alternative method
Permission Denied Error
Possible causes:- User account doesn’t have admin rights
- PolicyKit rules prevent the operation
wheel or sudo group, or modify PolicyKit rules
Changes Don’t Persist
Possible causes:- System restore on boot
- Immutable filesystem
- Network manager overriding /etc/hosts