Skip to main content

Posts

Showing posts with the label windows

Emacs on WSL2: From Monochrome Misery to Modern Elegance

Windows Subsystem for Linux (WSL) has come a long way—especially under Windows 11 . WSL2 now offers smooth integration for Linux graphical applications, making it feel less like a compatibility layer and more like a native experience. But if you're an Emacs user, you might have noticed something off. Launching Emacs under WSL can feel like stepping into a time machine. Tiny fonts, washed-out visuals, and a UI that evokes the green-and-amber glow of vintage terminals. Functional? Yes. Pleasant? Absolutely not. But here's the good news: it is easy to make Emacs under WSL2 look just as sharp and modern as it does on Mac OSX . The emacs-pgtk build is designed for better graphical integration under WSL. It uses the Pure GTK interface , which plays nicely with WSL’s GUI support. sudo apt install emacs-pgtk To make Emacs look great, we’ll use Windows’ rich font library. First, edit your font configuration: sudo emacs /etc/fonts/fonts.conf and add the Windows Font directory...

Python on Windows 10

Last weekend I wanted to clean up my python installation on Windows 10. In the past, I used a combination of Anaconda, Python app from the Windows Store, and Python distributions from python.org. Most of these were older versions that I have not updated in a while since I spend most of my time in WSL. I started by deleting everything and cleaning up the installs. Afterwards, I downloaded python 3.8 from python.org, and proceeded with the installation. I selected install python for everyone and adding it to the %PATH% environment variable. After the installation completed everything worked like a charm, until I started installing packages. I started with installing TensorFlow: pip install tensorflow and got a cryptic error that one of the TensorFlow files was missing. A quick internet search revealed that it is due to a missing setting for long filenames in Windows 10.   Following the instructions in this Stackoverflow post to enable long filenames option in the loc...

Upgrading from WSL1 to WSL2 on Windows 10

I have been using WSL1 for a long time now and have been extremely pleased with it. After setting up Cygwin/X server, I don’t have a need for running Linux in a VM anymore. With the new Windows update, WSL is changing to support GPUs and GUI applications, so I decided to upgrade my install to make use of these improvements once they are shipped.  The upgrade path is easy: you can choose to configure a new WSL2 environment, or you can migrate your existing one. I decided to upgrade my install, since I had a lot of packages installed, and did not want to reinstall and configure them in a new environment again.  First, I started by getting everything I have in my Ubuntu environment up to date:   sudo apt update  sudo apt upgrade  Then in a windows command prompt, I updated my default WSL environment to version 2:   wsl –set-default-version 2  WSL2 requires Virtual machine platform support, and if that is not enabled, you can easily enable it throu...

Windows 10 May Update v2004

I upgraded all my devices to the Windows May update, all but my new Surface 3 laptop. Whenever I checked manually for the system updates, I got nothing, apart from the occasional Windows Defender updates. For a week I checked religiously, and when I did not get any notifications, I started searching online to see if there were any issues with my device. It turns out that there were. There is an issue affecting the Surface 3 laptop, and other devices that use an always on, always connected networking. The issue blocks the update for these devices, per the Known Issues and Release Problems page since it leads to random restarts or crashes. The issue is currently under investigation, and once resolved, the surface will get the update. I will wait till then. Interestingly there are recommendations online to circumvent the block on the Surface, by using the Update Assistant Tool , or the media creation tool. I don’t recommend either, unless you enjoy bricking your laptop. Luckily the a...

WSL and X11 applications

I have been using the Windows Subsystem for Linux for a long time now and have been pretty pleased with it for text-based applications. When I need to use a graphical application, I fire up Hyper-V with a full Ubuntu install, and mount my local drives to access my directories and files. The heavy-handed solution worked well for a long time now, but over time I found I was installing the same set of programs I used frequently in both places. There must be a better solution. If only I could run graphical applications on WSL. Turns out there is a way.   I searched for a free X11 server that I can install on Windows 10 and found a couple that were highly rated. I also remembered that when I used Cygwin long time ago, it came with its own X-server, and wondered if I can install that separately, since with WSL I did not need Cygwin as a whole. It did, and I installed Cygwin/X server and fonts. After the install, I ran Xlaunch, which ran a configuration wizard to start the X-serv...

Virtual machine could not be started because the hypervisor is not running

I wanted to experiment with TensorFlow, and decided to do that in a Linux VM, despite the fact that Windows Subsystem for Linux exists. In the past I used Sun’s, and then Oracle’s VirtualBox to manage virtual machines, but since my Windows install had Hyper-V, I decided to use that instead. The virtual machine configuration was easy, with disk, networking, and memory configurations non-eventful. However when I tried to start the virtual machine to setup Ubuntu from an ISO, I was greeted with the following error: “Virtual machine could not be started because the hypervisor is not running” A quick Internet search revealed that a lot of people have faced that problem, and most of the community board solutions did not make any sense. The hidden gem is this technet article , which included detailed steps to find if the Windows Hypervisor was running or not, and the error message if it failed to launch. In my case, the error was: “Hyper-V launch failed; Either VMX not present or...

A week with Edge

I have been using Internet Explorer ever since I switched back to Windows, and have been satisfied with it. Apart from its end of life status, and a couple of annoying bugs when I have more than 10 tabs open, it has served me well. With the latest Windows 10 update, I wanted to try the next generation browser: Edge. Going in, I knew that Edge is not a finished product, and that it has a long way until it competes with the other established browsers on the market. Nevertheless I decided to give it a try. My first experiences with it were positive: it is light weight and very fast, and when I have many tabs open it does not suffer from the same feat as IE does, where the browser hangs randomly and the abominable recover web page ribbon appears at the bottom of the screen. I was also surprised when I did not end up using the cool new features such as the readability view and web notes as much as I thought. I liked the integration with Cortana through the context menu, which I ca...

Limited Wi-Fi Internet connectivity

While using my preview build of windows 10, sometimes I face the dreaded "Limited Wi-Fi Internet" connectivity issues, where the Wi-Fi adapter seems to be connected to the Wi-Fi router, but full Internet access is not possible. I often attributed these issues to quirks in the preview builds, and a simple computer restart--reminiscent of the older Windows releases--seemed to fix the issue. But not yesterday, where multiple restarts did not ease the pain. Even deleting the Wi-Fi network and recreating it again did not help. The dreaded "Limited Wi-Fi" banner under the Wi-Fi network name continued to rear its ugly head. Luckily I had an Ethernet cable handy, so I hard wired the laptop and checked online to see if others have faced a similar issue. There was a considerable number of people experiencing the issue, with various solutions. The one that made sense for me was a bad wireless driver install, which was easy to fix. Before you attempt to replicate the solut...

The Lumia 640XL

Over the long weekend I got a Nokia Lumia 640XL phone. I decided to graduate to the new ridiculously large screen size phone after sticking with the more manageable screen sizes of the iPhone 5 and its predecessors. I would have stayed within the iOS/Android eco-systems, but I wanted to give a Windows phone a try, and see why the platform has not been successful in the past. The phone is nice and relatively inexpensive ($240 without a contract), with a ridiculous screen size, great graphics and battery life. The screen size is a blessing when reading emails, Kindle books, and surfing the Internet, and I believe my usage has increased accordingly. The screen is sharp, and the sound quality of calls is great. With heavy email and web browsing the battery lasted 2 days. The phone comes with crippled memory though (8GB which used be good, but after years of using iOS phones, it is not enough). Luckily the phone is expandable through Micro SD cards, and a 128 GB MicroSD would set you b...

Back to Windows

I joined Microsoft a couple of weeks ago, and after 15 years of only using Macs and OS X for my work and personal computers, I traded both for their Windows equivalent. For my laptop, I got a Lenovo X1 Carbon that is growing on me. It reminds me of my Mac Book Air: it is very light, with a great design, and an excellent battery life—with a ton of applications running, I usually get 6 or 7 hours of battery life. And the icing on the cake is the touch screen, and the great tactile feel ThinkPad keyboards are well known for. The laptop had Windows 8.1 on it, but since I have access to any Windows build, I decided to image it with a prebuild of Windows 10. After a couple of weeks of usage, I can safely say I like Windows 10. It has definitely come a long way since the last time I used it 15 years ago.   For one, hibernation and wakeup are much faster now, and file operations—which I remember were slow and infuriating, are now acceptable. I also like Cortana, and the ne...

My very old Samsung ML-1210 printer

I have an old Samsung ML-1210 printer  that is more than 10 years old. Despite its age, the printer is still in an excellent condition: it prints high quality PDF documents reliably albeit slowly, and satisfies my needs. But because of its age, it is hard to find a working native driver for Mac OS X, as Apple stopped supporting the printer in Lion, and Samsung stopped supporting the drivers after 2005. I could of course retire the printer, and buy a new one that is faster, and cheaper, but I tried to find another route where I continue using my old trusty printer. Luckily, one exists through CUPS on Mac OS X, by using  ghostscript, foomatic-rip, and samsung-gdi . The packages on the page are for Mac OS X Lion, but I found them to work for later versions as well. The only inconvenience of using these packages is that you have to re-install them after every Mac OS X upgrade. With the latest Yosemite upgrade,  the packages broke because of sandboxing,  where foomat...