<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2022-06-27T19:42:53+00:00</updated><id>/feed.xml</id><title type="html">Ivan’s Solutions</title><subtitle>IT, R, Data science, and Bioinformatics. 
</subtitle><author><name>Ivan Grishagin</name></author><entry><title type="html">Neo4j Websocket Connection Failure</title><link href="/neo4j/2022/03/29/neo4j-websocket-issue.html" rel="alternate" type="text/html" title="Neo4j Websocket Connection Failure" /><published>2022-03-29T00:00:00+00:00</published><updated>2022-03-29T00:00:00+00:00</updated><id>/neo4j/2022/03/29/neo4j-websocket-issue</id><content type="html" xml:base="/neo4j/2022/03/29/neo4j-websocket-issue.html">&lt;h5 id=&quot;from-github-windows-terminal-issue-5420github-5420-github-windows-terminal-issue-5256github-5256&quot;&gt;*from [GitHub: Windows Terminal Issue 5420][github-5420], [GitHub: Windows Terminal Issue 5256][github-5256]&lt;/h5&gt;

&lt;h2 id=&quot;synopsis&quot;&gt;Synopsis&lt;/h2&gt;
&lt;p&gt;Upon pressing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Connect&lt;/code&gt; in the Neo4j web interface, the following message is displayed:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: 3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Multiple solutions are proposed by the Neo4j team and elsewhere usually involve manipulating configuration files. Solutions presented below have not been mentioned anywhere.&lt;/p&gt;

&lt;h2 id=&quot;possible-solutions&quot;&gt;Possible Solutions&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Bad cookies.&lt;br /&gt;
 Try connecting to the database in the incognito mode, and if that works, clear the site for the domain.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Expired TLS certificate.&lt;br /&gt;
 Neo4j has a separate directory for the the TLS certificates, and they have to be identical to the ones issued for the domain.&lt;br /&gt;
 Unlike in previous versions, in Neo4j 4+ runs as a service, and its files and directories are decentralized.&lt;br /&gt;
 Certificates to be updated are in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/lib/neo4j/certificates&lt;/code&gt;&lt;br /&gt;
 For &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;letsencrypt&lt;/code&gt;, you can use the following script (replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YOUR-DOMAIN-NAME&lt;/code&gt; and inspect the paths for correctness):&lt;/p&gt;
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; &lt;span class=&quot;c&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;

 &lt;span class=&quot;nv&quot;&gt;pkeysrc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/etc/letsencrypt/live/YOUR-DOMAIN-NAME/privkey.pem&quot;&lt;/span&gt;
 &lt;span class=&quot;nv&quot;&gt;certsrc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/etc/letsencrypt/live/YOUR-DOMAIN-NAME/fullchain.pem&quot;&lt;/span&gt;
 &lt;span class=&quot;nv&quot;&gt;pkeydst&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/var/lib/neo4j/certificates/neo4j.key&quot;&lt;/span&gt;
 &lt;span class=&quot;nv&quot;&gt;certdst&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/var/lib/neo4j/certificates/neo4j.cert&quot;&lt;/span&gt;

 update&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
     &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;updating certificates...&quot;&lt;/span&gt;
     &lt;span class=&quot;nb&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$pkeysrc&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$pkeydst&lt;/span&gt;
     &lt;span class=&quot;nb&quot;&gt;cp&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$certsrc&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$certdst&lt;/span&gt;
     systemctl restart neo4j
 &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

 diff &lt;span class=&quot;nv&quot;&gt;$pkeysrc&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$pkeydst&lt;/span&gt; 2&amp;gt;&amp;amp;1 &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; /dev/null &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;additional-considerations&quot;&gt;Additional Considerations&lt;/h2&gt;
&lt;p&gt;Access to cypher shell may be hampered as well. A default &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cypher-shell&lt;/code&gt; command may yield this:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Connection to the database terminated. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is because Neo4j 4+ handles the encryption information differently (and more strictly) compared to the previous versions. To launch cypher shell for an Neo4j app running with encryption, one has to specify the &lt;a href=&quot;https://neo4j.com/docs/java-manual/current/client-applications/#java-driver-configuration-examples&quot;&gt;URI scheme&lt;/a&gt;, the application address, and the correct &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bolt&lt;/code&gt; port.&lt;br /&gt;
There are two possible options:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;The advertised address (secured with full certificate):
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; cypher-shell &lt;span class=&quot;nt&quot;&gt;-a&lt;/span&gt; neo4j+s//:YOUR-DOMAIN-NAME:7687
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Localhost (secured with self-signed certificate):
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; cypher-shell &lt;span class=&quot;nt&quot;&gt;-a&lt;/span&gt; neo4j+ssc//:localhost:7687
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="neo4j" /><category term="neo4j" /><category term="websocket" /><category term="cypher-shell" /><summary type="html">*from [GitHub: Windows Terminal Issue 5420][github-5420], [GitHub: Windows Terminal Issue 5256][github-5256]</summary></entry><entry><title type="html">How to Enable Call Recording in LineageOS</title><link href="/call/recording/lineageos/android/2022/02/18/enable-call-recording-lineageos.html" rel="alternate" type="text/html" title="How to Enable Call Recording in LineageOS" /><published>2022-02-18T00:00:00+00:00</published><updated>2022-02-18T00:00:00+00:00</updated><id>/call/recording/lineageos/android/2022/02/18/enable-call-recording-lineageos</id><content type="html" xml:base="/call/recording/lineageos/android/2022/02/18/enable-call-recording-lineageos.html">&lt;h5 id=&quot;from-xda-developers-and-stackexchange&quot;&gt;*from &lt;a href=&quot;https://forum.xda-developers.com/t/how-to-enable-native-call-recorder.3996233/?__cf_chl_tk=rcGcnnP.ylXpSqCBr0CZn3TponlXbGTV3T0erTEMceM-1645130498-0-gaNycGzNCJE&quot;&gt;XDA developers&lt;/a&gt; and &lt;a href=&quot;https://android.stackexchange.com/questions/162902/adb-push-not-working-on-system-read-only&quot;&gt;Stackexchange&lt;/a&gt;&lt;/h5&gt;

&lt;h2 id=&quot;environment&quot;&gt;Environment&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;ADB&lt;/li&gt;
  &lt;li&gt;LineageOS 18.1&lt;/li&gt;
  &lt;li&gt;Windows 11&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://forum.xda-developers.com/android/software-hacking/tool-apk-easy-tool-v1-02-windows-gui-t3333960&quot;&gt;Easy APK Tool&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;instructions&quot;&gt;Instructions&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;Connect the phone to a PC with a USB cable.&lt;/li&gt;
  &lt;li&gt;Navigate to a directory with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;adb.exe&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Right click, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PowerShell&lt;/code&gt; -&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Open here&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;In the shell, execute:
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; &lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /system/product/priv-app/Dialer
 &lt;span class=&quot;nb&quot;&gt;cp &lt;/span&gt;Dialer.apk /storage/self/primary/Documents
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;On your phone, go to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Documents&lt;/code&gt; folder, and move the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer.apk&lt;/code&gt; to your PC via email or IM.&lt;/li&gt;
  &lt;li&gt;Decompile &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer.apk&lt;/code&gt; using Easy APK Tool.&lt;/li&gt;
  &lt;li&gt;Navigate to the corresponding decompiled &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer&lt;/code&gt; folder, and there into subdirectory &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;res/xml&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;call_record_states.xml&lt;/code&gt; in a text editor and replace all &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;false&lt;/code&gt; strings with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;true&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer&lt;/code&gt; folder, navigate into the subdirectory &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;res/values&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;styles.xml&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Line #25 is a duplicate, delete it:
    &lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;item&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;android:textColorPrimary&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;@color/dialer_primary_text_color&lt;span class=&quot;nt&quot;&gt;&amp;lt;/item&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Using Easy APK Tool, recompile the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer&lt;/code&gt; folder into a new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer.apk&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Upload the new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dialer.apk&lt;/code&gt; to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Documents&lt;/code&gt; folder on your phone.&lt;/li&gt;
  &lt;li&gt;Reconnect the phone to a PC.&lt;/li&gt;
  &lt;li&gt;In the same PowerShell, run:
    &lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;adb&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adb&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;remount&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;adb&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;shell&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;In the shell, execute:
    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;mv&lt;/span&gt; /storage/self/primary/Documents/Dialer.apk /system/product/priv-app/Dialer
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /system/product/priv-app/Dialer
&lt;span class=&quot;nb&quot;&gt;chmod &lt;/span&gt;644 Dialer.apk
&lt;span class=&quot;nb&quot;&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Reboot:
    &lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;adb&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;reboot&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;When you start a call, a new button with a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Record&lt;/code&gt; symbol will appear in the Dialer UI.&lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="call" /><category term="recording" /><category term="lineageos" /><category term="android" /><category term="lineageos" /><category term="android" /><summary type="html">*from XDA developers and Stackexchange</summary></entry><entry><title type="html">WSL2: Temporary Failure in Name Resolution</title><link href="/wsl2/dns/ubuntu/2021/11/22/wsl2-temporary-failure-name-resolution.html" rel="alternate" type="text/html" title="WSL2: Temporary Failure in Name Resolution" /><published>2021-11-22T00:00:00+00:00</published><updated>2021-11-22T00:00:00+00:00</updated><id>/wsl2/dns/ubuntu/2021/11/22/wsl2-temporary-failure-name-resolution</id><content type="html" xml:base="/wsl2/dns/ubuntu/2021/11/22/wsl2-temporary-failure-name-resolution.html">&lt;h5 id=&quot;from-github-windows-terminal-issue-5420-github-windows-terminal-issue-5256&quot;&gt;*from &lt;a href=&quot;https://github.com/microsoft/WSL/issues/5420#issuecomment-646479747&quot;&gt;GitHub: Windows Terminal Issue 5420&lt;/a&gt;, &lt;a href=&quot;https://github.com/microsoft/WSL/issues/5256#issuecomment-666545999&quot;&gt;GitHub: Windows Terminal Issue 5256&lt;/a&gt;&lt;/h5&gt;

&lt;p&gt;In WSL2, run:&lt;/p&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# remove existing resolv.conf symlink that is pointing to a wrong nameserver&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo rm&lt;/span&gt; /etc/resolv.conf
&lt;span class=&quot;c&quot;&gt;# create a new resolv.conf with a correct nameserver&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;bash &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'echo &quot;nameserver 1.1.1.1&quot; &amp;gt; /etc/resolv.conf'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# stop wsl from regenerating resolv.conf symlink&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;bash &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'printf &quot;[network]\ngenerateResolvConf = false&quot; &amp;gt; /etc/wsl.conf'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# make current resolv.conf immutable so that wsl does not delete it&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;chattr +i /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In powershell, run&lt;/p&gt;
&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;wsl&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;--shutdown&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;wsl&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ivan Grishagin</name></author><category term="wsl2" /><category term="dns" /><category term="ubuntu" /><category term="wsl2" /><category term="dns" /><category term="ubuntu" /><summary type="html">*from GitHub: Windows Terminal Issue 5420, GitHub: Windows Terminal Issue 5256</summary></entry><entry><title type="html">Windows Terminal: Run PowerShell as Administrator</title><link href="/windows/terminal/2021/07/12/windows-terminal-run-powershell-as-administrator.html" rel="alternate" type="text/html" title="Windows Terminal: Run PowerShell as Administrator" /><published>2021-07-12T00:00:00+00:00</published><updated>2021-07-12T00:00:00+00:00</updated><id>/windows/terminal/2021/07/12/windows-terminal-run-powershell-as-administrator</id><content type="html" xml:base="/windows/terminal/2021/07/12/windows-terminal-run-powershell-as-administrator.html">&lt;h5 id=&quot;from-github-windows-terminal-issue-691-github-gerardoggsudo&quot;&gt;*from &lt;a href=&quot;https://github.com/microsoft/terminal/issues/691&quot;&gt;GitHub: Windows Terminal Issue 691&lt;/a&gt;, &lt;a href=&quot;https://github.com/gerardog/gsudo&quot;&gt;GitHub: gerardog/gsudo&lt;/a&gt;&lt;/h5&gt;

&lt;p&gt;Currently, Windows Terminal does not support running individual tabs as Administrator.&lt;br /&gt;
There is an elegant workaround employing a third-party application, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gsudo&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Start PowerShell as Administrator.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Run:
    &lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;choco&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;gsudo&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; you don’t need chocolatey; refer to the &lt;a href=&quot;https://github.com/gerardog/gsudo&quot;&gt;gsudo source&lt;/a&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Open Windows Terminal -&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Settings&lt;/code&gt; -&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Add new&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Command line&lt;/code&gt; add this:
    &lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pwsh.exe&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Command&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;gsudo pwsh&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pwsh&lt;/code&gt; is for PowerShell 7 (if you have it). This works equally well for the default PowerShell: just replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pwsh&lt;/code&gt; with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;powershell&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Change the tab icon to distinguish it from the non-elevated version.&lt;br /&gt;
&lt;a href=&quot;/downloads/posts/powershell.ico&quot;&gt;Here’s a red one&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="windows" /><category term="terminal" /><category term="windows" /><category term="terminal" /><category term="powershell" /><category term="gsudo" /><summary type="html">*from GitHub: Windows Terminal Issue 691, GitHub: gerardog/gsudo Currently, Windows Terminal does not support running individual tabs as Administrator. There is an elegant workaround employing a third-party application, gsudo. Start PowerShell as Administrator. Run: choco install gsudo -y Note: you don’t need chocolatey; refer to the gsudo source. Open Windows Terminal -&amp;gt; Settings -&amp;gt; Add new Under Command line add this: pwsh.exe -Command &quot;gsudo pwsh&quot; Note: pwsh is for PowerShell 7 (if you have it). This works equally well for the default PowerShell: just replace pwsh with powershell. Change the tab icon to distinguish it from the non-elevated version. Here’s a red one.</summary></entry><entry><title type="html">Install/Configure VirtualEnvWrapper</title><link href="/ubuntu/2020/10/30/virtualenvwrapper.html" rel="alternate" type="text/html" title="Install/Configure VirtualEnvWrapper" /><published>2020-10-30T00:00:00+00:00</published><updated>2020-10-30T00:00:00+00:00</updated><id>/ubuntu/2020/10/30/virtualenvwrapper</id><content type="html" xml:base="/ubuntu/2020/10/30/virtualenvwrapper.html">&lt;h5 id=&quot;from-readthedocs-stack-overflow-1-stack-overflow-2&quot;&gt;*from &lt;a href=&quot;https://virtualenvwrapper.readthedocs.io/en/latest/&quot;&gt;readthedocs&lt;/a&gt;, &lt;a href=&quot;https://stackoverflow.com/questions/29486113/problems-with-python-and-virtualenvwrapper-after-updating-no-module-named-virtu/29508117&quot;&gt;Stack Overflow (1)&lt;/a&gt;, &lt;a href=&quot;https://stackoverflow.com/questions/29900090/virtualenv-workon-doesnt-work&quot;&gt;Stack Overflow (2)&lt;/a&gt;&lt;/h5&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# 1. Install&lt;/span&gt;
pip3 &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;virtualenvwrapper

&lt;span class=&quot;c&quot;&gt;# 2. Create a directory for your environments&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; ~/py-envs/

&lt;span class=&quot;c&quot;&gt;# 3. Add a path to where virtual environments will be stored to your profile&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;export WORKON_HOME=~/py-envs&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.profile

&lt;span class=&quot;c&quot;&gt;# 4. Add a path to the correct python symlink or executable to your profile&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.profile

&lt;span class=&quot;c&quot;&gt;# 5. You need to run this shell script at the start of every session, &lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    so add it to your profile&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;source /usr/local/bin/virtualenvwrapper.sh&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.profile

&lt;span class=&quot;c&quot;&gt;# 6. Source&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; ~/.profile

&lt;span class=&quot;c&quot;&gt;# 7. Commands are available now, e.g., to make and load an environment:&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mkvirtualenv env1
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;workon env1
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;env1&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ivan Grishagin</name></author><category term="ubuntu" /><category term="python" /><category term="virtualenv" /><category term="virtualenvwrapper" /><summary type="html">*from readthedocs, Stack Overflow (1), Stack Overflow (2) # 1. Install pip3 install virtualenvwrapper # 2. Create a directory for your environments $ mkdir ~/py-envs/ # 3. Add a path to where virtual environments will be stored to your profile $ echo &quot;export WORKON_HOME=~/py-envs&quot; &amp;gt;&amp;gt; ~/.profile # 4. Add a path to the correct python symlink or executable to your profile $ echo &quot;export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3&quot; &amp;gt;&amp;gt; ~/.profile # 5. You need to run this shell script at the start of every session, # so add it to your profile $ echo &quot;source /usr/local/bin/virtualenvwrapper.sh&quot; &amp;gt;&amp;gt; ~/.profile # 6. Source $ source ~/.profile # 7. Commands are available now, e.g., to make and load an environment: $ mkvirtualenv env1 $ workon env1 (env1)$</summary></entry><entry><title type="html">Change Location of WSL2 Container</title><link href="/ubuntu/2020/10/26/change-wsl2-container-location.html" rel="alternate" type="text/html" title="Change Location of WSL2 Container" /><published>2020-10-26T00:00:00+00:00</published><updated>2020-10-26T00:00:00+00:00</updated><id>/ubuntu/2020/10/26/change-wsl2-container-location</id><content type="html" xml:base="/ubuntu/2020/10/26/change-wsl2-container-location.html">&lt;h5 id=&quot;from-devto&quot;&gt;*from &lt;a href=&quot;https://dev.to/milolav/manually-installing-wsl2-distributions-41b4&quot;&gt;dev.to&lt;/a&gt;&lt;/h5&gt;

&lt;p&gt;WSL2 container is located on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\&lt;/code&gt; drive by default. 
This can be inconvenient, as it can grow to a substantial size.&lt;br /&gt;
The size of the container becomes a particular concern considering that to reap WSL2’s performance benefits, one should store the data directly in the container.&lt;br /&gt;
While there are guides on how to import a new distribution via PowerShell, there’s little information on how to simply move an existing container that is connected to an existing Linux WSL2 installation (e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ubuntu&lt;/code&gt;).&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Open PowerShell:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt; $&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;wsl &lt;span class=&quot;nt&quot;&gt;--list&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--verbose&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;Note the name of the distribution of interest:
 ```console
   NAME                   STATE           VERSION&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;Ubuntu                 Running         2
 ```&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Shut down all WSL containers:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt; $&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;wsl &lt;span class=&quot;nt&quot;&gt;--shutdown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Open the Windows Registry Editor and navigate to:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;There, you will see the same number of keys as you have WSL distributions with random names, e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{c5ce672c-4a91-40aa-b32e-6a149ea92380}&lt;/code&gt;.&lt;br /&gt;
 Inspect the contents of those keys, and specifically look for the value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DistributionName&lt;/code&gt;.&lt;br /&gt;
 Naturally, you’re looking for the key with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DistributionName&lt;/code&gt; value equal to the name of your distribution of interest.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Once located, Open the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BasePath&lt;/code&gt; value. It’ll look something like that:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; C:\Users\IvanGrishagin\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Follow the path, where you’ll find a file aptly named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ext4.vhdx&lt;/code&gt;.&lt;br /&gt;
 Copy this file to your new destination, e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;D:\VirtualMachines\WSL2\Ubuntu&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Replace the path in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BasePath&lt;/code&gt; value with the new one (e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;D:\VirtualMachines\WSL2\Ubuntu&lt;/code&gt;).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;All done!&lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="ubuntu" /><category term="windows10" /><category term="windows" /><category term="subsystem" /><category term="linux" /><category term="wsl2" /><category term="ext4" /><summary type="html">*from dev.to WSL2 container is located on the C:\ drive by default. This can be inconvenient, as it can grow to a substantial size. The size of the container becomes a particular concern considering that to reap WSL2’s performance benefits, one should store the data directly in the container. While there are guides on how to import a new distribution via PowerShell, there’s little information on how to simply move an existing container that is connected to an existing Linux WSL2 installation (e.g. Ubuntu). Open PowerShell: $ wsl --list --verbose Note the name of the distribution of interest: ```console NAME STATE VERSION Ubuntu Running 2 ``` Shut down all WSL containers: $ wsl --shutdown Open the Windows Registry Editor and navigate to: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\ There, you will see the same number of keys as you have WSL distributions with random names, e.g. {c5ce672c-4a91-40aa-b32e-6a149ea92380}. Inspect the contents of those keys, and specifically look for the value DistributionName. Naturally, you’re looking for the key with the DistributionName value equal to the name of your distribution of interest. Once located, Open the BasePath value. It’ll look something like that: C:\Users\IvanGrishagin\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState Follow the path, where you’ll find a file aptly named ext4.vhdx. Copy this file to your new destination, e.g. D:\VirtualMachines\WSL2\Ubuntu. Replace the path in the BasePath value with the new one (e.g. D:\VirtualMachines\WSL2\Ubuntu). All done!</summary></entry><entry><title type="html">Setup R on Ubuntu</title><link href="/r/ubuntu/2018/10/29/setup-r-on-ubuntu.html" rel="alternate" type="text/html" title="Setup R on Ubuntu" /><published>2018-10-29T00:00:00+00:00</published><updated>2018-10-29T00:00:00+00:00</updated><id>/r/ubuntu/2018/10/29/setup-r-on-ubuntu</id><content type="html" xml:base="/r/ubuntu/2018/10/29/setup-r-on-ubuntu.html">&lt;h5 id=&quot;from-michael-rutter-stack-overflow-and-of-course-trial-and-error&quot;&gt;*from &lt;a href=&quot;https://launchpad.net/~marutter/+archive/ubuntu/rrutter3.5&quot;&gt;Michael Rutter&lt;/a&gt;, &lt;a href=&quot;https://stackoverflow.com/questions/31686470/install-curl-and-readr-on-r&quot;&gt;Stack Overflow&lt;/a&gt;, and (of course) trial and error&lt;/h5&gt;

&lt;p&gt;Installing and setting up R on Ubuntu can be a frustrating experience due to multiple system dependencies.&lt;/p&gt;

&lt;h3 id=&quot;install-r-from-a-personal-package-archive-by-michael-rutter&quot;&gt;Install R from a Personal Package Archive by Michael Rutter&lt;/h3&gt;
&lt;p&gt;Check for the current version &lt;a href=&quot;https://launchpad.net/~marutter/+archive/ubuntu/rrutter3.5&quot;&gt;here&lt;/a&gt; before the installation.&lt;/p&gt;
&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository ppa:marutter/rrutter3.5
&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;install-key-package-dependencies&quot;&gt;Install Key Package Dependencies&lt;/h3&gt;
&lt;p&gt;In Windows, external R package dependencies (except Java) are installed automatically, and users are frequently unaware what is happening behind the scenes.&lt;br /&gt;
In a linux environment, the same dependencies require explicit installation via the linux package manager.&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Install Java
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;default-jre
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Install Curl
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libcurl4-openssl-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;In the future, check for the current curl version:&lt;/p&gt;
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt-cache search libcurl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Install OpenSSL
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libssl-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Install LibXML
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;libxml2-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="r" /><category term="ubuntu" /><category term="r" /><category term="ubuntu" /><category term="windows10" /><category term="tidyverse" /><category term="subsystem" /><category term="linux" /><category term="wsl" /><summary type="html">*from Michael Rutter, Stack Overflow, and (of course) trial and error Installing and setting up R on Ubuntu can be a frustrating experience due to multiple system dependencies. Install R from a Personal Package Archive by Michael Rutter Check for the current version here before the installation. $ sudo add-apt-repository ppa:marutter/rrutter3.5 $ sudo apt-get update Install Key Package Dependencies In Windows, external R package dependencies (except Java) are installed automatically, and users are frequently unaware what is happening behind the scenes. In a linux environment, the same dependencies require explicit installation via the linux package manager. Install Java $ sudo apt-get install default-jre Install Curl $ sudo apt-get install libcurl4-openssl-dev In the future, check for the current curl version: $ apt-cache search libcurl Install OpenSSL $ sudo apt-get install libssl-dev Install LibXML $ sudo apt-get install libxml2-dev</summary></entry><entry><title type="html">How to Setup Environment for RSelenium on Windows 10</title><link href="/r/rselenium/2017/11/11/setup-rselenium-windows10.html" rel="alternate" type="text/html" title="How to Setup Environment for RSelenium on Windows 10" /><published>2017-11-11T00:00:00+00:00</published><updated>2017-11-11T00:00:00+00:00</updated><id>/r/rselenium/2017/11/11/setup-rselenium-windows10</id><content type="html" xml:base="/r/rselenium/2017/11/11/setup-rselenium-windows10.html">&lt;style type=&quot;text/css&quot;&gt;
.docker-console {
	width: 600px;
	padding-top: 10px;
	padding-bottom: 10px;
}
&lt;/style&gt;

&lt;h5 id=&quot;from-rselenium-vignette-rpubs-and-docker-github&quot;&gt;&lt;em&gt;from &lt;a href=&quot;https://cran.r-project.org/web/packages/RSelenium/vignettes/RSelenium-basics.html&quot;&gt;RSelenium vignette&lt;/a&gt;, &lt;a href=&quot;https://rpubs.com/johndharrison/RSelenium-Docker&quot;&gt;RPubs&lt;/a&gt;, and &lt;a href=&quot;https://github.com/docker/machine/issues/3210&quot;&gt;Docker GitHub&lt;/a&gt;&lt;/em&gt;&lt;/h5&gt;

&lt;p&gt;RSelenium moved to using Docker, which allows to standardize package behavior across operating systems, and therefore remove all concomitant issues.&lt;/p&gt;

&lt;h3 id=&quot;download-and-install&quot;&gt;Download and Install&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.docker.com/toolbox/toolbox_install_windows/&quot;&gt;Docker&lt;/a&gt;, an environment to run Selenium server.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.tightvnc.com/download.php&quot;&gt;TightVNC&lt;/a&gt;, a viewer to observe the result of RSelenium navigation commands.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;setup-docker-to-work-with-selenium&quot;&gt;Setup Docker to work with Selenium&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Enable &lt;a href=&quot;https://blogs.technet.microsoft.com/canitpro/2015/09/08/step-by-step-enabling-hyper-v-for-use-on-windows-10/&quot;&gt;hardware virtualization&lt;/a&gt;. It is sufficient to enable it in BIOS, and subsequent steps are unnecessary. 
If you don’t have it enabled, Docker will throw the following error:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;go&quot;&gt;This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Save &lt;a href=&quot;https://api.github.com/repos/boot2docker/boot2docker/releases/latest&quot;&gt;this json file&lt;/a&gt; as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest.json&lt;/code&gt; into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/Users/{user}/.docker/machine/cache/&lt;/code&gt;. &lt;br /&gt;
Upon starting, Docker will download &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;boot2docker.iso&lt;/code&gt;. &lt;br /&gt;
Without it, you most likely will see the following error upon Docker launch:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;go&quot;&gt;No default Boot2Docker ISO found locally, downloading the latest release...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Start &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Docker Quickstart Terminal&lt;/code&gt;. You should see a console prompt similar to this one: &lt;br /&gt;
&lt;img src=&quot;/assets/docker-console.png&quot; alt=&quot;Docker Console&quot; class=&quot;docker-console&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;In Docker Terminal run the following commands:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;docker pull selenium/standalone-chrome
&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;docker run &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 4445:4444 selenium/standalone-chrome
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;A full list of Selenium Docker images is available &lt;a href=&quot;https://hub.docker.com/u/selenium/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Alternatively, for debug mode (to enable viewing results of RSelenium navigation) use:
    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;docker pull selenium/standalone-chrome-debug
&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;docker run &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 5901:5900 &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 4445:4444 selenium/standalone-chrome-debug
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;Then start the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TightVNC&lt;/code&gt;.&lt;br /&gt;
In the prompt, enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.168.99.100:5901&lt;/code&gt; as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Remote Host:&lt;/code&gt; and click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Connect&lt;/code&gt;. &lt;br /&gt;
In the next window enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;secret&lt;/code&gt; as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Password:&lt;/code&gt;.&lt;br /&gt;
The result of all RSelenium navigation commands can be seen in this window.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;connect-r-session-to-selenium-server&quot;&gt;Connect R Session to Selenium Server&lt;/h3&gt;
&lt;p&gt;In R, create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;remoteDriver&lt;/code&gt; object, and navigate to a desired url:&lt;/p&gt;
&lt;div class=&quot;language-R highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;#load RSelenium package&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RSelenium&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;#point to the remote server&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remDr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remoteDriver&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remoteServerAddr&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;192.168.99.100&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
                    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4445L&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
                    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;browserName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;chrome&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
					&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;#navigate to url&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remDr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remDr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;navigate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://www.google.com/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ivan Grishagin</name></author><category term="r" /><category term="rselenium" /><category term="r" /><category term="rselenium" /><category term="windows10" /><category term="docker" /><summary type="html">from RSelenium vignette, RPubs, and Docker GitHub RSelenium moved to using Docker, which allows to standardize package behavior across operating systems, and therefore remove all concomitant issues. Download and Install Docker, an environment to run Selenium server. TightVNC, a viewer to observe the result of RSelenium navigation commands. Setup Docker to work with Selenium Enable hardware virtualization. It is sufficient to enable it in BIOS, and subsequent steps are unnecessary. If you don’t have it enabled, Docker will throw the following error: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory. Save this json file as latest.json into /Users/{user}/.docker/machine/cache/. Upon starting, Docker will download boot2docker.iso. Without it, you most likely will see the following error upon Docker launch: No default Boot2Docker ISO found locally, downloading the latest release... Start Docker Quickstart Terminal. You should see a console prompt similar to this one: In Docker Terminal run the following commands: $ docker pull selenium/standalone-chrome $ docker run -d -p 4445:4444 selenium/standalone-chrome A full list of Selenium Docker images is available here. Alternatively, for debug mode (to enable viewing results of RSelenium navigation) use: $ docker pull selenium/standalone-chrome-debug $ docker run -d -p 5901:5900 -p 4445:4444 selenium/standalone-chrome-debug Then start the TightVNC. In the prompt, enter 192.168.99.100:5901 as Remote Host: and click Connect. In the next window enter secret as Password:. The result of all RSelenium navigation commands can be seen in this window. Connect R Session to Selenium Server In R, create a remoteDriver object, and navigate to a desired url: #load RSelenium package require(RSelenium) #point to the remote server remDr&amp;lt;- remoteDriver(remoteServerAddr = &quot;192.168.99.100&quot; , port = 4445L , browserName = &quot;chrome&quot; ) #navigate to url remDr$open() remDr$navigate(&quot;https://www.google.com/&quot;)</summary></entry><entry><title type="html">How to Install Lisp on Windows 10</title><link href="/lisp/windows10/2017/01/26/install-lisp-Windows10.html" rel="alternate" type="text/html" title="How to Install Lisp on Windows 10" /><published>2017-01-26T00:00:00+00:00</published><updated>2017-01-26T00:00:00+00:00</updated><id>/lisp/windows10/2017/01/26/install-lisp-Windows10</id><content type="html" xml:base="/lisp/windows10/2017/01/26/install-lisp-Windows10.html">&lt;h5 id=&quot;from-jonathan-fischer-and-youtube&quot;&gt;&lt;em&gt;from &lt;a href=&quot;http://www.jonathanfischer.net/modern-common-lisp-on-windows/&quot;&gt;Jonathan Fischer&lt;/a&gt; and &lt;a href=&quot;https://www.youtube.com/watch?v=VnWVu8VVDbI&quot;&gt;YouTube&lt;/a&gt;&lt;/em&gt;&lt;/h5&gt;

&lt;h3 id=&quot;download&quot;&gt;Download&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://sourceforge.net/projects/clisp/files/clisp&quot;&gt;Common LISP&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ntemacs.sourceforge.net/&quot;&gt;Emacs&lt;/a&gt; – editor / “IDE”.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://beta.quicklisp.org/quicklisp.lisp&quot;&gt;Quicklisp&lt;/a&gt; – key LISP library that allows to download and maintain other libraries with ease.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;install&quot;&gt;Install&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Install Emacs.
    &lt;ul&gt;
      &lt;li&gt;Unpack contents of Emacs archive.&lt;/li&gt;
      &lt;li&gt;Add Emacs directory (e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\ntemacs24\bin&lt;/code&gt;) to your PATH &lt;a href=&quot;https://www.youtube.com/watch?v=C-U9SGaNbwY&quot;&gt;system variable&lt;/a&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Create HOME directory.&lt;br /&gt;
This is necessary to avoid problems with home directory recognition by lisp.
    &lt;ul&gt;
      &lt;li&gt;Create the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\HOME&lt;/code&gt; directory.&lt;/li&gt;
      &lt;li&gt;Add a new &lt;a href=&quot;https://www.youtube.com/watch?v=C-U9SGaNbwY&quot;&gt;system variable&lt;/a&gt; with Name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HOME&lt;/code&gt; and Value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\HOME&lt;/code&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Install CLISP.
    &lt;ul&gt;
      &lt;li&gt;Create an easy-to-reach, easy-to-use directory. I use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\lisp&lt;/code&gt;.&lt;/li&gt;
      &lt;li&gt;Install CLISP in that directory.&lt;br /&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; the latest version at the time of writing is 2.49, but I’m having trouble getting it to load SLIME properly (see below), so version 2.48 it is. (file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clisp-2.48-win32-mingw-big.exe&lt;/code&gt;).&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt;&lt;br /&gt;
Installer of the version 2.48 is faulty.&lt;br /&gt;
To fix this problem, copy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;svm.dll&lt;/code&gt; out of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clisp-2.48/libsvm&lt;/code&gt; directory into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clisp-2.48/full&lt;/code&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Install quicklisp.
    &lt;ul&gt;
      &lt;li&gt;Place &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;quicklisp.lisp&lt;/code&gt; into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\lisp&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;Run CLISP and execute the following:&lt;/li&gt;
    &lt;/ul&gt;

    &lt;div class=&quot;language-lisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;C:/lisp/quicklisp.lisp&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;quicklisp-quickstart:install&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;C:/lisp/quicklisp/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;ql:add-to-init-file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Install SLIME – Superior Lisp Interaction Mode for Emacs, an Emacs extension to make lisp development seamless.&lt;br /&gt;
In the CLISP console execute:&lt;/p&gt;

    &lt;div class=&quot;language-lisp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;ql:quickload&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;quicklisp-slime-helper&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Configure Emacs.
    &lt;ul&gt;
      &lt;li&gt;Launch Emacs.&lt;/li&gt;
      &lt;li&gt;Type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl-x&lt;/code&gt;, then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl-f&lt;/code&gt;.&lt;/li&gt;
      &lt;li&gt;Enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.emacs&lt;/code&gt; in the prompt at the bottom of the window.&lt;/li&gt;
      &lt;li&gt;Add the following lines to the file:&lt;/li&gt;
    &lt;/ul&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(setq inferior-lisp-program &quot;clisp.exe&quot;)
(load &quot;C:/lisp/quicklisp/slime-helper.el&quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;ul&gt;
      &lt;li&gt;Type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl-x&lt;/code&gt;, then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl-s&lt;/code&gt; to save the file.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="lisp" /><category term="windows10" /><category term="windows10" /><category term="common" /><category term="lisp" /><category term="clisp" /><summary type="html">from Jonathan Fischer and YouTube Download Common LISP. Emacs – editor / “IDE”. Quicklisp – key LISP library that allows to download and maintain other libraries with ease. Install Install Emacs. Unpack contents of Emacs archive. Add Emacs directory (e.g. C:\ntemacs24\bin) to your PATH system variable. Create HOME directory. This is necessary to avoid problems with home directory recognition by lisp. Create the C:\HOME directory. Add a new system variable with Name HOME and Value C:\HOME. Install CLISP. Create an easy-to-reach, easy-to-use directory. I use C:\lisp. Install CLISP in that directory. NOTE: the latest version at the time of writing is 2.49, but I’m having trouble getting it to load SLIME properly (see below), so version 2.48 it is. (file clisp-2.48-win32-mingw-big.exe). IMPORTANT: Installer of the version 2.48 is faulty. To fix this problem, copy svm.dll out of clisp-2.48/libsvm directory into clisp-2.48/full. Install quicklisp. Place quicklisp.lisp into C:\lisp Run CLISP and execute the following: (load &quot;C:/lisp/quicklisp.lisp&quot;) (quicklisp-quickstart:install :path &quot;C:/lisp/quicklisp/&quot;) (ql:add-to-init-file) Install SLIME – Superior Lisp Interaction Mode for Emacs, an Emacs extension to make lisp development seamless. In the CLISP console execute: (ql:quickload &quot;quicklisp-slime-helper&quot;) Configure Emacs. Launch Emacs. Type Ctrl-x, then Ctrl-f. Enter ~/.emacs in the prompt at the bottom of the window. Add the following lines to the file: (setq inferior-lisp-program &quot;clisp.exe&quot;) (load &quot;C:/lisp/quicklisp/slime-helper.el&quot;) Type Ctrl-x, then Ctrl-s to save the file.</summary></entry><entry><title type="html">Windows 10 Ubuntu Bash Tips</title><link href="/windows10/bash/2017/01/25/Windows10-ubuntu-bash-tips.html" rel="alternate" type="text/html" title="Windows 10 Ubuntu Bash Tips" /><published>2017-01-25T00:00:00+00:00</published><updated>2017-01-25T00:00:00+00:00</updated><id>/windows10/bash/2017/01/25/Windows10-ubuntu-bash-tips</id><content type="html" xml:base="/windows10/bash/2017/01/25/Windows10-ubuntu-bash-tips.html">&lt;h3 id=&quot;fixing-color-scheme&quot;&gt;Fixing Color Scheme&lt;/h3&gt;

&lt;h5 id=&quot;from-a-medium-corporation-and-bashtip_colors_and_formatting&quot;&gt;&lt;em&gt;from &lt;a href=&quot;https://medium.com/@iraklis/fixing-dark-blue-colors-on-windows-10-ubuntu-bash-c6b009f8b97c#.3fxtoe4hc&quot;&gt;A Medium Corporation&lt;/a&gt; and &lt;a href=&quot;https://misc.flogisoft.com/bash/tip_colors_and_formatting&quot;&gt;bash:tip_colors_and_formatting&lt;/a&gt;&lt;/em&gt;&lt;/h5&gt;

&lt;p&gt;The goal is to replace dark blue color (unreadable on black background) with light magenta in Ubuntu bash console on Windows 10.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Open interactive shell script.&lt;/p&gt;

    &lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;At the end of the document add the following lines:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#fix color scheme 
LS_COLORS='rs=0:di=1;35:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:';
export LS_COLORS
   
#change prompt after @ color from white (default) to light magenta
PS1='\[\e[37;1m\]\u@\[\e[35m\]\W\[\e[0m\]\$ '
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Save changes and close nano by pressing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl+X&lt;/code&gt;, followed by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Y&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Enter&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;</content><author><name>Ivan Grishagin</name></author><category term="windows10" /><category term="bash" /><category term="windows10" /><category term="ubuntu" /><category term="bash" /><summary type="html">Fixing Color Scheme from A Medium Corporation and bash:tip_colors_and_formatting The goal is to replace dark blue color (unreadable on black background) with light magenta in Ubuntu bash console on Windows 10. Open interactive shell script. $ nano ~/.bashrc At the end of the document add the following lines: #fix color scheme LS_COLORS='rs=0:di=1;35:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'; export LS_COLORS #change prompt after @ color from white (default) to light magenta PS1='\[\e[37;1m\]\u@\[\e[35m\]\W\[\e[0m\]\$ ' Save changes and close nano by pressing Ctrl+X, followed by Y and Enter.</summary></entry></feed>