LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2014, 02:18 PM   #1
ferite
Member
 
Registered: Jul 2014
Posts: 30

Rep: Reputation: Disabled
Some kind of kiosk.


Hi:

I need to setup my Lubuntu system to serve as a kind of kiosk, where a custom Java application should be run on startup, and it should be avoid that users interact with the desktop environment. Because of this I would like to ask the advice of the community to:

1. Make the system run the custom java application on startup.This application should run as root.
2. Avoid the desktop environment to load.
3. Autologin to the system. The session started can be root. As the custom app is going to be the only UI, there should not be risk in start the session as root.

Thanks for your reading and for the tips you could give me.
 
Old 09-17-2014, 02:57 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,184

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
In general, doing this is not complicated. You can do it with any distro you like as a start.

I would use Arch Linux for it.

Then only install what you need, and set up a systemd unit to run the java application on startup.
 
Old 09-17-2014, 03:03 PM   #3
notKlaatu
Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware, Fedora
Posts: 958

Rep: Reputation: 608Reputation: 608Reputation: 608Reputation: 608Reputation: 608Reputation: 608
I did something similar to this on a Raspberry Pi running Fedora. The application I needed to start was Python, not Java, but it's actually pretty easy.

It is detailed here http://makerbox.wordpress.com/2014/0...tric-painting/

However, I have not done exactly what you are looking to do; I did not need a GUI. So I'm thinking out loud here, with some ideas rather than exact instructions:

The way I think I'd go about what you are trying to do is to uninstall the desktop (LXDE) and the session manager (I think Lubuntu uses LightDM). You will probably want to do that from a text console (ctrl-alt-F3, for example).

Then find the systemd startup script that executes the graphical server (X). Modify it such that when the X environment starts, so does your java application.

I'm not sure what *buntu does when no session manager is found, so you might need to enable auto login to your text console. That's detailed in the post.

It will require some experimentation and testing.

If you try this sort of thing, let me know how it goes and what you did to make it happen, and I'll make my responses here less dependent on the external link.
 
1 members found this post helpful.
Old 09-17-2014, 08:33 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,802
Blog Entries: 13

Rep: Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948
A search for "ubuntu kiosk mode" turns up so many links that I couldn't pick on one to post here. There are even YouTube tutorials.

They likely won't address your particular application (most of them are about enabling kiosk mode for a browser), but they should get you started.
 
1 members found this post helpful.
Old 09-17-2014, 08:49 PM   #5
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by notKlaatu View Post
It is detailed here http://makerbox.wordpress.com/2014/0...tric-painting/


The way I think I'd go about what you are trying to do is to uninstall the desktop (LXDE) and the session manager (I think Lubuntu uses LightDM). You will probably want to do that from a text console (ctrl-alt-F3, for example).

Then find the systemd startup script that executes the graphical server (X). Modify it such that when the X environment starts, so does your java application.

I'm not sure what *buntu does when no session manager is found, so you might need to enable auto login to your text console. That's detailed in the post.
@notKlaatu, actually I googled this, and found that inside /usr/share/xsessions/, I should be able to create a ".desktop" file indicating the system what should be run on stratup. The standard file is some like:

Code:
[Desktop Entry]
# The names/descriptions should really be better
Name=Lubuntu
Comment=Lubuntu - Lightweight X11 desktop environment based on LXDE
Exec=/usr/bin/lxsession -s Lubuntu -e LXDE
# Icon=
Type=Application
By changing "Exec" command, you should be able to execute some script instead of loading the desktop. However I am only asked for login and password. If I give the credentials, the system asks again the login and pass, and so on.

Where should be located getty@.service you mention in the link?.I did not find a file with the same name.

Thanks.

Last edited by ferite; 09-17-2014 at 08:58 PM.
 
Old 09-18-2014, 08:51 PM   #6
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Hi.

I followed this tutorial, where it is given the instruction for, starting from a "text only" system, you install xorg, and nodm to setup the kiosk.

Now, all went well with xorg. If I run:

Code:
$ startx
my ~/.xsession file get executed (I am using leafpad only as simple text):

Code:
#!/usr/bin/env bash
echo "something" > /root/someFile
leafpad
but when I boot the system, all I got is a black screen. It is supposed that nodm should trigger an XSession, but something is happening. My /etc/default/nodm is:

Code:
NODM_ENABLED=true

NODM_USER=root

NODM_FIRST_VT='7'

NODM_XSESSION=/etc/X11/Xsession

NODM_X_OPTIONS='-nolisten tcp'

NODM_MIN_SESSION_TIME=60
I have tried with a different (non root) user, but the result is the same.

I hope I could get some help in this regard.

Last edited by ferite; 09-18-2014 at 08:53 PM.
 
  


Reply

Tags
kiosk


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Offline kiosk kruxer Linux - Distributions 5 04-07-2014 12:29 PM
Newsreader Kiosk jimbo1708 Linux - Software 1 09-09-2007 01:26 PM
Kiosk Rip off maprx Mandriva 3 06-07-2006 09:15 AM
Kiosk Setup yaseenlambe Linux - Software 6 12-08-2004 09:37 PM
kind of a programming quesion...kind of not tho jhorvath Programming 2 06-30-2003 10:05 PM


All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration