Configure Your Own screenrc file

screenrc

There are few shell scripts I need to run when I log on to my server. One of my favorite is to use screen to launch the scripts when I log on to the server or using screen to access multiple screen. screenrc file does help me on this, I can build my own screenrc file and update screenrc file whenever I have new script or command wanted to run when I log on to the server. Here is how I configure your personal screenrc file.

By default, screen will read .screenrc file (if you have one) in your home directory. But sometime you might use screen to do other stuff/work, a simple example of write your own screen. Create a screenrc file, for example I created a screenrc file name grabdata.screenrc, and the content of the file


screen -t google.com lynx http://www.google.com
screen -t myemail mutt /mail/paul/inbox
screen -t latestlog tail -F /var/log/message
screen -t checkdiskspace sh /home/paul/script/check-disk-space.sh

After you have build your own screenrc file, launch it will this line of command


screen -S mystartup -c grabdata.screenrc

screen -S mystartup is to assign a screen name
screen -c grabdata.screenrc is to launch screen command with your screenrc file

There are others stuff you can do with screenrc file, man for more info.

Related posts:

  1. Install and Configure mod_suphp or suphp on Plesk Server Plesk control panel comes with Media Temple DV package doesn’t...
  2. How to Lock Your Machine and Display Application Screen We have a couple monitoring applications running on our Linux...
  3. Quick File Copy on File Name with Sample Extension By default, some of the application installation provide you a...
  4. Configure Smarthost SMTP Authentication on Postfix My machine at home cannot send email using port 25,...
  5. Modify or Adjust File Date Time on Unix/Linux You have folders or files in your server last modified...
  6. Check DNS Record with Dig Command Check DNS Record with Dig Command How do you find...
  7. Open file and Splitting String in Perl What I gonna do is to read a bunch of...
  8. Configure IPV6 on Apple and Windows Do you have IPV6 network ready in your office? Lets...
  9. Configure NTP Server on FreeBSD Configure a NTP time server on FreeBSD is fairly easy....
  10. How to Create User with useradd in FreeBSD You can invoke “adduser” command in FreeBSD in order to...

Leave a Reply