Archive for July, 2008

Wordpress 2.6 0

Finished upgrading the blog to version 2.6, its surely worth it! here’s a short video of what is really cool about it.

synergy - multiple screens multiple OS 1

Multiple Desktops & Multiple OS

At work I have a linux based dev server and a macbook pro running leopard. I decided to have it working together has one extended screen as some of my colleagues are already using. Talking to James about it, i managed to get it together. For anyone interested in setting up the same can following the following instructions.

So synergy has a client server like approach, I run synergy server on my laptop but you make either of your machines run a server, I dont see how it will be any different.

Installing on mac/linux:

Following the link:

http://sourceforge.net/project/showfiles.php?group_id=59275&release_id=406637

and install the softwares on the respective OS’s

Now come the interesting bit, setting up the linux client so that it starts the synergy client everytime i t boots up. Here’s a bit of bash commands:

/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc --restart my-fancy.host.name

and save this in the file /etc/gdm/Init/Default (I am running Redhat Enterprise Linux) so you will need to find the equivalent file in your distro, basically this should be anywheere it gets executed before your GDM process starts.

Back on the mac, create a shell file which contains the following code:

exec /Applications/synergy-1.3.1/synergys --restart -f -c /Applications/synergy-1.3.1/synergy.conf &

and save the file anywhere in your system path, obviously you will need to update that the actual paths on your installation.

Now creating the conf file which defines which screen is where, here’s a copy of my conf file and its easy to understand.

section: screens
        linux-hostname:
	mac-hostname:
end
 
section: links
	linux-hostname:
		right = mac-hostname
	mac-hostname:
		left = linux-hostname
end

its quite a simple config file, the first part (screens) defines the names of the of hosts involved and the second section defines the screens and their relative informations, i suppose you can add more than two hosts as fitting your need.

Some interesting links are for further reading/tweaking are as follows:

word soup 0

symfony init-batch 4

while building a newsletter app in symfony I had to write a batch process, unfortunately there isnt enough documentation for doing that on the symfony website. However I would just get the following error:

1
2
3
unagi:htdocs rajatpandit$ symfony init-batch backend prod mailer
  [Exception]
  The specified batch "backend" does not exist.

Digging in the code, I figured out that the correct syntax is:

1
2
3
unagi:htdocs rajatpandit$ symfony init-batch default mailer backend
>> file+     /Users/rajatpandit/websites/edu/htdocs/batch/mailer.php
>> tokens    /Users/rajatpandit/websites/edu/htdocs/batch/mailer.php

where:

  • default: Default skeleton for the batch script
  • mailer: Name of the batch script that you want to create
  • frontend: Name of the application under which you want to create the batch file.

The newly created batch script is created under the folder /batch folder