custom background question

New to SGIs? Need help getting things going? This is the forum for you!
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
TeeTylerToe
Posts: 913
Joined: Mon Sep 13, 2004 11:56 pm

custom background question

Unread postby TeeTylerToe » Sat Nov 13, 2004 9:27 am

I've been having a hard time with getting my own background on my O2. after a little wheedling, I've gotten my background to appear on the list of backgrounds, but it still won't display it, and I think it's because it's color depth is more then 8-bit. is there any easy way to decrease the color depth? I had Gimp installed, but then I reformatted the disk.

unixmuseum
Posts: 2783
Joined: Mon Apr 19, 2004 4:25 pm
Location: Los Angeles, CA

Re: custom background question

Unread postby unixmuseum » Sat Nov 13, 2004 12:37 pm

TeeTylerToe wrote:I've been having a hard time with getting my own background on my O2. after a little wheedling, I've gotten my background to appear on the list of backgrounds, but it still won't display it, and I think it's because it's color depth is more then 8-bit. is there any easy way to decrease the color depth? I had Gimp installed, but then I reformatted the disk.

You can decrease the color depth of your picture, or increase the color depth of the root window, this way, you won't have to deal with a dithered picture...

TeeTylerToe
Posts: 913
Joined: Mon Sep 13, 2004 11:56 pm

Unread postby TeeTylerToe » Sat Nov 13, 2004 5:47 pm

I followed this
"First you must enable 24-bit support on your X server (Run xdpyinfo first to make sure your server supports this visual). This is important even when dealing with 256 color backgrounds as the default IRIX palette is not dynamic. Edit /var/X11/xdm/Xservers to reflect the following (make certain to back up your existing file first in case you need to revert):

:0 secure /usr/bin/X11/X -bs -nobitscale -c -pseudomap 4sight -solidroot sgilightblue -cursorFG red -cursorBG white -class TrueColor -depth 24"

which is what I think you're suggesting, and last I checked (I did stopgfx startgfx inbetween) it didn't work. when I tried wininfo on the root screen aftr I'd changed it to truecolor 24bit, it read as being 8 bit though.

unixmuseum
Posts: 2783
Joined: Mon Apr 19, 2004 4:25 pm
Location: Los Angeles, CA

Unread postby unixmuseum » Sat Nov 13, 2004 6:38 pm

Mine looks like that

Code: Select all

:0 secure /usr/bin/X11/X -bs -nobitscale -c -class TrueColor -depth 24 -solidroot sgilightblue -cursorFG red -cursorBG white -maxcliprec 8192


The maxcliprec is an ODSY thing, so you don't need it... I've never had any problem using 24-bit pictures as background...
Another question: what command do you use in you .backgrounds to display the picture? Here is an example of what I use:

Code: Select all

background "Jurassic"
   command "-image /usr/local/wallpapers/Jurassic-R.png"
   default "-image /usr/local/wallpapers/Jurassic-R.png"
   readok "/usr/local/wallpapers/Jurassic-R.png"

TeeTylerToe
Posts: 913
Joined: Mon Sep 13, 2004 11:56 pm

Unread postby TeeTylerToe » Sun Nov 14, 2004 1:31 pm

thanks for taking the time.

mine reads:
background "flclsun"
command "-bitmap /usr/people/hubble/backgrounds/flclsun.xpm"
default "-bitmap /usr/people/hubble/backgrounds/flclsun.xpm"
readok "/usr/people/hubble/backgrounds/flclsun.xpm"

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8042
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Re: custom background question

Unread postby nekonoko » Tue Nov 16, 2004 12:06 pm

TeeTylerToe wrote:I've been having a hard time with getting my own background on my O2. after a little wheedling, I've gotten my background to appear on the list of backgrounds, but it still won't display it, and I think it's because it's color depth is more then 8-bit. is there any easy way to decrease the color depth? I had Gimp installed, but then I reformatted the disk.


Which IRIX version? The method of changing the backgrounds changed in later versions of IRIX - my blog entry on Nekochan is for older IRIX (pre 6.5.22 if I remember right). It's much easier to set backgrounds now that JPEG/PNG/BMP/etc. are native.

The procedure is essentially the same (add -class TrueColor -depth 24 to /var/X11/xdm/Xservers, copy /usr/lib/X11/system.backgrounds to your home directory as .backgrounds) except a typical ~/.backgrounds entry looks like this:

Code: Select all

background "Anime"
default "-image /usr/people/neko/backgrounds/anime.jpg"


instead of like this:

Code: Select all

background "Anime"
command "-xpm /usr/people/neko/backgrounds/anime.xpm"
default "-xpm /usr/people/neko/backgrounds/anime.xpm"
readok "/usr/people/neko/backgrounds/anime.xpm"


A forum member wrote the following script for IRIX 6.5.22+ that will auto-populate a ~/.backgrounds based on the contents of a directory filled with JPEG/BMP/PNG images. Just change BGDIR to reflect an image directory of your choice:

Code: Select all

#!/bin/sh

BGDIR=$HOME/Backgrounds

cp /usr/lib/X11/system.backgrounds $HOME/.backgrounds
chmod 644 .backgrounds

cd ${BGDIR}
for x in *.jpg *.xpm *.png *.bmp; do
  case ${x} in
    '*.jpg'|'*.xpm'|'*.png'|'*.bmp') ;;
    *)
      NAME=`echo ${x} | tr '.' ' ' | awk '{print $1}' | tr '_' ' '`
      echo "" >> $HOME/.backgrounds
      echo "background \""${NAME}"\"" >> $HOME/.backgrounds
      echo "default \""-image ${BGDIR}/${x}"\"" >> $HOME/.backgrounds
    ;;
  esac
done


Another common problem that crops up is that the file that the IM desktop stores the current background choice could have restrictive permissions set which the desktop user can't overwrite.

viewtopic.php?t=275

Make certain that ~/.Sgiresources is populating correctly after selecting a background from the control panel.
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

TeeTylerToe
Posts: 913
Joined: Mon Sep 13, 2004 11:56 pm

Unread postby TeeTylerToe » Thu Nov 18, 2004 12:24 pm

success, thanks.

User avatar
miunk
Posts: 346
Joined: Sun Feb 08, 2004 4:17 pm
Location: quito

Unread postby miunk » Sat Jul 09, 2005 8:33 am

I have done all of the above (added -class TrueColor, created ~/.backgrounds, etc.) And my entry:

Code: Select all

background "november"
   default "-image /usr/people/miunk/backgrounds/november_sky.jpg"


But november is not in the list under Desktop->Customize->Backgrounds.

I am 6.5.22m - is it possible I needed 6.5.22f ? I've had this working in the past but it was on a different irix install.

unixmuseum
Posts: 2783
Joined: Mon Apr 19, 2004 4:25 pm
Location: Los Angeles, CA

Unread postby unixmuseum » Sat Jul 09, 2005 10:38 am

miunk wrote:I have done all of the above (added -class TrueColor, created ~/.backgrounds, etc.) And my entry:

Code: Select all

background "november"
   default "-image /usr/people/miunk/backgrounds/november_sky.jpg"


But november is not in the list under Desktop->Customize->Backgrounds.

I am 6.5.22m - is it possible I needed 6.5.22f ? I've had this working in the past but it was on a different irix install.

What kind of permission do you have on the file?

User avatar
miunk
Posts: 346
Joined: Sun Feb 08, 2004 4:17 pm
Location: quito

Unread postby miunk » Sat Jul 09, 2005 8:24 pm

-rw-r--r--

unixmuseum
Posts: 2783
Joined: Mon Apr 19, 2004 4:25 pm
Location: Los Angeles, CA

Unread postby unixmuseum » Sat Jul 09, 2005 10:49 pm

miunk wrote:-rw-r--r--

about trying a 777 and see if it works?

User avatar
miunk
Posts: 346
Joined: Sun Feb 08, 2004 4:17 pm
Location: quito

Unread postby miunk » Sun Jul 10, 2005 10:13 am

They are all 777. .Sgiresources, .backgrounds, and backgrounds dir recursively.

Here is my .backgrounds file:

Code: Select all

background "Solid"
   command "-solid %1"
   default "-solid sgiLightBlue"

background "Twilight"
   command "-execute /usr/sbin/twilight"
   default "-execute /usr/sbin/twilight"
   exeok "/usr/sbin/twilight"

background "november"   
   default "-image /usr/people/miunk/backgrounds/18.jpg"

unixmuseum
Posts: 2783
Joined: Mon Apr 19, 2004 4:25 pm
Location: Los Angeles, CA

Unread postby unixmuseum » Sun Jul 10, 2005 5:32 pm

miunk wrote:They are all 777. .Sgiresources, .backgrounds, and backgrounds dir recursively.

I thought you said the picture was -rw-r--r--

User avatar
miunk
Posts: 346
Joined: Sun Feb 08, 2004 4:17 pm
Location: quito

Unread postby miunk » Sun Jul 10, 2005 6:43 pm

It was - I had just updated it. Well - thanks for the attention. It appears I was just being foolish, I rebooted the machine and the entries appear just fine now... It could have been the permissions.

unixmuseum
Posts: 2783
Joined: Mon Apr 19, 2004 4:25 pm
Location: Los Angeles, CA

Unread postby unixmuseum » Sun Jul 10, 2005 10:57 pm

miunk wrote:It was - I had just updated it. Well - thanks for the attention. It appears I was just being foolish, I rebooted the machine and the entries appear just fine now... It could have been the permissions.

Glad it works... Although, you shouldn't have to reboot for this, any changes you make show up right away after launching the "background settings" application...


Return to “Getting Started, Documentation, Tips & Tricks”

Who is online

Users browsing this forum: No registered users and 0 guests