commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Replace default command in skype.desktop file.
Allows system to be halted and session closed by KDE. Very useful to save applications states, especially with the KDE apps that behave correctly.
This uses the KDE suspend to ram.
open [path] in the default program, regardless of which Desktop Environment you use (KDE, GNOME, etc.)
Works on all "freedesktop.org" compatible desktop environments
Quit Kill Restart Plasma whenever it is hung!
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:
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.
I use this to make skype blend better into my desktop :)
--disable-cleanlooks might not be nescessary to achieve the wanted effect.
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)
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...).
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"