Free Windows Wallpaper

we give information and picture wallpaper : Windows XP, Nice Wallpaper XP, Windows 3D, Windows 7, Windows Desktop, Windows Natural XP and more

linux

By Djenar Siti

linux

By Djenar Siti

iPhone PDF/CHM/DOC/XLS viewer with Safari and Lighttpd

By Djenar Siti



Hi guys,

tonight we finally have a great geeky post!



Once upon a time on my iPhone I had a wonderful package found via Installer that provided a cool directory listing for lighttpd on the iPhone in order to be able to browse some files and use Safari native capabilities to open them.



Unfortunately this package is no more in Cydia and Installer repositories (or I hadn't found it).

So tonight surfed the internet looking for it and I found this page with some information about it and (most important) the php script package.

After some experiments mixing the info with this other tutorial I found the way to get it working on my 1G iPhone with Firmware version 2.1



Here you are the installation in ten steps.





1. Get all the files you need



Download this .zip file containing the php script for cool directory listing on lighttpd





2. Install the packages you need



Install via Cydia these packages:

  • lighttpd
  • PHP




3. Connect to your iPhone via ssh (as root)



$ ssh root@[iphone IP address]

obtaining

[iphone host name]:~ root#

in my case

$ ssh root@192.168.1.xxx

Bilbo:~ root#





4. Create log folder for lighttpd and chown it properly



Bilbo:~ root# mkdir /var/log/lighttpd

Bilbo:~ root# chown nobody:nobody /var/log/lighttpd





5. Create a startup .plist file for lighttpd



Bilbo:~ root# nano /Library/LaunchDaemons/com.http.lighttpd.plist





You can simply use a file manager that supports ssh like Dolphin and Konqueror in KDE4 or simply Konqueror in KDE3. To use the graphical file manager with ssh you should use the fish:// protocol writing this in the address bar:

fish://root@[iphone-IP-address]

for me

fish://root@192.168.1.xxx





6. Create lighttpd config file



Bilbo:~ root# nano /usr/etc/lighttpd.conf



Copy this content in it







As you could notice this file differs from the one contained in the script package.

The first difference is that I chose to use as my data folder /private/var/mobile/Sites instead of /private/var/root/Sites



The other more important difference is the location of the php-cgi binary file, that is placed in /usr/bin in my installation insted of the old /opt/iPhone/bin



After having set the lighttpd.conf file you can check its syntax with this command from the terminal:

Bilbo:~ root# lighttpd -t -f /usr/etc/lighttpd.conf





7. Test your lighttpd and PHP config



Now you can create a file named test.php in /private/var/mobile/Sites to test lighttpd and PHP configuration:

Bilbo:~ root# nano /private/var/mobile/Sites/test.php

Copy this code in it to test PHP support:





Start the webserver manually with this command:

Bilbo:~ root# lighttpd -D -f /usr/etc/lighttpd.conf

Now you can open Safari and point to http://localhost/test.php to view the file.

If you can see the notice in green everything was good.

After the test you can simply stop lighttpd with a CTRL-C stroke in the terminal.





8. Copy the directory listing script folder and rename it



I made this step with Dolphin as I described before, checking later the permissions and the folder owner and group with the terminal. If you can't do the copy with a filemanager you can use scp or sftp from the command line.



After the copy or the dirlist folder into /private/var/mobile/Sites rename it like this

Bilbo:~ root# mv dirlist .dirlist





9. Copy your files on the iPhone



Now it's time to put your favourite file in /private/var/mobile/Sites to take advantage of the powerful capabilites of Safari to open natively those file thank to the proper bindings to the iPhone OS applications and libraries.





10. Enjoy



Now you have your web server ready to go. You have your files in the right place... the last thing to to is to start the system to begin to play!

Bilbo:~ root# launchctl load -w /Library/LaunchDaemons/com.http.lighttpd.plist

This should start the server properly as a daemon.

If you experience problem at this step don't worry you can use also there commands to stop everything before another attempt:

Bilbo:~ root# launchctl unload -w /Library/LaunchDaemons/com.http.lighttpd.plist

and

Bilbo:~ root# killall lighttpd



However the best thing to do now is to reboot to let the server start at boot itself (that is definitely the "right" way to start it).



Once you will have your server up and running you can easily point Safari to http://localhost to view your folder and to be able to open your files







I really hope my effort in making this guide will be useful not only for me as a reference but to some of you too!



Let's see...



As for now, that's all folks!



Keep on hackin'



Andy



How to remove manually-installed plasma widgets

By Djenar Siti

Since it was hard form me to find this on the net, I thought that was worth to spread the knowledge.

I did only the 50% I missed the .desktop file in ~/.kde4/share/kde4/services/

To remove non working widgets in the widget list, remove the related desktop files in:

~/.kde4/share/kde4/services/ (Desktop File)
~/.kde4/share/apps/plasma/plasmoids/ (Widget Package)

Freefem++ available on Archlinux AUR

By Djenar Siti

Hi,
in the last days I adopted my first package on Archlinux User Repository .
It is Freefem++ that I need working on my distribution becuase of an university exam.
So, now, with the nickname of dedalus I will try to matain that package, and in the next weeks I hope to publish also an XFoil PKGBUILD.

In the meantime you can check out the web page of the package, and download the archive in order to compile and install the program simply by unpacking the .tar.gz and feeding makepkg with the PKGBUILD in it.

Enjoy Archlinux and the amazing AUR! ;-)
bYe,
Andy

MATLAB Warning: Initializing Handle Graphics failed in matlabrc.

By Djenar Siti

Hello Folks!
I'm finally here again though my spare time is almost nonexistent, to post a solution about a "MATLABonLinux" issue.

Yesterday after the month-long reorganization of my disks and data on my Desktop PC with the reinstallation of ArchLinux as OS... and in the same time after the failure of my old Laptop with the migration to another old laptop of all data and the installation from scratch of ArchLinux also there...
I installed MATLAB R2007a on ArchLinux under a 2.6.25 kernel, with JRE 1.6.0_05-b13 and Xorg 1.4.0.90

After a clean installation and a clean setup with the install_matlab script you have to run after the graphic install... I opened the program to see this message as output of the initialization process as it was just before the prompt:

Warning: Initializing Handle Graphics failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:badsubscript
Attempted to access monitors(1,:); index out of bounds because size(monitors)=[0,4].

In matlabrc at 108


I began to search the Internet about this problem, but I found only references to a locale or pathdef problem I hadn't.

I tried to understand who called who in the initialization and going to matlabrc.m line 108 I found the call to another configuration/initialization script: hgrc.m
(All these configuration files are locate in your $MATLAB/toolbox/local/ directory where $MATLAB is your MATLAB installation path).

In hgrc.m I found the call to "get" to assign the matrix monitors who creates the issued that brought to the error.

In the MathWorks techincal documentation site you can find all the "Handle Graphics Object Properties" at this page
If you easily click on the root category of the properties in the list on the left you will find the very "MonitorPosition" property whose call led to an initialization error.

Actually the "get" call in hgrc.m assign to monitors the result of the MonitorPosition parameters that the MATLAB system recognized.

Probably due to a Java vs X incompatibility (I can't install FemLab because of a Java - X version to version issue) the get function returns and empty matrix for the call about MonitorDefinition

The solution is quite brutal. I read what data should output the get(0,'MonitorPosition') call, and I assigned them directly to the monitor variable modifying the hgrc.m script.

As you can find in the previous linked documentation page:

MonitorPosition

[x y width height;x y width height]

Width and height of primary and secondary monitors, in pixels. This property contains the width and height of each monitor connnected to your computer. The x and y values for the primary monitor are 0, 0 and the width and height of the monitor are specified in pixels.

The secondary monitor position is specified as

x = primary monitor width + 1
y = primary monitor height + 1

Querying the value of the figure MonitorPosition on a multiheaded system returns the position for each monitor on a separate line.

v = get(0,'MonitorPosition')
v =
x y width height % Primary monitor
x y width height % Secondary monitor

Note that MATLAB sets the value of the ScreenSize property to the combined size of the monitors



The monitors array for a 1024x768 monitor as mine should be:

monitors = [0,0,1024,768;1025,769,1024,768];


and for a 1280x1024 monitor as my desktop:

monitors = [0,0,1280,1024;1281,1025,1280,1024];



So in the end I commented this line in hgrc.m:

monitors = get(0, 'MonitorPosition');


inserting a '%' character before the line... and I added the manual assign of the correct matrix to the monitors variable:

monitors = [0,0,1024,768;1025,769,1024,768];


After this workaround my MATLAB starts without any problem and displays every figure correctly.

That's all folks.. I hope this solution is useful for someone...

Keep On Hacking!
bYe,
Andy