Sometimes we get shocked when something unexpected occurs. We get stuck and feels like everything is over. Today I also had such a situation.

I was writing an important document over the last couple of days. I hadn’t kept a backup or draft, I had only single Open office text document file. While I was writing, my laptop got switch off suddenly due to some power button issue. When I powered it on and looked at the file, I got stuck. It shows 0 byte as size.
I ran file filename.odt, it shows empty data. OMG. It was around 12 Pages of text and WTH !

I lost my hope. But I decided to go for an experiment. Installed TestDisk, which the GNU/Linux recovery suite.
Ran the Photorec command. I selected the disk drive where the data is located, then chose scan unallocated space. I received 1000s of files of different format.

Ran,

 find . -type f -name "*.odt" | wc -l

gave me around 200 files.
I thought of greping the files to find the right file. But I understood that grep over binary files won’t work.
So I moved odt files to a directory.

mkdir odts
find . -type f -name "*.odt" -exec mv {} odts \;

Then I manually opened some of the files. Then I got earlier versions of the file which contains initial text only. So my breath became normal. I looked at the file size and noticed that it is of the size 27KB.
So again I filtered out files using size as a contraint.

mkdir filtered_odts
find . -type f -name "*.odt" -size +27k \
-exec mv {} filtered_odts \;

So I got a list of fewer number of files. I manually found out highest size which in the order of 27K, which was the file with all text I wrote. Voila, thanks to find and testdisk. :)

Being a python and? code enthusiast, The most exciting feature about Pardus project is about their designs. All the of the applications pardus teams has ever written are awesome with their beauty in their code design. When ever you look at any project’s code, they are very transparent, readable and highly modular designs.

I am hacking with YALI ( Yet Another Linux Installer) Project for developing a Live OS installer. I went through the basic code and came up with an over view of YALI architecture. Hope this would be helpful for future YALI contributors and developers also.

Working of Yali4:
Yali starts with xdm service, which runs start-yali4 shell script. It runs /usr/bin/yali4-bin using /usr/bin/xinit and runs in fullscreen mode without KDE WM environment.
It invokes the method yali4.default_runner() which is yali4.gui.runner.Runner()

Pardus has its own service scripting and management technology COMAR. xdm is a comar script to serve as service for loading X.

runner.py:
Runner class servers as the major class which runs the Yali. It imports the main widget from gui/YaliWindow.py (Widget class). Widget class is Setup_ui using Ui_YaliMain (main.ui)
Resolution and screen size is set to maximum by reading QApplication.desktop()

Yali has a configuration system to behave as per different install_type.


YALI_INSTALL,YALI_DVDINSTALL, YALI_FIRSTBOOT, YALI_OEMINSTALL, YALI_PLUGIN, YALI_PARTITIONER, YALI_RESCUE = range(7) is defined in gui/installdata.py

In Runner class, it checks which sets install_type variable according to the configuration.

gui/context.py defines many constants and context variables (yali4/constants.py) . yali4.sysutils.

checkYaliParams() is used to identify the install_type configuration,
which can be passed as argument to kernel parameter.

In Runner, it creates an installer object by passing install_type and install_option to yali4.installer.Yali(). install_option is identified by yali4.sysutils.checkYaliOptions()

installer.py:

Yali class in installer.py is the main class which handles the Yali screens. Yali4 operates with the concept of screens.? mainStack Widget in the main.ui is called screen.
We dynamically load and remove different screen widgets required for the instalallation wizard. The base fullscreen UI is setup by runner and the screen is loaded from installer.py
Yali class in installer.py defines screen list for each install_type defined. Eg: self._screens[YALI_DVDINSTALL]

All different screens as defined as seperate .py files with name prefixed with Scr in yali4/gui. Each of these screen py files consist of a QWidget class Widget.
Widget class gui/YaliWindow.py has createWidgets() method which loads the required screens for given install_type. stackMove() method is used to show each screen
at appropriate time according to user interaction.

Changes/Work for Live installer
Most of the components required for the live installer can be reuse of existing screens from Yali4 and APIs.

To make Yali work as window mode and change the window size to a required size, yali4/Ui/main.ui require some changes as well as runner.py require some changes to prevent it from
resizing to available full screen width and height.

We need to add a new a new install_type YALI_LIVEINSTALL in gui/installdata.py

Instead of yali4/gui/ScrInstall.py, which handles installation for real pardus install medias. we have to write a new screen, ScrLiveinstall.py which can handle
installation from Live media.

yali4/installer.py will require an entry for YALI_LIVEINSTALL,


self._screens[YALI_LIVEINSTALL] = [                                  # Numbers can be used with -s paramter
                                       yali4.gui.ScrKahyaCheck,          # 00
                                       yali4.gui.ScrWelcome,             # 01
                                       yali4.gui.ScrCheckCD,             # 02
                                       yali4.gui.ScrKeyboard,            # 03
                                       yali4.gui.ScrDateTime,            # 04
                                       yali4.gui.ScrUsers,               # 05
                                       yali4.gui.ScrAdmin,               # 06
                                       yali4.gui.ScrPartitionAuto,       # 07
                                       yali4.gui.ScrPartitionManual,     # 08
                                       yali4.gui.ScrBootloader,          # 09
                                       yali4.gui.ScrSummary,             # 10
                                       yali4.gui.ScrLiveinstall,         # 11
                                       yali4.gui.ScrGoodbye              # 12
                                      ]

Above changes are required to bring a minimal Live installer.

I have written a basic command line minimal Pardus Live installer,? http://web.sarathlakshman.info/gsoc/pardus/installer.py. Most of the required logic appears in its code.

It is very sad to announce SMSBuddy will be no more available. I went through the “Terms and Conditions” agreement of Way2SMS.com.

Please see the agreement: http://wwwg.way2sms.com/content/Terms%20&%20Conditions.html

The agreement states that users should not make derivative work based on this proprietary service. So I am sadfully saying good bye to SMSBuddy.

SMSBuddy came up as interesting project with lots of feedback in the recent days. It expected it to come up as yet another interesting open source projects.
Not only I coded for SMSBuddy, I also received contributions on code and UI.

Hiran has contributed on UI and Icon.

Anoop (gnuanu) has written a frontend in wxWidgets. He mainly wrote it for his colleagues to use on Windows boxes :P. He has sent me some screenshots of the UI he wrote, which works on Windows 7.
I am posting the screen shots here:

From life.blog
From life.blog
From life.blog
From life.blog

Again we have to make the same statement “Proprietary software sucks”
When we talk a lot about Free Software philosophy, people ask sometime questions that they haven’t encountered any problems with it. I am talking to those people. Hey guys, you have found this “SMSBuddy” interesting right ?. But are not able to use it and distribute. Why ? We are restricted with our freedom. It is restricted not with technology. But by license agreement. Which is the worst part of proprietary software. If they restrict us to provide another interface by intelligently blocking such applications which uses them as backend. It is truly a technological attempt. We have to respect their technology and we will have curiosity to know how it is done. But here, they are just putting restrictions on us for use of technology. We are restricted with our freedom.

Proprietary software puts locks on our creativity. It was a creative idea to write such an application. But we are not allowed. Freedom is valuable in the case of software too.

Free software gives us the following four freedoms:
* The freedom to run the program, for any purpose (freedom 0).
* The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this.
* The freedom to redistribute copies so you can help your neighbor (freedom 2).
* The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.

So use free software. Spread free software. Be muft and mukt with software.

Hey all.

smsbuddy icon Here comes the Free SMS sender application with Qt frontend, python and Wat2SMS.com web backend. This is based on my recent free sms commandline script.

Try this out and comment. Look at the screenshots.

From life.blog
From life.blog
From life.blog
From life.blog
From life.blog
From life.blog

Once you install the SMSbuddy, you can execute it using the command, ’smsbuddy’
During first run, it will ask for login username and password. You can issue you Way2SMS.com username and password. From the very next run, it will not prompt for authentication. Once if you need to change the account used by default, use File->Login to change the default account.
From File->Contacts option, you can add contacts of your friends with name and mobile number.
Once the SMSbuddy is started, it initiates login. You can see status message in the status bar. You can select the contacts you added using contacts dialog and send SMS.

Download it from here code removed

I wrote this being lazy at home today and having Hartal celebration :P So don’t expect any code quality.

Have fun :)

Looking forward to your comments.

UPDATE1:
SMSBuddy got a new icon. Thanks to Hiran for the icon. Please note that I have updated the download url. Please the URL above. Now the icon appears in Applications -> Accessories menu and in the desktop. Have fun.


UPDATE2:
I went through the “Terms and conditions” of way2sms.com.It says users are not possible to make derivative works or decompile based on this sms service. So it violates the license agreement and hence I will not be possible to continue with SMSBuddy. Hence I am removing the code and will not be distributing it anymore.

« Previous PageNext Page »