Welcome to The Command Line. In case you missed the announcement, The Command Line is our brand new, ongoing series that explores Linux support, a.k.a. Crostini on Chrome OS. The inaugural post of this new series spurred a lot of great questions and conversation around the relatively new Chromebook feature and we believe that the potential that Linux apps bring to the table is much larger than many may realize. Because of that, we want to spend as much time as we can test the limits of Crostini to tap into that potential and help you get the most out of your Chromebook.
In the midst of conversations about Linux on Chrome OS, the subject of a full desktop environment came up and that’s exactly what we’re diving into today. While you can install Linux apps to your heart’s content from the terminal and those apps will have their own GUI (graphical user interface), a lot of users still want to have an actual desktop with shortcuts, widgets and what have you. Personally, I’ve grown to love the fact that Chrome OS doesn’t even have the ability to have a cluttered desktop but I also know that many users have long asked for the ability to add widgets to the desktop and that’s fine but I don’t particularly believe it’s on the roadmap. Linux users who make the switch to Chrome OS may want a desktop environment simply for the familiarity and that’s totally understandable. Therefore, I set out to see if it would be feasible to put and actual Linux desktop on a Chromebook. Here’s what I came up with. If you’re not a video type, the steps are detailed below.
Before we get started with installing the desktop, make sure you check out our how-to on getting started with Linux on Chrome OS. This will ensure your Linux environment is up-to-date and ready for the next steps. If you’re all set, let’s dig into installing the KDE GUI for Linux on your Chromebook. KDE is not a Linux distribution but instead, it is a GUI or skin for Linux. It will give you a customizable desktop that can have widgets, notes, app shortcuts and more. However, since Linux runs in a container on Chrome OS and apps are treated like windows regardless of their flavor, KDE will be treated just like a Chrome window or any other app on your device. You will be able to switch between KDE and other apps by swiping up with three fingers and KDE can be moved between virtual desks to create the feel of having two operating systems side-by-side.
Now, let’s begin the installation process. First, you will need to open a new terminal session. You can find the terminal in your app launcher. Before I installed KDE, I updated my UNIX password just in case I needed to use it inside of KDE. I’m not sure what the default password is in Chrome OS/Linux so resetting it is the safe way to prevent any hangups. Set a new password by putting the following snippet in the terminal and hitting enter. You will be prompted to enter your new password twice and a notification will let you know that you have succeeded.
sudo passwd root
Now we’re ready to install our desktop environment. Copy the code below and paste it into the terminal. Hit enter and when prompted, select “Y” to confirm the installation. This process will take at least a half an hour or more. So, now would be a good time to go grab a sandwich, make some coffee or maybe fire up Stadia for some Destiny 2 time. Don’t worry, if something is borked after installing KDE, you can easily turn Linux apps off in the Chrome OS settings menu and start over with a clean slate.
sudo apt-get install task-kde-desktop
You now have KDE installed. You can launch the new desktop using the command
startkde from the terminal. I ran into a display error the first time I tried this. It is simply an error firing the desktop that is related to starting the X server. If you see this display error, add the snippet below to the terminal and hit enter to add the command to your Linux files. If you don’t see the error, skip this step.
cp /etc/X11/xinit/xinitrc ~/.xinitrc
Once your desktop is up and running, you can right-click anywhere to customize it by adding widgets, new backgrounds and themes and shortcuts. Any applications you have previously installed from the terminal will also show up in KDE’s application menu as will any future installs. So, there you have it. A “full” desktop environment right there on Chrome OS. Once you close the terminal or power down your Chromebook, you will have to restart KDE with the command above but all of your desktop settings will be saved.
Again, I’m not a big fan of cluttered desktops and for most, this won’t be a viable solution to Chrome OS’ lack of that feature but I felt like it was worth a try to see if it would work and it did. That’s what The Command Line is all about and we’re excited to see what other neat things we can do with Linux on Chrome OS. That said, we’d love to hear from you. Is there some app or interface you’d like to see on Chrome OS but are a little hesitant to try it out? Drop a comment below and I’ll see if we can figure it out. Who knows? You could be the subject of the next episode. See you next time.