title: How can I get a two-display Radeon HD 3470 graphics setup working with Scientific Linux 6.5?

text: I have Scientific Linux 6.5 (2.6.32-431.11.2.el6.x86_64) installed on a Dell OptiPlex 760 with a Radeon HD 3470 graphics card and two displays hooked up to it. I'm having difficulties setting resolutions appropriate for the displays and having the two displays not show the same screen. I am not an expert in Xorg configuration and I would appreciate some assistance in getting things working. The PCI device listing (`lspci | grep VGA`) for the graphics card is as follows:               01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 PRO [Radeon HD 3470]      A more detailed listing (`lspci -v -s $(lspci | awk '/VGA/{print $1}')`) is as follows:               01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 PRO [Radeon HD 3470] (prog-if 00 [VGA controller])         Subsystem: Dell Device 3243         Flags: bus master, fast devsel, latency 0, IRQ 16         Memory at d0000000 (64-bit, prefetchable) [size=256M]         Memory at fe9f0000 (64-bit, non-prefetchable) [size=64K]         I/O ports at dc00 [size=256]         Expansion ROM at fea00000 [disabled] [size=128K]         Capabilities: [50] Power Management version 3         Capabilities: [58] Express Legacy Endpoint, MSI 00         Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+         Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>         Kernel modules: radeon      The result of an `xrandr` query (`xrandr -q`) is as follows:               xrandr: Failed to get size of gamma for output default     Screen 0: minimum 640 x 400, current 1280 x 1024, maximum 1280 x 1024     default connected 1280x1024+0+0 0mm x 0mm        1280x1024       0.0*         1152x864        0.0          1024x768        0.0          800x600         0.0          640x480         0.0          720x400         0.0      The modeline returned by the coordinated video timing utility `cvt` for the highest resolution capable by the main display (1680 x 1050) is as follows:               cvt 1680 1050     # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz     Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync      If I try to use this with `xrandr`, I get the following:               xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync     xrandr: Failed to get size of gamma for output default      The entire contents of the `/etc/X11/xorg.conf` file is as follows:               Section "Device"         Identifier "Videocard0"         Driver "vesa"     EndSection      I am not sure what to do next in order to get the appropriate resolutions set and to get the two displays working as two separate displays (as opposed to having the mirror behaviour). Thank you for any assistance. * * * UPDATE: I have attempted to install a driver for this graphics setup (`fglrx64_p_i_c-8.97.100.7-1.x86_64.rpm`), but have run into difficulties regarding undefined symbol `noXfree86driextension`. The ending contents of the file `Xorg.0.log` are as follows:               [    39.312] Initializing built-in extension XVideo     [    39.312] Initializing built-in extension XVideo-MotionCompensation     [    39.312] Initializing built-in extension SELinux     [    39.312] Initializing built-in extension XFree86-VidModeExtension     [    39.312] Initializing built-in extension XFree86-DGA     [    39.312] Initializing built-in extension XFree86-DRI     [    39.312] Initializing built-in extension DRI2     [    39.312] (II) "glx" will be loaded by default.     [    39.312] (II) LoadModule: "glx"     [    39.338] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so     [    39.358] (II) Module glx: vendor="Advanced Micro Devices, Inc."     [    39.358]     compiled for 6.9.0, module version = 1.0.0     [    39.365] Loading extension GLX     [    39.366] (II) LoadModule: "fglrx"     [    39.366] (II) Loading /usr/lib64/xorg/modules/drivers/fglrx_drv.so     [    39.520] (EE) Failed to load /usr/lib64/xorg/modules/drivers/fglrx_drv.so: /usr/lib64/xorg/modules/drivers/fglrx_drv.so: undefined symbol: noXFree86DRIExtension     [    39.520] (II) UnloadModule: "fglrx"     [    39.520] (II) Unloading fglrx     [    39.520] (EE) Failed to load module "fglrx" (loader failed, 7)     [    39.520] (EE) No drivers available.     [    39.520]     Fatal server error:     [    39.520] no screens found     [    39.520] (EE)     Please consult the Red Hat, Inc. support          at https://www.redhat.com/apps/support/      for help.     [    39.520] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.     [    39.520] (EE)       I have no idea how to approach this problem. I would really appreciate some help. Thank you.


title: Can someone change content of a file with permission 777 on a server?

text: If in my server I have a file(for example a php file) with permission 777, can someone edit or delete it without having an account on the server?


title: How do I make ls sort underscore characters first?

text: I like being able to name files and directories with an underscore prefix if it's something I want to keep separate from other files and directories at the same level. On Windows and Mac, for example, prefixing a file with an underscore sorts it to the top, in front of files starting with an alphanumeric character. My googling has turned up that it has to do with the LC_COLLATE and my current locale (en_US). That's fine, though I really don't understand why en_US doesn't sort as expected. Based on the ICU Collate demonstration site setting locale to en_US_POSIX certainly appears to have the sort order I'm looking for (you have to edit the sample data and add some underscores to test it out). But I don't really see how to apply this in my Linux shell. Ideally, I'd like to be able to set up something in my bash config so that ls always sorts underscores first. How would I go about doing this?


title: Change ip addr label in Linux

text: How can I change the eth0 zero to eth0:1 using ip addr without deleting. When I run               ip addr show eth0 Here is the output               2: eth0:  mtu 1500 qdisc mq state UP qlen 1000         link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff         inet X.X.X.Y/24 brd X.X.X.255 scope global eth0         inet 10.10.10.17/32 scope global eth0         inet6 XX::XX:XX:XX:XX/64 scope link             valid_lft forever preferred_lft forever I want this to look like without deleting interface.               2: eth0:  mtu 1500 qdisc mq state UP qlen 1000         link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff         inet X.X.X.Y/24 brd X.X.X.255 scope global eth0         inet 10.10.10.17/32 scope global eth0:1         inet6 XX::XX:XX:XX:XX/64 scope link             valid_lft forever preferred_lft forever How can I just change label?


title: Why does "xinput list" work just like "xinput --list"?

text: `man xinput` describes various options used with `xinput`. One option is this:               --list [--short || --long || --name-only || --id-only] [device]      But I can run `xinput --list` _or_ `xinput list` and both give the same output:               ⎡ Virtual core pointer                          id=2    [master pointer  (3)]     ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]     ⎜   ↳ PixArt USB Optical Mouse                  id=10   [slave  pointer  (2)]     ⎜   ↳ PS/2 Mouse                                id=12   [slave  pointer  (2)]     ⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=13   [slave  pointer  (2)]     ⎣ Virtual core keyboard                         id=3    [master keyboard (2)]         ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]         ↳ Video Bus                                 id=6    [slave  keyboard (3)]         ↳ Power Button                              id=7    [slave  keyboard (3)]         ↳ Sleep Button                              id=8    [slave  keyboard (3)]         ↳ Integrated_Webcam_1.3M                    id=9    [slave  keyboard (3)]         ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]         ↳ Dell WMI hotkeys                          id=14   [slave  keyboard (3)]      Why is `--` not needed before the `list` option? (My OS is Lubuntu 13.10.)


title: Why do some Linux distributions still have /dev/ttyS0, ttyS1, etc., even though newer computers don't have such a serial port?

text: Many new laptop and desktop computers do not have 9-pin/25-pin serial ports. Why do many Linux distributions still contain `/dev/ttyS0`, `dev/ttyS1` device files? Since `udev` can create the device files dynamically, why are `/dev/ttyS0`, `/dev/ttyS1` still created statically? Each time I boot up, `/dev/ttyS0` and `/dev/ttyS1` are in there. By the way: I am using Debian 7.0.


title: What is the correct repository to add for `debuginfo-install glibc` for RHEL 6?

text: I am trying to install `debug-info` for `glibc` on RHEL 6. The closest instructions I could find for adding the repository is at the answer to this question. However, that question is about `CentOS`, which is not exactly the same as `RHEL 6`. So I have two related questions.   1. Is it safe to use http://debuginfo.centos.org for `RHEL 6`?   2. Is there an equivalent URL for `RHEL 6`?


title: Midnight commander: shortcut keys for entries in directory hotlist

text: In midnight commander, is that possible to define shortcut keys for entries in directory hotlist? E.g., press `Control+\` and then `k` to go to desktop, where `k` is the user defined key for desktop?


title: Differences between primary and secondary VGA pass through in virtualization

text: Xen, and more recently KVM, allows you to pass a VGA adaptor from the host to the guest as either a primary or secondary device. Both links provide some explanation as to why passing a VGA adaptor through is more difficult than passing a standard PCI device through and to some extent why passing a VGA adaptor through as the primary device is more difficult than passing it through as a secondary device. What are the advantages of passing a VGA adapter through as the primary device as opposed to the secondary device?


title: Find font file from font name on Linux

text: I have a font with the name _Media Gothic_. How can I find the file name of that font in Linux? I need to copy that file to another system. I've tried:               find /usr/share/fonts/ -name '*media*'      But this gives no results. `gothic` gives some other fonts. TTF is a binary format so I can't use `grep`.


title: Bootable image with jffs2 file system

text: I have the following images: zImage around 1.1 MB image.ub: 1.1MB rootfs.jffs2 4.3 MB u-boot (this is the bootloader I am using) I understand that the image.ub is not including file system,and may be that is the reason the size is so small. In fact if I put image.ub in flash and boot,it is hanging and is unable to mount file system. This verifies my understanding. Now what I want is to get a single file having OS and file system, i.e some how combine image.ub and file system (rootfs.jffs2) in a single file. How do we do this? In fact when I chose initramfs instead of jffs2 in kernel configuration, I get a single image.ub of size about 4MB,which certainly has file system included.Because when I put this single large image in flash, it boots perfectly fine and unlike the case of jffs2 do not complain. It means initramfs is embedded into image ub , but jffs2 is not embedding in image.ub- at least by default. I am looking for a way to embedded my jffs2 file in the image.ub. How do I do this ?


title: set flag to remove duplicate records from a file based on some values of the record

text: I have a file having the following records (pipe delimited):               SK200-10|ALBUMIN-SK|INS|SEKURE ALBUMIN 2 X 65ML|REAG-IVD|SEKI-PEI|90|14IAG|KIDNEY/LIVER|MD|NA|0|U|MFGPRO|15-May-2014|15-May-2014|MFGPRO|CAPPROD     P/G-PPR|NA-INS|INS|GEWINDEFLASCHE +DECKEL ROT|NON-REAG|ZINSSER|0|NA|NA|NA|NON-REAG|0|U|DM|3-Jun-2014|3-Jun-2014|MFGPRO|UKPROD     P/G-PPR|NA-INS|INS|GEWINDEFLASCHE +DECKEL ROT|NON-REAG|ZINSSER|0|NA|NA|NA|NON-REAG|0|U|DM|3-Jun-2014|3-Jun-2014|DM|QADDB     2898|OTHER-RT|RT|PRINTED MEMBRANE, ADENOVIRUS|NON-REAG|SEKI-SD|60|NA|NA|NA|NA|0|U|MFGPRO|24-Apr-2013|24-Apr-2013|MFGPRO|PACEPROD      In these pipe delimited records: The first value is the item number. The 13th value is the status flag. The last value is the database name. Check for duplicate records based on the Item number from the `UKPROD` and `QADDB` database. If a duplicate is found: Change the value of the status flag (13th value) to 'X' from the `QADDB` database. For example, in the above 4 records: The item number is same for the 2nd and the 3rd record. I then check if they exist between the `UKPROD` and the `QADDB` databases. If yes, the I mark the status flag as 'X' for the record from `QADDB` database.


title: Restrict user to run shell script except which is defined in sudoer file

text: I have scientific linux 6.4 running on my system, I have restricted other users to run shell script except one, which is defined in `/etc/sudoers` file. For example: I have one `file.sh` in my admin's `home` directory, so I wish admin to run `file.sh` only, not other shell script from anywhere in system location. So how to achieve this?


title: Why does verifying SHA256 checksum with `sha256sum` fail on Debian and work on Ubuntu?

text: On Ubuntu 14.04, `sha256sum` from `coreutils` works as I expected:               echo 879dd0d7637876be4796f7e6f194a111d21088be85cfe717fc97e2e7f05e79d2 /tmp/myfile | sha256sum -c     /tmp/myfile: OK      However, the exact same command with the exact same file on Debian Wheezy fails:               sha256sum: standard input: no properly formatted SHA256 checksum lines found      I don't understand this. How can I verify the checksum reliably in a shell script on Debian? * * * On Ubuntu 14.04:               ⟫ sha256sum --version     sha256sum (GNU coreutils) 8.21      On Wheezy:               $ sha256sum --version     sha256sum (GNU coreutils) 8.13      manpages on both OSs say:               SYNOPSIS            sha256sum [OPTION]... [FILE]...          DESCRIPTION            Print or check SHA256 (256-bit) checksums.  With no FILE,            or when FILE is -, read standard input.          [...]                 -c, --check                   read SHA256 sums from the FILEs and check them


title: How to configure Xorg for a dynamic dual monitor setup

text: I have a laptop usually (!) connected to an external monitor. Now I want to configure (if possible without any scripts and/or xrandr) xorg such that   * If the external monitor is connected AND the laptop lid open -> both displays extended   * If the external monitor is connected AND laptop closed -> only external   * If the external monitor is not connected -> laptop monitor. Right now, my _/etc/X11/xorg.conf.d/10-monitor.conf_ looks like the one proposed in the Arch wiki here. Now, I have the following issues:   * after boot when the laptop lid is closed, still both monitors are active (even though I can't move the mouse out of the external one's desktop)   * when I open the lid, the external monitor becomes black while I can move the mouse out of the laptops screen. Switching off and on the external monitor with xrandr makes it work again.   * When I open the laptop, so that the external monitor becomes black and close the laptop again, X crashes and I have to reboot the laptop. (no keyboard combination works anymore and I see nothing but a non-moving mouse arrow on the external screen)  It is quite annoying that the monitors don't behave properly automatically. It's an intel chip (onboard) and the external monitor is connected via DisplayPort. I don't really know what to look for in which logfile, so maybe you can help me out.


title: new pattern required from an input file using sed or awk

text: I have data as below:               MGW: VMG110     836-16     836-18     836-19     336-20     836-23     MGW: VMG120     3802-1     3802-2     3802-3     3456-1     3456-4      Required output is:               VMG110:836-16&-18&&-20&-23     VMG120:3802-1&&-3&3456-1&-4      in given data -1,-2,-3,-4 are always in sorted manner in the output -19 is missing...instead of that -18&&-20 is present..where && means 18 to 20.. please provide the same.


title: Rename files with random characters from sha1sum. Does it unique?

text: I'm using this command to rename files with random characters from `sha1sum` and move all files from subdirectories to current directory:               for fname in `find . -type f`; do mv "$fname" $(echo "$fname" | sha1sum | cut -f1 -d' ').html; done        1. But the question is: Does it unique? I'm worried if the generated name from sha1sum will is not unique (generated twice or more).   2. If I run above command, and then run another one in another directory, will it generate unique file name for each files?


title: Which home directory should 'nobody' have?

text: I'm messing around with Tiger security audits on my CentOS box, ensuring the server is fit for being online, well as close as it can get anyway. I noticed a warning about the user `nobody` having `/` as a home directory. I just can't figure out which directory it should "live in" so to speak. So where shall I put this fella? And how about `ncsd` now we're at it? I guess the questions really are: What is `nobody` and `ncsd` for? Which security risk does it impose for those users to have root set as their home directory? In an optimal environment, where would their home directories be?


title: Chrooting into ArchLinux iso installation environment

text: I'm trying to install ArchLinux, but my laptop hangs whenever I have any bootable media attached (other than the primary disk luckily). I tell you this, not because I'm looking to fix my laptop (although any comments about why this might be happening are welcome), but to explain why I'm trying to do what might seem rather convoluted. I have an old version of Ubuntu running on the laptop and the ArchLinux iso on a disk which I can mount. My plan is to chroot into the ArchLinux installation environment, sort of the reverse of the installation process. At this point however, my ignorance starts to show. I have RTM but since there is little hope of a second try at this if I kill my existing installation, I would appreciate any gotchas to look out for and any advice in general.


title: Installing a secondary drive in CentOS 6

text: I am new to Linux and CentOS so I may not be sure of the exact question to ask. It may be best for me to tell you what I have done. I installed a secondary 500gb HD to use for file share storage. I have partitioned, formatted, and mounted according to many different websites' instructions. I used this command to format:               mkfs.ext4 -L /Filesystem2 /dev/sdb1      This caused the new file system to be displayed in "Computer" via the GUI. However, it was inaccessible. Once I mounted it, I can access it from the CLI and the GUI, but it no longer shows up in "Computer". Using the GUI as a user, I have to search to find the mounted drive. It does not appear anywhere. I would like to have it like Windows where it appears as a secondary drive. I don't know how to do this or the Linux terminology for it.


title: add command to /etc/init.d/rc.local file that's missing

text: Want to add the command               sudo mount -t vboxsf H_DRIVE /media/windows7share      to `/etc/init.d/rc.local` file, to run the command every time when system starts up but I don't have such a file (`rc.local`) in that folder. What is the workaround?


title: Can I work with Sql Server, Office and C# using Linux?

text: I want to start working with linux, and I know I should work in that regularly to improve myself.   I work with _sql server_ , _office_ , _c#_ at the company. can I install and do my tasks in linux (i.e. red hat)?


title: IRSSI: HilightWin is showing Joins/Parts/Quits

text: `Hilightwin.pl` is showing Joins/Parts/Quits from all my channels. I would assume that it is an issue that involves levels, except I have no idea where to start. Some plugins that I use that might be relevant:   * Crapbuster.pl   * HilightWin.pl   * Highlite.pl ### .irssi/config               aliases = {     ...       CB = "crapbuster";       CBALL = "foreach window /crapbuster";     };          settings = {     ...       "perl/core/scripts" = {         awl_display_key = "$Q|%n$H$C$S";         awl_block = "15";         crapbuster_levels = "JOINS PARTS QUITS NICKS CLIENTCRAP CRAP MODE TOPICS KICKS";       };     };     hilights = { text = "NICKNAME"; nick = "yes"; word = "yes"; };     logs = { };     windows = {       9 = { name = "hilight"; sticky = "yes"; };     };     mainwindows = {       1 = { first_line = "5"; lines = "16"; };       9 = { first_line = "1"; lines = "4"; };     };     ignores = (       { level = "JOINS PARTS QUITS NICKS"; channels = ( "#highlite" ); }     );


title: gcc can't link to pthread?

text: I have recently installed XUbuntu 11.10 64bit, but I am having problem compiling the most simple pthread example. Here is the code `pthread_simple.c`:               #include <stdio.h>     #include <pthread.h>      main()  {       pthread_t f2_thread, f1_thread;        void *f2(), *f1();       int i1,i2;       i1 = 1;       i2 = 2;       pthread_create(&f1_thread,NULL,f1,&i1);       pthread_create(&f2_thread,NULL,f2,&i2);       pthread_join(f1_thread,NULL);       pthread_join(f2_thread,NULL);     }     void *f1(int *x){       int i;       i = *x;       sleep(1);       printf("f1: %d",i);       pthread_exit(0);      }     void *f2(int *x){       int i;       i = *x;       sleep(1);       printf("f2: %d",i);       pthread_exit(0);      }      And here is the compile command               gcc -lpthread pthread_simple.c      The results:               lptang@tlp-linux:~/test/test-pthread$ gcc -lpthread pthread_simple.c      /tmp/ccmV0LdM.o: In function `main':     pthread_simple.c:(.text+0x2c): undefined reference to `pthread_create'     pthread_simple.c:(.text+0x46): undefined reference to `pthread_create'     pthread_simple.c:(.text+0x57): undefined reference to `pthread_join'     pthread_simple.c:(.text+0x68): undefined reference to `pthread_join'     collect2: ld returned 1 exit status      Does anyone know what's causing the problem?


title: Emacs shortcuts in term mode

text: I've a question about using Emacs as editor and terminal. I split my window into different windows with `C-x 3`for example. One of the generated Window is used as terminal with `M-x term`. Usually I switch with `C-x o`into another window. Suppose I switched to the terminal buffer, from there I cannot use `C-x o` to switch to another buffer. What short cut can I use to switch from the terminal buffer into another?


title: Tell if a folder/file is hidden in Mac OS X

text: I know you can set or unset the hidden flag of a folder/file by doing `chflags hidden foo.txt` and `chflags nohidden foo.txt`. But is there anyway of telling whether the folder/file is currently hidden or not? I don't want to just determine if the folder/file is beginning with a dot.


title: How can I check the Base64 value for an integer?

text: I would like to check the Base64 value for an integer. There is a `base64` linux command but I don't understand how I can apply it on integers. I have tried with `base64 10` but then I get the error message `base64: 10: No such file or directory` I think that the problem can be that Base64 is used for Binary to Textual conversion, so there is no point to pass a Textual argument to it. So my argument `10` is read as an textual string and not as a binary number. Is there any way I can turn a texttual argument to a binary? How can I use the base64 command to get the Base64 value for an integer?


title: How to set secure permissions for multiple users and multiple websites?

text: On a Gentoo 3.2.12 server with `apache2+php`, there are several websites running:               /www         /website1         /website2         ...etc      The `apache` user should have read-only access to all the websites. There are also a few folders inside each website where `apache` should have read-write access (upload folders and the like). There are several people who work on these websites. Each person should have read-write access to the website(s) they work on, but not others. Also, they should be able to set permissions (within their websites) so that `apache` can write to some folders (well, if they create a new upload folder or something). Other users shouldn't have access to `/www` at all. Can this be done and how? (PS. Also... since these people can upload PHP scripts which are then executed in the context of Apache, I guess they can access other websites too, indirectly... is it possible to secure this as well? I can't think of a way, but who knows...)


title: Optimize command yum

text: I would like knowing if there is a way to increase the performance of the command `yum` to install and search packages. I'm a very happy new user of Fedora 16.


title: CPU and core usage stats

text: I'm running some programs on a server and I would like to know how much % cpu I'm taking up and how many cores are being utilised by my process. To clarify, the server has 16 CPUs, all quad-core. I know about the top command, but that just continually reports CPU% between 80% and 100.2%. I also tried `mpstat -P ALL` but I'm really not sure how to read this table.


title: How to fix diacritics in PDF forms in Evince?

text: I happen to live in Czech Republic and we have such letters like `ě`, `š`, `č`, `ť`, etc in the alphabet and use them everywhere, including addresses. Today I was filling a PDF form in Evince and noticed that some of these letters either disappear or make the following letter disappear in view/print mode (everything is ok when I am editing the field). Any ideas why can this happen and how to fix this? XUbuntu 12.04, Evince 3.4.0. Update: I have installed the Adobe brand Acrobat Reader (9.5.1) and it has no problems with the letters.


title: Print tab character in fish

text: In bash I could either do `echo -e "a\tb"` or `echo a$'\t'b`. How do you do this in fish?


title: Compilation of my wifi driver (RTL8192CE) fails

text: I'm kind of desperately trying to make my wifi work on my newly-installed Debian Sid (amd64, kernel 3.10.11-1). The relevant line of the output of `lspci` is :               06:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)      and this wi-fi card is not recognized :               # iwconfig     eth0      no wireless extensions.     lo        no wireless extensions.      in case you need it, here is the output of lshw -c network :               *-network NON-RÉCLAMÉ        description: Network controller     produit: RTL8188CE 802.11b/g/n WiFi Adapter     fabriquant: Realtek Semiconductor Co., Ltd.     identifiant matériel: 0     information bus: pci@0000:06:00.0     version: 01     bits: 64 bits     horloge: 33MHz     fonctionnalités: pm msi pciexpress cap_list     configuration: latency=0     ressources: portE/S:3000(taille=256) mémoire:f1d00000-f1d03fff      So I looked up online to find what driver I was supposed to install. I found that I was supposed to go to this page and install the rtl8192ce driver. I downloaded and extracted it, and followed the instructions of the `readme` file. I changed to super user and tried to compile the driver from the code source with `make`. Here is the output :               # make           make -C /lib/modules/3.10-3-amd64/build M=/home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013 modules     make[1]: entrant dans le répertoire « /usr/src/linux-headers-3.10-3-amd64 »       CC [M]  /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.o     In file included from /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:39:0:     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/pci.h:247:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl_pci_probe’      int __devinit rtl_pci_probe(struct pci_dev *pdev,                    ^     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c: In function ‘rtl_action_proc’:     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:885:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’            rx_status.freq = hw->conf.channel->center_freq;                                     ^     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:886:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’            rx_status.band = hw->conf.channel->band;                                     ^     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c: In function ‘rtl_send_smps_action’:     /home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.c:1451:24: error: ‘struct ieee80211_conf’ has no member named ‘channel’        info->band = hw->conf.channel->band;                             ^     make[4]: *** [/home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013/base.o] Erreur 1     make[3]: *** [_module_/home/damien/Downloads/rtl_92ce_92se_92de_8723ae_88ee_linux_mac80211_0012.0207.2013] Erreur 2     make[2]: *** [sub-make] Erreur 2     make[1]: *** [all] Erreur 2     make[1]: quittant le répertoire « /usr/src/linux-headers-3.10-3-amd64 »     make: *** [all] Erreur 2      It seems that the error comes from the source code, and not from a lack of library or something. Any idea of what I should try to do next, or how should I try to solve this compilation error ?


title: case multi-pattern with strings

text: If a put "TITI" or "TETE" on V3 it doesn't work but "TOTO" will work. It's like it takes into account only the first possibility..."TOTO".               #! /bin/ksh -     V1=CRITICAL                    V2=HARD                        V3=TITI                             case "$V1:$V2:$V3" in               CRITICAL:SOFT:TATA)                print "no"                    ;;                              CRITICAL:HARD:"TOTO"|"TITI"|"TETE")         print "yes"                    ;;                         esac


title: No connections work after starting OpenVPN service?

text: I setup my Scientific Linux 6.2 as an OpenVPN client via the instructions here, and restarted my OpenVPN service. I checked /var/log/messages and it says the VPN connection was established. However, now I cannot make any connections out of my computer! Browsing with Firefox gives me "Server not found" errors, and even ping and traceroute don't work (they produce unknown host errors). How can I troubleshoot this issue? BTW, is there a way to route only certain traffic through this VPN (once I get it working), while everything else don't? Thanks! My OpenVPN /etc/openvpn/client.conf looks like this:               <connection>      remote [VPN host here] 1194 udp      </connection>      <connection>      remote [VPN host here] 1195 udp      </connection>      auth-user-pass      client      ca ca.crt      cert client.crt      key client.key      dev tun      topology subnet      ns-cert-type server      nobind      persist-key      persist-tun      reneg-sec 72000      ping 5      ping-restart 20      ping-timer-rem      tls-client      pull      comp-lzo      verb 2      And here is my ifconfig output after OpenVPN service starts:               eth0      Link encap:Ethernet  HWaddr 08:00:27:85:0B:E5                 inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0               inet6 addr: fe80::a00:27ff:fe85:be5/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:181793 errors:0 dropped:0 overruns:0 frame:0               TX packets:42981 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:174493756 (166.4 MiB)  TX bytes:2766010 (2.6 MiB)          eth1      Link encap:Ethernet  HWaddr 08:00:27:71:4E:F5                 inet addr:192.168.56.111  Bcast:192.168.56.255  Mask:255.255.255.0               inet6 addr: fe80::a00:27ff:fe71:4ef5/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:2905 errors:0 dropped:0 overruns:0 frame:0               TX packets:1890 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:332246 (324.4 KiB)  TX bytes:487561 (476.1 KiB)          lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:16 errors:0 dropped:0 overruns:0 frame:0               TX packets:16 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:1412 (1.3 KiB)  TX bytes:1412 (1.3 KiB)          tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00                 inet addr:10.1.3.33  P-t-P:10.1.3.33  Mask:255.255.255.0               UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1               RX packets:314 errors:0 dropped:0 overruns:0 frame:0               TX packets:384 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:100                RX bytes:38675 (37.7 KiB)  TX bytes:46675 (45.5 KiB)      This is the result from "ip route show":               10.0.2.0/24 dev eth0  proto kernel  scope link  src 10.0.2.15      192.168.56.0/24 dev eth1  proto kernel  scope link  src 192.168.56.111      169.254.0.0/16 dev eth0  scope link  metric 1002      169.254.0.0/16 dev eth1  scope link  metric 1003      default via 10.0.2.2 dev eth0  proto static


title: In which cases is SIGHUP not sent to a job when you log out?

text: I read an answer from a user who claimed that running               foo 2>&1 >& output.log &      would result in `foo` continuing to run even when they log out. According to this user, this even worked over SSH connections. I didn't really believe that, as I was under the impression that in the case of disconnecting from SSH, or terminating the TTY, the shell and therefore its processes would receive a SIGHUP, causing them to terminate. This, under my assumption, was the sole reason for using `nohup` in such cases, or `tmux`, `screen` et al. I then looked into glibc's manual: > This signal is also used to report the termination of the controlling > process on a terminal to jobs associated with that session; this termination > effectively disconnects all processes in the session from the controlling > terminal. This seems to confirm my thoughts. But looking further, it says: > If the process is a session leader that has a controlling terminal, then a > SIGHUP signal is sent to each process in the foreground job, and the > controlling terminal is disassociated from that session. So, does this mean jobs put in background will _not_ receive SIGHUP? To my further confusion, I ran an interactive Zsh session, ran `yes >& /dev/null &`, and typed `exit`, when Zsh warned me that I had running jobs, and after typing `exit` for a second time, told me that it had SIGHUPed one job. Doing exactly the same in Bash leaves the job running…


title: Printable guide for ArchLinux setup

text: I want to install Arch Linux on my computer, but I only have one computer, so I will be unable to access online documentation for a significant portion of the process (everything up until I get a web browser installed). Is there some type of printable guide or manual that I can get that has everything I would likely need up to that point? After that, I can just use online stuff, but as I said, I won't be able to use it until I can access it _from the computer I am installing on_. I intend to install it to use for general-purpose desktop stuff, like browsing the internet, multimedia stuff, and some games, if that makes a difference to what I'd need. I'm going with a gnome environment, and am planning to install chromium.


title: Kill disconnected SSH session running in `screen`

text: I'm always forgetting to logoff when `ssh`-ing somewhere. After I reopen my notebook, a `screen` window with this running `ssh` is unresponsive. I have to create another window, `$ killall ssh`, and only then can I re-`ssh` back. Is there a way to kill this `ssh` using some shortcut? **Or** is there a way to make `ssh` try to _reconnect_ automatically? Or just return the local prompt to me faster?


title: Howto make hibernation work under Fedora 19

text: I tried two methods to enable hibernation. First method was invoking > systemctl hibernate under root. The second was to use Frippery Shut Down Menu. In both cases the system will eventually show me a black screen with some error message and it does not hibernate. I have the latest updates installed. I believe this is a bug. How can I make hibernation work under Fedora 19?


title: Plymouth splash not working and causing VT problems

text: Since I tried installing Plymouth (boot splash), I'm facing two problems :   * It's not working   * My Virtual Terminals (tt1 - 6) aren't working anymore Here what I did :   1. Added plymouth hook (after base udev and autostart) to mkinitcpio and ran mkinitcpio   2. Defined the theme to be "spinfinity".   3. Disabled slim service and enabled slim-plymouth service.   4. Added splash to kernel parameter in grub.cfg I already had Intel driver in KMS (i915). Linux is just booting as it was booting before (HDD alerts => SLiM) and nothing more. When I'm trying to enter a VT, equally before or after logging, It just displays a blinking cursor (or HDD Alerts for tty1). How to solve this ?


title: See extended attributes with coreutils ls on Mac

text: I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have `ls` set to use the coreutils version of `ls` [`(GNU coreutils) 8.21`] when available:               if [ -e /opt/local/libexec/gnubin ]; then         alias ls='/opt/local/libexec/gnubin/ls --color=auto'     else         alias ls='/bin/ls -G'     fi      When I run `ls -l` in a directory with files know to have extended attributes (xattrs), I expect to see an `@` sign after the permissions in those listings. However, I see no `@` sign. If I run `/bin/ls -l`, I get the `@` sign. File listing from `/bin/ls -l`:               -rw-r--r--@  1 zev.eisenberg  staff  132887 Jul 19 16:24 flowchart.graffle      File listing from `ls -l` (using coreutils):               -rw-r--r--  1 zev.eisenberg staff 132887 Jul 19 16:24 flowchart.graffle      How can I get the coreutils version of `ls` to show me the `@` sign when xattrs are present?


title: Do files not copied matter when using rsync?

text: I have used `rsync` to back up my `/` directory to an external hard drive, using this command in user (not su) mode (about 200,000 files copied in one hour and forty minutes) and it seemed to finish nicely:               rsync -aAXv --progress /* /media/"New Volume"/bu120813 --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}        Two worries: in attempting to get a copy of the command to use here I inadvertently started it off again, and stopped it with `Ctrl`+`C`. The stream of new messages overwrote the final message from the first copy, but I had seen there was a warning that a number of files hadn't been copied. Should I worry about either or both of these, and if so what should I do. Or, can I now go ahead with my Fedora installation?


title: Merge several eps files into one PDF

text: I have several hundred encapulated postscript files, and I want to merge them all into one big PDF. How can I do this?


title: Vim script check running platform

text: " Get running OS     let os = ""     if has("win32")       let os="win"     else       if has("unix")         let s:uname = system("uname")         if s:uname == "Darwin"           let os="mac"         else           let os="unix"         endif       endif     endif          " Brackets expanding     let preBracket="`"     if os=="mac"       let preBracket="$"     endif          exe 'vnoremap' . preBracket . '1 <esc>`>a)<esc>`<i(<esc>'     exe 'vnoremap' . preBracket . '2 <esc>`>a]<esc>`<i[<esc>'     exe 'vnoremap' . preBracket . '3 <esc>`>a}<esc>`<i{<esc>'     exe 'vnoremap' . preBracket . '$ <esc>`>a"<esc>`<i"<esc>'     exe 'vnoremap' . preBracket . 'q <esc>`>a''<esc>`<i''<esc>'     exe 'vnoremap' . preBracket . 'e <esc>`>a"<esc>`<i"<esc>'     " Map auto complete of (, ", ', [     exe 'inoremap ' . preBracket . '1 ()<esc>i'     exe 'inoremap ' . preBracket . '2 []<esc>i'     exe 'inoremap ' . preBracket . '3 {}<esc>i'     exe 'inoremap ' . preBracket . '4 {<esc>o}<esc>O'     exe 'inoremap ' . preBracket . 'q ''''<esc>i'     exe 'inoremap ' . preBracket . 'e ""<esc>i'      As vimscript above I want to map the shortcut to key expand bracket depend on vim's platform. Actually my macbook use different layout but I love the ease of using ``` character in keyboard so I map to $ which stays at the same place on mac pro keyboard (da layout). But it seems that the script works fine on linux but doesn't work on mac. Did I miss something or I need to add something to make this script work on Mac OSX ?


title: Bring up alias interface on boot, when the main interface is down

text: In my _CentOS_ 6.2 server, I have the following configuration for networking:   * The `NetworkManager` package wasn't installed   * on `eth0` I have a DHCP configuration   * on `eth0:1` alias interface I have a static IP, lets say `10.10.10.10` When I have connected my server to internet and boot up, both interfaces are brought up well, but when I don't have a connection to the internet (with other words, when it isn't allocated an IP through DHCP to the main interface) and boot up, the alias interface is also down. **Question** : Is there a way to prevent this behavior? Or how to bring up the alias interface when boot up the server, even if the main interface is down?


title: SVN access and indexing tool

text: I have a huge SVN repository where several developers make ~100 commits per day. The repository has a size of almost 4GB and each update requires me to wait for 30-60seconds. However, I do not do development in this repository and only need access to some files scattered across the directories of the SVN. Therefore: is there a tool available that   * only fetches the list of files in the SVN without pulling all their contents   * allows me to navigate the list of files and only donwloads those files i need   * indicates the last revision of the files   * Optional, but would be awesome to have: A full text search engine that creates an index of all files, removes the files afterwards from my db and downloads changed files in the background to update my index, and again removes them afterwards. (Also capability to blacklist files I do not need)


title: Creating a Makefile

text: As the title states, I am wondering how to create a Makefile to compile `hello.c`:               // for example          int main(int argc, char *argv[]) {         puts("Hello world");         return 0;     }      I am aware that I compile the program by the help off `gcc hello.c -o hello` and how I run it but that is as much as i know at the moment.


title: omxplayer playlist without black between videos at 1920x1080

text: I'm reading lot of posts/people using Raspberry and omxplayer (with some Python or script helper program) to allow playlist management without gaps between files (launching one file and pausing it, and then launching a second file and unpause first just when second one reaches the end). This is great, but in my case it doesn't work at 1080p resolution (even with gpu mem at 320MB). Only work for 720p. Has anyone been able to make it work with 1080p videos?


title: using "-vvv" with "-w FILENAME" with tcpdump makes better output?

text: Does it makes a more detailed output if I use               tcpdump -vvv -w FILENAME      vs. if I use:               tcpdump -w FILENAME      or it doesn't makes any sense if I use the "-vvv" when I'm using "-w FILENAME"?


title: Growing my extended partition to the left

text: I have the following one hdd               Disk /dev/sda: 320.1 GB, 320072933376 bytes     255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors     Disk identifier: 0xfa6bd800     Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048      821247      409600    7  HPFS/NTFS/exFAT     /dev/sda2          821248   210991103   105084928    7  HPFS/NTFS/exFAT     /dev/sda3       210991104   317941759    53475328   83  Linux     /dev/sda4       420343806   625141759   102398977    5  Extended     /dev/sda5       435689472   507955096    36132812+  83  Linux     /dev/sda6       507955200   566546431    29295616   83  Linux     /dev/sda7       566548480   625141759    29296640   83  Linux     /dev/sda8       420345856   435687423     7670784   82  Linux swap / Solaris      I have recently recovered one partition from Windows. I want to extend my 'extended partition' /dev/sda4 to the left to use the unallocated space. you could see that /dev/sda4 can be extended from 420343806 to 317941760 (end of /dev/sda3). I tried to this from gparted and it failed.               GParted 0.12.1 --enable-libparted-dmraid          Libparted 2.3     Move /dev/sda4 to the left and grow it from 97.66 GiB to 126.95 GiB  00:00:00    ( ERROR )          calibrate /dev/sda4  00:00:00    ( SUCCESS )          path: /dev/sda4     start: 420,343,806     end: 625,141,759     size: 204,797,954 (97.66 GiB)     move partition to the left and grow it from 97.66 GiB to 126.95 GiB  00:00:00    ( ERROR )          old start: 420,343,806     old end: 625,141,759     old size: 204,797,954 (97.66 GiB)     requested start: 358,901,760     requested end: 625,139,711     requested size: 266,237,952 (126.95 GiB)     libparted messages    ( INFO )          Unable to satisfy all constraints on the partition.     Can't have overlapping partitions.      So I am trying to do the partition extension with fdisk. I think these are the following steps. 1\. delete /dev/sda4 2\. create new extended partition from 317941760 to 625141759. 3\. resize2fs on /dev/sda4 But if I do this way, will I lose my logical partitions or data? Or should I be taking another route to achieve the same. Also can someone recommend an ultimate source to learn about partitions and file systems? Thanks


title: Ubuntu Precise -- suspend wedges GDM -- help!

text: I've been a very happy Ubuntu user for many years, and worked my way past any number of problems, but I've never seen anything like this. Recently I got a new machine and installed 12.04 Precise on it, and after some fiddling, it looked like everything was working fine. I just tried the suspend function for the first time, and on wakeup, GDM was seriously wedged -- a window popped up saying "System Error" and gave a bunch of details. I took screenshots -- I think it was a segfault thrown by simple-slave : ![enter image description here](http://i.stack.imgur.com/jHmaM.png) ![enter image description here](http://i.stack.imgur.com/k6iPU.png) Now a reboot gets me to a low-res startup screen, saying "Ubuntu 12.04" and four dots that change from white to orange and back again, nothing more. I can use ctl-alt-F1 to get a command line, log in there, and run "startx" and I get the X display (including TwinView on my two monitors), the cursor works, but there's no desktop manager, no Dash, no way to go further that I can see. I've rebooted several times and this behavior isn't changing. From the command line, I've tried using apt-get to remove and reinstall gdm, no difference. I've tried removing gdm and telling it to use lightdm instead, no difference. I have no idea what's going on. Can anyone help?


title: Choppy animations in desktop using fglrx driver in openSUSE 11.4

text: I downloaded and installed the ATI driver, but my desktop effects were not working. Moving windows creates choppy animations. I changed the rendering backend in kwin from openGL to xrender and the desktop effects worked, but my 3Dchess din't work because in my hardware profile the driver for my video card still says Radeon via modprobe instead of fglrx. I aslo tried installing from level 3 and also ran `aticonfig --initial`. `xorg.conf`:               Section "ServerLayout"             Identifier     "aticonfig Layout"             Screen      0  "aticonfig-Screen[0]-0" 0 0     EndSection          Section "Module"     EndSection          Section "Monitor"             Identifier   "aticonfig-Monitor[0]-0"             Option      "VendorName" "ATI Proprietary Driver"             Option      "ModelName" "Generic Autodetecting Monitor"             Option      "DPMS" "true"     EndSection          Section "Device"             Identifier  "aticonfig-Device[0]-0"             Driver      "fglrx"             BusID       "PCI:1:0:0"     EndSection          Section "Screen"             Identifier "aticonfig-Screen[0]-0"             Device     "aticonfig-Device[0]-0"             Monitor    "aticonfig-Monitor[0]-0"             DefaultDepth     24             SubSection "Display"                     Viewport   0 0                     Depth     24             EndSubSection     EndSection      Xorg log:               [   199.425]     X.Org X Server 1.9.3     Release Date: 2010-12-13     [   198.439] X Protocol Version 11, Revision 0     [   198.439] Build Operating System: openSUSE SUSE LINUX     [   198.439] Current Operating System: Linux linux-8ff2 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64     [   198.439] Kernel command line: root=/dev/disk/by-id/ata-WDC_WD5000BEVT-75ZAT0_WD-WXV0A49E6829-part9 resume=/dev/disk/by-id/ata-WDC_WD5000BEVT-75ZAT0_WD-WXV0A49E6829-part7 splash=silent quiet vga=0x317     [   198.439] Build Date: 22 February 2011  10:08:09PM     [   198.439]     [   198.439] Current version of pixman: 0.20.0     [   198.439]    Before reporting problems, check http://wiki.x.org             to make sure that you have the latest version.     [   198.439] Markers: (--) probed, (**) from config file, (==) default setting,             (++) from command line, (!!) notice, (II) informational,             (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [   198.439] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jun 30 01:44:40 2011     [   198.440] (==) Using config file: "/etc/X11/xorg.conf"     [   198.440] (==) Using config directory: "/etc/X11/xorg.conf.d"     [   198.440] (==) ServerLayout "aticonfig Layout"     [   198.440] (**) |-->Screen "aticonfig-Screen[0]-0" (0)     [   198.440] (**) |   |-->Monitor "aticonfig-Monitor[0]-0"     [   198.440] (**) |   |-->Device "aticonfig-Device[0]-0"     [   198.440] (==) Automatically adding devices     [   198.440] (==) Automatically enabling devices     [   198.440] (WW) The directory "/usr/share/fonts/TTF/" does not exist.     [   198.440]    Entry deleted from font path.     [   198.440] (WW) The directory "/usr/share/fonts/OTF/" does not exist.     [   198.440]    Entry deleted from font path.     [   198.440] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.     [   198.441]    Entry deleted from font path.     [   198.441] (==) FontPath set to:             /usr/share/fonts/misc:unscaled,             /usr/share/fonts/Type1/,             /usr/share/fonts/100dpi:unscaled,             /usr/share/fonts/75dpi:unscaled,             /usr/share/fonts/URW/,             /usr/share/fonts/cyrillic:unscaled,             /usr/share/fonts/truetype/     [   198.441] (==) ModulePath set to "/usr/lib64/xorg/modules/updates,/usr/lib64/xorg/modules"     [   198.441] (II) The server relies on udev to provide the list of input devices.             If no devices become available, reconfigure udev or disable AutoAddDevices.     [   198.441] (II) Loader magic: 0x7dc040      LSPCI:               00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)     00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)     00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)     00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)     00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)     00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)     00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)     00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)     00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)     00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)     00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)     00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)     00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)     00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)     00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)     01:00.0 VGA compatible controller: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series]     01:00.1 Audio device: ATI Technologies Inc RV710/730     04:00.0 Network controller: Intel Corporation WiFi Link 5100     08:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe (rev 10)     09:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)     09:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)     09:01.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)     09:01.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)


title: How can I get irssi-proxy to send me missed mentions when I connect?

text: I have an irssi session running in my VPS. I connect to it via irssi-proxy using Xchat on my laptop or Andchat on my Android phone. Is there any way I can make it send all messages containing my nick since my last proxy connection to my client when I connect?


title: Pass the background flag (&) through expect and ssh

text: My command line/bash fu is extremely weak, but I'm trying to hone my abilities. Hopefully someone can help. I wrote a super simple `expect` script so that I can SSH in to a headless box we're using at work, while also sending in the password (for reasons that I am unable to expand upon, we can't use public keys to automate logging in). The script:               #!/usr/bin/expect -f     set timeout 30     spawn ssh -X ***@10.101.0.133 $argv     match_max 100000     expect "*?assword:*"     send -- "***\r"     interact      The box has a developer environment and Eclipse installed; most of the time that I'm connecting to it, I will end up tunneling straight in to Eclipse to work on some code that we keep on this box, so I usually end up using `script eclipse`. How can I pass the `&` flag in to expect so that it sees the ampersand as an argument for the ssh session I'm spawning ? When I use `script eclipse &` it just backgrounds script on my machine instead of doing something on the remote machine, but I'd like to be able to send the `&` in to `script` so that when Eclipse launches on the remote box I can still use the box's shell. This is probably an incredibly silly question, but any help would be greatly appreciated. **Update:** I figured out escaping the ampersand (which was definitely a "no duh" moment for me... meh). But this leads to a new problem. It seems that when I pass any arguments to my script, the expect command never allows me to interact; once the passed command executes the SSH session terminates. I'm guessing that this isn't a limitation of expect but a part of the behavior of ssh. Thanks for your answers though. **Update 2:** Just for the sake of posterity, I got the behavior I wanted by modifying the script to look like this:               #!/usr/bin/expect -f     set timeout 30     spawn ssh -X ***@10.101.0.133     match_max 100000     expect "*?assword:*"     send -- "***\r"     send $argv     send -- "\r"     interact


title: How to prevent user from changing files using linux permission

text: Is it possible, using linux permission scheme, to allow users create files but not edit or delete them at a later time? I mean, we have a delivery folder where users put artifacts there and we do not want these artifacts to be modified after delivered i.e. edited or deleted.


title: Boot to a terminal by default but still have GUI loading in Debian?

text: I've installed Debian on an old netbook of mine which I intend to turn into a thin client for a personal thingie while also having it ready to play a video or some music when needed.   After swimming against the current for hours, working around known bugs and getting wireless to work, I've finally come to a point where I can't find any more help on Google. (I've hardly used Linux) I wish to boot into a terminal (like pressing Control + Alt + F1) by default, but also have the GUI (Gnome, in my case) loading in the background if possible (for quick access with Control + Alt + F7).   How do I do this?


title: Scroll between tags in Awesome WM

text: How can I add smooth scrolling between tags in the Awesome WM? I realize I can't run compiz with Awesome. Is there something comparable that I can run? I don't need any other effects, switching between tags quickly is just disoreinting when it jumps as it does. EDIT: While I didn't find an exact answer, cairo-compmgr gives smooth fading between tags and clients. I'm satisfied :)


title: extensions.gnome.org is not working on fedora 17

text: Using fedora 17, when I click an extension to install from gnome shell extensions site, it wont install! How to know what the problem is?


title: How are zombie processes handled when the parent dies?

text: Which technique does the Unix system use to remove zombie processes whose parent has terminated?


title: stdout is empty

text: When a run the command:               cellprofiler --get-batch-commands "/users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5"      in the shell, I get an output:               CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_5     CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_6     CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_7     CellProfiler -c -r -b -p /users/pmrotem/CellProfiler/example_project/output/Batch_data5_8.h5 -g Metadata_Plate=20140602-LOPAC pilot_Assay Plate 0_8      However when I try to output it to a file (I add `>test.txt`) I get an empty file. I also tried to invoke the command through python and also get empty stdout. stderr is also empty in both cases. What is the problem? any ideas?


title: Subtracting one text string from another leaving unique characters, perhaps using awk

text: Is there any way to subtract one column of data containing text from another column containing text and get third column containing unique charcters, for example using awk eg. Input               ab   a     cd   d         efg  ef      desired output:               ab   a   b     cd   d   c     efg  ef  g


title: Reevaluate the prompt expression each time a prompt is displayed in zsh

text: I'm adjusting my zsh prompt, based upon the dallas theme and the dstufft theme from oh-my-zsh. I love how dallas has various sections of the prompt contained in variables, which makes it much easier to understand what's going on. The problem is, these strings are evaluated _once_ for expansion. So when I attempt to use something dynamic, such as the `${PWD/#$HOME/~}` of dstufft, then it no longer updates dynamically. How can I get the best of both worlds? I'd like the prompt broken up into subsections that are evaluated each time the prompt gets written.


title: How does a script/program executes in unix?

text: I have a doubt about the execution pattern of a unix script. For example a script containing lines:               command B     function C()     {     Myscript   // Myscript is a script      command  D     }     command E      and suppose if `Myscript` takes a long time to execute (say 5 minutes) then is the next command (`command D`) going to execute or wait for `Myscript` to complete.


title: To sync /var or not?

text: It seems in a hard crash, in particular failure of a UPS to keep a system running, that some of the contents of logs get lost due to file system caching. As an experiment, I tried mounting the /var partition with the sync option. There was substantially more disk noise on a boot up, but the show stopper was trying to run apt. The disk pounded away while apt sat there unresponsive. Is it a mistake to mount /var sync, or is one of the options such as relatime, strictatime or noatime required for success? If so, is it safe to use one of these options on /var?


title: Character classes: construct my own

text: I want to construct my own character class in a script, then modify (and use) it, for example:   1. `[:myclass:]` contains `a`, `*`, `\n` _(as linefeed)_ and `[WHITESPACE]`.   2. I want to add all characters to `[:myclass:]` from `[:alnum:]`.   3. I want to remove the `p` character and the entire `[:upper:]` class from `[:myclass:]` The preferred solution doesn't depend on scripting languages. If you want to, use `bash`. * * * Bonus question: how to store this systemwide? Whenever I boot, `[:myclass:]` has to be available.


title: Need libca.so (Needed to install epics)

text: I need to install epics on my Ubuntu system, but when I try to it returns a warning saying it cannot find the dynamic library (libca.so or libCom.so). I tried to locate them, but it appears that they do not exist on my system. How can I get them on there? I thought they should automatically be there? This is really the symptom of a larger problem I'm having when I try to run the program I am working with. That gives me the following error: > >     OSError: /dls_sw/epics/R3.14.8.2/base/lib/linux-x86/libca.so: cannot > open shared object file: No such file or directory >   I figured I got this because I need to install epics, but I can't do that because libca.so doesn't exist on my system... I'm fairly new to all this so hopefully this all makes sense.


title: How to find out which file is currently opened in vim?

text: This may sound trivial but, on more than one occasion, I have found myself having forgotten which file in `vim` I have open (e.g. when I am looking through different log files and such) and the only way I knew how to find out was to close the file and look in the command history for the most recent command. Is there a command within vim to tell you which file you currently have opened without exiting the program or the file you have opened (e.g. `:<which_file_cmd>`?)


title: Is it correct to set the $TERM variable manually?

text: I set the `$TERM` variable adding the line `XTerm*termName: xterm-256color` to my `.Xresources` file. When I did it I didn't know what exactly that meant (I was following an online guide to change the look of `xterm`), but now I have read a little more and am concerned if what I did was wrong. Specifically I want to know there is something bad in setting the `$TERM` variable manually, and in case it is, how can I revert my mistake. In case you need, I'm running Fedora 20 with `xterm`.


title: Make a failed SSH forward a fatal error

text: I have a script which connects to a remote host to replicate some files via SSH. I must connect to an rsync daemon listening on port 873. To accomplish this I have a ssh configuration like this.               Host blah         LocalForward 10873 127.0.0.1:873         Hostname 10.2.4.1      Unfortunately because of the timing of this script, there is a small chance that on occasion when it attempts to establish the SSH session another similar script will have the port open to a different host. If I connect while another ssh session is open I get the obvious message **Address already in use**.               me@local:~$ ssh blah     bind: Address already in use     channel_setup_fwd_listener: cannot listen to port: 10873     Could not request local forwarding.     Linux remote 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011 x86_64     motd...     remote:~$       What I want to have happen is to have the SSH client immediately exit with a exit code so I can put some logic into my script to report a failure instead of trying to run any commands against the port forwarded to the incorrect host.


title: Cannot rotate screen in Debian Squeeze

text: I have 2 monitors which can rotate physically. They are working fine right now as non-mirrored, dual monitors. I went to System -> Preference -> Monitors and tried to rotate the screens. As soon as I click Apply, I appear at the log in screen as if I just logged out. Does anybody know what might be going on? Here are some lines that might be relevant in `/var/log/Xorg.0.log`.               (--) PCI:*(0:1:0:0) 1002:9552:1458:21ac ATI Technologies Inc M92 LP [Mobility Radeon HD 4300 Series] rev 0, Mem @ 0xd0000000/268435456, 0xfe9f0000/65536, I/O @ 0x0000c000/256, BIOS @ 0x????????/131072     ...     (--) RADEON(0): Chipset: "ATI Mobility Radeon 4300 Series" (ChipID = 0x9552)     ...     (II) RADEON(0): RandR 1.2 enabled, ignore the following RandR disabled message.     (--) RandR disabled      There's also the `gdm3` service running if that helps.


title: Xorg key clicks?

text: I've currently got Fedora 9 on my home PC (yes, I know its quite old - but hell I only reboot it every 6 months - nevermind upgrading!) . My only niggle is that keyboard I've got has quite a different feel / lyaout to the one I use everyday in work. To make life a bit simpler, I tried to enable the audio feedback. I first tried the setting in KDE (4.2) System settings - to no avail. I also tried 'xset c 100' but still nothing. The ALSA inerface seems to have no problems producing audio output from mplayer, xine, amarok.... and kmixer works as expected. Looking at the Xorg man pages there's nothing obviously jumping out here. Any ideas?


title: Accessing VirtualBox guest via VPN

text: I've searched and tried a few suggestions but I haven't been able to get this to work, yet... My host is running Ubuntu. I installed VirtualBox, created a host-only adapter, set the host IP to 192.168.15.1, and I switched off the adapter's DHCP server. Then I created the guest (Win XP), and set the IP to 192.168.15.101/24 and set the DG to 192.168.15.1 I can ping from the Host to the Guest and vice versa. Then I installed OpenVPN on the host. Created my own CA, server certs/key and client cert/key. Set the OpenVPN server conf to PUSH the 192.168.15.0/24 route to any VPN clients. I set my router to forward UDP 1194 to the OpenVPN server and tested the connection. The OpenVPN client is Debian running on another laptop. Once the VPN tunnel is established the VPN Client (10.8.0.6) can ping the VPN Host (10.8.0.1) and vice versa. The Client can also ping the Hosts 'host-only' IP at 192.168.15.1 with no issues. My problem is getting the Open VPN Client (10.8.0.6) talking to the VM Guest (192.168.15.101). I don't think the VM Guest (XP) is aware that the VPN Client exists, it has no way to route traffic/responses to 10.8.0.6. Can you 1) tell me what step(s) I'm missing and 2) how to fix this? Thanks. IPTABLES output from the OpenVPN server / VirtualBox host...               root@xxxxxxxxxxxx:~# iptables -L -nv     Chain INPUT (policy ACCEPT 48 packets, 53304 bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain OUTPUT (policy ACCEPT 35 packets, 2992 bytes)      pkts bytes target     prot opt in     out     source               destination      **SOLUTION** The missing piece was ip forwarding. I needed to edit /etc/sysctl.conf and change this:               # Uncomment the next line to enable packet forwarding for IPv4     #net.ipv4.ip_forward=1      to this               # Uncomment the next line to enable packet forwarding for IPv4     net.ipv4.ip_forward=1      Thanks Hauke Laging!


title: Execute a script as root at boot on Fedora 15/16

text: I try to run a script (tpfand) at startup, and it asked to be root to execute it. This is a script to control the fans on Thinkpad computers. Despite several attempts, I could not get ...


title: How to get nano to work properly under mutt?

text: I have set nano as the default editor in mutt; mutt launches nano normally enough, but when I try to send the message (ie. save and quit, separately) mutt says the message has been aborted. Any idea on how to fix this?


title: Removing apostrophe from all file names

text: I tried to remove apostrophe from all files' names in the directory.               for i in *; do mv $i `echo $i | tr -d "'"`; done      After executing this command nothing is renamed. Do you know what's wrong here?


title: File name encoding wrong in KDE, but correct in GTK/tty1/

text: I'm on a new Linux (installed yesterday). When I access files from old partitions their file names have incorrect encoding (Ã¤ instead of ä, same for other umlauts) inside KDE apps like dolphin and konsole. All characters look correct when I display them in tty and GTK apps. (And they obviously also did so on the old system.) How can I make KDE4 show the file names correctly? * * * Edit: So now I «fixed» this by re-installing the system. No idea what the problem was. **To get the keyboard right** everywhere (tty, KDM login screen, KDE) I had to run               dpkg-reconfigure locales       # Kept only (de_CH|en_US|ru_RU).UTF-8                                    # Selected de_CH.UTF-8 as default     dpkg-reconfigure console-data  # Selected German (Switzerland)      dpkg-reconfigure keyboard-configuration                                     # Selected my 105-key Cherry CyMotion Xpert                                     # AltGr on right Alt, no Compose key      Running keyboard-configuration first does not work since those settings are specific to the default keyboard selected in locales; for en_* e.g. there is no AltGr and no compose key. (Debian based system.)


title: build-dep firefox not working on Linux Mint

text: I'm on the latest Linux Mint 12. In order to compile Firefox I need to do a               sudo apt-get build-dep firefox      which isn't working and showing the following error:               $ sudo apt-get build-dep firefox     [sudo] password for michael:     Reading package lists...     Done Building dependency tree     Reading state information... Done     E: You must put some 'source' URIs in your sources.list      I remember that this worked out of the box in Ubuntu. Which URL do I need to specify in sources.list? Am I doing something else wrong?


title: Solaris "clean" group files (or for that matter any text file)

text: I am looking to find a way to script a cleaning operation on the /etc/group file on a large number of servers. Looking for users in a particular group more than once. i.e. somegroup::100000:userA, userB, userC, foo, bar, snafu, userB, userB Obviously for a small group this is easy and can be done manually, but I have some group files with large numbers of groups and entries. I thought about writing it up in java since it should be pretty easy, but I would prefer finding something in perl or shell. Thanks! Sean


title: Unable to load module: Disagrees about version of symbol module_layout

text: Following this tutorial to write my first driver. The Makefile is:               # Makefile – makefile of our first driver          # if KERNELRELEASE is defined, we've been invoked from the     # kernel build system and can use its language.     ifneq (${KERNELRELEASE},)         obj-m := ofd.o     # Otherwise we were called directly from the command line.     # Invoke the kernel build system.     else         KERNEL_SOURCE := /usr/src/linux 3.8         PWD := $(shell pwd)     default:         ${MAKE} -C ${KERNEL_SOURCE} SUBDIRS=${PWD} modules          clean:         ${MAKE} -C ${KERNEL_SOURCE} SUBDIRS=${PWD} clean     endif      And the driver code is :               * ofd.c – Our First Driver code */     #include <linux/module.h>     #include <linux/version.h>     #include <linux/kernel.h>          static int __init ofd_init(void) /* Constructor */     {         printk(KERN_INFO "Namaskar: ofd registered");         return 0;     }          static void __exit ofd_exit(void) /* Destructor */     {         printk(KERN_INFO "Alvida: ofd unregistered");     }          module_init(ofd_init);     module_exit(ofd_exit);          MODULE_LICENSE("GPL");     MODULE_AUTHOR("Anil Kumar Pugalia <email_at_sarika-pugs_dot_com>");     MODULE_DESCRIPTION("Our First Driver");      There is no error during make. But when I use `insmod ofd.ko` I'm unable to load it. In `dmesg` it says: > disagrees about version of symbol module_layout   * `uname -r` returns '3.8.0-38-generic' and the kernel source also 3.8.   * `modprobe -f ofd.ko` also fails  Also:               #56~precise1-Ubuntu SMP Thu Mar 13 16:23:47 UTC 2014     $ lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 12.04.4 LTS     Release:    12.04     Codename:   precise      What is happening?


title: Is it possible to mount an NFS partition with a label?

text: I export 3 directories via NFS (pisces:/media/music, pisces:/media/video, pisces:/media/photo) that I mount individually. Currently, they all appear on my (Ubuntu) Gnome desktop as 'pisces', which is less than useful. The doc seems to indicate that the `-LABEL` switch isn't supported for NFS `mount`; is there some other way of labeling the mounts? The directories are mounted using `/etc/fstab` (unfortunately I don't have access to that machine right now, and can't remember the options; it is pretty close to the defaults though). ta, \-- peter


title: What file systems support taking snapshot backups from a live system?

text: What file systems allows me to take a full snapshot of a full live partition, while active, in a state where all files have the same state as when the backup/snapshot process start ? I want to be able to make full backups of live database by copying the files, and the files are constantly being modified, and a simple copy `cp -rf` to all files always leave different files in inconsistent state.


title: Hugin 2012 build fail on Gentoo

text: My system is Gentoo amd64, up to date.               [I] dev-libs/boost      Available versions:  1.49.0-r2 (~)1.52.0-r6(0/1.52) (~)1.53.0(0/1.53) [M](~)1.54.0(0/1.54) {debug doc icu mpi +nls python static-libs +threads tools PYTHON_TARGETS="python2_5 python2_6 python2_7 python3_1 python3_2 python3_3"}      Installed versions:  1.53.0(10:17:32 PM 08/19/2013)(icu nls python threads -debug -doc -mpi -static-libs -tools PYTHON_TARGETS="python2_7 python3_2 -python2_5 -python2_6 -python3_1 -python3_3")      Homepage:            http://www.boost.org/      Description:         Boost Libraries for C++      My `boost` is already compiled with `threads` USE flag. But I still got this error when compiling `Hugin`.               ../hugin_base/libhuginbase.so.0.0: undefined reference to `boost::thread::join()'     ../hugin_base/libhuginbase.so.0.0: undefined reference to  boost::thread::start_thread()'     collect2: error: ld returned 1 exit status      Some people suggests downgrade `boost` to 1.47...but it is no longer in the portage.


title: How to display lines 2-4 after each grep result?

text: I'm parsing a mailbox file that stores e-mail server reports for unsuccessfully delivered e-mail. I wish to extract bad e-mail addresses, so that I remove them from the system. The log file looks like this:               ...some content...                        The mail system          <slavicatomic118@hotmail.com>: host mx1.hotmail.com[65.54.188.94] said: 550         Requested action not taken: mailbox unavailable (in reply to RCPT TO         command)          ...some content...                        The mail system          <oki88@optimumpro.net>: host viking.optimumpro.net[79.101.51.82] said: 550         Unknown user (in reply to RCPT TO command)          ...some content...                        The mail system          <sigirna_luka@yahoo.com>: host mta5.am0.yahoodns.net[74.6.140.64] said: 554         delivery error: dd This user doesn't have a yahoo.com account         (sigirna_luka@yahoo.com) [0] - mta1172.mail.sk1.yahoo.com (in reply to end         of DATA command)          ...etc.      E-mail address comes 2 lines after a line with "The mail system". Using grep like this gives me the "The mail system" line and the next two lines:               grep -A 2 "The mail system" mbox_file      However, I don't know how to remove the "The mail system" line and the second empty line from this output. I guess I could write PHP/Perl/Python script to do it, but I wonder if this is possible with grep or some other standard tool. I tried to give negative offset to -B parameter:               grep -A 2 -B -2 "The mail system" mbox_file      But grep complains:               grep: -2: invalid context length argument      Is there a way to do this with grep?


title: How/Why does cat write a bootable ISO to a device

text: I recently discovered that I can create a bootable USB key from an ISO file by simply using `cat` (or `dd`). I can't find any information on how this works. Why would:               cat my.iso > /dev/sdb && sync      take that file and write all the files it contains, in bootable format, to a device?


title: transfer permissions user -> group/other

text: How do I transfer write/execute and execute permissions from _owner_ to _group_ and _other_ , respectively? I have some libraries I want to move to _opt_ and set ownership of to _root_. Unfortunately, permissions are a bit messed up for _group_ and _other_ , and that creates a problem as _group_ and _other_ cannot use the libraries, call the executables and read the files. I want to recursively set the permissions of write/execute and execute to _group_ and _other_ respectively. For example, I want this:               -rw-r--r--.   1 root root    4464 Jan 11 23:58 CPackSourceConfig.cmake     -rwxr--r--.   9 root root   28672 Jan 11 23:58 executable     drwxr--r--.   9 root root   28672 Jan 11 23:58 Source      to be this:               -rw-rw-r--.   1 root root    4464 Jan 11 23:58 CPackSourceConfig.cmake     -rwxrwxr-x.   9 root root   28672 Jan 11 23:58 executable     drwxrwxr-x.   9 root root   28672 Jan 11 23:58 Source      How do I best go about doing this, considering there are quite a number of files/folders (recursive)?


title: ERROR: Failed to build gem native extension on Arch (postgresql)

text: I can't install `gem pg` on Arch due to the error:               Gem::Ext::BuildError: ERROR: Failed to build gem native extension.              /home/alex/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb      checking for pg_config... no     No pg_config... trying anyway. If building fails, please try again with      --with-pg-config=/path/to/pg_config     checking for libpq-fe.h... no     Can't find the 'libpq-fe.h header     *** extconf.rb failed ***     Could not create Makefile due to some reason, probably lack of necessary     libraries and/or headers.  Check the mkmf.log file for more details.  You may     need configuration options.          Provided configuration options:         --with-opt-dir         --without-opt-dir         --with-opt-include         --without-opt-include=${opt-dir}/include         --with-opt-lib         --without-opt-lib=${opt-dir}/lib         --with-make-prog         --without-make-prog         --srcdir=.         --curdir         --ruby=/home/alex/.rvm/rubies/ruby-2.1.1/bin/ruby         --with-pg         --without-pg         --with-pg-config         --without-pg-config         --with-pg_config         --without-pg_config         --with-pg-dir         --without-pg-dir         --with-pg-include         --without-pg-include=${pg-dir}/include         --with-pg-lib         --without-pg-lib=${pg-dir}/lib          extconf failed, exit code 1          Gem files will remain installed in /home/alex/.rvm/gems/ruby-2.1.1/gems/pg-0.17.1 for inspection.     Results logged to /home/alex/.rvm/gems/ruby-2.1.1/extensions/x86_64-linux/2.1.0/pg-0.17.1/gem_make.out      even so I've installed `sudo pacman -S libmariadbclient`. I've had this error on Ubuntu, but there I was able to solve it by install pgdev (I don't remember exactly) library. The fact is, this library doesn't exist for arch in its repository or it's called differently.


title: Tri-booting Windows, Ubuntu, and SUSE

text: I have just bought a new laptop (Packard Bell EasyNote TM 87) which has Windows 7 preinstalled. There are already two partitions labelled PQSERVICE, SYSTEM RESERVED and Packard Bell C:. I cannot remove this Windows installation because I don't have a copy of the Windows-only recovery DVDs. I want to tri-boot Windows, Ubuntu, and SUSE. First, I created an extended partition using `gparted` with two partitions and was left with some unallocated space. I installed Ubuntu in the extended partition by creating `/` and `/home` logical partitions. Now I want to install SUSE in the unallocated space. The SUSE 11.3 live CD does not list that unallocated space. What should I do?


title: IFS null is not the same as unset IFS?

text: I read a great question on here called Understanding IFS. I was surprised because the answers and comments quote POSIX which states that IFS= is not the same as unsetting IFS. If you unset IFS, apparently the default value is used. If you make IFS null instead, there is no splitter. I knew I had seen a different take on that, and I found this in my bookmarks: Bourne Shell Programming > $IFS > > The very first statement in your script should be > > IFS= > > which resets the input field separator to its default value. Otherwise, you > inherit $IFS from the user, who may have set it to some bizarre value in > order to make sh parse strings differently from the way you expect, and > induce weird behavior. So was that true some time ago or is the author just wrong?


title: Local disks detected as multipath device

text: My local partitions are detected as multipath device               $multipath -l          mpathb (360014380125d90420000a000003e0000) dm-9 HP,HSV450     size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw     `-+- policy='round-robin 0' prio=0 status=active     `- 3:0:0:1 sdb 8:16 active undef running     mpatha (3600508b1001c02143bc59c6862d97353) dm-0 HP,LOGICAL VOLUME     size=137G features='1 queue_if_no_path' hwhandler='0' wp=rw     `-+- policy='round-robin 0' prio=0 status=active     `- 0:0:0:1 sda 8:0  active undef running      I added the following lines in multipath.conf so that local partitions are not detected as multipath device               blacklist {        wwid 3600508b1001c02143bc59c6862d97353     }      Executed the following commands after that .               #service multipathd reload          # multipath -F     Oct 22 12:10:42 | mpathb: map in use     Oct 22 12:10:42 | mpatha: map in use      Is reboot of the server will resolve the issue ? It is a production server , so I have to take downtime before going ahead with reboot.


title: less follow mode - clear screen

text: I use `less` follow mode (Shift-F) to follow a log as it is updated. Sometimes it would be useful to do some actions on my system, and then only see log output related to that action. Basically I would need some way to clear the buffer so I'm not distracted by old stuff. I can't find anything about it on the man page, but maybe there is some trick?


title: Concatenate a folder's Java files, with a header for each file

text: I have an obligation to provide a document which just contains every source code file, with the file's name before each file. Example:               =============================     src/com/example/Factory.java     =============================          public class Factory {     ...     }          =============================     src/com/example/Worker.java     =============================          public class Worker {     ...     }      It must contain all *.java files in the current folder, recursively. How to easily generate such a file, using commonly available commands or a small script?


title: What tool can I use to sniff HTTP/HTTPS traffic?

text: I'm looking for a command line tool that can intercept HTTP/HTTPS requests, extract information such as: (content, destination, etc.), perform various analysis tasks, and finally determine if the request should be dropped or not. Legal requests must than be forwarded to the application. A tool that is similar in nature to `tcpdump`, Wireshark, or Snort, but operates at the HTTP level. ### References   * Intercept HTTP requests on Linux


title: cp all files and subdirectories in a directory ksh

text: How can I do a `cp` to copy all files including all sub-directories in the current directory. I looked at the man page, but I can't figure out how to do it.


title: Receiving Syslog messages with a systemd Arch Linux

text: I'm feeling like I've overlooked the obvious, but I can't figure out how to get my Arch Linux server, which uses `systemd`, to receive and log `syslog` messages from a remote system. I have a Cisco 678 DSL modem, and it can be configured to send syslog-format messages to some other machine. I'd like that machine to be my Arch Linux server. I've googled around, and all I find is that "systemd replaces syslog", or that I no longer need to run `syslog` or something equally irrellevant to my question. **UPDATE** I have asked on the Arch forums (http://bbs.archlinux.org) and gotten no relevant answers. I've installed `syslog-ng` just to listen on UDP port 514. `syslog-ng` writes messages from my Cisco 678, and a DD-WRT WAP I've got. Unfortunately, the messages don't end up in `systemd`'s journal, but rather in flat files. So, no exact solution, but something of a workaround. I'd rather have the syslog messages in the journal, not in flat files.


title: Recover Linux ext4 partition formatted to hfs+

text: I have a Linux partition formatted to ext4 and I accidentally formatted it with Mac OS X Disk Utility to HFS+ (Mac OS X Extended Journaled). I tried to recover it with http://www.r-studio.com/ on Windows but I can't get any files except few from trash or temporary browser files. Now I'm trying another software on OS X: http://www.stellarinfo.com/mac-data- recovery.htm, however it takes some time to scan partitions. Any ideas how to recover that partition? Should I recover it on Linux or Mac?


title: rpmbuild library register for 'requires'

text: Big Picture: I am building an in-house rpm for a customized php. I build an rpm which works, but generate library requirements that I can't seem to meet without using 'nodeps', which I want to avoid to ensure other requirements _are_ met in future usage. The cause of This Problem: (As usual in linux it comes down to proprietary software)... is the Oracle client library. The RPM I built for it is not registering its 'provide' correctly so that RPM understands that it provides this library capability.               %prep     %setup -q -n %{shortname}-%{version}          %build          %install     mkdir -p %{buildroot}/%{prefix}     mkdir -p %{buildroot}/%{_sysconfdir}/profile.d     mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d          cp -a %{_builddir}/%{shortname}-%{version} %{buildroot}/%{prefix}/          %{__install} -m 644 -p %{SOURCE1} \        $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/oracle-instantclient.sh     echo %{prefix}/%{shortname}-%{version}>%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf     rm -fv /opt/%{shortname}-%{version} /opt/%{shortname} /thisDir/%{shortname}-%{version} /thisDir/%{shortname}     ln -sv %{prefix}/%{shortname}-%{version} /opt/     ln -sv /opt/%{shortname}-%{version} /opt/%{shortname}     ln -sv %{prefix}/%{shortname}-%{version} /thisDir/     ln -sv /thisDir/%{shortname}-%{version} /thisDir/%{shortname}     chown -h user:user /opt/%{shortname}-%{version} /opt/%{shortname} /thisDir/%{shortname}-%{version} /thisDir/%{shortname}          %clean     rm -rf %{buildroot}          %files     ###%defattr(-,root,root,0755)     %{prefix}/%{shortname}-%{version}     /%{_sysconfdir}/profile.d/%{name}.sh     /%{_sysconfdir}/ld.so.conf.d/%{name}.conf          %post -p /sbin/ldconfig          %postun     rm -f /%{_sysconfdir}/profile.d/%{name}.sh /%{_sysconfdir}/ld.so.conf.d/%{name}.conf     rm -rfv /opt/%{shortname}-%{version} /opt/%{shortname} /thisDir/%{shortname}-%{version} /thisDir/%{shortname} %{_sysconfdir}/profile.d/%{source1}     ldconfig     rm -rf %{prefix}/%{shortname}-%{version}     rm -fv /opt/%{shortname}-%{version}     rm -fv /opt/%{shortname}     rm -fv /thisDir/%{shortname}-%{version}     rm -fv /thisDir/%{shortname}     rm -fv %{_sysconfdir}/profile.d/%{name}.sh     /sbin/ldconfig      Most of this is just script providing symlinks we use for standard locations across our environment; the functional part is the ldconfig. What am I doing wrong to ensure that rpmbuild picks up the 'provides'? I'm having a very hard time finding documentation on how this works in contemporary rpmbuild in Cent6.


title: How can I tell why a process is waiting?

text: I'm trying to run a command on OSX Mavericks and it seems to be hanging. I found out that `Control + T` is a Unix command to show the status of a foreground job. Pressing it several times over the course of **several minutes** gives me:               $ bin/rake                                                                                load: 3.68  cmd: ruby 55761 waiting 0.12u 0.02s     load: 3.47  cmd: ruby 55761 waiting 0.12u 0.02s     load: 3.47  cmd: ruby 55761 waiting 0.12u 0.02s     load: 3.09  cmd: ruby 55761 waiting 0.12u 0.02s     load: 2.41  cmd: ruby 55761 waiting 0.12u 0.02s     load: 4.38  cmd: ruby 55761 waiting 0.12u 0.02s      I understand this to mean that the status is "waiting", it has spent .12 seconds of user time and only 0.02 seconds of CPU time executing. I want to find out why it's stuck waiting. **How can I determine why a process is waiting**?


title: Shell script to execute a command with iteration

text: This is a script which looks for `.tab` files in a folder an should imports them with `ogr2ogr`, but I fail with the correct bracing.               for i in $( ls *.tab )     do       echo item: $i            ogr2ogr -f PostgreSQL -s_srs EPSG:21781 -t_srs EPSG:4326 -overwrite \               -nln $TBL_NAME PG:'"host=localhost user='$DBUSER' dbname='$DBNAME'"' $i     done      And I need a command line to execute the `ogr2ogr` section in this way:               ogr2ogr -f "PostgreSQL" -s_srs "EPSG:21781" -t_srs "EPSG:4326" -overwrite \             -nln "geom_tour" PG:"host=localhost user=postgres dbname=gis" DMC_34093.tab


title: Does input redirection (<) append a newline character?

text: I was originally of the impression that               $ ./myprog     moo[CTRL-D]      is exactly the same as               $ echo moo > cow     $ ./myprog < cow      But I found that `myprog` always counts one more `\n` in the second version than in the first. Why is this? Turns out `wc` does the same thing...               $ wc -l     moo[CTRL-D]0      (Apparently zero lines is possible?)               $ echo moo > cow     $ wc -l < cow     1      Can anyone explain this to me?


title: How can I get the tac command on OS X?

text: I like to use `tac` to reverse the output of `cat`. However, it's not available in the Mavericks terminal. I tried to find it on MacPorts and again it's not available. Can anyone please show me how to get `tac`? It's very helpful for reading log files.


title: Can I use scrypt to hash for LUKS?

text: Can scrypt be used as the hashing algorithm for LUKS? Can I tune its parameters? How can I do this?


title: squid 3.1.11-1 - POST issues

text: I have an issue with my squid on the website : http://www.draw.io I have one schema and I am not able to export it as a PNG (I got a white page on the web browser like the website didn't answer.) Without using squid export is working fine. I look at the logs and here is what I found : When not working I got : 1376985774.106 0 127.0.0.1 TCP_DENIED/407 4366 POST http://exp.draw.io/ImageExport2/export \- NONE/- text/html When I delete some stuff on my design it works : TCP_MISS/200 76269 POST http://exp.draw.io/ImageExport2/export hugo @domain.LOCAL DIRECT/199.38.86.62 application/x-unknown For me it seems related to the post size. Should I modify something in my squid configuration ? (which is pretty basic).


title: How to use find command to search for multiple extensions

text: I can get all `jpg` images by using:               find . -name "*.jpg"        But how can I add `png` files to the results as well?


title: How do font managers work in Fedora?

text: I am looking to do some font management on my Fedora system. I have installed both Font Manager and Fontmatrix. My goal was to be able to have more fonts installed than I wanted displayed, and to be able to enable/disable fonts (or groups thereof) whenever I wanted to. Both programs claim to enable or disable fonts. I can't seem to get Fontmatrix to do anything other than be a comprehensive font information source (glyphs, etc.) The enable/disable doesn't appear to work, and the documentation is less than helpful. I am able to disable/enable fonts in Font Manager. I had to recreate my Gnome settings, though, because I accidentally disabled all fonts, and even re- enabling them did not fix my panel fonts. There wasn't anything I could do, short of removing my local configuration and logging out/in, that would get those fonts back. So. What exactly do these programs **do** when they disable a font? And what trashed my panel fonts? I know Monospace was still installed/enabled, and nothing I could do would change the panel information. Thanks in advance!


title: Preemptive kernel and Physical Address Extension

text: Is there anyone that can tell me why, on a preemptive kernel, PAE would not work? This question is an exam question, however I haven't got a clue why it would not work.


title: Putty-like "Session Log" for gnome-terminal?

text: Is there a log feature for `gnome-terminal` like the "session log" in Putty? I want to log whatever I have typed in the gnome-terminal. I don't want to use `pterm` under Linux, I just want a `gnome-terminal`. See an example log here.


title: How come I suddenly don't have any audio?

text: Just a few minutes ago my sound was working, and then it stopped! I suspect it was caused by me checking out some video editors. How do I go about troubleshooting this? What I've so far tried:   * I ran `lsof | grep audio` and `lsof | grep delete` to see if there's any process locking the audio path(?), but nothing looks suspect.   * VLC and MPlayer are affected, while Quod Libet (GStreamer) isn't. [ **update** ] Strange one. I don't know if it has anything to do with Quod Libet, but I noticed that after closing (and reopening) it, the problem seemed to disappear. Note that I haven't logged out yet.


title: What's the difference between e2fsck and fsck and which one I should use?

text: I got this error message when running dmesg               EXT3-fs (sdd1): using internal journal     EXT3-fs (sdd1): mounted filesystem with ordered data mode     EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended     EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:     EXT4-fs (sdb1): warning: maximal mount count reached, running e2fsck is recommended     EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts:     EXT4-fs (sdc1): warning: maximal mount count reached, running e2fsck is recommended     EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts:     Adding 4194296k swap on /dev/sdd2.  Priority:-1 extents:1 across:4194296k SSD     kjournald starting.  Commit interval 5 seconds     EXT3-fs (loop0): warning: maximal mount count reached, running e2fsck is recommended     EXT3-fs (loop0): using internal journal      sdd seems to be running fine. That's the main partition. sda to sdc doesn't work. Should I umount and fo fsck? But which fsck I should use? e2fsck? e4fsck? Which one? I am using ext4 here. I have no idea what loop0 is. Looks like the system is pretty badly set up. EXT3-fs (loop0): mounted filesystem with ordered data mode I've heard I can do shutdown -rf . Someone have done that. The system is back online but I still got this message. What gives?


title: Pointers in Learning Linux 0.01 Source code

text: I am trying to learn some real programming in C and the concepts of Linux. So i thought i will try by looking at the Linux kernel 0.01 version source. In my understanding, I could find the scratch level implementation of many things, but the comments are very few. For example :               void rs_init(void)     {         set_intr_gate(0x24,rs1_interrupt);         set_intr_gate(0x23,rs2_interrupt);         init(tty_table[1].read_q.data);         init(tty_table[2].read_q.data);         outb(inb_p(0x21)&0xE7,0x21);     }      There seems to be no comments about the registers or the function.   I know the implementation will provide some idea, but I would like to know, if I should keep some reference so that the values and the names give me a better meaning and understanding. Please offer some pointers.