June 13th, 2007 by
Leonid Mamchenkov
Transparent background in Midnight Commander has been around for some time, but far too less people realize and use it. If you are one of those guys who just have to have everything transparent, then here is the quick fix for you.
Add these two lines to the end of your ~/.mc/ini file:
[Colors]
base_color=normal=,default:selected=,:marked=,default:markselect=,:menu=,:menuhot=,:menusel=,:menuhotsel=,:dnormal=,:dfocus=,:dhotnormal=,:dhotfocus=,:input=,:reverse=,:executable=,default:directory=,default:link=,default:device=,default:special=,:core=,:helpnormal=,:helplink=,:helpslink=,:
Now restart Midnight Commander, and you should be fine.
An extra tip for KDE users - edit your konsole settings and choose “Transparent for MC” schema.
That’s about it.
Posted in Technology, Linux, OS, Programming, Shell |
No Comments »
March 6th, 2007 by
Leonid Mamchenkov
Today I needed a script that would backup selected directories on a filesystem (Linux box) and upload them to an FTP server. It seemed like something I did several times and could easily visualize, but I didn’t have a handy solution.
A quick Google search helped me to locate an excellent backup script that did almost everything that I needed. It does both filesystems and MySQL databases out of the box, weekly full and daily incremental backups, uploads backup files to FTP, and emails sysadmin if backup failed. And it’s only a few shell lines long.
As I said, it did almost everything. I still had to customize a few things.
First of all, I removed MySQL dumps, since I didn’t need them for that specific host. Although it might come in handy next time. Secondly, I changed it to always send email to administrator, not only when the job failed. That’s just my personal preference. Thirdly, I changed it to use FTP over SSL, rather than open FTP protocol.
That last thing took me some time to do right. By default, the script is using NcFTP. But NcFTP, it turns out, does not support secure FTP transfers. I needed something else. Comparison of FTP clients Wikipedia page came in handy. I tried using cURL, which kept complaining about malformed URL. So, I tried yet another one - lftp - and it all worked out.
Now, with this knowledge it’ll take you only a couple of minutes to modify the original script to do a better job.
Posted in Technology, Linux, Network, FTP, OS, Security, Programming, Databases, MySQL, Shell, Backup |
No Comments »