title: chrome ui issues with mint 17

text: I did install Mint 17 (Qiana) today and I seem to have problems with the window title bars such as chromium title bar. I have limited knowledge of tool kits such as qt or gtk. From what I read so far, they seem to be two libraries/framework satisfying the same purpose. so on a system with one desktop environment such as gnome, I believe there should be only one framework installed gtk in this case? Or is there a problem with the window manager? I was trying to install virtualbox but I found only virtualbox-qt, but later I uninstalled the package and purged conf files. Is it normal that I see a lot of other qt libraries installed on the system? _gtk libraries_ :               ii  gir1.2-gtk-3.0                              3.10.8~3+qiana                                      amd64        GTK+ graphical user interface library -- gir bindings     ii  gir1.2-gtkclutter-1.0                       1.4.4-3ubuntu2                                      amd64        GObject introspection data for the GTK+ Clutter library     ii  gir1.2-gtksource-3.0                        3.10.2-0ubuntu1                                     amd64        gir files for the GTK+ syntax highlighting widget     ii  gir1.2-javascriptcoregtk-3.0                2.4.0-1ubuntu2                                      amd64        JavaScript engine library from WebKitGTK+ - GObject introspection data     ii  gir1.2-nmgtk-1.0                            0.9.8.8-0ubuntu4.1-mint1                            amd64        GObject introspection data for libnm-gtk     ii  gtk2-engines:amd64                          1:2.20.2-3ubuntu1                                   amd64        theme engines for GTK+ 2.x     ii  gtk2-engines:i386                           1:2.20.2-3ubuntu1                                   i386         theme engines for GTK+ 2.x     ii  gtk2-engines-murrine:amd64                  0.98.2-0ubuntu2                                     amd64        cairo-based gtk+-2.0 theme engine     ii  gtk2-engines-murrine:i386                   0.98.2-0ubuntu2                                     i386         cairo-based gtk+-2.0 theme engine     ii  gtk2-engines-oxygen:i386                    1.4.5-0ubuntu1                                      i386         Oxygen widget theme for GTK+-based applications     ii  gtk2-engines-pixbuf:amd64                   2.24.23-0ubuntu1                                    amd64        pixbuf-based theme for GTK+ 2.x     ii  gtk2-engines-pixbuf:i386                    2.24.23-0ubuntu1                                    i386         pixbuf-based theme for GTK+ 2.x     ii  ibus-gtk:i386                               1.5.5-1ubuntu3                                      i386         Intelligent Input Bus - GTK+2 support     ii  libcanberra-gtk-module:i386                 0.30-0ubuntu3                                       i386         translates GTK+ widgets signals to event sounds     ii  libcanberra-gtk0:amd64                      0.30-0ubuntu3                                       amd64        GTK+ helper for playing widget event sounds with libcanberra     ii  libcanberra-gtk0:i386                       0.30-0ubuntu3                                       i386         GTK+ helper for playing widget event sounds with libcanberra     ii  libcanberra-gtk3-0:amd64                    0.30-0ubuntu3                                       amd64        GTK+ 3.0 helper for playing widget event sounds with libcanberra     ii  libclutter-gtk-1.0-0:amd64                  1.4.4-3ubuntu2                                      amd64        Open GL based interactive canvas library GTK+ widget     ii  libdbusmenu-gtk3-4:amd64                    12.10.3+14.04.20140319-0ubuntu1                     amd64        library for passing menus over DBus - GTK+ version     ii  libdbusmenu-gtk4:amd64                      12.10.3+14.04.20140319-0ubuntu1                     amd64        library for passing menus over DBus - GTK+ version     ii  libgtk-3-0:amd64                            3.10.8~3+qiana                                      amd64        GTK+ graphical user interface library     ii  libgtk-3-bin                                3.10.8~3+qiana                                      amd64        programs for the GTK+ graphical user interface library     ii  libgtk-3-common                             3.10.8~3+qiana                                      all          common files for the GTK+ graphical user interface library     ii  libgtk-sharp-beans-cil                      2.14.1-3                                            all          Supplementary CLI bindings for GTK 2.14+     ii  libgtk2-perl                                2:1.249-2                                           amd64        Perl interface to the 2.x series of the Gimp Toolkit library     ii  libgtk2.0-0:amd64                           2.24.23-0ubuntu1                                    amd64        GTK+ graphical user interface library     ii  libgtk2.0-0:i386                            2.24.23-0ubuntu1                                    i386         GTK+ graphical user interface library     ii  libgtk2.0-bin                               2.24.23-0ubuntu1                                    amd64        programs for the GTK+ graphical user interface library     ii  libgtk2.0-cil                               2.12.10-5                                           amd64        CLI binding for the GTK+ toolkit 2.12     ii  libgtk2.0-common                            2.24.23-0ubuntu1                                    all          common files for the GTK+ graphical user interface library     ii  libgtkglext1                                1.2.0-3.1fakesync3                                  amd64        OpenGL Extension to GTK+ (shared libraries)     ii  libgtkmm-3.0-1:amd64                        3.10.1-0ubuntu2                                     amd64        C++ wrappers for GTK+ (shared libraries)     ii  libgtksourceview-3.0-1:amd64                3.10.2-0ubuntu1                                     amd64        shared libraries for the GTK+ syntax highlighting widget     ii  libgtksourceview-3.0-common                 3.10.2-0ubuntu1                                     all          common files for the GTK+ syntax highlighting widget     ii  libgtksourceview2.0-0                       2.10.5-1ubuntu2                                     amd64        shared libraries for the GTK+ syntax highlighting widget     ii  libgtksourceview2.0-common                  2.10.5-1ubuntu2                                     all          common files for the GTK+ syntax highlighting widget     ii  libgtkspell0                                2.0.16-1ubuntu7                                     amd64        a spell-checking addon for GTK's TextView widget     ii  libjavascriptcoregtk-1.0-0:amd64            2.4.0-1ubuntu2                                      amd64        JavaScript engine library from WebKitGTK+     ii  libjavascriptcoregtk-3.0-0:amd64            2.4.0-1ubuntu2                                      amd64        JavaScript engine library from WebKitGTK+     ii  libnm-gtk-common                            0.9.8.8-0ubuntu4.1-mint1                            all          network management framework (common files for wifi and mobile)     ii  libnm-gtk0                                  0.9.8.8-0ubuntu4.1-mint1                            amd64        network management framework (GNOME dialogs for wifi and mobile)     ii  libreoffice-gtk                             1:4.2.3~rc3-0ubuntu2                                amd64        office productivity suite -- GTK+ integration     ii  libwebkit2gtk-3.0-25:amd64                  2.4.0-1ubuntu2                                      amd64        WebKit2 API layer for WebKitGTK+     ii  libwebkitgtk-1.0-0:amd64                    2.4.0-1ubuntu2                                      amd64        Web content engine library for GTK+     ii  libwebkitgtk-1.0-common                     2.4.0-1ubuntu2                                      all          Web content engine library for GTK+ - data files     ii  libwebkitgtk-3.0-0:amd64                    2.4.0-1ubuntu2                                      amd64        Web content engine library for GTK+     ii  libwebkitgtk-3.0-common                     2.4.0-1ubuntu2                                      all          Web content engine library for GTK+ - data files     ii  mint-themes-gtk3                            3.10-5                                              all          Mint themes for GTK3     ii  python-aptdaemon.gtk3widgets                1.1.1-1ubuntu5                                      all          Python 2 GTK+ 3 widgets to run an aptdaemon client     ii  python-gtk2                                 2.24.0-3ubuntu3                                     amd64        Python bindings for the GTK+ widget set     ii  python-gtksourceview2                       2.10.1-2build1                                      amd64        Python bindings for the GtkSourceView widget     ii  python3-aptdaemon.gtk3widgets               1.1.1-1ubuntu5                                      all          Python 3 GTK+ 3 widgets to run an aptdaemon client     ii  transmission-gtk                            2.82-1.1ubuntu3                                     amd64        lightweight BitTorrent client (GTK+ interface)     ii  xdg-user-dirs-gtk                           0.10-1ubuntu1                                       amd64        tool to manage well known user directories (Gtk extension)      _qt libraries_ :               ii  libaccounts-qt5-1                           1.11+14.04.20140410.1-0ubuntu1                      amd64        QT library for single sign on     ii  libdbusmenu-qt2:amd64                       0.9.3+14.04.20140314-0ubuntu1                       amd64        Qt implementation of the DBusMenu protocol     ii  libqt4-dbus:amd64                           4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 D-Bus module     ii  libqt4-dbus:i386                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 D-Bus module     ii  libqt4-declarative:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 Declarative module     ii  libqt4-declarative:i386                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 Declarative module     ii  libqt4-designer:amd64                       4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 designer module     ii  libqt4-designer:i386                        4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 designer module     ii  libqt4-help:amd64                           4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 help module     ii  libqt4-network:amd64                        4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 network module     ii  libqt4-network:i386                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 network module     ii  libqt4-opengl:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 OpenGL module     ii  libqt4-opengl:i386                          4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 OpenGL module     ii  libqt4-qt3support:i386                      4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 3 compatibility library for Qt 4     ii  libqt4-script:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 script module     ii  libqt4-script:i386                          4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 script module     ii  libqt4-scripttools:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 script tools module     ii  libqt4-scripttools:i386                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 script tools module     ii  libqt4-sql:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 SQL module     ii  libqt4-sql:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 SQL module     ii  libqt4-svg:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 SVG module     ii  libqt4-svg:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 SVG module     ii  libqt4-test:amd64                           4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 test module     ii  libqt4-test:i386                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 test module     ii  libqt4-xml:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 XML module     ii  libqt4-xml:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 XML module     ii  libqt4-xmlpatterns:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 XML patterns module     ii  libqt4-xmlpatterns:i386                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 XML patterns module     ii  libqt5core5a:amd64                          5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 core module     ii  libqt5dbus5:amd64                           5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 D-Bus module     ii  libqt5gui5:amd64                            5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 GUI module     ii  libqt5network5:amd64                        5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 network module     ii  libqt5opengl5:amd64                         5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 OpenGL module     ii  libqt5positioning5:amd64                    5.2.1-1ubuntu2                                      amd64        Qt Positioning module     ii  libqt5printsupport5:amd64                   5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 print support module     ii  libqt5qml5:amd64                            5.2.1-3ubuntu15                                     amd64        Qt 5 QML module     ii  libqt5quick5:amd64                          5.2.1-3ubuntu15                                     amd64        Qt 5 Quick library     ii  libqt5sensors5:amd64                        5.2.1+dfsg-2ubuntu2                                 amd64        Qt Sensors module     ii  libqt5sql5:amd64                            5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 SQL module     ii  libqt5sql5-sqlite:amd64                     5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 SQLite 3 database driver     ii  libqt5test5:amd64                           5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 test module     ii  libqt5webkit5:amd64                         5.1.1-1ubuntu8                                      amd64        Web content engine library for Qt     ii  libqt5widgets5:amd64                        5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 widgets module     ii  libqt5xml5:amd64                            5.2.1+dfsg-1ubuntu14                                amd64        Qt 5 XML module     ii  libqtassistantclient4:amd64                 4.6.3-6                                             amd64        Qt Assistant client library (runtime)     ii  libqtcore4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 core module     ii  libqtcore4:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 core module     ii  libqtdbus4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 D-Bus module library     ii  libqtdbus4:i386                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 D-Bus module library     ii  libqtgui4:amd64                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4               amd64        Qt 4 GUI module     ii  libqtgui4:i386                              4:4.8.5+git192-g085f851+dfsg-2ubuntu4               i386         Qt 4 GUI module     ii  libqtwebkit4:amd64                          2.3.2-0ubuntu7                                      amd64        Web content engine library for Qt     ii  libqtwebkit4:i386                           2.3.2-0ubuntu7                                      i386         Web content engine library for Qt     ii  libsignon-qt5-1                             8.56+14.04.20140307-0ubuntu2                        amd64        Single Sign On framework     ii  python-qt4                                  4.10.4+dfsg-1ubuntu1                                amd64        Python bindings for Qt4     ii  python-qt4-dbus                             4.10.4+dfsg-1ubuntu1                                amd64        D-Bus Support for PyQt4     ii  qt-at-spi:amd64                             0.3.1-4fakesync1                                    amd64        at-spi accessibility plugin for Qt     ii  qtchooser                                   39-g4717841-3                                       amd64        Wrapper to select between Qt development binary versions     ii  qtcore4-l10n                                4:4.8.5+git192-g085f851+dfsg-2ubuntu4               all          Qt 4 core module translations     ii  sni-qt:amd64                                0.2.6-0ubuntu1                                      amd64        indicator support for Qt      ![chromium title bar](http://i.stack.imgur.com/6MVtZ.png)


title: what is the relationship between wvdial, pon and chat?

text: I've checked their man pages, but I'm still confused. I just know they are all related to ppp connections... I'm surprised that when I googled "pon wvdial relationship", I get no useful results, so I ask this question here. Who can tell me the role of these three tools? I still feel they do the same thing... and... I find that a new tool - pon.wvdial has come out, and what is it? I'm really confused with these tools...


title: C Shell script condition for if string contains a newline character

text: I'm not sure how to express this using the `csh` string matching syntax. I want to test whether a csh variable contains a newline. I'm basically looking for:               if ($mystr !~ <pattern for strings which contain a newline character>)      _Edit:_ in my particular case, I am trying to make a string like this pass:               1234ABC      And a string like this fail:               1234ABC      -------     FOOBAR      These are the output of a `sed` command, namely `sed '1d;$d'`. Not sure if that matters. The reason why I am trying to detect newlines rather than `" -------"` is for defense against changes in the formatting of the file I'm parsing. (Anyway, I don't think it matters what I'm doing with the file exactly, since I'm just looking for a general solution for detecting a newline character.)


title: Add autocompletion for custom script

text: I am currently working on a shell script I called `makeyourself.sh` (linked to `/usr/bin/mys`) which automatically installs a debian package from source (via `apt-get source -b $1`). So I decided to add an autocomplete function for the package name which is given as the first parameter: `sudo mys panth<tab><tab>` should then list every package beginning with `panth` — my try was as follows:               complete -C "apt-cache --no-generate pkgnames" mys      But it does not seem to work: when I press the tab key as mentioned above, at changes the parameter to `mys`, which returns me `sudo mys mys`. What am I doing wrong? Do I have to specify the location in the command where `complete` has to insert the string which shall be completed, like `{}` or `$1`? I use ElementaryOS, a Linux distribution based on Ubuntu. The script is a standard *.sh shell script which uses the standard `#!/bin/bash`


title: File not displayed using vi but visible with command ls -l CD*

text: I can do an `ls -l CD*` and see the following output. `CDTEST userA RW RW R` I am logged in as userA. But if I do an `ls -l` the file does not appear. If I do `vi CDTEST` it tries to create a new file named `CDTEST`. If I do a `mv` or `rm` I get the message no file of name `CDTEST` found.


title: How to run a command as if it is called from cron

text: I write a script and set it as a cron job. But due to a difference of environment variables it doesn't work as it should be. In that case I change a little bit with `crontab -e` and set a cron job time closest minute, and wait next minute to come to show the result. I feel this is a totally absurd approach, but I don't know better way to do it. If there is a way to run a script as if it is called inside cron job, I'm going to use it. Does anyone know how to do it?


title: Set environment inside `nsenter /bin/bash`

text: I'm entering a namespace with `nsenter -m -u -i -n -p -t $PID /bin/bash`. However, `printenv` inside this namespace doesn't have everything I need. I'd like to send these variables in, but I'd like to avoid prefixing my bash command like `KEY=VALUE KEY2=VALUE2 /bin/bash`. Is there a better way to do this?


title: Linux Image to recreate a machine with the same configuration

text: I have a CentOS 6.5 machine with some installed packages , I want three more identical boxes to be setup and I was wondering if I can make an image of the one machine that I have pre-configured and use that image to make copies of that one machine onto other machines. This would save me a lot of time, please let me know if this is possible ? Would OpenStack be an option here ? Thanks.


title: How can I find the hardware model in Linux?

text: I used a system information utility to take the model number of a system, and also of the motherboard.               DMI System Manufacturer     LENOVO     DMI System Product          2306CTO     DMI System Version          ThinkPad X230     DMI Motherboard Product     2306CTO        Is there a way to get model number, in this case `2306CTO`, in Linux?


title: grep command giving error

text: I am using grep to filter out the contents on some patterns(genes in my case). For more info,here is the earlier link. Find pattern from one file listed in another My code(should work) but is not.                grep -f file1 file2      Here is my subset of genes(file1):               C1QTNF3     C5orf22     C5orf28     C5orf34     C5orf38     C5orf42     C5orf49     C5orf51     C5orf64     C6     C7     C9     CAPSL     CARD6     CARTPT     CCDC125     CCDC152     CCL28     CCNB1     CCNO     CCT5     CD180     CDC20B     CDH10     CDH12     CDH18     CDH6     CDH9     CDK7     CENPH     CENPK     CKMT2     CLPTM1L     CMBL     CMYA5     COL4A3BP     CR749689     CRHBP     CRSP8P     CT49     CTNND2     CWC27     DAB2     DAP     DDX4     DEPDC1B     DHFR     DHX29     DIMT1     DMGDH      And below is my text file(file2) which is getting matched up,even though there is no gene UNC79 in file 1 as seen in SNPEFF_GENE_NAME=UNC79 show to be present in file2.                 AC=3;AF=0.016;AN=186;BaseQRankSum=0.075;DB;DP=292;Dels=0.00;FS=4.271;HaplotypeScore=0.0891;InbreedingCoeff=0.0225;MLEAC=2;MLEAF=0.011;MQ=59.18;MQ0=1;MQRankSum=0.969;QD=13.42;ReadPosRankSum=-0.373;SNPEFF_EFFECT=INTRON;SNPEFF_EXON_ID=23;SNPEFF_FUNCTIONAL_CLASS=NONE;SNPEFF_GENE_BIOTYPE=protein_coding;SNPEFF_GENE_NAME=UNC79;SNPEFF_IMPACT=MODIFIER;SNPEFF_TRANSCRIPT_ID=ENST00000256339;VQSLOD=9.31;culprit=DP      Hence,The output of grep is the whole text blob from file2. Below is the complete row from the file,which gives issue.The second column is the gene name. I dont have this gene in my file1.And so I dont want the output of this particular row.I have 1000 such rows of different genes,which need to be filtered out only for the genes that are in file1.                   intronic    UNC79   14  94062922    94062922    A   G   het 80.54   3   14  94062922    rs183710732 A   G   80.54   PASS    AC=3;AF=0.016;AN=186;BaseQRankSum=0.075;DB;DP=292;Dels=0.00;FS=4.271;HaplotypeScore=0.0891;InbreedingCoeff=0.0225;MLEAC=2;MLEAF=0.011;MQ=59.18;MQ0=1;MQRankSum=0.969;QD=13.42;ReadPosRankSum=-0.373;SNPEFF_EFFECT=INTRON;SNPEFF_EXON_ID=23;SNPEFF_FUNCTIONAL_CLASS=NONE;SNPEFF_GENE_BIOTYPE=protein_coding;SNPEFF_GENE_NAME=UNC79;SNPEFF_IMPACT=MODIFIER;SNPEFF_TRANSCRIPT_ID=ENST00000256339;VQSLOD=9.31;culprit=DP    GT:AD:DP:GQ:PL  0/1:1,2:3:33:39,0,33


title: RHEL & SUSE 2014 CPU & storage benchmarking tools

text: I have hundreds of Linux servers that we need to benchmark the CPU & Storage on. RAM & Networking would also be good. If possible I would to avoid installing a large suite, but not totally against it. Ideally I could run from a network location and not have to install anything. What we are trying to test is the infrastructure itself. So read/write IOPS, response time and GB/sec for storage for instance. I'm willing to write a script to kick off the command line, as these servers do not have a GUI on them just command line. These servers are all 64 bit with many cores and fiber attached storage. MOST of the tools and threads I found here on this topic were quite old. I was wondering if there are any modern testing tools that are open source and reliable. We would test each host one time and get the metrics, store them, then when there is an issue rerun to tests to be sure the infrastructure is not having an issue before we look at the apps etc. We will be doing the same for Windows hosts also, so if you have tools that work in both places that is a bonus. If the best tools are simply older but work great on the current RHEL and SUSE builds then I'm fine with that, it just needs to be simple to kick off a single command line or script it and capture results, without having a huge install footprint.


title: how to specify the libstdc++.so.6 to use

text: I am trying to compile a program of mine, that needs `C++11` features and a newer version of `boost` than is installed on the target machine. I therefore compiled and installed `gcc 4.9` to some local directory (`/secured/local`) with an in-tree build of all dependencies and the binutils. I then downloaded `boost 1.55` and ran `./boostrap.sh --prefix=/secured/local && ./b4 install` to install boost. Both compilations worked fine and `gcc -std=c++11` also works. My program is built using cmake with the usual `FindXX.cmake` procedure of finding files. I am running cmake like this:               cmake ../source/ -DBOOST_ROOT=/secured/local -DCMAKE_EXE_LINKER_FLAGS='-Wl,-rpath,/secured/local/lib'      which successfully finds my new boost installation and the new version of gcc. Compilation and linking both work flawlessly. However, upon execution of my program I am getting the following errors:               $ ./surface     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by ./surface)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /secured/local/lib/libconfig++.so.9)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /secured/local/lib/libboost_program_options.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /secured/local/lib/libboost_program_options.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /secured/local/lib/libboost_program_options.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /secured/local/lib/libboost_filesystem.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)     ./surface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /secured/local/lib/libboost_regex.so.1.55.0)      Running `objdump` on boost shows               objdump -x /secured/local/lib/libboost_program_options.so.1.55.0 | grep stdc++       NEEDED               libstdc++.so.6       required from libstdc++.so.6:      It appears as if both the boost libs try to use the old `/usr/lib64/libstdc++.so.6` instead the new one in `/secured/local/lib`. What did I do wrong in my procedure? Note, that I try to avoid setting the `LD_LIBRARY_PATH` somewhere.


title: Ulimit unlimited stack behavior oddity

text: I am running an application on a Solaris 10 system. Yesterday we have set the process stack size to unlimited:               ulimit -s unlimited      Today during the load the process would not come up reporting that it is "out of memory" during loading from Oracle database when the stack size was limited again to 8192K the process came up with no issues. There was a question regarding this on Stack Overflow: What is the effect of running an application with "Unlimited Stack" size? But we're not seeing the odd and usually varying memory related issues that one would expect. So there are 2 questions:   1. Is there a specific implication of setting stack to Unlimited that would revert to some system limits that might be lower then the current ulimit set per user?   2. Where could I find what those limits might be without having root access? **EDIT** `isainfo -v 64-bit sparcv9 applications vis2 vis 32-bit sparc applications vis2 vis v8plus div32 mul32`


title: Updating kernel on a Chromebook to prep for Chrubuntu

text: Pretty simple question: I have read that by setting my Chromebook to the dev channel, it will install a later kernel. Currently it's 3.4.0, and it'd install 3.8.0 (64-bit, no less). However, after changing the channel and waiting for the updates to happen, and rebooting, the `uname -r` command still shows 3.4.0. What gives? Is there an alternative? Some background: I recently got a Chromebook. It's an Acer C710. Naturally, I want to use it as a Ubuntubook, specifically Lubuntu. However, it copies your kernel over from ChromeOS, which is just 3.4.0 on the Acer C7. Updating isn't as simple as it is with a regular install, with GRUB and all that, since GRUB doesn't come into the boot process with Chrubuntu. So it seems like the easiest way is to get the dev kernel from Google. An updated kernel is pretty important - even Steam doesn't run without at least 3.6. Thanks!


title: Solaris - Inheriting by files the user's ownership of directory

text: I have a directory with ownersip like user:group. I want to make on it something like sgid, but for user - all of new created files have a directory ownership. For example:               drwxrwx--- 2 user   group   4096 Jun  3 16:10 test      And all created files in it have automaticly set following ownership on user:               -rwxrw---- 1 user group1 0 Jun  3 16:11 file1     -rwxrw---- 1 user group2 0 Jun  3 16:11 file2     -rwxrw---- 1 user group3 0 Jun  3 16:11 file3      It is possible to do this?


title: Error when adding phtreads support to PHP while following arch wiki

text: Willing to add phthreads support to PHP, I read this page and began to follow its instructions : https://wiki.archlinux.org/index.php/PHP_pthreads_extension But while the makepkg -s step, compilation stops with the following message :               checking whether build with IMAP works... no     configure: error: build test failed. Please check the config.log for details.     ==> ERROR: A failure occurred in build().         Aborting...      Looking at the relevant section from config.log :               configure:48953: checking whether build with IMAP works     configure:48997: cc -o conftest -I/usr/include -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fvisibility=hidden -pthread -D_FORTIFY_SO     URCE=2 -D_REENTRANT -L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro conftest.c  -lcrypto -lssl -lcrypto -lc-client -lcrypt -lpam  -lz -lpcre -lrt -lm -ldl -lnsl  -lxml2 -lz     -lm -ldl -lxml2 -lz -lm -ldl >&5     /usr/lib/libc-client.a(osdep.o): In function `ssl_onceonlyinit':     (.text+0xb696): warning: the use of `tmpnam' is dangerous, better use `mkstemp'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1b7): undefined reference to `X509_STORE_CTX_get_error'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1bf): undefined reference to `X509_verify_cert_error_string'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1d1): undefined reference to `X509_STORE_CTX_get_current_cert'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1d9): undefined reference to `X509_get_subject_name'     /usr/lib/libc-client.a(osdep.o): In function `ssl_open_verify':     (.text+0x1e9): undefined reference to `X509_NAME_oneline'     /usr/lib/libc-client.a(osdep.o): In function `ssl_server_input_wait':     (.text+0x1982): undefined reference to `SSL_get_fd'     /usr/lib/libc-client.a(osdep.o): In function `ssl_server_input_wait':     (.text+0x199d): undefined reference to `SSL_pending'     /usr/lib/libc-client.a(osdep.o): In function `ssl_server_input_wait':     (.text+0x19b6): undefined reference to `SSL_read'     /usr/lib/libc-client.a(osdep.o): In function `ssl_abort':     (.text+0x53d5): undefined reference to `SSL_shutdown'     /usr/lib/libc-client.a(osdep.o): In function `ssl_abort':     (.text+0x53de): undefined reference to `SSL_free'     /usr/lib/libc-client.a(osdep.o): In function `ssl_abort':     (.text+0x53f4): undefined reference to `SSL_CTX_free'     /usr/lib/libc-client.a(osdep.o): In function `ssl_sout':     (.text+0x54c6): undefined reference to `SSL_write'     /usr/lib/libc-client.a(osdep.o): In function `ssl_sout':     (.text+0x54e6): undefined reference to `SSL_get_error'     /usr/lib/libc-client.a(osdep.o): In function `ssl_start':     (.text+0x56de): undefined reference to `TLSv1_client_method'     /usr/lib/libc-client.a(osdep.o): In function `ssl_start':     (.text+0x56e6): undefined reference to `SSL_CTX_new'     /usr/lib/libc-client.a(osdep.o): In function `ssl_start':     (.text+0x5704): undefined reference to `SSL_CTX_ctrl'     (...)      It seems that all these missing references belongs to libcrypt.so, but I don't know how to solve this. Can you help me ?


title: Are there any security risks when mounting as root?

text: Are there any security related risks when mounting with root privileges compared to mounting with regular users?   I have a script which does some ecryptfs mounting with non-root privileges (by design), but it doesn't work as expected on all required Linux systems, so I'm wondering if switching to mounting as root is a good idea. Any help is greatly appreciated.


title: How to turn off single user mode on a remote machine?

text: I have a linux machine that I was accessing remotely and I made the mistake of doing `#init 1` which turned off networking on the machine. What is the easiest way to turn networking back on and/or get the machine out of single user mode? I do have personnel that can access the machine locally if necessary.


title: wpa_supplicant store password as hash (WPA-EAP with phase2="auth=PAP")

text: Is there a way to store my password in `/etc/wpa_supplicant/wpa_supplicant.conf` as some hash instead of plaintext? By "password" I refer here to the password used for phase2 authentification. I do **not** refer to the Preshared Key (PSK) which could be hashed using wpa_passphrase. For phase2 MSCHAPv2 or MSCHAP authentification I could store the password as MD4 hash using nt_password_hash (see example wpa_supplicant.conf line 659). Is there any way to store my PAP password as hash? Or: Is there a way to store the password in some sort of external storage? The example wpa_supplicant.conf suggests the use of such an external storage (using ext:????) but I could not find any documentation about it. I am aware that storing the password as hash does not increase wifi security. But as the password MUST be the same as the password for other services (account management, subscriptions, payments ...) I don't want it to be stored as plaintext.


title: How can I tell whether a package is installed via yum in a bash script?

text: I am trying to write a script that installs packages, but if it fails at any point later in the script rolls back whatever it installed. Of course if the user has already previously installed a package I don't want to uninstall it out from under them. How can my script tell whether a package has been previously installed via yum?


title: Is it possible to have an outgoing SMTP server when port 25 is blocked?

text: I have a Debian machine (actually a Raspberry Pi) that I would like to use as a rudimentary, outgoing-only mail server over a residential connection, just for kicks. Port 25 is blocked. I would like to set it up as a standalone SMTP server, not a relay. Is that possible? Comcast gives the impression I can use port 587 instead. http://customer.comcast.com/help-and-support/internet/email-port-25-no-longer- supported/ So does this guy (and a few others): http://dragos.fedorovici.com/exim- alternate-port-587/ But this answer http://serverfault.com/questions/452653/many-isps-is-block- port-25-how-do-i-choose-an-alternative-port/ sounds like 587 is only for use within local networks. Nothing I have tried works. It would be nice to know if the task is possible. **EDIT:** I didn't explicitly mention this, but I would like typical mail servers to be able to receive mail that I send from my machine.


title: How to repair an ext3 partition after broken resize operation?

text: I was using `gparted` to resize a near-terabyte ext3 partition, adding about 40 GB to the left. After nearly 12 hours of moving data (and with 23 more hours estimated to remain) the system hung. Now `fsck` reports too much illegal data in every inode. How do I fix the FS in this case?


title: Kernel Panic because of RAM stick?

text: one of my RAM sticks causes a Kernel Panic on my Ubuntu 10.10 (something like "not syncing" with a lot of memory adresses shown on screen). It's definitely this one RAM stick and not its socket because when I put one of the other sticks into the slot of the one RAM stick, everything is ok. How does it come that memtest doesn't find any errors after several cycles but Ubuntu is not able to boot while using this one special RAM stick? Does anybody have an explanation for that?


title: Light up a LED through USB

text: Hey, so I'm just playing around with a usb cable and an LED. I plugged in the usb to my computer and connected ground with the LED ground and the last usb pin (+) to the LED. It stays lit bright. I moved the wire from the usb power pin to the D+ pin. Is it possible that I could send a bit stream through usb that would in turn light up this LED? I'm not even a beginner with usb, drivers, etc. I just had the idea that hit me and wanted to see if it was possible as a sort of show off to friends.


title: Can I install Linux on Ankya 7802L 266MHz 128MB 2GB laptop?

text: I recently bought this cute little laptop computer (not much memory/HD/CPU): http://www.dinodirect.com/netbook-anyka-7802l-266mhz-128mb-2gb-nand-flash.html Has anyone successfully installed any Linux distro on it? I know Linux works well w/ low-end specs, so my main worry is drivers/etc. The laptop doesn't come w/ a recovery disk: how can I backup the OS it comes with (modified version of Windows?), just in case my Linux install fails. [I am not affiliated w/ DinoDirect, this is just a cool toy I bought myself]


title: Grub 2 installed on-partition - how to not embed it

text: My friend installed ArchLinux on a MacBook Pro alongside Mac OSX and Windows to try it. He's power user, so I only needed to help with the bootloader. Arch Linux's described installation of GRUB did not work (grub did not detect the 4th GUID partition it was installed on). I heard that with EFI GRUB 2 works, and it did. The problem is that it required embedding in an ext4 partition that had too little space for it. Is it possible to install GRUB 2 on an ext4 partition without embedding?


title: Setting processor fan to 100%

text: How can I set fans speed to 100% or more in linux ?


title: Would anyone like to help me start a Wikipedia page "List of rolling release Linux Distribustions"?

text: I can't find a definitive list of rolling distros any where on the web. DistroWatch doesn't have one, though I posted a comment suggesting they add such or label rolling releases and the type of release/dev. cycle generally. Wikipedia have a very small page for "Rolling Release" only which list about five or so merely as examples of rolling releases. I would like to start a Wikipedia page "List of Rolling Release Linux Distributions". I would be happy to help with such as I have been trying to find a good guide to Linux rolling release distros. If you would be willing to help me with the page please post below or email my screen name at gmail if you like the idea or have a better one. I still need to set up a Wikipedia account but thought I'd see if any one was interested in the project first. I would like to collaborate with other in creating the page as I've only used Linux for a year or so & I'm still something of a newbie. I look forward to hearing your thoughts on the proposal. ** Edit in reply to the comments below ** Fist of all I'd like to apologize for posting the question. Sorry: I should have read the guidelines first on what types of question are allowed. Feel free to erase this question entirely as I'm not sure how this is done. My question really should have been: "Does anyone know whether a comprehensive list of rolling-release Linux distros exists anywhere on the Web [before I bother to create a Wikipedia article for such]?". -- Would this be a suitable question to post on this site? If not I'll just leave things as they stand. BTW, many thanks to those who commented below (and Stefan Lasiewski & Maciej Piechotka for closing the question). In future, I'll endeavour to make sure I don't make the same mistake of asking an ambiguous question (or one that's inappropriate given the site's purpose). Many thanks for the clarification. Tuxalot.


title: Why do two Ubuntu systems in the same network behave differently in DNS resolution?

text: I have two systems, both running Ubuntu 12.04, which are within the same network (connected by hubs without routing logic). Both systems are configured quite similar, but not identical. In particular, the command `route` gives the identical results on both system. Within the network a windows server is operating by a name `winshared`. One Linux system work resolving the IP:               > nslookup winshared     Server:     127.0.0.1     Address:    127.0.0.1#53          Name:   winshared.somepc.xx     Address: 172.16.0.110      while the other Linux system fails with               > nslookup winshared     ;; connection timed out; no servers could be reached      Why do I see the difference in DNS resolution on both systems? And how to fix it? Additional remarks:   * The content of `/etc/resolv.conf` is identical on both systems with the content:              nameserver 127.0.0.1


title: G3 Usb Modem Huawei E1550 did not work after unplug (NetworkManager)

text: I have the following problem: When I boot with plugged in usb modem everything is fine. If I unplug modem and plug it back it can not be used any more. Some logs below. **1. Modem plugged on boot** **lsusb**               Bus 001 Device 003: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem       **usb_modeswitch log:**               USB_ModeSwitch log from Sun Apr 08 23:38:27 CEST 2012     Raw args from udev: /1-1.1:1.0     Using global config file: /etc/usb_modeswitch.conf     Using top device dir /sys/bus/usb/devices/1-1.1     ----------------     USB values from sysfs:       manufacturer  HUAWEI Technology       product   HUAWEI Mobile       serial         ----------------     bNumConfigurations is 1 - don't check for active configuration     SCSI attributes not needed, moving on     checking config: /usr/share/usb_modeswitch/12d1:1446     ! matched. Reading config data     config: TargetVendor set to 12d1     config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506     Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1     Command to be run:     usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 9 -v 12d1 -p 1446 -f $configBuffer          Verbose debug output of usb_modeswitch and libusb follows     (Note that some USB errors are to be expected in the process)     --------------------------------          Reading long config from command line          * usb_modeswitch: handle USB devices with multiple modes       * Version 1.2.1 (C) Josua Dietze 2011     * Based on libusb0 (0.1.12 and above)          ! PLEASE REPORT NEW CONFIGURATIONS !          DefaultVendor=  0x12d1     DefaultProduct= 0x1446     TargetVendor=   0x12d1     TargetProduct=  not set     TargetClass=    not set     TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"          DetachStorageOnly=0     HuaweiMode=0     SierraMode=0     SonyMode=0     QisdaMode=0     GCTMode=0     KobilMode=0     SequansMode=0     MobileActionMode=0     CiscoMode=0     MessageEndpoint=  not set     MessageContent="55534243123456780000000000000011062000000100000000000000000000"     NeedResponse=0     ResponseEndpoint= not set     InquireDevice disabled     Success check enabled, max. wait time 20 seconds     System integration mode enabled     Use given bus/device number: 001/009 ...     Looking for default devices ...      bus/device number matched      searching devices, found USB ID 12d1:1446      found matching vendor ID      found matching product ID      adding device      Found device in default mode, class or configuration (1)      Skipping the check for the current configuration      Using first interface: 0x00      Using endpoints 0x01 (out) and 0x81 (in)      USB description data (for identification)      -------------------------      Manufacturer: HUAWEI Technology          Product: HUAWEI Mobile          Serial No.: not provided      -------------------------     Looking for active driver ...     OK, driver found; name unknown, limitation of libusb1     OK, driver "unkown" detached     Setting up communication with interface 0     Using endpoint 0x01 for message sending ...     Trying to send message 1 to endpoint 0x01 ...     libusb:error [op_clear_halt] clear_halt failed error -1 errno 71     OK, message successfully sent     Resetting response endpoint 0x81     Resetting message endpoint 0x01      Could not reset endpoint (probably harmless): -34      Device is gone, skipping any further commands      Bus/dev search active, referring success check to wrapper. Bye.      ok:busdev      --------------------------------      (end of usb_modeswitch output)     Checking success of mode switch for max. 20 seconds ...      Waiting for device file system (1 sec.) ...      Waiting for device file system (15 sec.) ...     Reading attributes ...     All attributes matched     Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile)     Now checking for newly created ports ...      new ports found, device is known to driver     Checking for AVOID_RESET_QUIRK kernel attribute     AVOID_RESET_QUIRK activated     All done, exiting       **2.Modem unplugged and plugged back** **lsusb** Bus 001 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem **usb_modeswitch log:**               USB_ModeSwitch log from Sun Apr 08 23:46:12 CEST 2012          Raw args from udev: /1-1.1:1.0          Using global config file: /etc/usb_modeswitch.conf     Using top device dir /sys/bus/usb/devices/1-1.1     ----------------     USB values from sysfs:     manufacturer    HUAWEI Technology     product HUAWEI Mobile     serial       ----------------     bNumConfigurations is 1 - don't check for active configuration     SCSI attributes not needed, moving on     checking config: /usr/share/usb_modeswitch/12d1:1446     ! matched. Reading config data     config: TargetVendor set to 12d1     config: TargetProductList set to 1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506     Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1     Command to be run:     usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 7 -v 12d1 -p 1446 -f $configBuffer     Verbose debug output of usb_modeswitch and libusb follows     (Note that some USB errors are to be expected in the process)     --------------------------------     Reading long config from command line      * usb_modeswitch: handle USB devices with multiple modes      * Version 1.2.1 (C) Josua Dietze 2011      * Based on libusb0 (0.1.12 and above)     ! PLEASE REPORT NEW CONFIGURATIONS !          DefaultVendor=  0x12d1     DefaultProduct= 0x1446     TargetVendor=   0x12d1     TargetProduct=  not set     TargetClass=    not set     TargetProductList="1001,1406,140b,140c,1412,141b,1433,1436,14ac,1506"          DetachStorageOnly=0     HuaweiMode=0     SierraMode=0     SonyMode=0     QisdaMode=0     GCTMode=0     KobilMode=0     SequansMode=0     MobileActionMode=0     CiscoMode=0     MessageEndpoint=  not set     MessageContent="55534243123456780000000000000011062000000100000000000000000000"     NeedResponse=0     ResponseEndpoint= not set          InquireDevice disabled     Success check enabled, max. wait time 20 seconds     System integration mode enabled          Use given bus/device number: 001/007 ...     Looking for default devices ...       bus/device number matched       searching devices, found USB ID 12d1:1446       found matching vendor ID       found matching product ID       adding device      Found device in default mode, class or configuration (1)     Skipping the check for the current configuration     Using first interface: 0x00     Using endpoints 0x01 (out) and 0x81 (in)     USB description data (for identification)     -------------------------     Manufacturer: HUAWEI Technology      Product: HUAWEI Mobile      Serial No.: not provided     -------------------------     Looking for active driver ...     OK, driver found; name unknown, limitation of libusb1     OK, driver "unkown" detached     Setting up communication with interface 0     Using endpoint 0x01 for message sending ...     Trying to send message 1 to endpoint 0x01 ...     libusb:error [op_clear_halt] clear_halt failed error -1 errno 71     OK, message successfully sent     Resetting response endpoint 0x81     Resetting message endpoint 0x01     Could not reset endpoint (probably harmless): -34     Device is gone, skipping any further commands     Bus/dev search active, referring success check to wrapper. Bye.     ok:busdev     --------------------------------     (end of usb_modeswitch output)          Checking success of mode switch for max. 20 seconds ...      Waiting for device file system (1 sec.) ...      Waiting for device file system (15 sec.) ...      Reading attributes ... All attributes matched Mode switching was successful, found 12d1:1001 (HUAWEI Technology: HUAWEI Mobile) Now checking for newly created ports ... new ports found, device is known to driver Checking for AVOID_RESET_QUIRK kernel attribute AVOID_RESET_QUIRK activated All done, exiting **dmesg output:**               [  261.611314] usb 1-1.1: USB disconnect, device number 3     [  283.800711] usb 1-1.1: new high-speed USB device number 7 using ehci_hcd     [  283.899855] scsi11 : usb-storage 1-1.1:1.0     [  283.900156] scsi12 : usb-storage 1-1.1:1.1     [  284.638710] usb 1-1.1: USB disconnect, device number 7     [  300.687875] usb 1-1.1: new high-speed USB device number 8 using ehci_hcd     [  300.787664] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0     [  300.788085] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1     [  300.788450] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2     [  300.789174] scsi16 : usb-storage 1-1.1:1.3     [  300.790242] scsi17 : usb-storage 1-1.1:1.4       P.S. I am using NetworkManager 0.9.2.0, Arch Linux, XFCE **Update: Test on Xubuntu 11.10 Live CD** I have just tested it under Xubuntu.   * After booting I have plugged-in USB modem.      * Modem was immediately recognized by the system and start working   * I have unplugged it and plugged it back.      * Modem was recognized and working. **dmesg output**               [  902.454378] usb 1-1.2: new high speed USB device number 9 using ehci_hcd     [  902.562241] scsi14 : usb-storage 1-1.2:1.0     [  902.562632] scsi15 : usb-storage 1-1.2:1.1     [  903.278564] usb 1-1.2: USB disconnect, device number 9     [  919.341096] usb 1-1.2: new high speed USB device number 10 using ehci_hcd     [  919.450088] option 1-1.2:1.0: GSM modem (1-port) converter detected     [  919.450301] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0     [  919.450597] option 1-1.2:1.1: GSM modem (1-port) converter detected     [  919.450739] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1     [  919.450984] option 1-1.2:1.2: GSM modem (1-port) converter detected     [  919.451123] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2     [  919.454323] scsi19 : usb-storage 1-1.2:1.3     [  919.459118] scsi20 : usb-storage 1-1.2:1.4     [  920.456207] scsi 19:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2     [  920.460283] scsi 20:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2     [  920.749708] sr0: scsi-1 drive     [  920.749847] sr 19:0:0:0: Attached scsi CD-ROM sr0     [  920.749937] sr 19:0:0:0: Attached scsi generic sg2 type 5     [  920.752303] sd 20:0:0:0: Attached scsi generic sg3 type 0     [  920.761650] sd 20:0:0:0: [sdc] Attached SCSI removable disk      I would say, that dmesg output from Xbuntu looks similar to one from Arch. Any Ideas?


title: How to properly and easy configure `xdg-open` without any enviroment?

text: I'm using OpenBox window manager **without any desktop enviroment**. **`xdg-open`** behaves strangely. It opens everything with `firefox`.               $ xdg-settings --list     Known properties:       default-web-browser           Default web browser      I'm looking for simple program. Someting like reading every **`*.desktop`** file in **`/usr/share/applications/`** folder and automatically setting xdg settings.


title: Protect files from `rm -f`

text: Much to my immediate chagrin, removing write permission from a file does not seem to protect it from `rm -f`:               touch foo     chmod a-w foo     rm -f foo      How can I protect a file from accidental deletion when `rm` will be called with the `-f` flag? It looks like `chattr +i foo` would work, but it requires root on my system (is that intended?), so I'm looking for a non-root solution.


title: When running a shell script, is it possible to pass specific positional parameters without having to enter them all in order?

text: For example, if I have script ./foo that takes 10 parameters, and I only want to pass the 8th parameter. The only way I know how to do this currently is:               ./foo '' '' '' '' '' '' '' 'bar'      Is there an easier/better way?


title: Extract dates from /etc/shadow

text: The file `/etc/shadow` has a couple date fields that are expressed as the number of days since Jan 1, 1970. Is there an easy way using to get a list of users and the calendar date of the last password change, and the expiration? Ref: man shadow(5)


title: Get newest gcc for debian?

text: I can't build my apps on gcc since I use various c++0x features. I'm on Debian 6 (Lenny) and after upgrade/updating I have gcc version 4.4.5-8. I'm unsure which version is required but mingw 4.6.2 works. gcc 4.7.0 is out. How do I install gcc version 4.6+ on Debian?


title: Preventing LyX from getting a SIGHUP and closing when the terminal window is closed

text: I have written a Ruby script to manage my LyX documents. The script has a short CLI interaction with the user(=me), and then it decides the name of the file to open, and opens it via a `lyx` shell command. Now, the problem is, I need a terminal for the CLI interaction, but when I close the terminal, LyX pops a message box that says "SIGHUP signal caught! Bye." and when I click on `OK`, it closes LyX. That problem occurred when I launched the shell via Ruby's `exec` command(that closes the ruby process and starts a new process for the given shell command). When I tried to replace it with a fork, the LyX windows never opened - my guess was that LyX received the `SIGHUP` when the Ruby script finished and the terminal closed - and I confirmed that guess when I added a `gets` command at the end of the Ruby script to prevent it from closing - and then the LyX window was opened, but when I pressed `Enter` to finish the ruby script, LyX received the `SIGHUP` and closed. Now, I can probably solve this by replacing the CLI interaction with a GUI and giving up on the terminal window, but using a GUI for something like that seems like an overkill to me. So, is there a way to prevent LyX from closing when I close the terminal? I'm running OpenSUSE 12.1 64bit with KDE, and the terminal emulator is Konsole.


title: How to sum a bash array of numbers (some in scientific notation)?

text: Since the following command using bc does not work for numbers in scientific notation, I was wondering about an alternative, e.g. using awk?               sum=$( IFS="+"; bc <<< "${arrValues[*]}" )


title: What does this output from xev mean?

text: I'm interested in remapping some keys on my keyboard. In particular, I want to hold down the Function key, press the F1 key, and have this trigger a script. I know that `xev` is useful for figuring out what keycode is associated with a keypress. For example, when I press the `x` key, I get:               KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1597243, (-190,43), root:(910,336),         state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,         XLookupString gives 1 bytes: (78) "x"         XmbLookupString gives 1 bytes: (78) "x"         XFilterEvent returns: False          KeyRelease event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1597363, (-190,43), root:(910,336),         state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,         XLookupString gives 1 bytes: (78) "x"         XFilterEvent returns: False      This makes sense to me. However, when I press Function-F1, I don't understand what happens. **Why does pressing Function-F1 seem to behave as if I've also held the Windows button, and typed the letter`l`?** `xev` output when I press Function-F1:               KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735349, (-157,221), root:(943,514),         state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,         XLookupString gives 0 bytes:          XmbLookupString gives 0 bytes:          XFilterEvent returns: False          KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735350, (-157,221), root:(943,514),         state 0x40, keycode 46 (keysym 0x6c, l), same_screen YES,         XLookupString gives 1 bytes: (6c) "l"         XmbLookupString gives 1 bytes: (6c) "l"         XFilterEvent returns: False          MappingNotify event, serial 41, synthetic NO, window 0x0,         request MappingKeyboard, first_keycode 8, count 248          KeyPress event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735356, (-157,221), root:(943,514),         state 0x40, keycode 160 (keysym 0x1008ff2d, XF86ScreenSaver), same_screen YES,         XLookupString gives 0 bytes:          XmbLookupString gives 0 bytes:          XFilterEvent returns: False          KeyRelease event, serial 41, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735357, (-157,221), root:(943,514),         state 0x40, keycode 160 (keysym 0x1008ff2d, XF86ScreenSaver), same_screen YES,         XLookupString gives 0 bytes:          XFilterEvent returns: False          MappingNotify event, serial 42, synthetic NO, window 0x0,         request MappingKeyboard, first_keycode 8, count 248          KeyRelease event, serial 42, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735463, (-157,221), root:(943,514),         state 0x40, keycode 46 (keysym 0x6c, l), same_screen YES,         XLookupString gives 1 bytes: (6c) "l"         XFilterEvent returns: False          KeyRelease event, serial 43, synthetic NO, window 0x2600001,         root 0xae, subw 0x0, time 1735470, (-157,221), root:(943,514),         state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,         XLookupString gives 0 bytes:          XFilterEvent returns: False      When I press Function-F1 with a text window focused, it types the letter `l`. Background information: Running Lubuntu 11.10 on a Toshiba r835. Happy to provide any further details that might be helpful. EDIT: For comparison, when I type Function-F12, I get:               KeyPress event, serial 41, synthetic NO, window 0x2200001,         root 0xae, subw 0x0, time 8369184, (-620,473), root:(480,766),         state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,         XLookupString gives 0 bytes:          XmbLookupString gives 0 bytes:          XFilterEvent returns: False          KeyRelease event, serial 41, synthetic NO, window 0x2200001,         root 0xae, subw 0x0, time 8369344, (-620,473), root:(480,766),         state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,         XLookupString gives 0 bytes:          XFilterEvent returns: False      I wanted to check if there's something special about the F1-F12 keys, but it looks like at least some of them work how I expect.


title: Shortcuts in Xfce are not working anymore

text: After few weeks of using Xfce I suddenly ran into following problem - my keyboard shortcuts are not working when I am using two monitors (actually one monitor and notebook itself). When I unplug notebook from docking station, everything is working fine. It used to work correctly and I am not aware of any changes I made to settings so it must be some bad update or something. I am running on Xfce 4.10 and Fedora 18. P.S. It might be related to my another question


title: Window buttons (minimize, maximaze, close) are not visible in Xfce

text: Everytime I start my laptop my GUI is "broken" - windows don't have the top border with close, minimize and maximize buttons. I know I can run `xfwm4 --daemon` but it is really bothering to do that on every startup. It used to work without any problems until last week or so. How can this be fixed? P.S. It might be connected with my other question.


title: How do I attach my LVM RAID's to a new Ubuntu install?

text: I have an Ubuntu 9 Desktop system that I mainly use as a media server. I have a 2TB RAID5 and a 500GB RAID1, both using LVM. The OS drive is a 4GB CompactFlash card which has finally run out of space. I want to put in a larger CF card and install the latest version of Ubuntu. What do I need to do in order to attach these RAIDs to the new install?


title: Writing scripts that use different commands in different shells

text: How can I write a script that is shell independent? I want to be able to run one script which will run in `ksh`, `sh` and `bash`. For example: If I have a line in my script like `whence ls` which will run in `ksh` and not in `sh`, I want to be able to have something like               if (ksh)     then whence ls     if (sh)     then whereis ls      Can I use `$SHELL` value or is there any other way?


title: ZFS on Linux and Amazon EC2

text: I have a situation where I need dynamically expandable storage space on a Linux machine running in Amazon EC2, and ZFS came to mind. If I remember properly, ZFS supports a way to dynamically expand a non-redundant JBOD-like array. I have a few requirements for a project I'm working on:   1. I should be able to move the array to another EC2 instance if need be.   2. I should be able to dynamically expand the ZFS array, adding new "drives" to the ZFS volume without any downtime. Is this possible? If ZFS provides the ability to dynamically expand the array, I should be able to run a script which would dynamically create new EBS volumes, attach them to the EC2 instance, and have ZFS add them to its pool, all dynamically without downtime.


title: eth0: ERROR while getting interface flags: No such device

text: I set up CentOS yet. it's no network connection. eth0 is not device list. I take a message `network is unreachable` while `ping 192.168.0.1` the screen shot of device list How can I do reachable network?


How to get previous year and previous month in solaris 8? I have tried below command but none of them is correct:               date +'%m' -d 'last month'     date +'%Y' -d 'last year'


title: Why root can't open pseudo terminal device? (permission denied)

text: Using a non-root user, I'm creating a pseudo terminal with socat like this:               socat -d -d PTY,link=$HOME/.wine/dosdevices/com1,raw,echo=0 PTY,link=/tmp/com1-pty,raw,echo=0      and I need a root application to open this `/tmp/com1-pty`. Any attempt to do this results in a permission denied and the following syslog message:               Feb 10 17:21:06 ti0085 kernel: [  590.692819] type=1702 audit(1392060065.998:1004788): op=follow_link action=denied pid=6091 comm="menu" path="/tmp/com1-pty" dev="sda1" ino=48758820      I have tried many things, including setting permissions for both `/tmp/com1-pty` and the device to witch it links to 777. Also I have added root to dialout group - even though I don't believe it would make any difference, for I would expect the root to be able to open anything. What I'm doing wrong?


title: How to configure Ruby to use the correct gemset or Ruby version on a per-project basis?

text: I open a terminal and navigate to my project folder (ex: `cd /proj/tickecting_app`). After this I execute this command: `rvm use ruby 1.9.x@gemset` . I want this command to run this every time I open the terminal. Is there a way to run this automatically? And to be more specific I navigate to different projects in separate tabs. For example:   * First tab `cd /proj/tickecting_app` and run `rvm use ruby 1.9.x@gemset`.   * Second tab `cd /proj/rss_feed_app` and run `rvm use ruby 2.1.x@gemset`. I want to run different commands depending upon the project. Is this possible?


title: All my Chromium extensions are hidden behind a single drop-down

text: Today I found all my installed Chromium plugin menu have become hidden behind a drop-down style: ![enter image description here](http://i.stack.imgur.com/A06xs.png) Anyone know how to get them back?


title: Unable to boot from Fedora LiveCD

text: So I finally decided to move from Windows to Linux. But before that I have wanted to try Fedora distribution from LiveCD. So I downloaded `Fedora 17` .iso file, unpacked it and then burned on my CD. I rebooted the computer and saw message saying "Select proper boot device" (and yes, I change settings right in `BIOS`). So my next step was creating LiveUSB with help of this creator. I still got the same message, even on my friends computer. File structure of the LiveUSB (CD) looks like this   * boot   * EFI   * LiveOS   * syslinux   * GPL (file) Can anybody advice what could possibly be the problem?


title: how to make my bash script look 100% like a GUI app (so user never sees terminal)

text: I created a bash script using kdialog (and it runs on Kubuntu 12.04). The GUI is used for every user interaction (after the first one). However, the script still has to be launched from the terminal and the terminal is still visible even though the user never needs to read terminal output or enter anything into the terminal. Is there a simple way to go to the next step and make my bash script look 100% like a KDE Gui application? From the initial answers by slm and Ilya Ananyev below, I see that making a .desktop file can accomplish this. That's pretty amazing to me and it is the kind of simple answer I was looking for. (I wanted a task I can complete on my lunch hour and take my bash script the rest of the way toward looking like a real GUI app.) The .desktop file may be the right answer for other readers of this question too. However, in my specific case, the script is an installer script. So I find myself in a Catch-22. How do I install the .desktop file to launch my installer without the user having to first run another installer for the .desktop file? Furthermore, in my case, the script is used by end users who are **not** computer literate. The end users purchase a computer with Linux preinstalled at my recommendation. My goal is to let them install my software without going to the terminal at all. (Most likely they have never seen a command prompt before -- some of them don't even know how to use a mouse yet!) So, it appears, my solution requires some magical way to get the .desktop file installed so that the user can then click it to launch my installer script. In summary, my main requirements are:   1. a way to launch the script without showing the terminal. **A .desktop file will accomplish this.**   2. a way to keep the terminal hidden during execution (as I rely entirely on kdialog). **A .desktop file will accomplish this with`Terminal=false` set.**   3. optionally, a secure way for the user to enter their sudo password. I know about the kdialog password entry dialog, but the usage examples I've seen are not secure. **kdesudo may be a solution but it reprompts for the password many times, ignoring the usual/default sudo timeout of X minutes. So it isn't working for me atm.**   4. simple enough to implement on my lunch hour. **A .desktop file will accomplish this.**   5. utilizes my existing bash script with kdialog. **A .desktop file will accomplish this.**   6. doesn't require the user to undertake additional setup steps before they can run my script. **It turns out that a KDE user can click a .desktop file which resides at any location. So my users can download the .desktop file into their ~/Downloads folder and launch it from there.**


title: 403 http code appears when I go to a certain website

text:
I wrote a PHP script to a particular site using a home computer for debugging. Script worked properly, when I tested it on a home computer. The script has stopped working when I deploy the script on the server (CentOS). I thought, that I made a mistake when writing the script, and created this issue. **Chuan Ma** suggested that the website administration blocked server IP. I wrote to the admins and they said that they do not block the IP. **My problem is that I can not go to the site using the server.** I tried several tools for getting html of the site.   1. I have tried to use the browser. I deployed on my server this script and went to the site as a real user. When I visit the site using the browser, I get an error (http code 403).   2. I have tried `curl` from the command line.               server:~# curl http://4pda.ru/          <title>403 Forbidden</title>
403 Forbidden

nginx                  3. I tried the utility `wget`.              server:~# wget  http://4pda.ru --quiet -O -     server:~#      I do not know what to do now. I would welcome any advice.


title: Finding a file which created X minutes back (without GNU/BSD find)

text: I am using the `find` command to find the files which were created with in 30 minutes.               find . -ctime -30m      But it is giving files from up to 30 days. I have tried `-mmin` too but it is showing that `-mmin` is not a valid option. What is wrong in my `find` command? Output for `uname -rs` is `AIX 2`.


title: exclude commands from user's sudo permissions

text: Consider the following line in a `/etc/sudoers` file:               username ALL=(ALL) ALL, !/usr/bin/passwd      as far as I know, this allows user `username` to use sudo, unless he not uses `/usr/bin/passwd`. But apparantly the user is still able to get a root shell using `sudo -s`/`sudo -i` and do whatever he likes. Have I understood this correctly? What would be a better configuration if I indeed want to disallow the user to change any password as root.


title: Dmenu does not start some programms (e.g., emacs) -- is there a log file?

text: I'm running dwm with dmenu under Arch Linux. While dmenu is working, it doesn't start some programs, e.g., emacs, although it shows the command with auto-completion. When I start them in the terminal, it works fine. What can I do? Is there an error log file for dmenu?


title: How to stop redirection in bash

text: I use :               exec >script.log 2>&1      in my script to redirect all output to a file. At the end of the script I would like to print a message to the screen. How do I stop the redirection?


title: Why is my /etc/apt/sources.list set to squeeze when I have debian wheezy?

text: I have set up a few new debian boxes which were installed with debian wheezy (7.1). I set them up and upgraded to the current stable release:               $ cat /etc/debian_version     7.6      If I look at my `etc/apt/sources.list` which I haven't touched at all I get:               $ cat /etc/apt/sources.list     deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free     deb http://http.us.debian.org/debian stable main contrib non-free     deb http://security.debian.org/ squeeze/updates main     deb-src http://security.debian.org/ squeeze/updates main      The last two appear to be set to squeeze which I have not had installed on this box at all. I would like to install certain packages from unstable so am looking to add the repos following this guide. I would also like to check I have the correct canonical form of the sources.list before changing it so was wondering whether what I have is correct or whether it should be changed. I have been unable to find a canonical answer to what the default sources.list for debian 7.4 should be (I tend to use arch personally and am quite new to debian). Edit: reading here I am unsure of whether I shoud be using stable or wheezy as the variable. Thanks in advance.


title: Arrow key/Enter menu

text: I need help finding out how to possibly create a menu in a shell script that will display 3 options that a user will use the arrows keys to move the highlight cursor and press enter to select one. If anyone could possibly just make a quick example of a menu or point me in the right direction of what I should be researching that would be great. As of right now I am not really sure what I should be even searching google for. Thanks


title: /dev/null-like automatic trash directory for file moves?

text: I can (redirect) textual output to `/dev/null` in order to get rid of it. This is quite handy because this way I can easily enable/disable it in my bash code. Now I have a script that processes files, and after it is done with them, moves them to another destination. An simple example would look like this:               source_dir=some/source/path     target_dir=some/target/path     for f in `ls $source_dir`; do echo $f; mv $f $target_dir; done      Now when I decide that I'm no longer interested in moving the files to the target dir, but to delete the files directement, what is the most efficient way to achieve this (in terms of lines of code to edit)? I can think of putting the `mv` command into a variable as well:               process_cmd=echo     finnish_cmd=mv     source_dir=some/source/path     target_dir=some/target/path     for f in `ls $source_dir`; do $process_cmd $f; $finnish_cmd $f $target_dir; done      Then I could later change to something like:               process_cmd=echo     finnish_cmd=rm     source_dir=some/source/path     target_dir=     for f in `ls $source_dir`; do $process_cmd $f; $finnish_cmd $f $target_dir; done      But I thought it would be even simpler, if it was possible to specify a `/dev/null`-like trash target directory that is automatically cleaned up eventually (that is sort of `rm` semantics with the `mv` command):               process_cmd=echo     finnish_cmd=mv     source_dir=some/source/path     target_dir=/dev/null # <--- is there some sort of trash folder for such tasks?     for f in `ls $source_dir`; do $process_cmd $f; $finnish_cmd $f $target_dir; done      Is there a definitive way to go / a general best practice for a case like this?


title: how to convert multiple txt to CSV with field data separated by blank lines

text: I have some data in multiple text files where fields are separated by blank lines. There are only 4 fields but in the second field there are more subfields, could be three or more. The first field is always a number, 0 or 1.               0     name_surname     1 yellow 1 brown 2 green      short description      every file is made in the same way. The problem is I could have more or less colours in the third field. Every txt should become a row in a csv file               0 [tab] name_surname [tab] 1 yellow ; 1 brown; 2 green [tab] "description"     1 [tab] name2_surname [tab] 1 brown; 1 blue [tab] "description"      After some reading I've found I should use awk in some way, but this is beyond what I can do.


title: Wifi-Hardware seems not to be enabled

text: in my MSI Wind-Box DC 110 I have this Wifi Chip: RTL8188CE (says the sticker on the chassis and the vendor told me that they are sure the device is implemented) and I cannot connect to any Wifi - still I don't see even the "Wireless Connections" Overview in the Network Dialog... I am Using Ubuntu 12.04. _I already changed the driver to the right version following this tutorialhttp://unixblogger.wordpress.com/2011/10/18/the-pain-of-an-realtek- rtl8111rtl8168-ethernet-card/ And the r8168 Driver is in use. (which was for the ethernet controller and had nothin todo with my problem :( )_ But no Wifi LED is shining and no Wifi connections are listed. There is no hardware trigger on the device to enable or disable Wifi What can I do? It seems that I cannot detect the device... **UPDATE**               $: iwconfig     eth0      no wireless extensions.          lo        no wireless extensions.      lsusb:               Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 007: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse     Bus 001 Device 008: ID 05ac:0221 Apple, Inc. Aluminum Keyboard (ISO)     Bus 001 Device 003: ID 0bda:0139 Realtek Semiconductor Corp. //a card reader     Bus 001 Device 004: ID 0409:005a NEC Corp. HighSpeed Hub     Bus 002 Device 003: ID 0781:5571 SanDisk Corp. //a usb stick     Bus 001 Device 005: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard     Bus 001 Device 006: ID 04e8:6881 Samsung Electronics Co., Ltd //a mobile phone      lspci:               00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)     00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)     00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04)     00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)     00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)     00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)     00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)     00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)     00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)     00:1f.6 Signal processing controller: Intel Corporation Panther Point Thermal Management Controller (rev 04)     01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)


title: Utility to tag regions of audio files

text: For example, say I have a recording with lots of noise and people speaking, I'd like to tag areas where people are speaking with a 1, and by default everywhere else is 0. Then save this file separately, one tag per sample. _mhWaveEdit_ has an ideal user interface to do this, but this tagging functionality isn't included and the project seems to be moribund at present.


title: how to tell hibernate, if battery low

text: I need to tell to `power-manager` (with `gnome-shell`) , if battery is low,`pm-hibernate` will be run. Now i want to tell via `gsettings commmand`. How can i do it?


title: Show command executed along with output in log file

text: Is there a quick and dirty way to not only log the output of a shell file but the commands used inside as well? For example: `whoami > who.dmp` would output a file that contained something like: `my_username` For a longer shell file, what is the most effective way to display the command that caused the result in the log file as well Ex:               log.txt     ###############          echo whoami  <- I want this to show in the file as well     my_username          time   <- I want this to show in the file as well          real    0m0.00s     user    0m0.00s     sys     0m0.00s      Is there a way to do this without hard-coding exporting the command into the output file every single time?


title: How to copy a file within its original directory, most easily?

text: What I want to do is basically               cp long/directory/path/file long/directory/path/file-copy      This or similar operations are pretty common. Typing out the whole path twice is obviously awkward, even with auto-completion or copy-paste. There are a couple of simple ways to do it, but none seems ideal:   * First `cd` into the directory, then simply `cp file file-copy`. Least keystrokes, but I end up in the directory, which I didn't really want.   * Wrap the above in a subshell, `sh -c 'cd dir-path; cp file file-copy'`, to make the `cp` local. Fair enough, but that means I have to type the commands in a string literal, which disables auto-completion and isn't overall nice.   * Define the dir as a variable, then just `cp "$dir/file" "$dir/file-copy"`. Can work nicely, but I'm kind of paranoid about namespace pollution...   * `echo dir-path | while read p; do cd "$p"; cp file file-copy; done`. Basically combines subshell-wrapping with variable definition, by emulating a lambda-calculus stype let-binding with `read`. I quite like it, but it's just a bit weird, and involves a lot of extra characters.   * Anything I can come up with that uses `sed 's/file/file-copy/'` needs even more boilerplate around it.   * _Open_ the file with an editor, then save-as. Not well applicable to non-text files, and often resource-costly. Is there a more elegant alternative? Ideally one that works with `mv` as well, analogously.


title: /long/path/to/{multiple, files} syntax?

text: > **Possible Duplicate:**   >  Quick way to include a directory path when calling mv? Is there any way in bash to type a path once, and then reference several files at once? Here's what I do now: ` cd /origin/path/   mv file1 file2 ../../destination/path/ ` Here's what I'd rather do: ` mv /origin/path/{file1, file2} /destination/path/ ` possible? Thanks!


title: Quick way to include a directory path when calling mv?

text: Often I will work out of the root of a rails directory where I find my self navigating the same path twice every time I would like to move a file:               mv app/views/layouts/application.html.erb app/views/layouts/application.html.haml      The haml is just one of may examples where I need to change the file name without modifying the directory it currently lives in and without changing directory. Is there a way to achieve this?


title: Rename file in another directory without repeating path

text: I often need to make a small change to a file nested several directories below my current working directory. Since it's only one file, and globbing/scripting would be overkill, I make the change manually. For example, I need to rename the file `blaz.txt` in ./foo/bar/blee to `foobar.txt`:               .      |--foo       |--bar          | blee            |-- blaz.txt      Normally, I do this by `cd`'ing to `blee` and running `mv blaz.txt foobar.txt` for single files. I know I could type out the full paths (resting on some handy tab completions to speed things up), but I would prefer something quicker. Is there a better way to do this?


title: Is there a way to refer to multiple files in a directory without retyping the whole path?

text: In a bash shell, when I have to remove multiple files in the same directory, I currently need to do something like this: `rm /some/path/file1 /some/path/file2` Is there a shorter way to write this so I don't have to retype `/some/path/` without using a variable or changing the working directory? Perhaps something similar to: `rm /some/path/(file1,file2)`


title: Minimal command to make a copy of a file

text: I often find myself copy-pasting long path in order to create a copy of a file               cp /path/to/file/file1 /path/to/file/file1.bkp      Is there an alternative utility that will NOT require me to type the path/to/file twice? Something like -               nameOfExecutible /path/to/file/file1 'bkp'      Note: I don't want to do a `cd` to `file1`s parent directory.


title: Quickest way to rename files, without retyping directory path.

text: I know how renaming files in Linux :               $ mv ~/folder/subfolder/file.txt ~/folder/subfolder/file.sh               ^------this part-------^    ^------this part-------^      I think it takes too long time to repeat `~/folder/subfolder/file` twice. Is there any fast way ?


title: find the set of common files between several directories?

text: I'm looking to compare directories of Drupal themes. A drupal theme is a directory composed of several files, and I'm trying to figure out which ones are essential. For instance, they might all have a file called `template.php` or `page.tpl.php`. How can I find the set of all common files for several directories? In my case, all the 'same' files (those of the same name) are going to be in the same level directory.


title: Pasting binary data into a Unicode terminal

text: I need to be able to paste binary data into a terminal. For some reason, every byte outside the ASCII range (`0x80`-`0xff`) is pasted as the same three byte sequence `0xef 0xbf 0xbd`. For example:               $ echo -en "\x80" | xclip     $ hd     <paste><EOF>     00000000  ef bf bd                                       |...|     00000004      It has something to do with the character encoding used by the terminal since if I change it from UTF-8 to ISO 8859 or similar every character in the extended range is translated to `0x3f`. Does anybody have an idea on how to paste arbitrary binary data into the terminal? **Edit:** This seems to be very terminal dependent. The example above is in Konsole. I get the desired behavior in xterm and Gnome Terminal doesn't allow to paste characters in the extended range at all. Any Konsole specific solution would still be appreciated.


title: SH process is using 50% of CPU, why is that?

text: I have CRON running every 30 seconds, but that would fall under the `crond` process correct? Why is `sh` command sucking up 50% of my CPU when no one is running a Shell Script?


title: RHEL6 LDAP client not listing all the groups

text: Using sssd I have a RHEL6 client configured to login using LDAPS. The login works, but if the user logged in is assigned to more than 1 group at the LDAP level, groups only returns 1 group? Could I be missing a configuration somewhere? The group shown is the default group assigned to the user. In RHEL5 clients, the group command displays all the groups that are assigned to the user.


title: rsync "Permission denied" despite ownership

text: I just rsync'd a bunch of files, from a Windows box running cygwin sshd, to a CentOS 6.4 box. I ran `rsync -e sshd...` on CentOS to do this. Then I plugged in a USB drive on the CentOS box, formatted as ext4 using `mkfs.ext4`, and mounted it at /mnt/backup **(with no extra options)**. Then I did `chown` on /mnt/backup, and ran `rsync -vrlptg` to copy the files from the CentOS box to /mnt/backup. A handful of random files (a few dozen of a few hundred thousand, mainly from 4 different directories, but not all of the files in those directories) failed with permissions errors. But when I `ls -l` on the CentOS box, it shows that I own all of them. If I `sudo rsync` instead, it copies everything without complaining. Why does it seem that rsync thinks I don't have permission to copy my own files to my own drive? **Update** : although earlier it said `myuser` owned them, I've since run a `sudo rsync -e sshd` and now most (but not all) files, despite being in a folder in my home drive on the CentOS box (/home/myuser) are now no longer owned by `myuser myuser` but instead are owned by `513` or `dialout`, which I never set up as users.


title: Finding log file of ntp daemon in Ubuntu 10.04 LTS

text: My Ubuntu is set to run `ntp` before `dovecot` at startup. (See my earlier question: The rc0.d,rc1.d,... directories in /etc in Ubuntu 10.04 LTS) However, I suspect that `dovecot` may have finished executing before `ntp` finished (even if the `ntp` started executing earlier). What logs should I look at to find out whether this was the case? * * * (In case you're interested: The reason for my suspicion is a message like this in `/var/log/mail.log` when I rebooted my machine (it had been a long time since the last reboot): > dovecot: Fatal: Time just moved backwards by 43 seconds. This might cause a > lot of problems, so I'll just kill myself now. This was fixed by rebooting the machine again, providing further support for my suspicion.)


title: Driverless Windows webcam supported by UVC under 3.10 kernel?

text: There are 'driverless' webcam that plug into Windows 7 and will work directly without driver, in same way as USB finger disk, just plug in and work automatically. Is it true that the mechanism works because the webcam conforms to UVC standard? UVC is new to me but I read some info from http://www.ideasonboard.org/uvc/ http://en.wikipedia.org/wiki/USB_video_device_class Is it true that these UVC webcam will work with Raspbian Debian Wheezy with 3.10 kernel, since UVC and V4L2 are included in kernel since 2.6.26?


title: Restarting gnome-shell - KDE programs look ugly

text: I needed to restart my gnome-shell. I did this on the tty1 via `export DISPLAY=:0.0` `gnome-shell --replace` This helps to keep all the open programs, but all KDE program have a different (e.g. ugly) window decorations. Then I tried `kwin --replace` which looked pretty cool for 5 secs and then I found out, this won't work :) Is there a way to get back the former looks? (QT and XUL programs still look fine, firefox and others)


title: How to do domain filtering in Linux?

text: Preferably something similar to `iptables`. Basically, I want to do domain filtering/whitelisting/blacklisting like I would with IPs in `iptables`. Are there any recommendations on how to do this?


title: Can I "drag" a file into a window without a file manager?

text: (I'm on Arch Linux, using i3 as my wm and xterm as my terminal emulator, though I don't know if any of that is relevant.) Occasionally, a website asks me to drag a file with my mouse from my desktop into the internet browser's window. Almost always, there is an alternative, but recently I found something I want to do that requires the drag and drop. Unfortunately, I don't have a file manager. I navigate my computer's file system solely through bash. Is there a way I can fake the drag and drop action? Can I tell my browser "I just dropped this file onto you" without actually doing it? Worst case scenario, I can download a graphical file manager exclusively to drop files into my web browser, but I'd like to avoid that solution.


title: How do I get Ctrl + Alt + t to launch ther terminal in Linux Mint 13 MATE?

text: Pressing `Ctrl` + `Alt` + `t` seems to do nothing on my Linux Mint 13 MATE. How can I set this shortcut to launch a terminal window? As a detail, it seems the terminal is `mate-terminal` rather than `gnome- terminal`.


title: yum install wireshark-gnome

text: I tried using command `yum install wireshark-gnome` to install wireshark on RedHat 6.3. And I make sure the network is ok. But it fails cause by below prompt.               Loaded plugins: product-id, security, subscription-manager     Updating certificate-based repositories.     Unable to read consumer identity     Setting up Install Process     No package wireshark-gnome available.     Error: Nothing to do      It looks repository of yum does not work. It should not have wireshark installation package. So I try intall new repository as below.               wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm     wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm     rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm      It still does not work. Could you help me to find a usable repository?


title: How can I enable URL rewriting on a DD-WRT router?

text: I would like to be able to add a parameter to certain URL requests that go through my DD-WRT router. Specifically, I'm trying to figure out how to force safe search in Google, which means I have to append `safe=on` to any URL requests that begin with `*google*`. I've read about running a server on the router that acts as a proxy. Then on that server I could use mod_rewrite or something similar. I've also read about firewall rules using iptables. Both of these are way over my head, but I can't seem to find any real guidance on this.


title: How can I block a specific URL on a DD-WRT router?

text: I've been looking everywhere for this. Does anyone know how to block a specific URL on a DD-WRT router? For example, I want to block `website.com/whatever` but not `website.com`, `blah.website.com`, or `website.com/blah`. Is there a way to do this, or can you only block the whole domain? I tried adding the URL in question under Access Restrictions in the DD-WRT configuration but it doesn't seem to have any effect. Here are my settings: ![enter image description here](http://i.stack.imgur.com/mPIcR.png) and here is the list of clients: ![enter image description here](http://i.stack.imgur.com/SwQGx.png) I can still easily browse to google.com/imghp and google.com/images (which redirects to google.com/imghp) on my main PC with IP address 192.168.1.146. On this page of the DD-WRT wiki, it says "Under Website Blocking by URL Address, enter in the domain name(s) you wish to block (if any)." This, in addition to posts on the DD-WRT forums, gives me the impression that you can only block domains under Access Restrictions in the DD-WRT setup. I'm starting to wonder if this problem must be solved using iptables, or possibly by installing a proxy server on the router itself. # EDIT User goli on the DD-WRT forums had this to say on the matter (link): > There's a Privoxy version that runs on DD-WRT quite well. I just installed > it. > > Privoxy has a parameter "accept-intercepted-requests 1" that allows to use > it as a transparent proxy. > > I added a single iptables rule that passes some web traffic requests to the > proxy instead of directly routing it: >   >   >     iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -s > 192.168.0.128/255.255.255.224 -j DNAT --to 192.168.0.1:8118 >   > > Privoxy has so called "actionfiles." Those define what to do when a request > URL matches a given regular expression. One of the possible actions is > "block." Since then, I've been working on figuring out how to install Privoxy on the router. It's rather complicated, especially since I don't have enough spare flash memory to install it via SSH using ipkg. (See this question on Super User.) My second approach is to use the Firmware Modification Kit, which you can read about here. I've had some difficulty flashing a custom build, but once I get it all sorted out I'll post my results here.


title: Querying display power status on Linux (Xorg) on command line

text: Is there a way to query the power status of an Xorg/X11 display from command line? I want to know if my laptop LCD is powered on after the screen saver-- apparently the backlight is still on. This is despite my gnome-screensaver- preferences setting that after 5 minutes of idling, the display is supposed to go to sleep. I am using Debian 6 and whatever x server comes with it. I see that `upower` utility has some nifty switches, but they are not documented.


title: Is there a light HTTP proxy I can run without root privileges?

text: I am on a network where outgoing port 8080 is blocked on most machines (i.e. I cannot access services on port 8080). Some of the machines on the network however do not have this restriction. I would like to run a proxy on an unrestricted machine and forward outgoing requests to 8080 via that proxy. I do not have root access on any of these machines. I have looked at squid, which compiles fine on the machine I want to run the proxy on, but as it is a service I do not think I can run it effectively without root access. I have also experimented with ssh port forwarding, but as there is no service running on the unrestricted machine I don't think ssh will solve my problem. If there is some other way to achieve this objective I am open to that too.


title: Allowing user to read only parts of NTFS filesystem

text: After installing ntfs-3g I have an option in nautilus to mount a Windows directory but I need to give root password. While I have no objection to giving root password I would prefer to be restricted to permission of corresponding Windows user (i.e. disallowing modification of system files). Is is easily achievable or do I need to post feature request?