How to show hostname or username on system tray?

Window managers, icon programs, widgets, etc.
Post Reply
Message
Author
Benctes
Posts: 7
Joined: Thu 07 Jun 2018, 15:10
Location: 828 Pike Street San Diego, CA 92111
Contact:

How to show hostname or username on system tray?

#1 Post by Benctes »

is there someone who knows how to show the hostname or user in system tray? thanks in advance

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#2 Post by tallboy »

I am not sure about what you mean by system tray? (foreigner, you know :roll: ) Can you please be more specific?
After all, Puppylinux was designed for a single user, usually running as root.

Edit: OK, I think I know what you ask for. In my Lucid 5.2.8.7 I can right-click the network icon, and get Network status information, where I'll find the hostname, which is puppypc. Do you want a permanent view of the hostname in the system tray? You'll find the hostname in /etc/hostname/ or in /proc/sys/kernel/hostname. You could make a new icon with the hostname, to replace the existing network icon, if that is what you look for.
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#3 Post by tallboy »

Some little comment to my aswer would be the polite way, Benctes. :D
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#4 Post by don570 »

It would take some programming knowledge to put the info in the tray,
However there is a C language program that will return the host name and address that I find useful...


Barryk describes it here...
http://bkhome.org/news/201802/new-getlo ... ility.html

It is called 'getlocalip'
The source is in 'pup-tools-20180225.tar.gz':

http://distro.ibiblio.org/quirky/quirky ... betical/p/
Simple to compile a C program...

______________________________________________

Benctes
Posts: 7
Joined: Thu 07 Jun 2018, 15:10
Location: 828 Pike Street San Diego, CA 92111
Contact:

#5 Post by Benctes »

tallboy wrote:Some little comment to my aswer would be the polite way, Benctes. :D
thank you tallboy...

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

Benctes, where exactly is Pike Street in San Diego?

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#7 Post by tallboy »

You're welcome, Benctes. :D
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#8 Post by rufwoof »

A trick I've used (not tried it in Puppy), is to use xclock. If you set the type to digital you can specify the date/time format ... and (the trick) include other characters. I built up a xclock that showed the various temperatures ...etc values as part of that and ran xclock with a size and geometry that fitted where I wanted that. Something like

xclock -digital -strftime "$TEMP"

and where $TEMP contained the date/time formatting along with other text.

That could just as easily show the hostname, and in Puppy (jwm) you can load the likes of xload, or xclock into the tray using the Swallow jwm tag.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#9 Post by tallboy »

rufwoof, me like! :D
True freedom is a live Puppy on a multisession CD/DVD.

Post Reply