Bug#750607: gnome-terminal: will not start with non-utf-8 locale

2019-10-30 Thread Stephen Samuel
The problem is that gnome-terminal-server
is not starting:
  root@hpre:~# locate gnome-terminal-server
  /usr/lib/gnome-terminal/gnome-terminal-server
the reason is that LANG or LC and/or LC_ALL are defined badly.  The
question is *where* are these variables ill-defined.  locally or globally.

One quick thing to do is create a new user and see if Gnome-terminal will
start there.  If it does, then the problem is with your account
definitions. (e.g. .bashrc or .profile )
what I would suggest is:
   egrep 'LANG|LC[_=]' .??* 2> /dev/null  | less
check the output...
other places to look for global causes are /etc/default/locale, /etc/rc ,
/etc/bash.bashrc  and /etc/profile*

-- 
Stephen Samuel http://www.bcgreen.com  Software, like love,
778-861-7641  grows when you give it away


Bug#746415: The problem is in bashrc.

2019-10-27 Thread Stephen Samuel
I've just had this problem -- updated to Mint 19.2 and found Gnome-terminal
not starting.  I tracked that to gnome-terminal-server refusing to start
because of a non-UTF locale.

I ended up commenting out these two lines in
samuel@hpre:~$ egrep 'LANG|LC[_=]' .??* 2> /dev/null
 . . . .
.profile:# export LANG=C
.profile:# export LC_ALL=C
. . . .
.bashrc:# export LANG=en
.bashrc:# export LC_ALL=en

Problem solved.
-- 
Stephen Samuel http://www.bcgreen.com  Software, like love,
778-861-7641  grows when you give it away


Bug#403266: installation-report: 12/13/2006 Daily AMD64 Install CD fails to boot

2006-12-15 Thread Stephen Samuel

A couple of things I can think of:

1) make sure that you can read (and checksum) the '64 CD on your
running box (bad burn?). Even if it's only a 32bit box, it should be
able to read the CD (but not boot from it).
2) when you boot knoppix, send us /proc/cpuinfo... I'm kinda left
wondering if you have a box that doesn't properly run X86-64. Mistakes
do happen.
3) try burning another 64-bit CD -- like the ubuntu one.  See if that works.

Yeah, these are obvious thing, but I don't see that you've done them.

On 12/15/06, Tom Epperly [EMAIL PROTECTED] wrote:

Package: installation-reports
Version: 2.24
Severity: normal


I burnt the CD on 12/13 and tried to boot from it this morning on a
system I just assembled last night. The system would not boot from the
CD. There were no signs that the boot process even began. It did spin
the CD for a while as if it was looking for a bootable device.

I tried booting the same machine from a generic x86 Knoppix CD, and it
booted just fine.  After successfully booting the Knoppix CD, I tried
booting from the Debian boot CD again -- still no luck.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#361276: bash: typo in FC_EDIT_COMMAND breaks 'v' command in vi command mode

2006-04-07 Thread Stephen Samuel
Package: bash
Version: 3.1-2
Severity: normal
Tags: patch


When in 'vi' mode, the 'v' command (which normally pops you into vi with
the current command line) breaks, with a syntax error.

The problem is a typo in the patch for the VI_EDIT_COMMAND fc... an
extra ')'

The attached patch is to the diff file (the only place I can find the
bug).

To reproduce:

set -x
set -o vi 
[esc]v

produces:

+++ command -v editor
++ fc -e '/usr/bin/editor)'
bash: syntax error near unexpected token `)'

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /UNIONFS/bin/bash
Kernel: Linux 2.6.15
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages bash depends on:
ii  base-files3.1.10 Debian base system miscellaneous f
ii  debianutils   2.15.2 Miscellaneous utilities specific t
ii  libc6 2.3.5-13   GNU C Library: Shared libraries an
ii  libncurses5   5.5-1  Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information
--- -   2006-04-07 08:09:49.346183000 -0700
+++ bash_3.1-2.diff 2006-04-07 08:06:36.0 -0700
@@ -1449,7 +1449,7 @@
 + 
 +-#define VI_EDIT_COMMAND  fc -e \${VISUAL:-${EDITOR:-vi}}\
 +-#define EMACS_EDIT_COMMAND   fc -e \${VISUAL:-${EDITOR:-emacs}}\
-++#define VI_EDIT_COMMAND  fc -e \${VISUAL:-${EDITOR:-$(command 
-v editor || echo vi))}}\
+++#define VI_EDIT_COMMAND  fc -e \${VISUAL:-${EDITOR:-$(command 
-v editor || echo vi)}}\
 ++#define EMACS_EDIT_COMMAND   fc -e \${VISUAL:-${EDITOR:-$(command -v 
editor || echo emacs)}}\
 + #define POSIX_VI_EDIT_COMMANDfc -e vi
 + 


Bug#360277: Patch: Allow non-integer wait intervals (-i)

2006-03-31 Thread Stephen Samuel
Package: netkit-ping
Version: 0.10-10.3
Severity: normal
Tags: patch

This patch allows for -i to specify ping intervals of less than one
second.  I have configured it to allow 1/2 second intervals for non root
users and 1/100 second -i 0.01 for root users. 
 (those values are arbitrary, but the lower bound would appear to be 
 one tick).

patch below...

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /UNIONFS/bin/bash
Kernel: Linux 2.6.15
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages netkit-ping depends on:
ii  libc6 2.3.5-13   GNU C Library: Shared libraries an

netkit-ping recommends no packages.

-- no debconf information

-- Patch:

--- ping/ping.c 1997/06/08 19:39:47 1.22
+++ ping/ping.c 2006/03/31 19:26:23
@@ -40,7 +40,7 @@
 /*
  * From: @(#)ping.c5.9 (Berkeley) 5/12/91
  */
-char rcsid[] = $Id: ping.c,v 1.22 1997/06/08 19:39:47 dholland Exp $;
+char rcsid[] = $Id: ping.c,v 1.23 2006/03/31 19:21:39 samuel Exp $;
 char pkg[] = netkit-base-0.10;
 
 /*
@@ -80,6 +80,7 @@
 #include stdio.h
 #include ctype.h
 #include errno.h
+#include limits.h
 /*
  * Note: on some systems dropping root makes the process dumpable or
  * traceable. In that case if you enable dropping root and someone
@@ -188,7 +189,8 @@
 static long nreceived; /* # of packets we got back */
 static long nrepeats;  /* number of duplicates */
 static long ntransmitted;  /* sequence # for outbound packets = #sent */
-static int interval = 1;   /* interval between packets */
+static double interval = 1.0;  /* interval between packets */
+static int interticks; /* interval between packets */
 static int floodok = 1; /* okay to send next flood ping? */
 
 /* timing */
@@ -232,6 +234,7 @@
static char *null = NULL;
__environ = null;
am_i_root = (getuid()==0);
+   interticks= CLK_TCK;/* interval between packets */
 
/*
 * Pull this stuff up front so we can drop root if desired.
@@ -277,12 +280,19 @@
setbuf(stdout, NULL);
break;
case 'i':   /* wait between sending packets */
-   interval = atoi(optarg);
-   if (interval = 0) {
+   interval = atof(optarg);
+   if (interval  0.01) {
(void)fprintf(stderr,
ping: bad timing interval.\n);
exit(2);
+   };
+   if (interval0.5  !am_i_root) {
+   (void)fprintf(stderr,
+   ping: %s\n, strerror(EPERM));
+   exit(2);
}
+   interticks = interval*CLK_TCK;  /* interval between 
packets */
+   if( interticks2){ interticks= 2 ; };
options |= F_INTERVAL;
break;
case 'l':
@@ -535,6 +545,58 @@
 }
 
 /*
+ * timeval_to_d --
+ * d_to_timeval --
+ * convert between the double-long timeval struct and a double floating point
+ * ( I think this should have existed a long time ago)
+ */
+static double timeval_to_d( const struct timeval * tv ){
+   return tv-tv_sec+(((double)tv-tv_usec) / 100);
+};
+static void d_to_timeval(double dsec, struct timeval *tv){
+   if(dsec  (double)LONG_MAX  dsec  (double)LONG_MIN){
+   tv-tv_sec= dsec;
+   tv-tv_usec = (dsec - tv-tv_sec)*100;
+   return;
+   }else if(dsec0){
+   tv-tv_sec=LONG_MAX;
+   }else{
+   tv-tv_sec=LONG_MIN;
+   };
+};
+
+
+/*
+ * dalarm --
+ * Does the same thing as alarm(2) does, 
+ * except that it accepts a double floating point value for
+ * the length of time to wait.
+ */
+
+static  double dalarm(const double altime){
+   struct itimerval old, new;
+   double dsec;
+   int res;
+
+   /* getitimer(ITIMER_REAL, new ); */
+   new.it_interval.tv_sec=0;
+   new.it_interval.tv_usec=0;
+
+   d_to_timeval(altime,(new.it_value));
+   /* printf(alarm:%5.2f,,timeval_to_d(new.it_value)); */
+
+   if( (res= setitimer(ITIMER_REAL,new,old)) != 0 ){
+   perror(setitimer call failed);
+   exit(res);
+   };
+   /* assert(res==0); */
+   dsec=timeval_to_d((old.it_value));
+   /* printf(- %5.2f,%5.2f: 
,timeval_to_d((old.it_value)),timeval_to_d((old.it_interval))); */
+   return(  dsec) ;
+};
+
+
+/*
  * catcher --
  * This routine causes another PING to be transmitted, and then
  * schedules another SIGALRM for 1 second from now.
@@ -554,7 +616,7 @@
 
if