Unix Technical Forum

Departing from GDM ... need a script.

This is a discussion on Departing from GDM ... need a script. within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> I have chosen to stop using a DM - GDM in this instance. I stopped it from loading and ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 09:47 AM
oldNbald
 
Posts: n/a
Default Departing from GDM ... need a script.

I have chosen to stop using a DM - GDM in this instance. I stopped it
from loading and wish to unmerge. However, *before* doing so, I've two
users not found of typing startx - I know, it's nothing but one is my
wife (want to keep her pleased) and the other is a seven year old son.
What I need to do, but don't know how, is make it that when either
completes entering their passwd startx will auto-execute - this is a
single WM box. Plus, what would be _very_ handy is when they log off
they will also be "exit"-ed from the terminal log on. Is any of this
feasible?
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 09:47 AM
Ben Measures
 
Posts: n/a
Default Re: Departing from GDM ... need a script.

oldNbald wrote:
> [snipped:]
> I've two users not found of typing startx
>
> What I need to do is make it that when either completes entering
> their passwd startx will auto-execute
>
> Plus, what would be _very_ handy is when they log off they will also
> be "exit"-ed from the terminal log on. Is any of this feasible?


Append the following to their ~/.bashrc file (create a new one if it
doesn't exist) to kill two birds with one stone:
> if ! pgrep -U $UID -f startx &> /dev/null; then
> startx;
> logout;
> fi


Starting X on login isn't without caveats though.

For example, only one user at a time can login since startx will output
the error "Server is already active for display 0" for additional
logins. Also, there may be problems with remote logins (eg. with ssh).

Perhaps somebody can offer a modification

Hth,
--
Ben M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 09:47 AM
oldNbald
 
Posts: n/a
Default Re: Departing from GDM ... need a script.

Ben Measures scratched on the wall:

> Starting X on login isn't without caveats though.
>
> For example, only one user at a time can login since startx will
> output the error "Server is already active for display 0" for
> additional logins.


Hi ya Ben, When it comes to, "Server is already active for display 0",
there's not a problem - we always logoff and on as needed without any
xnest, etc.

Things didn't work out with the script.
Check out what I did in my /home to see if it's correct, please:

file: .bashrc

---begin---

#! /bin/bash
if ! pgrep -U $UID -f startx &> /dev/null; then
startx;
logout;
fi

---end----

Here's more info:

bash-2.05b$ ls -l .bas*
-rw------- 1 cmo users 375 Dec 13 20:34 .bash_history
-rwxr-xr-x 1 cmo users 83 Dec 13 20:05 .bashrc

What is your opinion?

Thanks for your assistance !
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 09:47 AM
Ben Measures
 
Posts: n/a
Default Re: Departing from GDM ... need a script.

oldNbald wrote:
>
> Things didn't work out with the script.
> Check out what I did in my /home to see if it's correct, please:
>
> file: .bashrc
>
> ---begin---
>
> #! /bin/bash


^^ remove the line above

> if ! pgrep -U $UID -f startx &> /dev/null; then
> startx;
> logout;
> fi
>
> ---end----
>
> Here's more info:
>
> bash-2.05b$ ls -l .bas*
> -rw------- 1 cmo users 375 Dec 13 20:34 .bash_history
> -rwxr-xr-x 1 cmo users 83 Dec 13 20:05 .bashrc


chmod 644 .bashrc

Hth,
--
Ben M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 09:47 AM
Sybren Stuvel
 
Posts: n/a
Default Re: Departing from GDM ... need a script.

oldNbald enlightened us with:
> I have chosen to stop using a DM


Stop multiposting. I already helped you with your problem, yet you
keep posting the same question in other newsgroups. It is very
insulting. Read http://www.faqs.org/rfcs/rfc1855.html before posting
again.

You are multiposting, which means you post a separate message to each
newsgroup. There is no way for someone trying to answer your question,
to see if it has already been answered by someone else. Thus, you ask
for my time, you ask me to put in effort to answer your question, but
it might be all for nothing because you might already have your
answer. That is concidered insulting.

Futhermore, someone might have the same question as you do. There is
no way for that person to find the answer, if it were to be posted in
one of the other groups you posted to.

Next time, post your question to one newsgroup. If you can't get a
decent answer in a day or two, try the next one. If you really,
really, really want to post to multiple newsgroups, crosspost to them.

Crossposting means putting all groups you want to post to on a single
line - that way everybody can see to which groups the post went. Do
not post to more than four newsgroups - that's never good. I won't
even see your post if you do that. Also, always set up a
'Followup-To:' header, to make sure all replies go to the same
newsgroup. If you don't know how to do that, post to a single group
instead.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 09:47 AM
oldNbald
 
Posts: n/a
Default Re: Departing from GDM ... need a script.

Sybren Stuvel scratched on the wall:

> Stop multiposting. I already helped you with your problem, yet you
> keep posting the same question in other newsgroups. It is very
> insulting.**Read*http://www.faqs.org/rfcs/rfc1855.html*before*posting
> again. [...]


Okay, okay ... I apologize. Think that's first time (ever) I have in 13
years. And, I know better.
--
oNb
Another happy Linux user - # 276084.
Reject religion ! Embrace Jesus Christ.
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 03:15 AM.


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