Skip to content

Commit

Permalink
use lslogins to obtain the list of users
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Jul 24, 2019
1 parent f9e87b0 commit e0c36ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mainwindow.cpp
Expand Up @@ -215,7 +215,7 @@ QString MainWindow::getXdgUserDirs(const QString& folder)
// return a list of users that have folders in /home
QStringList MainWindow::listUsers()
{
return shell->getOutput("ls /home | grep -v lost+found | grep -v snapshot | grep [a-zA-Z0-9]").split("\n");
return shell->getOutput("lslogins --noheadings -u -o user | grep -vw root").split("\n");
}

// List used space
Expand Down

0 comments on commit e0c36ff

Please sign in to comment.