What is the most basic window manager for ubuntu that can be used to display a single application

8,567

Solution 1

The ratpoison window manager is what you want.

  1. Install ratpoison

    sudo apt-get install ratpoison
    
  2. Create a user and have that user automatically log in.

  3. Create a desktop file in /usr/share/xsessions/kiosk.desktop

    [Desktop Entry]
    Encoding=UTF-8
    Name=Browser Mode
    Comment=Kiosk desk Session
    Exec=/usr/share/xsessions/run_kiosk.sh
    Type=Application`
    
  4. Create /usr/share/xsessions/run_kiosk.sh. Modify the following to get you started

    #!/bin/bash
    /usr/bin/ratpoison &
    
    TERMINAL=`who | awk '{print $2}'`
    
    if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
            eval 'dbus-launch --sh-syntax --exit-with-session'
    fi
    
    rm -Rf ~/.config/google-chrome
    dbus-launch /usr/bin/google-chrome --no-default-browser-check
    rm -Rf ~/.config/google-chrome
    
    kill `ps | grep dbus-launch | grep -v grep | awk '{print $1}'`
    
  5. This resets Chrome on every launch. Use the default preferences in /opt/google/chrome/master_preferences to set up Chrome how you want it.

  6. Set the default desktop as kiosk:

    sudo /usr/lib/lightdm/lightdm-set-defaults -s kiosk
    

Solution 2

Have a look at the awesome window manager; it is a tiling windowmanager. It is extremely lightweight.

You can configure it to default to the full screen layout, a black background -- have a look at the wiki to get a feel for the configuration system, a minimal config in your case could contain something like the following:

Require dependencies:

require("awful")
require("awful.layout")
require("awful.util")
require("awful.tag")
require("screen")
require("freedesktop.utils")
require("freedesktop.desktop")

Limit the layouts to fullscreen with:

layouts =
{
    awful.layout.suit.max.fullscreen
}

Now define a tag for your application:

-- {{{ Tags
-- Define a tag table which will hold all screen tags.
tags = {
     names = {"your_app" },
     layout = {layouts[1]}
}
for s = 1, screen.count() do
   -- Each screen has its own tag table.
   tags[s] = awful.tag(tags.names, s, tags.layout)
end
-- }}}

To start your application add the following to the end of your configuration:

awful.util.spawn("/usr/bin/your_app --with --options")

Solution 3

I have no personal experience but a search for "linux kiosk" gave a lot of results, the top of which was http://www.techrepublic.com/blog/doityourself-it-guy/diy-tiny-core-linux-a-great-kiosk-and-emergency-platform/1565

Share:
8,567

Related videos on Youtube

TimothyP
Author by

TimothyP

Utterly Insane developer

Updated on September 18, 2022

Comments

  • TimothyP
    TimothyP over 1 year

    I've tried starting a full screen application without a window manager, using xinit, which works but instead of starting at the top left of the screen the application starts somewhere in the middle of my screen.

    I've tried the same using a custom entry in /usr/share/xsessions and starting that from lightdm instead of the default ubuntu window manager, but that gives me the same result.

    I've then added my application to the startup applications of the ubuntu window manager and that works properly... but I don't want to start the entire desktop

    So I'm thinking perhaps a simple window manager will allow me to define that my application should start as soon as it is loaded and that as a result it will be displayed full screen and starting at the upper left corner of the screen.

    So basically a Window Manager that will allow me to disable everything except my application. (And the background should be completely black by default so that the screen is black until my application has finished loading

  • Peachy
    Peachy over 11 years
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
  • TimothyP
    TimothyP about 11 years
    This is exactly what I ended up using, thank you