Posts

Showing posts from 2012

Fixing microsoft encoding weirdness

Common problem:  Team members use Microsoft for editing.  Microsoft editors do weird things to text files (no eol, etc)  Need to fix in a perforce project but don't want to have to do a lot of manual work. First, create a script file to give perforce for the editor command: > cat urxvt-perforce #!/bin/bash urxvt -geometry 240x80 -e vim $* Next, update perforce, then add the problem files to a change list (make sure that you don't include binary files in the list).  Open the files using the script. Once in vim, use the doargs command to make life nice (reference:  http://vim.wikia.com/wiki/File_format#cite_note-4 ): :argdo set ff=unix|update :argdo set ff=unix|w diff against have revision and IFF good, submit.

Google Chrome Modifications

I like to use the "High Contrast" Chrome plugin to reverse web browsing colors.  I have noticed that the visited and non-visited colors are very hard to distinguish in reverse color mode. After some googling I found that this can be controlled by editting: .config/google-chrome/Default/User StyleSheets/Custom.css and adding: a:visited {color: orange !important;}

Borderlands 2 on Fedora - Dell Studio XPS 16

The default driver for the Radeon HD 4670 card in my laptop is the Xorg Radeon driver.   Radeon support is rather hit or miss thanks to ATI/AMD. I installed Fedora 17 x86_64, updated everything, installed wine (and all the associated i686 associated files.)  I then installed a Trial version of Codeweaver's crossover (crossover-11.2.1-1.i386.rpm).  After installing Steam in its own bottle (XP), and then downloading and running Borderlands 2 (actually you have to copy Borderlands2.exe over Launcher.exe to work around an annoying dotNet think) I would get weird error: Your video card does not support alpha blending with floating point render targets (D3DFMT_A16B16G16R16F), which is required to run this game. Exitting... which it turns out was due to the apparent patent restrictions on the algorithm and since Fedora is based in the US, the mesa libs are compiled without that. Still wanting to see if I could get this to work I googled around and discovered that I could just rebuild

Fedora 17 + Firefox + Wrong Dictionary Settings

My Fedora 17 x86_64 Firefox always defaulted to using the English (Zimbabwe) version no matter what I tried. I decided to go nuclear to fix this: cd /usr/lib64/xulrunner-2/dictionaries/ sudo  mkdir ../test sudo chmod 755 ../test sudo mv * ../test sudo mv ../test/en_US* . restart firefox. Update, newer instructions: cd /usr/lib64/xulrunner/dictionaries sudo rm -vf ./en_AG.aff ./en_AG.dic ./en_AU.aff ./en_AU.dic ./en_BS.aff ./en_BS.dic ./en_BW.aff ./en_BW.dic ./en_BZ.aff ./en_BZ.dic ./en_CA.aff ./en_CA.dic ./en_DK.aff ./en_DK.dic ./en_GB.aff ./en_GB.dic ./en_GH.aff ./en_GH.dic ./en_HK.aff ./en_HK.dic ./en_IE.aff ./en_IE.dic ./en_IN.aff ./en_IN.dic ./en_JM.aff ./en_JM.dic ./en_MW.aff ./en_MW.dic ./en_NA.aff ./en_NA.dic ./en_NG.aff ./en_NG.dic ./en_NZ.aff ./en_NZ.dic ./en_PH.aff ./en_PH.dic ./en_SG.aff ./en_SG.dic ./en_TT.aff ./en_TT.dic ./en_ZA.aff ./en_ZA.dic ./en-ZM.aff ./en-ZM.dic ./en_ZW.aff ./en_ZW.dic restart firefox

Using alpine with microsoft exchange

Getting ALPINE to work with Microsoft's Mail Server when Evolution isn't an option Rational:  I had to work on my Linux box for a long term project and needed to be able to watch for new mail.  Evolution wasn't an option because the Exchange servers didn't allow Evolution to read certain settings and I couldn't find a (quick) work around to manually configure.  So I decided to run the Office Communicator in Google Chrome and to start-up Alpine to watch my mailbox via IMAP.  Here are the relevant settings to get that to work Find a valid SMTP server for your organization Hint:    dig example.com mx Configure   .pinerc user-domain=example.com smtp-server=mailserv.example.com/novalidate-cert default-saved-msg-folder={exchange.example.com/user=myid}Sent Items feature-list=enable-suspend,         quell-dead-letter-on-cancel,         enable-sigdashes,         signature-at-bottom,         enable-mail-check-cue,         enable-newmail-in-xterm-icon,     

Trying to make Microsoft Useful

Making Microsoft Usable with Cygwin Making Microsoft Useful Through Cygwin Making Microsoft Useful Through Cygwin .bashrc changes .xinitrc .bashrc changes if [ "i686-pc-cygwin" = "${BASH_VERSINFO[5]}" ]; then   # uses UTF-8 now         LC_CTYPE=en_US;         export LC_CTYPE;         LANG=en_US.UTF-8;         export LANG; fi STMP=/cygdrive/c/Temp export STMP if [ -x /cygdrive/c/WINDOWS/system32/tracert ]; then     alias traceroute="/cygdrive/c/WINDOWS/system32/tracert " fi alias startxbig="/usr/bin/startx -- -multiwindow -multimonitors -nowinkill -unixkill -clipboard -emulate3buttons 50" alias ls="${DIR}/ls --color=auto -AFC " if grep --color=auto me /etc/passwd > /dev/null 2>&1 ; then         alias grep="grep --color=auto " fi .xinitrc #!/bin/bash cd || exit 127 # STDOPTS="-sl 2000 +tb -bg black -fg @FGCOLOR@ -n @FGCOLOR@ -T @FGCOLOR@ -cr red -fn 6x13 -fb 6x13bold -ge

Fedora - VNC through systemd/xinetd

Configuring Fedora 17 for Xvnc through systemd/xinetd I found a number of links around but nothing exactly covered my setup.  I wanted to be able to run an X11 session from home as securely and efficiently as possible.  After configuring my home server like this: sudo yum install xinetd tigervnc-server-minimal sudoedit /etc/gdm/custom.conf [security] RelaxPermissions=0 [xdmcp] Enable=1 HonorIndirect=1 [greeter] Quiver=1 sudo useradd -d /var/empty/vncuser -m -s /bin/false vncuser sudoedit /etc/services vnc-1280 5910/tcp # VNC Listener sudoedit /etc/xinetd.d/vnc # BEGIN service vnc-1280 { socket_type = stream protocol = tcp wait = no user = vncuser server = /usr/bin/Xvnc server_args = -inetd -query localhost -desktop 1024x768x24 -once -geometry 1024x768 -NeverShared securitytypes=none } # END sudo systemctl start xinetd.service And you will need to restart GDM.  I couldn't get the systemctl restart prefdm stuff quite right, so I rebooted.  (Yeah,

AIX notes

I needed a command line way that I could summarize the currently mounted disk space for a bunch of AIX boxes.  I suspect this (or something very similar would work for other Unix flavors): df -g | awk '{print $2}' | grep -E "^[0-9\.]+$" | perl -e  '@BIGAR=; foreach (@BIGAR) { chomp;} print STDOUT join ("+",@BIGAR) . "\n"; ' | bc -l Commercial AIX compiler with extra debugging: make with:        CFLAGS=\"-v -V -qsrcmsg -qreport"     CC="xlc_r -qfullpath -g -qdbxextra" debug core with:     dbx -E LD_LIBRARY_PATH=/usr/opt/perl5/freetds/lib /usr/opt/perl5/netcool/bin/perl     (dbx) where

Configuring VLAN Tagging between Netscreen and Netgear WNDAP360

Netgear:  Configure VLAN tagging on all Netgear Security Profiles Configuration -> Security -> Profile Settings Select each enabled profile, and choose Edit Assign a unique VLAN ID to each Profile Configuration -> IP -> IP Settings Select DHCP Client enable (so Netgear will be accessible after enabling VLANs on Netscreen) Netscreen: Create  VLAN configuration unset interface vlan1 ip set interface ethernet0/3.1 ip 6.6.6.254/24 set interface ethernet0/3.1 nat set interface ethernet0/3.2 ip 6.6.7.254/24 set interface ethernet0/3.2 nat set interface ethernet0/3.1 dhcp server service set interface ethernet0/3.2 dhcp server service set interface ethernet0/3.1 dhcp server enable set interface ethernet0/3.2 dhcp server enable set interface ethernet0/3.1 dhcp server option gateway 6.6.6.254  set interface ethernet0/3.1 dhcp server option netmask 255.255.255.0  set interface ethernet0/3.1 dhcp server option domainname example.com  set interface etherne