Announcement

Collapse
No announcement yet.

Help applying a patch

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help applying a patch

    I have a small, but very annoying problem here. I use krfb so I can control my desktop remotely from another computer. The problem is that it always crashes after a few seconds leaving me totally unable to connect again until I close the crash-report window (which of course I can't if I'm sitting in someone elses apartment). This is a known problem with krfb and there's also a small patch that solves this. The problem is that I have no idea whatsoever how to apply this patch since the description is impossibossible to understand for a moderate linux-user like me (been using kubuntu for almost 1,5 years so mostly I know my way around).

    Here's a link to the bug report and the patch at the bottom:
    http://bugs.kde.org/show_bug.cgi?id=124529

    If someone could describe for me exactly what I should do to apply this, I would be very happy about it. Thanks.

    Ps. I know that the future of krfb is somewhat uncertain, but last time I checked they seem to have found someone to handle it in the future. I don't want to use another vnc server-program either 'cause I find krfb to be the easiest and most straighforward to use. Ds.

    #2
    Re: Help applying a patch

    Here's some general instructions for patching. I haven't looked at that bug (yet), so bear that in mind.

    First, get the source. Best to do this in a new directory. I'll assume it's in ~/krfb. So, once in ~/krfb, open up a console (if using Konqueror, F4 will open a Konsole session in the current directory). Get the actual source with "apt-get source krfb". This'll pull down the source and anything else Kubuntu does to it when you install it.
    Anyway, you now have the source. It's probably in another directory, though, so either use ls to find it, or type "cd krf" and hit tab twice to see the possibilities.
    Next up: Applying the patch. Get it and stick it in wherever you are now (I'm guessing ~/krfb/krfb) by whatever means necessary. Save it as something like "mousepatch.patch"
    Apply the patch with "patch -p1 < mousepatch.patch" (or whatever you called it). If it complains about not finding the file to patch, tell it where it should be looking or hit ^C (Ctrl+C) and try -p0.
    Last step is to compile krfb with the patch applied. A simple "./configure; make; sudo make install" should do it, assuming everything is in that directory.
    For external use only.

    Comment


      #3
      Re: Help applying a patch

      Well I'm with you until the "patch -p* < mousepatch.patch"-part, but there it stops and I'm yet again clueless. It complains that it can't find the right file and I'm pretty sure I'm in the right folder. I would like to know what file it is it can't find.

      Comment


        #4
        Re: Help applying a patch

        From looking at the patch file (which comes in plain text) itself, I dare to say that you could just as well "copy & paste" the relvant single line of code the patch is supposed to add to the according C file by hand

        Comment


          #5
          Re: Help applying a patch

          Well, if I understand it correctly it's supposed to be inserted into a file called pthred_mutex_lock.c, which I really can't find (and I've done a full search on my hard drives) so I still don't know where it's supposed to be. Is the file renamed since some update or where am I supposed to put it?

          Comment


            #6
            Re: Help applying a patch

            Originally posted by mintlars
            it's supposed to be inserted into a file called pthred_mutex_lock.c
            Why? The header of the patch file refers to ./krfb/libvncserver/main.c

            Comment


              #7
              Re: Help applying a patch

              'Cause that's what it said in the bug report (see link in first post). Anyway, so I applied the patch in the main.c-file refferred to before, and I did a ./configure, but when I do "make" it says that there is no make file there (hmm). What next?

              Comment

              Working...
              X