View previous topic :: View next topic |
Author |
Message |
garion911 Tux's lil' helper
Joined: 04 Jun 2002 Posts: 88
|
Posted: Thu Jun 02, 2005 12:11 am Post subject: Autostart X based apps on bootup, without x/g/kdm |
|
|
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: |
#!/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:
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:
And the Xstart looks like this:
Code: |
#!/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 |
|
Back to top |
|
|
papal_authority Veteran
Joined: 31 Mar 2004 Posts: 1823 Location: Canada
|
Posted: Thu Jun 02, 2005 1:43 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
garion911 Tux's lil' helper
Joined: 04 Jun 2002 Posts: 88
|
Posted: Thu Jun 02, 2005 2:19 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Tatey n00b
Joined: 18 Apr 2004 Posts: 37 Location: Brisbane, Australia
|
Posted: Tue Mar 14, 2006 2:40 am Post subject: |
|
|
Thanks, this script worked like a charm _________________ [ visit my website, tatey.com ] |
|
Back to top |
|
|
lysergicacid Guru
Joined: 25 Nov 2003 Posts: 352 Location: The Universe,Virgo Super Cluster,Milky Way,Earth
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|