Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  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 ?????

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
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,893

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
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:

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

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.

[    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:

Which will respect your current prompt, and just prepend the calendar.

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


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:32 AM.

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