Linux Leo on windows

53 views
Skip to first unread message

Eric S. Johansson

unread,
Apr 20, 2017, 2:39:36 PM4/20/17
to leo-editor
Okay, the title was click bait. :-)

Running Leo on Windows has been frustratingly inefficient. For some reason, I keep breaking things, fixing things, and then breaking them again. I just got fed up. So this is what I am currently trying:

Installed bash on Windows 10 Creators update[1]. --> Instructions
Buy Xming[2] ---> Xming
add "export DISPLAY="localhost:0.0" to the end of .bashrc
test the X11 in connection by running some kind of X11 app like a terminal emulator or Emacs
update 
install python-qt4/5 and any other packages you may need[3]
Copy Leo from git repository
update path to include the leo git repository path
test Leo "python launchLeo.py"[4]

The only thing I would suggest is putting in a soft link to where ever in the Windows file system you want to store your code. The reason I do this is because when I backup, I backup from the window side. However, having said, depending on how well bash in windows works, I may backup my Windows file system from the bash environment.

For me, a big problem is finding stuff that works well with speech recognition. In this case, it's kind of - sort of ok. I'm having problems with Xming but it probably won't interfere with the rest of you.

[1] I highly recommend installing the creators update because then the bash on Windows environment is based on 16.04.
[2] the free version may work. I went for the paid version because I felt it was important to support the project.
[3] for example, I installed the gnome-terminal just because I like it better
[4] yes I'm still using Python 2.7 because I was getting a plug in error with Python 3. Didn't bother to chase down, I just wanted something that worked.

john lunzer

unread,
Apr 20, 2017, 4:17:24 PM4/20/17
to leo-editor
What is the value in running the "linux version" of Leo in windows with emulated X11 server?

An easy way to get going on Windows is by installing anaconda. It will install everything you need to run Leo from the anaconda command prompt. If you're worried about how bloaty anaconda is you can install miniconda and then install PyQt manually from the conda package manager. 

I don't understand what benefit there could be to running it non-natively.

Edward K. Ream

unread,
Apr 20, 2017, 6:20:15 PM4/20/17
to leo-editor
On Thu, Apr 20, 2017 at 3:17 PM, john lunzer <lun...@gmail.com> wrote:
What is the value in running the "linux version" of Leo in windows with emulated X11 server?

An easy way to get going on Windows is by installing anaconda. It will install everything you need to run Leo from the anaconda command prompt. If you're worried about how bloaty anaconda is you can install miniconda and then install PyQt manually from the conda package manager. 

I don't understand what benefit there could be to running it non-natively.

​Neither do I.  Leo runs extremely well on Windows.

Edward

Eric S. Johansson

unread,
Apr 21, 2017, 9:49:00 AM4/21/17
to leo-editor


On Thursday, April 20, 2017 at 6:20:15 PM UTC-4, Edward K. Ream wrote:
I don't understand what benefit there could be to running it non-natively.

​Neither do I.  Leo runs extremely well on Windows.

 This experiment was motivated by a couple things. First, I have broken remnants of Leo all over my Windows environment. For some reason, I just can't get the complete environment to work and stay working. I was trying to see if this hybrid environment would be more stable. I've discovered that it's not so I'm going to try again this morning with Windows but, it's not fun. Second, I use Windows to run speech recognition, a browser and now, Leo. All of my "real work" takes place on Linux. My workflow is edit in Leo, rsync to one of a few linux boxes, install my changes, and test. 

In order to implement my workflow, three quarters of the time, I need to run something like cygwin or bash on Windows so I have an environment where I can easily automate much of my workflow and take a load off of my hands. I tried using Windows native equivalent tools but they don't automate well or there is such a huge mismatch between the Windows environment and the tool's UNIX roots that my working environment becomes even more fragile and easily broken. The remaining fraction of the time I'm running X11 applications displaying on my Windows box because my work is taking place on a linux machine somewhere

This is not a leo issue. It comes from my frustration with being disabled and having to count on accessibility tool made by a company that gives a big middle finger to disabled users.  I'm not happy with how things work with speech recognition I'm not accepting the limitations the accessibility environment places on me because I know it can be much better.  I don't want my tools to further damage my hands and increase my pain level. Part of the way I'm trying to accomplish this is through Leo plug-ins. I'm picking away at understanding how to write Leo plug-ins so I can try and automate some of my workflow within Leo as well as add some accessibility specific features.

Rough analogy, if the task was building a road, you guys can just use existing tools and start construction. Me, I have to go harvest the iron ore to make the metal parts to assemble into machines before I can start building the road. And lately, to continue the analogy, it seems like every time I harvest ore, the mine keeps collapsing.

So now I'm going to go to turn my attention to cleaning up the Leo fragments in my Windows environment and try again with Anaconda.





Eric S. Johansson

unread,
Apr 21, 2017, 10:33:13 AM4/21/17
to leo-editor


On Thursday, April 20, 2017 at 4:17:24 PM UTC-4, john lunzer wrote:
An easy way to get going on Windows is by installing anaconda. It will install everything you need to run Leo from the anaconda command prompt. If you're worried about how bloaty anaconda is you can install miniconda and then install PyQt manually from the conda package manager. 



The mine collapsed again. I installed miniconda, tried to run Anaconda prompt from the menu and I got…

Malwarebytes

-Log Details-
Protection Event Date: 4/21/17
Protection Event Time: 10:22 AM
Logfile: 
Administrator: Yes

-Software Information-
Version: 3.0.6.1469
Components Version: 1.0.103
Update Package Version: 1.0.1775
License: Trial

-System Information-
OS: Windows 10
CPU: x64
File System: NTFS
User: System

-Exploit Details-
File: 0
(No malicious items detected)

Exploit: 1
Malware.Exploit.Agent.Generic, , Blocked, [0], [-1],0.0.0

-Exploit Data-
Affected Application: cmd
Protection Layer: Application Behavior Protection
Protection Technique: Exploit payload process blocked
File Name: C:\WINDOWS\system32\cmd.exe C:\WINDOWS\system32\cmd.exe \S \D \c CALL ECHO C:\ProgramData\Miniconda3
URL: 



(end) 

john lunzer

unread,
Apr 21, 2017, 10:45:26 AM4/21/17
to leo-editor
Unless your download was compromised or not downloaded from the official miniconda site I'm highly doubtful that the Continuum folks would have let any exploits into their software. Make sure you're hitting the official site and if you must, do a checksum/MD5 on the file you downloaded. 

There is certainly always the possibility that something malicious slipped through or both continuum sites were hacked but I think the odds of that are small.

Beyond that I'd do a search for Anaconda/Miniconda and malwarebytes or just whitelist Miniconda/python. 

Eric S. Johansson

unread,
Apr 21, 2017, 10:51:54 AM4/21/17
to leo-editor


On Friday, April 21, 2017 at 10:45:26 AM UTC-4, john lunzer wrote:
Unless your download was compromised or not downloaded from the official miniconda site I'm highly doubtful that the Continuum folks would have let any exploits into their software. Make sure you're hitting the official site and if you must, do a checksum/MD5 on the file you downloaded. 

There is certainly always the possibility that something malicious slipped through or both continuum sites were hacked but I think the odds of that are small.

Beyond that I'd do a search for Anaconda/Miniconda and malwarebytes or just whitelist Miniconda/python. 

Oh yes, I've done all that (official site, checksum etc.) additionally, I have scanned for potential viruses etc. if I run conda from the command prompt, it's fine but I can't run it from the Windows start menu. I mostly chronicling the hurdles I have to jump through to get anything to work.

Now installing PY QT and will see if I can get basic Leo and then the various linting tools to work.

john lunzer

unread,
Apr 21, 2017, 10:55:29 AM4/21/17
to leo-editor
don't forget you simply need to do run the command: "conda install pyqt"

john lunzer

unread,
Apr 21, 2017, 11:04:30 AM4/21/17
to leo-editor
Out of curiosity, and you can tell me to buzz off (I won't be offended, because I know I will have offended you), what is your disability and to what extent are you able to individually use your hands, feet, and eyes?

I ask because I don't have any physical disabilities but I still think the human/computer interface can always be improved. Personally I bind myself to windows for one reason only, Autohotkey. It is without doubt the best tools available for keyboard customization.

Some thoughts. I had never heard of these but roller mice look like an amazing option for people with hand troubles. I haven't bought this but the reviews are amazing.

Foot pedals can be used to replace some keyboard functionality, taking the load of of hands and arms. I haven't bought this but it looked the most promising in my research (also has the max pedals I've seen which is 4).

There is also some promising looking (but still young) eye tracking mouse technology. I think there are more recent models than in that article, but that article has a video which demonstrates.

Between eye tracking and foot pedals you could replace the mouse completely (instead of using the roller mouse option). After that you'd still be at the mercy of the speech recognition for the rest of the keyboard. 

Anyway, just curious and hopefully technology keeps improving to mitigate your disability.

Eric S. Johansson

unread,
Apr 21, 2017, 11:13:02 AM4/21/17
to leo-editor


On Friday, April 21, 2017 at 10:55:29 AM UTC-4, john lunzer wrote:
don't forget you simply need to do run the command: "conda install pyqt"

I eventually figured that out. ;-)

Now I'm trying to figure out how to enable pyflakes. I have it installed and I thought I saw it was possible to run it from Leo but I may be wishful thinking.

Eric S. Johansson

unread,
Apr 21, 2017, 11:36:20 AM4/21/17
to leo-editor


On Friday, April 21, 2017 at 11:04:30 AM UTC-4, john lunzer wrote:
Out of curiosity, and you can tell me to buzz off (I won't be offended, because I know I will have offended you), what is your disability and to what extent are you able to individually use your hands, feet, and eyes?

It really takes a lot to offend me and I have no problems telling people (politely) when they have offended me. You have nothing to worry about.
 

I ask because I don't have any physical disabilities but I still think the human/computer interface can always be improved. Personally I bind myself to windows for one reason only, Autohotkey. It is without doubt the best tools available for keyboard customization. 

Some thoughts. I had never heard of these but roller mice look like an amazing option for people with hand troubles. I haven't bought this but the reviews are amazing.

Yes the roller mice are amazing but only if you use a traditional keyboard/desktop environment. I'm always on a laptop and it's probably just my clumsiness but really count on wireless mice and headsets. Back when I was using a wired headset, a replace it about every 3 to 6 months because I was always rolling over the cord with my chair. At 150 bucks a pop, that gets expensive really fast. A $200 wireless headset is so much more convenient especially when you take a bio break and are reminded to take your headset off about 6 feet from the computer.
 

Foot pedals can be used to replace some keyboard functionality, taking the load of of hands and arms. I haven't bought this but it looked the most promising in my research (also has the max pedals I've seen which is 4).

I'm never try foot pedals. Among the other Crips, some people love them, other people hate them.


There is also some promising looking (but still young) eye tracking mouse technology. I think there are more recent models than in that article, but that article has a video which demonstrates.

I think the eye tracking mouse technology is very impressive. I'm looking forward to when it becomes a work tool, and not a science project. 

Between eye tracking and foot pedals you could replace the mouse completely (instead of using the roller mouse option). After that you'd still be at the mercy of the speech recognition for the rest of the keyboard. 

And right there, you just express the classic misunderstanding about speech recognition. It is not a replacement for the keyboard. It's a totally different interface. You don't spell out the letters. You don't try to smooth the shift key by voice. You want to say short phrases that mean something in the context of the application. For example, you should be able to say "leave Mark, move down 10, indent right" or, in a programming context, "add argument to this method, no, third argument".

As an aside, I've often thought that no would be a great modifier for speech recognition commands. It would mean you did the last command wrong, put yourself back in that context and interpret the next command in that context.
 

Anyway, just curious and hopefully technology keeps improving to mitigate your disability.

We have the technology to make much better accessibility interfaces than we do. There are three impediments to these improvements. First, the lack of acknowledgment that a GUI interface is not the place to put in accessibility. By the time you reach the GUI, you've lost much of the meta-information necessary to make a proper accessibility interface. Second, misunderstandings like yours that make it difficult for people with hands and eyes to be able to think about interfaces that don't use hands or eyes. In the third is the arrogance that lets developers justify making accessibility impossible because "there aren't that many disabled people using our product". To which I say politely "wait until you age". Internally I'm saying something closer to "F-U A-H, who the hell are you to decide whether or not I can use the same online services/tools/whatever you do just because my hands don't work." 

I am an advocate for not letting most developers create accessibility interface because they don't do the right thing. In a nutshell, we need the ability to build our own interface through an API that lets you access have read or write access to any of the internal state for data. 

If you want to get a feel for experiencing a different type of interface, I sometimes suggest to people that they should wear a blindfold or heavy gloves when they work. The gloves will give you the clumsiness that I experience and may help you with some insight into the challenges I face. I have an figure out a nondestructive way of letting you experience the pain but then again, I'm not sure I want you to experience the pain.

 --- eric

john lunzer

unread,
Apr 21, 2017, 12:04:32 PM4/21/17
to leo-editor
Sorry there is such a gap in understanding. You're absolutely right, I have no clue what the day to day of a disabled person using a computer looks like. I think you've helped me understand a little bit, but this "speech recognition interface" is still a nebulous concept, what software do you use?

What you say about "building your own accessibility UI". It would be a huge personal project and I'm not entirely sure it's up to the task but I will reiterate, AutoHotKey is the most powerful scripting language available with direct access to lower and higher levels of the HID (human interface device, such as keyboard and mouse). It is well before the GUI. It also has the facilities to tailor commands and configurations on a per application level. If you look on their forums people use AutoHotKey for all types of automation. My opinion is that if you're using Windows but not using AutoHotKey for anything then there is at least one thing you're doing that could be made a lot easier.

You might not get the ability to build a full accessibility layer but it might offer you the ability smooth out a few bumps. I'm sort of shooting from the hip, I haven't tried this. So again, if my ignorance is showing, I apologize. 

Eric S. Johansson

unread,
Apr 21, 2017, 1:03:42 PM4/21/17
to leo-editor


On Friday, April 21, 2017 at 12:04:32 PM UTC-4, john lunzer wrote:
Sorry there is such a gap in understanding. You're absolutely right, I have no clue what the day to day of a disabled person using a computer looks like. I think you've helped me understand a little bit, but this "speech recognition interface" is still a nebulous concept, what software do you use?

I use a combination of NaturallySpeaking and a community maintained toolkit called vocola. Vocola takes a grammar and assigns an action to that grammar. For example I have a grammar which allows me to create a variety of timestamps.

( date | time | log | job | 24 ) stamp = stamp.string($1);

Called an extension to take the variable part of the grammar and create the appropriate time date stamp. Examples, in order of the grammar are

Apr 21, 2017
12:52
21-Apr-2017 esj: 
time 21-Apr-2017 12:52 
12:52
 
What you say about "building your own accessibility UI". It would be a huge personal project and I'm not entirely sure it's up to the task but I will reiterate, AutoHotKey is the most powerful scripting language available with direct access to lower and higher levels of the HID (human interface device, such as keyboard and mouse). It is well before the GUI. It also has the facilities to tailor commands and configurations on a per application level. If you look on their forums people use AutoHotKey for all types of automation. My opinion is that if you're using Windows but not using AutoHotKey for anything then there is at least one thing you're doing that could be made a lot easier.

You might not get the ability to build a full accessibility layer but it might offer you the ability smooth out a few bumps. I'm sort of shooting from the hip, I haven't tried this. So again, if my ignorance is showing, I apologize. 

No problem. If you don't mind, I may contact you directly with a "this is what I'm trying to do" query if I think auto key might work. Right now I'm going back to figuring out how to turn on pyflakes in leo


john lunzer

unread,
Apr 21, 2017, 1:24:26 PM4/21/17
to leo-editor
Vocola's syntax is very straight forward and reminds me a bit of AutoHotKey, it looks like your'e already using the right tool for the job. I think what I would say is that if you ever felt like Vocola didn't have enough granularity you could probably combine AutoHotKey with Vocola to do something a little more advanced. 

I know Leo can do Pyflakes now but I haven't used it myself (I should be), if you can't find anything about it in the documentation or by searching the forums. Maybe wait for Edward to chime in or start a new thread if you can't get his attention here.
Reply all
Reply to author
Forward
0 new messages