Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
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? –  Nickolas Jun 20 '13 at 15:48
3  
@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
    
Thanks for clarifying, great to know :) –  Nickolas Jun 20 '13 at 16:10

4 Answers 4

up vote 8 down vote accepted
  1. 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
    
  2. Restart your display manager, e.g.

    sudo restart lightdm  # or kdm, gdm, etc.
    

    Or simply log out.

  3. "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 Install 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.

share|improve this answer
    
If one needs to bring the entire Desktop, does one just delete the .desktop file and restart? –  enthusiasticgeek Apr 16 at 20:59
    
@enthusiasticgeek No need. In the login manager just select the full desktop to log in to, as explained in step 3. –  gertvdijk Nov 17 at 23:58

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:

  1. 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.
  2. 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.
  3. Open /etc/init/tty1.conf and change exec /sbin/getty -8 -i 38400 tty1 line to something like exec /sbin/getty -8 -i 38400 tty1 -a username, where "username" is the name of the user you want to auto-login.
  4. 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.
  5. 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.
share|improve this answer

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.

share|improve this answer

First of all, I do not understand how you are supposed to open the web browser without loading the Desktop Environment. It's like wanting to cook a meal without turning on the oven.. Okay that's possible with X Server, got the question wrong.

What you are looking for is choosing which application/s will start up during the boot process.

  • In Ubuntu/Unity:

    Click the gear icon in the upper right hand corner of the top panel. Select Startup Applications.

    Once opened, you will be shown a list of applications which your system starts up when your operating system boots.

    Click Add at the top right.

    You will be shown a dialog.

    In the resulting dialog box:

    1)Enter the name of the program at the "name" field.

    2)Enter the command to run the program at the “command” field.

    3)Enter any comments you would like at the "comments" field.

    For example:

    Click save and close.

  • In Gnome shell:

    Press Alt+F2 to bring up the Run dialog.

    Type gnome-session-properties.

    Click the “Add” button.

    In the resulting dialog box:

    1)Enter the name of the program at the "name" field.

    2)Enter the command to run the program at the “command” field.

    3)Enter any comments you would like at the "comments" field.

    Click save and close.

  • In KDE:

    Go to K-Menu>Computer>System Settings.

    Select Startup and Shutdown and click the Add Program button.

    Type the command to run the program and click OK.

  • In LXDE:

    Run the following commands in terminal:

    mkdir -p ~/.config/lxsession/LXDE/
    touch ~/.config/lxsessions/LXDE/autostart
    leafpad ~/.config/lxsessions/LXDE/autostart
    

    Add this line to the autostart file:

    @program_command
    

    Click save and close.

  • IN LXDE/Lubuntu:

    An autostart file already exists, in ~./config/lxsession/Lubuntu/autostart.

    Just use this file instead of making a new one, in the manner described above.

  • In XFCE:

    In the Applications menu open Settings Manager and select Session and Startup.

    On the Application Autostart tab click the Add button.

    1)Enter the name of the program at the "name" field.

    2)Enter the command to run the program at the “command” field.

    3)Enter any comments you would like at the "comments" field.

    Click save and close.

  • Since you want to only start a web browser ( I guess firefox), you could remove the following list of programs from your startup applications list:

    -Bluetooth manager -Deja Dup -Gnome Do -Gnome Login Sound -Indicator Workspaces -Ubuntu One -Visual Assistance -Remote Desktop -Pulseaudio

    but its definetely up to you.

    share|improve this answer
    5  
    I think the question is about starting applications on boot without a desktop environment. Your answer is about startup applications after the DE has been started. –  gertvdijk Jun 20 '13 at 16:08

    Your Answer

     
    discard

    By posting your answer, you agree to the privacy policy and terms of service.

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