feat: add zbus crate for org.freedesktop.Accounts
This commit is contained in:
parent
6210012924
commit
0eee63a96c
7 changed files with 753 additions and 11 deletions
13
accounts-zbus/examples/userinfo.rs
Normal file
13
accounts-zbus/examples/userinfo.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#[tokio::main]
|
||||
pub async fn main() {
|
||||
let uid = std::env::args().nth(1).unwrap().parse::<u64>().unwrap();
|
||||
|
||||
let conn = zbus::Connection::system().await.unwrap();
|
||||
let user = accounts_zbus::UserProxy::from_uid(&conn, uid)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("icon_file: {:?}", user.icon_file().await);
|
||||
println!("account type: {:?}", user.account_type().await);
|
||||
println!("password hint: {:?}", user.password_hint().await);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue