You are not logged in.
So I made a "script", if you can even call it that, at /usr/local/bin/suspend
#!/bin/bash
dbus-send --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
And my $PATH variable is:
[rob ~ ]$ echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/usr/local/bin
[rob ~ ]$
And it is, of course, executable:
[rob ~ ]$ file /usr/local/bin/suspend
/usr/local/bin/suspend: Bourne-Again shell script text executable
[rob ~ ]$
If I type the full path into the terminal, it just doesn't do anything. I hit enter and nothing happens.
If I do run it by just typing 'suspend', the terminal waits for the action to complete and top says nothing interesting either:
[rob ~ ]$ suspend
^C^C^C^C^C
Can't even crash out of it. Just have to close the terminal.
Last edited by pogeymanz (2010-05-20 00:21:23)
Offline
What are the permissions? Did you chmod +x it?
Offline
[rob ~ ]$ ls -l /usr/local/bin/suspend
-rwxr-xr-x 1 root root 160 May 19 20:16 /usr/local/bin/suspend
Yep. I chowned it.
Offline
suspend is a builtin
suspend [-f] Suspend the execution of this shell until it receives a SIGCONT signal. A login shell cannot be suspended; the -f option can be used to override this and force the suspension.
Builtins take precedence:
If the command name contains no slashes, the shell attempts to locate it. If there exists a shell function by that name, that function is invoked as described above in FUNCTIONS. If the name does not match a function, the shell searches for it in the list of shell builtins. If a match is found, that builtin is invoked.
If the name is neither a shell function nor a builtin, and contains no slashes, bash searches each element of the PATH for a directory containing an executable file by that name.
Offline