Where is rc.lua called in Awesome WM? - ubuntu-14.04

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?

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?

Related

Solana Can't find devnet.json

I'm following this article as a practice.
And stuck with
cat .config/solana/devnet.json
I realize that windows OS doesn't have cat so I tried
type ~/.config/solana/devnet.json
that result in
The syntax of the command is incorrect.
so I try again with
type "~/.config/solana/devnet.json"
and this time, it leads to
The system cannot find the file specified.
It's kind of surprise me so I browse that directory(C:\Users\my-name\.config\solana) and found devnet.json is truly not there.
My questions are where could this file be? Or which step I might do wrong so the file was not generated? I check the result message of each step, things look fine...
It turns out since I didn't change the working directory so the devnet.json is saved in C:\Windows\System32\~\.config\solana
Got the same problem
It seems that there is no devnet.json file created but the devnet wallet works successfully
you may download git bash on your windows machine and can simply use cat and all bash commands after?
You're following Linux instructions which are not 100% compatible with your Windows OS. ~ is alias for home directory in Linux and it doesn't work in Windows where ~ is a normal char. That led to you the initial confusion. Also other differences like type / cat. On Windows use full path to your home directory (usually something like C:\Users..., etc.). So your key-gen command can look like something like this
solana-keygen new --outfile C:/Users/hsiao/keys/devnet.json
Then you can use
solana config --keypair C:/Users/hsiao/keys/devnet.json
and be happy ever after!

How to change the text of the command to run an app in Linux?

I use Arch. For example, in order to run Google Chrome in terminal you have to run the long command google-chrome-stable. How can I change this command to make it more concise (chrome, for example)? I run this browser often from the terminal because it's more convenient for web-development when you write some html/css code in text editor and run it using the browser to see how it works.
Thank you! And sorry for my English, it's not my first language.
The problem is solved. I've just added the line alias chrome="google-chrome-stable" to my ~/.bashrc file and reboot the system.

What is the shebang line for .pyw files?

I've been writing a Tkinter program and I don't want the console to show, so I used a .pyw file. However the program ran with an error that said the program could run usr/bin/python3, so I removed the shebang line, and it worked, but do I need a shebang line? Or should I keep it as is.
If it works without the shebang line:
Your computer found a version of Python to run it (likely in your "PATH" environment variables).
If it didn't work with the shebang line, either:
You made a typo, or
You gave it an incorrect path to your version of Python
Make sure you know exactly where Python is installed on your device:
Mac/Linux
Windows
(To anyone simply copy-pasting what you see in tutorials - without a good grasp of what it's doing: Try googling terms like "shebang line" and figure out what they might be doing behind the scenes)

How to find out the version of cygwin setup-x86.exe?

I wonder how to find out the version of the cygwin setup program (setup-x86 or setup-x86_64). I know there's setup.ini file when the setup program downloads stuff. There's a line "setup_version: 2.XXX" therein. Is there any direct way to get the version number? Something akin to "setup --version" on the command line.
There is no version command line as you can see from the help output
/setup-x86.exe -h
You can ask on the mailing list for this additional info to be added
as setup is currently under deep review.
The only way, currently available, is to look at the start window

adding a start up via command line (Ubuntu)

Hey, I'm trying to have a graphical program and I want it to start after I log in. How do I do so? I know there's a GUI program, but I want to use a command line here.
GUI tool:
http://www.thegeekstuff.com/2009/07/ubuntu-open-applications-automatically-during-system-startup/
now, there is update-rc.d, however, it seems to run before I log in, while the entire system loads ups (Unless I don't understand what the NN means in the update-rc.d manual).
Any ideas?
There's also an autostart folder in ~/.config/autostart - which is profile (or user) specific. If you put a .desktop file in /etc/xdg/autostart it will become a global startup for any new users created. This assumes you have xdg-user-dirs-gtk installed.
Drop a .desktop file in... /etc/xdg/autostart here, might be different on Ubuntu.

Resources