From 2a2c412e2eee59159672e8d72541b7f10dd3d875 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 8 Feb 2020 16:12:31 -0700 Subject: [PATCH 1/3] Revert "Add a new contrib/desktopentry-setlang/ mechanism" This reverts commit 08b6281f60ab543510d9b4c74c81d1d8c9391906. The Login manager is reponsible for setting the correct language (LANG, etc) information before starting a CDE session. --- .../desktopentry-setlang/README-cde-alt | 18 ------------------ .../desktopentry-setlang/cde-alt.desktop | 7 ------- .../desktopentry-setlang/startxsession.sh | 6 ------ 3 files changed, 31 deletions(-) delete mode 100644 cde/contrib/desktopentry-setlang/README-cde-alt delete mode 100644 cde/contrib/desktopentry-setlang/cde-alt.desktop delete mode 100644 cde/contrib/desktopentry-setlang/startxsession.sh diff --git a/cde/contrib/desktopentry-setlang/README-cde-alt b/cde/contrib/desktopentry-setlang/README-cde-alt deleted file mode 100644 index 9d613346a..000000000 --- a/cde/contrib/desktopentry-setlang/README-cde-alt +++ /dev/null @@ -1,18 +0,0 @@ -This is another method to setup an xsession which allows you to execute -commads before the CDE Xsession gets executed. -This alternate method is useful when for example you need to -set a different language. - -In this example we -1. have the login manager execute /usr/dt/bin/startxsession.sh script -2. The /usr/dt/bin/startxsession.sh first sets properly the LANG variable - (or you can add whatever you want to execute before CDE Xsession starts) - and then executes /usr/dt/bin/Xsession which will start CDE. - -To install, after you edit the startxsession.sh to your liking, do as root: - -cp /path/to/cdesktopenv-code/cde/contrib/desktopentry/cde-alt.desktop /usr/share/xsessions/ -cp /path/to/cdesktopenv-code/cde/contrib/desktopentry/startxsession.sh /usr/dt/bin/ -chmod ugo+rx /usr/dt/bin/startxsession.sh - - diff --git a/cde/contrib/desktopentry-setlang/cde-alt.desktop b/cde/contrib/desktopentry-setlang/cde-alt.desktop deleted file mode 100644 index 41c71b57c..000000000 --- a/cde/contrib/desktopentry-setlang/cde-alt.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name=CDE -Comment=Use this session to boot into the Common Desktop Environment -Keywords=Common Desktop Environment -Exec=/usr/dt/bin/startxsession.sh -Icon=Dtlogo.pm -Type=Application diff --git a/cde/contrib/desktopentry-setlang/startxsession.sh b/cde/contrib/desktopentry-setlang/startxsession.sh deleted file mode 100644 index 34608c470..000000000 --- a/cde/contrib/desktopentry-setlang/startxsession.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -export PATH=$PATH:/usr/dt/bin -export LANG=el_GR.UTF-8 -/usr/dt/bin/Xsession - From 83ef13af18fb8e22b534af82be5caff5ba4e2b6f Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 8 Feb 2020 16:16:13 -0700 Subject: [PATCH 2/3] desktopentry/README: Clarify that the login manager is responsible for setting language --- cde/contrib/desktopentry/README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cde/contrib/desktopentry/README b/cde/contrib/desktopentry/README index 1579b1024..069a08fef 100644 --- a/cde/contrib/desktopentry/README +++ b/cde/contrib/desktopentry/README @@ -6,4 +6,7 @@ https://standards.freedesktop.org/desktop-entry-spec/latest It is the opposite style to contrib/desktop2dt that takes desktop files and converts them for use with dtlogin. -It does not yet support language/login in other than English/C locale. +Language selection is the job of the login manager (xdm, dtlogin, kdm, +etc). + + From 6f1a110e1d20b253a127e198f060a474117f3278 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sun, 8 Mar 2020 15:05:48 -0600 Subject: [PATCH 3/3] dtksh: fix 32b/64b issues with XmTextGetString and XmTextFieldGetString Some of these functions were returning pointers cast as integers, which of course is bad on a 64b LP64 systems. This code should probably just be refactored at some point. There may be other hidden issues, and all the casting just sucks. --- cde/programs/dtksh/xmcmds.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cde/programs/dtksh/xmcmds.c b/cde/programs/dtksh/xmcmds.c index e3f1e8bd5..ff6b6e81e 100644 --- a/cde/programs/dtksh/xmcmds.c +++ b/cde/programs/dtksh/xmcmds.c @@ -171,7 +171,7 @@ static int Text_Widget( int argc, char *argv[]) ; static int Text_VarAndWidget( - int (*func)(Widget w), + long (*func)(Widget w), Boolean varIsString, int argc, char *argv[]) ; @@ -1301,7 +1301,7 @@ do_DtHelpReturnSelectedWidgetId( return(1); } - res = DtHelpReturnSelectedWidgetId(w->w, NULL, &retWidget); + res = DtHelpReturnSelectedWidgetId(w->w, 0, &retWidget); XSync(XtDisplay(w->w), False); f.addr = (caddr_t)&res; @@ -3959,7 +3959,7 @@ do_XmTextRemove( static int Text_VarAndWidget( - int (*func)(Widget w), + long (*func)(Widget w), Boolean varIsString, int argc, char *argv[] ) @@ -4008,7 +4008,7 @@ do_XmTextGetTopCharacter( int argc, char *argv[] ) { - return (Text_VarAndWidget((int (*)())XmTextGetTopCharacter, False, argc, + return (Text_VarAndWidget((long (*)())XmTextGetTopCharacter, False, argc, argv)); } @@ -4018,7 +4018,7 @@ do_XmTextGetBaseline( int argc, char *argv[] ) { - return (Text_VarAndWidget(XmTextGetBaseline, False, argc, argv)); + return (Text_VarAndWidget((long (*)())XmTextGetBaseline, False, argc, argv)); } @@ -4027,7 +4027,7 @@ do_XmTextGetInsertionPosition( int argc, char *argv[] ) { - return (Text_VarAndWidget((int (*)())XmTextGetInsertionPosition, False, + return (Text_VarAndWidget((long (*)())XmTextGetInsertionPosition, False, argc, argv)); } @@ -4037,7 +4037,7 @@ do_XmTextGetLastPosition( int argc, char *argv[] ) { - return (Text_VarAndWidget((int (*)())XmTextGetLastPosition, False, argc, + return (Text_VarAndWidget((long (*)())XmTextGetLastPosition, False, argc, argv)); } @@ -4047,7 +4047,7 @@ do_XmTextGetMaxLength( int argc, char *argv[] ) { - return (Text_VarAndWidget(XmTextGetMaxLength, False, argc, argv)); + return (Text_VarAndWidget((long (*)())XmTextGetMaxLength, False, argc, argv)); } @@ -4056,7 +4056,7 @@ do_XmTextGetSelection( int argc, char *argv[] ) { - return (Text_VarAndWidget((int (*)())XmTextGetSelection, True, argc, argv)); + return (Text_VarAndWidget((long (*)())XmTextGetSelection, True, argc, argv)); } @@ -4065,7 +4065,7 @@ do_XmTextGetString( int argc, char *argv[] ) { - return (Text_VarAndWidget((int (*)())XmTextGetString, True, argc, argv)); + return (Text_VarAndWidget((long (*)())XmTextGetString, True, argc, argv)); }