LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-07-2013, 06:53 AM   #1
khum
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Rep: Reputation: Disabled
automatically open a terminal after boot


Hi everybody. I'm pretty new to the fascinating Linux world and just signed in I'm running CentOs and doing some tests.

Currently, when I boot the machine, the login screen appears.
I would like to automatically login the machine as a certain user (without login screen) and automatically open a terminal. How to do that?
Second step would be running automatically a script in that terminal (e.g. a simple "echo Welcome!") so that the final result would be booting the machine and (after boot completed) appearing over the desktop a terminal showing something like
Welcome!
$

any suggestion would be greatly appreciated
Cheers,
kh

Last edited by khum; 11-07-2013 at 06:54 AM. Reason: typo
 
Old 11-07-2013, 07:01 AM   #2
piquezino
LQ Newbie
 
Registered: Aug 2012
Location: Troyes, France
Distribution: Ubuntu
Posts: 15

Rep: Reputation: Disabled
Hello !
Try this solution

If you want the "Welcome", edit /etc/motd
 
Old 11-07-2013, 08:11 AM   #3
khum
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for the answer.
Solution linked refers to CLI mode, I would like to still access GUI mode (a terminal over the desktop), is that possible?
 
Old 11-07-2013, 08:46 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
@khum: I'm assuming your DM is Gnome:

To automatically log in modify the /etc/gdm/custom.conf, add to the
[daemon] section the following:

AutomaticLoginEnable=True
AutomaticLogin=username


Replace username with the actual user name.


Starting a terminal: System -> Preferences -> Startup Applications (or Sessions not sure which one is used on CentOS), click on add and enter gnome-terminal in the command box.

You can also fill in the full path to a script in the command box.


A welcome message can be done in several ways. Here's one using the users .bashrc file: Add echo "Welcome!" to the bottom.
 
2 members found this post helpful.
Old 01-09-2014, 01:12 PM   #5
khum
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
druuna thanks a lot! It did work! And btw the welcome message was just an example

Sorry to answer so late but hadn't chance to test it earlier.

Last question: which file contains info on the command gnome-terminal entered in the session box?
 
Old 01-09-2014, 01:34 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Quote:
Originally Posted by khum View Post
druuna thanks a lot!
You're welcome

Quote:
Originally Posted by khum
Last question: which file contains info on the command gnome-terminal entered in the session box?
gnome-terminal has a manual page (man gnome-terminal)

BTW: gnome-terminal was just an example, you can use just about any command/program. Another example you can put in the command box: /usr/bin/firefox
 
Old 01-09-2014, 03:58 PM   #7
khum
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
I realize I wasn't clear at all (my fault, sorry )
I meant, when I configure via GUI this startup command, which is the configuration file containing this information?
I expected something like rc.local...
 
Old 01-09-2014, 04:39 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
I believe it's usually in ~/.config/autostart
 
2 members found this post helpful.
Old 01-10-2014, 08:38 AM   #9
khum
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
I believe it's usually in ~/.config/autostart
you're right thanks a lot
 
  


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
how to run a terminal command that will open in a new terminal automatically floorripper Linux - General 5 06-18-2013 04:36 AM
automatically open terminal at login time. gardenair Linux - Newbie 13 06-09-2011 11:13 PM
[SOLVED] open apps at boot automatically unihiekka Linux - Newbie 4 12-03-2010 09:25 AM
How to open terminal automatically at run level 5 gardenair Linux - Newbie 6 06-26-2010 11:19 AM
Over 100 terminal windows open automatically after login kimbergross Linux - Newbie 1 10-01-2003 02:50 AM


All times are GMT -5. The time now is 06:31 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