Skip to content

Fix: allow root user to view details and manage all processes#527

Open
heavenly999 wants to merge 1 commit intoelementary:mainfrom
heavenly999:fix/root-user-process-access
Open

Fix: allow root user to view details and manage all processes#527
heavenly999 wants to merge 1 commit intoelementary:mainfrom
heavenly999:fix/root-user-process-access

Conversation

@heavenly999
Copy link

Summary

  • Adds Process.is_own property that centralizes the ownership/access check, accounting for root having full access to all processes
  • Replaces scattered uid == Posix.getuid() comparisons across the codebase

Problem

When running Monitor as root, the detail pane was hidden and the kill/end buttons were disabled for processes owned by other users (e.g. uid 1000). This is incorrect — root has full access to /proc data and can send signals to any process.

Changes

  • Process.vala: Add is_own computed property — returns true when the process belongs to the current user OR when running as root
  • ProcessInfoView.vala: Use !_process.is_own instead of raw uid comparison for detail pane visibility
  • ProcessView.vala: Use process.is_own for kill/end button enabling

Add Process.is_own property that accounts for root having full access
to all processes. Previously, uid comparison alone caused the detail
pane to be hidden and kill/end buttons disabled for non-root processes
when the app was run as root.
@stsdc
Copy link
Member

stsdc commented Mar 2, 2026

This is not incorrect. Monitor is not designed to run as root.

How frequently do you run Monitor as root?

@heavenly999
Copy link
Author

Occasionally, 2-3 times per month. Usually to track down, debug or stop misbehaving processes.

@stsdc
Copy link
Member

stsdc commented Mar 2, 2026

What system processes are misbehaving?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants