Weet iemand met welk commando een KDE sessie van een gebruiker vanuit de console (dus ook extern) beëindigd kan worden?
Alvast bedankt!
Alvast bedankt!
edit: bronHow do I logout (end session) from KDE using command line (script)?
One command:
dcop kdesktop default logout
And is there a way to skip this dialog (ie logout with no confirmation)?
dcop ksmserver default logout 0 -1 -1
[ Voor 16% gewijzigd door DeMoN op 31-03-2006 12:47 ]
Gamertag: Cosmicv0id
"Het woord Gods is voor mij niets meer dan een expressie en het product van menselijke zwakheid. De Bijbel is een verzamelwerk van legendes die achtenswaardig zijn maar ook primitief en kinderachtig.'' - Albert Einstein
Verwijderd
1
2
3
4
5
6
7
| #!/bin/sh
if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop
then
dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0
else
/sbin/shutdown -h now "Power button pressed"
fi |
>.< >.< >.< >.<
>.< >.< >.< >.<
Verwijderd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| dcop --help
Usage: dcop [options] [application [object [function [arg1] [arg2] ... ] ] ]
Console DCOP client
Generic options:
--help Show help about options
Options:
--pipe Call DCOP for each line read from stdin. The string '%1'
will be used in the argument list as a placeholder for
the substituted line.
For example,
dcop --pipe konqueror html-widget1 evalJS %1
is equivalent to calling
while read line ; do
dcop konqueror html-widget1 evalJS "$line"
done
in bash, but because no new dcop instance has to be started
for each line this is generally much faster, especially for
the slower GNU dynamic linkers.
The '%1' placeholder cannot be used to replace e.g. the
program, object or method name.
--user <user> Connect to the given user's DCOP server. This option will
ignore the values of the environment vars $DCOPSERVER and
$ICEAUTHORITY, even if they are set.
If the user has more than one open session, you must also
use one of the --list-sessions, --session or --all-sessions
command-line options.
--all-users Send the same DCOP call to all users with a running DCOP
server. Only failed calls to existing DCOP servers will
generate an error message. If no DCOP server is available
at all, no error will be generated.
--session <ses> Send to the given KDE session. This option can only be
used in combination with the --user option.
--all-sessions Send to all sessions found. Only works with the --user
and --all-users options.
--list-sessions List all active KDE session for a user or all users.
--no-user-time Don't update the user activity timestamp in the called
application (for usage in scripts running
in the background). |
Apple iPhone 17 LG OLED evo G5 Google Pixel 10 Samsung Galaxy S25 Star Wars: Outlaws Nintendo Switch 2 Apple AirPods Pro (2e generatie) Sony PlayStation 5 Pro
Tweakers is onderdeel van
DPG Media B.V.
Alle rechten voorbehouden - Auteursrecht © 1998 - 2026
•
Hosting door TrueFullstaq