open [path] in the default program, regardless of which Desktop Environment you use (KDE, GNOME, etc.) Works on all "freedesktop.org" compatible desktop environments
Display a passive popup during seconds. Additionnaly, --title can be used to set the title of the popup. This is a nice way to communicate with a desktop user of a machine you have an SSH access on : DISPLAY=:0 sudo -u $user -H kdialog --passivepopup "Hello you" 10 --title "cli IM"
The unlock command for KDE 4.3 has changed from krunner_lock, this process doesn't exist anymore. So here's the update :-) If qdbus complains about not being able to find X, put a "DISPLAY=:0 " (:0 being your X server display) in front of the command.
Cleanly create tempfiles using mktemp and remove them using traps instead of removing them in the end of the script. This way, you make sure the tempfiles are removed properly even if the script is killed or interrupted.
For a user script in KDE4, you can set TMPROOT using :
TMPROOT=$(kde4-config --path tmp)
If you wish to launch the kde4 screen saver without the password prompt to exit, use this command:
qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive True
Also can be done with:
/usr/lib/kde4/libexec/kscreenlocker --forcelock
I use this to make skype blend better into my desktop :) --disable-cleanlooks might not be nescessary to achieve the wanted effect.
KDE apps expect certain variables to be set, and unfortunately pkexec doesn’t set them by default. So, by setting this alias, it becomes possible to run, e.g. “pkexec kate” or “pkexec dolphin” and it’ll actually run.
Quit Kill Restart Plasma whenever it is hung!
This uses the KDE suspend to ram.
Allows system to be halted and session closed by KDE. Very useful to save applications states, especially with the KDE apps that behave correctly.
Replace default command in skype.desktop file.
So this first obtains address of the DBUS session, as it's not available by default over SSH. Then it tells plasma-overlay to exit. `kquitapp` is pretty much an equivalent of the qdbus calls.
This can help with serious GUI lockups in KDE. It will only restart Plasma + widgets, not your session, so all your programs will stay running.
Can be used to log out of an acrive user session when using KDE. This version will ask for confirmation with a 30 second timeout. The parameters at the end can be changed to suit your needs; The first determines if there is a confirmation dialog or not, the second determines what exactly the action taken is. The third is "when", I don't really use any other value than 0 for this. Param 1: - 0 => Do not wait for confirmation - 1 -> Wait for confirmation (30s timeout) Param 2: -1 = > Prompt for action to take, defaults to shutdown - 0 => logout - 1 => Restart - 2 => Shutdown I alias these to; alias logout="qdbus org.kde.ksmserver /KSMServer logout 1 0 0" alias logoutnow="qdbus org.kde.ksmserver /KSMServer logout 0 0 0" and so forth.
KDE4 is great, but still a bit buggy, and sometimes plasma requires to be restarted. Instead of quitting it with "killall plasma", which might loose your preferences (widgets, etc.), kquitapp will cleanly quit it. Tip: you can type this in the "Alt+F2" window, and then type "plasma" in Alt+F2 again to restart plasma (be patient though...).
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: