On Microsoft Windows you can replace explorer.exe with your own custom application by changing a value in the registry. When Windows boots it will start myExplorer.exe in stead of explorer.exe, completely replacing the graphical interface.
Is this also possible on Linux and Apple systems? Has anybody here done this already? How does it work?
Thanks in advance.
Top comments (6)
It's possible on Linux, and arguably, its easier. Think of Linux as basically a giant bucket of LEGOs: you pick the pieces you want and put them together.
(Incidentally, it is not uncommon to have multiple DEs installed at once, and just select the one you want at the login screen.)
If you only want to change your default filesystem browser, you can do that as well. Instructions vary between DEs. (It's also totally possible to have multiple filesystem browsers installed.) A few popular choices are...
Regarding changing the command line shell, Den McHenry recently wrote an article here on dev.to about that.
Woa thanks for your response. Useful information. I am not looking to replace just the file explorer but also the desktop, getting rid of the default task bars and other navigation. I am sort of experienced with Lego (servers / build environments) but I have barely used a desktop version. A little bit of Ubuntu and some Fedora in a previous life.
When running a custom explorer it is still possible to start the original explorer.exe from Windows but it behaves differently. As a process, it only shows the file explorer and not the desktop or start menu but you probably know this.
My application is a full screen Chromium window with access to the operating system APIs, very similar to Electron. It can be compiled for all three platforms. On Windows this executable becomes the desktop so I set a background color/image on the page body, designed desktop icons and stuff like a task bar in HTML/CSS with JavaScript APIs. The icons on the desktop reflect / are populated by the file system.
This 'proof of concept' works perfectly on Windows. The application itself is not finished and lots of features still need to be added but the fundamentals are operational so it is simply a matter of finishing the thing and no longer researching if/how it is possible in the first place. The next step for me here is duplicate it on another operating system.
Let's say I want to start with the latest Ubuntu desktop. Would you be so kind as to elaborate a bit more and describe the steps required to reproduce the Windows situation? I want to prevent operating system specific implementations as much as possible. That means if the taskbar is part of the desktop 'window' on Windows it should not be a completely separate process or LEGO block on Linux. I am willing to rethink / rewrite some of my current implementations if it leads to consistency. For instance if Apple and Lego do have the task bar as a separate process or something then I will strip my task bar from the desktop and make it a separate process.
Hmm. Perhaps somewhere here in this also lies the answer to an unsolved problem. The z-index of the task bar. All applications started by myExplorer.exe are on top. (the desktop has the lowest z-index) This means all other application windows are on top of it and overlay the task bar if you maximize them or drag them to the bottom. On Windows the task bar remains in the foreground. I have yet to get the task bar to stay on top but not the desktop. Perhaps separating them into two processes and calculating the window dimensions could work. (though Windows doesn't do it this way)
Regarding replacing the command line shell, simply replace cmd.exe the same way you replace explorer.exe, right?
Linux is built quite differently from Windows. It isn't just a matter of "replacing" a binary file, as you'd be liable to completely break something.
What you are literally describing is creating your own desktop environment. This is no easy task, and is considerably beyond my own experience level. You will need to have a deep understanding of Linux in general before you undertake this. Even learning aside, understand that you are looking at years of dedicated effort to achieve your goal.
Now, again, if you only want to create a file browser, that's a little simpler, and probably fairly easily achievable. You might also fork an existing desktop environment, or create Add-Ons for extensible DEs, such as GNOME, MATE, or Cinnamon.
As to how to switch things out on Linux, there are a ton of tutorials. DuckDuckGo for 'em.
You are right. I am literally describing creating a desktop environment. I already did that actually, but for Windows. Since the application can be compiled for all three platforms I figured it can also replace the desktop environment on all three platforms too.
For the command line shell, there's an actual command to do it: chsh. Look at
man 1 chsh
for the details, but it's simply changing your entry in/etc/passwd
.I usually switch my interactive shell to Fish, and then keep Bash about for more programmery things.
Hi,
On GNU-Linux systems, you have Desktop Environments, which use their own tool to configure their default file manager. You have also window managers (WM) like Openbox or Awesome. If you want to use a WM, you have to configure yourself all the applications you need to have a functional desktop, but you'll have a lightweight and custom GUI. Find some distro and test a live CD to have a more personal opinion. Welcome in the GNU-Linux community!