[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 00922] Re: Problems embedding apps in presentations



Here is another solution to starting mgp without a window manager: I use a script named "xmgp" which starts X and then fires up the presentation on that display:

   #!/bin/bash
   #
   # xmgp :: start mgp on its own display
   #
      DISPLAY=":1" export DISPLAY
   X $DISPLAY 2>/dev/null &
   sleep 2	# give X a head-start
   mgp $*
   killall X		# terminate X when mgp exits
You use this script as you would mgp, that is, give the mgp options on the command line. Since this starts X display 1, it is compatible with the normal, runlevel 5 X server, which runs as display 0. In other words, you can login graphically, type "xmgp -t 100 mypresentation.mgp" and your presentation will start up full-screen. (Of course, you can also login non-graphically and start a presentation this way, too). When you exit from your mgp session you will generally be returned to the screen from which you started it.

One nice thing about this approach is that you at any time switch between your regular X session (which typically runs on virtual terminal 7, press Ctrl+Alt+F7 to access) and your mgp session (which typically runs on vt 8, press Ctrl+Alt+F8 to access). I use this to teach Unix courses at a college and like to be able to skip over to a full KDE or Gnome environment to give demos.

(This works under the default setup of RedHat and SuSE. On other distros or customized setups your mileage may vary; for example, at home I have four graphical logins on vt7-10 so that family members can login without logging me out ;-) so I have to use 'DISPLAY=":4" ' in the script at home).

--
Chris Tyler
Seneca@York

===============================================================================

On 2002.06.06 05:25 Grunde L|voll wrote:
Thanks!
It works! now there is no need to fall back the dark side (Windows and
Powerpoint)...

Still I wonder why this don't work with my windowmanager? And the
solution
to run mgp without a wm is not that convinent. Is there any plans to fix
this problem?

Best
Grunde

On Wed, 5 Jun 2002, Hans Fangohr wrote:

> On Tue, 4 Jun 2002, Grunde L|voll wrote:
>
> > Thanks,
> > but then the stupid question how do I start X widthout a
window-manager?
>
> Okay: you start without X (runlevel 3 in SuSE and Redhat).
>
> You start X with this command
>
> startx ~/.xinitrc_no_wm
>
> In your home directory you put the file .xinitrc_no_wm, which can look
> like the file below:
>  (I don't understand every line in this file, and most lines might not
be
> necessary, but it works for me. Try it - I am very short of time at the
> moment, maybe you can do without more explanaition. If not, come back
to
> me/ or the mailing list.
>
> Good luck,
>
> Hans
> )
> ------------------------------------------------
>
>
> #!/bin/bash
> #
> # .xinitrc
> #
>
> #
> # What we do if we fail at least ... emergency fall back.
> #
> failsafe="xterm -ls -T Failsave -geometry 80x24-0-0"
> trap "exec $failsafe" EXIT SIGHUP SIGINT SIGPIPE SIGTERM SIGIO
>
> #
> # Some bash (1 and 2) settings to avoid trouble on a
> # failed program call.
> #
> test -n "$BASH" && set +o posix
> no_exit_on_failed_exec=1
> type shopt > /dev/null 2>&1 && shopt -s execfail
>
> #
> # This should be the default
> #
> export TERM=xterm
>
>
> # here you cd into the directory with your talk
> cd /home/fangohr/work/talks/2001_Oslo
> # and here you call it
> mgp computer_simulations_of_vortex_state.mgp -F 1 -t 45 &
>
> xterm -ls -T Failsave -geometry 80x24-0-0
>
> # call failsafe
> exit 0
>
>