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; --> Hi everyone! I want to boot into my window-manager (IceWM) automatically. I don't use KDE or something, so I ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 07:41 PM
Omar Elschatti
 
Posts: n/a
Default Booting into my Window-Manager automatically

Hi everyone!

I want to boot into my window-manager (IceWM) automatically.

I don't use KDE or something, so I think the user-login must be
somewhere before starting Ice-WM.

So, what I want is:

that I ("omar") am considered as the default user, and after booting if
I type ONLY the correct password, I will find myself logged in with
IceWM running.

if the password typed in is wrong, everything should be canceled and I
should get the normal login prompt.


It would be great if anybody could tell me how to do this.

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

On Thu, 06 Nov 2003 10:47:04 +0100, Omar Elschatti wrote:

> Hi everyone!


Hello.

> I want to boot into my window-manager (IceWM) automatically.


NP.

> I don't use KDE or something, so I think the user-login must be
> somewhere before starting Ice-WM.


Yes.

> So, what I want is:
>
> that I ("omar") am considered as the default user, and after booting if
> I type ONLY the correct password, I will find myself logged in with
> IceWM running.


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

> It would be great if anybody could tell me how to do this.


There are lots of ways to go about such things.
The above is just how i might go about it.

Have fun.

--
-Menno.

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

> Hi everyone!
>
> I want to boot into my window-manager (IceWM) automatically.

You can edit your .profile in your home directory to automatically
launch startx.
Hope this help.
Gufo

--
The only unlimited thing of a PC is Micro$oft users' patience.
-- Reply touodeno [AT] email [DOT] it --
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-18-2008, 07:41 PM
Omar Elschatti
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

Thanks for your answer, but more problems occurred now:

1. I am using "/bin/login -p omar" now, instead of "su ..."
(the "su -c startx" isn't working anyway, somehow, and no "xlock" needed
with "login" :-))

Therefore I need to run "startx" somewhere in ".profile", but how can I
check if X isn't already running (so that X isn't starting every time I
open a shell)?

2. I think my /etc/rc.4 isn't starting at all, how can I make sure that
it is?


Thank you for your help,
Omar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-18-2008, 07:41 PM
Menno Duursma
 
Posts: n/a
Default Re: Booting into my Window-Manager automatically

On Thu, 06 Nov 2003 17:29:12 +0100, Omar Elschatti wrote:

> Thanks for your answer, but more problems occurred now:
>
> 1. I am using "/bin/login -p omar" now, instead of "su ..."


That dosn't do the same thing.

man login
man su

> (the "su -c startx" isn't working anyway, somehow,


Did you even read the post you're replying to?
Message-Id: <pan.2003.11.06.11.06.43.677604@desktop.lan>
(Hint, you need "startx" your $PATH).

> and no "xlock" needed with "login" :-))


That i sugested to give a password prompt (looks much nicer).

> Therefore I need to run "startx" somewhere in ".profile", but how can I
> check if X isn't already running (so that X isn't starting every time I
> open a shell)?


You didn't read any of my post did you?
(Hint "grep" it out of a "ps" output).

> 2. I think my /etc/rc.4 isn't starting at all, how can I make sure that
> it is?


Edit the "initdefault" line in /etc/inittab

--
-Menno.

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

> > 1. I am using "/bin/login -p omar" now, instead of "su ..."
> That dosn't do the same thing.
> man login
> man su


Hmm, I don't see any important difference.
Is there a problem with "login"?

> > (the "su -c startx" isn't working anyway, somehow,

> Did you even read the post you're replying to?


Sorry, I wanted to say:
I tried "su - omar -c /usr/X11R6/bin/startx".

> > "xlock"

> That i sugested to give a password prompt (looks much nicer).


But I want to get a login-prompt, if the password is wrong (and I don't
like the look either, sorry :-)).

> You didn't read any of my post did you?
> (Hint "grep" it out of a "ps" output).


Sorry, I missed that one.

> > 2. I think my /etc/rc.4 isn't starting at all, how can I make sure
> > that it is?

> Edit the "initdefault" line in /etc/inittab


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

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


thanks again :-),
Omar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (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 18:54:35 +0100, Omar Elschatti wrote:

>> > 1. I am using "/bin/login -p omar" now, instead of "su ..."

>> That dosn't do the same thing.
>> man login
>> man su

>
> Hmm, I don't see any important difference.


Argh, uh, ok.

> Is there a problem with "login"?


Not that i know of.

>> > (the "su -c startx" isn't working anyway, somehow,

>> Did you even read the post you're replying to?

>
> Sorry, I wanted to say:
> I tried "su - omar -c /usr/X11R6/bin/startx".


That wouldn't work as `startx' calls `xauth' which has to be found.
Hence:

su - omar -c 'PATH=$PATH:/usr/X11R6/bin; startx'

>> > "xlock"

>> That i sugested to give a password prompt (looks much nicer).

>
> But I want to get a login-prompt,


Ok then use the latter method i posted and fireup `startx' from .profile

> if the password is wrong


Well, you coud have it show a logout buttom (and fallback to login).
This way your desktop can be pre-loaded an ready to go.

> And I don't like the look either, sorry :-)).


Maybe you like XDM, KDM or GDM better?

>> You didn't read any of my post did you?
>> (Hint "grep" it out of a "ps" output).

>
> Sorry, I missed that one.


Read that part of my first post again, it should do what you want.

>> > 2. I think my /etc/rc.4 isn't starting at all, how can I make sure
>> > that it is?

>> Edit the "initdefault" line in /etc/inittab

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


What problems?

> 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?
If so, just edit /etc/inittab to start them.

> thanks again :-),


HTH.

--
-Menno.

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

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

What's the "2>&1" ?

> if [ ! $? = 0 ]; then
> startx -- -nolisten tcp
> fi


What's the "-nolisten tcp"? (I didn't find it in the manpage.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (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:35:09 +0100, Omar Elschatti wrote:

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

>
> What's the "2>&1" ?
>
>> if [ ! $? = 0 ]; then
>> startx -- -nolisten tcp
>> fi

>
> What's the "-nolisten tcp"? (I didn't find it in the manpage.)


It makes sure you're useing Unix domain sockets (there local).

menno@desktop:~$ X --help 2>&1 |grep nolisten
-nolisten string don't listen on protocol

If you omit that, it will open TCP port 6000 (6001 for the second
X-server you might start - and so on) and listen on it for
remote clients to connect to.

Part of the "X window system" is actually a network protocol.
So you could have the server run on one box and clients on numberos
others across an IP network.

(It's not realy secure, so if you want to run it over the internet,
you may want to use Kerberos, SSH, stunnel or some such as well.)

--
-Menno.

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

> > 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 #
all# the time. Thus, there is now one getty opened on tty6. Hopefully no
# one# will notice. ;^)
# It might not be bad to have one text console anyway, in case something
# happens to X.
x1:4:wait:/etc/rc.d/rc.4

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

> > 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. Only if I "log out" that
interruption everything gets fine as before (6 terminals :-)).
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:55 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