LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-07-2011, 12:49 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
automatically open terminal at login time.


hi,
I am using red hat .I want that when ever the user login in GUI interface the terminal windows automatically open and then the user want to logout it 1st close the terminal and then login. There is a file in #ls -a i.e .bashrc and .bash_logout

I does not know how to add my script in it ?Kindly guide me.
thanks
mypass
 
Old 06-07-2011, 02:31 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
This should help w/ starting stuff on log-in.

I don't know that one can force closure of a terminal at log-out
though. You can do processing after the gnome session ended; but
not during (to the best of my knowledge, I don't use gnome, and
don't feel a deep desire to familiarise myself with it).

What is the objective?


Cheers,
Tink
 
Old 06-07-2011, 03:44 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by gardenair View Post
hi,
I am using red hat .I want that when ever the user login in GUI interface the terminal windows automatically open and then the user want to logout it 1st close the terminal and then login. There is a file in #ls -a i.e .bashrc and .bash_logout

I does not know how to add my script in it ?Kindly guide me.
thanks
mypass
Change your default session to xterm before you login on the login screen. Check if this can help.
 
0 members found this post helpful.
Old 06-07-2011, 03:48 AM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
well if i only focus that when the user login the terminal windows automatically open then which file should i choose and the script to add into it.
Normally every time i right click on the desktop and then click to open the terminal which is a bit time consuming. How can it automatically open ?

thanks
garden
 
Old 06-07-2011, 04:38 AM   #5
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by gardenair View Post
well if i only focus that when the user login the terminal windows automatically open then which file should i choose and the script to add into it.
Normally every time i right click on the desktop and then click to open the terminal which is a bit time consuming. How can it automatically open ?

thanks
garden
No, in that failsafe xterm session you will only get a single terminal opened for you after login, there is no gui, no desktop nothing there..
 
0 members found this post helpful.
Old 06-07-2011, 04:44 AM   #6
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
thanks for the reply. Oh sorry I forgot to tell you that in run level 5 i.e GUI interface we can do it ?

Last edited by gardenair; 06-07-2011 at 04:48 AM.
 
Old 06-07-2011, 12:26 PM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by gardenair View Post
thanks for the reply. Oh sorry I forgot to tell you that in run level 5 i.e GUI interface we can do it ?
Yes, and Tinkster gave you the solution in the first reply.

Open the users .profile or .bashrc file, and put a command at the bottom to run whatever you want. You don't say what desktop environment you're using (KDE, Gnome, etc.), and there are different methods to autostart things for each. The link Tinkster gave you should get you started. In KDE (4.x at least), if you log out and something is running, it'll start it back up when you log back in.

divyashree, telling the OP to set their default login environment to be xterm is dangerous advice, and didn't address the OP's original question.
 
Old 06-08-2011, 03:38 AM   #8
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
thanks for the reply. Well i am using Gnome.
 
Old 06-08-2011, 03:46 AM   #9
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by TB0ne View Post

divyashree, telling the OP to set their default login environment to be xterm is dangerous advice, and didn't address the OP's original question.
How its dangerous guru ji ?
 
Old 06-08-2011, 09:55 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by gardenair View Post
thanks for the reply. Well i am using Gnome.
Then the link Tinkster provided should be what you need.
 
Old 06-08-2011, 09:58 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by divyashree View Post
How its dangerous guru ji ?
If you don't know why, that's a good sign you shouldn't have suggested it.

Think about it; you're setting your X windows default session to be an X Windows APPLICATION. That is recursive. One can't start without the other. So, dead session, but locked in a very unique way. The only chance you have is to connect to the box over the network, and either restart the DM, or TRY to kill the x term window...which may or may not work. If you're on a server with other folks, a restart may be in order.
 
Old 06-08-2011, 10:13 PM   #12
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by TB0ne View Post
If you don't know why, that's a good sign you shouldn't have suggested it.

Think about it; you're setting your X windows default session to be an X Windows APPLICATION. That is recursive. One can't start without the other. So, dead session, but locked in a very unique way. The only chance you have is to connect to the box over the network, and either restart the DM, or TRY to kill the x term window...which may or may not work. If you're on a server with other folks, a restart may be in order.
I suggested , because he wants a terminal only opened after login.

Ok, But I cant understand how its recursive. And if remote we can use hummingbird exceed to connect xterm.

Last edited by divyashree; 06-08-2011 at 11:08 PM.
 
Old 06-09-2011, 09:36 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by divyashree View Post
I suggested , because he wants a terminal only opened after login.
Right, which is why there are many methods of auto-starting an application after login.
Quote:
Ok, But I cant understand how its recursive.
Then you need to think about it. You are telling the X Window Manager to use an X Window APPLICATION as the MANAGER. Can't have one without the other.
Quote:
And if remote we can use hummingbird exceed to connect xterm.
There are many more things to use than Hummingbird, but stay focused on the OP's quesiton. They don't mention remote access or Hummingbird, so mentioning it is pointless.
 
Old 06-09-2011, 10:13 PM   #14
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by TB0ne View Post

There are many more things to use than Hummingbird, but stay focused on the OP's quesiton. They don't mention remote access or Hummingbird, so mentioning it is pointless.
I only just responded to you previous post, about connecting remotely.
 
  


Reply



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
How to open terminal automatically at run level 5 gardenair Linux - Newbie 6 06-26-2010 10:19 AM
Howto change the shell Automatically each time i login??? teddyZA Linux - Software 5 04-27-2007 09:39 AM
Mandriva 2007-open cd all the time automatically men123 Linux - Software 0 12-05-2006 01:55 PM
Over 100 terminals open automatically after login kimbergross Linux - Newbie 1 10-01-2003 07:30 AM
Over 100 terminal windows open automatically after login kimbergross Linux - Newbie 1 10-01-2003 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:19 PM.

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
Open Source Consulting | Domain Registration