I’m getting older and older, and I assume it’s not going to change…
For about 20 years now I use Linux as a Desktop every day. Today, I am feeling too old to solve basic problems that should not happened to a end user. When I am in a meeting and I have to present something, I don’t want anymore to be afraid because my last update, might have broken something that will prevent me to perform a smooth presentation. Those problems do not happen every day of course, and many times are very easy to solve, however and you know that, they always happen at the wrong time. I cannot say to people in front of me (who are not using an hippie OS), that it is a known bug and I need 15 more minutes to perform something that every end-user desktop is able to achieve instantly. Few years ago I was very happy to be able to very fine tuned my operating system, and I spent a lot of time on it, today my priorities have changed, and I want something working all the time.
I am not saying that Linux is a bad operating system, on the contrary, it is amazing, I love it and I won’t be able to work without it. Even for desktop, if you have time, if you are motivated, you will be able to get exactly what you want, and it will perfectly fit your workflow… However It may be broken during the next update and you will need to work on it again and again. Maybe 5 minutes will be sufficient, but those 5 minutes will happen at the wrong time. At least it is my experience. Today I want a working desktop every time, even after updates and I do not want to spend time and energy to fix new issues in order to keep the exact same level of features. If I spend time, it is to get more features, not anymore to keep the same working features.
Few years ago I personally bought a Mac book pro in order to do photo editing using Lightroom and Photoshop. Using these software inside a Windows virtual machine in a Linux host, was not really very efficient… I was impressed by the quality and the usability of OS X. In addition, I am not a big fan of Windows, even if it is probably now a really good operating system. The desktop operating system is therefore quite obvious for me and it will be Mac OSX, due to its amazing hardware (I never found a touchpad like the apple ones), and also because it is an operating system that is closer to Linux than Windows (homebrew and macports can even help me to feel like at home). I never tried WSL on Windows, maybe I should.
Finally, it is also for me a way to improve my skills in OS X, because it is more and more use in companies and therefore it could be quite interesting in my job.
But… I need Linux !
As I said before even if I am fed up with Linux as a desktop, it is a really amazing operating system, and I cannot work without it. In addition, in my day to day job this operating system is almost mandatory for my activities, therefore losing Linux is not an option, I must have this operating system on my computer available and running. I often work with network oriented stuff and for that I think that Linux is still the best operating system.
The features I need in general are quite limited:
- Use of terminals
- Use of a browser
- Rarely use of specific GUI applications such as IDA or Ghidra
I think that for everything that needs a graphical interface, I can use OSX. Chrome/Firefox browsers are available on OSX, and it is the same for IDA/Ghidra. Except if I missed something, which is probably the case, my only needs with Linux are console oriented (command line, editors…) and therefore I don’t really need an X environment. However, I really like to work with a tiling window manager, and losing the tiling feature is not possible for me. I used to work with XMonad, but because I was always crying blood when I wanted to change my configuration due to my haskell skills, I changed to awesome. These window managers are of course not available to OSX, but I really need the tiling feature for my terminals and I probably can use tmux for that.
My goal is therefore to run a console-only Linux operating system in a virtual machine, on top of MAC OSX, in order to get the best of the two worlds:
- The end-user desktop that just works with OSX
- The flexibility and the power of the Linux operating system for all my technical work
Nevertheless, I am not stupid and I know that I won’t have only the benefits of these two worlds, and I will also have to do with the constraints and the drawbacks of these two worlds. I just hope, that benefits will be higher than drawbacks. You know, expectations vs reality…
The setup I am going to describe is just the first one I want to try. Depending on the results, problems and my feelings it is probably going to evolve, and I will update this blog post (or write another) to share my next choices and difficulties on this subject.
On my personal MAC, I already use the parallels software to run a Linux and a Windows operating system. It works pretty well, and I never encountered some difficulties. I do not use it a lot, but each time it was the case, it has worked. I do not like the need to install parallels tools, which are a kind of kernel modules used to improve X performance, to add some features like sharing the copy/paste buffer between the guest and the host or to provide some sharing folders between both systems. While I won’t use X on my Linux VM, I still want to have a shared folder between OSX and Linux. So unfortunately I will need those parallels tools.
It’s a first drawback to that solution, because for example when I tried to install ArchLinux, parallels tools just did not compile because the kernel was to recent. Even if I successfully compile those tools, I am going to have some problems for the next kernel updates. It is really something I would like to avoid. I had no problem with the last Ubuntu, however I know that it will happen some day.
I could use VMWare fusion, but it is exactly the same problem as parallels, with some proprietary tools to setup and therefore the same drawbacks.
The last solution is to use qemu. It is probably the long term solution, because I could really fine tuned my virtual machine to only embed the strict minimum, and therefore being very light. Right now I am not skilled enough to go to this solution, even if I made multiple tries. I had some troubles with the network and with the shared folder between OSX and Linux. I will try to develop that solution in the coming months (and write some blog post to give you a feedback), but right now the usability is too random for me.
My temporary solution therefore will be parallels and I am going to cross my fingers in order to not have to many troubles with the parallels tools.
My Linux needs to be on the same network as my Mac computer, meaning that I am going to bridge my OSX network interface (wireless or wired depending on the use case) with the network interface of my Linux. Sometimes I need to setup a network server that needs to be accessed from outside (I don’t want to play with OSX NAT), sometimes I need to really have the same network addresses that the targeted network… So bridging is the only real solution for me. It works well with parallels and I don’t really need the parallels tools for that. Maybe with those tools, performance are better, I don’t know for now.
I am pretty sure that for some exceptional cases, I would have some troubles because I am not directly connected to the network, but through a software bridge. We will see.
In addition to this bridge interface, I also need a host only interface that I am going to use for OSX/Linux communication without communicating with the outside.
I want to have a shared folder between my OSX and my Linux VM for obvious reasons. Parallels, thanks to the parallels tools that are mandatory for this feature, provides this feature. In addition to this virtual filesystem, I am going to also provide a network share for the same data, just in case this virtual filesystem does not work anymore because of the parallels tools. SMB, NFS, sshfs… Right now I do not know what will be my backup, I need to do some tests. Of course this network share will use the host only interface.
The administration of the Linux VM will be for the moment done using SSH. A SSHD server will be listening on my Linux VM and I will connect to it through the host only interface. Indeed, if I loose the network, I won’t loose my VM access. In addition, the SSHD server will only listen on my host only IP address for obvious security reasons.
I really do not like to be able to use SSH for administration of my VM that runs locally… It is not efficient. In the future, I need to find a kind of serial link to perform that administration, getting rid of the encryption layer which really not adapted in that very specific case.
As I said before, I need the tiling feature for my terminals. For that I am going to use tmux with iterm2 on OSX. I use tmux regularly and it works pretty well. I have successfully adapted its configuration to really suit my needs and linked to iterm2 I have nearly the same level of features (at least the ones I used) in term of window management (layout, creation, mouse control…) than with awesome. I still need some adjustments, but I am quite happy for the moment. I have reconfigured all the shortcuts to be able to navigate through windows, panels with the same keys that awesome. I have sometime some conflicts with OSX shortcuts that I need to work on.
I did not look for iterm2 alternatives, maybe some better solutions exist. When everything will work perfectly I would take some time to get a look to its alternatives.
Before changing completely from a Linux to an OSX desktop in my day to day job, I first need to use this new setup on my personal computer. For the moment, it works pretty well, even if I already see some drawbacks (parallels tools, shortcut conflicts with OSX…). I am also a bit afraid to encounter a use case that I did not think before and that may call into question the whole setup. I will share my thoughts after some months of use for this new setup. If you have any experience, or advises on that subject do not hesitate to share them with me on twitter or directly by emails.