<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WSL &#8211; Virtually Fun</title>
	<atom:link href="https://virtuallyfun.com/category/wsl/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Sat, 26 Oct 2024 21:36:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>CDE on WSLv1</title>
		<link>https://virtuallyfun.com/2023/06/22/cde-on-wslv1/</link>
					<comments>https://virtuallyfun.com/2023/06/22/cde-on-wslv1/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 22 Jun 2023 13:37:56 +0000</pubDate>
				<category><![CDATA[WSL]]></category>
		<category><![CDATA[X11]]></category>
		<guid isPermaLink="false">http://virtuallyfun.com/?p=12846</guid>

					<description><![CDATA[AKA CDE on Windows 10! This is about as weird as it sounds. While many disregard WSLv1 as being borderline useless, it can still quickly bridge the gap when you need something in user-space, and quickly. And for those of &#8230; <a href="https://virtuallyfun.com/2023/06/22/cde-on-wslv1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">AKA CDE on Windows 10!</p>



<figure class="wp-block-image size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1.png"><img fetchpriority="high" decoding="async" width="1024" height="601" src="https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-1024x601.png" alt="" class="wp-image-12847" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-1024x601.png 1024w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-300x176.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-768x450.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-500x293.png 500w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1.png 1282w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="wp-block-paragraph">This is about as weird as it sounds.  While many disregard WSLv1 as being borderline useless, it can still quickly bridge the gap when you need something in user-space, and quickly.  And for those of us on Windows 10 (I could upgrade this machine, but I haven&#8217;t bothered as I don&#8217;t have a real GPU for it), there is no real UI.  But how to solve this?</p>



<p class="wp-block-paragraph">Well, the first thing is <a rel="noreferrer noopener" href="https://github.com/neutrinolabs/xrdp" target="_blank">xrdp</a>. Xrdp is an RDP server that will allow any halfway good Unix machine become a terminal server, very &#8216;Citrix like&#8217;.  Combine that with the Xorg virtual frame buffer, and now you have a display surface that is basically exported over RDP. I did modify it to listen on a different port so I could retain RDP to Windows 10 by modifying xrdp.ini:</p>



<pre class="wp-block-code"><code>port=4389
port=ask4389</code></pre>



<p class="wp-block-paragraph"> Now the real fun comes from CDE.</p>



<p class="wp-block-paragraph">I built 2.5.1 from source, following <a rel="noreferrer noopener" href="https://sourceforge.net/p/cdesktopenv/wiki/LinuxBuild/" target="_blank">the guide</a>, with 2 important notes: Make sure you install and activate the UTF!!!.  The other thing that was trashing my build was that WSLv1 picks up the Windows path, and it has spaces in it, which confuse the build process. Be sure to export something like:</p>



<pre class="wp-block-code"><code>export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games</code></pre>



<p class="wp-block-paragraph">before beginning the process.</p>



<p class="wp-block-paragraph">With all the bits in place, the next issue is the RPC.  I couldn&#8217;t figure out how to start the &#8216;safe mode&#8217; version, so it will absolutely need RPC.  But it turns out that you just have to start the rpcbind manually, since WSLv1 doesn&#8217;t have a real &#8216;startup&#8217;.  I also saw a lot of errors trying to talk to dbus, so may as well start that up as well.</p>



<pre class="wp-block-code"><code>mkdir -p /run/sendsigs.omit.d/
/usr/sbin/xrdp
/usr/sbin/xrdp-sesman
/usr/sbin/rpcbind
/usr/bin/dbus-daemon --system</code></pre>



<p class="wp-block-paragraph">And finally link the Xsession to the default user .xsession so CDE will be the default environment.</p>



<pre class="wp-block-code"><code>ln -s /usr/dt/bin/Xsession $HOME/.xsession</code></pre>



<p class="wp-block-paragraph">Now you should have everything in place, to login and get the Xrdp login</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/erying-xrdp-login.png"><img decoding="async" width="816" height="492" src="https://virtuallyfun.com/wp-content/uploads/2023/06/erying-xrdp-login.png" alt="" class="wp-image-12848" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/erying-xrdp-login.png 816w, https://virtuallyfun.com/wp-content/uploads/2023/06/erying-xrdp-login-300x181.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/erying-xrdp-login-768x463.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/06/erying-xrdp-login-498x300.png 498w" sizes="(max-width: 816px) 100vw, 816px" /></a><figcaption class="wp-element-caption">xrdp login</figcaption></figure>



<p class="wp-block-paragraph">And with any luck, you&#8217;ll be greeted with CDE!</p>



<figure class="wp-block-image size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login.png"><img decoding="async" width="1024" height="601" src="https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login-1024x601.png" alt="" class="wp-image-12851" srcset="https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login-1024x601.png 1024w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login-300x176.png 300w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login-768x450.png 768w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login-500x293.png 500w, https://virtuallyfun.com/wp-content/uploads/2023/06/cde-on-wslv1-default-login.png 1282w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">CDE on WSLv1!</figcaption></figure>



<p class="wp-block-paragraph">And there we go! Neat!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2023/06/22/cde-on-wslv1/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Running the SWGEMU server on WSL</title>
		<link>https://virtuallyfun.com/2022/12/08/running-the-swgemu-server-on-wsl/</link>
					<comments>https://virtuallyfun.com/2022/12/08/running-the-swgemu-server-on-wsl/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 08 Dec 2022 16:32:47 +0000</pubDate>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[Windows 10]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=12093</guid>

					<description><![CDATA[The topic had come up again about running Core3 aka the Star Wars Galaxies EMUlated server at home. It&#8217;s always been a somewhat involved setup, but with the advent of the Windows Subsystem for Linux, there exists the ability to &#8230; <a href="https://virtuallyfun.com/2022/12/08/running-the-swgemu-server-on-wsl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode.png"><img loading="lazy" decoding="async" width="1024" height="576" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode-1024x576.png" alt="" class="wp-image-12098" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode-1024x576.png 1024w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode-300x169.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode-768x432.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode-500x281.png 500w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-god-mode.png 1366w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">All alone</figcaption></figure>



<p class="wp-block-paragraph">The topic had come up again about running Core3 aka the Star Wars Galaxies EMUlated server at home.  It&#8217;s always been a somewhat involved setup, but with the advent of the Windows Subsystem for Linux, there exists the ability to export and import filesystems as if they were containers.  With that in hand I went ahead and set one up.</p>



<p class="wp-block-paragraph">I initially targeted the older WSL v1, as it supports far more hardware, and I didn&#8217;t want to leave so many behind.  The added benefit of targeting v1, is that the end user can upgrade the filesystem to v2 if they so choose.  The only real difference in this project between v1 &amp; v2 is that v1 cannot run the needed MySQL instance.  This isn&#8217;t a showstopper however as there exists MySQL &amp; MariaDB native versions for Windows.</p>



<p class="wp-block-paragraph">Obviously, you&#8217;ll need Windows 10 or 11 to do this.  From what I can tell even the home version of Windows 10 has WSL capabilities, so this doesn&#8217;t pose any problems.  Simply open the legacy control panel (Windows+R then type in &#8216;control&#8217;), and go to the Programs.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-contgrol.png"><img loading="lazy" decoding="async" width="596" height="492" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-contgrol.png" alt="" class="wp-image-12095" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-contgrol.png 596w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-contgrol-300x248.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-contgrol-363x300.png 363w" sizes="auto, (max-width: 596px) 100vw, 596px" /></a></figure>



<p class="wp-block-paragraph"> and then &#8216;Turn Windows features on or off&#8217;, scroll down and select &#8216;Windows Subsystem for Linux&#8217;.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-install-subsystem.png"><img loading="lazy" decoding="async" width="914" height="603" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-install-subsystem.png" alt="" class="wp-image-12094" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-install-subsystem.png 914w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-install-subsystem-300x198.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-install-subsystem-768x507.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-1-install-subsystem-455x300.png 455w" sizes="auto, (max-width: 914px) 100vw, 914px" /></a></figure>



<p class="wp-block-paragraph">Hit OK, and it&#8217;ll download what is needed from the internet.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-2-searching.png"><img loading="lazy" decoding="async" width="701" height="565" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-2-searching.png" alt="" class="wp-image-12096" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-2-searching.png 701w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-2-searching-300x242.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-2-searching-372x300.png 372w" sizes="auto, (max-width: 701px) 100vw, 701px" /></a></figure>



<p class="wp-block-paragraph">This shouldn&#8217;t take too long, then it&#8217;ll want to reboot the computer.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-3-reboot.png"><img loading="lazy" decoding="async" width="666" height="487" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-3-reboot.png" alt="" class="wp-image-12097" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-3-reboot.png 666w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-3-reboot-300x219.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-3-reboot-410x300.png 410w" sizes="auto, (max-width: 666px) 100vw, 666px" /></a></figure>



<p class="wp-block-paragraph">Now you just have to wait for Windows to reboot.</p>



<p class="wp-block-paragraph">Now you&#8217;ll need to download the filesystem.  I&#8217;ve put it on archive.org for the time being right here: <a href="https://archive.org/download/wslv1-SWGEMU_Ubuntu20.22">wslv1-SWGEMU_Ubuntu20.22 directory listing (archive.org)</a></p>



<p class="wp-block-paragraph">At a minimum you&#8217;ll need the files:</p>



<ul class="wp-block-list">
<li>swgemu-ubuntu.tar.gz</li>



<li>mariadb-10.10.2-winx64.msi</li>
</ul>



<p class="wp-block-paragraph">Keep in mind that the filesystem is 4.8GB.  It will take some time to download.  If the torrent servers are functioning I would highly recommend that.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6.2GB-installed.png"><img loading="lazy" decoding="async" width="465" height="316" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6.2GB-installed.png" alt="" class="wp-image-12119" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6.2GB-installed.png 465w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6.2GB-installed-300x204.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6.2GB-installed-441x300.png 441w" sizes="auto, (max-width: 465px) 100vw, 465px" /></a></figure>



<p class="wp-block-paragraph">Once it&#8217;s installed and it&#8217;s generated it&#8217;s own databases it&#8217;ll need just under 7GB of disk space.  So figure that you need 15GB free for this fun experiment.</p>



<p class="wp-block-paragraph">The first step is to install the database server.  We will need to know the settings in order to configure the swgemu server.  </p>



<p class="wp-block-paragraph">You can use any MySQL, but Maria is fully GPL, and small, and more importantly doesn&#8217;t involve Oracle.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-4-maria-splash.png"><img loading="lazy" decoding="async" width="510" height="402" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-4-maria-splash.png" alt="" class="wp-image-12099" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-4-maria-splash.png 510w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-4-maria-splash-300x236.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-4-maria-splash-381x300.png 381w" sizes="auto, (max-width: 510px) 100vw, 510px" /></a></figure>



<p class="wp-block-paragraph">The install is pretty striaghtfoward.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-5-maria-license.png"><img loading="lazy" decoding="async" width="520" height="403" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-5-maria-license.png" alt="" class="wp-image-12100" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-5-maria-license.png 520w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-5-maria-license-300x233.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-5-maria-license-387x300.png 387w" sizes="auto, (max-width: 520px) 100vw, 520px" /></a></figure>



<p class="wp-block-paragraph">GNU software requires it reproduce the license sooo here we are.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6-maria-options.png"><img loading="lazy" decoding="async" width="621" height="442" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6-maria-options.png" alt="" class="wp-image-12101" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6-maria-options.png 621w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6-maria-options-300x214.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-6-maria-options-421x300.png 421w" sizes="auto, (max-width: 621px) 100vw, 621px" /></a></figure>



<p class="wp-block-paragraph">I would HIGHLY recommend use the default option of install everything.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-7-maria-security.png"><img loading="lazy" decoding="async" width="536" height="436" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-7-maria-security.png" alt="" class="wp-image-12102" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-7-maria-security.png 536w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-7-maria-security-300x244.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-7-maria-security-369x300.png 369w" sizes="auto, (max-width: 536px) 100vw, 536px" /></a></figure>



<p class="wp-block-paragraph">It will ask for a root password.  In this example I&#8217;m using &#8216;password&#8217;, of course you can use anything you want, as long as you remember it.  You don&#8217;t have to allow remote machine access to the database as WSLv1 runs in the same userspace on Windows, so it&#8217;ll effectively be connecting to itself.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-8-maria-network.png"><img loading="lazy" decoding="async" width="522" height="398" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-8-maria-network.png" alt="" class="wp-image-12103" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-8-maria-network.png 522w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-8-maria-network-300x229.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-8-maria-network-393x300.png 393w" sizes="auto, (max-width: 522px) 100vw, 522px" /></a></figure>



<p class="wp-block-paragraph">I use TCP port 10000 as I want the default port 3306 for another insance.  Again it&#8217;s all up to you but you will have to remember what port you put it on.  Ports below 1000 are highly NOT recommended as they need special permission.  I left the buffer pool as default</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-9-Install-Maria.png"><img loading="lazy" decoding="async" width="536" height="415" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-9-Install-Maria.png" alt="" class="wp-image-12104" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-9-Install-Maria.png 536w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-9-Install-Maria-300x232.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-9-Install-Maria-387x300.png 387w" sizes="auto, (max-width: 536px) 100vw, 536px" /></a></figure>



<p class="wp-block-paragraph">With those options set we can let it do the install.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-10-finish-Install-Maria.png"><img loading="lazy" decoding="async" width="571" height="431" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-10-finish-Install-Maria.png" alt="" class="wp-image-12105" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-10-finish-Install-Maria.png 571w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-10-finish-Install-Maria-300x226.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-10-finish-Install-Maria-397x300.png 397w" sizes="auto, (max-width: 571px) 100vw, 571px" /></a></figure>



<p class="wp-block-paragraph">Now the database is installed, and we can go onto restoring the WSL image, and then configuring the core3 server</p>



<p class="wp-block-paragraph">Firstly we need place to put it, On the machine I built it on it was the D: drive, but for this re-deploy on a new machine I&#8217;m using the C: drive.  It&#8217;s all up to you but it MUST be a locally attached disk, no USB disks.</p>



<p class="wp-block-paragraph">Simply create the target directory and run the import command something like this:</p>



<pre class="wp-block-preformatted">md c:\starwars
wsl --import swgemu c:\starwars Downloads\swgemu-ubuntu.tar.gz</pre>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-11-restoring-filesystem.png"><img loading="lazy" decoding="async" width="943" height="487" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-11-restoring-filesystem.png" alt="" class="wp-image-12106" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-11-restoring-filesystem.png 943w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-11-restoring-filesystem-300x155.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-11-restoring-filesystem-768x397.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-11-restoring-filesystem-500x258.png 500w" sizes="auto, (max-width: 943px) 100vw, 943px" /></a><figcaption class="wp-element-caption">I only have the one disk on this VM</figcaption></figure>



<p class="wp-block-paragraph">This will take a while.</p>



<p class="wp-block-paragraph">Once it&#8217;s done you can check the subsystem status:</p>



<pre class="wp-block-preformatted">C:\Users\Administrator&gt;wsl --list -v
  NAME      STATE           VERSION
* swgemu    Stopped         1</pre>



<p class="wp-block-paragraph">You may have more than one installed, so we&#8217;ll refer to this one by it&#8217;s name &#8216;swgemu&#8217;.</p>



<p class="wp-block-paragraph">You can start the instance with wsl -d swgemu:</p>



<pre class="wp-block-preformatted">C:\Users\Administrator&gt;wsl -d swgemu
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Dec  8 09:02:39 EST 2022

  System load:    0.5185546875   Processes:             7
  Usage of /home: unknown        Users logged in:       0
  Memory usage:   28%            IPv4 address for eth0: 198.46.174.160
  Swap usage:     0%


0 updates can be applied immediately.



This message is shown once a day. To disable it please create the
/root/.hushlogin file.</pre>



<p class="wp-block-paragraph">You will need to edit the script to create the databases.  I like using vi, but you may not.  The easiest way is to just browse to the location and open it up in notepad.  The path to browse is:</p>



<pre class="wp-block-preformatted">C:\starwars\rootfs\root\starwars\sql</pre>



<p class="wp-block-paragraph">You can drag/drop re-init.sh on notepad, or make the file association, it&#8217;s all up to you.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-12-edit-the-re-init-script.png"><img loading="lazy" decoding="async" width="956" height="480" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-12-edit-the-re-init-script.png" alt="" class="wp-image-12107" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-12-edit-the-re-init-script.png 956w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-12-edit-the-re-init-script-300x151.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-12-edit-the-re-init-script-768x386.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-12-edit-the-re-init-script-500x251.png 500w" sizes="auto, (max-width: 956px) 100vw, 956px" /></a></figure>



<p class="wp-block-paragraph">I had set the SQLHOST to the LAN IP I have, you should set it to 127.0.0.1 .  The PUBLIC address is the one that you&#8217;ll be connecting to.  You can set it to your LAN address, or a public one if you know it (you&#8217;ll have to setup NAT), or if you are running it all on one machine for testing, it&#8217;s fine to be 127.0.0.1.</p>



<p class="wp-block-paragraph">Save the file re-init.sh and now you have to run it.</p>



<pre class="wp-block-preformatted">root@DESKTOP-E4F55FE:~# cd starwars/sql/
root@DESKTOP-E4F55FE:~/starwars/sql# ./re-init.sh
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1008 (HY000) at line 1: Can't drop database 'swgemu'; database doesn't exist
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
root@DESKTOP-E4F55FE:~/starwars/sql#</pre>



<p class="wp-block-paragraph">The first SQL query will attempt to drop the swgemu database.  In this case it doesn&#8217;t exist, so the first error is expected.  Nothing to worry about.  That gives us the database, now it&#8217;s time to configure the server.</p>



<p class="wp-block-paragraph">You can use explorer to browse to:</p>



<pre class="wp-block-preformatted">C:\starwars\rootfs\root\starwars\conf</pre>



<p class="wp-block-paragraph">Now open/drop on notepad the file config.lua</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-13-edit-config.lua-file.png"><img loading="lazy" decoding="async" width="870" height="601" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-13-edit-config.lua-file.png" alt="" class="wp-image-12108" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-13-edit-config.lua-file.png 870w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-13-edit-config.lua-file-300x207.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-13-edit-config.lua-file-768x531.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-13-edit-config.lua-file-434x300.png 434w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p class="wp-block-paragraph">Again change the DBHost, and MantisHost to 127.0.0.1, and update the password for root, if you have changed it.  You may also want to change the DBSecret, but since this is all for fun, I&#8217;m leaving it stock.</p>



<p class="wp-block-paragraph">Now it&#8217;s time to run the server.</p>



<pre class="wp-block-preformatted">root@DESKTOP-E4F55FE:~/starwars/sql# cd ..
root@DESKTOP-E4F55FE:~/starwars# ./core3
(0 s) [Core] Server start, pid: 105, time: Thu Dec  8 09:11:54 2022
(0 s) [ConfigManager] Did not find conf/config-local.lua
(0 s) [DatabaseManager] converting database objects to new format
(0 s) [DatabaseManager] finished converting data to new format</pre>



<p class="wp-block-paragraph">There will be a lot of messages going on, and this will take a few minutes.  During the first run Windows will ask for network access permissions. Be sure to check both boxes allowing WAN and LAN access.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-14-allow-network-access.png"><img loading="lazy" decoding="async" width="733" height="463" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-14-allow-network-access.png" alt="" class="wp-image-12110" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-14-allow-network-access.png 733w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-14-allow-network-access-300x189.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-14-allow-network-access-475x300.png 475w" sizes="auto, (max-width: 733px) 100vw, 733px" /></a><figcaption class="wp-element-caption">Check both boxes!</figcaption></figure>



<p class="wp-block-paragraph">I have a Lenovo C20 and it takes about 2 minutes, depending on your config it may take longer or shorter.</p>



<p class="wp-block-paragraph">One thing to point out is that I have configured Core3 for all the worlds, and this will need more than 8GB of ram to start up.  So if you get something like this:</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-15-system-memory-use3.png"><img loading="lazy" decoding="async" width="966" height="591" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-15-system-memory-use3.png" alt="" class="wp-image-12111" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-15-system-memory-use3.png 966w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-15-system-memory-use3-300x184.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-15-system-memory-use3-768x470.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-15-system-memory-use3-490x300.png 490w" sizes="auto, (max-width: 966px) 100vw, 966px" /></a></figure>



<p class="wp-block-paragraph">If this happens, you&#8217;ll have to try a minimal config, commenting out the areas from the config.  On this test system, it only has 8GB of RAM, and that isn&#8217;t enough to have everything.  However the minimal of the training &amp; Tatooine fits no problem:</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-16-initialized-with-minimal.png"><img loading="lazy" decoding="async" width="948" height="600" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-16-initialized-with-minimal.png" alt="" class="wp-image-12112" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-16-initialized-with-minimal.png 948w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-16-initialized-with-minimal-300x190.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-16-initialized-with-minimal-768x486.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-16-initialized-with-minimal-474x300.png 474w" sizes="auto, (max-width: 948px) 100vw, 948px" /></a></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="667" height="62" src="https://virtuallyfun.com/wp-content/uploads/2022/12/core3-needs-6.3GB-of-ram-to-run-fully-loaded.png" alt="" class="wp-image-12117" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/core3-needs-6.3GB-of-ram-to-run-fully-loaded.png 667w, https://virtuallyfun.com/wp-content/uploads/2022/12/core3-needs-6.3GB-of-ram-to-run-fully-loaded-300x28.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/core3-needs-6.3GB-of-ram-to-run-fully-loaded-500x46.png 500w" sizes="auto, (max-width: 667px) 100vw, 667px" /></figure>



<p class="wp-block-paragraph">On the machine I originally set this up on, it has 32GB of RAM, so the processes needing just under 7GB of RAM wasn&#8217;t an issue.  However an 8GB machine just isn&#8217;t enough as I found out the hard way re-producing my install.</p>



<p class="wp-block-paragraph">Since we have previously allowed the Core3 application LAN/WAN access you should be able to connect.  If you set the public address to something public, you will need to setup your firewall to forward the following ports to the machine hosting Core3</p>



<p class="wp-block-paragraph">Otherwise you&#8217;ll need to open the following ports and protocols:</p>



<p class="wp-block-paragraph">TCP 44419<br>TCP 44455<br>UDP 44453<br>UDP 44462<br>UDP 44463</p>



<p class="wp-block-paragraph">Again making this a WSLv1 setup makes this easier as Windows runs core3 in the same memory space.</p>



<p class="wp-block-paragraph">With any luck you should now be able to connect to the address you have specified as your PUBLIC address.  If you want to change, you can either update the re-init.sh script and re-run it, destroying everything, or run the HeidiSQL tool, and just update it.</p>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-20-connect-with-Heidi-SQL.png"><img loading="lazy" decoding="async" width="690" height="486" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-20-connect-with-Heidi-SQL.png" alt="" class="wp-image-12114" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-20-connect-with-Heidi-SQL.png 690w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-20-connect-with-Heidi-SQL-300x211.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-20-connect-with-Heidi-SQL-426x300.png 426w" sizes="auto, (max-width: 690px) 100vw, 690px" /></a></figure>



<p class="wp-block-paragraph">I had to set it to use libmysql.dll .  As always remember your root password, and what Port you used to setup MariaDB.  With the profile saved you can open it up.</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-21-set-the-galaxy-public-address.png"><img loading="lazy" decoding="async" width="862" height="362" src="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-21-set-the-galaxy-public-address.png" alt="" class="wp-image-12115" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-21-set-the-galaxy-public-address.png 862w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-21-set-the-galaxy-public-address-300x126.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-21-set-the-galaxy-public-address-768x323.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/swgemu-wsl-21-set-the-galaxy-public-address-500x210.png 500w" sizes="auto, (max-width: 862px) 100vw, 862px" /></a></figure>



<p class="wp-block-paragraph">The address field tells the clients what IP address they can find the server on, so it can the the LAN if you are staying at home, or it has to be a Publicly accessible one.  Another alternative is something like <a rel="noreferrer noopener" href="https://vpn.net/" target="_blank">Hamachi</a>, which lets you create your own virtual network of machines.  It&#8217;s great, but not all that cheap, but the added benefit is that your server isn&#8217;t a public resource, so you know exactly who is connecting. </p>



<figure class="wp-block-image size-large"><a href="https://vpn.net/"><img loading="lazy" decoding="async" width="1024" height="217" src="https://virtuallyfun.com/wp-content/uploads/2022/12/hamachi-pricing-1024x217.png" alt="" class="wp-image-12116" srcset="https://virtuallyfun.com/wp-content/uploads/2022/12/hamachi-pricing-1024x217.png 1024w, https://virtuallyfun.com/wp-content/uploads/2022/12/hamachi-pricing-300x63.png 300w, https://virtuallyfun.com/wp-content/uploads/2022/12/hamachi-pricing-768x162.png 768w, https://virtuallyfun.com/wp-content/uploads/2022/12/hamachi-pricing-500x106.png 500w, https://virtuallyfun.com/wp-content/uploads/2022/12/hamachi-pricing.png 1291w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">If you want to be open but in control I&#8217;ve used this in the past to great success.</figcaption></figure>



<p class="wp-block-paragraph">If you do change the IP you have to restart the core3 program.</p>



<p class="wp-block-paragraph">Simply type in &#8216;exit&#8217; at the console and it&#8217;ll start to gracefully shutdown.</p>



<p class="wp-block-paragraph">Then simply start it again with a ./core3</p>



<p class="wp-block-paragraph">If you want to enable the god mode, I assume you have read how what changes to make on the client side, and the table to edit is the accounts table, once you have logged in, it&#8217;ll create your record, and you can find it on HeidiSQL and change the admin_level field to 15.  With this set the next character you create will be a &#8216;god&#8217;.</p>



<p class="wp-block-paragraph">It&#8217;s worth noting that your 1st player won&#8217;t have the god mode enabled, but rather the 2nd onward will have the GOD mode flag set.</p>



<p class="wp-block-paragraph">To enable the / commands (aka the whole fun of god mode!) you need to edit the swgemu.cfg file in your Star Wars Galaxies directory.  You need to uncomment the following line:</p>



<pre class="wp-block-code"><code># .include “user.cfg”</code></pre>



<p class="wp-block-paragraph">Next you need to create a user.cfg file in that directory with the following:</p>



<pre class="wp-block-code"><code>&#91;SwgClient]
allowMultipleInstances=true
&#91;ClientGame]
0fd345d9=true
&#91;ClientUserInterface]
debugExamine=1</code></pre>



<p class="wp-block-paragraph">Now any server you can login to you can run exciting commands like </p>



<pre class="wp-block-code"><code>/setspeed 10 30</code></pre>



<p class="wp-block-paragraph">I&#8217;m not going to go into setting up the client, installing the SWGEMU stuff and how to add custom servers, as I assume you already know how to do so.  This is more to let people run their own instances at home, or among friends.</p>



<p class="wp-block-paragraph">On building core3 for yourself, be aware that by default it&#8217;ll use a &#8216;native&#8217; config option that tunes the compiler to generate code as fast as possible for YOUR processor. So if you want to run it somewhere else, it has a good chance of not running.  I had to edit the following files:</p>



<pre class="wp-block-preformatted">./CMakeLists.txt<br>./utils/engine3/MMOEngine/CMakeLists.txt</pre>



<p class="wp-block-paragraph">And change NATIVE to NO.</p>



<p class="wp-block-paragraph">I also had issues with the SQL not having a default setting for timestamps, and it would fail to create accounts.  Look for stuff like this:</p>



<pre class="wp-block-preformatted">TIMESTAMP NOT NULL,</pre>



<p class="wp-block-paragraph">and replace it with</p>



<pre class="wp-block-preformatted">TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,</pre>



<p class="wp-block-paragraph">And as of this current rev I had some issues with malloc hooks, which I just commented out:</p>



<pre class="wp-block-code"><code>$ diff -ruN AllocationHook.cpp_ utils/engine3/MMOEngine/src/system/mm/AllocationHook.cpp
--- AllocationHook.cpp_ 2022-12-06 07:59:42.160402900 +0000
+++ utils/engine3/MMOEngine/src/system/mm/AllocationHook.cpp 2022-12-06 08:00:22.510402900 +0000
@@ -50,6 +50,7 @@
        instance = this;

 #ifndef PLATFORM_MAC
+#if 0
        __saved_malloc_hook = __malloc_hook;
        __saved_free_hook = __free_hook;
        __saved_realloc_hook = __realloc_hook;
@@ -58,6 +59,7 @@
        __malloc_hook = mallocHook;
        __free_hook = freeHook;
        __realloc_hook = reallocHook;
+#endif

 #else
        malloc_zone_t *dz = malloc_default_zone();
@@ -91,9 +93,11 @@

 void AllocationHook::uninstall() {
 #ifndef PLATFORM_MAC
+#if 0
        __malloc_hook = __saved_malloc_hook;
        __free_hook = __saved_free_hook;
        __realloc_hook = __saved_realloc_hook;
+#endif
 #else
        malloc_zone_t *dz = malloc_default_zone();

$</code></pre>



<p class="wp-block-paragraph">Yes it&#8217;s terrible, but I was in a rush so.. yeah.</p>



<p class="wp-block-paragraph">Also I have access to a Windows 2019 Server which is Windows 10 1809 based, and it doesn&#8217;t support the import-export of filesystems.  So this won&#8217;t be a clean install, I guess it&#8217;d be easier to copy files over from Windows 10, and install Ubuntu 20.22 from the store.</p>



<p class="wp-block-paragraph">Good Luck!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2022/12/08/running-the-swgemu-server-on-wsl/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
			</item>
		<item>
		<title>Setting the time machine for June 20th 2011</title>
		<link>https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/</link>
					<comments>https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 10 Mar 2022 07:53:32 +0000</pubDate>
				<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wikipedia]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11780</guid>

					<description><![CDATA[No, not that time machine, this one is a rehash of the old local Wikipeida mirror. So sadly I didn&#8217;t keep the source files as I thought they were evergreen, and yeah turns out they are NOT. But thankfully there &#8230; <a href="https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="474" height="293" src="https://virtuallyfun.com/wp-content/uploads/2022/03/OIP.jpg" alt="" class="wp-image-11781"/><figcaption>John Titor hunting Orange wine, and IBM 5100&#8217;s</figcaption></figure>



<p class="wp-block-paragraph">No, not that time machine, this one is a rehash of the old <a href="/wordpress/2014/04/15/mirroring-wikipedia/" target="_blank" rel="noreferrer noopener">local Wikipeida mirror</a>.</p>



<p class="wp-block-paragraph">So sadly I didn&#8217;t keep the source files as I thought they were evergreen, and yeah turns out they are NOT.  But thankfully there is a 2011 set on archive.org listed as <a rel="noreferrer noopener" href="https://archive.org/details/enwiki-20110620-item-1-of-2" target="_blank">enwiki-20110620-item-1-of-2</a> and <a rel="noreferrer noopener" href="https://archive.org/download/enwiki-20110620-item-2-of-2" target="_blank">enwiki-20110620-item-2-of-2</a>.  Sadly there isn&#8217;t any torrents of these files, and it seems as of today the internet archive torrent servers are dead so a direct download is needed.</p>



<h2 class="wp-block-heading">Getting started</h2>



<p class="wp-block-paragraph">You are going to need a LOT of disk space.  It&#8217;s about 10GB for the downloaded compressed data, and with the pages blown out to a database it&#8217;s ~60GB.  Yes it&#8217;s massive.  Also enough space for a <a href="https://cdimage.debian.org/cdimage/archive/7.11.0/amd64/iso-dvd/" target="_blank" rel="noreferrer noopener">Debian 7 VM</a>, or a lot of your time trying to decode ancient perl. Yes it really is a write only language. I didn&#8217;t bother trying to figure out why it doesn&#8217;t work instead I used netcat and a Debian 7 VM.</p>



<p class="wp-block-paragraph">Thanks to trn he suggested <a href="https://github.com/aria2/aria2" target="_blank" rel="noreferrer noopener">aria2c</a> which did a great job of downloading stuff, although one URL at a time, but that&#8217;s fine.</p>



<pre class="wp-block-code"><code>aria2c -x 16 -s 16 -j 16 &lt;&lt;URL&gt;&gt;</code></pre>



<p class="wp-block-paragraph">I downloaded the following files:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<ul class="wp-block-list"><li>enwiki-20110620-all-titles-in-ns0.gz</li><li>enwiki-20110620-category.sql.gz</li><li>enwiki-20110620-categorylinks.sql.gz</li><li>enwiki-20110620-externallinks.sql.gz</li><li>enwiki-20110620-flaggedpages.sql.gz</li><li>enwiki-20110620-flaggedrevs.sql.gz</li><li>enwiki-20110620-image.sql.gz</li><li>enwiki-20110620-imagelinks.sql.gz</li><li>enwiki-20110620-interwiki.sql.gz</li><li>enwiki-20110620-iwlinks.sql.gz</li><li>enwiki-20110620-langlinks.sql.gz</li><li>enwiki-20110620-oldimage.sql.gz</li><li>enwiki-20110620-page.sql.gz</li><li>enwiki-20110620-pagelinks.sql.gz</li><li>enwiki-20110620-pages-articles.xml.bz2</li><li>enwiki-20110620-pages-logging.xml.gz</li><li>enwiki-20110620-page_props.sql.gz</li><li>enwiki-20110620-page_restrictions.sql.gz</li><li>enwiki-20110620-protected_titles.sql.gz</li><li>enwiki-20110620-redirect.sql.gz</li><li>enwiki-20110620-site_stats.sql.gz</li><li>enwiki-20110620-templatelinks.sql.gz</li><li>enwiki-20110620-user_groups.sql.gz</li></ul>
</div></div>



<p class="wp-block-paragraph">although the bulk of what you want as a single file is enwiki-20110620-pages-articles.xml.bz2, which is 7.5 GB, downloading the rest of the files is another 10GB rouding this out to 17.5GB of files to download. Yikes!</p>



<h2 class="wp-block-heading">MySQL on WSLv2</h2>



<p class="wp-block-paragraph">I&#8217;m using Ubuntu 20.04 LTS on Windows 11, so adding MySQL is done via the MariaDB version with a simple apt-get install:</p>



<pre class="wp-block-code"><code>apt-get install mariadb-server mariadb-common mariadb-client mariadb-common</code></pre>



<p class="wp-block-paragraph">Installing MySQL is kind of easy although it will need to be setup to assign the pid file to the right place and set so it can write to it:</p>



<pre class="wp-block-code"><code>mkdir -p /var/run/mysqld<br>chown mysql:mysql /var/run/mysqld</code></pre>



<p class="wp-block-paragraph">Otherwise you&#8217;ll get this:</p>



<pre class="wp-block-preformatted">[ERROR] mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 "No such file or directory")</pre>



<p class="wp-block-paragraph">Additionally you&#8217;ll need to tell it to bind to 0.0.0.0 instead of 127.0.0.1 as we&#8217;ll want this on the network.  I&#8217;m on an isolated LAN so it&#8217;s fine by me, but of course your millage may vary. For me a simple diff of the config directory is this:</p>



<pre class="wp-block-code"><code>diff -ruN etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf
--- etc/mysql/mariadb.conf.d/50-server.cnf      2021-11-21 08:22:31.000000000 +0800
+++ /etc/mysql/mariadb.conf.d/50-server.cnf     2022-03-11 10:01:45.369272200 +0800
@@ -27,7 +27,7 @@

 # Instead of skip-networking the default is now to listen only on
 # localhost which is more compatible and is not less secure.
-bind-address            = 127.0.0.1
+bind-address            = 0.0.0.0

 #
 # * Fine Tuning
@@ -43,6 +43,11 @@
 #max_connections        = 100
 #table_cache            = 64

+key_buffer_size = 1G
+max_allowed_packet = 1G
+query_cache_limit = 18M
+query_cache_size = 128M
+
 #
 # * Logging and Replication
 #</code></pre>



<p class="wp-block-paragraph">As far as I know MySQL doesn&#8217;t run on WSLv1.  So people with that restriction are kind of SOL.  At the same time for me, Debian 7 doesn&#8217;t run on Hyper-V so I had to run VMware Player.  And well if you can&#8217;t run Hyper-V/WSLv2 then you can run it all on Debian 7 which is probably eaiser.  Although you&#8217;ll probably hit some performance issues in the import that either my machine is fast enough I don&#8217;t care or the newer stuff is pre-configured for machines larger than an ISA/PCI gen1 Pentium 60.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/mysqld-running-on-wslv2.png"><img loading="lazy" decoding="async" width="979" height="512" src="https://virtuallyfun.com/wp-content/uploads/2022/03/mysqld-running-on-wslv2.png" alt="" class="wp-image-11782"/></a></figure></div>



<p class="wp-block-paragraph">I run mysqld manually in a window as I am only doing this adhoc not as a service. Although on a Windows 10 machine to reproduce and test this, mysqld wont run interactively, instead I had to do the &#8216;service mysql start&#8217; to get it running.  So I guess you&#8217;ll have to find out the hard way.</p>



<p class="wp-block-paragraph">Next, be sure to create the database and a user to so this will work:</p>



<pre class="wp-block-code"><code>create database wikidb;<br>create user 'wikiuser'@'%' IDENTIFIED BY 'password';<br>GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'%' WITH GRANT OPTION;<br>show grants for 'wikiuser'@'%';</code></pre>



<p class="wp-block-paragraph">Something like this works well. Yes the password is password but it&#8217;s all internal so who cares.  If you don&#8217;t like it, change it as needed.</p>



<p class="wp-block-paragraph">With the database &amp; user created you&#8217;ll want to make sure  that you can connect from the Debian 7 machine with something like this:</p>



<pre class="wp-block-code"><code>mysql -h 192.168.6.10 -uwikiuser -ppassword wikidb</code></pre>



<p class="wp-block-paragraph">As I don&#8217;t think PHP 7 or whatever is modern will run the ancient MediaWiki version 1.15.5 (which I&#8217;m using).</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="375" height="149" src="https://virtuallyfun.com/wp-content/uploads/2022/03/wiki-versions.png" alt="" class="wp-image-11784"/></figure></div>



<p class="wp-block-paragraph">This is my setup as I&#8217;m writing this so bear with me.</p>



<h2 class="wp-block-heading">Prepping Apache</h2>



<p class="wp-block-paragraph">Since I have that Debian 7 VM, I used that for setting up MediaWiki. Looking at my apt-cache I believe I loaded the following modules:</p>



<ul class="wp-block-list"><li>mysql-client</li><li>mysql-common</li><li>apache2</li><li>apache2.2-bin</li><li>apache2.2-common</li><li>apache2-mpm-prefork</li><li>apache2-mpm-worker</li><li>apache2-utils</li><li>libapache2-mod-php5</li><li>php5-cli</li><li>php5-common</li><li>php5-mysql</li><li>lua5.1</li><li>liblua5.1</li></ul>



<p class="wp-block-paragraph">On the Apache side I have the following extension enabled:</p>



<pre class="wp-block-preformatted">alias authz_default authz_user deflate mime reqtimeout<br>auth_basic authz_groupfile autoindex dir negotiation setenvif<br>authn_file authz_host cgi env php5 status</pre>



<p class="wp-block-paragraph">Which I think is pretty generic.</p>



<p class="wp-block-paragraph">I used <a rel="noreferrer noopener" href="https://releases.wikimedia.org/mediawiki/1.15/" target="_blank">mediawiki-1.15.5</a> as the basis mostly because I had started with an incomplete 2010 dump, but after finding this 2011 dump I probably should have gone with 1.16.5 or 1.17.5.. Oh well.  When connecting from Debian 7 to my &#8216;modern&#8217; MariaDB there is one table that needs to be updated, otherwise it&#8217;ll fail.  A simple diff that needs to be applied (that was with the least amount of effort spent by me!) is this:</p>



<pre class="wp-block-code"><code>--- maintenance/tables.sql      2009-03-20 19:20:39.000000000 +0800
+++ /var/www/maintenance/tables.sql     2022-03-07 14:21:25.580318700 +0800
@@ -1099,7 +1099,7 @@

 CREATE TABLE /*_*/trackbacks (
   tb_id int PRIMARY KEY AUTO_INCREMENT,
-  tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE,
+  tb_page int,
   tb_title varchar(255) NOT NULL,
   tb_url blob NOT NULL,
   tb_ex text,</code></pre>



<p class="wp-block-paragraph">All being well and patched you can do the install!  I just do a super basic install, nothing exciting.  In my setup the MySQL server is on 192.168.6.10.  I don&#8217;t think I changed much of anything?</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-preinstall.png"><img loading="lazy" decoding="async" width="1568" height="2602" src="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-preinstall.png" alt="" class="wp-image-11787"/></a></figure></div>



<p class="wp-block-paragraph">And with that done if all goes well you&#8217;ll get the install completed!</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-postinstall.png"><img loading="lazy" decoding="async" width="1086" height="698" src="https://virtuallyfun.com/wp-content/uploads/2022/03/media-wiki-postinstall.png" alt="" class="wp-image-11788"/></a></figure></div>



<p class="wp-block-paragraph">If you get anything else, drop the database (the permission grants stay, because MySQL doesn&#8217;t actually drop thing associated with databases.. :shrug:.</p>



<p class="wp-block-paragraph">Next in the extensions folder I grabbed Scribunto-REL1_35-04b897f.tar.gz, <a rel="noreferrer noopener" href="https://extdist.wmflabs.org/dist/extensions/" target="_blank">which is still on the extensions site</a>. This required Lua 5.1 and the following to be appended to the LocalSetings.php</p>



<pre class="wp-block-code"><code>#
$wgScribuntoEngineConf&#91;'luastandalone']&#91;'luaPath'] = '/usr/bin/lua5.1';

$wgScribuntoUseGeSHi = true;
$wgScribuntoUseCodeEditor = true;
#</code></pre>



<p class="wp-block-paragraph">Keep in mind the original extensions I used are not, and appear to not have been archived, so yeah.</p>



<h2 class="wp-block-heading">Doing the pages.xml import</h2>



<p class="wp-block-paragraph">You can find the <a rel="noreferrer noopener" href="https://web.archive.org/web/20111126152510/http://meta.wikimedia.org/wiki/Data_dumps/mwimport" target="_blank">version 0.5 media wiki import script</a> on archive.org.  Obviously check the first 5-10 lines of the decompressed bz2 file to see what version you have if you are deviating and look around IA to time travel to see if there is a matching one.  I have no idea about modern ones as this is hard enough trying to reproduce an old experiment.</p>



<p class="wp-block-paragraph">First you need to make some files to setup the pre-post conditions of the insert.  It&#8217;s about 11,124,050 pages, give or take.</p>



<p class="wp-block-paragraph">pre.sql</p>



<pre class="wp-block-code"><code>SET autocommit=0;<br>SET unique_checks=0;<br>SET foreign_key_checks=0;<br>BEGIN;</code></pre>



<p class="wp-block-paragraph">post.sql</p>



<pre class="wp-block-code"><code>COMMIT;<br>SET autocommit=1;<br>SET unique_checks=1;<br>SET foreign_key_checks=1;</code></pre>



<p class="wp-block-paragraph">Running the actual import</p>



<p class="wp-block-paragraph">I&#8217;m assuming that 192.168.6.33 is the Debian 7 machine, 192.168.6.10 is the Windows 11 machine.</p>



<p class="wp-block-paragraph">On the machine with the data:</p>



<pre class="wp-block-code"><code>netcat 192.168.6.33 9909 &lt; enwiki-latest-pages-articles.xml.bz2</code></pre>



<p class="wp-block-paragraph">On the machine that can run the mwimport script:</p>



<pre class="wp-block-code"><code>netcat -l -p 9909 | bzip2 -dc | ./mwimport-0.5.pl | netcat 192.168.6.10 9906</code></pre>



<p class="wp-block-paragraph">And finally on the MySQL machine:</p>



<pre class="wp-block-code"><code>(cat pre.sql; netcat -l -p 9906 ; cat post.sql) | mysql -f --default-character-set=utf8 wikidb</code></pre>



<p class="wp-block-paragraph">Since I&#8217;m using WSLv2 the Windows firewall may screw stuff up so add a rule with netsh (as Administrator CMD prompt)</p>



<pre class="wp-block-code"><code>netsh interface portproxy add v4tov4 listenaddress=192.168.6.10 listenport=3306 connectaddress=172.24.167.66 connectport=3306<br>netsh interface portproxy add v4tov4 listenaddress=192.168.6.10 listenport=9906 connectaddress=172.24.167.66 connectport=9906</code></pre>



<p class="wp-block-paragraph">On my setup it takes about 2.5 hours to load the database, which will be about 51GB.</p>



<pre class="wp-block-preformatted">11340000 pages (1231.805/s),  11340000 revisions (1231.805/s) in 9206 seconds</pre>



<p class="wp-block-paragraph">The savvy among you may notice the -f flag to the mysql parser.  And yes that is because there *<em>will</em>* be errors during the process.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="979" height="512" src="https://virtuallyfun.com/wp-content/uploads/2022/03/wikidb-import-errors.png" alt="" class="wp-image-11785"/></figure></div>



<p class="wp-block-paragraph">I&#8217;m not sure what how or what to do about it, but without the -f (force) flag the process will stop around the 2 million row mark.  Doing it forced allows the process to continue.</p>



<p class="wp-block-paragraph">With that done I get the following tallies&#8230;</p>



<pre class="wp-block-code"><code>MariaDB &#91;(none)]&gt; SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES    WHERE TABLE_SCHEMA = 'wikidb' and
table_rows &gt; 0;
+---------------+------------+
| table_name    | table_rows |
+---------------+------------+
| interwiki     |         85 |
| objectcache   |         10 |
| page          |   10839464 |
| revision      |   11357659 |
| text          |   14491759 |
| user_groups   |          2 |
+---------------+------------+
9 rows in set (0.002 sec)</code></pre>



<p class="wp-block-paragraph">If all of this worked (amazing!) then search for something like 1001 and be greeted with:</p>



<figure class="wp-block-image size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2022/03/1001-a-non-odyssey.png"><img loading="lazy" decoding="async" width="989" height="672" src="https://virtuallyfun.com/wp-content/uploads/2022/03/1001-a-non-odyssey.png" alt="" class="wp-image-11792"/></a><figcaption>1001: a non odyssey</figcaption></figure>



<h2 class="wp-block-heading">MySQL disappointments</h2>



<p class="wp-block-paragraph">So with this in place, having some 51GB laying around just seemed lame.  Using WSLv2 I setup a compressed folder on NTFS and moved the data directory into there and it gets it down to a somewhat more manageable 20GB.  Since the data doesn&#8217;t change I had a better idea, SquashFS.  Well it compresses down to 12GB, HOWEVER for the life of me I can&#8217;t find anything concrete on using a read only backing store to MySQL.  Even general mediawiki stuff seems to want to write to all the tables, I guess it&#8217;s index searching?!  Insane!  And it appears MySQL can only use single file storage units per table?  Yeah this isn&#8217;t MSSQL with stuff like a database from CD-ROM with the log on a floppy.  I tried doing a union overlay filesytem but it makes a 100% copy of a file that changes.  That&#8217;s not good.  I guess using qemu-img for a compressed qcow2 with a writable diff file could hide the read only compressed backing store, but  I&#8217;ve already lost interest.</p>



<p class="wp-block-paragraph">Maybe it&#8217;s just me, but it seems like there should be a way to write logs/updates/scratch to a RW place, and keep the majority of the data read-only (and highly compressed).</p>



<h2 class="wp-block-heading">Why doesn&#8217;t stuff format correctly</h2>



<p class="wp-block-paragraph">There seems to be a lot of formatting nonsense going on, I probably should step up to mediawiki 1.17.  And I&#8217;ll add in loading the other SQL tables since they are straight up inserts.  Also the extensions I know I loaded don&#8217;t seem to exist in any form anymore, and the images I snapshotted of the install are all long gone.  It&#8217;ll require more diving around.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2022/03/10/setting-the-time-machine-for-june-20th-2011/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WSLg aka the killer feature of Windows 11</title>
		<link>https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/</link>
					<comments>https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Thu, 07 Oct 2021 00:51:12 +0000</pubDate>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Windows 11]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=11420</guid>

					<description><![CDATA[One of the great things about Windows 11 was the inclusion of the Windows Subsystem for Linux or WSL. It wasn&#8217;t available at launch but it started with v1 a simple ELF loader and an implementation of the Linux kernel &#8230; <a href="https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">One of the great things about Windows 11 was the inclusion of the Windows Subsystem for Linux or WSL.  It wasn&#8217;t available at launch but it started with v1 a simple ELF loader and an implementation of the Linux kernel on the NTOS kernel.  Being a re-implementation of Linux it was great for what did work, however many things did not.  Compared to other Unix subsystems for NT over the years however WSLv1 was the best no question.</p>



<p class="wp-block-paragraph">Not being enough however, Microsoft took a page out of the old WinOS/2 days and stubbed a Linux kernel to run under Hyper-V, allowing it to run far more applications, and for me giving the ability to use applications that alter memory space, and allowing i386/x32 applications to run.  You could happily export your X-11 display to a Windows based X server, and get applications that way.  But this isn&#8217;t 1993 so it was very limiting.</p>



<p class="wp-block-paragraph">Enter WSLg</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram.png"><img loading="lazy" decoding="async" width="1024" height="583" src="https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-1024x583.png" alt="" class="wp-image-11421" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-1024x583.png 1024w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-300x171.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-768x438.png 768w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram-500x285.png 500w, https://virtuallyfun.com/wp-content/uploads/2021/10/WSLg-diagram.png 1362w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p class="wp-block-paragraph">The big change is the ability to use RDP to hook both Wayland and Pulse Audio bringing Linux &#8216;desktop&#8217; X11 applications to the Windows desktop.  Also added in is virtual GPU capabilities allowing accelerated 3D, along with CUDA applications to run (although with a performance penalty.</p>



<p class="wp-block-paragraph">The downshot for me, is that my existing Debian 10 install was not picking this up, and was somehow picking up a VMware</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1.png"><img loading="lazy" decoding="async" width="436" height="418" src="https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1.png" alt="" class="wp-image-11422" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1.png 436w, https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1-300x288.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/vmware-graphics-1-313x300.png 313w" sizes="auto, (max-width: 436px) 100vw, 436px" /></a><figcaption>VMware llvmpipe</figcaption></figure></div>



<p class="wp-block-paragraph">I have no idea how or why it was picking this up.  While I did have the VMware Player installed, the newer versions backend through Hyper-V.</p>



<p class="wp-block-paragraph">I did find <a rel="noreferrer noopener" href="https://devblogs.microsoft.com/commandline/wslg-architecture/" target="_blank">this article</a>, which gave me a path to get where I wanted, although the transition of an existing v2 instance didn&#8217;t work for me.  Maybe Debian 10 is too weird. I don&#8217;t know.</p>



<p class="wp-block-paragraph">Not sure where how to proceed I backed up my home directory and un-installed VMware Player and purged my existing Debian 10. I installed thatÂ <a href="https://ubuntu.com/blog/announcing-ubuntu-on-windows-community-preview-wsl-2">Ubuntu Community Preview</a> which promises to include all the new and exciting features.</p>



<pre class="wp-block-preformatted">$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 2070) (0xffffffff)
    Version: 21.0.3
    Accelerated: yes
    Video memory: 40710MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2070)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.0.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.0.3
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00</pre>



<p class="wp-block-paragraph">Now this is looking MUCH better.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg.jpg"><img loading="lazy" decoding="async" width="1024" height="672" src="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-1024x672.jpg" alt="" class="wp-image-11423" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-1024x672.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-300x197.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-768x504.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg-457x300.jpg 457w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-wslg.jpg 1051w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>224FPS! FurMark</figcaption></figure></div>



<p class="wp-block-paragraph">Now compare this to a native version of FuMark:</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11.jpg"><img loading="lazy" decoding="async" width="1024" height="671" src="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-1024x671.jpg" alt="" class="wp-image-11424" srcset="https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-1024x671.jpg 1024w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-300x196.jpg 300w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-768x503.jpg 768w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11-458x300.jpg 458w, https://virtuallyfun.com/wp-content/uploads/2021/10/furmark-on-windows-11.jpg 1026w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>500 FPS</figcaption></figure></div>



<p class="wp-block-paragraph">So it&#8217;s a 50% haircut.  Ouch.</p>



<p class="wp-block-paragraph">Gaming however using steam (yes steam runs!) reveals some other deeper issues.  The mouse tracking is WAY off.  So for FPS stuff you&#8217;ll spend a lot of time staring at the ceiling or the floors.  The next issue is there is no mouselock, so things that rely on being able to move the mouse far beyond a screen length is impossible to play.  To be fair it&#8217;s a preview, and so far I have to admit Windows 11 feels more like a technical preview.  Also I don&#8217;t know what the deal is or anything about profiling it but <a href="https://store.steampowered.com/app/208580/STAR_WARS_Knights_of_the_Old_Republic_II__The_Sith_Lords/" target="_blank" rel="noreferrer noopener">KOTOR2</a> is insanely slow.  Although at least with 3d acceleration running it&#8217;s not 1 frame every 5 seconds.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2021/10/07/wslg-aka-the-killer-feature-of-windows-11/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>So I was building a Windows 2019 server</title>
		<link>https://virtuallyfun.com/2019/03/02/so-i-was-building-a-windows-2019-server/</link>
					<comments>https://virtuallyfun.com/2019/03/02/so-i-was-building-a-windows-2019-server/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Sat, 02 Mar 2019 14:03:10 +0000</pubDate>
				<category><![CDATA[arm]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Win32]]></category>
		<category><![CDATA[Win64]]></category>
		<category><![CDATA[Windows 2019]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=9250</guid>

					<description><![CDATA[As I got a &#8216;totally legit&#8217; serial code in my box of cereal. After the install I thought it&#8217;d be fun to install the Linux Subsystem. While following the powershell instructions here, I thought the list of quick links of &#8230; <a href="https://virtuallyfun.com/2019/03/02/so-i-was-building-a-windows-2019-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As I got a &#8216;totally legit&#8217; serial code in my box of cereal.</p>



<p class="wp-block-paragraph">After the install I thought it&#8217;d be fun to install the Linux Subsystem.</p>



<p class="wp-block-paragraph">While following the <a href="https://docs.microsoft.com/en-us/windows/wsl/install-on-server">powershell instructions here</a>, I thought the list of quick links of distros to download was interesting:</p>



<ul class="wp-block-list"><li><a rel="noreferrer noopener" href="https://aka.ms/wslubuntu2004" target="_blank">Ubuntu 20.04</a></li><li><a href="https://aka.ms/wslubuntu2004arm" target="_blank" rel="noreferrer noopener">Ubuntu 20.04 ARM</a></li><li><a href="https://aka.ms/wsl-ubuntu-1804">Ubuntu 18.04</a></li><li><a href="https://aka.ms/wsl-ubuntu-1804-arm">Ubuntu 18.04 ARM</a></li><li><a href="https://aka.ms/wsl-ubuntu-1604">Ubuntu 16.04</a></li><li><a class="" href="https://aka.ms/wsl-debian-gnulinux">Debian GNU/Linux</a></li><li><a href="https://aka.ms/wsl-kali-linux">Kali Linux</a></li><li><a href="https://aka.ms/wsl-opensuse-42">OpenSUSE</a></li><li><a href="https://aka.ms/wsl-sles-12">SLES</a></li></ul>



<p class="wp-block-paragraph">That&#8217;s right ARM Linux userland! I still have high hopes for Windows on ARM (I have 2 Windows RT devices now!!) although I&#8217;m not holding my breath.</p>



<p class="wp-block-paragraph">Maybe there will be some ARM boards that are suitable for the desktop that aren&#8217;t over 1k USD.. That&#8217;d be nice.</p>



<p class="wp-block-paragraph">Interesting trivia is that the Linux Subsystem started it&#8217;s life on ARM as a way to run Android binaries on Windows Phone.  And true to everything Microsoft does, it got to the point where it could start to run things (albeit poorly) and was summarily killed.  Although it&#8217;s found life despite the original false start as a general &#8216;text mode&#8217; subsystem for Windows.</p>



<p class="wp-block-paragraph">However running Linux binaries on Windows currently just shows that NTOS isn&#8217;t as efficient as the Linux kernel when it comes to emulating the Linux ABI.  Although this was the original &#8216;dream&#8217; of the microkernel, and a POSIX subsystem for NT was always part of the original design, although it really was more of a checkbox for GSA contracts, and outside of being able to use pax &amp; vi it really was handicapped by not having BSD extensions, and especially by not having any access to the TCP/IP stack.</p>



<h2 class="wp-block-heading">EDIT*</h2>



<p class="wp-block-paragraph">I should add these notes from the future past for the future me, when messing around with Windows Server 2019 build 1809 when they finally brought the Linux Subsystem into the fold.  Unpacking the distribution and running the &#8216;setup&#8217; sets it up DIRECTLY into that directory.  So put it where you want it.</p>



<p class="wp-block-paragraph">When you mess that up, you have to use the <a href="https://docs.microsoft.com/en-us/windows/wsl/wsl-config">wslconfig</a> program!</p>



<p class="wp-block-paragraph">Of note is:</p>



<p class="wp-block-paragraph"><code>wslconfig /list /all</code><br>Lists all distributions, including ones that aren&#8217;t currently usable. They may be in the process of installing, uninstalling, or are in a broken state. </p>



<p class="wp-block-paragraph"><code>wslconfig /unregister &lt;DistributionName&gt;</code><br>Unregisters the distribution from WSL so it can be reinstalled or cleaned up. </p>



<p class="wp-block-paragraph">This way you can now clean up your mess, and get Linux installed right.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2019/03/02/so-i-was-building-a-windows-2019-server/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
	</channel>
</rss>
