Someone's got to know... Screen resolution question.

Hi all,
Someone please help, I have a machine running Sun Solaris 5.8.
X used to run fine, not it can't start. (possible user intervention)
It looks to be trying to run at 1280x1024. I don't think the hardware will support it, it seems high.

Anyways, how from the commandline, via ssh, can I change the resolution?
I would like it to be 1024x768 @ 60 hz.

Can this be set via the command line via ssh? If not can it be done via the command line sitting in front of the machine, eitherway, how do I do this?

Thank you.

I think the command you have to run depends on the graphic card you have.
For my workstation, the following command works correctly:

m64config -res 1024x768x60 now noconfirm nocheck -depth 24

I attach a script I found some time ago, maybe it can help. If you have a look at the various commands inside, you may get a better idea of the configuration tools for each card.

GraphicsCardTest.sh
-------------------
#!/bin/sh

FBCONFIG=/usr/sbin/fbconfig

cardInfo() {
    needExtraCheck=no
    case "$1" in
    m64* )
        theCardName='Mach 64'
        theCard=m64
        theConfigCommand=/usr/sbin/m64config
        theConfigOption=-prconf
        theConfigKey='Current depth'
        theExpectedValue='24'
        ;;
    ffb* )
        theConfigCommand=/usr/sbin/ffbconfig
        theConfigOption=-propt
        theConfigKey='Default Visual'
        theExpectedValue='Linear Normal Visual'
	if $theConfigCommand $theConfigOption 2>&1 \
		| /usr/bin/grep '^Gamma Correction' > /dev/null 2>&1; then
          theCard=ffb_new
          theCardName='Creator 3D [new type]'
	else
          theCard=ffb_old
          theCardName='Creator 3D [old type]'
          needExtraCheck=yes
	fi
        ;;
    afb* )
        theCardName='Elite 3D'
        theCard=afb
        theConfigCommand=/usr/sbin/afbconfig
        theConfigOption=-propt
        theConfigKey='Default Visual'
        theExpectedValue='Linear Normal Visual'
        ;;
    ifb* )
        theCardName='Expert 3D'
        theCard=ifb
        theConfigCommand=/usr/sbin/fbconfig
        theConfigOption=-propt
        theConfigKey='Default Visual'
        theExpectedValue='Linear Normal Visual'
        ;;
    gfxp* )
        theCardName=PGX32
        theCard=gfxp
        theConfigCommand=/usr/sbin/GFXconfig
        theConfigOption=-prconf
        theConfigKey='Current depth'
        theExpectedValue=24
        ;;
    * )
        theCardName=
        theCard=unknown
        theConfigCommand=
        theConfigOption=
        theConfigKey=
        theExpectedValue=
        ;;
    esac
}

msg_common() {
    echo "$cardNum) The following graphics card is not properly configured for"
    echo "${ind}running GNOME:"
    echo
    echo "${ind}  /dev/fbs/$1		($theCardName)"
    echo
    echo "${ind}The current value of setting \"$theConfigKey\" is $theValue."
    echo "${ind}If you intend running GNOME on this graphics card you need"
    echo "${ind}to change this setting to $theExpectedValue."
    echo
}

msg_extra_common() {
    if [ "x$cardStatus" != xNOT_OK ]; then
	echo "$cardNum) The following graphics card is not properly configured for"
	echo "${ind}running GNOME:"
	echo
	echo "${ind}  /dev/fbs/$1		($theCardName)"
	echo
    fi
}

msg_m64() {
    echo "${ind}Run this command:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -res 1152x900 -depth 24"
    echo
    echo "${ind}This command may fail if your graphics card does not have enough"
    echo "${ind}memory for this resolution.  In that case try using a lower"
    echo "${ind}resolution.  E.g."
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -res 800x600 -depth 24"
    echo
    echo "${ind}The following command lists all possible resolutions:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -res \\?"
    echo
}

msg_ffb_new() {
    echo "${ind}Run this command:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -deflinear true -g 1.1"
    echo
}

check_ffb_old() {
    IMRC=/opt/gnome-1.4/etc/imrc
    DOTIMRC=$HOME/.imrc
    if [ -f $DOTIMRC ]; then
	if cat $DOTIMRC 2>/dev/null \
		| /usr/bin/tr '\t' ' ' 2>/dev/null \
		| /usr/bin/grep -i '^ *Mit-Shm *off' >/dev/null 2>&1; then
	    return
	elif cat $DOTIMRC 2>/dev/null \
		| /usr/bin/tr '\t' ' ' 2>/dev/null \
		| /usr/bin/grep -i '^ *Mit-Shm *on' >/dev/null 2>&1; then
	    cardExtraStatus=LOCAL_ON
	    return
	fi
    fi
    if [ -f $IMRC ]; then
	if cat $IMRC 2>/dev/null \
		| /usr/bin/tr '\t' ' ' 2>/dev/null \
		| /usr/bin/grep -i '^ *Mit-Shm *on' >/dev/null 2>&1; then
	    cardExtraStatus=GLOBAL_ON
	fi
    fi
}

msg_ffb_old() {
    echo "${ind}Run this command:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -deflinear true"
    echo
}

msg_extra_ffb_old() {
    if [ "x$cardStatus" != xNOT_OK ]; then
	echo "${ind}If you intend running GNOME on this graphics card you need"
	echo "${ind}to turn off the Mit-Shm option of Imlib."
    else
	echo "${ind}You also need to turn off the Mit-Shm option of Imlib."
    fi
    echo
    if [ "x$cardExtraStatus" = xGLOBAL_ON ]; then
	echo "${ind}To turn off this option for all users edit the file"
	echo "${ind}   $IMRC"
	echo "${ind}and change the value of \"Mit-Shm\" to \"off\""
	echo
    fi
    echo "${ind}To turn off Mit-Shm for yourself only"
    echo "${ind}  - go to the \"Settings\" system menu"
    echo "${ind}  - select \"Imlib Configuration Options\""
    echo "${ind}  - open the \"Rendering\" tab"
    echo "${ind}  - uncheck the \"MIT-SHM Shared Memory Enabled\" checkbox"
    echo "${ind}  - click on \"Save User Config\""
    echo "${ind}  - click on \"Close\""
    echo
}

msg_afb() {
    echo "${ind}Run this command:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -deflinear true -g 1.1"
    echo
}

msg_ifb() {
    echo "${ind}Run this command:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -deflinear true -g 1.1"
    echo
}

msg_gfxp() {
    echo "${ind}Run this command:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -res 1280x1024 -depth 24"
    echo
    echo "${ind}The following command lists all possible resolutions:"
    echo
    echo "${ind}  $theConfigCommand -dev /dev/fbs/$1 -res \\?"
    echo
}

checkCard() {
    cardStatus=UNKNOWN
    if [ "x$theCard" != x -a "x$theCard" != xunknown ]; then
	r0=`echo | $theConfigCommand $theConfigOption -dev /dev/fbs/$1 2>&1 | \
	    /usr/bin/grep -i "^$theConfigKey:" | \
	    cut -f2 -d:`
	theValue=`echo $r0`
	if [ "x$theValue" = x ]; then
	    cardStatus=UNKNOWN
	elif [ "x$theValue" = "x$theExpectedValue" ]; then
	    cardStatus=OK
	else
	    cardStatus=NOT_OK
	fi
    fi
    cardExtraStatus=
    if [ x$needExtraCheck = xyes ]; then
        check_$theCard
    fi
}

getCardList() {
    list0=`$FBCONFIG -list 2>/dev/null | /usr/bin/grep '^ */dev/fbs'`
    list1=`echo "$list0" | \
	/usr/bin/sed -e 's/^ *\/dev\/fbs\/\([^ ]*\) .*$/\1/'`
    cardList=`echo $list1`
}

main() {
    getCardList
    IFS=' '
    cardNum=1
    ind='   '
    for card in $cardList; do
	cardInfo $card
	checkCard $card
        if [ "x$cardStatus" = xNOT_OK ]; then
	    msg_common $card
	    msg_$theCard $card
	fi
	if [ "x$cardExtraStatus" != x ]; then
	    msg_extra_common $card
	    msg_extra_$theCard $card
	fi
	cardNum=`expr $cardNum + 1`
    done
}

main

Oh Boy...

I think I found more of my issue...

echo $DISPLAY = DAISPLAY: Undefined variable

This machine used to boot up and after log in went to a gui desktop.

Not it errors saying it can't start X on Display 0, I thought it was because someone changed it to a higher resolution...

Guess it looks like it is because of the above error.

How do I set the Display Env for all users?

I think you should put all the system-wide variables in "/etc/profile".
However, have a look at this post also: http://www.unix.com/unix-for-dummies-questions-and-answers/3861-defining-variables-at-boot-time.html#post12749

PROBLEM SOLVED!!
OWconfig file had been blanked, restored from the trusty .BAK version, all is well now.

Damn!!!

I am at a loss, I can't seem to figure out for the life of me what happened...
First off I think the user screwed it up with sudo privileges, errrr!!

Anyways, here is what has been done to my knowledge...
I know sys-unconfig was ran in attempt to correct a hostname issue. hostname issue looks to be solved but soon after, and I do not know if it is possible but this "X can't start on Display:0" error at the first log in screen comes up.

I did not make any changes so I am at a loss of where to start... besides removing his sudo rights. lol. X used to run, maybe 2 weeks ago it broke.

Any ideas to assist in trouble shooting?

Many thanks.