Unix Technical Forum

Booting into my Window-Manager automatically

This is a discussion on Booting into my Window-Manager automatically within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> On Thu, 06 Nov 2003 19:56:50 +0100, Omar Elschatti wrote: >> > I just found out that in Slackware ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-18-2008, 07:42 PM
Menno Duursma
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

On Thu, 06 Nov 2003 19:56:50 +0100, Omar Elschatti wrote:

>> > I just found out that in Slackware 8.1 rc.4 isn't used, because of
>> > some problems occurring.

>>
>> What problems?

>
> This is in my /etc/inittab:
>
> # Runlevel 4 used to be for an X window only system, until we discovered
> # that it throws init into a loop that keeps your load avg at least 1 #


[...]

> Actually I'm not sure what this means, but I'm afraid of using runlevel4
> now. :-)


That scars you?
It realy wasn't much of a problem to bigin with, but that one VT even
works around it...

>> > I tried to put the stuff in rc.local so far, but the problem there
>> > is, that no other terminals get started. :-)

>
>> Do you mean you want more VTs in runlevel 4?

>
> No, with the stuff in rc.local, it seems to interrupt the starting
> process, and I dont get ANY other terminals.


Try starting it in the backround (ie put a `&' after it).

> Only if I "log out" that
> interruption everything gets fine as before (6 terminals :-)).


I don't think you want to mess with the booting any, so delete the line...
Keep initdefault set to 3, insert the stuff in $HOME/.profile and be a
happy camper.

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-18-2008, 07:42 PM
SuperDeamon
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically


I could not get the login screen for KDE (or any other desktop manager)
after I installed NVIDIA drivers (and probably messed with some screen
resolution and such stuff). The only way I could have a GUI desktop was to
type startx after loging into a console session.

I simply added /opt/kde/bin/kdm line into /etc/rc.d/rc.local and now
everything works the way I want.

On reboot I get a login screen where I could choose any windows manager and
type my user name and password. On 3 finger solute (Ctrl Alt Del) I get a
menu of login as another user, reboot and Halt choices also.

good luck.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-18-2008, 07:44 PM
Omar Elschatti
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

On Thu, 06 Nov 2003 11:16:55 GMT
Menno Duursma <menno@desktop.lan> wrote:

> ps ax |grep "/usr/X11R6/bin/[X]" >/dev/null 2>&1


I just noticed that there is a 50% chance that the grep will find itself
in "ps ax". :-)) HAHAHAHAHAAAA

Well........... what now?


Omar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-18-2008, 07:45 PM
Laurence
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

On Thu, 06 Nov 2003 11:16:55 GMT, Menno Duursma <menno@desktop.lan> wrote:

> In that case i'd probably backup /etc/rc.d/rc.4 and edit it to look
> (something like) this:
>
> #!/bin/bash
>
> # User to run as
> SOME_USER=omar
>
> su - $SOME_USER -c '
> PATH=$PATH:/usr/X11R6/bin
> startx -- -nolisten tcp
> '
>
> And for the password thing, setup the WM to fire up `xlock' directly.
> (Or edit something like .xinitrc for it)
>
>> if the password typed in is wrong, everything should be canceled and I
>> should get the normal login prompt.

>
> You'd still have a login prompt available under /dev/tty6
> However you could put this in $HOME/.profile or some such.
>
> ps ax |grep "/usr/X11R6/bin/[X]" >/dev/null 2>&1
> if [ ! $? = 0 ]; then
> startx -- -nolisten tcp
> fi
>


That probalby easier than what I did:

changed the source code of agetty to not prompt for a username, changed
login (from
the shadow package I think) to not prompt for a passwd, put the new agetty
in a
wrapper to call the modified login, so I can keep the old /bin/login, in
/etc/inittab made
init call the wrapper instead of the normal agetty on vt1, and left the
other vts as normal.
This would log me straight in (as root) from power on.

Then put a call to startx in /etc/csh.login and in xinitrc put xmms -p -f,
and exec icewm
So I can just switch on and my mp3s start playing. nice

a problem is if I login on another vt, an error says X is already
running. I think I'll fix
that with your suggestion.

Cheers,
Laurence

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-18-2008, 07:45 PM
AthlonRob
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

On Fri, 7 Nov 2003 10:17:07 +0100, Omar Elschatti <oelschatti@yahoo.com> wrote:
>> ps ax |grep "/usr/X11R6/bin/[X]" >/dev/null 2>&1

>
> I just noticed that there is a 50% chance that the grep will find itself
> in "ps ax". :-)) HAHAHAHAHAAAA


ps ax | grep "/usr/X11R6/bin/[X]" | grep -v grep &> /dev/null

or...

pgrep "/usr/X11R6/bin/[X]" &> /dev/null

....might do the trick, I dunno.

or... maybe you could just check to see if the seventh console is open,
somehow, and work with that?

or... maybe you could just check to see if something is listening on
port 6000, assuming you didn't start x with the -nolisten tcp option.

or... maybe X leaves something on /proc you could look for?

or... bet there's another hundred options available. :-)

--
Rob | If not safe,
Email and Jabber: | one can never be free.
athlonrob at axpr dot net |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/q9twhm6KEoOOAe0RAnRcAKCcsJlq+le5R57F+tiyedfw8cUOSg Cg+oTF
WbNWmm56Bc6fGcXg+W2oKDE=
=0/Ok
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-18-2008, 07:45 PM
Omar Elschatti
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

On Fri, 7 Nov 2003 09:50:37 -0800
AthlonRob <junkmail@axpr.net> wrote:

> ps ax | grep "/usr/X11R6/bin/[X]" | grep -v grep &> /dev/null


That was clever, thanks. :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com