Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: X desktop on Windows 10 Ubuntu (VNC)  (Read 1461 times)

0 Members and 1 Guest are viewing this topic.

Salmon Trout

    Topic Starter


    Genius

    Thanked: 931
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
X desktop on Windows 10 Ubuntu (VNC)
« on: December 16, 2017, 04:05:15 AM »
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!!!

Click to zoom:



« Last Edit: December 16, 2017, 04:32:11 AM by Salmon Trout »

DaveLembke



    Sage
  • Inventor of the Magna-Broom 3000 =)
  • Thanked: 610
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: X desktop on Windows 10 Ubuntu (VNC)
« Reply #1 on: December 16, 2017, 06:11:43 AM »
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 assembled some real Rube Goldberg global award winning projects myself with stuff that people would deem "BAD" ... not Bad in a sense of illegal in any way but if i can get to a solution with 5 minutes of code that gets the job done, I will generally go that route when the end product is for myself vs put many hours into programming and researching and learning the "Proper Way" to do things, with both methods doing exactly the same thing or getting the same end result that I need.  ;D 

For me its usually C++ or Perl and use of system calls to automate some process, sometimes a mix of both languages to take advantage of some features that Perl has that are quick to code that C++ is more involved in doing yet I want it as an EXE and not a .PL to run etc as well as I have a automation macro creator program that I own called Jitbit Macro Recorder ( https://www.jitbit.com/macro-recorder/ ) that I will record keyboard and mouse information and then edit it, or add instructions in the easy to program instruction list, or compile it as-is as an EXE to be called by C++ in a system call or .PL in a system call and all combined it does exactly what I need, BUT its a real Rube Goldberg method of achieving what I want generally and a lot less time than coding it all in C++ for example to parse info off the web etc in which I have found C# to be much better with and taken a liking too, but even with C# I mix what I know to get the job done, BUT... to "Real Programmers" vs "Hobbyist Programmers" it can be nails to a chalk board for them to follow and look at with what I did to get what i needed.  ;D ::)

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.

I used this tool linked here Secunia PSI a few years ago to keep certain systems as up to date as possible to avoid vulnerabilities with software etc: https://www.techspot.com/downloads/4898-secunia-personal-software-inspector-psi.html

It was neat in that I had been using older versions of software and tools unaware of security vulnerabilities and  it pointed out when Adobe was out of date and other programs out of date and newer version as well as exploit info etc to assess the risk to update or remain on an older version such as for a software that was once free for home use under an older version but latest version is not just a 30 day trial in which I remain on the older free edition of whatever it was because I don't use it often enough to be worth while to buy it and the risk is very low so I will ignore updating that specific piece of software etc.

Lastly slightly off subject but in relation to the Jitbit software, I bought that Jitbit Macro Recorder software back in 2006 and ran into an issue with it 9 months ago on a Windows 7 machine in which my key given to me back in 2006 wasnt working on the newest version of their software which had a bug correction that i needed because I was hitting the bug with the older version on Windows 7. They have a lifetime license for it ( free updates ) and so a guy named Vlad contacted me back by e-mail after I copy pasted my original purchase e-mail to him to show proof of legal license ownership, since I save copies of all web purchased software invoices as proof of ownership, and he issued me a new key for the latest version that had the bug fix in it.  :)

Salmon Trout

    Topic Starter


    Genius

    Thanked: 931
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Other
Re: X desktop on Windows 10 Ubuntu (VNC)
« Reply #2 on: December 16, 2017, 08:01:04 AM »
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.

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.


nil

  • Global Moderator


  • Beginner

    Thanked: 4
    • Experience: Experienced
    • OS: Linux variant
    Re: X desktop on Windows 10 Ubuntu (VNC)
    « Reply #3 on: December 17, 2017, 09:55:19 AM »
    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.

    Salmon Trout

      Topic Starter


      Genius

      Thanked: 931
      • Yes
    • Computer: Specs
    • Experience: Experienced
    • OS: Other
    Re: X desktop on Windows 10 Ubuntu (VNC)
    « Reply #4 on: December 17, 2017, 01:11:15 PM »
    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.

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1087
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 8
    Re: X desktop on Windows 10 Ubuntu (VNC)
    « Reply #5 on: December 17, 2017, 05:11:08 PM »
    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.


    I was trying to dereference Null Pointers before it was cool.

    DaveLembke



      Sage
    • Inventor of the Magna-Broom 3000 =)
    • Thanked: 610
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: X desktop on Windows 10 Ubuntu (VNC)
    « Reply #6 on: December 18, 2017, 12:10:39 PM »
    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.  ;D

    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.

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1087
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 8
    Re: X desktop on Windows 10 Ubuntu (VNC)
    « Reply #7 on: December 18, 2017, 01:04:20 PM »
    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.
    I was trying to dereference Null Pointers before it was cool.