title: Installing a package

text: I am running crunchbang linux and I would like to know if there is a way to install the Android Developent Tools as a package on my computer. I already have it extracted to a folder in my ~/downloads directory, how do i "install it".


title: Installing Git Unit

text: I am trying to install git using my yum command Following is the error log               Loaded plugins: product-id, refresh-packagekit, security, subscription-manager     Updating certificate-based repositories.     Unable to read consumer identity     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed     --> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Running transaction check     ---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed     --> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64     --> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64     ---> Package perl-Error.noarch 1:0.17010-1.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: 1:perl-Error-0.17010-1.el5.noarch     ---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64     ---> Package perl-TermReadKey.x86_64 0:2.30-4.el5 will be installed     --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-TermReadKey-2.30-4.el5.x86_64     --> Finished Dependency Resolution     Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)                Requires: libssl.so.6()(64bit)     Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)                Requires: libexpat.so.0()(64bit)     Error: Package: perl-Git-1.8.2.1-1.el5.x86_64 (epel)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)                Requires: libcrypto.so.6()(64bit)     Error: Package: perl-TermReadKey-2.30-4.el5.x86_64 (epel)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: 1:perl-Error-0.17010-1.el5.noarch (epel)                Requires: perl(:MODULE_COMPAT_5.8.8)     Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)                Requires: libcurl.so.3()(64bit)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest      The command `yum repolist`               Loaded plugins: product-id, refresh-packagekit, security, subscription-manager     Updating certificate-based repositories.     Unable to read consumer identity     repo id                                                                     repo name                                                                                status     epel                                                                        Extra Packages for Enterprise Linux 5 - x86_64                                                                      7,351     rpmforge                                                                    RHEL 6Server - RPMforge.net - dag                                                                                11,275     repolist: 18,626      Please help me install and resolve these missing dependencies               uname --kernel-release     2.6.32-279.el6.x86_64


title: Alsa Pulse Audio cannot open audio device pulse (No such file or directory) pulse: Input/output error

text: I'm trying to stream my Gnome Desktop I installed on my OpenVZ VPS Server, and I'm not trying to run this from SSH, but the terminal inside the GNOME desktop, I know it probably doesn't have a sound card, but it's not like i'm trying to play the sound, I just want to route it to the stream. Inside my PulseAudio Volume Control ![volume control](http://i.stack.imgur.com/kL5sz.png) Here is how it looks like when I attempt to stream it. ![ffmpeg](http://i.stack.imgur.com/6aJkE.png) More stuff I tried more errors happened here ![more errors about alsa, soundcards](http://i.stack.imgur.com/A6E3W.png) Here is when I run the `pacmd list-source-outputs`                 [removed@removed ~]$ pacmd list-source-outputs     Welcome to PulseAudio! Use "help" for usage information.     >>> 2 source outputs(s) available.         index: 0         driver: <protocol-native.c>         flags: DONT_MOVE          state: RUNNING         source: 0 <auto_null.monitor>         current latency: 3.08 ms         requested latency: 20.00 ms         sample spec: float32le 1ch 25Hz         channel map: mono                      Mono         resample method: peaks         owner module: 6         client: 4 <PulseAudio Volume Control>         properties:             media.name = "Peak detect"             application.name = "PulseAudio Volume Control"             native-protocol.peer = "UNIX socket client"             native-protocol.version = "16"             application.id = "org.PulseAudio.pavucontrol"             application.icon_name = "audio-card"             application.version = "0.9.10"             application.process.id = "997"             application.process.user = "removed_for_stackexchange(wasn't root)"             application.process.host = "removed_for_stackexchange"             application.process.binary = "pavucontrol"             window.x11.display = ":1.0"             application.language = "en_US.UTF-8"             application.process.machine_id = "27be3273f5d5332051ccdc3100000002"             application.process.session_id = "27be3273f5d5332051ccdc3100000002-1394085585.776225-694791372"             module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"         index: 1         driver: <protocol-native.c>         flags: DONT_MOVE          state: RUNNING         source: 0 <auto_null.monitor>         current latency: 3.11 ms         requested latency: 20.00 ms         sample spec: float32le 1ch 25Hz         channel map: mono                      Mono         resample method: peaks         owner module: 6         client: 4 <PulseAudio Volume Control>         direct on input: 2         properties:             media.name = "Peak detect"             application.name = "PulseAudio Volume Control"             native-protocol.peer = "UNIX socket client"             native-protocol.version = "16"             application.id = "org.PulseAudio.pavucontrol"             application.icon_name = "audio-card"             application.version = "0.9.10"             application.process.id = "997"             application.process.user = "removed_for_stackexchange(wasn't root)"             application.process.host = "removed_for_stackexchange"             application.process.binary = "pavucontrol"             window.x11.display = ":1.0"             application.language = "en_US.UTF-8"             application.process.machine_id = "27be3273f5d5332051ccdc3100000002"             application.process.session_id = "27be3273f5d5332051ccdc3100000002-1394085585.776225-694791372"             module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"      More information about sink i'm using               [removed@removed ~]$ pacmd list-sinks     Welcome to PulseAudio! Use "help" for usage information.     >>> 1 sink(s) available.       * index: 0         name: <auto_null>         driver: <module-null-sink.c>         flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY         state: RUNNING         suspend cause:          priority: 1000         volume: 0: 100% 1: 100%                 0: 0.00 dB 1: 0.00 dB                 balance 0.00         base volume: 100%                      0.00 dB         volume steps: 65537         muted: no         current latency: 3.49 ms         max request: 3 KiB         max rewind: 3 KiB         monitor source: 0         sample spec: s16le 2ch 44100Hz         channel map: front-left,front-right                      Stereo         used by: 1         linked by: 3         configured latency: 20.00 ms; range is 0.50 .. 10000.00 ms         module: 9         properties:             device.description = "Dummy Output"             device.class = "abstract"             device.icon_name = "audio-card"


title: Can't install Linux Headers on Debian 6

text: I don't understand why this isn't working (I'm stumped!);               root@box:/home/user# apt-get install linux-headers-2.6.32-5-686     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      linux-headers-2.6.32-5-686 : Depends: gcc-4.3 but it is not going to be installed     E: Broken packages          root@box:/home/user# gcc --version     gcc (Debian 4.7.2-5) 4.7.2     Copyright (C) 2012 Free Software Foundation, Inc.     This is free software; see the source for copying conditions.  There is NO     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.          root@node1:/home/user# uname -a     Linux node1 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686 GNU/Linux     root@node1:/home/user# cat /etc/issue     Debian GNU/Linux 6.0 \n \l      Nothing I do will get either gcc-4.3 to install or linux-headers to install. I'm open to any and all ideas. **UPDATE**               root@box:/home/user# apt-cache policy gcc     apt-cache policy gcc     gcc:       Installed: 4:4.7.2-1       Candidate: 4:4.7.2-1       Version table:      *** 4:4.7.2-1 0             100 /var/lib/dpkg/status          4:4.4.5-1 0             500 http://ftp.uk.debian.org/debian/ squeeze/main i386 Packages


title: vsftpd: Passwordless authentication to different directory

text: I am configuring a vsftpd server and the requirements are:   1. I need a user `resourcesadmin` with home directory `/var/www/resources` with password authentication and FTP with write access (already done)   2. I need another user `resources` without home directory (already done)   3. I need the user `resources` to have read access to `/var/www/resources` (tried with `user_config_dir` and `local_root=/var/www/resources` without success (500 OOPS: cannot change directory:/home/resources))   4. I need the user `resources` to have access without a password (don't even know how to do it). All that without anonymous access and users jailed to their directories. I know that this configuration is very popular but I don't seem to find how to implement it with vsftpd. Any ideas?


title: perl-get input, check conditions

text: cat input1.txt               ##gff-version 2     ##source-version geneious 5.6.4     Xm_ABL1 Geneious        CDS     1       168     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     169     334     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     335     628     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     629     901     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     902     985     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     986     1165    .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     1166    1350    .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     1351    1504    .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        BLAST Hit       169     334     .       +       .            Xm_ABL1 Geneious        extracted region        1       168     .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="351297 -> 351464"     Xm_ABL1 Geneious        extracted region        169     334     .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="371785 -> 371950"     Xm_ABL1 Geneious        extracted region        335     628     .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="372554 -> 372847"     Xm_ABL1 Geneious        extracted region        629     901     .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="374760 -> 375032"     Xm_ABL1 Geneious        extracted region        902     985     .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="375230 -> 375313"     Xm_ABL1 Geneious        extracted region        986     1165    .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="375992 -> 376171"     Xm_ABL1 Geneious        extracted region        1166    1350    .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="376575 -> 376759"     Xm_ABL1 Geneious        extracted region        1351    1504    .       +       .       Name=Extracted region from gi|371443098|gb|JH556762.1|;Extracted interval="376914 -> 377067"      Check input1.txt, column CDS & extracted region has same number of rows. If they are same, get values from extracted region $14 column (351297, 351464,371785,371950) and replace these values in CDS rows $4 &$5 (for eg. in CDS 1st row 1 with 351297, 168 with 351464, 169 with 371785, 334 with 371950 and so on). Print out the only replaced CDS rows as follows cat output1.txt               ##gff-version 2     ##source-version geneious 5.6.4     Xm_ABL1 Geneious        CDS     351297     351464     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     371785     371950     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     372554     372847     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     374760     375032     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     375230     375313     .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     375992     376171    .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     376575     376759    .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4     Xm_ABL1 Geneious        CDS     376914     377067    .       +       .       Name=Xm_ABL1;created by=User;modified by=User;ID=w0IVHutPuN4H4FVDCg4sFVRaJjQ.1340919460469.4      I have another input file, input2.txt cat input2.txt               ##gff-version 2     ##source-version geneious 5.6.3     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     1043    1132    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     2063    2260    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     2336    2593    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     3474    3633    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        extracted region        1       13933   .       +       .       Name=Extracted region from gi|371443188|gb|JH556672.1|;Extracted interval="2010140 <- 2024072"      I want to take $14 of the last line (interval="1960862) only the number (2010140) add to $4 column (1043,1132,2063..3633) i.e (1043+2010140=2011183, , 2063+2010140=2012203, ) and to $5 column (1132+2010140=2011272,2260+2010140=2012400 ), ignore the last line. The output should look like this: cat output2.txt               ##gff-version 2     ##source-version geneious 5.6.3     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     2011183    2011272    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     2012203    2012400    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     2012476    2012733    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1     gi371443188gbJH5566721_extraction_reversed      Geneious        CDS     2013614    2013773    .       +       .       Name=Xm ITGB3;created by=User;modified by=User;ID=Pa0FVoXpt/GgL1I/VO7LY0UlFAc.1341246976743.1      But I need in one perl script, based on user input(may be input1.txt or input2.txt) checks the conditions gives the output1.txt or output2.txt


title: Hurd vs Plan9 vs Linux vs eCos vs FreeRTOS what are the main differences specially with Hurd?

text: Hurd is actually not Unix nor Linux. But more superior says. Where Plan9 and Linux are in the range of Unix/Linux. eCos and FreeRTOS is also completely not unix/linux. What is the main differences between Hurd and FreeRTOS/eCos and General Unix/Linux? Can i name FreeRTOS or eCos tree as Hurd family? As those OS are not considered to be Linux nor Unix.


title: How do I shutdown, reboot and logout the system from the command-line?

text: I would like to do that using the command-line, because sometimes my computer freezes and I need to force a shutdown (I know it's not good to the hardware). And: What is the difference between Halt and Shutdown commands?


title: submitting form with cURL sometimes works, sometimes doesn't

text: I use this command to fill out a form in Drupal 6 (create node):               curl -b cookies.txt -d "title=thetitle&menu%5Blink_title%5D=&menu%5Bparent%5D=primary-links%3A0&menu%5Bweight%5D=0&teaser_include=1&body=content+here&format=1&changed=&form_build_id=form-01fbf44be3dab1ea177d17544bce415c&form_token=f1af1b01946065a34e49fdbde8fcc64b&form_id=story_node_form&log=&comment=2&pathauto_perform_alias=1&field_pidio%5B0%5D%5Bembed%5D=&name=admin&date=&status=1&promote=1&op=Save" http://localhost/subdo/node/add/story      It works without any problem; no messages in the terminal and the node is created in Drupal as expected. After a while, I use that code again without any modification. But instead of posting a new node, the terminal shows the HTML code of the form. It looks like cURL isn't hitting the "Save" button.


title: bash script disapearing variable

text: I have created a small script to move video files from a helmet mounted camera to my mythbuntu machine and there is a variable that for some reason will just not be passed onto the script. The variable in question is               d=`echo $file | awk '{ print $6 }'`      which is captured OK, however in the statement               scp -l 5000 $name $SavePath$d_$hour.AVI      will just not insert a value.               #!/bin/bash     # This script does copy files from /media/disk/DCIM/100DSCIM to      # 192.20.0.200:/media/Elements/mythtv/videos/BikeRiding and renames the files using the time stamp     set -x     SavePath=root@198.20.0.200:/media/Elements/mythtv/videos/BikeRiding/     SourcePath=/media/disk/DCIM/100DSCIM/     ls $SourcePath*.AVI --full-time > file_list     cat file_list | while read file     do         d=`echo $file | awk '{ print $6 }'`         hour=`echo $file | awk '{ print $7 }'`         name=`echo $file | awk '{ print $9 }'`         scp -l 5000 $name $SavePath$d_$hour.AVI     done


title: bc removes decimal point

text: This is related to Shell script too slow for output to Conky This code is nearly perfect:               stdbuf -oL jack_cpu_load \         | grep --line-buffered "jack DSP load" \         | stdbuf -oL cut -d' ' -f4 \         | while read line; do             echo "scale=0; $line*100/1" | bc -l > /tmp/buffer         done &      The only issue is that `bc` removes the decimal point and zero when the output is <1. I'd like to see two places after the decimal point, but no fractions at all, with a zero for output <1 would be fine.


title: What is signal 0 in a trap command?

text: I'm following this guide on how to set up passwordless SSH authentication with ssh-agent. To start up ssh-agent the author recommends the following code in `.bash_profile`:               SSHAGENT=/usr/bin/ssh-agent     SSHAGENTARGS="-s"     if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then         eval `$SSHAGENT $SSHAGENTARGS`         trap "kill $SSH_AGENT_PID" 0     fi      I don't understand why it is trapping signal 0. According to man 7 signal there is no such signal. Is this just a typo or bug or does this really achieve something?


title: Renaming alsa controls

text: Is it possible to rename alsa controls? My front panel is controlled using "Speaker" and my the back plugs are "PCM". Since this isn't very descriptive I would like to rename them to something more sane (like "front" and "back").


title: How to check if process already exists in python script?

text: > **Possible Duplicate:**   >  Check for process already running in webfaction? How can I check if a process is already being run using Python + Django on WebFaction hosting? For example, my process name is `myfile.py`


title: Can hd and od replace each other?

text: `hd` and `od` are both dump viewers of binary content. Can `hd` be used wherever `od` is and vice versa?


title: running a script every 30 minutes with crontab using ROOT (Debian)

text: When I manually type:               root@username:~# ./myscript.sh      the script executes, however I tried the following combinations to have crontab execute `myscript.sh` every 30 minutes (forever) and none seem to do anything:               # /etc/crontab: system-wide crontab     # Unlike any other crontab you don't have to run the `crontab'     # command to install the new version when you edit this file     # and files in /etc/cron.d. These files also have username fields,     # that none of the other crontabs do.          SHELL=/bin/sh     PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin          # m h dom mon dow user  command     17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly     25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )     47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )     52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )     */30 * * * * root sh /root/myscript.sh     */30 * * * * root sh ./myscript.sh     */30 * * * * root sh myscript.sh     */30 * * * * root ./myscript.sh       * * * Contents of myscript.sh:               KEYWORDS=("Word1" "Word2" "Word3" "Word4")     IFS=$'\n'     find . -size +1c -type f ! -exec grep -qwF "${KEYWORDS[*]}" {} \; -exec truncate -s 0 {} \;


title: retrieve password on remote server

text: I normally ssh into a remote server, for which I previously set an option that allows me not to type my password every time. Now that I forgot it, is there any way to retrieve it?


title: log network activity in ubuntu server

text: I administer an Ubunu Server exposed to the internet and have the need to monitor and keep track of all the network activity in a manner that allows me to analyze it afterwards. I already tried some tools, such as tshark or tcpdump, which give me too much detail, vnstat, which does not give me the detail I want (It shows only the bandwidth), and tcptrack, which is OK as a real time monitoring tool but gives me no logging option for further analysis. What I have in mind is something between tcptrack and vnstat: A daemon which logs every connection and, when needed, it provides me with a comprehensive report showing IPs, ports and timestamps of every established connection, and every connection attempt (so, it should also show the SYN packets of the connections dropped by iptables). Ideally (this is just a bonus point :), it would store information into some sql database, such as mysql or postgresql, which would allow to execute arbitrary select statements in order to obtain custom reports (for example, monitor all the activity coming from a single IP, or extract a list of all IPs using a specific service). I must say that I already tried combining some tools, like logging with tcpdump and then showing the results using tcptrack, but I it didn't work as expected. So, is there any tool close to this "idea"?


title: Hiding a zsh completion

text: I just switched to `zsh` (from `tcsh`) and have only run into one serious frustration: There are multiple completions for `push` — `pushd` and `pushln`. I’d really like to only have `pushd` available, since this is really tripping up my muscle memory. How can I set this up using `zsh` completion (specifically `compsys`)?


title: perfect distro for an old mac desktop (ppc g3) (320mb ram)

text: I have on old mac desktop:   * Power PC G3 (300MHz)   * 320 MB Ram I want to use it for browsing the internet and playing videos. What distro should I use?


title: How can I restore my linux?

text: I had an hard-drive with two partitions: one was 460GB NTFS and the other was 5GB ext3 Ubuntu 10.10. I wanted to extend the Ubuntu partition, so I was going to shrink the NTFS partition by 15GB, but I accidentally right-clicked the NTFS partition and chose "Make Partition Active". It actually made all the ext3 partition to become "Unallocated". It seems I can't boot from it anymore. My question is, how can I undone it? Because it took like a millisecond to complete, I'm almost sure the data is still there. Thanks.


title: xmessage over ssh

text: The following command prints a message over ssh :   `xmessage Message -display :0 &`   How does it work? there is no -display option in xmessage's man page.


title: Script for opening a file in an already existing emacs process

text: I keep emacs open all the time I'm working. I have several script that will launch all the apps and files related to a specific project. But, it will launch emacs again, rather than simply cause the current emacs to open the requested files. I'd rather the current emacs simply opened the project text files in a new buffer. Any ideas how I can do that? Gracias


title: Headset not working in OpenSUSE

text: When I plugin my headset into my computer, running OpenSUSE, I do not get any audio. The regular speakers work fine. The reason this is happening, I think, is because it still tries to output through the speakers, which get muted as soon as a headset is plugged in. How do I change the configuration so when I plugin my headset it switches output device to the headset?


title: regexp in ksh for extensions tgz, tar.tgz

text: I'm trying to get a regexp (in ksh) to identify files with only the following extensions: `tgz`, `tar.gz`, `TGZ` and `TAR.GZ`. I tried several but can't get them to work. I'm using this regexp to select only files files with those extensions to do some work with them:               if [ -f $myregexp ]; then        .....      fi


title: Using curly brackets (braces) to create folder structure with `mkdir -p`

text: As `man mkdir` states                  -p, --parents               no error if existing, make parent directories as needed      When I ran this command               mkdir -p work/{F1,F2,F3}/{temp1,temp2}      It creates a folder structure like this `work` parent folder then `F1`,`F2`,`F3` child folders and `temp1` and `temp2` child folders under three parent folder `F1`,`F2`,`F3`.                  work          -F1 -temp1 -temp2          -F2 -temp1 -temp2          -F3 -temp1 -temp2      Now the problem is that I want to create `temp1`,`temp2` folders only under `F1` not under `F2` and `F3`, but I'm confused on how I can write a command to do what I want.


title: Error opening file with Inkscape

text: I'm working on some maps I badly need for my MA thesis, using Inkscape, based on a map from Wikimedia Commons. I've opened the original SVG file, edited it and saved it. After closing Inkscape however, the next session of Inkscape is unable to open the SVG file I edited. It says: > Failed to load /filename No other program seems to be able to open this file either. I did this manipulation several times, with the same error occurring. Could you help me find out what's wrong with the SVG file I edited?


title: is there anything like this web browser in the debian/ubuntu repositories?

text: It's been a while since my web-browsing has really suited me. What I would really like is: A javascript-enabled web browser with a tab-based browsing system that can be controlled simultaneously using a console and a GUI. For example, I'd like to be able to... 1) open a bunch of tabs 2) go to the console and tell it something like 'copy the url open in each tab and write it, along with the html, to a file, for each open tab' in other words, I want to be able to browse with tabs at my leisure, and then write scripts that iterate over each tab. Does anything like that exist?


title: What is AT&T’s Link Editor Command Language?

text: The man page for `ld` makes reference to `AT&T’s Link Editor Command Language`, however a Google search does not offer a satisfactory explanation as to what `AT&T’s Link Editor Command Language` is or was, other than pointing to said man pages, whereas I expect a Wikipedia page coming up in the first five results. It seems like there is a vital piece of computing history missing here. Does anyone have some reference or historical documentation on this language? Something we can put in Wikipedia to preserve for posterity?


title: Can IFS (Internal Field Separator) function as a single seperator for multiple consecutive delim chars?

text: Parsing an array using IFS with non-whites space values creates empty elements.   Even using `tr -s` to shrink multiple delims to a single delim isn't enough.   An example may explain the issue more clearly..   Is there a way to achieve "normal" results via a tweaking of IFS (is there an associated setting to change IFS's behaviour? .... ie. To act the same as the default whitespace IFS.               var=" abc  def   ghi    "     echo "============== IFS=<default>"     arr=($var)     for x in ${!arr[*]} ; do        echo "# arr[$x] \"${arr[x]}\""     done     #     sfi="$IFS" ; IFS=':'     set -f # Disable file name generation (globbing)            # (This  data won't "glob", but unless globbing                 #  is actually needed, turn if off, because               #  unusual/unexpected combinations of data can glob!            #  and they can do it in the most obscure ways...              #  With IFS, "you're not in Kansas any more! :)       var=":abc::def:::ghi::::"     echo "============== IFS=$IFS"     arr=($var)     for x in ${!arr[*]} ; do        echo "# arr[$x] \"${arr[x]}\""     done     echo "============== IFS=$IFS and tr"     arr=($(echo -n "$var"|tr -s "$IFS"))     for x in ${!arr[*]} ; do        echo "# arr[$x] \"${arr[x]}\""     done     set +f     # enable globbing      IFS="$sfi" # re-instate original IFS val     echo "============== IFS=<default>"      * * * Here is the output * * *               ============== IFS=<default>     # arr[0] "abc"     # arr[1] "def"     # arr[2] "ghi"     ============== IFS=:     # arr[0] ""     # arr[1] "abc"     # arr[2] ""     # arr[3] "def"     # arr[4] ""     # arr[5] ""     # arr[6] "ghi"     # arr[7] ""     # arr[8] ""     # arr[9] ""     ============== IFS=: and tr     # arr[0] ""     # arr[1] "abc"     # arr[2] "def"     # arr[3] "ghi"     ============== IFS=<default>


title: What is "automatic stack expansion"?

text: getrlimit(2) has the following definition in the man pages: **RLIMIT_AS** The maximum size of the process's virtual memory (address space) in bytes. This limit affects calls to brk(2), mmap(2) and mremap(2), which fail with the error ENOMEM upon exceeding this limit. Also **_automatic stack expansion_** will fail (and generate a SIGSEGV that kills the process if no alternate stack has been made available via sigaltstack(2)). Since the value is a long, on machines with a 32-bit long either this limit is at most 2 GiB, or this resource is unlimited. What is meant by "automatic stack expansion" here? Does the stack in a Linux/UNIX environment grow as needed? If yes, what's the exact mechanism?


title: erratic keyboard shortcut behavior - gnome debian testing

text: Sometimes my keyboard shortcuts in gnome do not work (ctrl-alt-right for next desktop, ctrl-alt-m for menu, ctrl-alt-b for browser, et cetera) Sometimes after rebooting they do work. I wish I could provide more diagnostic information, but, I don't know what is relevant. Please advise.


title: How can I type Unicode characters into KDE's Konsole terminal from a Gnome desktop?

text: I use Ubuntu.. In 'gnome-terminal', I can type Unicode Codepoints by first typing Ctrl-Shift-u followed by the Codepoint hex value, eg. `C-S-u 2468` produces ⑨ `konsole`, my preferred terminal, does not have this C-S-u (gnome) feature.. Is there some equivalent KDE way to do this in Konsole?


title: Linux file access monitoring

text: Is there any way in unix to find out who accessed certain file in last 1 week? It may be user or some script ftp it to some other place. Can I get a list of user name who accessed certain file? How can I find out who is accessing particular file??


title: Adding a TeX macro to the beginning of a file using sed (why doesn't my method work?)

text: I need to add a line to the beginning of a file. The line in question is               \def\submit{}      I've got a semi-working solution using `sed`. I don't know `sed`, but got it from somewhere on the net, but it doesn't work quite right, because it inserts an unwanted space at the beginning of the line. While this doesn't really matter, I figure I might as well do this right.               sed -i '1i\ \\\def\\\submit{}' 'dirname/filename'      It seems from my reading that all those extra backslashes are required to escape the shell. Other solutions are also welcome, but I'd like a comparably compact one liner if possible. Thanks. This question, Inserting text at the beginning of a file with sed via the terminal in Linux is similar, but doesn't help me debug my expression. EDIT: I've accepted @Jonathan's answer, because it explains what was wrong with my previous approach. However, I've also added an answer.


title: How to run a GUI program as a different user (Debian)?

text: Using a terminal, I can change the running user with `su` and `sudo` — but how can I do that by clicking on an icon/shortcut on the desktop/start menu? If I have to be root to execute I will be asked anyway, but some programs e.g. `Krusader` and `NetBeans` sometimes run without root access but then you can't accomplish what you want. On Windows I simply hit shift and rightclick on it and am prompted for user and password. I guess there is a similarly simple way to do that in Debian as well. (Apart from workarounds like creating scripts such as `sudo xyz`.) Thanks in advance!


title: How to update Mozilla Firefox on debian wheezy

text: I want to update Mozilla Firefox on Debian Wheezy (my preferable way is by terminal). How to do that?


title: What do I need to change to have a fully transparent panel?

text: I have a theme which sets the background of my panel to a certain color, even when I tell it to be transparent via the panel properties. ![enter image description here](http://i.stack.imgur.com/1LPiR.png) In the theme's gtkrc file, what do I need to change to set the background color to be trasparent? I haven't written my own themes before, so I'm kind of lost. Another theme I have does it right, but since I don't know how to read the theme file, I don't know where to start.


title: Migrating from Ubuntu to Debian

text: I'm a long term Ubuntu user who is considering migrating from Ubuntu to Debian (mainly because of Unity and the fact that my school has a Debian mirror). I haven't installed Debian on a system before. But again, I am fairly comfortable with reading manuals and working with the command line. Here is my installation plan (after spending some time reading the Debian wiki):   * Download the Live CD image and use dd to make a Live USB (I think this is the easiest way?)   * Install Debian   * Configure repos using debgen   * Post-install It is the post install part I am most confused about. I'd like to know some specific things:   * Is there an alternative package to ubuntu-restricted-extras on Debian?   * What the best way to get around with the font smoothing problem in Debian?   * How much functionality can I expect from Ubuntu Tweak on Debian? Any other tips are also welcome. Advance thanks to all! **EDIT:** I found a solution to the font rendering problem here


title: Which stream does Bash write its prompt to?

text: I am trying to redirect all output from bash (prompt, user input, results) to a file Example:               /bin/bash > file.txt 2>&1      I thought that would work, but I'm not getting the prompt. Can anyone tell me what I'm doing wrong?


title: I am failing to send mail to a Gmail address using Postfix

text: I am trying to send mail to my test GMail account using Postfix (default Debian setup), and I am failing (" **/var/log/mail.log** "):               Sep 26 16:13:43 sugarmailer postfix/smtpd[1473]: connect from localhost[127.0.0.1]     Sep 26 16:13:44 sugarmailer postfix/smtpd[1473]: 07C8C3C04BE: client=localhost[127.0.0.1]     Sep 26 16:13:44 sugarmailer postfix/cleanup[1478]: 07C8C3C04BE: message-id=<20110926141344.07C8C3C04BE@sugarmailer>     Sep 26 16:13:44 sugarmailer postfix/qmgr[1446]: 07C8C3C04BE: from=<wena@sugarmailer>, size=356, nrcpt=1 (queue active)     Sep 26 16:13:44 sugarmailer postfix/smtpd[1473]: disconnect from localhost[127.0.0.1]     Sep 26 16:13:52 sugarmailer postfix/smtp[1479]: 07C8C3C04BE: to=<tshepang.test@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.227.26]:25, delay=8.4, delays=0.07/0.03/0.73/7.6, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[209.85.227.26] said: 550 5.7.1 smtp-proxy1.wa.co.za Message marked as SPAM, denied [7.600000] (in reply to end of DATA command))     Sep 26 16:13:52 sugarmailer postfix/cleanup[1478]: 822113C04D3: message-id=<20110926141352.822113C04D3@sugarmailer>     Sep 26 16:13:52 sugarmailer postfix/qmgr[1446]: 822113C04D3: from=<>, size=2334, nrcpt=1 (queue active)     Sep 26 16:13:52 sugarmailer postfix/bounce[1480]: 07C8C3C04BE: sender non-delivery notification: 822113C04D3     Sep 26 16:13:52 sugarmailer postfix/qmgr[1446]: 07C8C3C04BE: removed     Sep 26 16:13:52 sugarmailer postfix/local[1482]: 822113C04D3: to=<wena@sugarmailer>, relay=local, delay=0.08, delays=0.03/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)     Sep 26 16:13:52 sugarmailer postfix/qmgr[1446]: 822113C04D3: removed      Gmail thinks that this may be spam, and is therefore undeliverable. Here's the specific message:               <tshepang.test@gmail.com>: host gmail-smtp-in.l.google.com[209.85.229.26] said:         550 5.7.1 smtp-proxy1.wa.co.za Message marked as SPAM, denied [7.600000]         (in reply to end of DATA command)      Note that exim4 works (with `internet site` debconf setting, but everything else left at default), though Gmail puts the mail into Spam folder (" **/var/log/exim4/mainlog** "):               2011-09-26 16:20:24 1R8C2i-0000cr-QV <= wena@sugarmailer H=localhost ([127.0.1.1]) [127.0.0.1] P=esmtp S=370     2011-09-26 16:20:25 1R8C2i-0000cr-QV ** tshepang.test@gmail.com R=nonlocal: Mailing to remote domains not supported     2011-09-26 16:20:25 1R8C2j-0000ct-H4 <= <> R=1R8C2i-0000cr-QV U=Debian-exim P=local S=1189     2011-09-26 16:20:25 1R8C2i-0000cr-QV Completed     2011-09-26 16:20:26 1R8C2j-0000ct-H4 => wena <wena@sugarmailer> R=local_user T=mail_spool     2011-09-26 16:20:26 1R8C2j-0000ct-H4 Completed      One other note is that local delivery works without a problem. So, the question, what is it in Exim4 that enables it pass through Gmail servers while Postfix fails.


title: sort a file based on length of the column/row

text: I need to sort a file based on the number of chars in the first column. I have no idea on how to go about this. (On Linux, so sed/awk/sort is available). An example:               .abs is bla bla 12     .abc is bla se 23 bla     .fe is bla bla bla     .jpg is pic extension     .se is for swedish domains      what I want is to sort these lines, based on the length of the first column in each line. Some of the lines start with 4 characters, some start with 3, or 2. I want the result to be something like:               .fe is bla bla bla     .se is for swedish domains     .abs is bla bla 12     .abc is bla se 23 bla     .jpg is pic extension      Is this even possible?


title: Debian-based distros that have a regular release cycle

text: Are there any Debian based distributions that have a regular release cycles besides Ubuntu or Linux Mint? I'm running Squeeze right now and I really like the Debian ecosystem and package system. However, a lot of the programs it ships with are really old like Blender (2.49a instead of 2.5+) and Haskell 6.12.


title: Gentoo: How to update from one portage only?

text: I have an overlay alone with the default portage. Basically, I want to emerge only the updates from the main portage when I run **emerge world -unD** , and emerge the extra packages from the overlay explicitly. But now, each time I run **emerge world** , I got all the packages from both portage. I want to know what is the best way to keep enforce update from one portage only.


title: Convert audio to text

text: I heard about existence of some speech recognition systems, and it seems I need one of those. Basically, I have an audio file with speech (only one person is speaking most of the time), and I want to get a transcript of the speech. Is something like that possible?


title: Blocking kernel updates with dpkg

text: I'd like to block all distribution-shipped kernel updates due to a nasty thing that recently happened to me. (I'm on a Ubuntu 12.04 amd64 derivative.) I'd like to block all updates to installed kernels of the minor version 3.2 to the `linux-headers`, `linux-headers-generic`, `linux-image`, and `linux-image- extra` packages. The problem I'm encountering is that these all have a version and if I block a specific version, nothing is gained because a new version will be installed (eg: if I block `linux-image-3.2.0-35`, `linux- image-3.2.0-36` is not blocked and could still potentially be installed with a `dist-upgrade` from `apt`.)


title: apt-get - autoremove wants to uninstall Gnome

text: As empathy 2.30 in Debian Wheezy didn't meet all my preferences I tried out empathy 3.1 from experimental, using the command:               apt-get -t experimental install empathy      I had to find out, this version of empathy doesn't work well in Gnome 2.x. Therefore I mentioned:               apt-get purge empathy     apt-get install empathy      Hoping, that this will reinstall the "standard" version of empathy again. So far, everything worked well. But now:               apt-get autoremove      wants to delete Gnome as a whole. How can I calm down `apt-get autoremove`?


title: Arch Linux not connecting to Wifi anymore

text: I have been using Arch Linux over a month now. I have used `wifi-menu` to connect to my Wifi Network. I run the command every time I start my laptop. `wifi-menu` always gives this error when I try to connect:               Job for netctl@HelloWorld.service failed. See 'systemctl status netctl@HelloWorld.service' and 'journalctl -xn' for details.      The problem was that my interface was up every time I started. So I put the interface down using this:               ip link set down wlp2s0      `wlp2s0` is my interface's name and `HelloWorld` is my Wifi Network's SSID. * * * This time, it didn't connect to the network regardless of putting the interface down. It gives me the same error described above. This is the output of `systemctl status netctl@HelloWorld.service`:               netctl@HelloWorld.service - Networking for netctl profile HelloWorld        Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)        Active: failed (Result: exit-code) since Mon 2014-03-24 02:32:35 IST; 2min 56s ago          Docs: man:netctl.profile(5)       Process: 8601 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)       Main PID: 8601 (code=exited, status=1/FAILURE)          Mar 24 02:32:34 lenovo network[8601]: Starting network profile 'HelloWorld'...     Mar 24 02:32:35 lenovo network[8601]: chmod: cannot access ‘/run/dhcpcd-wlp2s0.pid’: No such file or directory     Mar 24 02:32:35 lenovo network[8601]: Failed to bring the network up for profile 'HelloWorld'     Mar 24 02:32:35 lenovo systemd[1]: netctl@HelloWorld.service: main process exited, code=exited, status=1/FAILURE     Mar 24 02:32:35 lenovo systemd[1]: Failed to start Networking for netctl profile HelloWorld.     Mar 24 02:32:35 lenovo systemd[1]: Unit netctl@HelloWorld.service entered failed state.      * * * `journalctl -xn` gives me this output:               Mar 24 02:38:05 lenovo kernel: brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)     Mar 24 02:38:05 lenovo kernel: cfg80211: Calling CRDA to update world regulatory domain     Mar 24 02:38:05 lenovo dhcpcd[256]: wlp2s0: carrier lost     Mar 24 02:38:05 lenovo dhcpcd[256]: wlp2s0: carrier acquired     Mar 24 02:38:05 lenovo dhcpcd[256]: wlp2s0: carrier lost     Mar 24 02:38:05 lenovo dhcpcd[256]: wlp2s0: waiting for carrier     Mar 24 02:38:05 lenovo network[8993]: Failed to bring the network up for profile 'HelloWorld'     Mar 24 02:38:05 lenovo systemd[1]: netctl@HelloWorld.service: main process exited, code=exited, status=1/FAILURE     Mar 24 02:38:05 lenovo systemd[1]: Failed to start Networking for netctl profile HelloWorld.     -- Subject: Unit netctl@HelloWorld.service has failed     -- Defined-By: systemd     -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel     --      -- Unit netctl@HelloWorld.service has failed.     --      -- The result is failed.     Mar 24 02:38:05 lenovo systemd[1]: Unit netctl@HelloWorld.service entered failed state.      systemctl gives the error that `/run/dhcpcd-wlp2s0.pid` doesn't exist, and it doesn't. Though a file named `/run/dhcpcd.pid` does exist. * * * This is the Network Controller output from `lspci -k`               02:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)         Subsystem: Broadcom Corporation Device 051b         Kernel driver in use: bcma-pci-bridge         Kernel modules: bcma      * * * I have tried a couple of things from around the Internet but haven't found a solution. Is there a way to fix this problem? Or can I just reset everything related to networking in Arch Linux so that I can just use `wifi-menu` to connect to the network again? Thanks!


title: Disk on key is read only on every computer

text: I have a 16 GB SanDisk Cruzer Blade Disk-on-key. After a few days of use, it has become write-protected/read-only. When I plug it in, you can see this in my Ubuntu's `dmesg`:               [  819.003359] usb 2-5: new high-speed USB device number 5 using ehci-pci     [  819.136249] usb 2-5: New USB device found, idVendor=0781, idProduct=5567     [  819.136257] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [  819.136261] usb 2-5: Product: Cruzer Blade     [  819.136265] usb 2-5: Manufacturer: SanDisk     [  819.136269] usb 2-5: SerialNumber: 4C530210071007116494     [  819.136891] usb-storage 2-5:1.0: USB Mass Storage device detected     [  819.137024] scsi8 : usb-storage 2-5:1.0     [  820.136696] scsi 8:0:0:0: Direct-Access     SanDisk  Cruzer Blade   2.01 PQ: 0 ANSI: 6     [  820.137150] sd 8:0:0:0: Attached scsi generic sg3 type 0     [  820.138497] sd 8:0:0:0: [sdc] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)     [  820.142194] sd 8:0:0:0: [sdc] Write Protect is on     [  820.142204] sd 8:0:0:0: [sdc] Mode Sense: 43 00 80 00     [  820.144629] sd 8:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA     [  820.156667]  sdc: sdc1     [  820.159903] sd 8:0:0:0: [sdc] Attached SCSI disk      You can see that is says that write-protect is on. I've already tried:   * Looking for a read-only hardware switch   * Using Gparted to format the drive. It says that the drive is read-only so it can't write to it   * Using dd to overwrite the drive with 0s. It also cant open the device (`/dev/sdc`) for writing.   * Pluging it in to a windows 7. It too says it's read only I did find this thread on Sandisk's forums. Does it mean that this have no solution? Must I just throw the Disk on Key after a mere days of use?


title: Forcing Linux NFS client to reconnect to server after NFS is disconnected

text: Is there a way to force a Linux client to reconnect to a NFS server after it has lost its connection? The client eventually notices the server is back and resumes working just fine. I'm just wondering if there is a way to speed up this re-connection.


title: DisplayLink monitor alongside Intel

text: I have a USB DisplayLink device that I've been able to get working with a custom Xorg configuration file. I'm running Ubuntu 12.04 amd64 with the X server from saucy as a result of installing the saucy X server and kernel:               sudo apt-get install --install-recommends xserver-xorg-lts-raring      I'm running the following kernel and X versions:               X.Org X Server 1.14.5     Release Date: 2013-12-12     X Protocol Version 11, Revision 0     Build Operating System: Linux 2.6.42-37-generic x86_64 Ubuntu     Current Operating System: Linux chromeriver-laptop-tkocheran 3.11.0-20-generic #35~precise1-Ubuntu SMP Fri May 2 21:32:55 UTC 2014 x86_64     Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-20-generic root=/dev/mapper/vgcryptotop-lvcryptotoproot ro cryptopts=target=cryptotop,source=/dev/disk/by-uuid/c7278631-aca2-47dd-a48f-44c1a5380e5f,lvm=vgcryptotop acpi_backlight=vendor dell_laptop.backlight=0 quiet splash     Build Date: 06 January 2014  01:37:48PM     xorg-server 2:1.14.5-1ubuntu2~saucy1~precise2 (For technical support please see http://www.ubuntu.com/support)      Current version of pixman: 0.30.2         Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.      Kernel:               3.11.0-20-generic      The problem I'm currently having is not being able to use both an external DisplayPort and an external USB DisplayLink display at the same time. I can use _either_ the USB DisplayLink display _or_ the DisplayPort display, but never both at the same time. Here's my /etc/X11/xorg.conf file:               Section "ServerLayout"             Identifier      "Server Layout"             Screen  0       "DisplayLinkScreen" 0 0             Screen  1       "DefaultScreen" LeftOf "DisplayLinkScreen"             #Option          "Xinerama" "On"     EndSection          Section "Device"             Identifier      "Configured Video Device"             Driver          "intel"     EndSection          Section "Monitor"             Identifier      "Configured Monitor"     EndSection          Section "Screen"             Identifier      "DefaultScreen"             Monitor         "Configured Monitor"             Device          "Configured Video Device"             #DefaultDepth    16             SubSection "Display"                     Depth   16                     Modes   "1920x1080"             EndSubSection     EndSection          Section "Device"             Identifier "DisplayLinkDevice"             driver  "fbdev"             Option  "fbdev" "/dev/fb1"     EndSection          Section "Monitor"             Identifier      "DisplayLinkMonitor"     EndSection          Section "Screen"             Identifier      "DisplayLinkScreen"             Device          "DisplayLinkDevice"             Monitor         "DisplayLinkMonitor"             #DefaultDepth    16             SubSection "Display"                 Depth   16                 Modes   "1920x1080"             EndSubSection     EndSection      The idea is simply to have a dual-display machine. Any ideas on why it can't start both the displays? Currently with the above setup, it only runs the DisplayLink USB display, the Intel display just shows console output.


title: How to make duplicates with different names from a single file?

text: I want to duplicate the contents of a file. Suppose there is a file named "Hydrogen.element". I want to duplicate the contents of this file with a different name ie.make another file named "Helium.element". I am actually making a periodic table and I want to use the file named "Hydrogen.element" as a template.


title: How do command-line tools have their own autocomplete list?

text: How does Bash in Ubuntu know a tool's specific list of actions? For example if I type **apt-get** and tab twice I only see remove, update, upgrade ...etc, but not the actions for another command or the files in the current directory. I'm developing a command-line tool in Go and would like to provide this feature for the distros that support it.


title: Does it possible in Krusader add custom icon and custom command to execution?

text: I am newbie for Krusader, always work with Total Commander. So is possible to add like in Total Commander custom icons and command to execution in Krusader? I would like configure something like my working environment - with shortcuts, script to execute etc. Or I should choose another file manager? Thanks.


title: Network Manager stuck at stage 5 of 5?

text: After successfully installed Fedora 20, I did a scan in the log file to spot for errors. I am able to connect to the internet, but the network manager is repeatedly producing this two lines every few seconds. I don't believe this is the correct behaviour: > NetworkManager[715]: Activation (wlp0s26u1u3) Stage 5 of 5 (IPv6 Commit) > scheduled...   >  NetworkManager[715]: Activation (wlp0s26u1u3) Stage 5 of 5 (IPv6 Commit) > started.. Further up the log, I spotted some errors: > NetworkManager[715]: Couldn't acquire object manager proxy: Error calling > StartServiceByName for org.bluez: > GDBus.Error:org.freedesktop.systemd1.LoadFailed: Unit dbus-org.bluez.service > failed to load: No such file or directory.   >  NetworkManager[715]: (wlp0s26u1u3): add_pending_action (2): 'autoactivate' > already added   >  NetworkManager[715]: file devices/nm-device.c: line 6868 > (nm_device_add_pending_action): should not be reached   >  NetworkManager[715]: (wlp0s26u1u3): remove_pending_action (1): > 'autoactivate' never added Jan 01 22:21:02 s1.fussfreecom > NetworkManager[715]: file devices/nm-device.c: line 6919 > (nm_device_remove_pending_action): should not be reached It seems to be saying that it is stuck at stage 5 and needs some help.


title: How to get good (Windows-like) font rendering on Linux Mint KDE

text: I'm using Linux Mint 13 KDE. I installed a TrueType font that I have and like (Arrus BT). I've noticed that the font rendering is noticeably worse on Linux. If I set hinting to none or slight, the letters appear slightly fuzzy and there is poor contrast. If I set hinting to full, the letters appear slightly chunky in shape, but the lines are unappealingly thin. In both cases the letters seem too "light", alhtough in the first case it's because they seem to be blurred too much with the background, and in the second case it's because the lines are too thin. I have seen various other postings like this and a few like this that advocate fiddling with .fonts.conf in a way that seems to be outdated (I can set those settings in the System Settings panel). I've also tried the "autohint" option described for instance here. None of these produce what I want. For an illustration, here is the font rendering on Linux with no hinting: ![No hinting](http://www.brenbarn.net/misc/none-none-cropped.png) Here it is with full hinting: ![No hinting](http://www.brenbarn.net/misc/none-full-cropped.png) And here it is on Windows: ![No hinting](http://www.brenbarn.net/misc/windows-cropped.png) I've used this color scheme because the problem is most pronounced with this sort of situation, where the text is a brighter color on a dark background. I've tried intermediate hinting options, all of which suffer from basically the same problem (too blurry or too thin). I've also tried the various subpixel smoothing options (RGB, BGR, etc.), which don't seem to have an appreciable effect on resolving the problem. I see from previous posts on this issue that there are differences of opinion on what "looks best" in terms of font hinting and smoothing. Putting all that aside, my question is simple: is there or is there not a way to get Linux to display the font so it looks like it does in Windows, and if so, how?


title: Regular expression how to get value in shell script?

text: I have to write a shell script to get value from a string, something like:               string="abcdef" pathName      How can I use `grep` command with the use of regular expression to get "pathName"?


title: Is there a way to find the mac address of a remote machine I have connected to with ssh?

text: I have machine at the office which is shut off I was hoping to turn it on from home using wake on lan. Reading about this, I have realized that I need the MAC address of the machine. Is there a way to find the MAC address of the machine from my ssh connection history? I use an RSA key to connect to the machine.


title: Limit process resource consumption in CentOS 5 (2.6.18 kernel)

text: I would like to limit the resource (CPU, Memory, and network bandwidth) consumption of processes on the same server. And it will be good if I can migrate processes from one server to another. I think I am looking for some light-weight virtualization. I found LXC is a good choice. But our 2.6.18 kernel does not support LXC. It is a shared cluster, so, I am not allowed to upgrade the kernel. And I think the "setrlimit" system call will only send signals to the processes when the budget is reached rather than limit the resource consumption as a virtual machine does (Please correct me if I am wrong). Any recommendation for this task? Thanks!


title: Proxy or VPN behind the router

text: I have a home network under the router, and there is my proxy server with ports forwarded through the router. Some clients connects to the Internet via my proxy, but there is a little problem - sometimes they cannot send files on email or html form (I'm using Squid as a proxy). So, I've tryed to set up PPTP VPN with PoPTop, but connection through my router causes 619 error. Server has Fedora 16. What is the best way to provide Internet connection to clients (VPN, another proxy configuration or something else)?


title: Shell Script to Execute Shell Script to All Subdirectories

text: I am making a script to simplify my daily tasks. Everyday, I have to grep for a few things inside a company server. It was okay, however, now, they have segregated each object into sub directories. I am looking for a solution in which my existing shell script will execute repeatedly into each sub directory inside a certain directory. How do I do this? I am quite new to Linux and still learning the ropes. Here's my script:               #!/bin/bash     MainDir=/path/to/dir/containing/subdirs     # cd into dir     cd $MainDir          for dir in $(ls); do          #fetch start time of uut     grep -i "01_node_setup" $dir/his_file | tail -1 >> /home/xtee/sst-logs.out          #check if sysconfig.out exists     if [ -f $dir/sysconfig.out];     then         grep -A 1 "Drive Model" $dir/sysconfig.out | tail -1 >> /home/xtee/sst-logs.out     else         grep -m 1 "Pair0 DIMM0" $dir/node0/trans_file_prev/*setupsys* | tail -1 >> /home/xtee/sst-logs.out     fi          done          #cd back to where we started     cd $OLDPWD      A nice guy helped me with the script, and the script above is what came out. It worked alright however, the sst-logs.out file displays `binary file /some/subdirectory/` instead of the output of the grep. What is wrong in the script?


title: grep searchstring /etc/crontab strange behavior in BASH script

text: I am working on a BASH script which creates automated backups via the crontab. I am trying to use               myVARIABLE=`grep backup /etc/crontab`      to return lines containing "backup" if an entry has already been made. Instead of returning lines from `/etc/crontab` it seems to be returning the output of multiple ls commands. I have run the command               grep backup /etc/crontab      from the command line and it works as expected. I can also grep other files via my BASH script and it returns expected results as well. Any thoughts as to why `/etc/crontab` causes grep problems within a script? Thanks!


title: LMDE does not boot directly after install, but boots from cd option "boot from local hard drive"

text: Just got a new (used) pc from my job. Still a nice beast, Intel board with Core 2 quad CPU and 4G of RAM. So I came to install Linux Mint Debian Edition on it. The live CD works like a charm, and install without problem. But when I reboot, I just have a blinking cursor on a black screen and nothing happens. Grub never shows up. Try reinstalling with grub on `/dev/sda` instead of `/dev/sda1`, same thing. Then I reinserted the live CD, and from the first menu I select "boot from local hard drive". Magic makes its effect, my newly installed LMDE boots correctly. Rebooted, same thing happened. Seems like BIOS problem, but for me all settings seems ok. I have the vista oem disk but I did not tried it. Did someone have an idea of what is going on?


title: /dev/mapper and vicious IO widget

text: I have dio vicious widget for monitoring IO within an awesome widget. It is defined like so:               diowidget = widget({ type = "textbox" })     vicious.register(diowidget, vicious.widgets.dio, '${sda read_mb}/${sda write_mb}', 3)      However, my hard disk uses lvm and looks like:               ; df -h     Filesystem                         Size  Used Avail Use% Mounted on     rootfs                              50G  8.0G   40G  17% /     devtmpfs                           2.0G     0  2.0G   0% /dev     tmpfs                              2.0G  1.8M  2.0G   1% /dev/shm     tmpfs                              2.0G  804K  2.0G   1% /run     /dev/mapper/vg_nightwatch-lv_root   50G  8.0G   40G  17% /     tmpfs                              2.0G     0  2.0G   0% /sys/fs/cgroup     tmpfs                              2.0G     0  2.0G   0% /media     /dev/mapper/vg_nightwatch-lv_home  409G   15G  374G   4% /home      Use "mapper" instead of "sda" gives me an `Invalid markup`. What should I use instead?


title: Buying a Linux Machine

text: As a budding dev, I'm looking to buy a linux machine to work with. What are my options in buying a machine that comes installed with linux? EDIT: I guess my question really was, is there such a thing as buying a machine with linux pre-installed because there doesn't seem to be many options available. Anyway, I found this link helpful.


title: Cannot install openssh-server

text: root@abacus-desktop:~# apt-get install openssh-server     Reading package lists... Done     Building dependency tree     Reading state information... Done     You might want to run `apt-get -f install' to correct these:     The following packages have unmet dependencies:       openssh-server: Depends: openssh-client (= 1:5.3p1-3ubuntu7) but 1:5.3p1-3ubuntu3 is to be installed       wireshark: Depends: libsmi2ldbl but it is not going to be installed       wireshark-common: Depends: libsmi2ldbl but it is not going to be installed     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


title: PHP Upgrade Error (PHP 5.3.3 to PHP 5.4.19 on CentOS 6.4)

text: I'm using CentOS 6.4 and I was following this tutorial in order to upgrade PHP from v 5.3.3 to v 5.4.19 but I got the following error: > Error: php54w-common conflicts with php-common-5.3.3-23.el6_4.i686 . How do I resolve this problem?               [my_profile@localhost gplus-quickstart-php]$ sudo rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm                                                                [sudo] password for my_profile:                                                         Retrieving http://mirror.webtatic.com/yum/el6/latest.rpm                             warning: /var/tmp/rpm-tmp.S0yqSL: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY                                                                               Preparing...                ########################################### [100%]          1:webtatic-release       ########################################### [100%]       [my_profile@localhost gplus-quickstart-php]$ sudo yum install php54w     Loaded plugins: fastestmirror, refresh-packagekit, security           Loading mirror speeds from cached hostfile                             * base: mirror.netglobalis.net                                        * extras: mirror.netglobalis.net                                      * rpmforge: mirror.nexcess.net                                        * updates: mirror.netglobalis.net                                     * webtatic: us-east.repo.webtatic.com                                webtatic                                                 | 2.9 kB     00:00          webtatic/primary_db                                      |  98 kB     00:00     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package php54w.i386 0:5.4.19-1.w6 will be installed     --> Processing Dependency: php54w-common = 5.4.19-1.w6 for package: php54w-5.4.19-1.w6.i386     --> Processing Dependency: php54w-cli = 5.4.19-1.w6 for package: php54w-5.4.19-1.w6.i386     --> Running transaction check     ---> Package php54w-cli.i386 0:5.4.19-1.w6 will be installed     ---> Package php54w-common.i386 0:5.4.19-1.w6 will be installed     --> Processing Conflict: php54w-common-5.4.19-1.w6.i386 conflicts php-common < 5.4.0     --> Finished Dependency Resolution     Error: php54w-common conflicts with php-common-5.3.3-23.el6_4.i686      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest     [my_profile@localhost gplus-quickstart-php]$ ^C     [my_profile@localhost gplus-quickstart-php]$ ^C     [my_profile@localhost gplus-quickstart-php]$ Error: php54w-common conflicts with php-common-5.3.3-23.el6_4.i686     bash: Error:: command not found     [my_profile@localhost gplus-quickstart-php]$


title: xmms2 widget for awesome

text: I am trying to use the xmms2 widget. As it is, the widget does not conforms to awesome 3.X specifications -- or at least, I may have misunderstood how widgets should work. I certainly cannot get it to display anything as is. Does anyone have an update to this widget?


title: Use aes-ni in Debian

text: I am considering building a small home server. I'd like to encrypt some folders on this server, therefore using the instruction set **aes-ni** which is supported by newer (mostly Intel) chips would be advantageous. Is there a way to use **aes-ni** with Debian, or is there at least an alternative kernel that supports it? [edit] Or is it already supported by default: http://kernel.alioth.debian.org/config/2.6.38-2/config_amd64_none_amd64?


title: Best practices for attaching debug symbols to system libraries during development?

text: I'm at a stage in a project where it would be really handy to have a debug version of a system package installed. On Ubuntu at least, adding the debug symbols to a library is a piece of cake. Practically every package has a `-dbg` variant that provides all the symbols you'd need for a useful backtrace. However, I'm currently on Arch linux, where the general concensus is to edit the user `makepkg.conf` file, adding whatever debug flags to `(C|CXX|CPP|LD)FLAGS`. Then re-build the package yourself, and replace the current, optimised version with the debug build. Well, I suppose that's fair enough with a "source-based distribution", but it gets tedious pretty quickly. So, what is / are the best practices for attaching debug symbols to a system package? How do other packagers do it? I think I've seen that `strip` can extract debug symbols and save them in external files. Is it possible for `gdb` to pick up those symbol files during backtraces, with system applications not even bothering to look for them? How does that work, from a packagers perspective? It's just an idea, but is it a good idea to create a `chroot` environment in which to develop? (I have a problem atm where a package has an ABI incompatibility between its debug and release builds, which is a bit of a pain. Everything linked to its shared lib also complains about missing symbols, so reverted to optimised build..)


title: Set up proper programming environment

text: I'm starting to think how to set up the most convenient environment for programming, with the following conditions. I run Linux Mint 14.   1. I've got a computer at work but would like to have access to my code from home computer and notebook.    2. I'd like to have an opportunity to roll back any changes I do in case I break the code, that is having several versions of each project...    3. At the moment I use C++, Python and R, but it would be nice to have it not dependent on languages.   4. Security is important and the stuff I'm doing is definitely not open source.   5. I will be the only person working on my code so collaboration tools are not important. I'm sure my question is not unique, but I struggle with finding keywords to find what I need. There is no problem in terms of IDE choice etc, the question is really about file system set up, access and version management.


title: Trying to install Windows on a system that has Ubuntu 12.04 installed

text: I'm a novice in installing & debugging OS errors. I had Windows 7 installed & it crashed today (the great blue screen). No matter what I did (tried to install Windows 7 again & again from DVD), I kept getting the blue screen with different types of errors like:   * bad pool header,   * registry error,   * page table trying to access non-page table error, etc. I had to use my system so I installed Ubuntu. It removed Windows 7 from `C:` drive & I could access my `D:` & `E:` drives, so took the backup. Then tried to install Windows 7 again, but I got blue screen. So, I installed Ubuntu again & removed everything, so it took all my 320 GB HDD space. Then I tried to create partitions using gparted (with the intent that I would be able to install Windows 7 in one of those) & made some free space, then created the 3 partitions. Don't know what I did, but it made Ubuntu crash when I restarted it. Got `unknown filesystem, grub rescue` error. No idea what to do, so formatted the whole drive again, now running Ubuntu. Ran gparted again & now my info is like this:               Partition: /dev/sda1, File system: ext4, Mount Point: /, Size: 292.17GiB, Used: 8.23GiB, Unused: 283.95Gib, Flags: boot.      I tried to create a partition again, but it won't allow me to resize. I guess because it is the only drive & Ubuntu is mounted on it, not sure. Using Windows DVD to install eventually results in blue screen. So, I basically want to run Windows again & have absolutely no idea what to do. Please give me some step by step instructions as I have no experience with this & not sure how to proceed.


title: where on the filesystem do user-generated system scripts go?

text: I have a couple command line php scripts and also php pages that call the same class file. Instead of having mutiple copies of it floating around, I want to put `class.myApi.php` in one central location on the filesystem. All files will then reference that one single file. Where does it belong? Does it belong in `/usr/bin` ?


title: How to request a hostname from a DHCP server on Ubuntu?

text: I have an Ubuntu 11.04 server virtual machine. I would like to request a specific hostname from the DHCP server at the office. Since I don't run it often, the IP changes nearly every time that I boot it. Obviously, referencing it by a hostname is the preferred option. I know that my DHCP server respects DHCP client hostname requests. On my windows 7 machine, I can rename the computer, reboot, query the DHCP server, and see the new name in the ANSWER SECTION. The query command that I use is:               dig @192.168.225.5 -x 192.168.235.XXX      and each time it will respond with the new computer hostname. I can also now ping and ssh from other machines using that new hostname. I have no such luck on the Ubuntu VM. I modified /etc/dhcp/dhclient.conf to include a line:               send host-name "MYRQUESTEDHOSTNAME";      and then run               sudo /etc/init.d/networking restart      but querying with dig using the VM's IP address yields no ANSWER SECTION. What am I missing?


title: Where can I find a list and documentation for samba share definitions?

text: I'm looking for a reference for what goes under the share name... I feel like there are about 6 dozen different options but I can't find a good reference anywhere... someone help me out?               [myshare]         path = /export/myshare         valid users = mydomain\user1 mydomain\user2         public = no         writable = yes         browseable = No


title: Archlinux 2014.04 64bit and connectivity problem during instalation

text: I downloaded the latest ISO image from the Arch Linux website and burned the .iso file on an USB drive with some of the many tools you can find on the web. Once I get on the shell screen I try to test my connectivity to the internet but it doesn't work. My Ethernet card is correctly detected (I can see it if I do ifconfig) and is also in an "up" state. I already tried to manually set the configuration using _ethtool_ but with no luck. Also, I already tried re-activating the dhcp service but still no luck. I tried to bring the interface up/down and manually configure an IP address but it still doesn't work. I searched in dmesg and as far as I can tell the r8xxx module of the kernel for my realtek card is loaded correctly. I am really running out of options. The most frustrating thing is that only with Archlinux I have this problem. ALL the other distros run just fine, getting ip address from dhcp with no intervention from myself what-so-ever... So it's not a compatibility problem here but a configuration one. **EDIT** I also noted that the dropped packets count increases as time goes by... Here is some output from the commands:               ping 8.8.8.8     connect: Network is unreachable          ethtool enp7s1     Settings for enp7s1:         Supported ports: [ TP MII ]         Supported link modes:   10baseT/Half 10baseT/Full                                  100baseT/Half 100baseT/Full                                  1000baseT/Half 1000baseT/Full          Supported pause frame use: No         Supports auto-negotiation: Yes         Advertised link modes:  10baseT/Half 10baseT/Full                                  100baseT/Half 100baseT/Full                                  1000baseT/Half 1000baseT/Full          Advertised pause frame use: Symmetric Receive-only         Advertised auto-negotiation: Yes         Link partner advertised link modes:  10baseT/Half 10baseT/Full                                               100baseT/Half 100baseT/Full                                               1000baseT/Full          Link partner advertised pause frame use: No         Link partner advertised auto-negotiation: Yes         Speed: 1000Mb/s         Duplex: Full         Port: MII         PHYAD: 0         Transceiver: internal         Auto-negotiation: on         Supports Wake-on: pumbg         Wake-on: g         Current message level: 0x00000033 (51)                        drv probe ifdown ifup         Link detected: yes          ifconfig     enp7s1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet6 fe80::16da:e9ff:fe21:fdbf  prefixlen 64  scopeid 0x20<link>             ether 14:da:e9:21:fd:bf  txqueuelen 1000  (Ethernet)             RX packets 943  bytes 64724 (63.2 KiB)             RX errors 0  dropped 117  overruns 0  frame 0             TX packets 17  bytes 2933 (2.8 KiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536             inet 127.0.0.1  netmask 255.0.0.0             inet6 ::1  prefixlen 128  scopeid 0x10<host>             loop  txqueuelen 0  (Local Loopback)             RX packets 0  bytes 0 (0.0 B)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 0  bytes 0 (0.0 B)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          ip link     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: enp7s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000         link/ether 14:da:e9:21:fd:bf brd ff:ff:ff:ff:ff:ff          dmesg | grep r8169          [    2.742091] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded     [    2.742154] r8169 0000:07:01.0 (unregistered net_device): not PCI Express     [    2.742666] r8169 0000:07:01.0 eth0: RTL8169sc/8110sc at 0xffffc9000181e000, 14:da:e9:21:fd:bf, XID 18000000 IRQ 19     [    2.742668] r8169 0000:07:01.0 eth0: jumbo features [frames: 7152 bytes, tx checksumming: ok]     [    9.037449] r8169 0000:07:01.0 enp7s1: link down     [    9.037502] r8169 0000:07:01.0 enp7s1: link down     [   11.874477] r8169 0000:07:01.0 enp7s1: link up          route           Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface      **EDIT 2:**               sudo systemctl status dhcpcd     ● dhcpcd.service - dhcpcd on all interfaces        Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled)        Active: inactive (dead)      I also tried running simply "dhcpd" and it seemed to work (he saw my router and leased me an IP address) but at some point it timed out and didn't got an IP.


Why do we need the reboot function in different binaries?                 shutdown -r      and               reboot      Or do they differ in something?


title: Desktop audio falls behind when recording microphone + desktop audio + screen using ffmpeg

text: I have put together this script for recording the microphone, the desktop audio and the screen using ffmpeg:               DATE=`which date`     RESO=2560x1440     FPS=30     PRESET=ultrafast     DIRECTORY=$HOME/Video/     FILENAME=videocast`$DATE +%d%m%Y_%H.%M.%S`.mkv          ffmpeg -y -vsync 1 \     -f pulse -ac 2 -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \     -f pulse -ac 1 -ar 25000 -i alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono \     -filter_complex aresample=async=1,amix=duration=shortest,apad \     -f x11grab -r $FPS -s $RESO -i :0.0 \     -acodec libvorbis \     -vcodec libx264 -pix_fmt yuv420p -preset $PRESET -threads 0 \     $DIRECTORY$FILENAME      Everything is recorded and between the screen and the microphone sound there are no issues what so ever, however the desktop audio falls behind badly. It begins in sync but gets worse over time during playback, also in ffplay. It does not matter what application playing sound: both Youtube-videos in the browser, desktop sounds and Rhythmbox (playing a couple of seconds of song then stops, wait and repeat) gets out of sync. The terminal output complain about               "ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred22.73 bitrate=10384.5kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred"       and similar but I do not know what that means. Full terminal output here:               ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers       built on Aug 11 2013 14:52:28 with gcc 4.8.1 (GCC) 20130725 (prerelease)       configuration: --prefix=/usr --disable-debug --disable-static --enable-avresample --enable-dxva2 --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-pic --enable-postproc --enable-runtime-cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-version3 --enable-x11grab       libavutil      52. 38.100 / 52. 38.100       libavcodec     55. 18.102 / 55. 18.102       libavformat    55. 12.100 / 55. 12.100       libavdevice    55.  3.100 / 55.  3.100       libavfilter     3. 79.101 /  3. 79.101       libavresample   1.  1.  0 /  1.  1.  0       libswscale      2.  3.100 /  2.  3.100       libswresample   0. 17.102 /  0. 17.102       libpostproc    52.  3.100 / 52.  3.100     Guessed Channel Layout for  Input Stream #0.0 : stereo     Input #0, pulse, from 'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor':       Duration: N/A, start: 0.014093, bitrate: 1536 kb/s         Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s     Guessed Channel Layout for  Input Stream #1.0 : mono     Input #1, pulse, from 'alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-mono':       Duration: N/A, start: 0.006172, bitrate: 400 kb/s         Stream #1:0: Audio: pcm_s16le, 25000 Hz, mono, s16, 400 kb/s     [x11grab @ 0x218a6e0] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 2560 height: 1440     [x11grab @ 0x218a6e0] shared memory extension found     Input #2, x11grab, from ':0.0':       Duration: N/A, start: 1379021580.184321, bitrate: N/A         Stream #2:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 2560x1440, -2147483 kb/s, 30 tbr, 1000k tbn, 30 tbc     [libx264 @ 0x21ae560] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX     [libx264 @ 0x21ae560] profile Constrained Baseline, level 5.0     [libx264 @ 0x21ae560] 264 - core 133 r2339 585324f - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0     Output #0, matroska, to '/home/anders/Video/videocast12092013_23.33.00.mkv':       Metadata:         encoder         : Lavf55.12.100         Stream #0:0: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 25000 Hz, mono, fltp         Stream #0:1: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 2560x1440, q=-1--1, 1k tbn, 30 tbc     Stream mapping:       Stream #0:0 (pcm_s16le) -> aresample (graph 0)       Stream #1:0 (pcm_s16le) -> amix:input1 (graph 0)       amix (graph 0) -> Stream #0:0 (libvorbis)       Stream #2:0 -> #0:1 (rawvideo -> libx264)     Press [q] to stop, [?] for help     ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred22.73 bitrate=10384.5kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred     ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred3.22 bitrate=10423.3kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred25.25 bitrate=11011.0kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred     ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred5.76 bitrate=11013.7kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred27.25 bitrate=11175.4kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred7.76 bitrate=11168.7kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred8.24 bitrate=11176.4kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred55.48 bitrate=11243.8kbits/s         ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred     ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred     frame=12871 fps= 30 q=-1.0 Lsize=  542369kB time=00:07:09.31 bitrate=10349.3kbits/s         video:539762kB audio:2363kB subtitle:0 global headers:3kB muxing overhead 0.044476%     [libx264 @ 0x21ae560] frame I:52    Avg QP:15.46  size:725888     [libx264 @ 0x21ae560] frame P:12819 Avg QP:18.26  size: 40172     [libx264 @ 0x21ae560] mb I  I16..4: 100.0%  0.0%  0.0%     [libx264 @ 0x21ae560] mb P  I16..4:  2.6%  0.0%  0.0%  P16..4: 18.1%  0.0%  0.0%  0.0%  0.0%    skip:79.3%     [libx264 @ 0x21ae560] coded y,uvDC,uvAC intra: 57.8% 49.8% 25.3% inter: 8.9% 8.7% 2.2%     [libx264 @ 0x21ae560] i16 v,h,dc,p: 23% 29% 32% 16%     [libx264 @ 0x21ae560] i8c dc,h,v,p: 45% 28% 18%  9%     [libx264 @ 0x21ae560] kb/s:10306.26      Please help me, I am really close to get this working! **UPDATE** : The desktop audio is out of sync when skipping filter_complex and microphone also, bit in a smaller amount. Using `copy` instead of `libvorbis` does not change anything either.


title: How to extract line from the file on specific condition

text: File:               chromosome  position  ref  alt      chr1          1398     A    T      chr1          2980     A    C      chr2          3323     C    T,A     chr2          3749     T    G     chr3          5251     C    T,G     chr3          9990     G    C,T     chr4          10345    T    G       I need to extract full line when column 4 has 2 or more characters separated by comma Expected Output is:               chr2          3323     C    T,A     chr3          5251     C    T,G     chr3          9990     G    C,T       I tried sed and awk but not able to get the result. Can anyone help me


title: OpenBSD failing to load firmware of supposedly supported WiFi USB adapter

text: I recently bought an Edimax EW-7811Un WiFi USB adapter on Amazon. A handful of OpenBSD users have reported success with it, and it's listed as being supported by `urtwn(4)` in its man pages. I'm currently running OpenBSD 5.5 amd64 (downloaded last weekend) on an Asus netbook. The wireless adapter is recognized as `urtwn0`, as expected, and it is reported as such when I insert or remove it. I created `/etc/hostname.urtwn0` as described in the man page, with the following contents:               nwid mynetwork     wpakey mykey     dhcp      where `mynetwork` and `mykey` are my Wifi network name and password, respectively. The network is actually WPA2, which could have caused issues of its own, but the OS seems to be unable to even load the firmware. When I execute `sh /etc/netstart urtwn0`, I get the following output:               urtwn0: failed loadfirmware of file urtwn-rt18192cfwT (error 2)     urtwn0: no link ............ sleeping      Is it possible that the firmware is corrupted? This is my first time using the adapter. More likely, has Edimax changed the firmware and broken OpenBSD's current `urtwn` implementation? Also likely, am I just making a dumb mistake?


title: Is it the process that cleans itself on termination or the kernel?

text: Recently I found this in a powerpoint presentation: > When a program is compiled and linked, the linker inserts some extra code in > the program. It is this code that calls the _main_ function about the same > way a user calls "lower functions". > > The extra code has two functionalities: > >   * make sure that the C program runs in the right environment >   * cleanup after succesfull termination > Prior to that I thought that cleanup was kernel's job. What is the right story?


title: "Waiting for network configuration" upon boot

text: When I boot, I get the error message `waiting for network configuration`, then `waiting an additional 60 seconds for network configuration`. I had edited `/etc/network/interfaces` file before the above message, so as to surf through a friend's laptop using Ethernet cable; then, after restoring the file, I still get the same message. I have searched in the internet but I didn't find anything helpful. The content of `/etc/network/interfaces` is:               auto lo     iface lo inet loopback      What is wrong?


title: Does Grub2 support putting /boot on a RAID5 partition?

text: It looks like _currently_ most OS installers insist on putting /boot on a non- RAID partition (or the kind of RAID1 partition that "looks like" a non-RAID partition), even the installers that support RAID5 and GRUB2. I'm guessing this limitation is a historical relic leftover from Grub1. My understanding is that Grub1 doesn't know anything about RAID and so can't boot off any kind of RAID array -- except for RAID arrays that "look like" a non- RAID array. Is this a limitation of Grub2, or of the OS installers? I've heard rumors that Grub2 is "able to support /boot on RAID-0, RAID-1 or RAID-5, metadata 0.90, 1.0, 1.1 or 1.2". Does Grub2 really support putting /boot on a software RAID1 partition with 1.2 metadata? Does Grub2 really support putting /boot on a software RAID5 partition? An ideal answer would link to a tutorial that explains how to move a /boot partition (on a non-RAID partition) to a RAID5 partition. By "looks like" a non-RAID partition, I mean either   * when Grub1 reads only one hard drive of a software RAID1 array with a ext3 or ext4 filesystem and ignores the RAID metadata 0.90 or 1.0 at the end of the partition, it looks just like the a non-RAID ext2 file system that Grub1 can handle. Or   * Not a software or fake-RAID, but a full hardware raid that looks like a normal non-RAID disk.


title: gparted partition master boot record corrupt

text: I was trying to Linux Mint from live-usb and made a stupid mistake. I created master boot record and my HDD partition become unallocated. After rebooting from live OS, I'm unable to get to boot menu. ![](http://www.linux-mag.com/s/i/articles/7875/Figure2.jpg) Is there any way to recover all my data? Right now I can only boot to live- usb.


title: Wicd cannot detect wireless networks on Debian 6 testing, Xfce, fresh install

text: This is on a fresh Debian 6 testing install on my U100Plus MSI Wind netbook, running with Xfce desktop environment. My laptop's wireless connection works flawlessly in Xubuntu without manual intervention, so it is somewhat annoying it doesn't work out of the box with Deb 6 testing, Xfce. ![enter image description here](http://i.stack.imgur.com/FrLjy.png)               peter@msideb:~$ sudo iwconfig     [sudo] password for peter:      lo        no wireless extensions.          eth0      no wireless extensions.          wlan0     IEEE 802.11bgn  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Encryption key:off               Power Management:off      The bottom line is I want the wireless connection to be automatically established like on Ubuntu. I don't want to have to think about it. It should be automated and hopefully not involve editing configuration files and manually adding processes to start up. Here's the output of my network scan:               $ sudo iwlist scan     [sudo] password for peter:      lo        Interface doesn't support scanning.          eth0      Interface doesn't support scanning.          wlan0     Interface doesn't support scanning : Network is down


title: Why do package managers need lock files?

text: `dpkg` uses a lock file (`/var/lib/dpkg/lock`), when in use.   * Why are these lockfiles needed?   * Why are multiple instances not possible?


title: terminal transparency, Imagemagick, and X11 root window problem

text: In Ubuntu Natty and in Fedora 12, I have `urxvt` (with 256 colours), and use `ImageMagick` (`display -window root [...]`) to set the root window to a picture. When I use the transparency (`-tr`) option on `urxvt`, I get the X11 login screen background (The pink/purple one in Ubunutu, the Blue one in Fedora) and not the image that is currently on the root window. See picture at the bottom -- taken from Ubuntu but similar to Fedora. Note that the same problem exists if I run `gnome-terminal` and set its transparency. I suspect that ImageMagick is not drawing on the right X11 layer but I (and google) cannot figure out what the right option is. Could the problem be with either the xorg configuration or with window composition? ![screenshot](http://i.stack.imgur.com/QNL8d.png) I would be happy to use something else than Imagemagick as long as I can re- size the images on the fly (so it keeps its current aspect ratio and fits within the visible screen area) and that I can centre the image on the bottom right corner of the screen.


title: The current path of a process

text: Suppose I write a program, which outputs a file under a relative path (as opposed to a full/absolute path) - let's say, the current path. Then I compile it and store the executable under some dir `path1`.   1. Now I run the executable, while I am under a different dir `path2`. The executable will output a file under `path2` instead of `path1`. I wonder why the executable doesn't write a file under `path1` instead? In other words, why is the "current path" `path2` not `path1`?   2. If during run-time, the executable opens a file stored in `path3`, why does the current path become `path3`, although I run the executable from `path2` and the executable was stored in `path1`? How does the OS assign and change the current path for a process, during it's run-time?


title: Stop printer jobs from terminal

text: I am working with an old CentOs version (5.0) that is not really my machine. Recently, for some dark reasons, I have problems in printing. The jobs rest in queue, and I cannot cancel them from the bar icon. I have tried with some terminal commands (`cancel -a` ask for a password, which I don't have, `lpq -a`, and other things of what I don't really know the meaning), but the job is still stuck at the printer icon. Do you have any suggestions? * * * The image explains my situation and how the first answer can not fix this. `crony` is the name of another printer, while the one I use is `crust`. ![enter image description here](http://i.stack.imgur.com/RcYWG.png)


title: list header files used by a project compiled with gcc along with hierarchy

text: I currently have a C++ project that spans two different source control systems. Without checking in the full complete source code from the first system into the second system I plan to check in just the supporting libraries that gets built. My issue is that I will need header files from the first source control system that I use in the second source control system so that I can compile. Is there an easy way of forcing gcc to output all the names of the header files that I use when I compile under Solaris? Is there a way to generate a hierarchy of header file dependencies so that I can see which files are including which other header files? Is it possible for the hierarchy to know about the #pragma once so the dependency tree doesn't include duplicates that aren't included multiple times?


title: How to hinder root from running a script

text: The Glassfish application server provides scripts to administer the application server and also start and stop them and I would like to restrict the root user from running this script. The reason is that some key developers forget to administer the server as the non-privileged user and if they restart the application server as the root user, then the application server has to run by the root user [*]. It isn't an option to avoid giving root access and the developers forget because they are so used to do this on their local machine. I would like the `asadmin` script to either change to run as the non privileged user or optionally display an error message each time the script is run by root. Bash shell is used. [*]: I've tried to fix the rights on files, but even though I've tracked down lots of files which root owns and chmod them, the application experience strange errors and I have to run as root again.


title: What does the "flags" field in getfacl mean?

text: I'm trying to set permissions on a server between users using ACLs. When I'm checking their status on one of directories using `getfacl dir10`, it shows:               root@svn:/srv/resources/somedir# getfacl dir10     # file: dir10     # owner: root     # group: mygroup     # flags: -s-      What do these flags mean? How can I change them?