Caffeine does not work for Linux Mint - Mate version

Bug #1026411 reported by Karthik T on 2012-07-19
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Caffeine
Undecided
Unassigned

Bug Description

Hi, Caffeine currently does not work as is for the MATE version of linux mint, since as a part of their forking of Gnome 2 all the names have changed. I have attached a patch of the changes i have made to get it to work with MATE, basically just copied over the GNOME parts and replaced the names with the correct ones. It works perfectly on my machine.

Thanks for the patch, works flawlessly here (12.04 + MATE 1.4 repos) too.

@Karthik T :

Albeit the patch works, I'm curious why you left this line in the patch:
--------------snip----------------
+ logging.info(bus.list_names())
--------------snip----------------

Just a leftover from initial debugging, which can be removed?

Damn yes that was just for debugging, just to verify that i was getting the
new names right. Can be removed and i should have before making the patch,
thanks!
Karthik T

On 3 August 2012 21:44, Bert Voegele <email address hidden> wrote:

> @Karthik T :
>
> Albeit the patch works, I'm curious why you left this line in the patch:
> --------------snip----------------
> + logging.info(bus.list_names())
> --------------snip----------------
>
> Just a leftover from initial debugging, which can be removed?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

Dominick (needlez667) wrote :

how and where do we apply this patch?? do we need to put the patch in the same folder as the program or not?? and what patch command should we intiate from terminal??

Karthik T (sir-nigel-loring) wrote :

Hi Dominick,
You can refer to
http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/ to learn
how to apply the patch. What you want to do is get the latest code from
their repository and then apply the patch from the top directory of the
code. After that i think linking the caffeine script from the code to the
caffeine in /usr/bin/ should be enough.. i was using it manually for the
longest time tho.. Not sure if make install might be enough as well.. You
can try both (link and make all)
Karthik T

On 15 November 2012 03:40, Dominick <email address hidden> wrote:

> how and where do we apply this patch?? do we need to put the patch in
> the same folder as the program or not?? and what patch command should we
> intiate from terminal??
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

Rohit Pande (panderohit) wrote :

Thx, Kartik T. However I am a n00b. This is a foreign language to me. :) I have the .deb file that i downloaded. Other than that I noticed that the file for Caffeine is located at the following locations on my machine: /usr/share/caffeine. Another folder is located under /usr/share/doc/caffeine, and yet another at usr/shared/pyshared/caffeine. And yes, there is a caffeine file in /usr/bin also.

Would it please be possible for someone to pls let us know how to do this? Thanks a lot.

Karthik T (sir-nigel-loring) wrote :

Hi Rohit,

You have a couple of options.

You could apply the patch directly to the code that is currently installed
- that is in /usr/shared/pyshared/caffeine.
You could also download the latest code from the repo, apply the patch to
it, and then either run "make install" to install it. Or just use the
patched version from that location itself by using its absolute path.

To use the patch itself you want to go into the folder that is 1 level
above the files such as core.py. This would be /usr/shared/pyshared/ for
the first option, or the top directory of the checked out code for option 2
You would then run the command patch < /path/to/file to apply the patch
itself. The patch file is a text file, so you can open it to see what the
changes are, and you can confirm that the changes have happened if you want
to check. You can look at
http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/ for more
info about applying patches. If you have any other questions pls feel free
to ask.

I was hoping that this code would get integrated into the code base and a
new package built, but this doesnt seem to be happening. Let me see if I
can build a .deb with the patch applied to help others.

Karthik T

On 25 November 2012 17:30, Rohit Pande <email address hidden> wrote:

> Thx, Kartik T. However I am a n00b. This is a foreign language to me. :)
> I have the .deb file that i downloaded. Other than that I noticed that
> the file for Caffeine is located at the following locations on my
> machine: /usr/share/caffeine. Another folder is located under
> /usr/share/doc/caffeine, and yet another at
> usr/shared/pyshared/caffeine. And yes, there is a caffeine file in
> /usr/bin also.
>
> Would it please be possible for someone to pls let us know how to do
> this? Thanks a lot.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

Karthik T (sir-nigel-loring) wrote :

Hi, I have made the .egg of my changes. You can install it by* "sudo
easy_install http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg"*.
This is slightly different from a .deb file but should work as good. It
would be great if people can test it and let me know.

Karthik T

On 26 November 2012 14:09, Karthik T <email address hidden> wrote:

> Hi Rohit,
>
> You have a couple of options.
>
> You could apply the patch directly to the code that is currently installed
> - that is in /usr/shared/pyshared/caffeine.
> You could also download the latest code from the repo, apply the patch to
> it, and then either run "make install" to install it. Or just use the
> patched version from that location itself by using its absolute path.
>
> To use the patch itself you want to go into the folder that is 1 level
> above the files such as core.py. This would be /usr/shared/pyshared/ for
> the first option, or the top directory of the checked out code for option 2
> You would then run the command patch < /path/to/file to apply the patch
> itself. The patch file is a text file, so you can open it to see what the
> changes are, and you can confirm that the changes have happened if you want
> to check. You can look at
> http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/ for
> more info about applying patches. If you have any other questions pls feel
> free to ask.
>
> I was hoping that this code would get integrated into the code base and a
> new package built, but this doesnt seem to be happening. Let me see if I
> can build a .deb with the patch applied to help others.
>
> Karthik T
>
>
> On 25 November 2012 17:30, Rohit Pande <email address hidden> wrote:
>
>> Thx, Kartik T. However I am a n00b. This is a foreign language to me. :)
>> I have the .deb file that i downloaded. Other than that I noticed that
>> the file for Caffeine is located at the following locations on my
>> machine: /usr/share/caffeine. Another folder is located under
>> /usr/share/doc/caffeine, and yet another at
>> usr/shared/pyshared/caffeine. And yes, there is a caffeine file in
>> /usr/bin also.
>>
>> Would it please be possible for someone to pls let us know how to do
>> this? Thanks a lot.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1026411
>>
>> Title:
>> Caffeine does not work for Linux Mint - Mate version
>>
>> Status in Caffeine:
>> New
>>
>> Bug description:
>> Hi, Caffeine currently does not work as is for the MATE version of
>> linux mint, since as a part of their forking of Gnome 2 all the names
>> have changed. I have attached a patch of the changes i have made to
>> get it to work with MATE, basically just copied over the GNOME parts
>> and replaced the names with the correct ones. It works perfectly on my
>> machine.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>>
>
>

Rohit Pande (panderohit) wrote :

Hi Kartik

Thanks a lot for that. I tried:

sudo easy_install http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg

However the response is:
sudo: easy_install: command not found

Which package do i need to install for running this? Typing easy install in
Synaptic shows auto-install-el as the top hit. Is that the one I need?

Thanks,
Rohit

On Tue, Nov 27, 2012 at 6:12 PM, Karthik T <email address hidden>wrote:

> sudo
> easy_install http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg"
>

Karthik T (sir-nigel-loring) wrote :

I assumed it should be installed with python.. You need to install
http://packages.python.org/distribute/easy_install.html#installing-easy-install.
Not sure if it can be gotten from synaptic.

Karthik T

On 30 November 2012 12:22, Rohit Pande <email address hidden> wrote:

> Hi Kartik
>
> Thanks a lot for that. I tried:
>
> sudo easy_install
> http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg
>
> However the response is:
> sudo: easy_install: command not found
>
>
> Which package do i need to install for running this? Typing easy install in
> Synaptic shows auto-install-el as the top hit. Is that the one I need?
>
> Thanks,
> Rohit
>
>
> On Tue, Nov 27, 2012 at 6:12 PM, Karthik T <<email address hidden>
> >wrote:
>
> > sudo
> > easy_install http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg"
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

Karthik T (sir-nigel-loring) wrote :

I think you need to install python-setuptools package for easy_install.
Alternatively you can install python-pip and use pip instead of
easy_install in the command.

On 30 November 2012 15:28, Karthik T <email address hidden> wrote:

> I assumed it should be installed with python.. You need to install
> http://packages.python.org/distribute/easy_install.html#installing-easy-install. Not sure if it can be gotten from synaptic.
>
> Karthik T
>
>
> On 30 November 2012 12:22, Rohit Pande <email address hidden> wrote:
>
>> Hi Kartik
>>
>> Thanks a lot for that. I tried:
>>
>> sudo easy_install
>> http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg
>>
>> However the response is:
>> sudo: easy_install: command not found
>>
>>
>> Which package do i need to install for running this? Typing easy install
>> in
>> Synaptic shows auto-install-el as the top hit. Is that the one I need?
>>
>> Thanks,
>> Rohit
>>
>>
>> On Tue, Nov 27, 2012 at 6:12 PM, Karthik T <<email address hidden>
>> >wrote:
>>
>> > sudo
>> > easy_install http://dl.dropbox.com/u/1168249/caffeine-2.4.1-py2.7.egg"
>> >
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1026411
>>
>> Title:
>> Caffeine does not work for Linux Mint - Mate version
>>
>> Status in Caffeine:
>> New
>>
>> Bug description:
>> Hi, Caffeine currently does not work as is for the MATE version of
>> linux mint, since as a part of their forking of Gnome 2 all the names
>> have changed. I have attached a patch of the changes i have made to
>> get it to work with MATE, basically just copied over the GNOME parts
>> and replaced the names with the correct ones. It works perfectly on my
>> machine.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>>
>
>

Rohit Pande (panderohit) wrote :

Hi again

I installed python-setuptools and then the installation went ok.

Then i gave the machine a restart and yay It all works well now.

Thanks a lot, bro. I should teach myself some coding too. :)

Btw, do i need to update launchpad?

Cheers.

Rohit Pande (panderohit) wrote :

aha. i see it has self-updated. great. thank a lot.

framp (framp) wrote :

I also faced this issue. I suspect as soon as the fix is available as a package it will be posted here. If not please let me know where I have to subscribe to ge a notification when and where the fix will be available.

Karthik T (sir-nigel-loring) wrote :

@Rohit, You are welcome, thanks a lot for helping me test my package version
@famp, I have posted a fixed .egg version for getting caffeine to work for
MATE, if you are looking for an official fix from the developers, id advice
that you dont hold your breath.. They seem to have lost interest or given
up development altogether.

On 2 December 2012 02:54, famp <email address hidden> wrote:

> I also faced this issue. I suspect as soon as the fix is available as a
> package it will be posted here. If not please let me know where I have
> to subscribe to ge a notification when and where the fix will be
> available.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

Rohit Pande (panderohit) wrote :

Cheers. There is another small error. I use my laptop connected to my TV
and when I did so in Mint 11, I enabled caffeine and it would allow me to
close my laptop lid and it wouldn't turn the display off. However in Mint
13 MATE this feature is not working with Caffeine. Do you reckon that there
could be a solution to this by any chance? Thanks a lot. :)

Karthik T (sir-nigel-loring) wrote :

Is the fix working for you in other situations? If not you can try
uninstall the old version so that the new version is the only one. `sudo
apt-get remove caffeine` should do. If this doesnt fix it, im out of ideas
:(

On 4 December 2012 15:44, Rohit Pande <email address hidden> wrote:

> Cheers. There is another small error. I use my laptop connected to my TV
> and when I did so in Mint 11, I enabled caffeine and it would allow me to
> close my laptop lid and it wouldn't turn the display off. However in Mint
> 13 MATE this feature is not working with Caffeine. Do you reckon that there
> could be a solution to this by any chance? Thanks a lot. :)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

framp (framp) wrote :

@Karthik
Actually that'w what I expected: An official fix. I use caffeine now for a long time and I don't like to hear caffeine seems to be discontinued.
Unfortunately I don't have access to my system the next 4 weeks to test the patch. Will keep you posted.

Is there a way to remove my eMail address in posting #16? I unfortunately forgot to disable the publication of it when I registered :-(. I don't like spam eMails.

Karthik T (sir-nigel-loring) wrote :

@framp, Apologies about the email address, I checked, but I cant seem to
find an edit comment feature in launchpad.
As to the fix, all I know is that i submitted the fix early Aug, and havent
heard back since.

Rohit Pande (panderohit) wrote :

Hi
I finally managed to try your solution: uninstalling caffeine and only
installing your fix. However after doing so, I couldn't see caffeine in my
computer, even though i had passed the installation command for the .egg
file you have provided.

Nevermind, I re-installed caffeine and it is back to normal now. The only
glitch is that the HDMI TV screen blanks out on closing the laptop lid,
which is a feature I can live without. But other than that, it is all sweet.

Thanks a lot and cheers.

On Wed, Dec 5, 2012 at 2:51 AM, Karthik T <email address hidden>wrote:

> @framp, Apologies about the email address, I checked, but I cant seem to
> find an edit comment feature in launchpad.
> As to the fix, all I know is that i submitted the fix early Aug, and havent
> heard back since.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

--
Rohit Pande

Karthik T (sir-nigel-loring) wrote :

Hi @Rohit,

When you had only the new version installed, was it runnable from command
line? That should be possible and sufficient imo. Perhaps the OPs setup of
the egg does not to do the gnome menu setup process.
Alternatively you could try installing the old version and then installing
the .egg on top and see if that fixes your issue.. Or you could just try
manually making the changes i have listed in the .patch file.

Karthik T

On 21 December 2012 22:19, Rohit Pande <email address hidden> wrote:

> Hi
> I finally managed to try your solution: uninstalling caffeine and only
> installing your fix. However after doing so, I couldn't see caffeine in my
> computer, even though i had passed the installation command for the .egg
> file you have provided.
>
> Nevermind, I re-installed caffeine and it is back to normal now. The only
> glitch is that the HDMI TV screen blanks out on closing the laptop lid,
> which is a feature I can live without. But other than that, it is all
> sweet.
>
> Thanks a lot and cheers.
>
>
> On Wed, Dec 5, 2012 at 2:51 AM, Karthik T
> <email address hidden>wrote:
>
> > @framp, Apologies about the email address, I checked, but I cant seem to
> > find an edit comment feature in launchpad.
> > As to the fix, all I know is that i submitted the fix early Aug, and
> havent
> > heard back since.
> >
> > --
> > You received this bug notification because you are subscribed to the bug
> > report.
> > https://bugs.launchpad.net/bugs/1026411
> >
> > Title:
> > Caffeine does not work for Linux Mint - Mate version
> >
> > Status in Caffeine:
> > New
> >
> > Bug description:
> > Hi, Caffeine currently does not work as is for the MATE version of
> > linux mint, since as a part of their forking of Gnome 2 all the names
> > have changed. I have attached a patch of the changes i have made to
> > get it to work with MATE, basically just copied over the GNOME parts
> > and replaced the names with the correct ones. It works perfectly on my
> > machine.
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
> >
>
>
> --
> Rohit Pande
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1026411
>
> Title:
> Caffeine does not work for Linux Mint - Mate version
>
> Status in Caffeine:
> New
>
> Bug description:
> Hi, Caffeine currently does not work as is for the MATE version of
> linux mint, since as a part of their forking of Gnome 2 all the names
> have changed. I have attached a patch of the changes i have made to
> get it to work with MATE, basically just copied over the GNOME parts
> and replaced the names with the correct ones. It works perfectly on my
> machine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/caffeine/+bug/1026411/+subscriptions
>

framp (framp) wrote :

Just applied your patch on Mint 13 with Mate. Works great. Thanks for sharing.

Reuben Thomas (rrt) wrote :

I won't be applying this patch, sorry. Caffeine 2.5 uses the freedesktop.org ScreenSaver API; if MATE does, you're fine; if not, then support should be added to MATE.

Changed in caffeine:
status: New → Won't Fix
Rungholio (jegpqjlk) wrote :

Lame... the patch works great. Now I can use Linux Mint + Caffeine. Otherwise the app is useless on mint and probably newer versions of ubuntu as gnome screensaver is deprecated.

My car likes driving 75mph, the city has this stupid 55mph speed limit. If the cops don't see me, I'm fine. If not then maybe they should change the limits.

NJ (joll-nicholas) wrote :

I think that someone - the makers of Caffeine, or the Mint or Ubuntu people - need to fix this problem. For it will irritate many users.

Also: the problem exists on Linux Mint Cinnamon, not just Mate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers