user-1: It has occurred to me that if I have a sense of gratitude towards life and towards what has already been given to me then it's not possible to develop desires. I don't know why gratitude is not one of the Brahmaviharas. Lot has been said about it by the Buddha. 
I was looking for any technique to develop gratitude towards life or in general. 
What I was trying was to say, "I am grateful for what has been already given". but it's becoming like a mantra and proving useless. Is there any technique to generate the feeling/emotion of gratitude? 
I looked at this question, but the answer I am looking for isn't there.  

user254: I was wondering whether going on alms-round was an example (of a meditation to develop gratitude) -- but I'm not sure it is. Maybe that's equanimity, instead, I don't know. And it's maybe not an example of "I am receiving a benefit", but of, "they are acquiring merit", and so mudita perhaps?
Maybe receiving the gift of Dhamma then, instead of food? I see people express gratitude toward their teachers.

Your question isn't just asking about gratitude, it's asking about not developing desires as a result of "what has already been given to me" being satisfying or sufficient.
That reminds me of this story: The Moon Cannot Be Stolen
Maybe that story is too cute, too pat?
It does reminds me of this story, though, which starts with a rich woman's encounter with someone who might take her life: My Path To Becoming A Buddhist -- Emma Slade (YouTube)

One more thing -- perhaps gratitude and generosity are linked? So the practice to develop gratitude is linked to the practice to develop generosity.

There's a Zen story on that that subject: The Giver Should Be Thankful

There's doctrine in the Pali canon (that maybe isn't easy to explain) about its being "an ornament for the mind".

If neither of the above are understandable, maybe this story will be -- it's a non-Buddhist (an ex-Christian), commenting on he and his wife's adopting children. He talks about some people giving him "deeply uncomfortable praise that we’re doing something 'noble'", and concludes,

As to the last, I wish I could identify the author who put it perfectly — adopting my children was an act of mercy, but the recipient of the mercy was me.




user14131: Yes, having a sense of gratitude, seeing the endless loop of debts in this world, is not only the foundation of letting of all five kinds of stinginess but also leads to the ending of desire and liberation.
A person of gratitude, never forgetting that he depended, depends on so many sacrifies, beinging by oneself, voluntary and not at all, can be sure that if meeting that of what if beyond debt, hearing the good Dhamma, origin, cause and way of practice to gain the state of one able to give, is not only able to attain Jhana but also to reach paths and the highest fruit.
A person of ingratitude, what ever trying, is and will be lost and it is because of this one should avoid to associate.
Reflection on the many sacrificesbeyond so little joy is something that should be done by those still rejoicing on sensuality as much as possible, reflecting gain, debt and lose in it.
All Brahmaviharas, especially Mudita, are based on a sense of gratitude, a sense of right view. The path to liberation start with gratitude, is it's only door.
Gratitude, a sense of it, increases all desires to abound what is unskilfull and increases all desires to develope and hold on skilfulness.
Tha meditation of Mudita has gratitude as it's cause, aim and release, embodies the joy of letting go best.
Again, maybe now possible to see, to trace.
Also this lesson might be of support: [En] Karma and Gratitude, Bhante Thanissaro
One may find some additional explainings here, or learn about it by doing, giving into at fist had to understand: Sharing merits - (pattanumodana & pattidana)
Never ever think like a thief because if doing so, one is lost and not easily will find in the near of the Noble Domain, a borderland again.
Three kind of people are there, goodness can hardly till never be payed back again: Bahukārasuttaṃ.
But "gifted" of such, the end of tasks and duties is secured and reached.
So is it that a sign of having entered the Noble Domain is overwhelming gratitude toward the Sublime Tripple Gems, having the Sublime Buddha as it's leader.
Gratitude is the paths beginning and it's very end.
Usual training an technics to get familar to a minset of gratitude:
Note that this giving falls actually into the sphere of Silas/duties for one having gone for refuge and are required to not lose the refuge (e.g. breaking the Refuge)

Abhivadana or : Geating and paying respect, veneration toward people of goodness (guṇa), e.g giver: parents, teacher, clan leader, Brahmans and yogies/recluses (those who bond them to virtue). see: [Q&A] Some talks on duty, debt, respect, gratitude and generosity: joy in
Morning/Evening devotional "rituals" toward Buddha, Dhamma, Sangha. ( Chantingguide)
Giving first or repay goodness received.([Hard to find](AN 2.119: Dullabha Sutta — Hard to Find))
Service/fulfill duties (veyyāvacca, german) for ones "gods" (starting by parents... teacher/admirable friends, the Juwels)
Practicing Mudita (Pattānuppadānaby = transf. & Abbhanumodana=sharing) sharing merits (dedication of ones merits done, giving back joy and play it forward)

More advanced, if duties are done, is to focus total on practice and complete the task. How ever, even on such level (hardly possible when living in an household), gratitude and fullfilment of duties in possible sphere, does not disappear.
Who ever rejects to fulfill his duties in the releations he nourishes on, will quickly waste his/her past merits allowing his/her stand within, or increases a lot of debts/demerits.
Once off of gratitude means to dwell in a outer region. One is wise to do all effort to enter and remain in borderlands and to fall not appart. It's not so that outer lands are total void of gratitude, by it's Mara and bondage that earn it (sensuality, pride, conceit, desire for becoming or desire for destruction)

user14192: I write with one intention, with kindness.
Allegory
Gratitude sandwich 
(OK for any diet)
You are in your body, alive. (first "slice" of gratitude.)
Go about your day. Be. Do. 
At bedtime, hold that day with your second slice of gratitude.
Put "sandwich" under your pillow.
Sleep.
Wake.
Good morning.

user8157: 
It has occurred to me that if I have a sense of gratitude towards life and towards what has already been given to me then it's not
  possible to develop desires.

Are you sure? Where do the suttas say gratitude leads to the realisation of anatta & Nibbana? 

I don't know why gratitude is not one of the Brahmaviharas. Lot has been said about it by the Buddha.

Brahma-Vihara is more detached than gratitude. Brahma-vihara is a type of liberation (MN 43). Where as gratitude is often mixed with obligation. The Pali word for 'gratitude' is 'katannukatavedi', which means: 'what others do for me; what I must do in return'. 

I was looking for any technique to develop gratitude towards life or in general.

Simply reflect upon the benefactors you have in life. Mother, father, friends, teachers, employers, employees, bus drivers, shop keepers, nature, food, environment, etc. 
About worldly meritorious right-view, MN 117 says it is right view to believe: "There is mother & father". What this means is there are "benefactors" (towards which gratitude should exist). Ingratitude is a sign of wrong view. 

user13709: 
A person of integrity is grateful & thankful.

Without breath, we die. Considering the breath, aware of the breath, (the breath is not mine, I am  not the breath, the breath is not my self), we understand the gratitude of receiving life. In each breath, be aware of this. With each breath, be grateful. Bring this gratitude to MN10.

-1: <p>It has occurred to me that if I have a sense of gratitude towards life and towards what has already been given to me then it's not possible to develop desires. I don't know why gratitude is not one of the Brahmaviharas. <a href="https://www.accesstoinsight.org/lib/authors/thanissaro/lessonsofgratitude.html" rel="nofollow noreferrer">Lot has been said</a> about it by the Buddha. </p>

<p>I was looking for any technique to develop gratitude towards life or in general. </p>

<p>What I was trying was to say, "I am grateful for what has been already given". but it's becoming like a mantra and proving useless. Is there any technique to generate the feeling/emotion of gratitude? </p>

<p>I looked at <a href="https://buddhism.stackexchange.com/questions/25179/what-is-the-proper-way-to-foster-generosity-and-gratitude">this question</a>, but the answer I am looking for isn't there.  </p>
 254: <p>I was wondering whether going on alms-round was an example (of a meditation to develop gratitude) -- but I'm not sure it is. Maybe that's equanimity, instead, I don't know. And it's maybe not an example of &quot;I am receiving a benefit&quot;, but of, &quot;they are acquiring merit&quot;, and so <em>mudita</em> perhaps?</p>
<p>Maybe receiving the gift of Dhamma then, instead of food? I see people express gratitude toward their teachers.</p>
<hr />
<p>Your question isn't just asking about gratitude, it's asking about not developing desires as a result of &quot;what has already been given to me&quot; being satisfying or sufficient.</p>
<p>That reminds me of this story: <a href="http://www.ashidakim.com/zenkoans/9themooncannotbestolen.html" rel="nofollow noreferrer">The Moon Cannot Be Stolen</a></p>
<p>Maybe that story is too cute, too <a href="https://www.oxfordlearnersdictionaries.com/definition/english/pat_3" rel="nofollow noreferrer">pat</a>?</p>
<p>It does reminds me of this story, though, which starts with a rich woman's encounter with someone who might take her life: <a href="https://www.youtube.com/watch?v=QnJIjEAE41w" rel="nofollow noreferrer">My Path To Becoming A Buddhist -- Emma Slade (YouTube)</a></p>
<hr />
<p>One more thing -- perhaps gratitude and generosity are linked? So the practice to develop gratitude is linked to the practice to develop generosity.</p>
<ul>
<li><p>There's a Zen story on that that subject: <a href="http://www.ashidakim.com/zenkoans/53thegivershouldbethankful.html" rel="nofollow noreferrer">The Giver Should Be Thankful</a></p>
</li>
<li><p>There's doctrine in the Pali canon (that maybe isn't easy to explain) about its being &quot;an ornament for the mind&quot;.</p>
</li>
<li><p>If neither of the above are understandable, maybe this story will be -- it's a non-Buddhist (an ex-Christian), commenting on he and his wife's adopting children. He talks about some people giving him &quot;deeply uncomfortable praise that we’re doing something 'noble'&quot;, and concludes,</p>
<blockquote>
<p>As to the last, I wish I could identify the author who put it perfectly — adopting my children was an act of mercy, but the recipient of the mercy was me.</p>
</blockquote>
</li>
</ul>
 14131: <p>Yes, having a sense of gratitude, seeing the endless loop of debts in this world, is not only the foundation of letting of all five kinds of stinginess but also leads to the ending of desire and liberation.
A person of gratitude, never forgetting that he depended, depends on so many sacrifies, beinging by oneself, voluntary and not at all, can be sure that if meeting that of what if beyond debt, hearing the good Dhamma, origin, cause and way of practice to gain the state of one able to give, is not only able to attain Jhana but also to reach paths and the highest fruit.</p>

<p>A person of ingratitude, what ever trying, is and will be lost and it is because of this one should avoid to associate.</p>

<p>Reflection on the many sacrificesbeyond so little joy is something that should be done by those still rejoicing on sensuality as much as possible, reflecting gain, debt and lose in it.</p>

<p>All Brahmaviharas, especially Mudita, are based on a sense of gratitude, a sense of right view. The path to liberation start with gratitude, is it's only door.</p>

<p>Gratitude, a sense of it, increases all desires to abound what is unskilfull and increases all desires to develope and hold on skilfulness.</p>

<p>Tha meditation of Mudita has gratitude as it's cause, aim and release, embodies the joy of letting go best.</p>

<p><a href="https://buddhism.stackexchange.com/a/25180/14131">Again</a>, maybe now possible to see, to trace.</p>

<p>Also this lesson might be of support: <a href="http://sangham.net/index.php/topic,8155.0.html" rel="nofollow noreferrer">[En] Karma and Gratitude, Bhante Thanissaro</a></p>

<p>One may find some additional explainings here, or learn about it by doing, giving into at fist had to understand: <a href="http://sangham.net/index.php/topic,326.msg13806.html#msg13806" rel="nofollow noreferrer">Sharing merits - (pattanumodana &amp; pattidana)</a></p>

<p>Never ever think like a thief because if doing so, one is lost and not easily will find in the near of the Noble Domain, a <a href="http://sangham.net/index.php/topic,8884.msg16105.html#msg16105" rel="nofollow noreferrer">borderland</a> again.</p>

<p>Three kind of people are there, goodness can hardly till never be payed back again: <a href="http://sangham.net/index.php/topic,8308.0.html" rel="nofollow noreferrer">Bahukārasuttaṃ</a>.</p>

<p>But "gifted" of such, the end of tasks and duties is secured and reached.</p>

<p>So is it that a sign of having entered the Noble Domain is overwhelming gratitude toward the Sublime Tripple Gems, having the Sublime Buddha as it's leader.</p>

<p>Gratitude is the paths beginning and it's very end.</p>

<p><strong>Usual training an technics to get familar to a minset of gratitude:</strong></p>

<p><strong>Note</strong> that this giving falls actually into the sphere of Silas/duties for one having gone for refuge and are required to not lose the refuge (e.g. breaking the Refuge)</p>

<ul>
<li>Abhivadana or : Geating and paying respect, veneration toward people of goodness (guṇa), e.g giver: parents, teacher, clan leader, Brahmans and yogies/recluses (those who bond them to virtue). see: <a href="http://sangham.net/index.php/topic,8385.msg13896.html#msg13896" rel="nofollow noreferrer">[Q&amp;A] Some talks on duty, debt, respect, gratitude and generosity: joy in</a></li>
<li>Morning/Evening devotional "rituals" toward Buddha, Dhamma, Sangha. ( <a href="http://zugangzureinsicht.org/html/lib/authors/dhammayut/chanting_en.html" rel="nofollow noreferrer">Chantingguide</a>)</li>
<li>Giving first or repay goodness received.([Hard to find](AN 2.119: Dullabha Sutta — Hard to Find))</li>
<li>Service/fulfill duties (<a href="http://accesstoinsight.eu/de/wiki/veyyavacca" rel="nofollow noreferrer">veyyāvacca</a>, german) for ones "gods" (starting by parents... teacher/admirable friends, the Juwels)</li>
<li>Practicing Mudita (<a href="http://accesstoinsight.eu/en/lib/authors/wijesinghe/punna#chapter_6" rel="nofollow noreferrer">Pattānuppadānaby</a> = transf. &amp; <a href="http://accesstoinsight.eu/en/lib/authors/wijesinghe/punna#chapter_7" rel="nofollow noreferrer">Abbhanumodana</a>=sharing) sharing merits (dedication of ones merits done, giving back joy and play it forward)</li>
</ul>

<p><strong>More advanced</strong>, if duties are done, is to focus total on practice and complete the task. How ever, even on such level (hardly possible when living in an household), gratitude and fullfilment of duties in possible sphere, does not disappear.</p>

<p>Who ever rejects to fulfill his duties in the releations he nourishes on, will quickly waste his/her past merits allowing his/her stand within, or increases a lot of debts/demerits.</p>

<p>Once off of gratitude means to dwell in a <a href="http://sangham.net/index.php/topic,8856.msg15962.html#msg15962" rel="nofollow noreferrer">outer region</a>. One is wise to do all effort to enter and remain in borderlands and to fall not appart. It's not so that outer lands are total void of gratitude, by it's Mara and bondage that earn it (sensuality, pride, conceit, desire for becoming or desire for destruction)</p>
 14192: <p>I write with one intention, with kindness.</p>

<p>Allegory
Gratitude sandwich 
(OK for any diet)</p>

<p>You are in your body, alive. (first "slice" of gratitude.)</p>

<p>Go about your day. Be. Do. </p>

<p>At bedtime, hold that day with your second slice of gratitude.</p>

<p>Put "sandwich" under your pillow.</p>

<p>Sleep.
Wake.
Good morning.</p>
 8157: <blockquote>
  <p><em>It has occurred to me that if I have a sense of gratitude towards life and towards what has already been given to me then it's not
  possible to develop desires.</em></p>
</blockquote>

<p>Are you sure? Where do the suttas say gratitude leads to the realisation of <em>anatta</em> &amp; <em>Nibbana</em>? </p>

<blockquote>
  <p><em>I don't know why gratitude is not one of the Brahmaviharas. Lot has been said about it by the Buddha.</em></p>
</blockquote>

<p>Brahma-Vihara is more detached than gratitude. Brahma-vihara is a type of liberation (MN 43). Where as gratitude is often mixed with obligation. The Pali word for 'gratitude' is '<em>katannukatavedi</em>', which means: '<em>what others do for me; what I must do in return</em>'. </p>

<blockquote>
  <p><em>I was looking for any technique to develop gratitude towards life or in general.</em></p>
</blockquote>

<p>Simply reflect upon the benefactors you have in life. Mother, father, friends, teachers, employers, employees, bus drivers, shop keepers, nature, food, environment, etc. </p>

<p>About worldly meritorious right-view, MN 117 says it is right view to believe: "<em>There is mother &amp; father</em>". What this means is there are "benefactors" (towards which gratitude should exist). Ingratitude is a sign of wrong view. </p>
 13709: <blockquote>
  <p><a href="https://suttacentral.net/an2.32-41/en/thanissaro" rel="nofollow noreferrer">A person of integrity is grateful &amp; thankful.</a></p>
</blockquote>

<p>Without breath, we die. Considering the breath, aware of the breath, (<em>the breath is not mine, I am  not the breath, the breath is not my self</em>), we understand the gratitude of receiving life. In each breath, be aware of this. With each breath, be grateful. Bring this gratitude to <a href="https://suttacentral.net/mn10/en/sujato" rel="nofollow noreferrer">MN10</a>.</p>
