Search code examples
ubuntu-14.04awesome-wm

Where is rc.lua called in Awesome WM?


I have installed awesome on Ubuntu 14.04 through apt-get. I can modify the rc.lua file just fine, but I'd like to know where it's called so that any print() statements I have in rc.lua can be teed to a log file.

I cannot find rc.lua in the default startx script, and I do not have a .xinitrc file. I'm assuming something must call the rc.lua, but how do I find out where it's done?


Solution

  • The answer to the question in the title is: https://github.com/awesomeWM/awesome/blob/7ed29196bb8862ac7ef2cd7f07362a70acf58997/luaa.c#L584-L604

    Awesome runs the rc.lua file during startup, so any print() statements go to awesome's stdout. How exactly do you start awesome? That's where you would have to do redirection?

    Also, why do you want to redirect? Doesn't Ubuntu redirect this to ~/.xsession-errors by default? Why do you need something different?