Matthew 5:6 reads, "Blessed are they which do hunger and thirst after righteousness: for they shall be filled."
Nephi 12:6 reads, "And blessed are all they who do hunger and thirst after righteousness, for they shall be filled with the Holy Ghost."
To me, hungering and thirsting for an object simply means having an intense desire for that object - really wanting it, whatever 'it' is. So, to hunger and thirst after righteousness, means to have an intense desire to be righteous.
And what does rightous mean? It means being upright or moral - being good, honest or fair.
The difference between the Matthew and Nephi versions is interesting. In Matthew, those who desire righteousness are simply filled. While in the Nephi version, they are filled with the Holy Ghost.
The phrase 'filled with the Holy Ghost' reminded me of D&C 121:45-46, which reads, "Let they bowels also be full of charity towards all men, and to the household of faith, and let virtue garnish thy thoughts unceasingly; then shall thy confidence wax strong in the presence of God; and the doctrine of the priesthood shall distil upon thy soul as the dews from heaven."
"The Holy Ghost shall be thy constant companion, and thy scepter an unchanging scepter of righteousness and truth; and thy dominion shall be an everlasting dominion, and without compulsory means it shall flow unto thee forever and ever."
Now - to go down this trail a bit more - scepters are symbols of power or authority or dominion. Therefore, it seems that if you desire (really desire) righteousness, that you will be filled with the Holy Ghost - He will be your constant companion; always there to advise and guide you. And as He is always there to advise, guide and comfort you, your power and authority will be derived from righteousness and truth. And since your power and authority are founded on righteousness and truth, there will be no need to compel that which is in your kingdom - all things will gravitate to you naturally.
The ultimate lesson to be learned here is to train your desires on righteousness.
Reference Links
wikipedia entry for scepter
wikipedia entry for was (a type of scepter)
Other Worthwhile Reading Material
He Hath Filled the Hungry With Good Things by Jeffry R. Holland
Nourishing the Spirit by Dallin H. Oaks
Spiritual Nutrients by James E. Faust