Compilation of gtkdialog with gcc fails on Solaris (cc1: error: invalid option `t')

I have Solaris 10 x86 just installed on my VBox, but I have problem with `make` and `make install` command. When I try to run this command I got error related to gcc compiler option `-t`: Here is config.log                $ ./configure           ## --------- ##     ## Platform. ##     ## --------- ##          hostname = unknown     uname -m = i86pc     uname -r = 5.10     uname -s = SunOS     uname -v = Generic_147148-26          /usr/bin/uname -p = i386     /bin/uname -X     = System = SunOS     Node = unknown     Release = 5.10     KernelID = Generic_147148-26     Machine = i86pc     BusType = <unknown>     Serial = <unknown>     Users = <unknown>     OEM# = 0     Origin# = 1     NumCPU = 1          /bin/arch              = i86pc     /usr/bin/arch -k       = i86pc     /usr/convex/getsysinfo = unknown     hostinfo               = unknown     /bin/machine           = unknown     /usr/bin/oslevel       = unknown     /bin/universe          = unknown          PATH: /opt/gnome/bin     PATH: /usr/local/bin     PATH: /opt/netscape     PATH: /usr/ccs/bin     PATH: //bin     PATH: /usr/sbin     PATH: /usr/bin     PATH: /usr/openwin/bin     PATH: /usr/ucb     PATH: //bin     PATH: /usr/sbin     PATH: /usr/bin     PATH: /root/bin     PATH: /usr/bin     PATH: /usr/sbin     PATH: /usr/local/bin     PATH: /usr/local/sbin     PATH: /bin     PATH: /sbin     PATH: /opt/csw/bin     PATH: /opt/csw/sbin     PATH: /opt/csw/gcc3/bin     PATH: /usr/sfw/sbin     PATH: /usr/sfw/bin     PATH: /opt/csw/mysql5/bin               ## ----------- ##     ## Core tests. ##     ## ----------- ##          configure:1392: checking for a BSD-compatible install     configure:1447: result: ./install-sh -c     configure:1458: checking whether build environment is sane     configure:1501: result: yes     configure:1566: checking for gawk     configure:1595: result: no     configure:1566: checking for mawk     configure:1595: result: no     configure:1566: checking for nawk     configure:1582: found //bin/nawk     configure:1592: result: nawk     configure:1602: checking whether make sets $(MAKE)     configure:1622: result: yes     configure:1792: checking whether to enable maintainer-specific portions of Makefiles     configure:1801: result: no     configure:1830: checking for style of include used by make     configure:1858: result: GNU     configure:1929: checking for gcc     configure:1955: result: gcc     configure:2199: checking for C compiler version     configure:2202: gcc --version </dev/null >&5     gcc (GCC) 3.3.2     Copyright (C) 2003 Free Software Foundation, Inc.     This is free software; see the source for copying conditions.  There is NO     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          configure:2205: $? = 0     configure:2207: gcc -v </dev/null >&5     Reading specs from /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/specs     Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls     Thread model: posix     gcc version 3.3.2     configure:2210: $? = 0     configure:2212: gcc -V </dev/null >&5     gcc: `-V' option must have argument     configure:2215: $? = 1     configure:2238: checking for C compiler default output file name     configure:2241: gcc  -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c  >&5     configure:2244: $? = 0     configure:2290: result: a.out     configure:2295: checking whether the C compiler works     configure:2301: ./a.out     configure:2304: $? = 0     configure:2321: result: yes     configure:2328: checking whether we are cross compiling     configure:2330: result: no     configure:2333: checking for suffix of executables     configure:2335: gcc -o conftest  -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c  >&5     configure:2338: $? = 0     configure:2363: result:      configure:2369: checking for suffix of object files     configure:2390: gcc -c  -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:2393: $? = 0     configure:2415: result: o     configure:2419: checking whether we are using the GNU C compiler     configure:2443: gcc -c  -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:2449: $? = 0     configure:2453: test -z                   || test ! -s conftest.err     configure:2456: $? = 0     configure:2459: test -s conftest.o     configure:2462: $? = 0     configure:2475: result: yes     configure:2481: checking whether gcc accepts -g     configure:2502: gcc -c -g -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:2508: $? = 0     configure:2512: test -z                   || test ! -s conftest.err     configure:2515: $? = 0     configure:2518: test -s conftest.o     configure:2521: $? = 0     configure:2532: result: yes     configure:2549: checking for gcc option to accept ANSI C     configure:2619: gcc  -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:2625: $? = 0     configure:2629: test -z                   || test ! -s conftest.err     configure:2632: $? = 0     configure:2635: test -s conftest.o     configure:2638: $? = 0     configure:2656: result: none needed     configure:2674: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     conftest.c:2: error: parse error before "me"     configure:2680: $? = 1     configure: failed program was:     | #ifndef __cplusplus     |   choke me     | #endif     configure:2815: checking dependency style of gcc     configure:2905: result: gcc3     configure:2923: checking for library containing strerror     configure:2953: gcc -o conftest -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c  >&5     configure:2959: $? = 0     configure:2963: test -z                   || test ! -s conftest.err     configure:2966: $? = 0     configure:2969: test -s conftest     configure:2972: $? = 0     configure:3042: result: none required     configure:3095: checking for gcc     configure:3121: result: gcc     configure:3365: checking for C compiler version     configure:3368: gcc --version </dev/null >&5     gcc (GCC) 3.3.2     Copyright (C) 2003 Free Software Foundation, Inc.     This is free software; see the source for copying conditions.  There is NO     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          configure:3371: $? = 0     configure:3373: gcc -v </dev/null >&5     Reading specs from /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/specs     Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls     Thread model: posix     gcc version 3.3.2     configure:3376: $? = 0     configure:3378: gcc -V </dev/null >&5     gcc: `-V' option must have argument     configure:3381: $? = 1     configure:3384: checking whether we are using the GNU C compiler     configure:3440: result: yes     configure:3446: checking whether gcc accepts -g     configure:3497: result: yes     configure:3514: checking for gcc option to accept ANSI C     configure:3621: result: none needed     configure:3639: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     conftest.c:2: error: parse error before "me"     configure:3645: $? = 1     configure: failed program was:     | #ifndef __cplusplus     |   choke me     | #endif     configure:3780: checking dependency style of gcc     configure:3870: result: gcc3     configure:3895: checking how to run the C preprocessor     configure:3930: gcc -E -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c     configure:3936: $? = 0     configure:3968: gcc -E -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c     conftest.c:11:28: ac_nonexistent.h: No such file or directory     configure:3974: $? = 1     configure: failed program was:     | /* confdefs.h.  */     |      | #define PACKAGE_NAME "gtkdialog"     | #define PACKAGE_TARNAME "gtkdialog"     | #define PACKAGE_VERSION "0.7.9"     | #define PACKAGE_STRING "gtkdialog 0.7.9"     | #define PACKAGE_BUGREPORT "pipas@linux.pte.hu"     | #define PACKAGE "gtkdialog"     | #define VERSION "0.7.9"     | /* end confdefs.h.  */     | #include <ac_nonexistent.h>     configure:4013: result: gcc -E     configure:4037: gcc -E -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c     configure:4043: $? = 0     configure:4075: gcc -E -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c     conftest.c:11:28: ac_nonexistent.h: No such file or directory     configure:4081: $? = 1     configure: failed program was:     | /* confdefs.h.  */     |      | #define PACKAGE_NAME "gtkdialog"     | #define PACKAGE_TARNAME "gtkdialog"     | #define PACKAGE_VERSION "0.7.9"     | #define PACKAGE_STRING "gtkdialog 0.7.9"     | #define PACKAGE_BUGREPORT "pipas@linux.pte.hu"     | #define PACKAGE "gtkdialog"     | #define VERSION "0.7.9"     | /* end confdefs.h.  */     | #include <ac_nonexistent.h>     configure:4125: checking for egrep     configure:4135: result: egrep     configure:4140: checking for ANSI C header files     configure:4165: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:4171: $? = 0     configure:4175: test -z                   || test ! -s conftest.err     configure:4178: $? = 0     configure:4181: test -s conftest.o     configure:4184: $? = 0     configure:4273: gcc -o conftest -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c  >&5     configure:4276: $? = 0     configure:4278: ./conftest     configure:4281: $? = 0     configure:4296: result: yes     configure:4310: checking for flex     configure:4326: found /usr/sfw/bin/flex     configure:4336: result: flex     configure:4349: checking for yywrap in -lfl     configure:4379: gcc -o conftest -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c -lfl   >&5     ld: fatal: library -lfl: not found     ld: fatal: file processing errors. No output written to conftest     collect2: ld returned 1 exit status     configure:4385: $? = 1     configure: failed program was:     | /* confdefs.h.  */     |      | #define PACKAGE_NAME "gtkdialog"     | #define PACKAGE_TARNAME "gtkdialog"     | #define PACKAGE_VERSION "0.7.9"     | #define PACKAGE_STRING "gtkdialog 0.7.9"     | #define PACKAGE_BUGREPORT "pipas@linux.pte.hu"     | #define PACKAGE "gtkdialog"     | #define VERSION "0.7.9"     | #define STDC_HEADERS 1     | /* end confdefs.h.  */     |      | /* Override any gcc2 internal prototype to avoid an error.  */     | #ifdef __cplusplus     | extern "C"     | #endif     | /* We use char because int might match the return type of a gcc2     |    builtin and then its argument prototype would still apply.  */     | char yywrap ();     | int     | main ()     | {     | yywrap ();     |   ;     |   return 0;     | }     configure:4411: result: no     configure:4416: checking for yywrap in -ll     configure:4446: gcc -o conftest -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c -ll   >&5     configure:4452: $? = 0     configure:4456: test -z                   || test ! -s conftest.err     configure:4459: $? = 0     configure:4462: test -s conftest     configure:4465: $? = 0     configure:4478: result: yes     configure:4489: checking lex output file root     configure:4500: flex conftest.l     configure:4503: $? = 0     configure:4515: result: lex.yy     configure:4520: checking whether yytext is a pointer     configure:4536: gcc -o conftest -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c  -ll >&5     configure:4542: $? = 0     configure:4546: test -z                   || test ! -s conftest.err     configure:4549: $? = 0     configure:4552: test -s conftest     configure:4555: $? = 0     configure:4569: result: yes     configure:4587: checking for bison     configure:4603: found /usr/sfw/bin/bison     configure:4613: result: bison -y     configure:4676: checking for pkg-config     configure:4694: found //bin/pkg-config     configure:4706: result: //bin/pkg-config     configure:4721: checking pkg-config is at least version 0.9.0     configure:4724: result: yes     configure:4735: checking for GTK     configure:4743: $PKG_CONFIG --exists --print-errors "$pkg_modules"     configure:4746: $? = 0     configure:4761: $PKG_CONFIG --exists --print-errors "$pkg_modules"     configure:4764: $? = 0     configure:4840: result: yes     configure:4850: checking for GTHREAD     configure:4858: $PKG_CONFIG --exists --print-errors "$pkg_modules"     configure:4861: $? = 0     configure:4876: $PKG_CONFIG --exists --print-errors "$pkg_modules"     configure:4879: $? = 0     configure:4955: result: yes     configure:4965: checking for GLADE_LIB     configure:4974: $PKG_CONFIG --exists --print-errors "\               $glade_lib"     configure:4978: $? = 0     configure:4995: $PKG_CONFIG --exists --print-errors "\               $glade_lib"     configure:4999: $? = 0     configure:5042: result: yes     configure:5067: checking for sys/types.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for sys/stat.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for stdlib.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for string.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for memory.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for strings.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for inttypes.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for stdint.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5067: checking for unistd.h     configure:5083: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5089: $? = 0     configure:5093: test -z                   || test ! -s conftest.err     configure:5096: $? = 0     configure:5099: test -s conftest.o     configure:5102: $? = 0     configure:5113: result: yes     configure:5139: checking locale.h usability     configure:5151: gcc -c -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c >&5     configure:5157: $? = 0     configure:5161: test -z                   || test ! -s conftest.err     configure:5164: $? = 0     configure:5167: test -s conftest.o     configure:5170: $? = 0     configure:5180: result: yes     configure:5184: checking locale.h presence     configure:5194: gcc -E -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include conftest.c     configure:5200: $? = 0     configure:5220: result: yes     configure:5255: checking for locale.h     configure:5262: result: yes     configure:5283: checking for setlocale     configure:5340: gcc -o conftest -g -O2 -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include  conftest.c  >&5     configure:5346: $? = 0     configure:5350: test -z                   || test ! -s conftest.err     configure:5353: $? = 0     configure:5356: test -s conftest     configure:5359: $? = 0     configure:5371: result: yes     configure:5507: creating ./config.status          ## ---------------------- ##     ## Running config.status. ##     ## ---------------------- ##          This file was extended by gtkdialog config.status 0.7.9, which was     generated by GNU Autoconf 2.59.  Invocation command line was            CONFIG_FILES    =        CONFIG_HEADERS  =        CONFIG_LINKS    =        CONFIG_COMMANDS =        $ ./config.status           on unknown          config.status:709: creating Makefile     config.status:709: creating gtkdialog.spec     config.status:709: creating src/Makefile     config.status:709: creating doc/Makefile     config.status:709: creating examples/Makefile     config.status:813: creating config.h     config.status:925: config.h is unchanged     config.status:1105: executing depfiles commands          ## ---------------- ##     ## Cache variables. ##     ## ---------------- ##          ac_cv_c_compiler_gnu=yes     ac_cv_env_CC_set=set     ac_cv_env_CC_value=gcc     ac_cv_env_CFLAGS_set=     ac_cv_env_CFLAGS_value=     ac_cv_env_CPPFLAGS_set=set     ac_cv_env_CPPFLAGS_value='-I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include'     ac_cv_env_CPP_set=     ac_cv_env_CPP_value=     ac_cv_env_GLADE_LIB_CFLAGS_set=     ac_cv_env_GLADE_LIB_CFLAGS_value=     ac_cv_env_GLADE_LIB_LIBS_set=     ac_cv_env_GLADE_LIB_LIBS_value=     ac_cv_env_GTHREAD_CFLAGS_set=     ac_cv_env_GTHREAD_CFLAGS_value=     ac_cv_env_GTHREAD_LIBS_set=     ac_cv_env_GTHREAD_LIBS_value=     ac_cv_env_GTK_CFLAGS_set=     ac_cv_env_GTK_CFLAGS_value=     ac_cv_env_GTK_LIBS_set=     ac_cv_env_GTK_LIBS_value=     ac_cv_env_LDFLAGS_set=     ac_cv_env_LDFLAGS_value=     ac_cv_env_PKG_CONFIG_set=     ac_cv_env_PKG_CONFIG_value=     ac_cv_env_build_alias_set=     ac_cv_env_build_alias_value=     ac_cv_env_host_alias_set=     ac_cv_env_host_alias_value=     ac_cv_env_target_alias_set=     ac_cv_env_target_alias_value=     ac_cv_exeext=     ac_cv_func_setlocale=yes     ac_cv_header_inttypes_h=yes     ac_cv_header_locale_h=yes     ac_cv_header_memory_h=yes     ac_cv_header_stdc=yes     ac_cv_header_stdint_h=yes     ac_cv_header_stdlib_h=yes     ac_cv_header_string_h=yes     ac_cv_header_strings_h=yes     ac_cv_header_sys_stat_h=yes     ac_cv_header_sys_types_h=yes     ac_cv_header_unistd_h=yes     ac_cv_lib_fl_yywrap=no     ac_cv_lib_l_yywrap=yes     ac_cv_objext=o     ac_cv_path_ac_pt_PKG_CONFIG=//bin/pkg-config     ac_cv_prog_AWK=nawk     ac_cv_prog_CPP='gcc -E'     ac_cv_prog_LEX=flex     ac_cv_prog_YACC='bison -y'     ac_cv_prog_ac_ct_CC=gcc     ac_cv_prog_cc_g=yes     ac_cv_prog_cc_stdc=     ac_cv_prog_egrep=egrep     ac_cv_prog_lex_root=lex.yy     ac_cv_prog_lex_yytext_pointer=yes     ac_cv_prog_make_make_set=yes     ac_cv_search_strerror='none required'     am_cv_CC_dependencies_compiler_type=gcc3     am_cv_prog_cc_stdc=     pkg_cv_GLADE_LIB_CFLAGS='-I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  '     pkg_cv_GLADE_LIB_LIBS='-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lpthread -lz -lsocket -lnsl -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  '     pkg_cv_GTHREAD_CFLAGS='-mt -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  '     pkg_cv_GTHREAD_LIBS='-mt -lgthread-2.0 -lglib-2.0  '     pkg_cv_GTK_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  '     pkg_cv_GTK_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  '          ## ----------------- ##     ## Output variables. ##     ## ----------------- ##          ACLOCAL='${SHELL} /Desktop/gtkdialog-0.7.9/missing --run aclocal-1.9'     AMDEPBACKSLASH='\'     AMDEP_FALSE='#'     AMDEP_TRUE=''     AMTAR='${SHELL} /Desktop/gtkdialog-0.7.9/missing --run tar'     AUTOCONF='${SHELL} /Desktop/gtkdialog-0.7.9/missing --run autoconf'     AUTOHEADER='${SHELL} /Desktop/gtkdialog-0.7.9/missing --run autoheader'     AUTOMAKE='${SHELL} /Desktop/gtkdialog-0.7.9/missing --run automake-1.9'     AWK='nawk'     CC='gcc'     CCDEPMODE='depmode=gcc3'     CFLAGS='-g -O2'     CPP='gcc -E'     CPPFLAGS='-I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include'     CYGPATH_W='echo'     DEFS='-DHAVE_CONFIG_H'     DEPDIR='.deps'     ECHO_C=''     ECHO_N='-n'     ECHO_T=''     EGREP='egrep'     EXEEXT=''     GLADE_LIB_CFLAGS='-I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  '     GLADE_LIB_LIBS='-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lpthread -lz -lsocket -lnsl -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  '     GTHREAD_CFLAGS='-mt -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  '     GTHREAD_LIBS='-mt -lgthread-2.0 -lglib-2.0  '     GTK_CFLAGS='-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  '     GTK_LIBS='-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  '     HAVE_GLADE_LIB='1'     INSTALL_DATA='${INSTALL} -m 644'     INSTALL_PROGRAM='${INSTALL}'     INSTALL_SCRIPT='${INSTALL}'     INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'     LDFLAGS=''     LEX='flex'     LEXLIB='-ll'     LEX_OUTPUT_ROOT='lex.yy'     LIBOBJS=''     LIBS=''     LTLIBOBJS=''     MAINT='#'     MAINTAINER_MODE_FALSE=''     MAINTAINER_MODE_TRUE='#'     MAKEINFO='${SHELL} /Desktop/gtkdialog-0.7.9/missing --run makeinfo'     OBJEXT='o'     PACKAGE='gtkdialog'     PACKAGE_BUGREPORT='pipas@linux.pte.hu'     PACKAGE_NAME='gtkdialog'     PACKAGE_STRING='gtkdialog 0.7.9'     PACKAGE_TARNAME='gtkdialog'     PACKAGE_VERSION='0.7.9'     PATH_SEPARATOR=':'     PKG_CONFIG='//bin/pkg-config'     SET_MAKE=''     SHELL='/bin/bash'     STRIP=''     VERSION='0.7.9'     YACC='bison -y'     ac_ct_CC='gcc'     ac_ct_STRIP=''     ac_pt_PKG_CONFIG='//bin/pkg-config'     am__fastdepCC_FALSE='#'     am__fastdepCC_TRUE=''     am__include='include'     am__leading_dot='.'     am__quote=''     am__tar='${AMTAR} chof - "$$tardir"'     am__untar='${AMTAR} xf -'     bindir='${exec_prefix}/bin'     build_alias=''     datadir='${prefix}/share'     exec_prefix='${prefix}'     host_alias=''     includedir='${prefix}/include'     infodir='${prefix}/info'     install_sh='/Desktop/gtkdialog-0.7.9/install-sh'     libdir='${exec_prefix}/lib'     libexecdir='${exec_prefix}/libexec'     localstatedir='${prefix}/var'     mandir='${prefix}/man'     mkdir_p='$(mkinstalldirs)'     oldincludedir='/usr/include'     prefix='/usr/local'     program_transform_name='s,x,x,'     sbindir='${exec_prefix}/sbin'     sharedstatedir='${prefix}/com'     sysconfdir='${prefix}/etc'     target_alias=''          ## ----------- ##     ## confdefs.h. ##     ## ----------- ##          #define HAVE_INTTYPES_H 1     #define HAVE_LOCALE_H 1     #define HAVE_MEMORY_H 1     #define HAVE_SETLOCALE 1     #define HAVE_STDINT_H 1     #define HAVE_STDLIB_H 1     #define HAVE_STRINGS_H 1     #define HAVE_STRING_H 1     #define HAVE_SYS_STAT_H 1     #define HAVE_SYS_TYPES_H 1     #define HAVE_UNISTD_H 1     #define PACKAGE "gtkdialog"     #define PACKAGE_BUGREPORT "pipas@linux.pte.hu"     #define PACKAGE_NAME "gtkdialog"     #define PACKAGE_STRING "gtkdialog 0.7.9"     #define PACKAGE_TARNAME "gtkdialog"     #define PACKAGE_VERSION "0.7.9"     #define STDC_HEADERS 1     #define VERSION "0.7.9"     #define YYTEXT_POINTER 1          configure: exit 0      After make command I get this below. Guys suggested me to remove `-mt` flag, but then I get other error's.I'm not so good in Solaris, to solve this problem, and still I'm stuck here:               bash-3.2# make     make  all-recursive     make[1]: Entering directory `/Desktop/gtkdialog-0.7.9'     Making all in src     make[2]: Entering directory `/Desktop/gtkdialog-0.7.9/src'     make  all-am     make[3]: Entering directory `/Desktop/gtkdialog-0.7.9/src'     if gcc -DHAVE_CONFIG_H -I. -I. -I..   -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions -I/usr/openwin/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -mt -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DHAVE_GLADE_LIB=1 -g -O2 -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.c; \             then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi     cc1: error: invalid option `t'     make[3]: *** [main.o] Error 1     make[3]: Leaving directory `/Desktop/gtkdialog-0.7.9/src'     make[2]: *** [all] Error 2     make[2]: Leaving directory `/Desktop/gtkdialog-0.7.9/src'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/Desktop/gtkdialog-0.7.9'     make: *** [all] Error 2


Why isn't there any shell command to create files?

### Attention please: I am _not_ asking how to make a file from the command line! * * * I have been using `touch` for making files for years without paying attention that its main purpose is something else. If one wants to create a file from command line there are so many possibilities:               touch foo.bar     > foo.bar     cat > foo.bar     echo -n > foo.bar     printf '' > foo.bar      And I'm sure there are more. But the fact is, none of the commands above are actually designed for creating files. For example, `man touch` suggests this command is for changing file timestamps. Why doesn't an OS as complete as Unix (or Linux) have a command solely designed for creating files?


Why can't I create an LVM RAID1 or mirror volume?

I'm running Ubuntu 12.04 and have just added 2 new hard drives into my server. The idea being that I would create a volume group that would include them and create a bunch of logical volumes on them that would be mirrored. I've partitioned the 2 drives to have a a primary partition on each of type 8E (LVM):               /dev/sdc1            2048  3907029167  1953513560   8e  Linux LVM     /dev/sdd1            2048  3907029167  1953513560   8e  Linux LVM      Then added them as physical devices, created a volume group and added the to the volume group:               --- Volume group ---     VG Name               vmdata     System ID                  Format                lvm2     Metadata Areas        2     Metadata Sequence No  8     VG Access             read/write     VG Status             resizable     MAX LV                0     Cur LV                0     Open LV               0     Max PV                0     Cur PV                2     Act PV                2     VG Size               3.64 TiB     PE Size               4.00 MiB     Total PE              953862     Alloc PE / Size       0 / 0        Free  PE / Size       953862 / 3.64 TiB     VG UUID               2zdfc7-1fj2-kMdy-7OUq-eadi-AsF2-Sujbes          --- Physical volumes ---     PV Name               /dev/sdc1          PV UUID               kAU93m-4S5V-MD1V-EkTA-m0u7-bmQn-3pyVmk     PV Status             allocatable     Total PE / Free PE    476931 / 476931          PV Name               /dev/sdd1          PV UUID               erVnaJ-vp5S-0LHW-oRSx-joer-VXPX-KG0uDb     PV Status             allocatable     Total PE / Free PE    476931 / 476931      When I try to create a new logical volume of type RAID 1 it fails:               $ lvcreate --type raid1 -m 1 -L 64G -n fred vmdata     WARNING: Unrecognised segment type raid1     Insufficient suitable allocatable extents for logical volume : 16384 more required     Unable to allocate extents for mirror(s).      When I try to create it as a plain mirror it also fails:               $ lvcreate -m 1 -L 64G -n fred vmdata     Insufficient suitable allocatable extents for logical volume : 16384 more required     Unable to allocate extents for mirror(s).      What am I missing?


Giving more priority to a USB device

I have a keyboard with USB cable connected to computer through a USB 2.0 socket. But when I type fast, Ubuntu ignores some key messages (e.g. I may type _CORRECT_ but what is typed may be _CORET_ ) . After restarting the system everything is good for a while. I have tested another USB keyboard and I'm sure there's nothing wrong with the keyboard. I think this is because this USB device has low priority. How can I urge the system to give more priority to the keyboard?


Creating a virtual microphone

I run a CentOS Server with VNC enabled and some services require a microphone to work properly, but it doesn't have to be used for recording, just a microphone device available. So I was wondering if I can create a virtual recording device that can be used as a microphone, but it doesn't have to input any sound. I run alsa tools but doing `modprobe sound-aloop` says that the operation is not permitted. Any suggestion will be greatly appreciated.


Remove the newline before `/etc/issue` in tty

I want to remove the default newline inserted before the content of `/etc/issue` on login prompt in `tty`. I'm using `agetty` and `systemd`. I tried to add the `--nonewline` option to my `getty@tty5.service` :               ExecStart=/sbin/agetty --nonewline --noclear %I $TERM      That result in :               # systemctl status -l getty@tty5.service     ● getty@tty5.service - Getty on tty5       Loaded: loaded (/usr/lib/systemd/system/getty@.service; disabled)       Active: failed (Result: start-limit) since sam. 2014-05-17 23:50:13 CEST; 56s ago         Docs: man:agetty(8)               man:systemd-getty-generator(8)               http://0pointer.de/blog/projects/serial-console.html      Process: 14538 ExecStart=/sbin/agetty --nonewline --noclear %I $TERM (code=exited, status=1/FAILURE)     Main PID: 14538 (code=exited, status=1/FAILURE)          systemd[1]: getty@tty5.service has no holdoff time, scheduling restart.     systemd[1]: Stopping Getty on tty5...     systemd[1]: Starting Getty on tty5...     systemd[1]: getty@tty5.service start request repeated too quickly, refusing to start.     systemd[1]: Failed to start Getty on tty5.     systemd[1]: Unit getty@tty5.service entered failed state.      And I get :               # journalctl --no-pager -b -u getty@tty5.service     -- Logs begin at sam. 2013-10-12 00:20:12 CEST, end at sam. 2014-05-17 23:52:49 CEST. --     systemd[1]: Starting Getty on tty5...     systemd[1]: Started Getty on tty5.     agetty[14497]: Usage:     agetty[14497]: agetty [options] <line> [<baud_rate>,...] [<termtype>]     agetty[14497]: agetty [options] <baud_rate>,... <line> [<termtype>]     agetty[14497]: Options:     agetty[14497]: -8, --8bits                assume 8-bit tty     agetty[14497]: -a, --autologin <user>     login the specified user automatically     agetty[14497]: -c, --noreset              do not reset control mode     agetty[14497]: -E, --remote               use -r <hostname> for login(1)     agetty[14497]: -f, --issue-file <file>    display issue file     agetty[14497]: -h, --flow-control         enable hardware flow control     agetty[14497]: -H, --host <hostname>      specify login host     agetty[14497]: -i, --noissue              do not display issue file     agetty[14497]: -I, --init-string <string> set init string     agetty[14497]: -l, --login-program <file> specify login program     agetty[14497]: -L, --local-line[=<mode>]  control the local line flag     agetty[14497]: -m, --extract-baud         extract baud rate during connect     agetty[14497]: -n, --skip-login           do not prompt for login     agetty[14497]: -o, --login-options <opts> options that are passed to login     agetty[14497]: -p, --login-pause          wait for any key before the login     agetty[14497]: -r, --chroot <dir>         change root to the directory     agetty[14497]: -R, --hangup               do virtually hangup on the tty     agetty[14497]: -s, --keep-baud            try to keep baud rate after break     agetty[14497]: -t, --timeout <number>     login process timeout     agetty[14497]: -U, --detect-case          detect uppercase terminal     agetty[14497]: -w, --wait-cr              wait carriage-return     agetty[14497]: --noclear              do not clear the screen before prompt     agetty[14497]: --nohints              do not print hints     agetty[14497]: --nonewline            do not print a newline before issue     agetty[14497]: --nohostname           no hostname at all will be shown     agetty[14497]: --long-hostname        show full qualified hostname     agetty[14497]: --erase-chars <string> additional backspace chars     agetty[14497]: --kill-chars <string>  additional kill chars     agetty[14497]: --help                 display this help and exit     agetty[14497]: --version              output version information and exit     agetty[14497]: For more details see agetty(8).     systemd[1]: getty@tty5.service has no holdoff time, scheduling restart.     systemd[1]: Stopping Getty on tty5...      Why `agetty` don't want to recognize the option ? Is there another way to do that ?


What is the difference between minicom and gammu-smsd?

My understanding of minicom: Minicom is a text-based modem control program (allows you to communicate with modem via at commands on a text-based terminal) using serial port communications. Therefore, you can configure a modem using minicom and even have the modem send SMS messages:               at+CMGS=954xxxxxxx     > Hello World     +CMGS: 8      My understanding of gammu-smsd: gammu-smsd is a program that periodically scans modem for received messages, stores them in defined storage (e.g. postgresql/mysql database) and also sends messages enqueued (stored in a queue) in this storage. So both programs can send SMS messages using a modem. Both need to be configured to listen to the /dev/ttyS0 (assuming the modem is attached to first serial port) and both use the at command set and baud rates. So are both needed or can you just use gammu-smsd without having to use minicom?


Building a Security System using Raspberry Pi

I have a spare USB webcam at home and I plan to order a Raspberry Pi Model B which will capture video and stream it live. This will be my first time handling a Raspberry Pi. Before oredring the Raspberry Pi, I just wanted to confirm that this is infact possible and that the Raspberry Pi Model B will suffice for the task or I need to order a higher spec board. Any information would be hugely helpful Thanks


How to make `helm-execute-persistent-action` not to follow symlink original path

I want to complete by `Tab` when using `find-file`, so I bind a function `helm-execute-persistent-action` to `Tab` like this.               ;; For find-file etc.     (define-key helm-read-file-map (kbd "TAB") 'helm-execute-persistent-action)     ;; For helm-find-files etc.     (define-key helm-find-files-map (kbd "TAB") 'helm-execute-persistent-action)      This is much better for me. But there is small problem still, the function expand symlink to original path. Is there option to disable expanding symbolic link?


using `lpr` to get file name and page numbers printed on pdf

I have a PDF file and I want to print it with the file name and page numbers added somewhere on the page. Is this possible with `lpr`? If not, what utility can I use to transform the PDF file first? I'm on Solaris 10.


Shutdown doesnt work

I've installed `dwm` window manager on linux mint 15, configured it and now shutdown doesn't work. I typed `shutdown -P now` in terminal, dwm closed successfully and now I'm seeing black screen with: ` xsetroot unabel to open display '' ` and that's all. The computer continues to operate. How can I fix it?


How can I set gdm login screen time to 24 hour format?

I installed CentOS 6.4 within VMWare 7 by easy setup. Afterwards I had to change locale settings to German. Everythings works fine accept that the clock on the login screen is still in 12-hours-AM/PM-format. I want to change it to the 24-hour-format. GDM Version is 2.30.4. I tried the suggestions from the answers to a similiar question and another question. However, the suggested command `gconf-editor` seems not to provide a way to configure the clock format at the login screen. The other command `gsettings` is not available in my environment. How can I obtain it? There are other suggestions involving `gdm.conf` but the only `gdm.conf` in my environment is a XML file and not located in the directories specified in these suggestions. At Red Hat there seems to be a support article about this issue, however bp;dr. How can I set the login screen time to the 24 hour format?


Are there additional ways to protect SSH connections besides firewall and RSA Keys?

Sometimes I don't have a static IP and need to administrate my web server remotely. I'm looking for any additional layers of protection I could add to make opening port 22 safer. Currently I have disabled root password login via SSH. It requires RSA key to login (the private key is stored on a usb smart card). Are there any known risks with my configuration if port 22 was opened to the public? Besides port 22, iptables only has port 80 and port 443 open to the public. I'm using a Windows computer to connect to Centos 6 Linux with Putty. Are there any additional statements I can add to the firewall or SSH config to further limit access to port 22 to only my specific computer so that the port doesn't appear open to people scanning ports? I'm using iptables for the firewall currently.


scp refuses to do anything but print usage

I'm trying to copy a file on my home network using `scp`. However, every time I run it, it just prints usage instructions.               $ scp alex@192.168.0.4:ipdetect-0.6.tar.bz2     usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]                [-l limit] [-o ssh_option] [-P port] [-S program]                [[user@]host1:]file1 ... [[user@]host2:]file2      What am I doing wrong?


[FreeBSD] rc.conf, loader.conf vs static kernel linking

I'm curious: What, exactly are the benefits to statically linking modules into the kernel rather than loading through rc.conf, etc? For example: To add linux emulation, I could add `linux_enable="YES"` to `/etc/rc.conf`, or I could link it into the kernel by adding `options COMPAT_LINUX` to my kernel config. Is there actually an advantage to this? If so, what?


Duplicity Centos 6 Error

I am trying to verify backup from ftp server using this command.               duplicity verify ftp://xxx.net@ftpback-bhs1-15.ip-198-100-151.net/ /home      I am getting this error               Difference found: File home/nginx has permissions 0:0 700, expected 500:500 700     Difference found: File home/nginx/domains has permissions 0:0 700, expected 500:500 755     Difference found: File home/nginx/domains/enxxxgd.com has permissions 0:0 700, expected 500:500 755     Difference found: File home/nginx/domains/enxxxgd.com/log has permissions 0:0 700, expected 500:500 755     python: ERROR: (rs_file_copy_cb) unexpected eof on fd417     python: ERROR: (rs_job_complete) patch job failed: unexpected end of input     Traceback (most recent call last):       File "/usr/bin/duplicity", line 1411, in <module>         with_tempdir(main)       File "/usr/bin/duplicity", line 1404, in with_tempdir         fn()       File "/usr/bin/duplicity", line 1340, in main         verify(col_stats)       File "/usr/bin/duplicity", line 757, in verify         for backup_ropath, current_path in collated:       File "/usr/lib64/python2.6/site-packages/duplicity/diffdir.py", line 269, in collate2iters         relem1 = riter1.next()       File "/usr/lib64/python2.6/site-packages/duplicity/patchdir.py", line 499, in integrate_patch_iters         final_ropath = patch_seq2ropath( normalize_ps( patch_seq ) )       File "/usr/lib64/python2.6/site-packages/duplicity/patchdir.py", line 479, in patch_seq2ropath         misc.copyfileobj( current_file, tempfp )       File "/usr/lib64/python2.6/site-packages/duplicity/misc.py", line 166, in copyfileobj         buf = infp.read(blocksize)       File "/usr/lib64/python2.6/site-packages/duplicity/librsync.py", line 80, in read         self._add_to_outbuf_once()       File "/usr/lib64/python2.6/site-packages/duplicity/librsync.py", line 94, in _add_to_outbuf_once         raise librsyncError(str(e))     librsyncError: librsync error 103 while in patch cycle


Add Ubuntu to Arch linux Dual boot, Keeping Syslinux, without GRUB

### Situation I have Arch Linux installed on `/dev/sda1` (15GB/ext4). `/` and `/boot` are both on `/dev/sda1` and `/home` is on `/dev/sda2` (100GB/ext4). I made a 15GB/ext4 `/dev/sda3` partition for Ubuntu. I installed Syslinux as the bootloader. ### Problem How do I dual-boot-install Ubuntu onto `/dev/sda3` without installing GRUB, without ruining my Syslinx bootloader and how do I share the home partition `/dev/sda2` between the two OS's? * * * ### Update I learned how to boot into Ubuntu correctly and found out that chainloading is unnecessary. Here's what I did:   1. Wiped Ubuntu off `/dev/sda3` and reinstalled it in the same place.   2. Made a new directory on `/dev/sda1` named `/boot/ubuntu`,   3. Copied all of `/boot` from `/dev/sda3` to the new directory in step 1 (because the the kernel and initrd files for Ubuntu were there),   4. Edited `/boot/syslinux/syslinux.cfg` from `/dev/sda1`. See below for the entry:              LABEL Ubuntu          MENU LABEL Ubuntu          LINUX ../ubuntu/vmlinuz-3.5.0-23-generic          APPEND root=/dev/sda3 ro          INITRD ../ubuntu/initrd.img-3.5.0-23-generic      If I were smart, I would probably have a dedicated boot partition. Oh well, it wasn't part of the original question so I'll just worry about that later. However, I was hoping that Ubuntu would use `/dev/sda2` as the shared home partition and it didn't :( **Anybody know how to fix the`/home/user` folder so it's on `/dev/sda2`?**


How can I separate these two outputs using awk command

Here's my output:               MessageID=3990592283244651750-30192b51.13df831d93a.7eb4;EsbTiming=2013-04-12T01:07:46.099      I want only the time. How can I separate them?


Setuid bit seems to have no effect on bash

I was experimenting with the security of my system and noticed something strange: setting the setuid bit on a copy of bash located at `/usr/bin/bash- test` seemed to have no effect. When I ran an instance of `bash-test`, my home directory was not set to `/root` and when I ran the `whoami` command from `bash-test`, my username was not reported as being `root`, suggesting that `bash-test` was not running as root. However, if I set the setuid bit on `whoami`, I was reported as being root in any shell, as expected. I tried setting the setuid bit on `/usr/bin/bash` as well and observed the same behavior. Why is bash not running as root when I set the setuid bit on it? Could selinux have something to do with this?


Can I redirect output to a log file and background a process at the same time? In other words, can I do something like this?               nohup java -jar myProgram.jar 2>$1 > output.log &      Or, is that not a legal command? Or, do I need to manually background it like so:               java -jar myProgram.jar 2>$1 > output.log     jobs     [CTRL-Z]     bg 1


latexmk with emacs only runs once instead of twice

I have `latexmk` setup to run through `Auctex`. I hit `crtl + c crtl + c` and the option `latexmk` is present. When I run a file that has new bibliography items, it says after compiling that I need to run `latexmk` again to fix the dependencies. Why isn't it running twice automatically? Isn't that what it is supposed to do?


What does the package UPower output if on a desktop

On Ubuntu 12.04, if I use the command:                   upower -i /org/freedesktop/UPower/devices/battery_BAT0      It will output all of the statistics for the battery. However, what does it output if I am using a desktop (I.e. does not have a battery?)


is there any command like "wall" that runs a "command" in all terminals

as you know "wall" command sends a message to all terminals:               wall message      now my question is this: is there any command that can send a "command" to be run in all terminals?   for example sending `clear` command to all terminals , so then all terminals will be cleared.


force re-negotiation of PCIe speed on Linux

I'm working with PCIe Gen 3 cards and from time to time they seem to fall back to PCIe 1 or 2 speeds (according to lspci and also observed by the throughput). When rebooting/power cycling the machine the speed goes back to the full PCIe Gen 3 speed in most cases. Is there a less intrusive way to force a renegotiation of the PCI link speed (trying to bring it back to PCI Gen 3) on e.g. RHEL6 ?


Forking in a systemd script

I want systemd service to handle forking (my file doesn't handle forking by itself. So I'm relying on systemd for handling that) My .service file:               [Unit]     Description=swamp services management service     After=syslog.target          [Service]     Type=forking     ExecStart=/usr/bin/swamp          [Install]     WantedBy=multi-user.target      **Question** Is specifying `Type=forking` enough for what I'm trying to achieve? Or is it similar to expect forking in upstart which actually tells upstart (if I understand correctly, not sure I do, I'm new at writing initscripts) that my service would handle forking/daemonizing.


Modern distribution on old hardware

I have an old system currently running ubuntu jaunty. The main harware specs are:   * Processor: AMD Athlon 1,2 GHz   * RAM: 512 MB   * Graphics: [SiS] 65x/M650/740 (output from lspci)   * HDD: 40 GB Now jaunty is very old and it is difficult to install recent software via package manager. Especially some newer lightweight browsers such as `surf` or `luakit` are only installable via compiling from source. Moreover the current jaunty installation is not very fast. Now I want to setup a new **fast** and **stable** system where it is easy to install relatively up to date software (i.e. there should be much up to date packages available via a package management system or at least up to date libraries to build things from source without too much pain). I know that there are some distributions which are designed in particular for old hardware such as puppy linux, or damm small linux etc. However for me those distros seem to have not much support and not many packages in general. So my idea is to install a base system from a major distribution and equip it with lightweight software. (As window manager I want to use `xmonad`). I want to do this with a ubuntu alternate installation (ubuntu 12.04 or 12.10 when it is released). This leads me to some questions:   * Is it correct that the fact that for example ubuntu 12.04 runs much slower on a 10 year old machine than for example ubuntu 6.04 is mainly due to the desktop environment used?   * If I do an alternate install with `xmonad` as window manager and other lightweight software, are there other important factors which end in performance differences between new and old ubuntu versions?   * What can I do to tweak the ubuntu alternate installation for performance except choosing lightweight hardware, especially a lightweight window manager?   * Are there any good reasons (concerning performance) to choose another distro (debian, archlinux...) and do the base install with that distro instead of ubuntu alternate?   * Which file-system should I choose for best performance? Is for such an old system `ext2` better than `ext3` or `ext4` or should I even have a look at something like `brtfs`?


LFS-7.5 util-linux `make check` fails

When I run `make check` in **util-linux** , it fails saying: > 3 tests of 127 FAILED According to **LFS - 7.5** _test logs_ found here, 2 tests fail and that is acceptable. But my `cal` command fails while testing for `big/year` and it says: > cal: Year 1234567890123456789 ...cal: illegal year value: > '1234567890123456789': Numerical result out of range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  cal: illegal year value: '1234567890123456789': Numerical result out of > range   >  FAILED (cal/bigyear) This is the same question as posted in mailing-list here. But the person who asked the question here was writing an independent script, which resulted in the above mentioned error and he says that he will wait for a `patch`, which rectifies this problem. Will it have a negative effect on my **LFS** build later on? **NOTE:** I am trying to build a `32-bit lfs` system on **Linux Mint 17 32bit**


Using ping on multiple interfaces on a NIC

I have two systems and each have a NIC with two ethernet ports. One system has a verified NIC card, but the other has a NIC which has to be verified. I use `ping` to verify whether the interfaces on the NIC card is functioning correctly. Why does each interface have to be on a different subnet for `ping` to work? For example:               System 1:  eth0 (10.0.0.1), eth1 (10.0.1.1) -->This NIC is tested good                       ^                ^                       |                |                       V                V     System 2:  eth0 (10.0.0.2), eth1 (10.0.1.2) -->This NIC is being tested      In this setup, `eth0` on `System 1` is connected to `eth0` on `System 2`. And `eth1` on `System 1` is connected to `eth1` on `System 2`. I am using submet mask of `255.255.255.0`. So on `System 2`, I would do the following:               $ ping -I eth0 -c 100 -qA 10.0.0.1     $ ping -I eth1 -c 100 -qA 10.0.1.1      Why couldn't I have this setup though?               System 1:  eth0 (10.0.0.1), eth1 (10.0.0.2) -->This NIC is tested good                       ^                ^                       |                |                       V                V     System 2:  eth0 (10.0.0.3), eth1 (10.0.0.4) -->This NIC is being tested      And then do:               $ ping -I eth0 -c 100 -qA 10.0.0.1     $ ping -I eth1 -c 100 -qA 10.0.0.2      What is it about having a host with multiple interfaces?               $ netstat -rn     Kernel IP routing table     Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0     10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth1     10.0.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth2     169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0     192.168.0.0     0.0.0.0         255.255.252.0   U         0 0          0 eth0


Emulate mouse cut'n'paste behavior in a test script

I've got a shell script which outputs shell commands which are supposed to be **copy-pasted with the mouse** from one terminal window to another (I can test it in the same window though). The output _should_ not contain any significant whitespace characters other than plain space, and the output lines _should_ be truncated so that the code can be copied properly even on terminals where soft line breaks are copied as hard line breaks. I'd like to make sure. I'm thinking something like this:               $ eval `resize -s 24 80`     $ reset     $ my_script     $ mouse_copy *all of the terminal history except for the first line*     $ mouse_paste     $ assert *the paste created the proper result*      Emulating this with something like `xclip` would be nice, if possible. The script should run on a custom Linux server which has no X. I don't know how in detail how the terminal output is sent to the client, but maybe the script would have to ask the X server on the client side what it's currently displaying?


How to migrate the content of one disk on a Raid5?

I have one 1.5Tb HDD with Debian Wheezy. I have also four 2Tb empty HDDs. I want to configure the four 2Tb disks in Raid5 and install LVM. Then migrate the content of the 1.5Tb disk on the Raid5. Before starting, I would like to know if the migration could be possible and, if yes, how to do it.


Mail Delivery too slow with sendmail

We are using javamail to deliver mail for our applications. The mail function runs in a loop to deliver around 100 to 200 mails depending on the range we use. However, it taking more than an hour to send around 100 mails. All the mails are send with an attachment (pdf file) of size 14KB. The mail function is as follows:               sendMailWithAttachment("mail@example.in", "password",                         "192.168.2.160", "25", "false", "false", true, "false",                         to, subject, body);      We are using `sendmail` for mail server and it runs on the same network of the application. So, the latency from application server to mail server is very low. `sendmail` Version:               # sendmail -d0.1     Version 8.13.8      If I run `mailq` on the server, it always shows two or three mails pending at a time.               # mailq     /var/spool/mqueue (3 requests)     Total requests: 3      Load average on the mail server is very low.               $w     14:13:45 up 8 days, 59 min,  1 user,  load average: 0.03, 0.03, 0.00      Where is the issue?


cut+sed function joined

**Input**               dir/foo      **Output**               dir./      so I need:               echo 'dir/foo' | MAGIC      **Q:** What is `MAGIC`? (something like a `cut`+`sed` joined:D)


How to configure Apache Rivet on openSUSE with YaST2

I need to configure my Apache web local server to view Tcl Apache Rivet web dynamic applications. The problem I run into is my browser forces me to download the file, so Apache doesn't interpret the file before I visit the application. If I visit the root folder, the index.rvt is directly downloaded. So even Apache does a minimal job. Did somebody have the same problem and sorted it out before ?


Does OpenBSD use bcrypt by default?

http://codahale.com/how-to-safely-store-a-password/      with what does OpenBSD store the password by default?      They say bcrypt is way more secure then hashing. I googled' it and obsd supports bcrypt, but does it use it by default?      Thank you!


How many minutes have passed since the Unix Epoch?

Sorry for the lame question How many minutes have passed since the Unix Epoch ? It should be January 1, 1970 ? Let's say approximately until 1 Jan 2011... 5 865 696 000 minutes ?


How to get device filename from lsusb output or by device path

Related question: USB connect/disconnect notification When the device is plugged/unplugged, I get instant notification, that's great. But to make it (almost) perfect, I also want to get device filename like `/dev/ttyUSB0`, and, even better, all symlinks to it. But, I can't find how to get this information from `udev`, or from `lsusb`, or somehow else. The only ID of the device I have is a device path like `/devices/pci0000:00/0000:00:1d.0/usb5/5-1`. How to get device filename from it?


ionCube shell script gives error

I have this shell script to install ionCube loader:               if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi     echo "Welcome to this script to install the ionCube loader on CentOS!"     cd /usr/local/src     wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz     tar zxvf ioncube_loaders_lin_x86-64.tar.gz     cd  ioncube     mkdir /usr/local/ioncube     echo "Please specify which PHP version you are using (e.g.: 5.3)."     read version     cp ioncube_loader_lin_"$version".so /usr/local/ioncube     path=$(php -i|grep php.ini | awk 'NR==2{print $5}')     read path     echo "zend_extension = /usr/local/ioncube/ioncube_loader_lin_"$version".so" >> "$path"      When I try to run it on `CentOS 6.5 Final` with this PHP version (`php -v`):               PHP 5.3.28 (cli) (built: Jun 23 2014 16:25:09)      Copyright (c) 1997-2013 The PHP Group     Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies      I get the following error:               ./ioncube.sh: line 17: : File or folder doesn't exist      Line 17:               echo "zend_extension = /usr/local/ioncube/ioncube_loader_lin_"$version".so" >> "$path"      The error says that `$path` doesn't exist. When I try to manually run the command of `$path` (`php -i|grep php.ini | awk 'NR==2{print $5}'`), the output is: `/usr/local/lib/php.ini` When I try to run line 17 but replace `$path` with the actual output of the command (of course I'll replace `$version` too):               echo "zend_extension = /usr/local/ioncube/ioncube_loader_lin_"5.3".so" >> "/usr/local/lib/php.ini"      The command succeeds. I don't understand what's wrong here.


How to re-load all running applications from swap space into RAM?

If my desktop run out of memory and swaps a lot then I free or kill the application wasting my RAM. But, after that, all my desktop/applications have been swapped and are horribly slow, do you know a way to "unswap" (reload from swap space into RAM) my desktop/applications?


How to generate a report summary of messages that triggered a specific DSN code

I use Sendmail on CENTOS 5.x, I hope this is a simple question. =) I need to generate a report summary of messages that triggered a specific DSN code. For example:               Jan 11 07:43:34 server-example sendmail[12732]: p937blksdh3: to=<someuser@recipientdomain.com>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=102537, relay=mta.recipientdomain.com. [12.34.56.78], dsn=5.7.1, stat=Service unavailable      Normally, I would just grep for this information (something like: `grep -i "dsn=5.7.1" /var/log/maillog`). But the problem is that this only returns a line like above and doesn't tell me the sender of the message. Ideally, I'm looking for a one-liner that can do the following:   1. Search sendmail maillog for specific DSN.    2. Identify the message-id for the email. (I'm guessing `awk '{print $}'` would be used?)    3. Return the message details for each (presumably grepping for the the message id retrieved from step 2).  I'm a n00b at scripting/one-liners so I'm sure there's probably an easier way to do this. Any thoughts?


How to read first and last line from cat output?

I have text file. Task - get first and last line from file after               $ cat file | grep -E "1|2|3|4" | commandtoprint          $ cat file     1     2     3     4     5      Need this without cat output (only 1 and 5).               ~$ cat file | tee >(head -n 1) >(wc -l)     1     2     3     4     5     5     1      Maybe awk and more shorter solution exist...


How to check available package versions in rpm systems?

If I want to check available versions of a package in Debian, I run `apt-cache policy pkgname` which in the case of `wajig` gives:               wajig:       Installed: 2.01       Candidate: 2.01       Version table:      *** 2.01 0             100 /var/lib/dpkg/status          2.0.47 0             500 file:/home/wena/.repo_bin/ squeeze/main i386 Packages             500 ftp://ftp.is.co.za/debian/ squeeze/main i386 Packages      That means that there are three wajig packages, one that is installed (`/var/lib/dpkg/status`), and two others (which are the same version). One of these two is in a local repository and the other is available from a remote repository. How do I achieve a similar result on rpm systems?


Multiple-boot from ISO files does not show OS menu

I used instructions from PenDriveLinux.com to create a multiple-boot USB drive with some ISO images on it. I used Xubuntu 10.10 Desktop image and a Linux Mint 9 XFCE image. I was able to boot either of the two operating systems. Each one booted directly to the desktop however. If I boot *Ubuntu from an ISO image which has been "burned" to a CD or a USB, I am presented with a menu prompting me to install or try the OS, test memory, etc. Why does booting from the ISO go directly to the desktop, whereas the other method presents the OS menu first? **Update**               menuentry "Ubuntu 10.10 Desktop ISO" {      loopback loop /ubuntu.iso      linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso noeject noprompt splash --      initrd (loop)/casper/initrd.lz     }


Extract line number of a file which is having a non zero value before a specified string

I'm having a file which contains following data               1. verification: 10 passed 0 failed     2. verification: 10 passed 0 failed     3. verification: 10 passed 1 failed     4. verification: 10 passed 3 failed     5. verification: 10 passed 0 failed      I want to know the line numbers of 3 and 4.


Selected ALSA device falls back to default in Wine with PulseAudio installed

Under SolydK (based on Debian Testing), as PulseAudio is installed by default, I unless I switch from the default sound device to an item that appears in `winecfg` at the sound settings, I get distorted sound in every application opened with wine. The problem is that whenever I play music in Clementine, the next time I use Wine, the sound device falls back to default. How do I make Wine remember that specific device even after becoming temporarily unavailable? Or, as an alternative solution, how do I make that ALSA device remain available all the time?


Collapse some repeated parts of successive lines

I have data in notepad like this:               4480-1     4480-2     4480-3     4480-15     4581-1     4581-2     4581-3     4581-4      Can we do it using for loop sort of things? With sed? My required output is `4480-1&-2&-3&-15&4581-1&-2&-3&-4`


Setting up a gateway between two subnets on the same physical network

I need to configure a DHCP-enabled network (192.168.2.) on a physical layer where resides an already existing network (192.168.1.) with static IPs. I have a Debian 7 server with two interfaces (server and interfaces are all virtuals) and I want to set ip up as the gateway for my network. I used eth0 for routing packets to the original network (to access the internet gatewat at 192.168.1.5) and eth1 for handling traffic from/to my network. ### ifconfig               eth0      Link encap:Ethernet  HWaddr 00:0c:29:d4:02:1b                 inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::20c:29ff:fed4:21b/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:21668983 errors:0 dropped:0 overruns:0 frame:0               TX packets:10044848 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:10931368249 (10.1 GiB)  TX bytes:2383839079 (2.2 GiB)          eth1      Link encap:Ethernet  HWaddr 00:0c:29:d4:02:25                 inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0               inet6 addr: fe80::20c:29ff:fed4:225/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:14113604 errors:0 dropped:0 overruns:0 frame:0               TX packets:11269734 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:1871598524 (1.7 GiB)  TX bytes:10331981618 (9.6 GiB)          lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:8158 errors:0 dropped:0 overruns:0 frame:0               TX packets:8158 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:629690 (614.9 KiB)  TX bytes:629690 (614.9 KiB)      ### route               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         192.168.1.5     0.0.0.0         UG    0      0        0 eth0     localnet        *               255.255.255.0   U     0      0        0 eth0     192.168.2.0     *               255.255.255.0   U     0      0        0 eth1      ### iptables -vL               Chain INPUT (policy ACCEPT 5603K packets, 822M bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain FORWARD (policy DROP 138K packets, 8597K bytes)      pkts bytes target     prot opt in     out     source               destination                14M 9542M ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED      398K   27M ACCEPT     all  --  eth1   any     anywhere             anywhere                      Chain OUTPUT (policy ACCEPT 2915K packets, 1432M bytes)      pkts bytes target     prot opt in     out     source               destination               ### iptables -tnat -vL               Chain PREROUTING (policy ACCEPT 607K packets, 49M bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain INPUT (policy ACCEPT 112K packets, 17M bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain OUTPUT (policy ACCEPT 6893 packets, 977K bytes)      pkts bytes target     prot opt in     out     source               destination                  Chain POSTROUTING (policy ACCEPT 2391 packets, 374K bytes)      pkts bytes target     prot opt in     out     source               destination               363K   24M MASQUERADE  all  --  any    eth0    anywhere             anywhere         After that I enabled an authoritative DHCP server on eth1. Now the problem: connections with the server are always working (I have a samba share and a MySQL server there) but sometimes (seems randomly) the clients (mainly Windows 7 or XP) fail to connect to the internet for a variable period of time. When in this condition I am able to ping to 192.168.1.110 but not to 192.168.1.5. ## Addendum The fact the FORWARD chain had dropped packets seems suspicious, so I temporarily disabled that filtering with:               iptables -A FORWARD -j ACCEPT      With this new rule in place everything works. I still need to clarify what's going on, though... ## Addendum 2 These are the actual iptables rules: ### iptables-save               # Generated by iptables-save v1.4.14 on Fri Jun 27 20:53:32 2014     *mangle     :PREROUTING ACCEPT [28129147:14012989399]     :INPUT ACCEPT [8479051:1218948772]     :FORWARD ACCEPT [19639349:12792010625]     :OUTPUT ACCEPT [4434912:3183821941]     :POSTROUTING ACCEPT [23940877:15968783924]     COMMIT     # Completed on Fri Jun 27 20:53:32 2014     # Generated by iptables-save v1.4.14 on Fri Jun 27 20:53:32 2014     *nat     :PREROUTING ACCEPT [931027:74896097]     :INPUT ACCEPT [153578:23398245]     :OUTPUT ACCEPT [9169:1292388]     :POSTROUTING ACCEPT [3186:492868]     -A POSTROUTING -o eth0 -j MASQUERADE     COMMIT     # Completed on Fri Jun 27 20:53:32 2014     # Generated by iptables-save v1.4.14 on Fri Jun 27 20:53:32 2014     *filter     :INPUT ACCEPT [2415796:331288771]     :FORWARD DROP [0:0]     :OUTPUT ACCEPT [1218435:1654003511]     -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT     -A FORWARD -i eth1 -j ACCEPT     -A FORWARD -j ACCEPT     COMMIT     # Completed on Fri Jun 27 20:53:32 2014


replace a character from a string that is in between first and second search using sed or awk

I need to replace `_` (underscore) with `?` (question mark) in a file containing email addresses. The file looks like below:               EFT_020034-E015133  20140624    /ACC/EMAIL+test_1@mysite.com         SHR    END      EFT_020034-E015133  20140624    /ACC/EMAIL+test_123_abc@yoursite.net     SHR    END     EFT_020034-E015133  20140624    /ACC/EMAIL+test_456@theirsite.com        SHR    END      The expected output is:               EFT_020034-E015133  20140624    /ACC/EMAIL+test?1@mysite.com         SHR    END      EFT_020034-E015133  20140624    /ACC/EMAIL+test?123?abc@yoursite.net     SHR    END     EFT_020034-E015133  20140624    /ACC/EMAIL+test?456@theirsite.com        SHR    END      How can I do this in **sed** or **awk** without affecting other underscores and only the underscore between `EMAIL+` (constant) and `SHR` (constant). The changed content should be saved in a new file.


zsh: set TERM=screen-256color in tmux, but xterm-256color without tmux

I need my `$TERM` to be `xterm-256color` outside of tmux (in "plain" terminal with zsh), but `screen-256color` inside tmux. First I tried:   * add `export TERM='xterm-256color'` to my `~/.zshrc`.    * add `set -g default-terminal "screen-256color"` to my `~/.tmux.conf` Now, when I open terminal (say, xterm), `TERM` is `xterm-256color`, which is correct. But when I run tmux, `TERM` is again `xterm-256color`! Then I tried to comment out line in my `~/.zshrc`. Now, when I open terminal, `TERM` is `xterm`, and when I run tmux, `TERM` is `screen-256color`. So it seems if I set `TERM` in the `.zshrc`, tmux firstly sets `TERM` to `screen-256color`, runs shell (which is zsh), and zsh reads `.zshrc` and resets `TERM` to `xterm-256color`. So, how to make `TERM` to be `xterm-256color` in "plain" terminal, and `screen-256color` in tmux?


Under what scenarios would I want to set a SUID bit?

I'm struggling to wrap my mind around the concept of SUID bits and why they're would be useful. For example, let's say I have a program: `-rwsr-xr-x 1 root root 12364 Jan 12 2013 /usr/bin/foo` My understanding is that the `s` in the execut bit for the user owner essentially means that the file can be executed by other users with the authority of the file owner. Why would I want something like this? Why not just change the group for the file so that it works for a group that all the users belong to?


Delete *.txt files by date between MMDDYYYY and MMDDYYYYY

How can I use `rm` to delete *.txt files between MMDDYYYY and MMDDYYYY ?


Interpret backspaces in file

Is there a way to interpret/"execute" backspaces in a file/line using common bash commands? I have a console program which prints some stuff and than erases it using backspaces and finally writes the end result. What I actually want is the output at the end.               echo -e "Foo\b\b\bBar" | what_goes_here > test.log      My test.log should only contain "Bar". I guess a problem to do this is how much text should be buffered until considered as really printed... In my case a "line buffered" interpreter would be sufficient. Most utility have a switch which do not print such characters in first place. But the utility at hand has no such switch...


Route add gw: how to

I'm in a network with IP 10.0.1.X (pc A). There's another sub-network: 10.0.3.0 I can ping pc B connected to this network:               ping 10.0.3.X ---> OK      Now, B is connected also in wifi to a network 192.168.1.1 (C) I want to connect to this one directly from my pc:               sudo route add 192.168.1.1 gw 10.0.3.X      but I have this response: SIOCADDRT: No such process How can I realize this forwarding?


Checking HDD health

I have a set of old Seagate SATA HDDs that are part of an LVM on Raid setup in a NetGear ReadyNAS. The ReadyNas no longer boots (it hangs on checking FS). I tried reinstalling the OS which did not fix the problem. One piece of advice I have been given is that one of the drives may have failed and that I should check the drive health with the SeaTools program that Seagate provides. Despite being called "SeatTools for DOS" and being an ISO image Seagate says it is only compatible with Windows. I don't believe them and my guess is I could create a bootable CD from it, but my question is, is there a set of Linux tools that will do the job for me? What tests should I run to see if a drive is failing?


Mount EXT3 with 16KB blocks

I have a failing Sparc based Netgear ReadyNAS that uses LVM on Raid with EXT3 partitions with a 16KB block size. I would like to pull the drives out of the NAS and mount them read only in a Linux box. The issue is that from what I have read x86 PCs cannot (could not) read 16 KB blocks. The suggestions I have seen are to use fuse-ext2. The issue is that the information I can find on the web is a number of years old. What is the best way to mount an EXT3 partition with 16 KB blocks?


Make web project writable by apache and other user

I am running **ubuntu 12.04 LTS** . To be able to view my web project in the browser I did the following:               chown -R www-data:www-data /var/www/project      Now I wanted to open the project in netbeans but it has not the permissions to read or write. So I created another group called netbeans and added the current user and www-data user to that group.               chgrp -R netbeans /var/www/project      but netbeans still cannot write or even read. And it seams that apache only can read the project folder when its owner is www-data. Any ideas how to solve this?


Symlink Copy a Directory Non-recursively

So I want to symlink copy all the files and folders in one directory to another directory. When I use `cp -s` though without the `-r` option I get a bunch of "omitting directory" warnings, and I don't want to omit directories:               $ cp -s /home/my_username/path_to_directory/* .     cp: omitting directory `/home/my_username/path_to_directory/foo'     cp: omitting directory `/home/my_username/path_to_directory/bar'     cp: omitting directory `/home/my_username/path_to_directory/baz'      If I use the `-r` option though, it symlinks all the files in the directories instead of symlinking the directories themselves. How do I non-recursively symlink all files and folders in one directory to another directory?


Is there a way to shove kernel-panic to the screen?

I know this may seem, well stupid, but can a user shove the cause of a kernel panic to the screen?


Embedded board with apache

I'm working on a Davinci DSP ARM embedded board. The board itself is the Texas Instruments 816X/389X EVM. I'm currently trying to get apache working on the board. The problem is that the SDK for the board is extremely basic and doesn't include 'make' or any update manager like RPM, yum, or apt-get. So I'm having a hard time getting it to work. I compiled apache on my host machine, which is connected through minicom to the target. I have G++ Sourcery installed, but don't have any experience with it. So, when I took the compiled files to the target, I ended up with the error: line 1: syntax error: word unexpected (expecting ")") I'm assuming that I did something wrong during the compile, but I'm not really sure because I'm normally a hardware designer and not a software guy.


Perl- Adding underscore and sorting rows

As I am biologist and new to perl, I would like to get help of perl expert cat input.txt               ##gff-version 2     ##source-version geneious 5.6.3     gi371443188gbJH5566721_extraction_reversed  Geneious    CDS 1043    1132    .    +   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  Geneious    CDS 2063    2260    .    +   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  Geneious    CDS 2336    2593    .    +   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  Geneious    CDS 3474    3633    .    +   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  Geneious    extracted region    1   13933   .   +   .   Name=Extracted region from gi|371443188|gb|JH556672.1|;Extracted interval="2010140 <- 2024072"      My output.txt               gi371443188gbJH5566721_extraction_reversed  CDS 2023029 2022940 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  CDS 2022009 2021812 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  CDS 2021736 2021479 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed  CDS 2020598 2020439 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     ###      My expected ouput               gi_371443188_gb_JH5566721  gene    2020598 2023029 .     -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.13412469767431     gi_371443188_gb_JH5566721   CDS 2020598 2020439 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi_371443188_gb_JH5566721   CDS 2021736 2021479 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi_371443188_gb_JH5566721   CDS 2022009 2021812 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi_371443188_gb_JH5566721   CDS 2023029 2022940 .    -   .   Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     ###      I would like help of perl expert in reformating my output in perl code given below. 1.I would like add under score to array[0] in output (i.e gi371443188gbJH5566721_extraction_reversed as gi_371443188_gb_JH5566721) 2.sort rows of CDS in ascending order based on values of column3 & 4 of the output (see expected output) 3.Add new row at the top of file as gi_371443188_gb_JH556672.1 gene with minimum & maximum value of CDS rows (see expected output) My Perl code is given below.               #usr/bin/perl;          open(FH,"$ARGV[0]");          my %num="";     my %all="";     while(<FH>){      chomp $_;         my @array=split("\t"); #print "$array[2]\n";        if($array[2] eq "extracted region"){         $array[8]=~/.*\w+=\"\d+ <- (\d+)"/gm;         $num{$array[0]}="$1";        }        if($array[2] eq "CDS"){        $all{$array[0]}.="$_\n";         }         }             foreach $i (keys %all){              my @line=split "\n",$all{$i};         for ($j=0;$j<=$#line;$j++){         my @new_line=split "\t",$line[$j];         my $pos1=$num{$i}-$new_line[3];         my $pos2=$num{$i}-$new_line[4]; #print $num{$i}; exit;         $new_line[6] =~ s/\+/-/g;         print "$new_line[0]\t$new_line[2]\t$pos1\t$pos2\t$new_line[5]\t$new_line[6]\t$new_line[7]\t$new_line[8]\n";         }         }         print "###\n";


Can hardware be accessed directly from user space?

At work we have some embedded devices controlled by DOS software. I have been tasked with the responsibility of assessing the use of Linux as a replacement OS for DOS on a next generation of hardware. I am not a linux expert at all and my research leads me to the conclusion that DOS is simply a totally different type of operating system that allows you to do potentially dangerous things if you want to. From my understanding if you wish to access hardware directly you would have to write a custom driver. What I need to know to satisfy the curiosity of my boss is the following: **is it at all possible to access hardware directly from user space**?? My guess is no, but I would like to request the opinion of those with knowledge far greater than mine.


Get a list of 3 letter commands on Mac OS X

How can I either create or find a list of 3-letter unix commands on Mac OS X? I'd like to create a new program/command for a project. I'd like to make it a 3-letter name, but I don't want to conflict with other unix commands. I am interested in seeing what is available before I settle on a particular name.


Switch between keyboard layout based on input event

I have a french and a US keyboard on my computer. I'm using awesome wm and have set everything so that it is easy for me to switch between keyboard layout. But I still have to do it myself. Theoretically, it should be possible for the computer to understand from which keyboard the input event comes and use the layout associated with the keyboard. I have looked it up but found no good answer. Is it possible to do so ? I was thinking that I could write a short code analyzing keyboard event and do the switch, but :   * it would run in parallel with the event handler so there could be concurrency problem (something like this);   * it looks like a dirty way of doing it and I prefer a clean solution. Thanks for your help


How to exclude some files not matching certain extensions with grep?

I want to output all lines containing the word `OK` recursively from a directory. But there are a few extensions which I need to exclude from the result:               *~     *.map     *.js except *.debug.js      I tried:               grep -r --exclude={*~,*.map} "OK" /some/dir      Except that I don't know how to remove from the result all those non-debug `.js` files. Any help is much appreciated.


How to mass change password attributes in AIX uname -rv=3 5 for all users but root

I want to do a mass change on all users but root in AIX for the following "password attributes":               Weeks before password reuse: 15     Password min length: 6      Can it be done, or do I need to do them one at a time? I tried to use the F6=Command button to see what it runs, but it appears to be running some sort of script and this is beyond me. Are there any other users (besides `root`) whose attributes I should leave unchanged?


Is there a way to see details of all the threads that a process has in Linux?

For Windows, I think Process Explorer shows you all the threads under a process. Is there a similar command line utility for Linux that can show me details about all the threads a particular process is spawning? * * * I think I should have made myself more clear. **I do not want to see the process hierarcy, but a list of all the threads spawned by a particular process** See this screenshot ![alt text](http://i.stack.imgur.com/ZfcGv.png) **How can this be achieved in Linux?** Thanks!


Linux adoption path for a .NET developer

I am a .NET C# programmer, I love the .NET stack. I have tried Linux several times but every time I got put off as I could not do anything on it .. (like program for it or on it). Ever since Mono was launched, I find myself using Linux a lot more. (I have also decided to start learning Python.) I would love to learn more about the OS itself - the shell commands, the underlying APIs etc Where do I start, are there any books that are recommended for this? I bought a copy of the - Unix Tools 3rd Edition O'Reilly and plan to go over it (end to end) are there any other recommended books? Note: Not that this would matter, but I am using Ubuntu 10.04, I would like to have Fedora, but I have seen many users post issues with their Mono installations on it.


Where does `logger` log its messages to in Arch Linux?

The `logger` command logs an entry via syslog, which usually puts that line to some file like `/var/log/messages`. If I understand the documentation correctly in Arch Linux all the logging is done through systemd, but I cannot find the `logger` entries using `journalctl`.   * What exactly happens with a message given to `logger` in Arch Linux?   * Where is the log entry stored? (A quick grep suggests `/var/log/journal/*/system.journal`.)   * How can I access this log? (Do I need any special option for `journalctl`?)


Mathematical connection between SZ RSS and VSZ in ps o/p?

I wanted to know what mathematical connection is there between the SZ, RSZ and VSZ output in ps output e.g.               ps -p 2363 -o sz,rss,vsz


Transforming positional arguments of a shell script

I'm trying to write a shell script that will transform positional arguments that are passed to it as follows. The shell script passes these arguments to a binary executable (`ffigen`) which is derived from the `gcc 4.0` frontend, so the command line arguments that follow are also `gcc` arguments, and mean the same thing as they do for `gcc`. Consider the following command line               ./htest.sh -I/usr/include/gtk-2.0 -I /usr/include/glib-2.0 -include \     /usr/include/gtk-2.0/gtk/gtk.h -include/usr/include/bar.h /usr/include/myheader.h      There are essentially two different options here, the `-I` option, which passes a directory to `gcc` to search for include files, and `-include`, which processes a header file as if `#include "file"` appeared as the first line of the primary source file. The two different versions given here differ in whether there is a space between the option flag and the argument. It seems both are permissible. Currently the only versions that appear in upstream are               -I/usr/include/gtk-2.0 and -include /usr/include/gtk-2.0/gtk/gtk.h      but it doesn't seem a bad idea to attempt to future-proof this code, in case someone adds these other forms later. What upstream's script does is, for the most part, add the arguments to `CFLAGS`, and then pass the final argument to `ffigen`. What `ffigen` does is not important here - my question is about the return value of `CFLAGS`. Here is upstream's script.               while [ $# -gt 1 ]     do         echo $CFLAGS         case ${1} in           -pthread*)             CFLAGS="${CFLAGS} -D_REENTRANT"             shift             ;;           -x)             shift             shift             ;;           *)             CFLAGS="${CFLAGS} ${1}"             shift             ;;        esac     done          echo $CFLAGS      What I want to do, is where header filenames are specified in the above line, is to transform them to relative path names, relative to the include directory. So, what I would like to see as the returned value to `CFLAGS`, is               -I/usr/include/gtk-2.0 -I /usr/include/glib-2.0 -include gtk-2.0/gtk/gtk.h -includebar.h      What upstream produces is just the arguments unchanged.               -I/usr/include/gtk-2.0 -I /usr/include/glib-2.0 -include \     /usr/include/gtk-2.0/gtk/gtk.h -include/usr/include/bar.h      Rationale: Since Debian has switched to multilib, header files are no longer in their traditional locations. Now, `ffigen`, like its parent `gcc`, can search include paths for header files, _provided_ that only the relative paths are specified. If absolute paths are specified, then of course it will not. Ideally one would want to use a tool which was designed to work with multiarch, but a quick and dirty workaround is to simply strip the header file absolulute paths down to relative path names, and provided ffigen is provided the correct include paths, it will search for and discover the header files. The version I currently have is below. It produces               -I/usr/include/gtk-2.0 -I glib-2.0 -include gtk-2.0/gtk/gtk.h bar.h      which is terrible, but does handle correctly the two cases that actually occur in upstream. A version that handles all four cases correctly would be most welcome. Yes, I'm lazy. I also suck at shell scripting.               while [ $# -gt 1 ]     do         echo $CFLAGS         case ${1} in           -pthread*)             CFLAGS="${CFLAGS} -D_REENTRANT"             shift             ;;           -x)             shift             shift             ;;           -I*)             CFLAGS="${CFLAGS} ${1}"             shift             ;;           *)             RELPATH_AFTER_INCLUDE="${1##*include/}"             CFLAGS="${CFLAGS} ${RELPATH_AFTER_INCLUDE}"             shift             ;;        esac     done          echo $CFLAGS      Here is a little script that I am using to test this               #!/bin/sh          PROGRAM=htest.sh     #PROGRAM=upstream.sh          ./${PROGRAM} -I/usr/include/gtk-2.0 -I /usr/include/glib-2.0 -include \          /usr/include/gtk-2.0/gtk/gtk.h -include/usr/include/bar.h /usr/include/myheader.h      A final note about portability. The scripts above run under dash, and look like they are portable to me. So a version that is portable would be nice, but is not essential. I don't see this code going upstream, so... If not portable, then bash would be Ok.               ###################################################################      For anyone who is interested in the background of this, this is in the context of packaging Clozure Common Lisp for Debian. See the Debian packaging and in particular the README.source file. See upstream patches http://svn.clozure.com/publicsvn/ffigen4/trunk/ffigen4/source/h-to-ffi-common and http://svn.clozure.com/publicsvn/ffigen4/trunk/ffigen4/source/linuxx8664-gcc-4.0.0-h-to- ffi.sh , which combine to make the upstream script `h-to-ffi.sh`, of which I discuss a part here. For the specific issue I'm trying to handle here, see the thread problems building interface databases on Debian multiarch. A discussion of my rationale above is in the third message in that thread, from me, towards the bottom.


where can I find the MIT-MAGIC-COOKIE in the user side?

While digging into X Windows or X11 stuff I found that X display uses MIT-MAGIC-COOKIE to allow client-server to exchange display data. One thing I don't understand is that I am able to locate and view the MIT- MAGIC-COOKIE in the server(Xclient) which the command               xauth list      and I see stuff like               James5/unix:10  MIT-MAGIC-COOKIE-1  1bcafdd569b2e1e6dd0dfaf446f437a6     James5/unix:13  MIT-MAGIC-COOKIE-1  5e536e4c17c94372ebc932f6d1c43abc     James5/unix:15  MIT-MAGIC-COOKIE-1  999ac8b086f2f8091aa970f40b739ff4     James5/unix:11  MIT-MAGIC-COOKIE-1  89287e67dfc851c5e7188fc5b7e4dc31      but from what I've learned, the user side should also have this cookie as well in order to compare and cookie from the received X display data. but when I come back to my 'user side' laptop and type               Black@Black-PC ~     $ xauth list     xauth:  file /home/Black/.Xauthority does not exist      an error message like this appears... where on earth can I locate the .Xauthroity file in the user side?


Need to grant two users to an AIX server to just one folder

Ok, in our environment, most users (including myself as one of the unix admins) don't actually have admin rights directly on the aix servers. We login to a front unix server as ourselves without root access. Then we run a command that logs us in as the actual root user but everything we do is logged to a text file, so if we really screw something up, there are logs to point fingers at who did it. I can't login directly to the unix servers. I don't have access. I have to login to the logging server, then ssh to the server as direct root. Well, I have a request right now that two users that know absolutely nothing about how to navigate a unix command prompt needs access to some log files 3 folders deep. We're going to make it so they're going to log directly into the unix box with the log files, so they don't go through the server that logs all their command history. But our plan is to create them as basic users with no administrative access. Then they're actually going to access the files using a GUI utility to just copy and paste the files to their Windows machines. The permissions on this server without making any modifications look like this already... parent folder `drwxrwxrwx` sub folder `drwxrwxr-x` log folder `drwxr-xr-x` log files `-rw-rw-r--` So, if I create two users on the box and make them part of no security groups, they should already be able to navigate down to the folder no problem because everyone has read access down to the log files. But, what we want is something super simple for these two non-unix experienced users. I've been working this job as a unix admin for about 3 months. I've taken a lot of unix classes but most of my professional experience is in Windows servers. I know in a Windows environment, I'd just share out the logs folder. The user, if wanted to experiment, might notice they could access the parent folder, but probably wouldn't know enough to try it. Is there a way in an AIX unix environment to just somehow share the logs folder out so the users don't have to drill down to the logs folder and possibly get lost or access something they shouldn't access? I'm not changing the permissions. I've been working for this company for 3 months and a multi- million dollar enterprise doesn't like me telling them what they've been doing for the last 20 years is wrong and they should change it. So, I have to make work what they already have in place.


kernel event listener

I wonder if there is something similar to an event listener in UNIX that a program can subscribe to? Specifically I want to know:               Start and end times of a user session     Start and end of the applications executed by that user      Any Tips?


Where to find the source file of function pause(void) and sigsuspend(set)

I want to find the source file of pause and sigsuspend in the glibc-2.14.1 package. I grep the package and find the file sysdeps/posix/pause.c has a definition of function pause, the code is               int      __libc_pause (void)      {         sigset_t set;              __sigemptyset (&set);         __sigprocmask (SIG_BLOCK, NULL, &set);              /* pause is a cancellation point, but so is sigsuspend.             So no need for anything special here.  */              return __sigsuspend (&set);       }       weak_alias (__libc_pause, pause)       I also grep the package for the definition of sigsuspend function and several files have the definition, such as sysdeps/posix/sigsuspend.c and sysdeps/unix/sysv/linux/sigsuspend.c. The definition of sigsuspend in sysdeps/posix/sigsuspend.c is               int      __sigsuspend (set)          const sigset_t *set;      {         sigset_t oset;        int save;             if (set == NULL)          {           __set_errno (EINVAL);            return -1;         }             if (sigprocmask (SIG_SETMASK, set, &oset) < 0)           return -1;              (void) pause();         save = errno;             if (sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL) < 0)          return -1;              __set_errno (save);        return -1;       }      libc_hidden_def (__sigsuspend)      weak_alias (__sigsuspend, sigsuspend)       I found a problem that pause in sysdeps/posix/pause.c call function sigsuspend and sigsuspend in sysdeps/posix/sigsuspend.c call function pause. It seems to be a cycle. So I think that I don't find the proper souce files of pause and sigsuspend. Can any people tell me where is the source files of these functions. Thanks in advance.


Reading Ubuntu installed magazines

I installed a digital edition of a magazine from the Ubuntu Software Center. But how do I read it? Is there an accessory tool to access it?