Skip to content

Commit

Permalink
If run as root, WM & DE should be correctly displayed now
Browse files Browse the repository at this point in the history
  • Loading branch information
HorlogeSkynet committed May 12, 2017
1 parent e3ff9e9 commit 6bea2d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ $ chmod +x archey
```
$ archey
```

### Notes

* If you run `archey` as root, the script will list the processes running by other users of your system in order to display correctly Window Manager & Desktop Environment outputs.

* During the procedure I advise you to copy this binary into the `/usr/bin/` folder, you may want to check what it does thus.
2 changes: 1 addition & 1 deletion archey
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ logosDict = {
"""
}

processes = Popen(['ps', '-u', str(getuid()), '-o', 'comm', '--no-headers'], stdout=PIPE).communicate()[0].decode().rstrip('\n').split('\n')
processes = Popen(['ps', ('-u' + str(getuid()) if getuid() != 0 else '-ax'), '-o', 'comm', '--no-headers'], stdout=PIPE).communicate()[0].decode().rstrip('\n').split('\n')


# -------------- Classes -------------- #
Expand Down

0 comments on commit 6bea2d2

Please sign in to comment.