LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2011, 03:56 AM   #1
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Rep: Reputation: Disabled
Graphical Login issue after changing /etc/profile.d


Hi all,

I need help.
I am storing a shell script in /etc/profile.d , so that to make it run at startup.
it works fine in suse but in rhel same script halts my graphic login.
when i delete this script from shell, only then i see graphical mode on system.
Waiting for comments..

Thanks...
 
Old 11-15-2011, 04:08 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Without seeing the script, there is little we can comment on. You didn't even mention which shell the script uses. It is supported by RHEL?

Scripts in /etc/profile.d/ are meant to be configuration scripts, that are sourced when you boot; setting environmental variables and aliases. This isn't a place to start a service. If that is all your script does, perhaps a value based on your SuSE script, has side effects in RHEL. For example, setting the WINDOWMANAGER variable to a value not installed on RHEL could cause booting into X to fail, if RHEL doesn't have a fallback value.

Last edited by jschiwal; 11-15-2011 at 04:12 AM.
 
Old 11-15-2011, 04:59 AM   #3
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
i solved the issue..)

Last edited by Pir Ovais; 11-15-2011 at 05:13 AM.
 
Old 11-15-2011, 05:13 AM   #4
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
i solved this issue.
can you please tell me where should i place my shell script in RHEL, so that it will start at system startup.
 
Old 11-15-2011, 07:50 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
If you want to control it as a service, then /etc/init.d and add symlinks from the relevant rcX.d dirs (where X = 0-6) under /etc/rc.d.
Best approach is to copy an extant script there and amend as reqd.

A very basic approach, assuming you don't need to worry about a clean shutdown is to just call it directly from the /etc/rc.d/rc.local file.
 
Old 11-16-2011, 12:14 AM   #6
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for the reply CHris..
I want that for every user this script should run at startup.

Thanks
 
Old 11-16-2011, 12:47 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
You seem to be confusing 'system startup' with user logins...
Do you want it to start once at system startup ie boot time, or once for each user when they login?
My answer is for system startup; for user logins /etc/profile.d is the place.
 
Old 11-16-2011, 12:59 AM   #8
Pir Ovais
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for reply CHris.
I want it for every user and i placed it profile.d anf it worked fine for suse flavor but in RHEL it caused login issues
See now i am placing my script in /etc and adding a link to it in rc.local.
It seems to be working, but not for all users.

any comments..
 
Old 11-16-2011, 07:15 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
You need to show us the script I think (x out any pvt info). rc.local is for system startup as I said..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing graphical login screen refresh rate on Lenny lbdu Debian 1 06-26-2009 07:10 AM
Changing the graphical login screen... Oklahoma Linux - Newbie 5 03-24-2007 01:44 AM
Changing from graphical login screen to text thinkpadbk Linux - Newbie 3 11-11-2005 08:18 PM
Need help changing graphical login to regular login jnezezon Linux - Newbie 2 11-13-2003 10:36 PM
Changing RedHat 7.1 graphical login managers midnightcommander Linux - General 5 07-11-2001 11:31 PM


All times are GMT -5. The time now is 10:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration