Jump to content
Maintenance ×
×
×
  • Create New...

Login Message and Weather - Clean and Shiny!


Recommended Posts

Hello,

Whenever i logged in on my test-server i wanted to be more like X-Men movies (Welcome Professor!!! famous quote), so i wanted to create a human friendly environment, of course you can modify this to your needs, but this is my script that i want to share with you.

Final result will be this:

 

 

220258Ht4Ifab.png

 

What does it do:

Only after you successfully login in FreeBSD it will:

  1. Clear console so it will be clean and shiny!
  2. Print a welcome message.
  3. Print weather automatically parsed from your location (you need to set your location, i will show you how, it is very easy).
  4. Change directory (cd) to your desirable location (in my case i wanted to change directory in my start.sh location so i don't have to make the same command every time i login.).

Of course you can do whatever else you want it to do.

How to make this happen:

  1. Login
  2. press the following command
ee ~/.login

Notice that this command is not guaranteed to work on every FreeBSD version but should work on most cases

Append the following commands:

cd /usr/home/game #Where the change directory should go
clear #Clear console after login
echo "Welcome $USER!" #Welcome message ($USER variable is the current user logged in)
curl -s http://wttr.in/thessaloniki | head -7 | tail -5 #This is the weather info, change "thessaloniki" with the city of your choice.

Now press ctrl + C and "exit" (Without quotes, this will save the above information and exit to command line.).

Now reboot or logout and login again and see the difference, much cleaner, isn't it?

  • Love 7
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 0

      erorrs after update granny to 2.9

    2. 0

      Navicat Premium 16.1.1 x64

    3. 5

      problem Dargon Soul Changre Attribute

    4. 5

      problem Dargon Soul Changre Attribute

    5. 41

      Global Chat

    6. 5

      problem Dargon Soul Changre Attribute

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.