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


 
Thread Tools Search this Thread
Operating Systems Solaris Someone's got to know... Screen resolution question.
# 1  
Old 09-08-2007
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.
# 2  
Old 09-08-2007
I think the command you have to run depends on the graphic card you have.
For my workstation, the following command works correctly:

Code:
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.

Code:
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

# 3  
Old 09-10-2007
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?
# 4  
Old 09-10-2007
I think you should put all the system-wide variables in "/etc/profile".
However, have a look at this post also: https://www.unix.com/unix-for-dummies...html#post12749
# 5  
Old 09-10-2007
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.

Last edited by komputersman; 09-14-2007 at 11:57 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Screen Resolution

Hi all. I have a very peculiar problem in Solaris 10. The output of the m64config -prconf command with regards the Card Adapter is the following. Card possible resolutions: 720x400x85, 640x480x60, 640x480x72, 640x480x75 800x600x56, 800x600x60, 800x600x72, 800x600x75, 1024x768x60 ... (0 Replies)
Discussion started by: lynxman
0 Replies

2. Linux

How to change screen Resolution?

Dear all I install Cent OS 5.5 ( Linux OS), with bshell and also Windows OS on the my laptop (ASUA) maximum screen resolution in Windows OS is 1024*760 but in Cent OS 5.5 is 800 *600, I have a program that is necessary to install on Cent OS and I have problem with other Linux distributions... (2 Replies)
Discussion started by: mkhorami76
2 Replies

3. UNIX for Dummies Questions & Answers

Changing the screen resolution

I have installed several flavors of Linux and FreeBSD onto my machine. Now when I want to change my screen resolution, it only has one option which is 800x600. Is there a way to change that to a bigger resolution? And if there is, what file do I have to edit and what text editor do I have to use?... (2 Replies)
Discussion started by: figaro
2 Replies

4. Red Hat

Screen resolution before and after login

system: Fedora14 on vmware the login screen resolution is 1024*768, but after login the resolution is 800*600. I want to set the login screen resolution as 800*600 too. How to do this? thanks! (2 Replies)
Discussion started by: vistastar
2 Replies

5. UNIX for Dummies Questions & Answers

How to get current X screen resolution

Hi, I need to get the current X*Y resolution of X in a shell script. xrandr -q gives me a line like this: Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 3080 x 1600 How can I extract the X and Y current resolution values? sed, awk, cut or any other console solution is welcomed.... (2 Replies)
Discussion started by: tcfx44
2 Replies

6. Solaris

screen resolution

how to change screen resolution in CDE prompt (2 Replies)
Discussion started by: tirupathi
2 Replies

7. Solaris

Screen Saver Resolution

I am using sun solaris machine i have given the specs of that machine given below Name of athe Platform : SUNW,Ultra-5_10 Machiene hardware :sun4u Processor Type :sparc Operating system : solaris 10 Monitory TYpe : SAMSUNG Sync Master... (2 Replies)
Discussion started by: ambavaram
2 Replies

8. UNIX for Dummies Questions & Answers

solaris10 and freebsd screen resolution

am new to unix.. :) i managed to install solaris 10 and freebsd on vmware. i am having trouble configuring the screen resolution .now both o.s are stuck at 640x480. how do i change it to higher settings? i tried kdmconfig for solaris 10 but an error message shows up . sorry current window size... (1 Reply)
Discussion started by: freejade
1 Replies

9. UNIX for Dummies Questions & Answers

Changing my Screen Resolution (Not in X)

I have no graphical environment, no X, just a shell... but its WAY bigger than my monitor... what do I do? (3 Replies)
Discussion started by: jjinno
3 Replies

10. Solaris

Changing Screen Resolution

I have installed Solaris 10 over vmware onto my machine. Now when I want to change my screen resolution it only has one option which is 800x600. Is there a way to change that to a bigger resollution? And if there is, what file do I have to edit and what text editor do I have to use? (1 Reply)
Discussion started by: Aco
1 Replies
Login or Register to Ask a Question