Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Autostart X based apps on bootup, without x/g/kdm

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
garion911
Tux's lil' helper
Tux's lil' helper
Posts: 88
Joined: Tue Jun 04, 2002 1:30 pm

Autostart X based apps on bootup, without x/g/kdm

  • Quote

Post by garion911 » Thu Jun 02, 2005 12:11 am

I have a couple machines that I use for specialize reasons.

Machine 1: Mythtv
Machine 2: Xterminal and mpd jukebox.

My problem initially started with machine 2.. I wanted to have an Xterminal, and I was using LTSP to get it. But eventaully, since this Xterminal is near my "good" stereo anyways, I wanted to use it as an mpd jukebox also. So I installed linux on the machine, and tried to get it to do both.

It seems that Gentoo is not really designed to be an Xterminal.. I tried setting up xdm with a modified Xservers to have "X --indirect xdmhost", but that gave me my selection, AND a login..

Eventaully I came to the conclusion that I can not have XDM running at all.

So. How to achieve this? Firstly, I tried just adding the X --indirect xdmhost" to the /etc/conf.d/local.start. That worked initially, except when you exited your login.

What I ended up doing was creating a script with the following code:

Code: Select all

#!/bin/bash

while true; do
        X -indirect xdmhost
done
and save it as /sbin/Xstart

then at the end of /etc/conf.d/local.start:

Code: Select all

/sbin/Xstart &
Dont forget the &, otherwise you may not get a login prompt on the main console...

This allows X to restart when you exit your Xterminal login.


This also closely ties into my MythTV setup.

In my mythtv setup, I have it setup similarly to the various guides in the forum and Gentoo Wiki.. I have a mythtv user that actaully runs the frontend when it logs in. The .xinitrc for my mythtv user looks like this:

Code: Select all

exec mythfrontend
And the Xstart looks like this:

Code: Select all

#!/bin/bash

while true; do
        sudo -u mythtv -H startx
done
To get the sudo, you need to emerge app-admin/sudo.. The -u sets the user to run as. Since this gets run as root, it won't need any password. ***SECURITY RISK***.. The -H tells sudo to use the $HOME from /etc/passwd. Otherwise it would use root's $HOME. "startx" starts the X server, running the .xinitrc along the way.

This also helps with the problem of the person using mythtv who hits buttons too fast, and exits from Mythtv, usually leaving it at the X, windowmanager, or xdm login screen... With these changes, Mythtv will actaully restart, eliminating the "THE TV IS BROKEN" phone call from the wife, when she want to watch her CSI from last night...*sigh*

Hope this proves useful to folks.

--Garion
Top
papal_authority
Veteran
Veteran
User avatar
Posts: 1823
Joined: Wed Mar 31, 2004 4:07 am
Location: Canada

  • Quote

Post by papal_authority » Thu Jun 02, 2005 1:43 pm

Couldn't you just use kdm with the autologin feature? Then have the user account that you chose to autologin, run the specific apps? Sorry if I'm missing something...
The free market gave me gonorrhea.
Top
garion911
Tux's lil' helper
Tux's lil' helper
Posts: 88
Joined: Tue Jun 04, 2002 1:30 pm

  • Quote

Post by garion911 » Thu Jun 02, 2005 2:19 pm

You could yes.. I actaully did it originally with GDM... But why waste the space, memory, maintenance, and time for having kdelibs, kdebase installed? It makes for a more specialized machine..

Plus, it would not have solved my Xterminal problem.
Top
Tatey
n00b
n00b
User avatar
Posts: 37
Joined: Sun Apr 18, 2004 3:12 pm
Location: Brisbane, Australia
Contact:
Contact Tatey
Website

  • Quote

Post by Tatey » Tue Mar 14, 2006 2:40 am

Thanks, this script worked like a charm :)
[ visit my website, tatey.com ]
Top
lysergicacid
Guru
Guru
User avatar
Posts: 352
Joined: Tue Nov 25, 2003 1:52 pm
Location: The Universe,Virgo Super Cluster,Milky Way,Earth

autologin.c

  • Quote

Post by lysergicacid » Thu Apr 27, 2006 3:51 am

theres also this : http://peeweelinux.com/list-archive/pee ... 01231.html if u google autologin.c u find this too & u can just start ur wm / mythtv via a simple bash script u can create and run it from the user who is automatically logged in's bash_profile why run anything in x as root if u dont have to ?
Image
Desktop:
Image
Top
Post Reply

5 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic