LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-05-2007, 06:43 PM   #1
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Question Which machine am I on?


I'm running a 2-port KVM connected to my two Linux machines. I'll eventually move to the fast one and have just the one, but at the moment I'm looking for a way to label the Gnome top menu, or something else just as obvious, with the machine name. Any ideas? I'd rather not try to put it as the background, since that's pretty much covered up all the time.
 
Old 01-05-2007, 10:24 PM   #2
epoo
Member
 
Registered: Aug 2003
Distribution: slackware 11, ubuntu 7.04
Posts: 165

Rep: Reputation: 30
i do the same thing, but i have fluxbox running on my server, and gnome on my desktop, so its obvious which one i'm on. could you try setting up the icons differently if you have icons on the top bar ? if you wanted to put a lot of work into it, you could make icon-sized letters and add a bunch of useless apps to the top bar all in a row, then set their icons so they spell out the name of the machine.
 
Old 01-06-2007, 02:02 AM   #3
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Icons? Is desktop wallpaper change a taboo?
 
Old 01-06-2007, 02:44 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Original Poster
Rep: Reputation: 141Reputation: 141
*if you wanted to put a lot of work into it, you could make icon-sized letters and add a bunch of useless apps to the top bar all in a row, then set their icons so they spell out the name of the machine.*

Thanks epoo, I've been thinking of just that, actually. In the interim, I've just been opening a gnome-terminal and looking at the title-bar.

Cheers!
 
Old 01-06-2007, 03:08 PM   #5
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Maybe make host name title of terminal icon then? I'll post ImageMagick-based script to generate letter icons when I make Firefox not crash under Beryl after every window switch..
 
Old 01-06-2007, 03:09 PM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
cat mkemptyxpm
#! /bin/bash

cat >"$1" <<EOF
static const char * const a[] = {
"1 1 1 1",
" c #FFFFFF",
" "
}
EOF

if [ -n "$2" ]; then
convert -resize "$2x${3:-$2}!" "$1" "$1";
fi;
 
Old 01-06-2007, 03:09 PM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
#! /bin/bash

x=36;
y=36;

./mkemptyxpm "$1" $x $y;
convert "$1" -font $(cat fontname) -gravity Center -draw "text 0,-$((y/3 -1)) '$2'" "$1";
 
Old 01-06-2007, 03:53 PM   #8
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Original Poster
Rep: Reputation: 141Reputation: 141
Raskin,

I couldn't get your scripts to work; probably cause I'm lame. But, I did get the general idea, I think. I tried setting that title bar background to an icon that had the short machine name in it. Blechhh, that was simply nasty. Maybe I can figure out how to change the title bar name of one of the three gnome applications: "Applications", "Places", or "Desktop".
 
Old 01-06-2007, 04:12 PM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
I hope doing it in your favorite font and surrounding it with margins that ensure that scaling will not kill proportions was tried.

About scripts - they can be bash-version-specific, or ImageMagick-version-specific, or both, as I tested them only on one install of LFS. And didn't you forget to create file 'fontname' in the same directory and put the desired font mask into it? Surely 'mkemptyxpm' should be in the same directory as the main script etc.
 
Old 01-06-2007, 04:26 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Original Poster
Rep: Reputation: 141Reputation: 141
"And didn't you forget to create file 'fontname' in the same directory and put the desired font mask into it?"

Did I forget it? Hell, I can't even spell it! Seriously, I have only a vague idea of what you're talking about. I hate to say it, but this sounds like more work than I want to do for this problem. I may resort to just putting the first letter of my hostname on top of the icon for the gnome-terminal. I think I can manage that without totally destroying things. I have to tell you that today, just now, is the first time I've ever run gimp.
 
Old 01-06-2007, 04:40 PM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Er.. Sorry.. Failed to estimate you are not fluent user of xfontsel and also you haven't fully accustomed to shell syntax. I will try to remember to look at first GNU/Linux install date before offering scripts that use full knowledge of man bash.. Sorry once more time.

One more funny solution: try setting backgrounds of different tint. I use violet-green-red for laptop battery indication, but the same can be used to make boxes differ. You'll get accustomed quickly, and using this technique you'll know where you are in zero actions (depends on layout, though - you may have desktop fully hidden most of the time)!
 
Old 01-06-2007, 05:03 PM   #12
jerril
Member
 
Registered: Nov 2005
Location: Ontario, Canada
Distribution: Linux Mint
Posts: 116

Rep: Reputation: 16
Run something like gkrellm (a nice graphic system monitor) on both machines.
 
Old 01-06-2007, 05:14 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Original Poster
Rep: Reputation: 141Reputation: 141
Raskin, I'm (re)new to Linux/Unix. Until I loaded Debian recently, it had been just about 10 years since I was a UnixWare programmer writing airline related programs. We just didn't have a lot of need for messing about with fonts in that environment.

So, OK, what I did was to make the toolbar transparent on the "fast" machine. Hopefully it won't take me too long to associate "transparent toolbar" with which machine I'm on. If it does, then I can probably manage to put a big red initial on top of the gnome-terminal icon to help me on my way.

Thanks, everyone, for all the suggestions.
 
Old 01-11-2007, 01:59 PM   #14
epoo
Member
 
Registered: Aug 2003
Distribution: slackware 11, ubuntu 7.04
Posts: 165

Rep: Reputation: 30
i dont know why you dont want to change the wallpaper, but what if you make both toolbars partially or fully transparent, then edit the wallpaper and write in the name of the machine that youre on so it appears under an open spot in the toolbar - so you can see the machine name through the toolbar.
 
Old 01-11-2007, 02:20 PM   #15
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Original Poster
Rep: Reputation: 141Reputation: 141
Hi epoo,

"i dont know why you dont want to change the wallpaper,"

I rarely see much of the wallpaper because of all the open windows. Using the transparent top toolbar puts it visually in a place where I don't have to be searching for a glimpse of the background. I suffer from eyestrain pretty easily, and I'm just trying to keep everything pretty neutral with no big "look at me" places, if you know what I mean.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH forward from a Windows machine to a Linux machine isn't working nickj6282 Linux - Networking 3 08-13-2006 02:47 PM
how to watch linux client machine desktop(activities) from windows machine deepak rawat Linux - Networking 7 07-03-2006 04:59 PM
how to shutdown,restart and log off windows machine remotely through a linux machine deepak rawat Fedora 1 05-23-2006 01:25 AM
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:00 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
Open Source Consulting | Domain Registration