SUMMARY: Dtlogin*logo*bitmapFile

From: J.R. Lee (jrl@adc.idt.com)
Date: Thu Mar 11 1999 - 14:13:29 CST


    **** ORIGINAL QUESTION ****

Hello everyone,

I am trying to put my own site bitmap file on the dtlogin screen.
In the file /usr/dt/config/C/Xresources there is a line for the bitmap.

Dtlogin*logo*bitmapFile: <file>

I have used different formats (.pm .xpm .bmp .gif) and none come up correctly.
Do I have to have it in a certain size also, if so what is that size?
Do I have to do something special for this to actually show up?
I looked at sun.docs and I didn't find much that helps. I am running
5.6 and 5.5.1 on anything from sparc 20s to Ultra 2s.

Thanks in Advance,

J.R.

    **** SUMMARY ****
After a couple of tries and some good replies I got it working. Brad Peers
had the answer for me. Below is the necessary steps for the graphic, steps
for the Xresources file, the responces from the sun-managers group, and a
perl script I wrote to implement this on my machines. Thanks to everyone
for their responces..

NECESSARY STEPS FOR GRAPHIC:
----------------------------
1. 237 x 237 pixel dimensions
2. 8-bit 64 colors
3. .xpm format

NECESSARY STEPS FOR Xresources file:
----------------------------
1. Create a /etc/dt/config/C directory
2. Copy the Xresources file there
3. Copy the graphics file there
3. Modify the Dtlogin*logo*bitmapFile line to the following...

Dtlogin*logo*bitmapFile: /etc/dt/config/C/graphic_name.xpm

4. adjust permissions to be consistent with /usr/dt/config...

RESPONCES FROM THE SUN-MANAGERS LIST:
-------------------------------------
-- Brad Peers -- BPeers@talisman-energy.com
> Try:
> copy /usr/dt/config/C/Xresources to /etc/dt/config/C/Xresources
>
> line will be:
> Dtlogin*logo*bitmapFile: /etc/dt/config/C/file.xpm
>
> I could only get this to work with .xpm, and it had to be in the
> /etc/dt/config/C dir
-- Brad Peers --

-- Jeff Blosser -- jeff.blosser@pvii.com
> CDE is not very user friendly when trying to change the
> icons. If you are using a icon delivered with CDE or
> openwin, it will probably work. But if you are trying
> to use a icon that you created, you might have problems.
>
> I got our company icon working last week. Here are some
> of the things I found. The icon size had to be 237x237.
> I created the icon using xv, it can be downloaded from
> the internet. I also had to put the file in /usr/dt/appconfig/icons/C,
> and change the line in Xresources.
-- Jeff Blosser --

-- Mikael Nordstrom -- Mikael.Nordstrom@era-t.ericsson.se
> I did this once a long time ago and got it to work after
> some messing around. I don't quite remember but I think
> the number of colors as well as the size could be an
> issue. Use one of the default logos under
>
> /usr/dt/appconfig/icons
>
> and try to make your image as similar in format as
> possible.
>
> If I remember right the size should be 237x237 pixels and
> there must not be more than 64 colors. I think that if
> you can open the image in the icon editor you are home free.
-- Mikael Nordstrom --

PERL SCRIPT I WROTE:
--------------------
#!/usr/local/bin/perl

if(chdir("/etc/dt"))
{
  system("mkdir config");
  system("mkdir config/C");
  system("cp /home/jrl/red/images/bg_dtlogo.xpm /etc/dt/config/C/");
  system("chmod -R 755 config");
  system("chown -R root:root config");

  open(X, "/usr/dt/config/C/Xresources") or die "Couldn't open Xresources\n";
  open(Y, ">> /etc/dt/config/C/Xresources") or die "Couldn't write new Xresources\n";
  
  while(<X>)
  {
    chomp;
    if(/\!\!\sDtlogin\*greeting\.labelString:[\w\W\s]*/)
    {
      print Y "Dtlogin*greeting.labelString: Welcome to %LocalHost% @ ADC\n";
    }
    elsif(/\!\!\sDtlogin\*logo\*bitmapFile:[\w\W\s]*/)
    {
      print Y "Dtlogin*logo.bitmapFile: /etc/dt/config/C/bg_dtlogo.xpm\n";
    }
    else
    {
      print Y "$_\n";
    }
  }
  close(X);
  close(Y);
  chdir("config/C");
  system("chmod 664 ./*");
  system("chown root:root ./*");
}
else
{
  print "Couldn't change to /etc/dt\n";
}

-- 

--------------------------------------------------------------- J.R. Lee email: jrl@adc.idt.com System Administrator phone: 770-497-2947 Integrated Device Technology, Inc. 11555 Medlock Bridge Rd. Suite #170 Duluth, GA 30097

"UNIX _IS_ user friendly; it's just picky about who its friends are."

perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:16 CDT