[X2Go-Dev] [PATCH] allow user to set his preferred applications in ~/.x2go/applications
Mike Gabriel
mike.gabriel at das-netzwerkteam.de
Mon Dec 3 04:43:03 CET 2012
Hi Reinhard,
NICE!!!
Please commit to master and cherry-pick to release/3.1.1.x branch.
Please also add a /debian/changelog entry for 3.1.1.10 in both branches.
Thanks+Greets,
Mike
On Sa 01 Dez 2012 15:31:45 CET Reinhard Tartler wrote:
> This file is sourced by the shell. Applications can be specified
> e.g. like this:
> WWWBROWSER=/usr/bin/google-chrome
> MAILCLIENT=/local/thunderbird/bin/thunderbird
>
> If the application does not exist, or is not specified, the hard coded
> list will be consulted
> ---
> x2goserver/bin/x2goruncommand | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
> index b88c3b9..7d826b5 100755
> --- a/x2goserver/bin/x2goruncommand
> +++ b/x2goserver/bin/x2goruncommand
> @@ -31,6 +31,10 @@ X2GO_LIB_PATH=`echo -n \$(x2gobasepath)/lib/x2go`
>
> $X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with
> options: $@"
>
> +if [ $HOME/.x2go/applications ]; then
> + . $HOME/.x2go/applications
> +fi
> +
> export DISPLAY
> export X2GO_AGENT_PID
> export X2GO_SESSION
> @@ -131,7 +135,9 @@ elif [ "$cmd" == "TRINITY" ]; then
> fi
>
> if [ "$cmd" == "WWWBROWSER" ]; then
> - if [ -e "/usr/bin/firefox" ]; then
> + if [ -n "$WWWBROWSER" ] && [ -e "$WWWBROWSER" ]; then
> + cmd="$WWWBROWSER"
> + elif [ -e "/usr/bin/firefox" ]; then
> cmd="/usr/bin/firefox"
> elif [ -e "/usr/bin/iceweasel" ]; then
> cmd="/usr/bin/iceweasel"
> @@ -147,7 +153,9 @@ if [ "$cmd" == "WWWBROWSER" ]; then
> fi
>
> if [ "$cmd" == "MAILCLIENT" ]; then
> - if [ -e "/usr/bin/thunderbird" ]; then
> + if [ -n "$MAILCLIENT" ] && [ -e "$MAILCLIENT" ]; then
> + cmd="$MAILCLIENT"
> + elif [ -e "/usr/bin/thunderbird" ]; then
> cmd="/usr/bin/thunderbird"
> elif [ -e "/usr/bin/icedove" ]; then
> cmd="/usr/bin/icedove"
> @@ -159,7 +167,9 @@ if [ "$cmd" == "MAILCLIENT" ]; then
> fi
>
> if [ "$cmd" == "OFFICE" ]; then
> - if [ -e "/usr/bin/loffice" ]; then
> + if [ -n "$OFFICE" ] && [ -e "$OFFICE" ]; then
> + cmd="$OFFICE"
> + elif [ -e "/usr/bin/loffice" ]; then
> cmd="/usr/bin/loffice"
> elif [ -e "/usr/bin/ooffice" ]; then
> cmd="/usr/bin/ooffice"
> @@ -168,7 +178,9 @@ fi
>
> if [ "$cmd" == "TERMINAL" ]; then
> IMEXIT="true"
> - if [ -e "/usr/bin/konsole" ]; then
> + if [ -n "$TERMINAL" ] && [ -e "$TERMINAL" ]; then
> + cmd="$TERMINAL"
> + elif [ -e "/usr/bin/konsole" ]; then
> cmd="/usr/bin/konsole"
> # KDE4 konsole behaves differently from other terminals
> IMEXIT="false"
> --
> 1.7.9.5
>
> _______________________________________________
> X2Go-Dev mailing list
> X2Go-Dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/x2go-dev
>
--
DAS-NETZWERKTEAM
mike gabriel, rothenstein 5, 24214 neudorf-bornstein
fon: +49 (1520) 1976 148
GnuPG Key ID 0x25771B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20121203/9af8b2e2/attachment.pgp>
More information about the x2go-dev
mailing list