LinuxPlanet |
Renaming The Volume Group Containing /
The only downside to this is that all the machines end up with the same volume group name: typically VolGroup0 or some such thing. That's ugly and limits the ability to move volume groups around - these are virtual disks after all. Renaming a volume group is straight forward:
vgrename /dev/VolGroup0 /dev/Carazon
Text 1: Rename the volume group VolGroup0 to be named Carazon. Hold it! Now the machine won't boot anymore! You get the pleasure of rebooting into "Kernel Panic: blah blah blah". If you rename the volume group containing the root filesystem and swap space you also have to update that name in two places -
- In /etc/fstab. This one is obvious and I usually remember.
- In /etc/grub.conf. Otherwise the kernel tries to mount the root file-system using the old volume group name.
Who is that masked man?
Probably you have either listened to me or read my thoughts or both for several years now, but it occurred to me today that someone out there might be interested in seeing what actually drives the LincGeek.
I currently live in Pennsylvania, but I was born and raised in Upstate NY, with a brief stint in Washington state. New Yorkers and hillbillies are my people and I understand them. Washington is some of the most beautiful country I ever spent time in and I hope to at least visit out there again someday.
Well, first and foremost, computers and Linux are my personal crack. I started on a life long obsession with computers back in 1983 with my first Vic=20 (Thank you William Shatner). I learned to program in BASIC and from there it was all over until I met Linux in the 90s, then that added into the mix.
I like the fastest computers I can get my hands on. I like Apple computers (more for their quality and aesthetics than OS – they do tend to run Linux very well). I love my Kindle, my Android phone and my iPad (2), which is the tablet device that all others are invariably compared to and for good reason. Linux Mint is probably the nicest version of Linux I have ever run and I use that almost exclusively as my desktop OS of choice. I am RedHat certified and use RHEL and CentOS for the vast majority of my enterprise and personal server needs, because, IMHO, it’s better than the rest.
I am a music lover. I dig 50s, 60s, 70s, 80s, Big Band, Jazz, Funk, Disco, Bluegrass and Classical music. I was a hardcore low brass musician and vocalist in my school years, even making it into “Who’s Who In Music” in my senior year in high school, and those are some of my most cherished and fondest memories. Rap is *NOT* music, by the way.
I have been married once, to my college sweetheart, for almost 19 years now and have an adult (she thinks so at least) daughter, currently in college. I am a Conservative Libertarian, politically, and a proud Christian.
Although I am now diabetic and stick mostly to various forms of Chicken and veggies now, I LOVE good food. my favorites are good Irish cooking like my Grandma used to make. Corned Beef and Cabbage. And she made a monster macaroni and cheese too. I would literally hurt someone for some of that again. I strongly believe that vegetables are what food eats.
I like my coffee with (nonfat) milk and sweet-n-low. Buy it from Wawa because Starbucks coffee is overpriced and bitter yuppie coffie IMHO. I like an occasional good cigar (Acid Blondie) and enjoy them most when I can smoke them and hang out with my friends.
I am not a drinker. If and when I do imbibe, I do so with Scotch or Whiskey as I believe beer must be what urine tastes like.
As you can probably surmise, I am highly opinionated, and as I have a monster sized guilty conscience and I am not at all politically correct, so if you ask my opinion, you are liable to actually get it.
I still think the occasional fart joke is funny. I hate unproductive meetings and long phone conversations. I try very hard to be honest, forthright, fair and maintain integrity.
I am a pet guy and love small furry mammals of all kinds. I have and have had cats, dogs, rabbits, mice, rats, ferrets and even a smattering of budgies and small lizards.
And now you know all about me!
Identifying The Hottest Tables (Informix)
SELECT
TRIM(dbsname) || ':' || TRIM(tabname) AS relation_name,
isreads AS records_read,
pagreads AS page_reads,
iswrites AS records_inserted
bufwrites AS buffered_writes
FROM sysmaster:sysptprof
ORDER BY isreads DESC;
Text 1: List the basic read and write statistics for objects in the engine's databases.This will list a record for every object in the database including indexes; the ratio of ISAM operations vs. buffer page operations can give you a hint as to the effectiveness of your server's configuration. If the ratio is very low for busy object your buffer pool is possibly too small.
If you are interested in the counts of various query operations the sysptprof table also provides the following values:
- isrwrite - The number of records updated.
- isrdelete - The number of records deleted.
Many more sysmaster queries can be found in the Informix Wiki.
Identifying The Hottest Tables (PostgreSQL)
Fieldsrelname - The name of the table.seq_scan - The number of sequential scans that have been performed on the table. A sequential scan is a read of the table from beginning to end, either because the table is very small or no indexes were available that could satisfy the filter criteria in an efficient way. Sequential scans are probably the most expensive operation the database server performs, some are however unavoidable. If proper indexing cannot resolve the need to sequentially scan a table it is imperative that the PostrgeSQL configuration provide enough resources to maintain a high cache rate.seq_tup_read - The number of rows processed through sequential scans. This is not the number of records returned to the applications as results but the number of records processed in order to create the result set, which is probably a significant subset of this number. For example, if a query returns ten records but requires a sequential scan of the table then this value will increase by the number of records in the table, not by ten.idx_scans - The number of indexes scans of the tables.idx_tup_fetch - The number of rows processes through indexed scans. As with seq_tup_read this is not the count of records returned as the results of queries but those evaluated for queries due to index entries.seq_tup_read - The number of records processed in order to create the result set of a query, not the number of records returned to the applications.n_tup_ins - The number of rows inserted into the table.n_tup_upd - The number of rows updated.n_tup_del - The number of rows deleted.Using this view an administrator can isolate the busiest tables in the database.
SELECT relname AS table_name,
seq_tup_read, idx_tup_fetch
FROM pg_stat_user_tables
WHERE (seq_tup_read + idx_tup_fetch) > 0
ORDER BY records DESC LIMIT 10
Text 1: Query to return the ten hottest tables with their sequential and index tuple fetch values.These results will reveal both table usage and the effectiveness of your indexes. If you have lots of sequential scans occurring then the query engine isn't finding indexes that match the queries being performed.
table_name seq_tup_read idx_tup_fetch
doc 1,423,407,729,074 349,028,985,971job_history 71,378,301 4,213,364,118
job_history_info 74,454,363 4,207,594,850date_company_assignment 31,059,671 1,305,469,897
enterprise 3,551,311,871 1,083,015,878date_x 12,884,498 982,418,723
object_acl 15,942,621,939 137,179,721job 39,956,712,914 46,912,825
project_info 1,709,329,011 23
team 1,141,035,688 0
Text 2: Example results.In these example results it is apparent that the table doc is one of the hottest objects and while many records are being identified using index entries there is also a very large number of sequential processes occurring. This may be because either the indexes do not match the queries being performed or the cardinality of the indexed values is too low. Now we know where to look.
So don't grope about speculating about how to improve database performance or scalability - ask where to look, PostgreSQL wants to help you. Much more information can be found at the PostgreSQL stats monitoring documentation.
Switching between terminal tabs
Alt + 1 will take you to the first tab of terminal, Alt + 2 will take you to the second tab of terminal and so on.
Another way of doing it is cntrl + pgup will take you to thee previous terminal and cntrl + pgdn will take you to the next terminal.
Inter process communication using pipes in linux
Like a pipe that carries water in which water enters from one end and exits from the other, in linux pipes data enters from one end and exits from the other.
Pipes are created using the system call pipe() and the system calls read() and write() are used to read and write from the pipe. The c library in linux provides wrappers around these system calls which make their use much easier.
The function popen() is a wrapper for pipe, which allows us to create a pipe and read or write from it using c fuctions like fprintf,fscanf etc
popen :
Arguments : 1. command that will be executed by the child process.
2. The type of communication by the parent, i.e. whether the parent is going to read from the pipe or write into the pipe.
Return : It returns a file descriptor that gets created as a result of th call to the pipe.
Operation:
The open() system call creates a pipe and returns two file descriptors, one that can be used to read from the pipe and one that can be used to write into the pipe. This can be visualized as follows
The popen function which recives these two descriptors decides the next step based on whether the process requested for a read or write operation from the pipe. That is the whether the second arguement to the pipe was "r" or "w"
If the second argument was "r" that is the process is going to read from the pipe then the write file descriptor is changed to that of the standard output. Which means when the output of "command", which was passed as the first argument to open, instead of being printed on the standard output will now be sent into the pipe, which can be later read by using fscanf . Thus the child is able to send data through the pipe to the parent process, achieveing the commnicatio between processes.
Here is a example that shows how to open a pipe in read modepipe_read.c#include main(){FILE *file1;char str[256];file1 = popen("echo hello world" ,"r");while(!feof(file1)) {fscanf(file1,"%s",str);printf("%s \n ",str);}pclose(file1);}The above program opens the pipe in read mode, hence the process is going to read from the pipe, and write to the other end of the pipe which will be the standard output as exaplined above.
The command that the child process is going to execute is "echo hello world" which will be read by the parent process . The popen() returns a file descriptor which can be used to read from the pipe using the function fscanf() ,which reads from a file.
Thus we run a while loop till the end of file is reached and keep reading the contents of the file into a string, which is turn is printed on to the standard output to see what was the string read from the pipe.
compile the code using the gcc compiler as shown below
cc pipe_read.c -o pipe_read./pipe_read
Output: hello world
The command "echo hello world" wrote "hello world" into the pipe, the same was read out using the file descriptor returned by popen.
If second argument was "w" that is the process is going to write into the pipe then the read file descriptor is changed to standard input. Which means what ever we write into the pipe will act as an input to the command that was passed in the first argument to popen. Thus the parent is able to send data to the child through the pipe, achieveing the commnicatio between processes.
Here is a example that shows how to open a pipe in write mode
pipe_write.c
#include main(){FILE *file1;char str[256];file1 = popen("wc -c" ,"w");fprintf(file1,"hello world");pclose(file1);}
The above program opens the pipe in write mode. The command that the child is executing is "wc -c" which counts the number of characters in the input file passed to it. As the pipe has been opened in write mode, that is the parent is going to write into the pipe, the child will read the data that the parent wrties. Hence what ever is printed into the file, using the file descriptor returned by popen() will be passed to "wc -w" as input which will count the number of characters and give the output on the standard output.
save the file as pipe_write.c. Compile it using gcc and execute is as follows.
cc pipe_write.c -o pipe_write./pipe_write
Output: 11
There are 11 characters in the string "hello world" including the blank space, hence we see the output 11.
Integrating Postfix And CLAMAV
- Configuration and enabling of the clamd service.
- Updating the CLAMAV malware database and enabling the freshclam service
- Configuration and enabling of the clamav-milter service. Current versions of the clamav-milter require connectivity to the clamd daemon through either a local UNIX socker or a TCP/IP socket.
- Configuration of Postfix to utilize the available clamav-milter service.
LocalSocket /var/lib/clamav/clamd-socket
LogFacility LOG_MAIL
LogSyslog yes
PidFile /var/lib/clamav/clamd.pid
TCPAddr 127.0.0.1
TCPSocket 3310
User vscan
Text 1: Typical settings overridden from defaults in /etc/clamd.conf
The clamd daemon typically reads its configuration from the /etc/clamd.conf file. Most importantly this file specifies, via the TCPSocket and TCPAddr directives, on what IP port and address the service listens for connections. These directives should be set to values appropriate for the host and which will be reachable by the clamav-milter. If the clamav-milter and the clamd daemon will be running on the same host the clamd service can be configured to listen to the localhost address [127.0.0.1] to avoid any potential network firewall and traffic filtering issues.
The clamd.conf file also provides many other tunable values but almost all of these should be appropriate at the distributions defaults.
Once configured the clamd service must be started and enabled for automatic start following the system's boot-up sequence; on RPM based systems this is typically achieved using the service and chkconfig commands.
Step #2 : Enabling the freshclam service
The freshclam service is an instance of the freshclam command line tool started with the “-d” option which runs the command in daemon mode. Whether started from the command-line or running in daemon mode freshclam will read its configuration from the /etc/freshclam.conf file. When running the freshclam daemon will periodically check the CLAMAV project mirrors for new malware signatures and update the local database used by the clamd scanning service. The freshclam daemon should run as the same user context as the clamd service; the typical way to ensure this is to synchronize the values of DatabaseOwner in /etc/freshclam.conf and User in /etc/clamd.conf. The frequency which freshclam will check for new patterns is controlled by the Checks directive – the default is 12 [times a day], this value should be sufficient in most cases. When database update succeeds the freshclam service will notify the clamd service that newer patterns are now available [for this to work the NotifyClamd directive must indicate the correct path to the current clamd configuration file].
DatabaseMirror database.clamav.net
DatabaseOwner vscan
HTTPProxyPort 3128
HTTPProxyServer proxy.example.com
LogFacility LOG_MAIL
LogSyslog yes
NotifyClamd /etc/clamd.conf
OnErrorExecute /usr/local/bin/malware_update_fail.sh
OnUpdateExecute /usr/local/bin/malware_update_ok.sh
PidFile /var/lib/clamav/freshclam.pid
UpdateLogFile /var/log/freshclam.log
Text 2: Example /etc/freshclam.conf file (comments removed)
The most important considerations in configuration of freshclam is if your network configuration requires use of an HTTP proxy server in order to access the CLAMAV mirrors for updates and if you need to configure some form of notification concerning success or failure of the pattern updates – a security focused service like a malware milter doesn't help anyone if it is silently failing in the background.
The HTTPProxyPort and HTTPProxyServer directives allow an HTTP proxy to be specified; freshclam will use this proxy for all mirror requests whether running as a command-line utility or in daemon mode. Should your proxy require a username/password for authentication these can be provided using the additional HTTPProxyUsername and HTTPProxyPassword directives. However it is simpler and more reliable to simply approve the “database.clamav.net” domain and sub-domains on your HTTP proxy service; all mirror requests will be made to those domains.
For notification of successful or failed updates the OnUpdateExecute and OnErrorExecute directives are used respectively. Whatever command is specified here will execute in the security context of the DatabaseOwner. A useful approach is to enable the log file via the UpdateLogFile directive and have the tail-end of that file mailed to a responsible party such as a help-desk or system-administrator for periodic verification that the service is operational.
#!/bin/sh
tail -25 /var/log/freshclam.log \
| mail -s "[NOTICE] Malware Database Update Successful" \
-r milter@example.com helpdesk@example.com
Text 3: A simple example script that might be used for OnUpdateExecuteThe proper operation of freshclam can be tested by simply executing the freshclam utility on the command-line; it should check the mirrors and download any new patterns without an error message. Once configured and tested the freshclam service must be started and enabled for automatic start following the system's boot-up sequence.
Step #3 : Enabling the clamav-milter service
ClamdSocket tcp:127.0.0.1
LogFacility LOG_MAIL
LogSyslog yes
MilterSocket inet:32767@192.168.1.66
OnInfected Reject
PidFile /var/lib/clamav/clamav-milter.pid
ReportHostname mail.example.com
User vscan
VirusAction /usr/local/bin/virus_notify.sh
Text 4: Example clamav-milter.conf file (with comments removed)
Once the clamd scanning service is running and the freshclam service is maintaining the malware signatures the clamav-milter must be configured and started in order to connect the scanning service into Postfix's SMTP processing. The milter service is typically loads its configuration from the /etc/clamav-milter.conf file.
The service must be informed via the ClamdSocket directive where to find the clamd scanning service and via MilterSocket where to listen for connections from Postfix. The MitlerSocket directive is “inet:port@ip-address”. VirusAction and OnInfected directives can be used to control the behavior of the service when malware is identified; an OnInfected value of Quarantine will cause Postfix to hold the infected message in it's hold queue while a value of Reject will bounce the message with an SMTP error. Especially when used in Reject mode defining an appropriate VirusAction to notify the intended recipient of the message that a message has been discarded is important. The script named by VirusAction is executed in the security context of the scanning service and is provided seven parameters:
- Virus name-space
- Message queue id
- The sender's e-mail addres
- The e-mail address of the intended recipient.
- The subject of the message-id
- The message's Message-ID
- The date of the message.
#!/bin/bash
# Parameters:
# virus name, queue id, sender, destination, subject, message id, message date
(
echo "";
echo " A message containing malware has been discarded.";
echo "";
echo " Malware: $1";
echo " Sender: $3";
echo " Destination: $4";
echo " Subject: $5";
echo " Message-ID: $6";
echo " Date: $7";
echo " Queue-ID: $2";
echo "";
) | \
mail -s '[ALERT] Infected Messages Discarded' \
-r milter@example.com -c helpdesk@example.com $4
Text 5: A sample script for use as the VirusAction. This script notifies the intended recipient and help-desk that a message was identified as malware and discarded.Connecting the Postfix service to clamav-milter
In order to integrate the scanning into Postfix the milter is configured in the main.cf file as an smtpd_milter. The default action of the milter should be set to “accept” so if for any reason the milter is unresponsive messages will still be delivered. As when connecting the other components it is important to verify that the Postfix service can reach the specified service [traffic is permitted by firewall's etc...].
smtpd_milters = inet:milter.example.com:32767
milter_default_action = accept
Text 6: Configuration directives from Postfix's main.cf
Upon modification of the main.cf file the Postfix service should be restarted.
Once configured the malware filtering service should be tested; this can be accomplished by acquiring a copy of the EICAR diagnostic virus and verifying that messages with this content attached are rejected and that the end-user's are notified of the rejection [according the clamav-milter's defined VirusAction].
clamd[11973]: instream(127.0.0.1@60469): Eicar-Test-Signature FOUND
Text 7: Example clamd log message for identified malware.
When malware is detected a message will be logged by clamd via syslog regarding the event; this will typically be logged under the “mail” service. Depending on the distribution messages logged as mail will be written to either /var/log/mail or /var/log/maillog [at least with the default syslog configuration].
Back up to Ubuntu server using Time Machine with OS X Lion 10.7
I recently put my mind to tackling the problem that had been plaguing mine and my fiancés MacBook Pros: backups.
We both have files held on our systems that we simply can’t afford to lose. We also work wirelessly. For those reasons Apple’s TimeMachine seemed like a really good option. However, at the £250GBP price tag and already having a home server, a bespoke solution appealed to both the geek and cost-saver in me.
After collating information from several different sources, please find below the steps required to setup and configure an Ubuntu instance to take backups from your Mac via TimeMachine:
Download netatalk 2.2 (The version held in Ubuntu repositories is 2.1 and Lion requires 2.2)
Natty i386: https://launchpad.net/~stefanor/+archive/ppa/+files/netatalk_2.2.0-0ppa2~natty1_i386.deb
Natty amd64: https://launchpad.net/~stefanor/+archive/ppa/+files/netatalk_2.2.0-0ppa2~natty1_amd64.deb
(Others here: https://launchpad.net/~stefanor/+archive/ppa/+packages)
Install netatalk
via dpkg -i <netatalk package name>
Edit /etc/netatalk/afpd.conf
The only line you want: “- -udp -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword”
Edit /etc/netatalk/AppleVolumes.default
Remove the default line for ~/ (if it exists) by commenting it out (a # should do). Add a new line: “~/.TimeMachine “$u Backup” allow:jamesanslow cnidscheme:dbd options:usedots,upriv,tm” – REPLACING “jamesanslow” with YOUR server username.
Create your Timeachine directory
mkdir ~/.TimeMachine should do it fine
Edit /etc/netatalk/netatalk.conf
Add/append/uncomment/leave the same the following important lines to:
ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
ATALK_UNIX_CHARSET=’LOCALE’
ATALK_MAC_CHARSET=’MAC_ROMAN’
export ATALK_UNIX_CHARSET
export ATALK_MAC_CHARSET
CNID_METAD_RUN=yes
AFPD_RUN=yes
AFPD_MAX_CLIENTS=20
ATALKD_RUN=no
PAPD_RUN=no
TIMELORD_RUN=no
A2BOOT_RUN=no
Create a new file in /etc/avahi/services/afpd.service
Copying in the following:
<?xml version=”1.0″ standalone=’no’?><!–*-nxml-*–>
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name replace-wildcards=”yes”>%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
Restart netatalk:
sudo /etc/init.d/netatalk restart
Connect to your server from your mac
Go to Finder and your server should appear in the left hand side. If not, CMD+K to manual connect.
Create your sparse backup file
Open up a terminal on your Mac. Move (cd) to the folder where your server’s mounted. This should be /Volumes/<username> Backup. So for me that would be “/Volumes/jamesanslow Backup”. Then run this command to create your backup file (replacing 512g with the size you’d like your TimeMachine to be in Gigabytes):
hdiutil create -size 512g -fs HFS+J -volname “Time Machine” `grep -A1 LocalHostName /Library/Preferences/SystemConfiguration/preferences.plist | tail -n1 | awk ‘BEGIN { FS = “|” } ; { print $2 }’`_`ifconfig en0 | grep ether | awk ‘BEGIN { FS = “:” } ; {print $1$2$3$4$5$6}’ | awk {‘print $2′}`.sparsebundle
Configure OS X to show all types of media for use in TimeMachine
Set OS X to show all types of media, such as ours by running this command in the terminal:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Go for it. Open up TimeMachine, select your network TimeMachine instance and get backing up!
MagicJack Plus
I was an early adopter of voip, initially using Broadvoice, then later inphonex for service, but lately, their service has been problematic. My wife had noticed that after making or receiving a call, the next call she would not be able to hear or talk to the other end of the line. This often required me to reset and restart the IP phone and connection. After mucking around with all sorts of settings on my IP phone and then trying several soft phones as well, all with the same results, I was in the market for yet another carrier. Enter MagicJack.
MagicJack has been all over the media lately and I have stayed away from it mostly because there was no linux support. Well, recently, they came out with the MagicJack Plus, which they advertise as “Use without a computer”. I decided that was probably the way to go. After all, who can resist a $25 A YEAR phone bill, right? Shoot, even my Inphonex plan cost that much per month. So, I went out and bought a MagicJack Plus at my local RadioShack and also purchased a cheapo phone to use with it as my only phone for years has been a voip phone.
The good:
The phone quality is decent. It is easy to set up and get going. It is way inexpensive. It is very portable.
The bad:
You *DO* need a computer to set it up. I had to use a mac to get it registered (no Linux yet and I refuse to use windows). Once set up initially, no more computer needed. The quality is decent. Transferring your old number costs additional $$. Had to change my home number.
All in all I call it a good purchase. I spent $70 on it and that gets me a free year phone service along with the equipment. I have made and taken several phone calls on it now with successful results. The money I spent on the MJP will pay for itself in 3 months of my previous carriers phone bill and then I am saving $25 a month and getting better service. I have to admit it seems hard to beat at this point!
GeChic On-Lap 13.3″ LCD
GeChic On-Lap 1301 13.3” Portable and USB powered Thin, Light, and Plug & Play LCD Monitor
You would think that my lack of posts here lately meant I had simply dropped of the face of the earth, but that isn’t really so. I have just been extremely busy with the day to day problems facing me in RL, including how to squeeze >that< much more work into my overly busy day.
This particular recent purchase, the GeChic On-Lap 1301 13.3” Portable and USB powered Thin, Light, and Plug & Play LCD Monitor, has helped me do just that.
One of the things all high-end computer workers need to enable them to multitask better is more screen space. This has been researched and documented in a variety of different places. Well, what are you to do with your mobile workstation? You can buy one of those external USB screens, that’s what. Almost a no-brainer, right? The problem with that for a Linux user is the drivers. Most of these types of screens push video through USB, which means you have to have a working usb to video driver, not to mention video over usb is a little slow. Enter the GeChic!
The GeChic solves these problems by NOT usung usb for video, it actually has both a vga and a dvi input along with being usb powered. That’s right, no extra power cord, just plug in the usb cable and pick your input method and you are rockin’ and rollin’. This means it will work with literally ANY laptop or desktop which supports those types of video output, regardless of operating system or driver issues.
The unit itself is a little pricey at $200, however, it makes up for it’s few downsides by giving me my much needed screen space, in an attractive, easy and mobile form. I did say few downsides, and there are a couple other than the price. The first is the color. It just doesn’t want to color match my laptop’s LCD no matter how I seem to adjust it. The second is that using vga input the picture quality lacks a little. To be fair, dvi input is far superior to vga anyhow, and the vga problems could just as easily stem from my machine than from the monitor and I didn’t spend a whole lot of time messing with the settings on vga before just trying out dvi. Ymmv.
What I do like is that this is an attractive little lcd screen with a nice resolution of 1366×768. You can use it while physically attached to your laptop or it can sit standalone next to it in several positions with its included stand. To connect it to your laptop it has surprisingly strong suction cups that attach it’s swing-base to the top of your laptop and it can simply fold up or swing out for use. This allows you to also do neat things like show a presentation on the back of your laptop while you watch the front, etc..
No matter how you slice it, this little thing is mighty handy to have around and everyone who has seen it in action immediately wants one of their own. Boy, I wonder if I could get a kickback from NewEgg on this? Even at that price, I think we have a winner.
Foresight
Foresight Linux is an OS for your computer/laptop. And here is some info about Foresight Linux:
- Rolling updates
- Rollback feature (Offline rollback feature too)
- Conary as package manager (Conary manual)
- Standalone, not based on any other Linux dist.
- Easy to create own packages and maintain packagers.
- 32bit and 64bit always available. 64bit always works as good as 32bit, you don't need to choose 32bit to make it work better as other dists might do.
- i686 is a much more modern architecture. It includes practically every processor that’s Pentium II or better. x86_64 is a 64 bit extension to the x86 architecture. x86_64 processors can still run 32 bit operating systems (e.g. i386) if you so choose, but they’re also capable of running 64 bit operating systems.
- Watch the presentation that Michael Johnson gave at FOSDEM 2008 and from Antonio Miereles with slides.
- Watch how fast a user in Foresight can update a package to newer version.
Tin Foil Hat Show – Episode 018
Episode 18. This show had more ACTA than ever before. New and improved, the lastest details on activity going on with this other horrible internet protection legislation. I got link-happy with all the articles that came up since the last show. I really do encourage you to follow those links, if you have any trouble getting the show notes, please email me and I'll send you those directly.
This episode's Podcast review was of NPR's Intelligence Squared. It is the presentation of classic debate style discussions in a civilized manner. It is interesting to be because it reminds me of when I used to go with the high school debate team to competitions. Even in this show, they poll the audience both before and after to see if the debate itself impressed anyone's opinion.
The new episode should be in your favorite podcatcher for download already. If you haven't added me to your podcatcher software, please add the RSS feed on the right.
The podcast is also available to play directly online at the Fuzion Podcast Network.
For the instructions to get the show notes please see the instructions as posted in the post from the first episode. These instructions haven't changed.
Feedback as always is welcome, tinfoilhatshow@gmail.com or you can contact me by any of the other methods listed here on this blog. Please remember that the show is very new and still settling in, but constructive criticisms are always appreciated.
Enjoy and please do send me feedback and corrections, it can only make the show better. A permanent link to the show's rss feed is listed on the right side of the blog.
--
CafeNinja
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Hibernate 4.0.1 pom.xml – Maven dependencies
I have been avoiding using Hibernate for a while now. I have been using alternatives such as the reference implementations eclipselink or openjpa. But I have to keep up to date for our JBoss training sessions where the more developer focused training sessions often cover examples of using JBoss for EJBs. If you using JBoss then its safe to just use the contents of the <jboss-home>/clients directory and know its compatible with the version of JBoss you are running. If you using maven then check them into your local repo. You can also use the JBoss repo.
<repository> <id>JBoss</id> <name>JBoss Repsitory</name> <layout>default</layout> <url>http://repository.jboss.org/maven2</url> </repository> JBoss and HibernateIf you prefer a more light-weight approach to using hibernate and like maven then getting compatible version for the various libraries in the pom.xml can be a little tricky. Here is the pom.xml extract for Hibernate 4.0.1 release. Note this is for Hibernate only. If you pull in the -all dependency you will end up with JGroup and Infiband jars which are for multicating and cluser management. Not needed by most developers.
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.0.1.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.2.0.Final</version> </dependency> <dependency> <groupId>org.hibernate.common</groupId> <artifactId>hibernate-commons-annotations</artifactId> <version>4.0.1.Final</version> <classifier>tests</classifier> </dependency> <dependency> <groupId>org.hibernate.javax.persistence</groupId> <artifactId>hibernate-jpa-2.0-api</artifactId> <version>1.0.1.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>4.0.1.Final</version> </dependency> <dependency><groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>provided</scope>
</dependency> <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.1.0.CR2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency> Logging and Hibernate 4.0.1 Hibernate makes use of the simple logging framework for Java (slf4j) and jboss-logging to allow you to use your favourite logging backend. You can leave out the last 3 dependencies if you don't want logging or just change the last entry to use the appropriate jar for your logging backend.
Changing the cursor style of the terminal
-> open a terminal
-> run the command
gconf-editor /apps/gnome-terminal/profiles/Default/cursor_shape
-> In the window that will pop out , look at window on the right. The highlighted line will have cursor_shape in the first column and the value "block" in the second column.
-> To change this, click on the second column and enter the value "underline" to have the cursor as an underline or enter "ibeam" to use a vertical line cursor.
-> Hit the enter key after entering the new value
-> click on file and quit.
Your terminal cursor would have changed to what ever new value you chose.
The File Chooser
It's a critique of Linux that because it is developed from so many different sources, it tends to suffer inconsistency in how things are done. This criticism is often broadly stated such that it leaves the impression that nothing is ever the same on any Linux system, or even on one's own computer; which, of course, is not correct.
And often times, naturally, we Linux users value that "inconsistency". We like that there is variation, variety, and choice. Sometimes that's one of the top selling points of using Linux at all.
But there are those little things that sometimes do just get in the way and don't really seem to empower anyone.
One such example is the File Chooser dialogue box. I'm calling this a "File Chooser" because that's the term I know; there may be a more generic or technical name for it, so let's define it... When you are in an application and go to Open or Save a file, a dialogue box appears which allows you to choose what file you want to save or open. That's what I'm calling, generically, a File Chooser.
I'm not a programmer, but it seems to me like the idea of a File Chooser should be abstracted away from individual applications. It seems to me like it's the kind of dialogue box that nearly every application ever written is going to need to call, so there should, I would think, be some kind of $FILE_CHOOSER variable that the user could set on their own system, such that no matter what application is making a call to $FILE_CHOOSER, the user always gets presented with the SAME interface. Every time. No variation (actually, with one notable exception, but we'll get to that later).
Let's look, right now, at one Linux system. This is my main workstation, and this is but a sample of File Choosers I see on a daily basis:
The KDE Chooser
There's the standard KDE File Chooser. It's a reasonable file chooser, I think, with lots of view options to be found via the spanner icon in the top right of the window. This is basically the File Chooser I see 75% of the time, since I use a lot of K applications, and I've noticed lately that even Q applications seem to magically make the call to this File Chooser, which is a new development; I used to see a different, generic Qt File Chooser on things like Qtractor.
One minor annoyance is that the attributes of the File Chooser don't persist across applications; ie, if I make the icons in the left panel small, they'll be big again in another K app until I make them small for that app. It would obviously be 100% valid to call that a feature, since I imagine some people love having per-application control over that. For me it's an annoyance, but this is just a sidenote.
The GTK Chooser
This is the file chooser I see 20% of the time, being a heavy user of GIMP and Audacity, sometimes Firefox, maybe once or twice in Emacs.
It's a nice File Chooser, but it's different. To a new user, it makes no sense that when they open a file in GIMP, they have to learn a different interface than the one they use when opening an application in Kate. To further confuse matters, the left panel in the GTK file chooser positions the bookmarks differently than the left panel in the KDE chooser, and if I bookmark a location in one, it doesn't even get bookmarked in the other, so I am forced to bookmark the same location at least twice.
Java Chooser
And after that, it just starts to get messy. Libre or Open office have their own file chooser. I don't love it; there's no way to bookmark common locations and even less an obvious way for the user to get out of their home directory and into an attached drive. If a new user wants to open a file on a thumbdrive, they need to learn about the /media directory, and how to get there. That's not a crime; I have no problem with users being educated, it's just noticeably different from the easy access that GTK and KDE File Choosers provide.
A Variation on a Theme
And then, if you're using Linux enough, you start seeing all kinds of random variations. There's a kind of dumbed-down KDE chooser that Cervisia uses, and what feels like a modded GTK chooser from Geeqie.
And one I see a lot, because I use it in Qtractor, is the chooser used by the Fluidsynth DSSI plugin that I use in Qtractor. I don't exactly know its history, but I think it may be an update to the old classic X applications (or CDE probably?) file choosers. I don't love them but I see their historical charm, but the point remains...they're completely different than all of the above.
Standardize
Notifications used to evoke the same level of discomfort for me. They actually still do, just not on Linux; I think the Linux desktops have mostly solved the notification issue. They're a pleasure to deal with on Linux, I have no problem with them. They could be developed and standardized a little more, sure, but mostly the notification system on Linux is actually a heck of a lot better than I've seen on any other OS.
The File Chooser barrier, then, is, I humbly submit, the next giant that the Linux desktop should tackle. I don't want to have to deal with six different file choosers. I don't mind that they all exist; heck, I'm all for variety, but I'd rather have the choice. And I think there are plenty of exceptions (well, one that I can think of). Blender doesn't want to call a system File Chooser; Blender's interface and its established UI clearly calls for its own brand of File Chooser. I don't see why that would surprise or confuse any Blender user.
But for nearly everything else, I would love to go to KDE System Settings, into the File Associations panel, or into Gnome3's Default Applications panel, and set my File Chooser to KDE, or to GTK, or to Java, or Classic X, or whatever. As I've said, I am not a programmer, so I don't even know if that's possible in the way that I am imagining it. It's easy for me to say "hey let's invent a $FILE_CHOOSER variable" but of course I've got no clue what any of that entails. But the important thing is consistency, because not having it is mildly frustrating for us full-time users and flat out perplexing to new users.
Howto Delete Your Google Account
I haven't used my old gmail account in ages, even for junkmail. Since Google is revamping its "privacy policy", I figured now was a great time to finally get around to deleting my account entirely. Since I'm "the computer guy" among friends and family and usually have to end up supporting something regarding Google, I'll maintain a dummy account with google, but the old "real" account is gone. Here's how you can get rid of your Google account:
The Google instruction on this is:
1. Sign in on the Google Accounts homepage.
2. Click Close account and delete all services and info associated with it to delete your account.
That's close, but it's incorrect.
The actual way to delete your Google account is:
1. Sign in on the Google Accounts homepage at http://www.google.com/accounts/Login
2. You will not see any link allowing you to close your account. But near the bottom of the page there is a heading that reads "My products - Edit". Click the Edit link.
3. Now you have a few choices; Delete a Product or Delete Account. Personally, I settled on deleting the account.
Hope that helps.
Some Basic Thoughts on GPL Enforcement
I've had the interesting pleasure the last 36 hours to watch people debate something that's been a major part of my life's work for the last thirteen years. I'm admittedly proud of myself for entirely resisting the urge to dive into the comment threads, and I don't think it would be all that useful to do so. Mostly, I believe my work stands on its own, and people can make their judgments and disagree if they like (as a few have) or speak out about how they support it (as even more did — at least by my confirmation-biased count, anyway :).
I was concerned, however, that some of the classic misconceptions about GPL enforcement were coming up yet again. I generally feel that I give so many talks (including releasing one as an oggcast) that everyone must by now know the detailed reasons why GPL enforcement is done the way it is, and how a plan for non-profit GPL enforcement is executed.
But, the recent discussion threads show otherwise. So, over on Conservancy's blog, I've written a basic, first-principles summary of my GPL enforcement philosophy and I've also posted a few comments on the BusyBox mailing list thread, too.
I may have more to say about this later, but that's it for now, I think.
Taking Advantage of Other People’s Misfortune
I read on the web today that Micr0s0ft is offering discounted or free Win Mobile phones to people who had Android devices that got infected with malware.
I have no love for Micr0s0ft, but I also have no great love for phones in general, so regardless of who's idea this was, it's actually a really clever and funny marketing scheme.
Now, to be fair, I wonder what kind of lawsuit Micr0s0ft would slap phone Android manufacturers with if they launched a campaign like that.
Anyway, the reality is that as a Linux enthusiast I've been using the same tactic on a much smaller scale for quite some time, and perhaps you have been, too. The idea is simple: when someone comes to me with a Wind0ze problem or an App1e issue that I sincerely cannot solve quickly (ie, it's an in-patient issue, not a quick patch-up job), I generally end up booting the thing into Linux for one reason or another. Sometimes it's just to make sure that everything, hardware-wise, is actually functioning as expected, other times it's because I have to do some extended task (reset a password, rescue data that I don't know how to access from the Wind0ze interface, download a bunch of drivers, whatever), and the person gets to witness their computer, working 100% as expected, on this "linux" thing I'm always talking about or wearing on a tshirt.
On three occasions now, I've been able to lend a laptop to the person; I show them Gnome3, I show them how to launch the office app and the internet browsers, and I send them on their way. On all three of those occasions so far, Linux has ended up being installed for, so far, an extended period of time. I don't know if they're "life converts" or anything, but I don't get a kickback for any of these "conversions" so I really don't care. What I do care is that I get to show some people Linux is a positive light, they see that it works, that it's attractive, and that it's actually something they can use. OK, it might not load Batman Arkham Asylum on it (or does it? I haven't actually checked) and that might be the dealbreaker for that person in terms of lifelong conversion, but they know about Linux now, they've used it, it's saved them in their time of need. Translation: they are now supporters.
The question of an "enthusiast", I think, is when people stick with Linux and start seeing that it is a real-world solution and actually makes their lives easier. A fourth friend of mine recently had this experience: he handed me $500 or so and I built him a Linux desktop computer, installed Slackware with all of my usual Slackermedia customizations, and suddenly he had a Linux desktop. The problem? that pesky macbook of his, so familiar and comfortable. For months he barely touched the Linux desktop. Then one day, his macbook died. I told him I'd try to get around to it but that I was busy with other projects (which right now is true, but I'd have lied if it hadn't been true, because I'm just that good of a friend), and that he should use his nice powerful Linux desktop.
It's been a couple of weeks now and this Linux desktop of his is getting prettttty comfortable. He's got Google chat working on it (Skype is not 64bit-compat I think?), Chromium and Firefox, Guvcview, Inkscape, and GIMP all working overtime. And he's liking it because the thing is more powerful than his old macbook anyway, and it's running really cool and exciting free software.
In other words, take a lesson from our enemy and be there with Linux when the other solution fail. It just might win the Linux side a supporter, possibly even a dyed-in-the-wool enthusiast.
PosixHacker Comic
I would like to invite you all to give my comic a read, I'm sure some of you will love it, specially the ones who appreciate pixel art at its finest.
PosixHacker will primarily focus on all things dear to my heart, that obviously includes FreeBSD, Linux, KDE and video games (stuff like Minecraft and Monkey Island just to name a few).
Inkscape Fabric Texture: YouTube
borisbaker12 over at YouTube has a fairly new video on how to make a fabric texture in Inkscape. Check it.
