1

One of my friends recently asked me if it was possible to run a GUI application in ubuntu without installing a desktop environment. He had a machine at work which functions as their server. Therefore, there isn't any DM or DE installed on it. He wanted to run a browser on it without installing a DE which will clutter things up. While one solution is to install a lightweight desktop environment like xfce or lxde, I decided to figure out a solution which will work without any. I will be posting my solution below because I could not find anything that would work online and I feel that this could help others facing this problem. Feel free to make any suggestions or to suggest alternative solutions.

*My solution works with Firefox but not with Chrome. The details are down below. If someone figures it out please do leave a comment.

  • Have a look at this video I did to show how a minimal custom DE can run with only 160MB of RAM, and even less if you don't run some of the options I have. I also installed Chrome. Check my other videos to see how I configured it from scratch. It's quite easy and very lightweight. I don't even have a DM installed in my video #2, but it's a full functioning DE. – Dorian Jan 5 '17 at 23:36
1

Install xdm and Firefox using the following command:

sudo apt-get install xdm firefox -y

Make the a .desktop file with the following contents:

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/bin/firefox
TryExec=/usr/bin/firefox
Name=Firefox
Comment=Testing

I named mine firefox.desktop but you can name it whatever you want.

Paste this file into /usr/share/xsessions using the following command:

sudo mv firefox.desktop /usr/share/xsessions

Finally, start xdm using the following command or restart your computer, and choose firefox as your desktop manager.

sudo service xdm start

In order to quit, press Ctrl+Alt+F1 to enter terminal mode. From here you can shutdown your computer or restart the desktop manager in order to log into a different desktop environment.

*I used xdm because it is lightweight but any other desktop manager such as lightdm, gdm or sddm will work too.

**When I tried this with Google Chrome, I ran into a problem. The window was not covering the entire screen and there was black space around it. If someone figures out how to fix this, please do comment it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.