

InterviewSolution
1. |
Solve : X desktop on Windows 10 Ubuntu (VNC)? |
Answer» Just throwing this out... I have Windows 10 64 bit, and I have enabled Windows Subsystem for Linux (WSL). Great. Bash shell. So far so good. Wanting to push it further, I looked into getting an X desktop, which, I read, is somewhat difficult. I found I could install lightdm, LXDE, and Xvnc4, and now I can connect to WSL via a VNC viewer and get a big LXDE desktop. W00T, or so I thought. Trying to it it directly, (i.e. an Xterminal on Windows) I couldn't get xMing to work consistently without crashing, and vcxsrv just gives me a blank screen when I try to connect to Display :0 on localhost. Anyhow, the VNC sessions run about as briskly as (a) a Debian 8 Virtualbox VM on localhost (b) a VNC session into my Dell laptop running Debian 8. I have installed and run Geany, Tor Browser, Firefox 57, Deluge, lots more. However I read somewhere that using VNC this way is "bad". Is this because real 'nix men don't use VNC? Should I feel embarrassed that I am such a lamer? Please don't ask me to remember all the things I did to get this working!!! Whatever works for you is how I see it! And unless you have someone looking over your shoulder or share it with others would you be subject to someone saying its bad and real nix men dont do that etc. I have written some real Windows lash-ups, GUIs made of Autoit3 controlling bits of Python, VBScript, compiled FreeBasic and batch, which are for me only and do what I want. In Linux forums you get these snooty types who love to tell people they're doing it wrong. I can sometimes see where they are coming from, particularly over security, but sometimes it seems like they are kind of like preachers. Quote from: DaveLembke on December 16, 2017, 06:11:43 AM Only thing that would be bad to me is if by using an alternate method you open yourself up for a security hole in which your floating on the DMZ where your at risk of hackers etc, but behind a router with nothing open special for port forwarding etc, you should be fine unless riding on some other service that has a vulnerability that can operate over port 80 which i cant think of any. Yes. This has got to be the bottom line. I am used to using VNC over my home LAN and am confident I have got this buttoned up. This doesn't solve your original question about X on WSL, but this article DESCRIBES an alternative way to use both operating systems with virtualbox and a VMDK - virtual machine disk, which lets VirtualBox use a partition on your drive as a virtual disk. This means you can install Linux on another partition, and either boot into Linux or boot into Windows and run the same Linux installation from within virtualbox. https://www.howtoforge.com/tutorial/configuring-a-single-ubuntu-installation-as-a-dual-boot-option-and-a-virtualbox-appliance-under-windows-10/ It requires Intel VT-x or AMD-v be enabled in your BIOS to give virtualization software direct hardware access, but this improves performance (instead of reading from a file on your disk, it's reading directly from another partition). The most complicated part is creating a GRUB bootloader ISO that virtualbox can use to mimic your computer's actual boot config. The neat part is you can boot into Linux and do the same with your Windows 10 partition with Linux as the VB host, although games, video playback, and other direct video apps still require a native boot.I already have a VirtualBox virtual machine with Debian 8 installed, that works fine. I just wondered why my WSL X over VNC solution (which works fine too) was called "bad" by some people. Sure, it isn't as brisk as a pure Linux installation, but I'm not a gamer. I'd think it would be considered "bad" because of the GUI being part of the remote access, where the "Proper" way would be by using ssh directly. That is the main reason I can think of. There are "proper" ways of doing things but they usually take more time than a cobbled-together solution, which is really what it comes down to. As an example I posted some large screenshots from "Space Engine" recently, but the program itself doesn't actually support very high resolution screenshots at all. A "proper" solution would probably be to write a mod or plugin for the program adding high-res screenshots. But since I wasn't interested in the implementation and only the end result, I just used an autohotkey script- pressing F12 takes the foreground window, sets the window style to borderless, and makes it 7680x4320. Pressing it again reverses it. So I can take high-resolution screenshots by pressing F12, pressing F11 (the screenshot key) and then pressing F12 again to go back to how it was. It's not a "proper" solution but since I really just want the OUTPUT screenshots, it works well enough. Mind, when it comes down to actually programming something, well-commented and good structured code has never bitten me on the behind later, but confusing messes of poorly written code certainly have. I've lost count of the things in our old Mainframe codebase which were basically intended to be quick hacks and "done properly later" that were never done properly- though I cannot tell by the comments since somebody stripped all the code comments in 1994. Nothing l ike reverse engineering uncommented code from a forgotten dialect of BASIC to make you appreciate modern language features a bit more. Quote I've lost count of the things in our old Mainframe codebase which were basically intended to be quick hacks and "done properly later" that were never done properly- though I cannot tell by the comments since somebody stripped all the code comments in 1994. Nothing l ike reverse engineering uncommented code from a forgotten dialect of BASIC to make you appreciate modern language features a bit more. Why would someone strip comments?.... sounds almost malicious in someone knowing they will be getting booted from the job and I will show them by dumping comments so the next PERSON has to reverse engineer it. The big surprise after the original programmer is gone and to tell the next programmer and company to stuff it. Even in compiling code comments don't make a program larger in size to be a problem, its only larger in the uncompiled form such as a .BAS file vs a .EXE , or a script language that compiles on the fly such as .PL for Perl programs/scripts.Apparently they were a big believer in the concept of "SELF documenting code" but took it to the extreme of not only never writing comments themselves, but removing it from everything. I don't actually know the story of how it was handled at the time. I get the impression he was let go soon after, if not because of doing that then because of the attitude that made him think it was OK. There are a number of stories like that since the company dates from the 1980's. There was another guy who had some major beef about how things were run, so he quit, stole the entire codebase, and tried to directly compete. It was discovered when some of the customers he previously worked with called us and asked questions about "the demo X just gave us"... where X was the person who left a month or so ago. It's a rather funny story now because he was basically doing demos trying to sell "his product", and customers were calling us because he was literally their contact with us at the time and he apparently never mentioned he wasn't with us anymore. |
|