Use the same save file on more than one computer at a time

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Use the same save file on more than one computer at a time

#1 Post by disciple »

I haven't tested this heavily - I'm just playing with it at the moment.


Why?
You might want to do this because you don't want a multiuser environment, and you want the same settings and everything on all your (networked) computers. Or because you have some old slow computers and one fast server that you want to run all your programs on. Or because you have computers without hard drives that you want to use. Or because you get kicked off the main computer when someone else wants to use it. Or because you get banned from using the computer so you want to connect to the main computer secretly from a computer in your room that you don't normally use :) ...


Definitions
server= the machine the save file is on, and that you want all the programs to run on
client= the other machine(s). (I guess this is also a "server" in the sense that it is providing a display for the first machine to connect to :))


Getting started
1. Run Puppy or anything else with an X server on the client. With recent versions of Puppy you need to edit /usr/X11R7/bin to remove `-nolisten tcp` from the command that starts Xorg (it's on line 425 in Puppy 4.1.1), and you'll need to restart X after doing this. I guess this might indicate that the server actually needs Xorg, not just any X server :(
2. Find out the ip address of the server (e.g. by running ifconfig I can see mine is 192.168.2.35)
3. Find out the ip address of the client (mine is 192.168.2.33)
4. Run xhost on the client to give the server permission to send X (graphical) programs there

Code: Select all

xhost +192.168.2.35
If you restart X on the "client" you'll need to run this again
5. Open a terminal (e.g. rxvt) on the server and make all subsequent programs run from that terminal open on the client machine

Code: Select all

export DISPLAY=192.168.2.33:0
6. In the same terminal run
rxvt
It should open on the client's display, as should anything you run from it.


Moving On
I think you could start X on the client machine without a window manager (e.g. with a muppywm type script instead

Code: Select all

#!/bin/ash
$1 &
while [ 1 ]
do
sleep 10000
done
Then you could write a start script on the server that runs the export command and then starts jwm, which would show up on the client. Does this work, or can you only have one instance of jwm?
What about rox, can you run the rox pinboard on more than one display?

You'll need to sort out your window manager/panel configuration so that someone on the client doesn't accidentally shut down the server! You might also want to think about the best way to shut down the client.

There are ways to send audio to another computer too, but I haven't looked carefully into them yet. I think it will require installing extra software like portaudio


Possible weaknesses:
- if you have programs that only allow one instance they won't be able to be run by people on more than one of your computers at a time - do we have any programs like that in Puppy?
- what happens if your server dies?
- someone might shut down the server when you are secretly connected to it!
- if your clients are powerful computers you will be wasting all that power!
- your server has to do all the work for the clients.
- your network might get busy... I think it is transferring information continuously between the two machines, even if they are sitting there not doing anything. On a related note, I wonder if I can get blinky to just show me the information communicated with the internet, ignoring local network traffic...
- there may be a few annoying things that you would have to sort out - e.g. by default in Puppy if you click on a text file it opens in geany, and if you click on another one it opens in the same geany window. So if Geany is already open on one display any text files clicked on in another display will open there too. You would have to change the file associations to prevent this - but I always found that annoying anyway though, because the same thing applied when I clicked on a text file and Geany was open in another virtual desktop :)
- the connection is initiated from the server. I wonder if there is an easy way around this without using ssh or something else that makes this a crazy circular process?
- CDs/DVDs/removable media (think about it :) )
Last edited by disciple on Sat 19 Sep 2009, 04:11, edited 2 times in total.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

jduffy22335
Posts: 35
Joined: Thu 16 Apr 2009, 23:29
Location: Great Mills, MD USA

Re: Use the same save file on more than one computer at a time

#2 Post by jduffy22335 »

disciple wrote:I haven't tested this heavily - I'm just playing with it at the moment.

Definitions
server= the machine the save file is on, and that you want all the programs to run on
client= the other machine(s). (I guess this is also a "server" in the sense that it is providing a display for the first machine to connect to :))
[/code]
Sound a lot like a puppy "thin client" along the lines of an antique *nix communications terminal server, OR a Puppy answer to "Cloud Computing" :!:

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

Kind of, although the fact that computers are sharing the same profile makes it quite different from a normal thin client setup.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

Just discovered this about the "client":
With recent versions of Puppy you need to edit /usr/X11R7/bin to remove `-nolisten tcp` from the command that starts Xorg (it's on line 425 in Puppy 4.1.1), and you'll need to restart X after doing this.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post by disciple »

OK, just noticed another difficulty - if you start rox it will open thinking it is on the client, not the server.
I wonder how that works?
I wonder how it is that I can run rox on Colinux successfully?....
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Post Reply