FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-20-2010, 02:11 PM
 
Default How to display the IP on the welcome screen

> Hi all,
>
> I'm running CentOS 5.4 in a VMware guest, with the host connected to a
> DHCP enabled LAN
> When CentOS comes up, I would like to see the IP adress displayed on the
> welcome screen.
> This would save me the hassle of logging in the VM, getting the IP, and
> logging off before finally ssh'ing to the VM.
>
> Does anyone have a clue on how to do this ??

man ssh

ssh <servername> ifconfig | grep "inet addr"

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-20-2010, 02:22 PM
"Sorin Srbu"
 
Default How to display the IP on the welcome screen

From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
Of Patrick DERWAEL
Sent: Tuesday, April 20, 2010 4:01 PM
To: centos@centos.org
Subject: [CentOS] How to display the IP on the welcome screen

Hi all,
I'm running CentOS 5.4 in a VMware guest, with the host connected to a DHCP
enabled LAN
When CentOS comes up, I would like to see the IP adress displayed on the
welcome screen.
This would save me the hassle of logging in the VM, getting the IP, and
logging off before finally ssh'ing to the VM.

=============

Is this to be shown on the GUI welcome screen or when you eg ssh in?

--
/Sorin
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-20-2010, 02:28 PM
Georghy
 
Default How to display the IP on the welcome screen

Sorin Srbu a écrit :
> From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
> Of Patrick DERWAEL
> Sent: Tuesday, April 20, 2010 4:01 PM
> To: centos@centos.org
> Subject: [CentOS] How to display the IP on the welcome screen
>
> Hi all,
> I'm running CentOS 5.4 in a VMware guest, with the host connected to a DHCP
> enabled LAN
> When CentOS comes up, I would like to see the IP adress displayed on the
> welcome screen.
> This would save me the hassle of logging in the VM, getting the IP, and
> logging off before finally ssh'ing to the VM.
>
> =============
>
> Is this to be shown on the GUI welcome screen or when you eg ssh in?
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
try a bash script like the following :

#!/bin/sh
ADRESS=`ifconfig | grep "inet addr" | awk '{print $2}' | sed s/addr:// |
head -n 1`
echo "The IP adress is : $ADRESS." > /etc/issue

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-20-2010, 03:33 PM
Paul Heinlein
 
Default How to display the IP on the welcome screen

On Tue, 20 Apr 2010, Georghy wrote:

> try a bash script like the following :
>
> #!/bin/sh
> ADRESS=`ifconfig | grep "inet addr" | awk '{print $2}' | sed s/addr:// |
> head -n 1`
> echo "The IP adress is : $ADRESS." > /etc/issue

Or, if you'd rather use the iproute toolset rather than ifconfig:

ip -o -f inet addr show dev eth0 | awk '{print $4}' | cut -d/ -f1

--
Paul Heinlein <> heinlein@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-20-2010, 05:49 PM
"Patrick Derwael"
 
Default How to display the IP on the welcome screen

Ideally, it should be displayed on the GUI, like the date/time and hostname


-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
Of Sorin Srbu
Sent: mardi 20 avril 2010 16:22
To: 'CentOS mailing list'
Subject: Re: [CentOS] How to display the IP on the welcome screen


From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
Of Patrick DERWAEL
Sent: Tuesday, April 20, 2010 4:01 PM
To: centos@centos.org
Subject: [CentOS] How to display the IP on the welcome screen

Hi all,
I'm running CentOS 5.4 in a VMware guest, with the host connected to a DHCP
enabled LAN
When CentOS comes up, I would like to see the IP adress displayed on the
welcome screen.
This would save me the hassle of logging in the VM, getting the IP, and
logging off before finally ssh'ing to the VM.

=============

Is this to be shown on the GUI welcome screen or when you eg ssh in?

--
/Sorin

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-20-2010, 05:49 PM
"Patrick Derwael"
 
Default How to display the IP on the welcome screen

This is a good step, but how do I get the contents of /etc/issue on the gui
??



Patrick Derwael
Rue Hubert Larock, 20
4280 Hannut - Belgique
G: +32 (0)479.80.50.79
T : +32 (0)19.63.64.45


try a bash script like the following :

#!/bin/sh
ADRESS=`ifconfig | grep "inet addr" | awk '{print $2}' | sed s/addr:// |
head -n 1`
echo "The IP adress is : $ADRESS." > /etc/issue

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-20-2010, 06:05 PM
Athmane Madjoudj
 
Default How to display the IP on the welcome screen

On Tue, Apr 20, 2010 at 6:49 PM, Patrick Derwael <patrick@derwael.be> wrote:
> This is a good step, but how do I get the contents of /etc/issue on the gui
> ??

cat /etc/issue | zenity --text-info --width 530

ps.

i'm not sure if zenity is standard in CentOS, otherwise install EPEL repo.

--
Athmane Madjoudj
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-21-2010, 05:35 AM
Mogens Kjaer
 
Default How to display the IP on the welcome screen

On 04/20/2010 07:49 PM, Patrick Derwael wrote:
> Ideally, it should be displayed on the GUI, like the date/time and hostname

http://elder-geek.blogspot.com/2009/09/ip-address-on-gdm-login-page.html

Mogens
--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: mk@crc.dk Homepage: http://www.crc.dk
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-21-2010, 06:51 AM
"Sorin Srbu"
 
Default How to display the IP on the welcome screen

>-----Original Message-----
>From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
Behalf
>Of Patrick Derwael
>Sent: Tuesday, April 20, 2010 7:49 PM
>To: 'CentOS mailing list'
>Subject: Re: [CentOS] How to display the IP on the welcome screen
>
>Ideally, it should be displayed on the GUI, like the date/time and hostname

Ah, I've been looking to get this too - it'd be very practical - but so far
haven't found a way. 8-/

--
/Sorin
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-21-2010, 07:12 AM
"Sorin Srbu"
 
Default How to display the IP on the welcome screen

>-----Original Message-----
>From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
Behalf
>Of Mogens Kjaer
>Sent: Wednesday, April 21, 2010 7:35 AM
>To: CentOS mailing list
>Subject: Re: [CentOS] How to display the IP on the welcome screen
>
>On 04/20/2010 07:49 PM, Patrick Derwael wrote:
>> Ideally, it should be displayed on the GUI, like the date/time and
hostname
>
>http://elder-geek.blogspot.com/2009/09/ip-address-on-gdm-login-page.html

Thanks!

Notes: If the default TreeFlower theme is being used, the path is
<</usr/share/gdm/themes/TreeFlower>> and the image to be used is
background.png.

Testing this right now.

--
/Sorin
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 05:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org