Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Boot Windows 10 Directly into Linux Desktop of Choice (github.com/nathancastle)
264 points by nxc18 on March 1, 2017 | hide | past | favorite | 104 comments



The worst of both worlds! The Windows kernel and the Linux UI!

I kid; I kid. Looks fun.


I know you're joking, and while it is cool, that's kind of my thought as well. Yes, get the X11-style integration working so it's easier to run linux gui software... but imho the Windows desktop since 7 is better than most on the linux side.

I'm glad to see this work getting done.. and I hope in means native docker for linux and windows containers native... though, I also have no interest in running windows containers either... it would be nice to see the option. Not sure if this effort will bear fruit to such extent in Azure, but I can't help but think if it reaches compatible enough for docker linux containers, that Azure will get a very compelling docker story.


>but imho the Windows desktop since 7 is better than most on the linux side.

Are you by any chance a fan of minimalism?

Windows desktop by default comes with almost no features at all – be it about window management, file management, network connectivity (shares) or anything else. Personally I find using a plain Windows desktop an exercise in frustration for that.


I rarely have to touch network connectivity, and as to file management, what's wrong with launching an explorer window? I will use Win+arrow to use a portion of the screen for a given app, and on mac I use moom for that.

And yes, I'm a bit of a fan of minimalism. I find that managing the apps I use the most, and navigating between open app instances to be easier in windows than anything else... the windows taskbar + start are great, though I prefer the win7 start over win10's, and didn't like win8's at all *(used classic shell).

I don't like the "rest" of windows as much as mac, but the base desktop is imho great... if windows integrated a common/shared menu like mac and unity, it'd be about the only thing I'd like to see added/changed.

I'd also love to see something closer to iterm2 ported to windows and linux... most of the alternatives I've used aren't as good imho. I use conemu in windows, and haven't found a console I really like in linux yet.


Oh man, I didn't know about the win+arrow functionality. I can now do one command to stick one window to a side of a multi-monitor setup! This is killer :)


One of my favorite things added in win7 iirc... once pinned to the right/left can up/down to use 1/4 the screen... I'm using a 40" 4k display, so it really works out nicely.


[dead]


Maybe it's just the frustration of config/settings/preferences being in different locations for every freaking application on windows. It's definitely not consistent...

    File -> Settings
    File -> Preferences
    Edit -> Settings
    Edit -> Options
    Edit -> Preferences
    Tools -> Settings
    Tools -> Options
Anything but consistent. In mac it's `[AppName] -> Preferences` always. And maybe you're right about each window having its' own menu bar.. all the same, I wouldn't call it consistent, as it really isn't.


Right... You can make Windows 10 look like a unix workstation from 1995.


KDE Plasma 5 is actually reasonably modern. http://i.imgur.com/XcnYxy0.png


KDE is my favorite DE by far and it is very much the most advanced environment I know. The integration is the best and the ability to tweak everything is great.

Personally I use i3 90% of the time and use many KDE applications. KDiff, Dolphin and Gwenview are my go to for me, well that and ranger the console file manager.


KDE always felt quite sloppy to me, too much going on, weird borders and decorations, screwy inconsistent padding etc.


Looks almost nice, but feels like spacing and font size is wrong on some places. Maybe I'm just used to win10...


Definitely, there’s a lot to improve, and it certainly isn’t perfect – but it’s not a desktop that you’d compare to Windows 95 or CDE.


elementaryOS ever more so. Although, it is a bit of a clone of MacOSX which may be a turn off for some but still is quite user friendly.

I installed it for my family members ( not at all knowledgeable people in terms of computers etc ) and they all have gotten along with it very well.


KDE Plasma recently added a new unified theming system, and there is now a theme to make KDE Plasma look and work exactly like macOS with that (with menus in top bar, dock, etc)

But yes, elementary does the "good defaults are impirtant" very well.


ITT people who never worked with gnome shell, kde or even i3, awesome, xmonad,...


I.e. Windows 95, more or less.


I bet RMS will now ask people to start calling it GNU/Windows :)


I really like the GNU/k* notation; it highlights the separation between the kernel and the operating system in a very clear way. In this case it would be entirely accurate; Windows is standing on its head to look like a Linux kernel and does a pretty convincing job.

Unfortunately for projects related to WSL, which ultimately challenge some of the 'defaults' people expect, there is a tension between the name that is accurate and one that people will understand. For example, people are so tied to the notion that Ubuntu is a Linux distribution that calling it anything else would be confusing, despite the reality that Ubuntu is an operating system that just happens to have Linux as a kernel most of the time.


No, it's "GNU\Windows" ;)


Pretty sure that's GNU\Window~1


I guess that's accurate, since there are zero lines of the Linux kernel in WSL.


I know this is a joke, but at the same time, it illustrated how influential the GNU project is. All thanks to RMS :). I don't care how unreasonable this man is, he is a great man.



I think GNU should just be rebranded and called Linux. Linux as an umbrella OS brand already includes a lot of software outside of GNU and GNU isn't a very recognized name - I've only heard people talk about it in the context of "that mad guy Stallman who dresses like the pope". The fight is already lost and has been lost for the last 20 years, just call yourselves Linux already, or maybe "Linux System Core". Then we'll be able to run Linux on BSD and the world will finally end.


Sadly, there's more GNU code in this than Linux code, so it's not entirely inaccurate.


There should be literally 0 "Linux" code, so yes.


I was experimenting running stuff like PyCharm, VS Code, Sublime etc. in WSl through X11 Forwarding. Eventually I gave up and just run it properly in VirtualBox with seamless mode.


FYI, for PyCharm a remote interpreter is probably an easier solution as long as you aren't needing your app to draw anything on an X11 window.


I kind of want to have a development environment in Linux. I also like to game, so for that Windows (in non-vm) is better. So that's why I tried to go with WSL in the first place.

But Virtualbox seamless is a nice middle ground between the two OS and I don't have to worry about things that haven't been implemented in WSL.


That's the reason behind using a remote interpreter, unless there is some other benefit to running your IDE in the same OS as your code I'm missing. Your IDE stays on whatever system you want to use, your code gets executed in your VM.

99% of the time I'm working natively in Fedora when I'm working on code these days (unless I have to do .Net or other MS stuff, Windows goes in a VM for that) - but before I could make that switch I ran PyCharm/IntelliJ/etc. on Windows and just had a headless Fedora or CentOS VM that PyCharm ran my code in.


Linux gaming has been improving rapidly lately, in another year I doubt windows will be necessary.


Biggest overstatement. Linux gaming, though becoming more possible, is nowhere near gaming on windows. Forget game availability, even most GPUs are not properly supported on most Linuxes.


> even most GPUs are not properly supported on most Linuxes

This situation is rapidly changing too with ATI and intels OSS GPU drivers.


Rapidly? How long since ATI/AMD has been talking about improving their drivers? A decade? No, if history is in any way predicting the future then these talks are completely hollow.

Intel drivers are Ok though.


And now they've released OSS drivers, it's action now, not just talk.


I've been hearing some variations on "getting better any time now" since about 2003. Stop trying to make the Linux Desktop happen. It's not going to happen. In fact, if you stop making it happen, maybe it will finally stabilise enough that it actually happens.


Not directly related to this thread but I want to have a little moan about the Steam client, so here goes:

When I open Steam it opens in the Store view in the main window, and the promotions pop-up also appears with sales and promo info. Great, except that 90% of the time the main store page and the pop-up are pushing Windows only games. I game on an iMac and occasionally on a Linux laptop. I have never bought a Windows only game. I send survey info to Valve.

If Linux (and Mac) gaming is to grow Valve need to try harder to get the games into my field of vision. It's silly that I click on the details button of the promo pop-up for a whole series of games only to scroll through the list and mutter "windoes only" to myself repeatedly. It simply is not content aimed at me at all, and they know who I am and the platform I am using.


Its ridiculous that they don't just pick this up automatically but you can specify what you're interested in from your profile preferences on the Steam store. My recommended games became so much more useful once I turned off early access games and filtered out open world survival and zombie games.


AFAIK, you can disable the the pop-up and you can set which page should be opened by default. Steam > Settings > Interface.


So have the consumer do the work that should be done by the for-profit company whose job is to sell, market and profit. I believe the burden of work lies with Valve, I don't need more games, it's up to Valve to sell them to me.


Given that the percentage of Steam users running Linux is declining, I'm not as optimistic as you.

http://phoronix.com/scan.php?page=news_item&px=Hwsurvey-Febr...


A 0.05% drop is well within the expected margin of error with a perfect statistical methodology and large sample size. The steam survey is opt in, it's a good rough guide but you can't read anything into month-month changes.

Even if we generously agree that it's correct, how much has steam grown? A 0.05% drop could still be more total users than the previous month.


The usage share was 0.97% at the end of 2015, 0.87% at the end of 2016 and 0.75% in the latest survey. This might still translate to a growing absolute number of Linux users, but it would be nice to see the momentum start going in the opposite direction when it comes to those percentages.


How did you enable seamless mode? I'm using VirtualBox to run a Debian desktop with the Gala WM, but I can't get the seamless mode to work. (And I couldn't with Ubuntu, either.)


You need to install the guest addition tools or whatever they are called. Then under Views there is seamless mode.

Were you not able to use it at all or just not with Gala WM?


What windowing system do you use this with?


I just saw I read it wrong. Are you referring to seamless mode? I use mate for that.


The question was not as clear as it could've been but this was the answer I was looking for. Thanks mate.


Windows 10 with the newest Insider Build


Am I the only one surprised that a project which is still under active development still uses sourceforge (https://sourceforge.net/projects/vcxsrv/)? SF should be dead after it began hijacking projects and added adware to installers?

https://arstechnica.com/information-technology/2015/05/sourc...



Did you juat forgive github for the recent change to their TOS that bans GPL?! No, we should host everything on high uptime content agnostic platforms like S3. Or run our own infastructure but use a 3rd party service like GitLab for improved redundancy!


I think once the dust falls everyone will realize that GPL is fine. This github is lawyer speech for how they allow search results. TOS releases always are drama till people settle down and read what it actually says and its intent.


This is so awesome. I love the guys notes as well. Right on. Great work dude. Keep it up.


I will surely look into this - it would be very helpful to run a proper tiling window manager like spectrwm/i3/dwm/xmonad under Windows.


Nice. For a long time when I ran windows I also ran Xwin-32 from Starnet[1]. That let me putty -X[2] into a linux box and run things with GUIs on the PC where I was sitting. I found I still had xwin-32 installed so I opened up WSL, set my display to :0 and started up xeyes, and blam! there the were. Very nice.

[1] https://starnet.com/

[2] Not literal, putty has a setting to allow X just like ssh does.


Right now I'm waiting for a GCC related fix in WSL that is scheduled to get pushed in April. In the meantime I've spun up Ubuntu in VirtualBox that gets the job done. This looks like a great option to play around with once that GCC fix is pushed


What's wrong with GCC? What's it fixing?


edit: it's not gcc, it's wsl that needs fixing. this is the issue thread: https://github.com/Microsoft/BashOnWindows/issues/307


That looks awesome. How well do Linux DE's run on Windows?


Its a bit of a mixed bag. Just getting them set up tends to be pretty iffy; they tend to rely on lots of sockets, which I gather aren't actually implemented by WSL.

In terms of performance once they are up and running, things are actually pretty decent. The biggest bottleneck appears to be I/O, which is kind of a problem for everything WSL. That part makes installing a gig+ desktop package frustrating as it takes way longer than it should.

The funny thing is the types of issues I get with WSL are also had by people using actual Linux. And there's no compositing.

Final answer: Full Linux DEs run as well on Windows today as they ran on Linux in 2007.


Yes. Sockets are available in Insider releases though but I/O still remains a pain.


Yes, but not everything. They do not implement everything 1:1 so not everything may work. For example, they implemented inotify, but they left away a few things and certain applications crash because they expect certain functionality.


If sockets are not available how do programs access the network?


Its special UNIX sockets. Actual TCP/IP sockets work fine. The workarounds for UNIX sockets not working typically involve switching to use TCP/IP sockets instead.


Cool but appears to be broken, when starting the configurator for the first time, the registry keys don't exist and it fails silently.

Issue here: https://github.com/NathanCastle/BootShellCredentialProvider/...


I am impressed when someone can make a credential provider. I think Microsoft's documentation and samples are still for Vista.


Cool experiment, but holy Tour de France coding style Batman: https://github.com/NathanCastle/BootShellCredentialProvider/...


In flowchart decision points, it's clearer to make "yes" co-linear and "no" orthogonal.

Likewise I prefer to structure cyclomatic complexity like this by doing something like

   if not <condition 1>
      return
   else if not <condition 2>
      return

   <logic>
Rather than

    if <condition1>
        if <condition2>
            if <condition 3>
                ...


Early returns here will require duplicated free() calls, which makes it hard to prevent leaks.

This coding style is standard practice for Win32 API development.


> This coding style is standard practice for Win32 API development.

Do you have a public style guide that indicates this?

I worked at Microsoft, and while there are teams that (very unfortunately) went with this "diamond" style of error handling, code written in the CNF (Cutler Normal Form) style, such as the kernel code, use gotos and a central cleanup point at the end of the function, which is also the same style used by the Linux kernel: https://github.com/torvalds/linux/blob/master/Documentation/...

The "diamond" style hinders readability, especially when you have many levels of indentation). While it may be a practice adopted by many people, that is does not necessarily mean that it is good style. Even Steve McConnell's Code Complete, a book published by Microsoft Press, recommends early returns over deeply nested if statements for error handling: https://books.google.com/books?id=LpVCAwAAQBAJ&lpg=PA764&ots...

Unfortunately, the Win32 API is full of technical debt, many of which cannot be repaid due to backwards compatibility reasons. Given it is likely most application code written against Win32 is in C++, the ideal approach would be to follow an object-oriented style and use destructors and RAII rather than cleanup functions, but that is not the world we live in.

The design of the Win32 API should not be used as guidelines for good coding practices or even API design. If you haven't already, I highly recommend reading "The Worst API Ever Made": https://mollyrocket.com/casey/stream_0029.html.


The more typical coding style for raw Win32 is to have a block of CloseHandle/Free/... block at the end of the function, and goto it for early exit. Usually with some helper macros to easily write "if it failed, goto cleanup" one-liners.


You can't have a single cleanup (because subsequent calls use memory/handles from prior - otherwise you'd have a function wrapper), so it ends up getting really nasty - at which point, the logic feels clearer (and easier to match alloc and free) if you have indented blocks. The change I'd make to the code would be to have a shorter indent block.

  HRESULT hr;

  hr = DoFoo();

  if (!SUCCESS(hr))
  {
    goto exit;
  }

  hr = DoBar();

  if (!(SUCCESS(hr))
  {
    goto cleanup_foo;     
  }

  hr = DoBar();

  if (!(SUCCESS(hr))
  {
    goto cleanup_bar;     
  }

  hr = DoBaz();

  if (SUCCESS(hr))
  {
    CleanupBaz();
  }

  cleanup_bar:
    CleaupBar();

  cleanup_foo:
    CleanupFoo();

  exit:

  return hr;


> You can't have a single cleanup (because subsequent calls use memory/handles from prior

Why not? You just initialize them all to NULL (or INVALID_HANDLE_VALUE etc, as appropriate). And then in your cleanup block, you check whether each was initialized, and clean it up. So long as you consistently do this in reverse order of their initialization, it works.


Seems okay to me? RAII would make it tidier but the nesting is a simple way to handle cleaning up if you fail part-way through.


Edit: nvm I read this backwards

Do you need a license of Windows 10? (Read the article)

I think now it's hardware licensed in the case of a computer that was bought with Windows 10 on it. Then on re-installs you just get an iso of Windows 10, no key. So in this case if you didn't have Windows 10 to begin with...


This looks cool! I initially thought by the title you'd made a new grub, but was pleasantly surprised!


Heh, I'm using VcXsrv + PuTTY + a custom PowerShell script https://github.com/myfreeweb/xvmmgr to quickly launch a terminal forwarded from a FreeBSD VirtualBox VM.


CTRL-F: embrace

<not found>

I disappoint! Why you no understand, this is the same ol' Microsoft?

(really I pressed Cmd-F)


Can someone explain what this is for someone not really into the lingo here?


He's sort of running open source desktops on a Windows 10 kernel. But not really, there's an abstraction layer called WSL in between. There are some interesting effects though: you can touch test.txt in Bash and then open that file in Notepad without setting up any network shares, virtual machines, etc.

In my mind, Microsoft developed WSL to try to keep developers: if you grew up on Linux but are now employed maintaining Windows servers, WSL gives you a way to get to your shell of choice and maybe you won't tell your boss to migrate from Azure to GCP or AWS.

There's a lot of stuff (notably a lot of hardware) that still doesn't work as advertised. Graphics cards being a big one. This fellow got graphical desktops running. Sounds like I/O is an issue, but it works.


> if you grew up on Linux but are now employed maintaining Windows servers

I think it's the other way around. It's useful for people who develop for Linux, but their company issues Windows notebooks to employees because their internal IT infrastructure is AD+Exchange+etc.


Wow, it hadn't occurred to me they would that systematically unsupportive. Even in the military a lot of devs use Mac or Linux for their work laptop.


Bingo. I just hate it.


> In my mind, Microsoft developed WSL to try to keep developers: if you grew up on Linux but are now employed maintaining Windows servers, WSL gives you a way to get to your shell of choice

IMO Cygwin did that well enough before WSL.

I "grew up on Linux" (starting back in the day when it came on a stack of floppies and nobody knew what it was) and I've always installed Cygwin on all Windows systems where I had admin privileges. It worked fairly well for command line stuff.


Cygwin is slow at things like process creation, I think, which made shell scripts slow. Plus, cygwin was its own environment that required some porting, or, at least, recompiling to get apps to work. The new Linux subsystem runs Linux binaries at something like full speed (to the extent that I've played with it).


I am using WSL on my new box, but also have Cygwin installed. Cygwin is night and day worse than WSL. But I have to have Cygwin installed to get CLion to work.

I look forward to the day when MingW and Cygwin can be replaced with the far nicer WSL alternative. It really is mostly seamless, and very fast.


I was running X11 apps (mostly xemacs) in Cygwin on Windows XP nearly a decade ago.


I wouldn't say there's an abstraction layer between the kernel an programs; my understanding is that it's in the kernel and no more an abstraction layer than Win32.


It uses the new Windows 10 Linux subsystem (WSL) to run your window manager of choice on a Windows port of the Xserver (pray for the soul of whoever ported that).

Then it neatly integrates that into the standard Windows login.


This is really awesome!


This seems totally pointless, but also quite cool :)

Xming/VcXsrv seem to be working pretty well for me and I get to keep my windows desktop.


I just wish you could do it the other way around from WSL. (LSW I guess) Windows executable inside the Linux kernel.


This is almost as useful as Dragon Linux on Windows nearly 20 years ago.


Looks pretty sweet, nice work!


Run your Tesla on a petrol engine.

Whatever is the bleedin' point?


Its just a fun little project. The idea is to make you question what it means to be a Linux desktop. Here we have very convincing (running authentic binaries!) Linux DEs, but there's no Linux.


What a great purpose! GNU/Windows indeed!


I see you've never worked at a place where every OS that's not approved by corporate IT gets kicked out of the network.


I'm willing to bet I'll have a better driver experience.


I really hope this pun was intentional, because it's phenomenal


Because being able to awesome electric engine and awesome petrol engine and the same time (and not having to choose between them) is awesome!


You have lots of gas but no power plug.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: