This is just a quick post because I felt the need to share this information. I have always been a slave to GUI eye candy even though my true love is the CLI. Recently, (not just Gnome) but KDE has shoved their head so far up their own rear end that they've decided they will compromise ease-of-use and speed for a poorly written, resource hog of a window manager. So, when I decided to install a GUI on my Debian laptop, I decided to go with xfce because it reminded me of the days of pleasant eye candy + functionality + ease-of-use + resource savvy. Yes, that's quite a mouthful but that's just honestly how I feel.
At any rate, I needed a way to set a default size for my Terminal window but it wasn't as easy as clicking Edit > Preferences. However, it was as easy as this:
matthew@intrepid$ vi ~/.config/Terminal/terminalrc
I changed the following line:
MiscDefaultGeometry=80x24
To:
MiscDefaultGeometry=108x30
I also changed a few others, but it was as simple as updating the aforementioned line with the geometry I wanted. If you're unsure of how to read the geometry:
Number of characters per line = 108
Number of lines = 30
For those that are picky about the location of the window when the application starts, you can change your configuration line to look like this:
MiscDefaultGeometry=108x30+0+0
+0+0 places the window in the upper left hand corner of the screen. Here is how to read the window placement:
+xoffset+yoffset
With regards to screen geometry, 0,0 is the top left corner of the screen. The +xoffset is how many lines to the right you want the window shifted. The +yoffset is how many lines down from the top of the screen you want the window shifted.
Now, given all this information, if I want my window to have a size of 108x30 and open at the center of my screen I would set the configuration option in terminalrc to:
MiscDefaultGeometry=108x30+350+300
Now, on my system, xterm is the default terminal emulator. Before making changes to your system, verify that this is the correct syntax to use with your terminal application otherwise you could experience unexpected behavior.
Until next time ...
Wednesday, August 22, 2012
Saturday, July 23, 2011
vmware, qemu & winxp
so linux now has great support for virtual machines. i use virtualbox on my macbook but for years have used vmware on my debian box. now that i don't have to rely on vmware's resource-intensive hypervisor, i started to research alternative solutions. i came across qemu; apparently xen open source and kvm use qemu under their hoods. qemu can also be utilized independently, so i decided not to bother with xen or kvm. my first problem was that i my vmware vmdk image file was distributed instead of centralized (i had multiple vmdk files).
matthew@hufflepuff:~$ ll ~/vmware/
total 11G
drwxr-xr-x 2 matthew matthew 4.0K Jun 8 14:18 .
drwxrwxrwt 3 root root 4.0K Jun 8 20:19 ..
-rw------- 1 matthew matthew 8.5K May 18 19:37 nvram
-rw-r--r-- 1 matthew matthew 43K Mar 19 2010 vmware-0.log
-rw-r--r-- 1 matthew matthew 49K Mar 18 2010 vmware-1.log
-rw-r--r-- 1 matthew matthew 49K Mar 17 2010 vmware-2.log
-rw-r--r-- 1 matthew matthew 50K May 18 19:37 vmware.log
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f001.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f002.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f003.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f004.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f005.vmdk
-rw------- 1 matthew matthew 1.3M Dec 5 2007 Windows XP Professional-f006.vmdk
-rw------- 1 matthew matthew 732 May 18 19:25 Windows XP Professional.vmdk
-rw------- 1 matthew matthew 0 Dec 5 2007 Windows XP Professional.vmsd
-rwxr-xr-x 1 matthew matthew 1.4K May 18 19:37 Windows XP Professional.vmx
-rw-r--r-- 1 matthew matthew 1.7K Mar 16 2010 Windows XP Professional.vmxf
i needed to merge these files without damaging the windows' ntfs. i came across a utility called "vdiskmanager". this merged all my files into one vmdk:
matthew@hufflepuff:~/vmware$ vmware-vdiskmanager –r Windows\ XP\ Professional.vmdk –t 0 WinXP.vmdk
i then needed to convert it to a qemu raw image format:
then to verify the conversion:
matthew@hufflepuff:~/vmware$ qemu-img info -f raw WinXP.img
image: WinXP.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 7.4G
and double check (because i'm paranoid):
matthew@hufflepuff:~/vmware$ file WinXP.img
WinXP.img: x86 boot sector, Microsoft Windows XP MBR, Serial 0x2e682e67; partition 1: ID=0x7, active, starthead 1, startsector 63, 20948697 sectors, code offset 0xc0
i then proceeded to launch my vm:
matthew@hufflepuff:~/vmware$ qemu -hda WinXP.img -m 365 -vga std
but it blue screened ... the only reliable function in windows. so, i researched the issue, turned out it was because i didn't remove the vmware drivers before performing all this work on my image file.
http://support.microsoft.com/kb/324764
The agp440.sys service had to be disabled so that WinXP would only load basic vga drivers.
i made an image of my WinXP install cd via dd:
matthew@hufflepuff:~/vmware$ dd if=/dev/sr0 of=./XPInstall.img bs=1024
then i ran qemu, let the cdrom image boot and followed microsoft's instructions:
matthew@hufflepuff:~/vmware$ qemu -hda WinXP.img -cdrom XPInstall.img -m 365 -vga std
and after making the changes, i booted my vm as normal:
matthew@hufflepuff:~/vmware$ qemu -hda WinXP.img -m 365 -vga std
tada! we have a hypervisor running a vm and utilizing less resources than vmware.
houston, mission accomplished!
matthew@hufflepuff:~$ ll ~/vmware/
total 11G
drwxr-xr-x 2 matthew matthew 4.0K Jun 8 14:18 .
drwxrwxrwt 3 root root 4.0K Jun 8 20:19 ..
-rw------- 1 matthew matthew 8.5K May 18 19:37 nvram
-rw-r--r-- 1 matthew matthew 43K Mar 19 2010 vmware-0.log
-rw-r--r-- 1 matthew matthew 49K Mar 18 2010 vmware-1.log
-rw-r--r-- 1 matthew matthew 49K Mar 17 2010 vmware-2.log
-rw-r--r-- 1 matthew matthew 50K May 18 19:37 vmware.log
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f001.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f002.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f003.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f004.vmdk
-rw------- 1 matthew matthew 2.0G May 18 19:37 Windows XP Professional-f005.vmdk
-rw------- 1 matthew matthew 1.3M Dec 5 2007 Windows XP Professional-f006.vmdk
-rw------- 1 matthew matthew 732 May 18 19:25 Windows XP Professional.vmdk
-rw------- 1 matthew matthew 0 Dec 5 2007 Windows XP Professional.vmsd
-rwxr-xr-x 1 matthew matthew 1.4K May 18 19:37 Windows XP Professional.vmx
-rw-r--r-- 1 matthew matthew 1.7K Mar 16 2010 Windows XP Professional.vmxf
i needed to merge these files without damaging the windows' ntfs. i came across a utility called "vdiskmanager". this merged all my files into one vmdk:
matthew@hufflepuff:~/vmware$ vmware-vdiskmanager –r Windows\ XP\ Professional.vmdk –t 0 WinXP.vmdk
i then needed to convert it to a qemu raw image format:
matthew@hufflepuff:~/vmware$
qemu-img convert -f vmdk WinXP.vmdk -O raw WinXP.img
then to verify the conversion:
matthew@hufflepuff:~/vmware$ qemu-img info -f raw WinXP.img
image: WinXP.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 7.4G
and double check (because i'm paranoid):
matthew@hufflepuff:~/vmware$ file WinXP.img
WinXP.img: x86 boot sector, Microsoft Windows XP MBR, Serial 0x2e682e67; partition 1: ID=0x7, active, starthead 1, startsector 63, 20948697 sectors, code offset 0xc0
i then proceeded to launch my vm:
matthew@hufflepuff:~/vmware$ qemu -hda WinXP.img -m 365 -vga std
but it blue screened ... the only reliable function in windows. so, i researched the issue, turned out it was because i didn't remove the vmware drivers before performing all this work on my image file.
http://support.microsoft.com/kb/324764
The agp440.sys service had to be disabled so that WinXP would only load basic vga drivers.
i made an image of my WinXP install cd via dd:
matthew@hufflepuff:~/vmware$ dd if=/dev/sr0 of=./XPInstall.img bs=1024
then i ran qemu, let the cdrom image boot and followed microsoft's instructions:
matthew@hufflepuff:~/vmware$ qemu -hda WinXP.img -cdrom XPInstall.img -m 365 -vga std
and after making the changes, i booted my vm as normal:
matthew@hufflepuff:~/vmware$ qemu -hda WinXP.img -m 365 -vga std
tada! we have a hypervisor running a vm and utilizing less resources than vmware.
houston, mission accomplished!
egrep an ip using a regex
i'm not the greatest at regular expressions, but with some help from a friend i finally developed a nice regex that will grab an ip address out of a log file.
i have postfix setup on my mail server to greylist new addresses automatically. i'm working on developing a plugin for that will take addresses that don't follow smtp rfc standards and automatically blacklist them. at any rate, here's the regex ... maybe it'll help someone else out there keep from pulling their hair out:
rosebud:~# egrep /var/log/your_mail_log 'client_address\=[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'
of course, client_address is relative to postfix, but you get the idea. cheers!
i have postfix setup on my mail server to greylist new addresses automatically. i'm working on developing a plugin for that will take addresses that don't follow smtp rfc standards and automatically blacklist them. at any rate, here's the regex ... maybe it'll help someone else out there keep from pulling their hair out:
rosebud:~# egrep /var/log/your_mail_log 'client_address\=[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'
of course, client_address is relative to postfix, but you get the idea. cheers!
ffmpeg - rip the audio track from a video file
i've been toying around with ripping the audio track from a video file and mplayer just wasn't living up to the job. i have used ffmpeg in the past but hadn't recently so i took a look at the man page and found i could accomplish this task very easily in one line with a pipe to lame.
matthew@hufflepuff:~$ ffmpeg -i video.mp4 -f wav - | lame -V 3 - audio.mp3
this takes video.mp4 and dumps the audio track in wav format then pipes it to lame and creates an mp3 of the dump. sweet.
matthew@hufflepuff:~$ ffmpeg -i video.mp4 -f wav - | lame -V 3 - audio.mp3
this takes video.mp4 and dumps the audio track in wav format then pipes it to lame and creates an mp3 of the dump. sweet.
Thursday, September 11, 2008
vnc, x11vnc, and krfb
so, i got tired of sitting at the table with my macbook, or on the couch, or in my chair ... instead i wanted to sit at my desk in my REALLY comfy chair and use a keyboard and mouse ... and possibly my 17" flat panel as a second monitor. the only problem: i wouldn't be able to use my gnu/linux desktop system any more. why, you ask?
it's the computer at my desk.
alright, so i began evaluating my options; i thought of vnc first, but decided to research other applications. i found krfb, a kde remote desktop access system. i wasn't too thrilled with the fact that it only worked based on invitations and that i had to set it up physically with my monitor connected and logged in.
[at this time i already connected my flat panel as a second monitor and began using my keyboard and mouse for my macbook. the only access i had was via ssh]
i then found x11vnc, i thought i could attach a vnc session to kdm so i could log in.
negative
x11vnc kept looking for a "magic cookie" or authority file that didn't exist.
well, i guess it was time to try vnc. i hadn't had luck in the past (over a year and a half ago) when i tried it; nevertheless, i went full steam ahead.
i configured my .vncrc file, and stumbled upon an option i hadn't seen before:
$vncStartup = "/etc/X11/Xsession";
i then thought about it ... since i use kde, what if i put "/usr/bin/startkde" in there, would that work? i inserted the line and ran vncserver. i connected to the vnc session and ... BAM! yes! i had my desktop. mission accomplished. sweet.
gotta love gnu/linux.
it's the computer at my desk.
alright, so i began evaluating my options; i thought of vnc first, but decided to research other applications. i found krfb, a kde remote desktop access system. i wasn't too thrilled with the fact that it only worked based on invitations and that i had to set it up physically with my monitor connected and logged in.
[at this time i already connected my flat panel as a second monitor and began using my keyboard and mouse for my macbook. the only access i had was via ssh]
i then found x11vnc, i thought i could attach a vnc session to kdm so i could log in.
negative
x11vnc kept looking for a "magic cookie" or authority file that didn't exist.
well, i guess it was time to try vnc. i hadn't had luck in the past (over a year and a half ago) when i tried it; nevertheless, i went full steam ahead.
i configured my .vncrc file, and stumbled upon an option i hadn't seen before:
$vncStartup = "/etc/X11/Xsession";
i then thought about it ... since i use kde, what if i put "/usr/bin/startkde" in there, would that work? i inserted the line and ran vncserver. i connected to the vnc session and ... BAM! yes! i had my desktop. mission accomplished. sweet.
gotta love gnu/linux.
Tuesday, August 19, 2008
FileEngine Videos
FileEngine Servers has three neat video's available on YouTube. I've included them here for your viewing pleasure.
Chris Reed, FileEngine Sales Rep. on The Buzz
Mike Beck with Maginot, Moore, and Beck; FileEngine Client
David Forsell with Keep Indianapolis Beautiful, Inc.; FileEngine Client
Chris Reed, FileEngine Sales Rep. on The Buzz
Mike Beck with Maginot, Moore, and Beck; FileEngine Client
David Forsell with Keep Indianapolis Beautiful, Inc.; FileEngine Client
Wednesday, July 9, 2008
Help Bruce Perens Protect Open Source
Sign the petition showing your support at: http://techp.org/p/7
Subscribe to:
Posts (Atom)