Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Ralph Corderoy
Hi Dan, > The first X session being :0.0, (you can specify a hostname before the > colon) the second will be :1.0, will it not? No, not necessarily. When you start the X server you can tell it what display number this particular X server has by specifying it as a parameter. X :1 The "swit

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Terry Coles
On Friday 07 Jan 2011, Ralph Corderoy wrote: > I think you're approaching it the wrong way around. When the X server > starts it runs a command and when that command finishes the X server > stops. The command normally starts a window or session manager which in > turn start up panels, initial app

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Ralph Corderoy
Hi Terry, > This is going to run on our TC live disc with the command to start it > being in /opt/bootlocal.sh. There will only be one user when it is > run and I know that X & the desktop are running when it gets to this > part of the script. I suppose it could conceivably happen the other > w

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Victor Churchill
It's been a long time since I did it but I seem to recall you can set up a .xinitrc file in the user's home directory to control things you want to start when the X session starts. That way you know that X will be running, and you don't need to know which $DISPLAY you are running. -- best regards

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Dan Dart
The first X session being :0.0, (you can specify a hostname before the colon) the second will be :1.0, will it not? I'm not sure about the .0, as you can also refer to it with just :0, :1, etc., and they get mapped on the local machine like :0 -> ctrl+alt+f7, :1 -> ctrl+alt+f8, etc., unless they're

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Terry Coles
On Friday 07 Jan 2011, Ralph Corderoy wrote: > John Carlyle-Clarke wrote: > > Of course, if you have more than one X session running, or if you are > > running X remotely, then things may go a bit wonky since DISPLAY will > > need to be something else! > > One way for this to happen is to "switch

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Ralph Corderoy
Hi Terry, John Carlyle-Clarke wrote: > Of course, if you have more than one X session running, or if you are > running X remotely, then things may go a bit wonky since DISPLAY will > need to be something else! One way for this to happen is to "switch user" so that other user logs in on their own

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Terry Coles
On Friday 07 Jan 2011, John Carlyle-Clarke wrote: > On 07/01/11 15:19, Terry Coles wrote: > > I assume that I was right about the reason it wouldn't work in a script, > > eg I'm not attached to the display in the X environment at the time? > > That's pretty much it. Processes generally inherit an

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread John Carlyle-Clarke
On 07/01/11 15:19, Terry Coles wrote: On Friday 07 Jan 2011, John Carlyle-Clarke wrote: DISPLAY=:0.0 chromium-browser Thanks. That works fine. I assume that I was right about the reason it wouldn't work in a script, eg I'm not attached to the display in the X environment at the time? Tha

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread Terry Coles
On Friday 07 Jan 2011, John Carlyle-Clarke wrote: > DISPLAY=:0.0 chromium-browser Thanks. That works fine. I assume that I was right about the reason it wouldn't work in a script, eg I'm not attached to the display in the X environment at the time? -- Terry Coles

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread John Carlyle-Clarke
On 07/01/11 15:04, John Carlyle-Clarke wrote: On 07/01/11 15:02, Terry Coles wrote: Hi, Is there a reason why the Chromium Browser launches fine when I type chromium-browser in a shell, but doesn't when I put the same command into a script to run at boot time? Try:- TERMINAL=:0.0 chromiu

Re: [Dorset] Launching a graphical App from within a script

2011-01-07 Thread John Carlyle-Clarke
On 07/01/11 15:02, Terry Coles wrote: Hi, Is there a reason why the Chromium Browser launches fine when I type chromium-browser in a shell, but doesn't when I put the same command into a script to run at boot time? According to the error message, it can't find the display mode, so I'm

[Dorset] Launching a graphical App from within a script

2011-01-07 Thread Terry Coles
Hi, Is there a reason why the Chromium Browser launches fine when I type chromium-browser in a shell, but doesn't when I put the same command into a script to run at boot time? According to the error message, it can't find the display mode, so I'm guessing that it works because I'm no