Posts Tagged ‘machine’
Wednesday, May 2nd, 2012 I don't know if someone has thought about this topic but in my view Facebook use in organizations has a negative influence on companies overall efficiency!
Think for a while, facebook's website is one of the largest Internet based "people stealing time machine" so to say. I mean most people use facebook for pretty much useless stuff on daily basis (doesn't they ??). The whole original idea of facebook was to be a lay off site for college people with a lot of time to spend on nothing.
Yes it is true some companies use facebook succesfully for their advertising purposes and sperading the awareness of a company brand or product name but it is also true that many companies administration jobs like secretaries, accountants even probably CEOs loose a great time in facebook useless games and picture viewing etcetera.
Even government administration job positioned people who have access to the internet access facebook often from their work place. Not to mention, the mobility of people nowdays doesn't even require facebook to be accessed from a desktop PC. Many people employeed within companies, who does not have to work in front of a computer screen has already modern mobile "smart phones" as the business people incorrectly call this mini computer devices which allows them to browse the NET including facebook.
Sadly Microsoft (.NET) programmers and many of the programmers on various system platforms developers, software beta testers and sys admins are starting to adopt this "facebook loose your time for nothing culture". Many of my friends actively use the Facebook, (probably) because they're feeling lonely in front of the computer screen and they want to have interaction with someone.
Anyways, the effect of this constant fb use and aline social networks is clear. If in the company the employeed personal has to do work on the computer or behind any Internet plugged device, a big time of the use of the device is being 'invested' in facebook to kill some time instead of investing the same time for innovation within the company or doing the assigned tasks in the best possible way
Even those who use facebook occasionally from their work place (by occasionally I mean when they don't have any work to do on the work place), they are constantly distracted (focus on work stealed) by the hanging opened browser window and respectively, when it comes to do some kind of work their work efficiency drops severely.
You might wonder how do I know that facebook opened browser tab would have bad interaction with the rest of the employee work. Well let me explain. Its a well known scientifically proven fact that the human mind is not designed to do simultaneously multiple tasks (we're not computers, though even computers doesn't work perfect when simultaneous tasks are at hand.).
Therefore using facebook in parallel with their daily job most people nowdays try to "multi task" their job and hence this reflects in poor work productivity per employee. The chain result cause of the worsened productivity per employee is therefore seen in the end of the fiscal quarter or fiscal year in bad productivity levels, bad or worsened quality of product and hence to poor financial fiscal results.
I've worked before some time for company whose CEO has realized that the use of certain Internet resources like facebook, gmail and yahoo mail – hurts the employee work productivity and therefore the executive directors asked me to filter out facebook, GMAIL and mail.yahoo as well as few other website which consumed a big portion of the employees time …
Well apparantly this CEO was smart and realized the harm this internet based resources done to his business. Nowdays however many company head executives did not realize the bad effect of the heavy use of public internet services on their work force and never ask the system administrator to filter out this "employees efficiency thefts".
I hope this article, will be eventually red by some middle or small sized company with deteriorating efficiency and this will motivate some companies to introduce an anti-facebook and gmail use policy to boost up the company performance.
As one can imagine, if you sum up all the harm all around the world to companies facebook imposed by simply exposing the employees to do facebooking and not their work, this definitely worsenes the even severe economic crisis raging around …
The topic of how facebook use destroyes many businesses is quite huge and actually probably I'm missing a lot of hardmful aspects to business that can be imposed by just a simple "innocent facebook use", so I will be glad to hear from people in comments, if someone at all benefits of facebook use in an company office (I seriously doubt there is even one).
Suppose you are a company that does big portion of their job behind a computer screen over the internet via a Software as a Service internet based service, suppose you have a project deadline you have to match. The project deadline is way more likely to be matched if you filter out facebook.
Disabling access to facebook of employees and adding company policy to prohibit social network use and rules & regulations prohibiting time consuming internet spaces should produce good productivity results for company lightly.
Though still the employees can find a way to access their out of the job favourite internet services it will be way harder.
If the employee work progress is monitored by installed cameras, there won't be much people to want to cheat and use Facebook, Gmail or any other service prohibited by the company internal codex
Though this are a draconian measures, my personal view is that its better for a company to have such a policy, instead of pay to their emloyees to browser facebook….
I'm not aware what is the situation within many of the companies nowdays and how many of them prohibit the fb, hyves, google plus and the other kind of "anti-social" networks.
But I truly hope more and more organizations chairman / company management will comprehend the damages facebook makes to their business and will issue a new policy to prohibit the use of facebook and the other alike shitty services.
In the mean time for those running an organization routing its traffic through a GNU / Linux powered router and who'd like to prohibit the facebook use to increase the company employees efficiency use this few lines of bash code + iptables:
#!/bin/sh
# Simple iptables firewall rules to filter out www.facebook.com
# Leaving www.facebook.com open from your office will have impact on employees output ;)
# Written by hip0
# 05.03.2012
get_fb_network=$(whois 69.63.190.18|grep CIDR|awk '{ print $2 }');
/sbin/iptables -A OUTPUT -p tcp -d ${get_fb_network} -j DROP
Here is also the same filter out facebook, tiny shell script / blocks access to facebook script
If the script logic is followed I guess facebook can be disabled on other company networks easily if the router is using CISCO, BSD etc.
I will be happy to hear if someone did a research on how much a company efficiency is increased whether in the company office facebook gets filtered out. My guess is that efficiency will increase at least with 30% as a result of prohibition of just facebook.
Please drop me a comment if you have an argument against or for my thesis.
Tags: awareness, basis, beta testers, college, companies administration, company businesses, computer devices, computer screen, daily basis, Desktop, doesn, etcetera, facebook, government, government administration, interaction, job, Linux, linux routers, machine, Microsoft, mini computer, negative influence, organization network, place, quot, screen, smart phones, social networks, someone, stealing time, succesfully, sys admins, system platforms, time, time machine, topic, useless stuff, work
Posted in Business Management, System Administration | 2 Comments »
Saturday, March 31st, 2012 I'm currently learning some basic graphic design – reading GIMP's documentation etc. While reading http://docs.gimp.org, I saw a reference to Gthumb and GQView picture viewing apps, so I thought of installing them on my Debian LinuxGQView has a lot of santimental value to me as it reminds me of the the old times when I used gqview as a default picture viewing program on a old machine running Debian Woody Linux with Window Maker as desktop environment.
I wanted to see how GQView looks nowdays so installed it:
noah:~# apt-get --yes install gqview
And onwards launch it:
hipo@noah:~/Desktop$ gqview
This is a compatibility alias for Geeqie!
Please use /usr/bin/geeqie instead!
Creating Geeqie dir:/home/hipo/.config/geeqie
Creating Geeqie dir:/home/hipo/.local/share/geeqie/collections
Creating Geeqie dir:/home/hipo/.cache/geeqie/thumbnails
Creating Geeqie dir:/home/hipo/.local/share/geeqie/metadata
What poped up instead of gqview is Geeqie – a picture viewer nowdays available on a default Slackware Linux install.
Fedora, CentOS users will have to build geekie from its source, as of time of writting there is no available rpm package.
It was new to me Gqview is no longer developed, its dev is forked (because its head developer is not reachable any more). Hence QGView continues to live on nowdays under the hood of Geekie
As you can see from the prior screenshot Geeqie has very similar interface to GQView. Going through the interface, I've found it has much more features than GQView. You see one of the many new nice features is the support for drawing Image Histograms.
There are few type of Histograms to display in Geekiq, available by navigating to:
View -> Image Overlay
Even if you're not familiar with Image histograms, probably you have seen them appear on a digital camera while browsing in menus. Its likely you didn't know what you saw a digital camera display is a histogram.
Anyways being not familiar with histograms is perfectly fine as for most of us (regular) users image historograms doesn't make much sense.
BTW Histograms are very useful for pro Photographers. Photographers can use them as an aid to show the distribution of picture "tones" captured, and whether image detail has been lost to blown-out highlights or blacked-out shadows.
Interesting fact concerning "reading" and understanding Histograms is on a Histogram for a very dark image the majority of data points are on the left side and center of the graph, whether histogram for a very bright image with few dark areas and/or shadows will have most of its data points located on the right side and center of the graph.
With this said in mind, you can see, the above Geeqie picture visibile histogram obviously has most of its data concentrated on the right and the center so this means the histogram belongs to a bright pic. Well, Actually you can see this without a histogram too 😉
Though Image Histograms might seem pretty useles they're very much needed in Professional Graphic Manipulation. For instance for correction of image color gamma or manually adjusting the brightness for each picture pixel brightness.
So Enough with histograms, I will switch now to a short review of Gthumb
Since I haven't used/seen Gthumb "for ages", I was also curious how the program looks nowdays. I did not needed to install gthumb, as I had it installed already on my notebook. I assume gthumb package was installed as some package dependency or I did it install some very long time ago and I forgot.
For people who didn't have it install do:
noah:~# apt-get --yes install gthumb
...
This installs a Gthumb version 2.12.2. The current latest stable Gthumb release is way ahead from the existing deb stable package, the latest available version on sourceforge is 2.7.4
Ubuntu gthumb latest packages would probably be newer than my debian installed one, so Ubuntu users can have the joy to use a newer version of gthumb…
gthumb is also installable for Fedora and CentOS users by default from default assigned package repos:
To install on RPM based Linux distro:
[root@centos:~ ]# yum -y install gthumb
...
Once installed, I ran it via a gnome run application shortcut ALT+F2 and typed:
gthumb
If you're more of a gui user than me you can run it also through GNOME menus:
Applications -> Graphics -> Gthumb Image Viewer
You see gthumb appears, quite similar in "look&feel" to Geeqie.
I went through the program options just for the sake to compare with Geeqie. Based on the fact Geeqie seems to have more functionality it is probably superior and better choice for people looking for professional image vieweing / editting.However there are some other aspects I've noticed, where it lacks behind Gthumb.
Gthumb has few great functionality which unfortunately as of time of writting are missing or hardly achievable in Geeqie
1. Bookmarking pictures.
This allows for your favourite pictures to be bookmarked in the same way as bookmarks work in a browser, really neat feature.
2. Share functionality
Share button is located on the rightest upper corner and makes sharing with major web storage places easy.
Through the Share button, you can export (share) your pictures directly in Picasa, Facebook,Flickr and Photobucket.
Through this share button it is also possible to "share your photos on a CD or DVD", – burn them on a CD/DVD directly from gthumb. This is doable via:
One other Gthumb advantagle is its extensibility. It has a powerful plugin system. Many of the features it has are already there thanks to its enabled extensions.
3. Photo Tagging
Nowdays tagging, photos has become so popular with the boom of facebook tagging. Gthumb has a relatively easy to use image tagging integrated.
tagging a picture is done by simply going through the picture and selecting it with the (rightest located mouse button).
There is a list of few already predefined tags, which can be used to tag images.Assigning more tags is done via menu:
Tags -> Other
4. Organizing pictures
Through the Organize button located right below the Share button, one can easily organize his picture collections, based on few criterias.
The organize easy feature is not so important for not people, who are not in depth in photographing but for professional photographers this is an absolute necessity. For people who are image freaks and store tens of thousands of pictures organizing pictures for easy later retrieval is really nice.
To sum it, up Geeqie and Gthumb are richer in functionality if compared to GNOME's default pic viewer (eye of the gnome) – eog.
Geeqie, as the name suggests is more for geek oriented and has a lot of great options which can serve well for advanced computer users. For an ordinary desktop user however it will probably be not easy to "digest". Gthumb on the other hand is ideal for anyone who prefers gui convenience. Gthumb is a good option for anyone looking for some similar to Picasa free software program that is feature rich and easy to use.For people who has to review a dozens of pictures daily, associating one of the two as a default picture viewer will probably be useful.
Tags: alias, alternative, Auto, center, CentOS, config, debian woody, default, design reading, Desktop, desktop environment, digital camera, Draft, fedora, geekie, GIMP, GNU, gnu linux, gqview, graphic design, head developer, hipo, histogram, histograms, image overlay, LinuxGQView, machine, meta package, metadata, noah, package, Photographers, picture, poped, quot, reading, rpm, screenshot, time, Ubuntu, value, window, woody linux, writting
Posted in Gnome, Linux and FreeBSD Desktop, News | No Comments »
Tuesday, March 6th, 2012 Facebook is usually praised and very seldom criticized. I've seen already on a couple of occasions on the TV channel news on earthquake occasions or some kind of other calamities, where facebook was said to help the rescuing teams etc. We constantly hear how facebook has helped people point their location in disastrous situations or just helping people organize a protest against a harmful company activity. Whilst this might be true, the harms it does are quite big as well. A primary harm it does is to economy as we know it. As people are engaged in filling in Mark Zuckerberg and facebook investors pockets, they rarely think about how actually facebook gets their money?
Let me explain:
Basicly facebook makes money out of its constantly increased social network data content. This could have not been possible without the 800 000 000+ million of people who constantly post updates on facebook, create groups, post pictures, add likes, comment and post links to other facebook pages. If people had not all this volunteers (facebook users) to post all this bunch of mostly junky information, facebook inc. would not have a penny. Therefore what makes facebook grow is the people itself who willingly choose to be part of this money making machine. One would think with regular company the investors are the owners of the company shares. This classical business model is not facebook model, there it is rather different as the real investors in facebook are not the capital shareholders but the regular social network user base – this means (you and me)!.
For all those who still don't get what I'm talking about I will shortly explain.
Everyone who has a basic idea on how internet advertising works is aware that the primary origin for facebook todays profit is the left pane sky scraper field with ever changing advertisements.
Various advertisers pays facebook all the time big money for displaying those stupid advertisement. As many peole are viewing and clicking the advertisements, facebook makes billions out if its advertisers.
So far so good, facebook generates its profits out of peoples free time and delibarately information sharing you would say and you might argue me that facebook steals people (time / money). This would have been true if you don't put in the picture for a contrast, a regular blogger, who makes its daily living out of blogging.
What a regular blogger does is frequent blogging on various kind of topics of his interest. Various bloggers blog at various titles, but most of them has a few major topics which they're following.
The more articles a blogger collects and the higher the uniqueness of this information is the bigger the probability this blog to have a good users base and the more interesting content it will have for search engine robots like Google Bot Crawlers or Yahoo Bot etc. etc.
With all priod said, the higher the probability this blog to have more traffic drawn from web searches to the blog. As the blogger content increases with time when it gets 10000 or more unique articles (pages), consequently it can be used as an advertising place. A 10000 pages blog could earn a person a few hundred of euros (200, 300 EUR) per month.
Well the business scheme behind facebook is exactly the same, except they store and physically own the data of the facebook registered persons. The user posts content on his facebook wall, makes pages or does various activities which generate pages, the content gets indexed in Google and with time the overall facebook website content grows. As new users joins facebook with the increased popularity of website. The website is growing exponentially like in a atoms chain reaction.
Because of this steady content growth, it becomes an interesting place not only for advertisers but for all kind of people that use the internet.
And there you have the monetarization facebook makes billions of dollars every second because of you. This is the shocking truth, they get their money because people click or view advertisement on each others profile, so there you're YOU make the little people who develop facebook and the original investors richer and richer with every day, where you make yourself poorer and poorer by investing your personal time in facebook instead of using it to work on something that will potentially generate you some dividents in short or long future.
Actually social network is nothing more than just a multiple blogging platform, but some marketing person come with this marketing hype work "social network".
The social network buzz word is in my view just another big marketing "white lie"!. Correct me if i'm wrong but what in fact is a "Social network?". I don't see facebook neither as social, network as network. I don't know about you but I have never made a long lasting friend or relationship using facebook so far. I think the poor Facebook creator Zuckerberg made facebook with a viral mindset. He intended it to be like a social virus and so far he succeed pretty much. I just wait and eager to see who will start the anti-virus for Zuckerberg's (facebook) – people time eating virus.
Tags: advertisements, advertisers, advertising works, Auto, billions, blogger, business model, calamities, capital, channel news, company shares, content, contrast, data content, disastrous situations, Draft, earthquake, economy, Engine, everyone, facebook, information, interest, internet advertising, junky, left pane, location, machine, mark zuckerberg, network content, occasions, peole, person, picture, place, pockets, profits, Search, shareholders, sky, sky scraper, time, tv channel, volunteers
Posted in Business Management, Entertainment, Everyday Life, Various | No Comments »
Tuesday, January 8th, 2008 After 10 minutes I’ll have Deutcsh lessons anyways I’ve caught some winter virus :)I’m having snots coughing and stuff. In Sunday I was on a Liturgy in the Church as usual.Yesterday was a quiet and peaceful day. Static came home and we installed Windows. NowI have Windows,Linux,FreeBSD on one machine. I’m surprised how well is Windows working.I’m eating a lot of garlic recently to stimulate my immune system. Yesterday I playedsome Warcraft III. Having Windows now gives me the opportunity to play some gameswhich weren’t working in wine. Well that’s most of how my day passed. I went to seemy grandma and she made me tea as always (her tea is awesome!). :)END—–
Tags: end, freebsd, gameswhich, garlic, grandma, home, immune system, Linux, liturgy, machine, NowI, opportunity, peaceful day, playedsome, seemy, Static, system, tea, virus, warcraft iii, weren, Windows, wine, yesterday
Posted in Everyday Life | No Comments »
Monday, February 26th, 2007 I drinked 100 gr. of Rom and a beer after that and I got drunk. I have some problems with one of the servers in DBG. I hope the machine’s hard drive didn’t die. If the hdd is dead it would be very very bad for me. Tomorrow I have test in Management. As usual I haven’t study :]] I’m listening to Pantera and I want to drink more .. which is not good at all. END—–
Tags: Beer, dbg, didn, die, drive, Drunk, end, gr, hard drive, haven, hdd, machine, Management, Pantera, ROM, servers, study, test, tomorrow
Posted in Everyday Life | No Comments »
Thursday, April 5th, 2007 It was a day full of waiting. The Admin/tech support personel in sofia is a real pain in the ass. I waited half a day for a simple debian base install. The guy installed debian over already installed freebsd on a server we sent destined for colocation in evolink. The machine is great dual 3ghz Xeon with 3 x 70 gb SCSI discs. In 4:00 o’clock I received a mail with username and password of the server, but the system was unaccessible for 1 more hour. I got really nervous I received tons of calls from the boss, our project Manager, Vladi the PHP programmer. I logged to the server in 5:00 and configured apache with mysql upto 10:00 o’clock then did a little walk with nomen in the central park and drinked one beer per capita. I had to meet Static and Amri in 6:00 o’clock but I was busy configuring the new rack so I missed a great oportunity to have fun with old friends. ORDER has to come back to Bulgaria, today or even he maybe is already in Varna. I’m quite impatient to see him! In the afternoon I went to some spiritual downfalls but now Thanks to God I’m alive and well. The pozvanete site already points to the new rack so I hope the machine would be able to serve it’s goal perfect. This will be made clear in the morning. Soon I’m going to bed. Glory be to God for fulfilling me with his love and sustaining my life and keeping me from evil! END—–
Tags: admin, apache, bed, Beer, capita, central park, clock, colocation, configured, end, freebsd, fun, gb scsi, glory be to god, half a day, love, machine, mail, nomen, old friends, oportunity, order, pain in the ass, password, personel, php programmer, programmer, rack, sofia, spiritual, Static, support, support personel, upto, username, x 70, Xeon
Posted in Everyday Life | No Comments »
Wednesday, July 18th, 2007 It was a pretty hot day. In the morning we discussed a lot about the idea to move one of the colocated servers from Netinfo to Evolink. Also I have moved www.bcc.bg from one machine to another did various other Job, plamenko come home and we uploaded some of his other videos, Damqncho called and was my guest for some time ( This guy is going to become a good man in Faith I’m sure). In 6:00 we had to go to the ex-calculation center and to sign for the Cisco Academy with Mitko but it happened that he had urgent work in Balchik so I have to go alone. I used Plamenko’s bike to go to the calculation center which was located at the end of the city (Riding bike is great !). I signed for Cisco and signed also Niki (Mitko’s brother) and Niki. So we are going to share the same Cisco class! :]. After that I went to Mitko’s home to explain to his brother about the cisco way of studying. Also I forgot to mention that Doncho, has given us all the material for the semestar on a cd, we are going to have 4 semesters for the first degree, each of the semestars is going to be something like 2 months or so, the practice is going to be in Saturday. Later I have met Alex and we drink beer together. Later I saw Lily for a while and we had a walk I met Galio ( A homeless boy :[), and bought him some food, later I realised that I have lost my wallet with some money I walked again the walk where I walked after I bought him food but I didn’t found it I get a little distressed but at the same time I was feeling very calm (unusual for such a situations ). I have put my hope God would give it back. First I suspected that Galio has stolen the wallet from me but I was wrong this boy respects me. I found Galio and asked him did he stole the money, he denied to be guilty and I trusted him because he was honest. He was very kind to me he came with me looking again over all the way where I have walked at last I suggested to look in the central park where we have drinked beer together with Alex, under the bench where we have seated Me and Galio found the Wallet. And we got really happy about this. I checked my wallet there was 22 lv in there. When we was still searching the wallet I promised to God that If we found the wallet I will give 10 lv. to for his kindness and concern about my problem. After I have found the wallet I have completed my promise. Galio walked with me up to my home. The End. The only think that I can say after all this is PRAISE THE LORD, BLESS HIS HOLY NAME OH HEAVENS AND EARTH AND ALL LIVING, AND OH MY SOUL BLESS THE LORD GOD! BLESSED BE OH LORD!!!! :] END—–
Tags: balchik, Beer, bench, calculation, Camera, camera action, center, central park, cisco, cisco academy, cisco class, city, class, colocated servers, concern, end, first degree, good man, homeless, homeless boy, hope god, hot day, Light, light camera, lily, machine, Mitko, move one, Netinfo, riding bike, semestar, semesters, something, time, wallet, work
Posted in Everyday Life | No Comments »
Friday, February 1st, 2008 One more week passed without serious server problems. Yesterday after upgrade to debian 4.0rc2 with
apt-get dist-upgrade and reboot the pc-freak box became unbootable.
I wasn’t able to fix it until today because the machine’s box seemed not to read cds well.The problem was consisted of this that after the boot process of the linux kernel has started the machine the boot up was interrupted with a message saying
/sbin/init is missing
and I was dropped to a busybox without being able to read nothing from my filesystem.Thankfully nomen came to Dobrich for the weekend and today he bring me his cdrom-drive I booted with the debian.
Using Debian’s linux rescue I mounted the partition to check what’s wrong. I suspected something is terribly wrong with the lilo’s conf.
Looking closely to it I saw it’s the lilo conf file it was setupped to load a initrd for the older kernel. changing the line to thenew initrd in /etc/lilo.conf and rereading the lilo; /sbin/lilo -C; /sbin/lilo;
fixed the mess and pc-freak booted succesfully! 🙂
Yesterday I had to do something kinky. It was requested from a client to have access to a mysql service of one of the company servers,the problem was that the client didn’t have static IP so I didn’t have a good way to put into the current firewall.
Everytime the adsl they use got restarted a new absolutely random IP from all the BTC IP ranges was assigned.
The solution was to make a port redirect to a non-standard mysql port (XXXXX) which pointed to the standard 3306 service. I had to tell the firewall not to check the coming IPs on the non-standard port (XXXXX) against the 3306 service fwall rules.
Thanks to the help of a guy inirc.freenode.net #iptables jengelh I figured out the solution.
To complete the requested task it was needed to mark all packagescoming into port (XXXXX) using the iptables mangle option and to add a rule to ACCEPT all marked packages.
The rules looked like this
/sbin/iptables -t mangle -A PREROUTING -p tcp –dport XXXXX -j MARK –set-mark 123456/sbin/iptables -t nat -A PREROUTING -d EXTERNAL_IP -i eth0 -p tcp –dport XXXXX -j DNAT –to-destination EXTERNAL_IP:3306
/sbin/iptables -t filter -A INPUT -p tcp –dport 3306 -m mark –mark 123456 -j ACCEPT .
Something I wondered a bit was should /proc/sys/net/ipv4/ip_forward in order for the above redirect to be working, in case you’re wondering too well it doesn’t 🙂 The working week was a sort of quiteful no serious problems with servers and work no serious problems at school (although I see me and my collegues become more and more unserious) at studying. My grand parentsdecided to make me a gift and give me money to buy a laptop and I’m pretty happy for this 🙂 All that is left is to choose a good machine with hardware supported both by FreeBSD and Linux.
END—–
Tags: adsl, boot process, BTC, busybox, cdrom, client, company servers, dport, External, file, filesystem, firewall, freak box, init, initrd, ip ranges, ips, iptables, kinky, lilo, linux kernel, machine, mangle, mark, mess, nomen, partition, random ip, rescue, s box, server problems, something, thenew, weekend, work, xxxxx
Posted in Everyday Life | No Comments »
Saturday, August 27th, 2011 Yesterday, most of the time I’m playing around with Squirrelmail, finally, time came when I had enough free time to fix the squirrelmail installed on mail.www.pc-freak.net
The installed version there has been broken after upgrade of the Apache webserver on the FreeBSD and failed with some stupid preg_match exception immediately after a user tries to login, anyways I decided to not install the squirrelmail from freebsd ports but rather download it directly from squirrelmail.org .
Installation went smoothly, however after testing to send email typing the email in Bulgarian with a default charset of (UTF-8) set from the Desktop machine from which I’ve written it, suddenly the sent emails encoding ended garbled.
One of my employees complained about receiving emails which are unreadable thus I proceeded immediately to check and fix the webmail letters encoding.
My logical first assumption was that the problem is caused by the FreeBSD missing a correct locale, thus the first thing I did in order to isolate the problem was check the installed locales:
pcfreak# locale -a | grep -i UTF-8|wc -l
56
As the above command output shows an UTF-8 locales was installed so I further checked if a specific locale for Bulgarian UTF-8 – bg_BG.UTF-8 is installed on the system:
pcfreak# locale -a |grep bg_BG.UTF-8
bg_BG.UTF-8
Being sure that the bg_BG.UTF-8 is installed I excluded missing locales as a possible problem cause.
Next I’ve noticed that locale command returns a default setting for my root and users set to:
pcfreak# locale
LANG=en_US.ISO8859-1
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
Obviously the en_US.ISO8859-1 is not compatible with UTF-8, so I had to change a consult with the FreeBSD handbook suggested a way to change the LANG and LC_COLLATE locale set variables by creating a ~/.login_conf inside the user home directory which default locale has to be set.
In my case I assumed that possible the improper LANG is set to the running Apache as Apache is run via the init script /usr/local/etc/rc.d/apache2 , therefore to work it around for apache either I had to add manually:
LANG=bg_BG.UTF-8
somewhere near the beginning of the Apache init script, or alternatively set a proper .login.conf inside the root user home dir, e.g. /root/.login.conf. An example file which sets the default locale for the root user on BSD to LANG=bg_BG.UTF-8 , is shown below:
pcfreak# cat /root/.login_conf
me:
:charset=UTF-8:
:lang=bg_BG.UTF-8:
To fix the default encoding to be set to bg_BG.UTF-8 in all shell user accounts existing on pc-freak, I used a small script which copies the /root/.login_conf to all /home directories and immediately after chowns the user to be owned by the respective user, here is bash one liner script used:
pcfreak# cd /home; for i in $(echo *); do cp -rpf /root/.login_conf $i/; chown $i:$i $i/.login_conf; done;
Now after relogging to all active shells the default LANG character setting and LC_COLLATE were changed and I could see this by issuing again the locale command:
pcfreak# locale
LANG=bg_BG.UTF-8
LC_CTYPE="bg_BG.UTF-8"
LC_COLLATE="bg_BG.UTF-8"
LC_TIME="bg_BG.UTF-8"
LC_NUMERIC="bg_BG.UTF-8"
LC_MONETARY="bg_BG.UTF-8"
LC_MESSAGES="bg_BG.UTF-8"
LC_ALL=
To make sure the apache is reading the new LANG locale settings, further on I forced apache restart:
pcfreak# /usr/local/etc/rc.d/apache2 restart
I opened a browser and sent one more mail typed in cyrillic with squirrelmail addressing my own email to test, if finally the mail char encoding issues are gone. But NOO!! still the same issue.
I was out of ideas as it seems there was no logical reason for the cyrillic letters to break when sent via squirrelmail.
And then the lightbulb was up with the idea to check the squirrelmail configuration encoding itself, thus I launched immediately the squirrel ./configure script and guess what, the encoding there was also imroperly SET to en_US.ISO8859-1!
pcfreak# cd /var/www/webmail; ./configureSquirrelMail Configuration : Read: config.php (1.4.0)
----------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
...
8. Plugins
9. Database
10. Languages
Command >> 10
SquirrelMail Configuration : Read: config.php (1.4.0)
----------------------------------------
Language preferences
1. Default Language : eu_US
2. Default Charset : en_US.ISO8859-1
3. Enable lossy encoding : false
Command >>
To change the encoding to properly play with Bulgarian, cyrillic in UTF-8 I choose:
Command >> 1
SquirrelMail attempts to set the language in many ways. If it
can not figure it out in another way, it will default to this
language. Please use the code for the desired language.
[en_US]: bg_BG
Command >> 2
SquirrelMail attempts to set the language in many ways. If it
can not figure it out in another way, it will default to this
language. Please use the code for the desired language.
[en_US.ISO8859-1]: bg_BG.UTF-8
Finally to save the new settings into squirrelmail configuration used the S cmd:
Command >> S
...
And Hallelujah! My Bulgarian letters started being properly encoded and sent in squirrelmail 😉 thx God
Tags: apache webserver, assumption, bg, charset, code, collate, config, configure, CTYPE, default locale, Desktop, desktop machine, download, exception, free time, freebsd handbook, freebsd ports, grep, home directory, init, installed version, ISO, lc, login, machine, mail, MONETARY, numeric, pcfreak, php, preg, root, script, Squirrel, thislanguage, time, time c, utf 8, webmail
Posted in Linux, Linux and FreeBSD Desktop, System Administration, Web and CMS | 1 Comment »