Tip: Suspend or hibernate without root access [update]

Posted on 7 September 2009 - 14:43 in Ubuntu - Comments (0)

Gnome 2.30 (Ubuntu 10.04) renamed the DeviceKit.Power to UPower:

$ echo 'dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate' | at now + 30 minutes

There’s also suspend.
Shutdown (Stop) and Reboot (Restart) works over the system call: org.freedesktop.ConsoleKit

Or use this tool

Pre Gnome 2.30

As of Ubuntu 9.10, the gnome-power-cmd doesn’t exist anymore..but…
D-Bus to the rescue!!

Hibernate after 30 Minutes:

$ echo 'dbus-send --system --print-reply --dest=org.freedesktop.DeviceKit.Power /org/freedesktop/DeviceKit/Power org.freedesktop.DeviceKit.Power.Hibernate' | at now + 30 minutes

There’s also suspend.
Shutdown, reboot and logout works over the session call: org.gnome.SessionManager

Or use this tool

Pre Ubuntu 9.10:

Suspend:

$ gnome-power-cmd suspend

Hibernate after 30 Minutes:

$ echo 'gnome-power-cmd hibernate' | at now + 30 minutes
job 1 at Mon Sep  7 15:10:00 2009

You can review and delete any queued job with:

$ atq
1	Mon Sep  7 15:10:00 2009 a wag
 
$ atrm 1

The gnome-power-cmd also accepts shutdown and reboot.


Script: Display all processes accessing a device [update]

Posted on 15 September 2008 - 22:36 in Programming - Comments (2)

The following script is a wrapper over the commands ‘fuser’ and ‘ps’ to display all processes accessing a mountpoint.

Syntax: fuserps [-g] /path/to/mountpoint

The normal mode displays the output on the console.
With the switch ‘-g’, its possible to graphically display the output with zenity (included in Ubuntu), also:

  • The target is optional, zenity will ask for it if not yet present
  • You can kill processes

Executing the script with root access results in displaying all processes from all users, a normal execution only displays the processes from the executing user.

(more…)


10min Howto: Mobile Truecrypt (6.0a, 6.3a) for Ubuntu and Windows

Posted on 20 July 2008 - 16:00 in Privacy - Comments (1)

Storing sensitive data on an encrypted mobile device with Truecrypt.
Accessible on Ubuntu and Windows.

You need:

  • Truecrypt 6.0a or 6.3a (may work with other version too)
  • Mobile device (flash drive, ext. HDD, etc.)
  • Administrative privileges
  • 10 minutes

(more…)


5min: Encrypt Instant Messaging with Pidgin and OTR

Posted on 31 May 2008 - 19:55 in Privacy - Comments (1)

You need:

  • Pidgin (available on Ubuntu standard installation or over apt-get)
  • IM-Buddy
  • 5 minutes

(more…)


10min: Create Debian packages

Posted on 8 May 2008 - 21:30 in Ubuntu - Comments (1)

Ever wanted to pack your scripts into .deb packages?

Here we go…

You need:

  • ‘devscripts’ package (over apt-get)
  • your script(s)
  • 10 minutes

(more…)


Howto: Encrypt and digitally sign mails with Thunderbird and GPG

Posted on 2 May 2008 - 19:24 in Privacy - Comments (3)

Encrypt and digitally sign your mails with GPG, Thunderbird and Enigmail on Ubuntu 8.04.

If you don’t know, what GPG is, read the introduction from the GPG mini Howto, it won’t take long.

Install Thunderbird and Enigmail, start Thunderbird and create or add an email address.

For the following operations, navigate to: OpenPGP -> Key Management

Generate a keypair with: Generate -> New Key Pair

(more…)


Blog started

Posted on 28 April 2008 - 20:19 in Bla - Comments (0)

Today.


« Newer Posts

This work is licensed under a Creative Commons Attribution 2.5 Switzerland License
Powered by WordPress