ah, so in .xinitrc maybe?

exec awesome &> awesome_err.txt  


________________________________
 From: Rena <[email protected]>
To: Scott Kinney <[email protected]> 
Sent: Friday, June 7, 2013 10:39 AM
Subject: Re: run a command from menu item
 


On Fri, Jun 7, 2013 at 1:34 PM, Scott Kinney <[email protected]> wrote:

awesome!
>i've got so much to learn!
>
>
>so if i put that in my rc.lua and start awesome like..
>startx &> awesome_err.txt
>
>
>kinda like that?
>
>
>
>________________________________
> From: Rena <[email protected]>
>To: Scott Kinney <[email protected]> 
>Sent: Friday, June 7, 2013 10:19 AM
>
>Subject: Re: run a command from menu item
> 
>
>
>On Fri, Jun 7, 2013 at 1:13 PM, Scott Kinney <[email protected]> wrote:
>
>wow, embarassing. i need to slow down.
>>
>>
>>both worked, thank you very much!
>>
>>
>>when i run the script that changes the background 
>>(it's just feh --bg-tile /bla/bal.jpg)
>>i get the wristwatch mouse pointer for 15 sec or so.
>>seems weird.
>>
>>
>>are these commands executed in another shell instance?
>>if so, is there a way to see that shell's activity and error messages (if 
>>any)?
>>
>>
>>thanks for the help
>>
>>
>>
>>________________________________
>> From: Rena <[email protected]>
>>To: Scott Kinney <[email protected]> 
>>Sent: Friday, June 7, 2013 9:53 AM
>>Subject: Re: run a command from menu item
>> 
>>
>>
>>On Fri, Jun 7, 2013 at 12:51 PM, Scott Kinney <[email protected]> wrote:
>>
>>i want to assign terminal commands to menu items but i'm not getting it.
>>>
>>>
>>>i assign commands to variable like...
>>>local commands = {}
>>>commands.mail = "chromium http://gmail.com";
>>>
>>>commands.suspend = "systemclt suspend"
>>>commands.background = "~/bin/add.sh"
>>>
>>>
>>>then put it in the menu like...
>>>
>>>
>>>    { "background", commands.background },
>>>
>>>
>>>
>>>mail works but suspend and the bash script do not
>>>
>>>
>>>or does 
>>>
>>>
>>>commands. background = "feh --bg-tile ~/background.png"
>>>
>>>
>>>what am i missing?
>>>
>>>
>>>also, if they commands dont run how do i see the error they produce?
>>>
>>>
>>
>>I suspect suspend doesn't work because you've misspelled it (clt => ctl), and 
>>background doesn't work because tilde expansion doesn't work outside of an 
>>actual shell; you need to write out the full path to the script (and make 
>>sure it's marked executable).
>>
>>
>>-- 
>>Sent from my Game Boy. 
>>
>>
>
>What I've done to capture output from commands is:
>local cmd = param.command ..
>            ([[ 2>&1 | while IFS= read -r line; do ]] ..
>            [[echo "[$(date '+%y%m%d %H%M%S') CMD] $line"; done & ]]):gsub(
>                'CMD', param.command)
>
>os.execute(cmd)
>
>
>That redirects the command's stdout and stderr to Awesome's stdout (and 
>prefixes each line with a timestamp and the command). I then use a shell 
>script to launch Awesome and redirect its stdout to a log file so I can see it 
>all.
>
>
>-- 
>Sent from my Game Boy. 
>
>

I think you'd have to redirect Awesome itself, not just the startx command.


-- 
Sent from my Game Boy. 

Reply via email to