LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-28-2008, 12:52 PM   #1
gurbax singh
LQ Newbie
 
Registered: May 2007
Posts: 10

Rep: Reputation: 0
Thumbs down i want calander to be displayed on konsole when i login as root ?????


hi
i m working on debain linux and KDE
i want that whenever i login in konsole as a root i get
calander of the month first of all

just like a message

" you have a new mail "

kindly help


gurbax singh
 
Old 06-28-2008, 02:16 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,771

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Something like this?
PS1="[\$(cal)][\u@\h:\w]\$ "

If so, just put it into root's .bashrc.
 
Old 06-28-2008, 03:54 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
That will add it to your prompt, which is an overhead as I see it.

I think he just want to have the calendar displayed when a new shell is opened. In that case, just add the cal command to the ~/.bashrc, a single line containing cal:

Code:
cal
Otherwise, I would use the advise from bigrigdriver, with some light modifications

Code:
PS1="\$(cal)\n[\u@\h:\w]\$ "
I added a \n in the middle, otherwise it gets really messed. The square brackets around cal do not help either, as you can see below.

Code:
[    junio de 2008   
do lu ma mi ju vi sá
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30][root@jesgue:/var/portage/games-action/rune]$
Even nicer and easier would be:

Code:
PS1="\$(cal)\n${PS1}"
Which will respect your current prompt, and just prepend the calendar.

Last edited by i92guboj; 06-28-2008 at 03:56 PM.
 
  


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
konsole acts as "Root Konsole" ab44045 Linux - General 11 06-11-2007 05:18 PM
Gnome desktop not displayed after second login newuser455 Linux - Desktop 2 03-07-2007 06:23 PM
Non KDE organiser/todo/calander wanted dive Linux - Software 6 05-22-2006 01:58 PM
Konsole Root Login Fail after Executable Moved eightysixme Linux - Security 4 01-03-2005 10:27 PM
How do i get into root from konsole? AngelLucifer Linux - Newbie 7 11-01-2003 05:23 PM


All times are GMT -5. The time now is 03:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration