Linux

The Intel driver uses the bios to determine resolutions, you need to use an app to change the bios resolution if you want 1920x1200. The default is 1920x1400, which won't display properly. You'll also need a 1920x1200 modeline, I've included it at the bottom of the post. Install the RPM and run 855resolution. [root@host ~]# 855resolution -l 855resolution version 0.4, by Alain Poirier Chipset: Unknown (id=0x27708086) VBIOS type: 2 VBIOS Version: 1215 Mode 30 : 640x480, 8 bits/pixel Mode 32 : 800x600, 8 bits/pixel Mode 34 : 1024x768, 8 bits/pixel Mode 38 : 1280x1024, 8…



We use syslog-ng with remote logging to keep track of our logs. The targeted policy doesn't allow syslog-ng to operate by default. The following lines added to local.te in /etc/selinux/targeted/src/policy/domains/misc will allow syslog-ng to bind to port 514 and access proc kmsg for kernel messages (such as avc messages!) # syslog-ng network stuff allow syslogd_t syslogd_port_t:udp_socket name_bind; allow syslogd_t syslogd_port_t:tcp_socket name_bind; allow syslogd_t reserved_port_t:tcp_socket name_bind; # syslog-ng random bits allow syslogd_t random_device_t:…



We have a few RHEL4 servers, logs fail to rotate on the production machines, but not unmodified machines. We discovered that this is a known bug with using noexec on /tmp https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156594 If you change your /tmp mount to noexec, logrotate cannot work because it tries to execute a script in /tmp to do the rotation. The hack to get it working is to add a TMPDIR in the cron job that runs logrotate (and create a directory that it can execute a script in, mkdir /root/tmp; chmod…



We have a few machines with console redirection in the bios. We access these with minicom. To enter the bios, we've found that the VT100 escape sequences work. To send F1, enter ESC O P, the capitalization on the O and P are essential. Other codes that are known to work:
F1^[OP
F2^[OQ
F3^[OR
F4^[OS
F12 comes through unharmed, so to get the boot menu on most machines, we just type F12 directly.



We have a few departments on campus and each user has a username in at least one department plus the top level domain. This means that if an email is sent to username@dept.company.net and there is a cc to username@company.net Then username will get the email twice. After playing around I found that procmail can track the messageid's of emails in a file, so i have this simple rule to filter out. PMDIR=$HOME/.procmail :0 Whc: msgid.lock | formail -D 4096 $PMDIR/idcache :0 a: Mail/duplicates…



After installing the cluster stuff (GFS), lvscan and lvdisplay stopped working with the following error: [uphill@zürich]: lvscan connect() failed on local socket: Connection refused Locking type 2 initialisation failed. It's trying to talk to the cluster manager, but I haven't set that up yet, I still need my groups though, so I had to turn off the cluster aware bit. [root@zürich]# lvmconf --disable-cluster [uphill@zürich]: lvscan inactive '/dev/vol0/data' [350.00 GB] normal inactive '/dev/vol0/disk' [500.00 GB] normal Ok…



Sometimes it's easier to write a quick script in bash that uses arrays rather than figure out how to do it with something more appropriate like awk or perl.

It's really very quick and simple. To start, declare your variable as an array


[uphill@host]: declare -a myvar

If the array is going to be global then add x to export it.


[uphill@host]: declare -ax myvar

Then you can put things into your array like this:


[uphill@host]: myvar[…



In RHEL4 and possibly other distros. The .Xdefaults file is not used, the file is now called .Xresources In /etc/X11/xinit/xinitrc-common, xrdb is passed .Xresources _after_ /etc/X11/Xresources. You can make systemwide changes in /etc/X11/Xresources, but they will be overridden by changes to .Xresources.



I'm hoping that someone else has a better solution for this one. We have a pocketpoint remote that works quite well for Power point presentations, but for Acrobat Reader the keybinding is not good. The remote sends p for prior/previous and n for next, which is understood by powerpoint and not by Adobe. I wrote the following lame script to fix this. It works for the most part, but you lose the p and n keys during the presentation. [includecode#../scripts/pocketpoint]



First run xev to see what the keycode is for your Windows Key On my keyboard it is 115 and is bound to Super_L. [uphill@surrey ~]# xev KeyPress event, serial 26, synthetic NO, window 0x4800001, root 0x48, subw 0x0, time 2012015429, (676,609), root:(681,632), state 0x10, keycode 115 (keysym 0xffeb, Super_L), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 29, synthetic NO, window 0x4800001, root 0x48, subw 0x0, time 2012015538, (676,609),…