Cygwin Part 2: DDRescue-GUI on Windows 10, sort of…

NOTE: I now sell DDRescue-GUI for Windows, which works around most of the issues here and is significantly more up to date and stable – I would recommend anyone who wants to run DDRescue-GUI to simply buy that instead. This article will be left here for the time being in case it has educational value.

Hi everyone. Seeing as the last time I reviewed Cygwin, things didn’t go so well, I had to try again. It does work better on 64-but Windows, fortunately. Disclaimer: It was a bit glitchy here too, because Windows Defender was interfering with it, but Cygwin itself seems pretty reliable – the follow up is soon to come. Anyway:

Cygwin part 2 – I met with success. Eventually.

This post largely consists of a video, with a writeup. The video is highly edited to speed it all up, so don’t worry about watching me fix problems for ages 🙂

The writeup

First Impressions under Windows 10

This worked SO much better than in my 32-bit Windows 7 VM I used in part 1. It still isn’t perfect, because of antivirus and the laptop’s inability to run Windows 10 at an acceptable speed, but it was still far better than before.

Getting DDRescue-GUI Installed

This was fairly easy; all I had to do was download the “other linux distro” version from here, and put the files in the right place. Other than that, a bunch of dependencies were installed, and then I was ready for my first try.

But does it work?

Spoiler: yes, after a fashion :). All I had to do was disable bits of the program that won’t work under Cygwin, and we had the base for the GUI working much faster than I thought possible. There were some issues along the way, mostly to do with fork calls in Cygwin, but these issues seem to go away when run under Windows 8.1. I guess I’ll need to test on Windows 10 on a faster system.

Simply put, I disabled the getdevinfo module, notifications, and a call to pkexec when running ddrescue. That was essentially all that was needed! I have to say I thought this was going to be much harder, but I can’t complain. Then I restarted Cygwin with admin privileges (so I can read from devices directly), and successfully recovered some data from a test USB stick I keep around for system testing.

Why was it glitching out so much?

I’ve made this a major point, because to reiterate, this was my laptop’s/Windows 10’s fault, not Cygwin’s. All this stuff worked fine on Windows 8.1. I think it was because of Windows 10’s security settings interfering with Cygwin, together with antivirus software, or the laptop being slow. Essentially, the problem I was having was Cygwin kept reporting “resource temporarily unavailable” when I tried to start new processes in certain circumstances. Rebooting usually fixed the issue, but I will need to do some research to fix it properly.

Summary

This is great, and a major milestone in potential Windows support for DDRescue-GUI, bringing the power of GNU ddrescue to even more users! I just wish I hadn’t spent 6 hours attempting to compile wxPython before I realised there was a package… Anyway, there will be another quick few follow-ups on this. One of the next things to do is figure out how I might package this. You might question why I’m running the GUI in cygwin at all, and this is because ddrescue needs to be run under cygwin, so it makes sense to have it all bundled together, if possible. wxPython will run on native Windows, so I;m having some trouble figuring out how to do this, but it should be possible, so stay tuned!

Hamish

Tagged , , , , , . Bookmark the permalink.

About Hamish McIntyre-Bhatty

I'm a self-employed software developer working on Free Software projects, as well as studying for my degree with the Open University. Being pedantic when it comes to detail is fortunately useful for both of these things! A strong believer in free software, I have a few pay-for programs available under the GPLv3 and enjoy reporting bugs and helping to improve various open source projects, including volunteering at Wimborne Model Town to work on their river control system.

7 Responses to Cygwin Part 2: DDRescue-GUI on Windows 10, sort of…

  1. Rickz says:

    Regards,

    i would like to try out this version under windows 10

    please share it

    My Best Regards

    • Okay, I shall try to work out a more detailed how-to post, and find somewhere to put a first-draft of the files – I have since updated the GUI, so I might as well provide updated files.

      Bear in mind that you’ll need to install and set up Cygwin manually on your system for now, but I do aim to provide a downloadable bundle at some point in the near(ish) future.

      Hamish

  2. Nino says:

    Hey Hamish

    Great work really. Love to be able to use ddrescue in Windows. Using it under win 11. Not quite intuitive right of the box, but figured it out thanks to informative error messages. Now It is running and copying a crashed hard drive. However – Xlaunch went black after 2 hrs runtime. If I try to close, I get a warning from ddrescue to not terminate while copying. So it is still running and progress is visible in title bar.
    Is it possible to refresh the Xlaunch window? Otherwise, I just wait until tomorrow and see what the result will be.

    Cheers Nino

    • Hey Nino,

      Thanks! I haven’t personally encountered this issue, but due to things like this, I do actually sell a Windows version of DDRescue-GUI. It also uses Cygwin, but that configuration has been tested thoroughly by me and is more up to date than this post – I would recommend using that instead, and I have verified that it works with Windows 11.

      Unfortunately, I don’t know why X did that – if you find a pattern, let me know and I’ll see if I can report it to the Cygwin package maintainer.

      Hope this helps,
      Hamish

      • Nino Emanuel Landler says:

        Hej again.

        Quick reply! I was referring to your latest Windows version 😀 Sorry if I did not make that clear enough (or write this on the wrong page). I just bought it yesterday. Pretty stable apart from the display in xserver going black. Maybe I was straining the PC with too much other stuff. DDrescue still going on with copying while I am writing this. Very exciting how it will turn out tomorrow. Would also like to compliment on your videos explaining settings nicely. Cheers

  3. Nino Emanuel Landler says:

    Hej again.

    Quick reply! I was referring to your latest Windows version 😀 Sorry if I did not make that clear enough (or write this on the wrong page). I just bought it yesterday. Pretty stable apart from the display in xserver going black. Maybe I was straining the PC with too much other stuff. DDrescue still going on with copying while I am writing this. Very exciting how it will turn out tomorrow. Would also like to compliment on your videos explaining settings nicely. Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *