I want to do a small computer just for internet browsing. I dont want to load a desktop environment to keep RAM, CPU and GPU ussage as low as possible. The computer is going to run on a ARM CPU. I dont care with Distro I use, I thought about good old plain Debian.
-
Then I would like to suggest ubuntu minimal iso and install blackbox DE – Tachyons Jun 20 '13 at 15:04
-
I'm not really an expert, but I'd suggest to take a look at the xsession configuration (there's a man page for xsession). If you only want this behaviour for one user, make a file in the users home directory named .xsession and put the command you want to run in it. Then you probably have to use a login manager that allows you to log into default xsession instead of some other desktop environment (or disable the login manger and use startx instead). Nevertheless, I'd recommend to instead use a ressource saving window manager (Tachyons suggested blackbox, and there are numerous others). – soulsource Jun 20 '13 at 15:19
-
If you do not load the desktop environment how are you supposed to open the internet browser? – dlin Jun 20 '13 at 15:48
-
5@Nick You can. With a plain X server as 'session' without a window manager you can run exactly one application full screen (without borders or other decoration). This is how these minimal XBMC distributions work for example. I did this with Chromium once a few years ago in 10.04 - but I didn't save the exact configuration. – gertvdijk Jun 20 '13 at 16:10
-
"I thought about good old plain Debian." If you are considering other distributions than Ubuntu, then you should ask this on Unix & Linux StackExchange instead. This Ask Ubuntu site is only for Ubuntu - non-related to Ubuntu questions are considered off-topic here. – gertvdijk Jun 20 '13 at 16:12
-
If you do not want to run X, try an alternate application that does not require X. See http://inx.maincontent.net/ as well as http://www.terminally-incoherent.com/blog/2007/05/21/a-day-without-x/ If you tell us what application we can suggest alternates. If you must run X, based on your question, I also suggest a light weight WM such as open or fluxbox. On Gentoo, I run openbox on 60 Mb RAM. – Panther Jun 20 '13 at 16:36
4 Answers
I know this one is outdated, but I couldn't see the correct answer for the request as I understand it, so here it goes:
I've had a project for creating an embedded system running a specific graphical java application on a simple computer with an Atom processor and a touch screen. My decision was to avoid the use of window managers as such, to keep it a) simple, b) light, and c) avoid all kind of system messages bursting to the screen.
The system looks like this:
Installing the base Ubuntu system, lightest variant of 12.04 (still close to 1GB, but ok for me even on a 2GB flash disk). You can torture it a bit to make a smaller installation, of course, there are several ways for that. Also, you don't have to use Ubuntu, but then my instructions below should be reviewed - there are differences between distributions, especially on configuration files and their locations.
Installing the xorg and some other nice pieces of helpful software, like the xinput-calibrator for my resistive touchscreen, ifplugd for live ethernet connection detection, acpid for power button operation detection and so on.
Open /etc/init/tty1.conf and change
exec /sbin/getty -8 -i 38400 tty1
line to something likeexec /sbin/getty -8 -i 38400 tty1 -a username
, where "username" is the name of the user you want to auto-login.To start the X session automatically, open your user's .bashrc file
~/.bashrc
and add something like this to the end of the file:if [ $(tty) == "/dev/tty1" ]; then while true; do startx -- -nocursor -depth 16; echo "Again [$?]..."; done fi
(The -nocursor stuff is for touchscreens, remove it for normal screen to see the mouse pointer) This will respawn the X server, so if your application quits for any reason, it will restart the X server automatically.
Now in your user's .xsession file,
~/.xsession
, write something like this (remember that each command here is executed in series, so use the & symbol at the end of the line if you want to launch a server):xrandr --output VGA1 --mode 800x600 #For setting a video mode xrandr --fb 800x600 #Not always required, sets the framebuffer size xsetbg -center background.png & #To set the background, comes from the xloadimage package xset -dpms s off #To avoid screen going blank after a while ~username/start.sh #Start your application #You can put some other application calls here that will be run when your application exits
There are plenty of other things to consider for such a system, this is only the basic setup. Hope it helps someone. Good luck.

- 431
In
/usr/share/xsessions/
create a file in the ".desktop" format to create your custom, minimal session. For running Google Chrome as the only application after logging in, do this:[Desktop Entry] Type=Application Exec=google-chrome Name=Google Chrome Comment=Testing
Restart your display manager, e.g.
sudo restart lightdm # or kdm, gdm, etc.
Or simply log out.
"Google Chrome" should appear in the session list to select (next to regular Unity or other DEs you have installed).
Log in and enjoy.
optional
XDM is a very minimal display manager - LightDM, GDM and KDM are quite "big". Install that using the package xdm
and reconfigure the default for when your system boots up using
sudo dpkg-reconfigure lightdm
Configure your display manager to automatically log in a specific user. See the documentation for your display manager.
-
1If one needs to bring the entire Desktop, does one just delete the .desktop file and restart? – enthusiasticgeek Apr 16 '14 at 20:59
-
1@enthusiasticgeek No need. In the login manager just select the full desktop to log in to, as explained in step 3. – gertvdijk Nov 17 '14 at 23:58
-
Does anyone know hot to switch system input language in single app mode? – fnc12 Jun 12 '15 at 10:24
-
Does anyone face the problem when mouse pointer is missing in single app mode? – fnc12 Jun 17 '15 at 06:53
-
I have started google-chrome --kiosk, but it does not occupies complete screen.. any way to make it maximized..? – tumbudu Oct 09 '15 at 10:14
-
@knocker Did you start it in a desktop environment or was that with the instructions from my answer? – gertvdijk Oct 09 '15 at 10:56
-
Yes.. [vishalg:~]$ cat /usr/share/xsessions/exam.desktop [Desktop Entry] Type=Application Exec=google-chrome --start-maximized Name=Exam Comment=Testing – tumbudu Oct 09 '15 at 11:02
-
@knocker If you start 'Exam' as login session, then there should be no window management at all, i.e. the single application starts full screen. Please create a NEW question with the exact steps you followed and provide some more details on what you see on your screen exactly. Comments aren't fit for solving your issue here. – gertvdijk Oct 09 '15 at 11:04
-
New question: http://askubuntu.com/questions/683344/new-desktop-session-using-xsessons-but-app-doesnt-appear-as-full-screen – tumbudu Oct 09 '15 at 11:20
(My reputation is too low to comment. --> I used the solution posted by @gertvdijk and experienced the same problem as @tumbudu)
If you don't have access to google chrome (Alpine Linux), the firefox package lets you pass the screen resolution that the app should open with as parameters:
firefox -height 1920 -width 1080

- 21
In the olden days, you could just run X
, and X would fire up with a blank screen. Then you could set DISPLAY=:0
and run something there. Perhaps this still works? From a shell you'll want X&
to background it.
Look into the -geometry
standard X command line parameter to adjust the placement of the window, since you won't have a window manager to help you with that.
To run something as non-root, you'll need to look into xauth
to set up X authorization for the non-root user.

- 15,670