March 14th, 2012 | Category: jEdit, tech, ubuntu | I normally edit PHP in jEdit but it does not support PHP debugging. Netbeans is an open-source free editor that can be configured with a PHP module that does support debugging, which turns out works pretty well (as of this writing I am using Netbeans 7.1). Xdebug is the PHP extension I am using. In Ubuntu you can install it with:
sudo apt-get install php5-xdebug
sudo /etc/init.d/apache2 force-reload
Of course you install it either on your local machine for local debugging, or on the remote server you want to debug. I won’t go into detail about the increased load on your server or security risks, those are for you to research and make informed decisions. Here’s more information about configuring Netbeans to use Xdebug. If you are trying to debug a remote server, make sure to read this. Basically your php.ini has to have the following:
[xdebug]
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=LOCAL_MACHINE_IP
xdebug.remote_port=9000
Replace LOCAL_MACHINE_IP with your ip address. Xdebug is set up to only allow one IP to use the debugging feature. My setup is such that I have a fixed IP to use. I’m sure you could use DynDNS or some other such service if you do not have a fixed IP.
My breakthrough in getting this to work was understanding the debugging dynamics. It is easy to debug a simple page, but what if you need to debug a form submission? You can’t just go to the submission page and hit debug, because you’ll be missing the GET or POST variables you need to make it work. To make this work a bit more easily, download and install Easy-Xdebug, a Firefox extension.
Now go to Netbeans, and “Tools->Options->PHP”. Go to the debugging tab and make sure you select “stop at first line”. Now, right-click on your project in the Project window (usually on the upper left in Netbeans). You are looking for the project properties. When this window opens, go to “Run Configuration->Advanced”. Select “Do Not Open Web Browser”. This was the only way I could stop Netbeans from debugging the file (without GET or POST vars) instead of just listening for a debug connection. I’m assuming you’ve set up everything else under project properties to enable the debugger to connect to the server (correct paths, etc). Save preferences, and hit the debug button. It doesn’t really matter what file you have open, you are just putting Netbeans into “listening mode”. Now go to Firefox, load the form and fill it out, but before submitting click on Easy-Xdebug’s small icon in the lower right corner of the page. If you don’t see it go to “Views->Toolbars” and make sure “Add-Ons Bar” is selected. Now hit submit. If you’ve done it correctly, the browser will just hang there as if waiting for the server. Now go to Netbeans and the submission page should be open and in debug mode with all the required GET or POST parameters. Credit to this post for helping me make this work.
December 15th, 2011 | Category: ubuntu | A new stripped down recovery string, just the basics:
sudo apt-get install ne ssh sshfs smbfs filezilla openbox obmenu obconf tint2 wmii nitrogen agave ubuntu-restricted-extras jedit exuberant-ctags gnome-schedule nautilus-open-terminal nautilus-script-manager grsync preload network-manager-pptp network-manager-openvpn
The older string:
sudo apt-get install ne ssh sshfs smbfs filezilla php5-cli php-net-socket php5-imap phpmyadmin paman paprefs pavucontrol mysql-server-5.1 mysql-client-5.1 ubuntu-restricted-extras jedit exuberant-ctags gnome-schedule tangerine-icon-theme human-theme nautilus-open-terminal nautilus-script-manager easystroke grsync gnome-alsamixer preload gimp python-gtk2 python-gtk2-doc python-gtk2-tutorial python-setuptools devhelp glade winpdb network-manager-pptp network-manager-openvpn compizconfig-settings-manager && sudo add-apt-repository ppa:chromium-daily/ppa && sudo apt-get update && sudo apt-get install chromium chromium-browser && sudo pear install Net_POP3 Auth_SASL && chmod go-w ~/ && chmod 700 ~/.ssh & chmod 600 ~/.ssh/authorized_keys
May 6th, 2011 | Category: books, ubuntu | I was able get this working on Ubuntu Maverick 10.10, thanks to the links below. Here is the skinny. Run this on the command line:
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.3
when done, download this file (http://d1xhj100piaj9u.cloudfront.net/25338/KindleForPC-installer.exe). When doing so, it should give you the option of having Wine open it. If not, make it executable and run it from the command line.
wget http://d1xhj100piaj9u.cloudfront.net/25338/KindleForPC-installer.exe
chmod +x KindleForPC-installer.exe
./KindleForPC-installer.exe
This worked for me without setting Wine to run this app as windows 98 as well. Seems wine1.3 could make it work, while the default wine1.2 did not, at least for me. Kept getting the “fixme:system:SetProcessDPIAware stub!” error. Thanks to the following:
link one – http://ubuntuforums.org/archive/index.php/t-1690235.html
link two – http://harikrish.wordpress.com/2011/04/17/installing-kindle-for-pc-on-ubuntu-10-10-maverick-meerkat/
link three – http://www.winehq.org/download/ubuntu
January 29th, 2011 | Category: offtopic | Some moron hacked the site, spraying “buy cialis” links everywhere. I fixed about twenty of them, but there are plenty more. Sorry about that.
Dude, I get like three page views a year. But I’m sure your 8 hours of effort was worth it.
November 21st, 2010 | Category: ubuntu, video | If you have a webcam and want to capture basic video with sound, first check here and then try cheese, a simple app that seems to work pretty well.
But if you want to capture video from the command line, I did the following. It may help to enable the medibuntu repositories first!.
sudo apt-get install mencoder
First, you need to know your devices. One way to do this is to run these commands before, and then after you plug in your webcam:
ls /dev/video*
ls /dev/audio*
Then you can use this command (note these are for my devices, video1 and audio1, and the output file is webcam.avi):
mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video1:forceaudio:adevice=/dev/audio1 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
October 16th, 2010 | Category: musings | Not that it matters all that much, but I’ve finally figured out you’ve got to install a good set of spam filtering plugins for comments to be anything but garbage. I’ve enabled them, and comments have been open for several weeks, with no spam yet. Knock on wood of course. I’ve also turned off a caching plugin, which means comments should appear when entered.
September 19th, 2010 | Category: ubuntu | From this post, instructions on how to hook up the ppa for pulseaudio-equalizer, a system-wide audio equalizer. I was looking for something like this, and it works pretty well. The only shortcomings I can see is that you are required to hit “apply” after changing the settings. No real time feedback to what you are doing. But all in all, great work.
 pulseaudio-equalizer...sweet.
August 16th, 2010 | Category: ubuntu | pymazon totally rocks for ubuntu 10.04 x64. I’m just sayin’.
This post I wrote on fixing amazon mp3 downloader for Ubuntu Jaunty doesn’t work for Lucid. I’m sure there’s some hack or other if you aren’t lazy like I am. If you are, pymazon is a pretty amazing little replacement!
http://code.google.com/p/pymazon/
or to save you some time:
sudo apt-get install python-setuptools
sudo easy_install pymazon
 I know I w00ted.
July 15th, 2010 | Category: tech, ubuntu | Comments are closed From a smart user over at google-labs-picasa group, a fix for uploading photos in Picasa from 10.04. This broke sometime earlier (9.10?) and I’ve used this fix since.
To locate where your defaults.ini file is run this command:
sudo updatedb && locate defaults.ini | grep picasa
Create a backup of the defaults.ini file:
sudo cp /opt/google/picasa/3.0/wine/drive_c/Program\ Files/Google/
Picasa3/runtime/defaults.ini /opt/google/picasa/3.0/wine/drive_c/
Program\ Files/Google/Picasa3/runtime/defaults.ini.bak
Then edit the defaults.ini file with your editor of choice:
sudo vim /opt/google/picasa/3.0/wine/drive_c/Program\ Files/Google/
Picasa3/runtime/defaults.ini
replace the line -
printerURL=https://uploader.picasa.com/providers/wine/printers.php?
picasaversion=30
with this line -
printerURL=https://client4.google.com/providers/printers.html
Original link here.
June 14th, 2010 | Category: ubuntu | Comments are closed Hitting Control-L when in Nautilus (the Ubuntu default file manager) will change your location buttons into a string field so you can enter the text manually to jump to a location. This used to be available in earlier versions of Ubuntu, but at some point went away. I never realized you could still access it this way! Good deal. Gives you a lot more flexibility and speed sometimes.
|
"When the capital development of a country becomes a by-product of the activities of a casino, the job is likely to be ill-done."
-- John Maynard Keynes
|