All this process of sharing sessions is a very very very very difficult one. So, let just start by writing this right after the database connection on the Main application db.py file:
#this is the database connection auth_db = DAL('sqlite://users.sqlite') #this is the line you should add: session.connect(request, response, tablename='sessions')
It will make the sessions to be recorded on a table on your database that the Other application will access. Now copy the line on the db.py file of the Other application with just a few changes:
auth_db = DAL('sqlite://users.sqlite', folder='/home/yourname/web2py/applications/main/databases/') session.connect(request, response, masterapp = 'main')
What masterapp says to you is "Wich application should I "steal" the sessions?". Then you say to it "Please, steal the Main application sessions and everything will be fine".
And the very very very very difficult process ends here. I hope I didn't make you suffer, but it's over now. Go home and relax.