LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-23-2013, 03:24 AM   #1
heshamshokry
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Rep: Reputation: Disabled
script to open application and kill GUI


Hiii
i installed RHEL 6.2 on computer i have application i want to start this application on the startup normal ok this easy i can do it but now i want the applicaton start without any GUI interface i want user when login on his machine never see any thing exept the application and if he close the application he can't do any thing on the system i know if i give him normal user he can't do any thing but i don't need that i need no thing on the system exept the this application i think this job can be done with script kill gnome-panel and start application but the application requre GUI when i kill gnome panel and start the application the application run again gnome panel any one can help me guys
 
Old 01-23-2013, 03:57 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
You can't kill GUI, because it will kill your application, which require it. But you can start another than default programs (the desktop, login manager, etc. are also a separate applications). You did not precised, if you want to login user by gdm or by text console. If the later, then you can specify his default shell (by "usermod -s") as xinit (look "man xinit" for options)
Code:
xinit /usr/bin/my_application
If you want to use gdm to login user, then you can modify X session script to start proper application. There is extensive info about it in "man Xsession", remember about "allow-user-xsession" in Xsession.options file, but in GNOME this can be another file, for example in KDE there is additional scripts in "/etc/kde4/kdm".
 
1 members found this post helpful.
Old 01-23-2013, 05:25 AM   #3
heshamshokry
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
thanks boss for your help
yup it works but should i put user name and password to login first i don't need also to put any user and password i want the machine startup without any GDM just open the default app like we do i think its easy
 
Old 01-23-2013, 07:03 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Remove or disable the display manager (GDM, KDM or whatever you use).
Put this in your rc.local, as the last line:[ su -l -c "xinit YOURAPPLICATION" USERNAME[/code]Replace YOURAPPLICATION with the path of your application and USERNAME with the name of the user the application should run on. Now the system should start directly into your application.
 
Old 01-27-2013, 07:31 AM   #5
heshamshokry
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
every body the problem solved with command of usermod -s /usr/bin/application name done and i disabled the GDM but when i try to do this solution on Ubuntu i can't any one have soluttion how to do the same thing but in ubuntu wait your replay

thanks
 
Old 01-28-2013, 06:52 PM   #6
heshamshokry
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
any one have a solution please !!!!
 
Old 01-28-2013, 07:11 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
http://goo.gl/Rims
 
Old 01-30-2013, 04:59 PM   #8
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
You should use full stop and comas in your sentences, because your last post is totally not understandable for me.

If you only want to start this one application without password prompt, then I can give you solution which I use to start an XBMC on my secular parents media center PC, there are several approaches, I choose this one. You did not specified which Ubuntu version you use, I assume the latest. Basically you need to add file "/etc/init/tty1.override" to start your application instead of usual "getty", for example:
Code:
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec xinit -- /usr/bin/your_application
Look in /etc/init/tty1.conf for orginal file. Leave other tty?.conf entries for maintance (available after pressing CTRL+ALT+F2, 3, 4, etc.) and disable display manager, by backing up somewhere or creating appropriate empty "*.override" file (I didn't test this), it will be "gdm.conf" or "kdm.conf" or similar in the same directory. After that steps, when computer boot up, it will start your application. Depending on functions in your application you can control its respawning, by deleting or leaving alone "respawn" option, or use script which automatically poweroff when application terminates. Read "man 5 init" for more info.
 
  


Reply



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
script to open pseudo-terminal at user login to GUI: ubuntu (kiwi) 10.04 zev42 Programming 1 12-07-2010 10:39 AM
script to open pseudo-terminal at user login to GUI: ubuntu (kiwi) 10.04 zev42 Linux - Newbie 2 11-26-2010 10:35 PM
script to open pseudo-terminal at user login to GUI: ubuntu (kiwi) 10.04 zev42 Linux - Newbie 4 11-26-2010 10:34 PM
[SOLVED] Controlling a GUI application from a script helger Linux - Software 7 05-18-2010 08:35 AM
1. shell script "find and replace" on text 2. java GUI application randomx Programming 4 03-05-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:11 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
Open Source Consulting | Domain Registration