Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: Getting Started with Windows 10 Linux BASH cmd line interface

  1. #1
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,701

    Getting Started with Windows 10 Linux BASH cmd line interface

    I'm a windows 10 user and just hooked up the new Linux BASH cmd line interface in the Win 10 Anniversary update. I was hoping to follow the "Getting Started with MicroPython on the Teensy" as a first step to having seeing how useful it can be.

    Note: This is command line only, there is no GUI option (IIRC GUI was hacked on before release, didn't look to see if that still works):
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.5 LTS
    Release: 14.04
    Codename: trusty
    I'm just finding my way around. For the micropython build these command line steps are working AFAIK!:
    sudo apt-get install git
    sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
    sudo apt-get update
    sudo apt-get install gcc-arm-embedded
    git clone https://github.com/micropython/micropython.git
    I found my way to the downloaded and extracted arduino-1.6.11-linux64.tar.xz:
    /mnt/i/DOWNLOADS/arduino-1.6.11
    I see the install.sh there - what are the words to install the right way to the right place?
    <edit>It seems all the resources I found are either GUI based, different distributions, or just assume 'install' is an understood process. <all of which failed me trying to do this on a rPi>.

    The same will apply to TeensyduinoInstall.linux64 - I'm not sure if that will work with no UI? Then of course "https://www.pjrc.com/teensy/49-teensy.rules" [though I accidentally started as root and didn't make a user yet]

    And for TYQT if this runs on Linux too?: TyQt-0.7.5-204-g33f592f-osx.dmg I suppose I'll want to have that to try it's command line bootloader.

    Without a UI I won't be able to run Arduino IDE on this 'Ubuntu Instance" [maybe get a makefile build working] - but I'm hoping I'll be able to build things like this and then get them pushed around as needed. Without having to deal with installing a full Linux GUI.

    Any steps/help to see this work might open up a whole new world for Windows 10 users like myself - which was Microsoft's goal in this.
    Last edited by defragster; 09-18-2016 at 10:55 PM.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,701
    Somehow this is working to open FIREFOX and GVIM and gedit in GUI app windows?

    Doesn't help me install Arduino or TeensyDuino or TYQT yet?

    how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/

    Step One: Install an X Server
    >> we recommend Xming
    sudo apt-get install vim-gtk
    sudo apt-get install firefox
    export DISPLAY=:0
    gvim
    firefox
    apt-get install gedit
    gedit
    I of course hit other web pages and did other things? I'm not sure if any of them were part of making this work? This one is suspected of helping? but I just opened a fresh BASH - I think this is for NET usage and I don't seem to have an IP to use?::
    sudo apt-get install xvfb
    Xvfb :0 -screen 0 1920x1080x24 +extension GLX -nolisten tcp -dpi 96

  3. #3
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Why tinker ? Just use a VM, for example virtual box, and you'll have a perfectly running Ubuntu in 30 minutes..

  4. #4
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    Quote Originally Posted by defragster View Post
    Somehow this is working to open FIREFOX and GVIM and gedit in GUI app windows?

    Doesn't help me install Arduino or TeensyDuino or TYQT yet?

    how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/



    I of course hit other web pages and did other things? I'm not sure if any of them were part of making this work? This one is suspected of helping? but I just opened a fresh BASH - I think this is for NET usage and I don't seem to have an IP to use?::
    There are two separate things going on here .... using X11's networking capability, and using a soft framebuffer and vnc.

    It seems a virtual machine would be a better option (you will have to tinker otherwise!!) ...

    I have used Xming on Windows and it works really well, so if the windows Ubuntu subsystem is going to support all the functionality you need for the Linux software you want to run, then that route should work A oK....

    the fb and vnc route sounds dumb to me. It will probably work. My experience with Linux framebuffers has been good and bad (and 10 years ago!!)

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,701
    Question: > WHere did this go? :: git clone https://github.com/Koromix/ty.git

    I learned a couple of things - as I tinker:
    > With Xming server active I can open FIREFOX and browse, and run xclock,xcalc etc. [after : apt-get install x11-apps] - and xwininfo recognizes when you click X windows.
    > TYQT installer isn't built for Linux, it is self built, Koromix says there is a README about that ...
    > To do a PING YAHOO.COM - the BASH has to be opened as ADMINISTRATOR, or you get:ping: icmp open socket: Permission denied
    > Running ./TeensyduinoInstall.linux64 fails - even after 'UNBLOCK app' and "CHMOD 755": gives: ./TeensyduinoInstall.linux64: cannot execute binary file: Exec format error (same with 2nd download and the .32bit)
    > Doing /mnt/i/DOWNLOADS/arduino-1.6.11# ./arduino results in :: Picked up JAVA_TOOL_OPTIONS:
    > With java -showversion I get: java version "1.7.0_111"
    > In usr/bin I see a versions of :PYTHON, RUBY, PERL
    > This is a full running _BETA_ binary of Canonical Linux. Currently 14.04 - supposed to be going to 16.?? as released. MSFT maps the Linux systems calls to Windows - the opposite of WINE.
    > All windows drives are present in BASH as /mnt/?
    > Each user gets a copy of BASH that is visible under: C:\Users\USERNAME\AppData\Local\lxss

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,422
    When I download Teensyduino for Linux I often have to mark the file as executable.

    Chmod +x tee...

  7. #7
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    If teensyduino relies on anything in the "Linux install" that has not been nativised to a windows call by the subsystem, you will be shit out of luck. maybe that is what you are seeing? As you say .... "MSFT maps the Linux systems calls to Windows". If there is a missing call (because most but not all are implemented according to the interweb) then you will get a 'failure to fly ...?!

    Given the complexity of the java stuff, maybe its not a surprise that it don't run?

    the compiler might be a problem to run using windows calls???
    Last edited by adrian; 09-21-2016 at 02:45 AM.

  8. #8
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    it runs nice on a rpi 'desktop' environment, and you can xming it over your lan from there I do that 'all the time'. I think Kurt E has done a similar thing ...chmod 755 should work?? that is everyone execute isn't it ???

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,701
    I did a drive search and I don't see where the git repository for TY went so I can test making it? May not have functional hardware access - but knowing it built would be a start to knowing it was close to ready.

    After Windows_Unblock on the downloaded .exe - I did chmod both ways - the 755 is from PJRC web. Paul uses a cross build helper - it may use some obscure calls not yet supported.

    Xming is useful on Win BASH. I did a quick setup before on my headless rpi_0 and had vncserver working. But wouldn't bother trying to build on that. The rpi_3 hasn't been powered yet since it came just before K66 beta.

    I came across a year old i5 box with 12GB RAM with a dead HDD - I have a fresh HDD and a CD of Ubunutu 16.04 I could put on that or in a VM - but was more anxious to see how close the Win BASH was. It is marked BETA - not sure when the next release toward non-Beta is.

  10. #10
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    Quote Originally Posted by defragster View Post
    I did a drive search and I don't see where the git repository for TY went so I can test making it? May not have functional hardware access - but knowing it built would be a start to knowing it was close to ready.

    After Windows_Unblock on the downloaded .exe - I did chmod both ways - the 755 is from PJRC web. Paul uses a cross build helper - it may use some obscure calls not yet supported.

    Xming is useful on Win BASH. I did a quick setup before on my headless rpi_0 and had vncserver working. But wouldn't bother trying to build on that. The rpi_3 hasn't been powered yet since it came just before K66 beta.

    I came across a year old i5 box with 12GB RAM with a dead HDD - I have a fresh HDD and a CD of Ubunutu 16.04 I could put on that or in a VM - but was more anxious to see how close the Win BASH was. It is marked BETA - not sure when the next release toward non-Beta is.
    yes it is beta and not a complete implementation of every call, according to the interweb....

    I use a rpi 2 headless, running raspberian and their lightdm display manager ... its rigged to use xdmcp, which is not secure, but it is on my own network behind a firewall (obviously Xming is configured for xdmcp as well!), and I use putty for tunnelling, from memory ... the setup just works and I did it ages ago, but I think that is the basics

    Although xdmcp is bandwidth intensive, I suspect it is lighter in other respects as compared to vnc. Compiling using the arduino ide under the above setup was not really that slow, although I only did a couple of very small sketches to see if it worked!!!

    Tinker on!

    I found this about xdmcp ... it even has a bit about using xming with it! totally all sorted!

    maybe if the windows bash shell could run x11 and light dm, you would have a really good way to have a Linux "desktop", using xdmcp ... works flawlessly with rpi and my windows boxes.

    Although it sounds like the arduino ide is not happy in the windows shell...
    Last edited by adrian; 09-21-2016 at 09:07 PM.

  11. #11
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,701
    Interesting - a lot to discover. Oh BTW - using Windows Remote Desktop I reported that the TeensyInstaller failed to show graphic elements during the final copy phase - obviously the PJRC dev tool in use works natively - but even Remote Desktop doesn't have all the used elements mapped/trapped.

    Given the number of Windows users if this worked it might be nice. Still has all the complexity/difference of using Ubuntu - and added issues of beta level support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •