Category Archives: cli

Lock your KDE screen from the command line

Did you know you can lock your current KDE screen by using the command line? For the 3.x series use dcop kdesktop KScreensaverIface lock and for KDE 4.x try qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock With the help of these you should be able to craft a simple shell script that will lock your screen at given… Read More »

Quick and easy sharing of a directory over HTTP in Linux

Say you want to share a folder for a friend. What better way than pointing him to an URL? Put this in your .bash_profile and login to your account. alias webshare=‘python -c “import SimpleHTTPServer;SimpleHTTPServer.test()”‘ Now cd to the directory in question a do a simple webshare command. That folder will be accessible from any browser by typing http://your_ip:8000Alternatively, you… Read More »

Check your laptop battery in Linux

If you run Linux off a laptop, you might want to check your battery status alt least once a year: grep -F capacity: /proc/acpi/battery/BAT0/info This will output something like design capacity:         7800 mAhlast full capacity:      6414 mAh