Saturday, September 17, 2016

Raspberry Pi & Arch Linux - Day 4 - How to change the default value of From in the mail command



We start wit the follow-up about mail commend.

Problem 4: How to change the default value of From in the mail command

As we noticed last time, when we use the mail command to send emails to our personal account, the From field is set to root by default. One way to change the default value is to use the -r option

The man page of mail gives us:


Here is a concrete example:

echo "test" | mail -s "test" -r "sender-name <sender@gmail.com>" receiver@gmail.com


Problem 5: How to connect to Raspberry Pi from Mac

In order to make writing more efficient, it is better to have access to Raspberry Pi through Mac. There are two benefits: (1) now I can use only one keyboard (2) I have all the nice functionality in Mac. The most important one is to make screenshot. As I am using command line mode in arch linux, it is hard to me to make screenshot without GUI (X windows something). It seems even impossible to me to make a screenshot under this circumstance. Maybe I need to do some more researches online.

To connect to my Raspberry PI, I choose to use ssh. Just type

ssh username@ip-address

And then enter your password. Very simple. Again, to find the ip information, use ifconfig  command.







No comments:

Post a Comment