Kannan's Weblog

Wednesday Aug 09, 2006

Some Basic Desktop configurations

 



 

Objective:

Solaris Sparc:

Graphics card

Resolution

Resolution change

Color Depth

Color Depth change

How to run Java in the same color bit depth as the console:

How to change the default color depth:

Setting up printer

Change the default printer temporarily

Some useful commands on Solaris:

Linux:

Mounting file systems

Determine Run Level

Graphics card

Resolution

Resolution change

Color Depth

Color Depth change

Setting up printer

Useful commands related to printer on Linux

Some useful commands on Linux

Windows:

Graphics card

Resolution

Resolution change

Color Depth

Color Depth change

Setting up printer

Create a snapshot of any image/window

Some useful commands on Windows
 
 


Objective: This document aims at

  • pointing out the different environment setups, flags needed to run 2D testsuites on various platforms
  • getting familiarised with the different commands and setups on different os.
  • troubleshooting the different problems that may arise during test execution.

Solaris Sparc:

The information given here may not be common to all the Sparc Solaris (2.6, 2.7, 8, 9) machines, but a majority of them should work.
 
 

Graphics card:

Some of the commonly used framebuffers and the command for each on Sparc Solaris are as below:
 
 
Framebuffers(Graphics card) Command
ffb (Creator3D ) ffbconfig
afb (Elite3D) afbconfig
ifb (Expert3D) ifbconfig
m64 (PGX8, PGX24) m64config
GFX(PGX 32) GFXconfig

 
 

More details about graphics card:

To get an idea of what framebuffers are available in your machine, type 'ls -l /dev/fbs' and you can guess on the framebuffers by looking at the list available. For e.g. on my machine, the above command gave the following output:
 

  • afb0-> ../../devices/SUNW,afb~1e,0:afb0
  • m640-> ../../devices/pci@1f,0/pci@1,1/SUNW,m64B@2:m640
Now try to map afb* and m64* in the above table and you can get an idea of what graphics card your machine has. In this case, I have a Elite3D and PGX graphics card. To get more details on the graphics card, you need to explore the framebuffer's command line options.

Resolution:To get the current resolution and the set of supported resolutions, type <command name> -prconf.

For e.g. if the machine has a 'afb' framebuffer, type 'afbconfig -prconf'.

Resolution change: To change the resolution do the following:

e.g.  m64config -res 1152*900*76 now -depth 24 (assuming PGX24 is the framebuffer, I have)

The syntax would be similar for most of the framebuffers.

Color depth: To get the current color depth, type 'xwininfo' at the command prompt. The cursor waits for the user to click the mouse on the window whose color depth he/she needs to know. Click on the window and the tool dumps out a lot of information including the color depth.
 

FYI: /usr/openwin/bin/xdpyinfo could also be used for displaying the color depth of the current window.

Note: On Solaris unlike windows, different windows could be running on different color bit depth.

Color depth change:  This is an interesting feature for Java applications running on Sparc Solaris.

Important: Java always tries to run applications in the best color depth(not resolution) possible on Solaris.

So if my machine supports 8, 16, 24 bit color depths and the console from where the Java app is launched is in 8 bit, the application would still be running on 24 bit color depth. You can verify this by using the xwininfo command (as mentioned above).

How to run Java in the same color bit depth as the console:

set the environment variable FORCEDEFVIS and launch the Java application.

How to change the default color depth:

modify /etc/dt/config/Xservers file by changing the value of 'defdepth' parameter and restart X server.

If the file 'Xservers' doesn't exist, copy the default one from /usr/dt/config/Xservers to /etc/dt/config directory.


Setting up printer:

On the desktop, you would generally find the 'Personal Printers' menu which has normally 3 printer related options

    • Default -> shows the default printer where all printjobs will be redirected to, if printed without selecting any printer from the print dialog.
    • Printer Selector -> invokes a 'Printer Selector tool' dialog displaying a list of all the printers on the network. The user can select any printer from the 'All Printers' list, add it to the 'Selected Printers' and change the default one by clicking on the 'Change Default' button. Click on 'Save Changes' button and restart Xserver to get the changes into effect.
    • Print Manager -> shows the status of each print job on all the connected printers. The user has the option to cancel a print job in the queue using 'Print Manager' tool.
Incase, the above 3 menu options are not found on desktop, the mentioned 3 dialogs could be invoked with the following command:
    • Default -> /usr/dt/bin/dtprintinfo
    • Printer Selector -> /usr/dist/share/cue,v2.1.6/tools/std/printer_selector
    • Print Manager -> /usr/dt/bin/dtprintinfo -all
Change the default printer temporarily:
If the default printer has to be changed temporarily (say just for a particular application(s) ), do:
  1. setenv LPDEST <printer name> (assuming cshell here)
  2. Launch your application
Some useful commands on Solaris:
ifconfig -a -> displays the ip address
prtconf -> displays System configuration, Memory size, System Peripherals
isainfo -kv -> displays instruction set architectures (eg 64-bit sparcv9 kernel modules)
xlsfonts -> displays all fonts in the system.
xfontsel -> for selecting a particular font.
Snapshot -> takes snapshots of selected windows.
Imagetool -> invokes image viewer



Linux:

The information given here may not be common to all the different flavors of Linux (RedHat, Suse, Caldera, Mandrake, Turbo...) but a majority of them should work. Commands specific to certain Linux flavors have been specified wherever possible.
  find the runlevel of your machine (usually it's 5 on most Linux machines with X11 running)

  • check if 'amd' has been turned on/off for the runlevel used
  •         For this: type 'chkconfig --list | grep amd'
    The output would be similar to the one below:
                amd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    Here, amd is turned on for runlevel 5. If not, turn it on by typing
    chkconfig --level 345 amd on
    Step 3 (above) could also be done in another simpler way by using the gui tool 'ntsysv'

    ntsysv displays all the services and the status of each (on/off).
     

    Determine Run Level:

    Runlevel determines the mode on which the machine has been booted and is currently running. To determine the runlevel of your machine, foll the steps below:

      • open /etc/inittab file.
      • Look for the entry 'initdefault:'
      • The format would be like 'id:<number>:initdefault:
      • The value of <number> is the runlevel of your machine.
    NOTE: The no. of runlevels and the description of each could vary on different flavors of Linux.
    An e.g of the runlevels and its mode description on a RedHat Linux 7.1 is as below:

     
     
    Runlevel Mode
    0 Halt
    1 Single user
    2 Multi user (without NFS)
    3 Multi user (with NFS)
    4 unused
    5 X11
    6 reboot

     

    Graphics card:

    To determine the graphics card on Linux (RedHat), follow the steps:

      1. cd /etc/X11
      2. open XF86Config (XF86Config-4 on RedHat 7.0 and higher) and search for 'Section Screen'
      3. The 'Device' subentry contains the video card name.


    Resolution:

    To determine the current resolution on Linux (RedHat), follow the steps:

      1. cd /etc/X11
      2. open XF86Config (XF86Config-4 on RedHat 7.0 and higher) and search for 'Section Screen'
      3. The 'Modes' subentry under 'Display' subsection represents the resolution.


    Color Depth:

    To determine the current resolution on Linux (RedHat), follow the steps:

      1. cd /etc/X11
      2. open XF86Config (XF86Config-4 on RedHat 7.0 and higher) and search for 'Section Screen'
      3. The 'Depth' subentry under 'Display' subsection represents the color depth.
    Color Depth change:
    Follow the steps above and change 'Depth' to the desired value and restart X server.
    Setting up printer:

    There are different tools for setting up printer on different linux versions.

    Some commands that I know of:
     
     
    Linux version Command
    RedHat Linux (any version) printtool
    Turbo Linux turboprintcfg
    Caldera Linux kups(GUI) or cupsd(command line)
    Mandrake Linux /usr/bin/printtool  or  /usr/sbin/printerdrake
    SuSE Linux
    /sbin/yast (for configuring anything not only printer)

    Trick: Generally (but not on all linux machines), you would find the printer command for adding/editing/deleting a printer from the /etc/printcap file.

    e.g. for RH Linux (7.0 & higher)

      1. type 'printtool' at the console.
      2. Click on 'New' icon. It brings up a 'Edit Queue' dialog.
      3. Type any name under 'Name and Aliases'->'Queue Name'
      4. Enter printer server name under 'Queue Type'->'Server'
      5. Enter printer name under 'Queue Type'->'Queue'
      6. Select the appropriate driver under 'Printer Driver' category
      7. Click on 'ok'. This goes back to the first dialog.
      8. Save the changes by selecting 'File'->'Save Changes'.
      9. Restart the lpd with 'File'->'Restart lpd'
      10. Test the printer by selecting any of the option from 'Test' menu.
      11. If the printer works, you are all set to use the printer.
    The tool and the procedure above is similar for RH 6.2. (The menu options are a bit different).
    Note : Users generally forget/(are unaware) of steps (8 and 9). If lpd is not re-started, user cannot print to the newly added printer in the current login session.

    Restart lpd from command line:

    To manually restart lpd from command line, do the foll:

    /etc/init.d/lpd stop and /etc/init.d/lpd start
    or
    lpc reload all
    Useful commands related to printer on Linux:

    lpq gives status of all the printjobs.

    lprm command for remove printjobs (lprm jobid)
    lpc status gives status of the connected printer.
    lpc printcap gives info on the printcap for the default printer.

    /net/sqesvr/deployment2/kannan/tools/linuxver

    Some useful commands on Linux:

    Note: The commands below may not be applicable on all the different flavors of Linux .

    ifconfig -a -> displays the ip address

    cat /proc/cpuinfo -> shows cpu details.
    cat /proc/version -> shows kernel version, gcc version and release version.
    /usr/bin/xproc -> gives all the details of above two and a lot more.
    /usr/bin/xpaint -> similar to pbrush in Windows. Also has SNAPSHOT option.
    /usr/X11R6/bin/xfig -> similar to pbrush in Windows
    /usr/bin/whatis -> describes the command.
    gfontsel -> Font selector (GUI App)

    Windows:

    The best way to know all the hardware details about your PC is by using 'belarc' software.

    Go to http://www.belarc.com and download the 'belarc advisor'. The installer after installation would show all the details about your PC.

    Graphics card:

    On most of the Windows platform, the common way to find out the graphics card is as follows:

    Method 1:

      1. Right click on the desktop.
      2. Click properties and the 'display properties' dialog pops up.
      3. Select the Settings tab.
      4. you should be able to find the graphics card name below the Display label.
    Method 2:
    If the above method doesn't show the card name (I have seen on Windows NT especially), do the following:
      1. Open command prompt
      2. Type 'debug' and press <ENTER> key.
      3. At the '-' prompt, type 'd c000:0'
      4. You would possibly see the graphics card name on the right. If it still doesn't appear, type 'd' once or twice and the name should certainly appear.
    Note: 'debug' command doesn't seem to be available on Windows XP (64-bit)


    Resolution:

    To get the current resolution and all possible resolution follow the steps 1-3 in 'Method 1' of Graphics card section.

    Find the value of the current resolution in the 'Screen Area' label. Click/drag the slider to change the resolution.
     

    Color depth:

    To get the current color depth and all possible color depths follow the steps 1-3 in 'Method 1' of Graphics card section.

    Find the value of the current color depth in the 'Colors' drop down box. Select a different color depth to change its value.

    Setting up printer:

      Select Control Panel->Printers->Add Printer to add a new printer.

      To select a different driver (other than the existing for a connected printer):

      1. Right click on the printer(whose driver needs to be changed) icon.
      2. Select 'properties' option.
      3. Install a new printer driver from 'Advanced'->'New Driver' button.
    Default printer:
    To change the default printer,
      1. select the printer icon (which has to be made the default).
      2. Right click on the icon
      3. Click on 'Set as Default Printer'
      4. The selected printer becomes the default printer.


    Create a snapshot of any image/window:

      1. Select the window you want to take snapshot of.
      2. Press Alt-PrintScreen key combination on the keyboard. The image gets copied on to the clipboard.
      3. Open any image viewer (like paintbrush or PaintShopPro) and do a paste(Ctrl-v). The image could then be saved in any format supported the viewer.


    Some useful commands on Windows:

    ipconfig /all -> displays the ip address on command line.

    winipcfg -> (GUI tool) for displaying ip address in win98, me and 2000
    msconfig -> system configuration utility.
    Hwinfo /ui -> hardware utility for Windows (may not work on all Windows platform).


    Kannan Balasubramanian

    Comments:

    Welcome to blogging!

    Posted by A. Sundararajan on August 11, 2006 at 09:42 AM IST #

    Kannan

    I like your site. Very impressive and useful. I am a mainframe professional. We are hosting LPAR master consoles using TN3270 port connectivity in SUSE desktop.

    One of this pc is rebooted and restarted up to login. It supposed to connect to graphics and brought up KDE desktop, but not.
    qn1. how i can init KDE from user promt or root.
    qn2. how i can restore the network by restarting/ or resetting the network devices. thanks suresh

    Posted by suresh ninan chacko on November 02, 2008 at 08:15 PM IST #

    Post a Comment:
    • HTML Syntax: NOT allowed

    Calendar

    Feeds

    Search

    Links

    Navigation

    Referers