Two of the panels this desktop still handed to GNOME Settings. Users manages the account through accountsservice -- the same daemon GNOME's panel drives, so a name or picture set here is what the login screen and lock screen read. Name, picture, account type, password, automatic login, and adding or removing other accounts. Every change is authorized by polkit through the agent this session already runs; a dismissed prompt is a normal outcome and says so. A new password is read from the helper's stdin, hashed by openssl reading its own stdin, and handed over D-Bus from inside that process. It is never an argument: argv is world-readable through /proc, so a password passed that way is published to every process on the machine. Removing an account takes two presses and says it destroys their files; the last administrator cannot be removed or demoted, because a machine nobody can administer is not a state to offer. Sharing reports what is actually true, including "the software for this is not installed" -- the honest answer for Samba here, and the case the panel it replaces shows as a switch that does nothing. Password sign-in is reported from sshd's configuration rather than assumed: claiming "keys only" when the file is silent would state a security property that cannot be backed up. The Control Center now draws the account's real picture and name. A generic glyph sat there while a real avatar was already set, which made the desktop look like it did not know whose it was. Also here: the KDE Connect contract no longer requires a phone to be awake. kdeconnectd drops its device objects for a phone it has not seen recently while the pairing survives in its config, so demanding one failed whenever the phone was off. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
150 lines
5.1 KiB
QML
150 lines
5.1 KiB
QML
// What this machine offers to other machines on the network.
|
|
//
|
|
// Every row states what is true right now, including "the software for this is
|
|
// not installed" -- which is the honest answer for file sharing here, and is
|
|
// what the panel this replaces hides behind a switch that silently does
|
|
// nothing.
|
|
//
|
|
// Turning remote login on changes the whole system and prompts. Remote desktop
|
|
// is a user service and does not.
|
|
|
|
import Quickshell
|
|
import QtQuick
|
|
import qs.config
|
|
import qs.services
|
|
|
|
SettingsPage {
|
|
id: root
|
|
|
|
objectName: "sharing"
|
|
title: "Sharing"
|
|
lede: "What this machine offers to other machines on the network."
|
|
|
|
Component.onCompleted: Sharing.refresh()
|
|
|
|
TextRow {
|
|
visible: Sharing.lastError !== ""
|
|
label: "Sharing needs attention"
|
|
detail: Sharing.lastError
|
|
value: ""
|
|
divider: false
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "This machine"
|
|
subtitle: "The name other machines see."
|
|
|
|
TextFieldRow {
|
|
label: "Network name"
|
|
detail: "Used for ssh and for anything else that finds this machine by name"
|
|
text: Sharing.hostname
|
|
placeholder: "desktop"
|
|
enabled: !Sharing.busy
|
|
divider: false
|
|
onAccepted: value => Sharing.setHostname(value)
|
|
}
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "Remote login"
|
|
subtitle: "Sign in to a terminal on this machine over SSH."
|
|
|
|
SwitchRow {
|
|
label: "Allow remote login"
|
|
detail: Sharing.remoteLogin?.installed === true
|
|
? (Sharing.remoteLoginOn
|
|
? "Running, and starts automatically at boot"
|
|
: "Not running")
|
|
: "OpenSSH server is not installed"
|
|
checked: Sharing.remoteLoginOn
|
|
enabled: !Sharing.busy && Sharing.remoteLogin?.installed === true
|
|
onToggled: value => Sharing.setRemoteLogin(value)
|
|
}
|
|
|
|
TextRow {
|
|
visible: Sharing.remoteLoginOn
|
|
label: "Connect with"
|
|
detail: "From another machine on your network"
|
|
value: "ssh " + Sharing.networkName
|
|
}
|
|
|
|
TextRow {
|
|
visible: Sharing.remoteLoginOn
|
|
label: "Port"
|
|
detail: "Where the SSH server is listening"
|
|
value: String(Sharing.remoteLogin?.port ?? "22")
|
|
}
|
|
|
|
// Reported from the configuration rather than assumed. Saying "keys
|
|
// only" on a machine that actually accepts passwords would be a
|
|
// security claim this page cannot back up.
|
|
TextRow {
|
|
visible: Sharing.remoteLoginOn
|
|
label: "Password sign-in"
|
|
detail: Sharing.passwordLoginSummary()
|
|
value: ""
|
|
divider: false
|
|
}
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "Remote desktop"
|
|
subtitle: "See and control this desktop from another machine."
|
|
|
|
SwitchRow {
|
|
label: "Allow remote desktop"
|
|
detail: Sharing.remoteDesktop?.available === true
|
|
? (Sharing.remoteDesktopOn
|
|
? "Running for your session"
|
|
: (Sharing.remoteDesktop?.hasCredentials === true
|
|
? "Not running"
|
|
: "Set a username and password before turning this on"))
|
|
: "Remote desktop support is not installed"
|
|
checked: Sharing.remoteDesktopOn
|
|
enabled: !Sharing.busy
|
|
&& Sharing.remoteDesktop?.available === true
|
|
&& Sharing.remoteDesktop?.hasCredentials === true
|
|
onToggled: value => Sharing.setRemoteDesktop(value)
|
|
}
|
|
|
|
TextRow {
|
|
visible: Sharing.remoteDesktop?.available === true
|
|
label: "Port"
|
|
detail: "The RDP port other machines connect to"
|
|
value: String(Sharing.remoteDesktop?.port ?? "")
|
|
}
|
|
|
|
TextRow {
|
|
visible: Sharing.remoteDesktop?.available === true
|
|
label: "Credentials"
|
|
detail: Sharing.remoteDesktop?.hasCredentials === true
|
|
? "Stored in the login keyring, where Privacy & Security can manage them"
|
|
: "None stored yet"
|
|
value: Sharing.remoteDesktop?.hasCredentials === true ? "Stored" : "Not set"
|
|
divider: false
|
|
}
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "File and media sharing"
|
|
subtitle: "Sharing folders and media needs software this machine does not necessarily have."
|
|
|
|
TextRow {
|
|
label: "Share folders on the network"
|
|
detail: Sharing.fileSharing?.installed === true
|
|
? "Samba is installed"
|
|
: "Needs Samba, which is not installed. Settings does not install software."
|
|
value: Sharing.fileSharing?.installed === true ? "Available" : "Not installed"
|
|
}
|
|
|
|
TextRow {
|
|
label: "Share music and video to devices"
|
|
detail: Sharing.mediaSharing?.installed === true
|
|
? "Rygel is installed"
|
|
: "Needs Rygel, which is not installed."
|
|
value: Sharing.mediaSharing?.installed === true ? "Available" : "Not installed"
|
|
divider: false
|
|
}
|
|
}
|
|
}
|