LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-24-2005, 12:58 PM   #1
Tylerious
Member
 
Registered: Feb 2005
Location: USA
Distribution: Gentoo
Posts: 72

Rep: Reputation: 15
multiple shell commands


I'm trying to get my computer to go down to APM suspend and have xscreensaver locked when it wakes up. The following command works fine in xterm: xscreensaver-command -lock;sudo chvt 1;sudo apm -s. But I'm trying to lock/suspend as a keybinding, configured in Openbox's ~/.config/openbox/rc.xml file. The section looks like:
Code:
<keybind key="C-A-Insert">
<action name="Execute"><execute>COMMAND</action>
</keybind>
I tried putting the bolded command above in as COMMAND, but it just runs the screen locker without changing virtual terminals or suspending. I created a script and tried to run that as COMMAND, but the same thing happens. The script works fine when executed from xterm. What gives?

Last edited by Tylerious; 12-24-2005 at 01:04 PM.
 
Old 12-24-2005, 06:53 PM   #2
palceksmuk
LQ Newbie
 
Registered: Dec 2005
Distribution: slackware 10.2
Posts: 26

Rep: Reputation: 15
I don't know why it doesn't work but maybe you could try
xscreensaver-command -lock &;sudo chvt 1;sudo apm -s
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing multiple commands by ssh jpan Linux - General 1 10-22-2004 02:12 PM
Passing multiple commands to SU adamrad Linux - General 2 03-26-2004 10:53 AM
Multiple commands with exec! dtheorem Linux - General 1 03-14-2004 03:46 PM
shell commands! krishlinux General 1 10-05-2003 04:47 AM
chaining multiple commands?? puzz_1 Linux - General 9 05-27-2003 11:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration