Tuesday, February 21, 2006

[Solaris] Setting the console serial port Solaris 10

As fan of serial port consoles on my Sun SPARC servers, I do get fedup with slow console baud speeds.

Setting console to 19200,8,n,1 on Solaris 10

Change console speed in the eeprom
$ eeprom ttya-mode=baud-rate,8,n,1,-

Set the console for ttymon

$ vi /etc/ttydefs
console:19200 hupcl opost onlcr:19200::console


Repace /kernel/drv/options.conf with the following
# 19200 :be:
ttymodes="2502:1805:be:8a3b:3:1c:7f:15:4:0:0:0:11:13:1a:19:12:f:17:16";

Thursday, February 16, 2006

[LINUX] SLES 9 xfree86 on IBM x346

Graphics configuration generated by SAX2 would only allow 640x480, due to miss identifing the RSAII capabilities.
IBM RSAII is remote managment inbuild on IBM x346 and others.


Edit the /etc/X11/XF86Config-4 file, under Section "Device", as follows: Section "Device"

Option "nodri"
Identifier "ATI Radeon (generic)"
Driver "vesa" <--- change "radeon" to "vesa"
VendorName "ATI Radeon (generic)"
BoardName "ATI Radeon (generic)"
EndSection

Monitor Section add/change
Option "dpms" "off"

Section "Screen"
... ...
DefaultDepth 16
Subsection "Display"
Depth 16
Modes "1024x768"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Anaconda Configured"
Screen 0 "Screen0" 0 0
InputDevice "USB_Mouse" "CorePointer" <--- Add this line
InputDevice "Mouse0" "SendCoreEvents" <--- Change "CorePointer" to "SendCoreEvents"
EndSection

[LINUX] SUSE which service pack is installed

There are two ways to find which service pack is installed on Novell Enterprise Linux 9

$ cat /etc/SUSE-release | grep -i patchlevel

$ SPident

Monday, February 13, 2006

[Solaris] Remount a read only filesystem with write access

I offen mount /usr as read only for small increase in security, but offen need to remount the /usr for patching.

$ mount -n -o remount /usr

Sunday, February 12, 2006

[UNIX] Logs in the background

I like to watch system logs of Swatch and Apache 2 on the background. The command line is long and option rich!

$ kstart --skiptaskbar --skippager --alldesktops --onbottom Eterm -x -O --buttonbar no --scrollbar no --no-cursor yes --geometry 80x25+5+20 -e tail -f /var/log/messages

Tuesday, February 07, 2006

[MS] Kill Script

Do you like me want all the power for that windows application, latest game or crack a password with cain. Kill all thoes services in the toolbar.

Download PSKill from Sysinternals and save in the system path.

Create a batch file (.bat) with your favourite editor (I use VIM).
This is mine below.

c: type pskill-all.bat
rem Kill batch File
rem option -t needed when process has children!

pskill.exe -t GoogleDesktop.e
pskill.exe nettime.exe
pskill.exe eraser.exe
pskill.exe pageant.exe
pskill.exe firefox.exe
pskill.exe soffice.exe
pskill.exe ClamTray.exe
pskill.exe justshed.exe
pskill.exe realsched.exe
pskill.exe PccNTMon.exe

[Linux] X-server ScreenShots from the CLI "ImageMagick"

Build some documentation for a customer and required some screenshots, KDE has Ksnaphot. But I wanted many screen shots and need a simple cli command to capture various screens.

ImageMagik provides the "import" command which does just the job from the command line.

To capture the whole desktop as a JPEG use the following.
$ import -window root screen.jpg

To save in a diffrent grapics format change the extention of the output file. (gif,pnm,pmm,tiff etc..)


To capture single window ie firefox
You need to find the window name, two methods of getting the "window name"
1. use xwininfo, which will then ask you to click target window and display information.

2. xlsclients -l
display list of windows

Note you can use a window title or the DECIMAL window ID, xwininfo and xlsclients output in HEX.

$ import -window <WINDOW ID DECIMAL> screen1.jpg
$ import -window "<WINDOWS TITLE>" screen2.jpg

[UNIX] [MS] Getting compression to work with WinSCP/Putty and OPENSSH 4.2

Ive been unable to get a SSH2 connection with compression on my WindowsXP/2003 boxes using SSH clients Putty and WinSCP to my Gentoo development machine (gendesk). The changes I had made recently update to OpenSSH_4.2p1 (OpenSSL 0.9.7e).

OpenSSH 4.2 has a "Compression delayed" option in /etc/ssh/sshd_config which protects the zlib (compression) library until authentification has been achived. Putty doesn't support "Compression delayed" option and ssh clients that use Putty code such as WinSCP will have teh same problem.

Workaround
Change "Compression delayed" option to "Compression yes" in /etc/ssh/sshd_config.