Showing posts with label xserver. Show all posts
Showing posts with label xserver. Show all posts

Friday, June 10, 2011

How to disable Screensaver in GNOME/Solaris?

This is done per user basis. This means that every user on the system will have to do this in order to disable screensaver on Solaris - GNome.

From command line (terminal), launch:


#/usr/openwin/bin/xscreensaver-demo --crapplet

If you are more GUI person, then do the following:

Launch - > Preferences - > Desktop Preferences - > Display - > Screen saver -> Then select the mode “Disable Screen SAVER”

Then do the needful as shown in picture below. :)

Friday, March 13, 2009

Xterm - tips and tricks

xterm terminal is a powerful, programmable and full with options. It is available with almost all variants of Unix OS.

The following reference is good for at least Solaris operating system.

Explanation of switches available for xterm:
======================================================================
-T "Title name" : Used for displaying title
-bg : For background color
-fg : For foreground color
-fn : For font name (it can be name as well as size also)
-e : This x-application will open in xterm window
-geometry 180x60 : To define xterm's window size and location (optional)
-display : To send the xterm's display on "Hostname" (i.e. for remote display)

How to open Xterm on local system:
======================================================================
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn fixed -geometry 180x60
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn "*-fixed-*-*-*-20-*" -geometry 180x60


How to open Xterm on remote system:
======================================================================
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn fixed -display 10.10.10.230:6.0
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn "*-fixed-*-*-*-20-*" -display 10.10.10.230:6.0
xterm -T "This xterm is from: `whoami`@`hostname`" -bg black -fg white -fn fixed -display 10.10.10.230:6.0 -e xclock

Sunday, February 22, 2009

How to launch CDE, GNOME, xterm, ?

For Solaris:

CDE can be launched by : /usr/dt/bin/Xsession

GNOME can be launched by: /bin/gnome-session

Xterm can be launched by: /usr/openwin/bin/xterm

DTTERM can be launched by: /usr/dt/bin/dtterm

The main requirement is X-server should be running on the local machine. (I have tested on Windows PC).

Tuesday, August 19, 2008

How to set default display driver in Redhat Linux?

I faced this problem when I was trying to install Redhat Linux 3 on a system with NVidia display card. After installation, everything came up fine upto X-server and then it was kind of blank screen. Obviously, the driver selected during the installation was not the perfect for the system. So, here is what I did to make it work with 'default' or 'vesa' driver:

1) Booted the system in single user mode.
2) Edited the file /etc/X11/XF86Config and replaced/changed at two places:
- Changed driver from "nvidia" to "vesa" in line starting with "Driver" in Section "Device"
- Checked for line containing "dpms" and appened "off" after it.
Option "dpms" "off"
3) Saved the changes and rebooted the system. Boom! It came up fine with default display driver.

Update on 03/23/2011::
Note: This article became alive again yesterday when I was doing X11 config on RHEL 4U7 server. User wanted GUI and video card was somehow not supported. The simplest way was to switch to VESA driver and get it going. User happy, I am happy!!! :)


Update on 03/28/2011::
This user again called me now for a better (smaller) resolution settings. At first, I thought that it may not be supported with default/vesa driver but the system's default drivers also support better resolution than default 800x600. Here is how I did that:

1) First of all, invoked "system-config-display utility". Using this utility, select the correct Monitor type. In my case, the correct type was "LCD Panel 1280x1024". I saved that monitor type and exited from utility.

2) Rebooted.

3) Again, edited the /etc/X11/xorg.conf file to add more resolutions.
Modes "1280x1024" "1280x960" "1024x768" "800x600" "640x480"

4) Rebooted again! (Yeah I know I rebooted one more time, but I did what I did ;))

And yes, user was able to get much more better display with 1280x1024 settings.

The final /etc/X11/xorg.conf file now looked like below: (Note that the lines/sections in maroon were changed/added/modified manually or using system-config-display.


# cat /etc/X11/xorg.conf
# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"

# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "LCD Panel 1280x1024"
HorizSync 31.5 - 64.0
VertRefresh 56.0 - 65.0
Option "dpms" "off"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "vesa"
VendorName "Videocard vendor"
BoardName "NVIDIA Quadro NVS 285"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"

# Modes "800x600" "640x480"
Viewport 0 0
Depth 16
Modes "1280x1024" "1280x960" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Monday, January 7, 2008

How to setup DISPLAY in profile file?

While setting up display to local machine, one can use following method to set it in /etc/profile file so that each time, display can be set automatically. This solution works very well for Solaris 10 and any other Solaris version.


#-------------------------------------------------------------------
ME=`who -m PIPE awk '{print $2}'`
PORT=`who -u | grep $ME | awk '{print $8}' | sed 's/(//' | sed 's/)//'`
DISPLAY=$PORT:0.0
export DISPLAY
#-------------------------------------------------------------------

Q: How to check if DISPLAY variable is setup correctly?
Ans. The easiest way to test to check if DISPLAY is set correctly is to run /usr/openwin/bin/xclock command. If it shows a GUI clock, then your display variable is set correct.