title: How to dynamically chose PBS queue during job submission

text: I run a lot of small computing jobs in remote cluster where job submission is managed by PBS. Normally in a PBS (bash) script I specify the queue that I would like to submit the job through the command `#PBS -q <queue_name>` The job queue that I need to chose depends on the load on a specific queue. Every time before I submit a job, I analyze this through the command on terminal `qstat -q` which provides me an output which looks like as follows               Queue            Memory CPU Time Walltime Node  Run Que Lm  State     ---------------- ------ -------- -------- ----  --- --- --  -----     queue1           --      --    03:00:00   --    0   2 --   E R     queue2           --      --    06:00:00   --    8   6 --   E R      I would like to automate the queue selection by the job script based on two constraints   1. The queue selected must have a walltime more than the job time specified. The job time is specified through command `#PBS -l walltime=02:30:00`.   2. The queue must have the least no. of jobs in Que as shown in the above output. I'm having trouble in identifying which tools that I need to use in terminal to help me automate the queue selection


title: Diagram of Linux kernel vs. performance tools?

text: Is there a diagram that shows how the various performance tools such as `ip`, `netstat`, `perf`, `top`, `ps`, etc. interact with the various subsystems within the Linux kernel?


`VLC media player 2.0.5 Twoflower (revision 2.0.5-0-g1661b7d)      process 20124: D-Bus library appears to be incorrectly set up; failed to read      machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory      See the manual page for dbus-uuidgen to correct this issue.      D-Bus not built with -rdynamic so unable to print a backtrace      Aborted      If having trouble installing ffmpeg was not enough, the above output is what getting trying to install vlc. All I did was download the linuxtech.repo to /etc/yum.repos.d/ followed by yum install vlc Others have had same problem so tried downloading and installing dbus because there is nothing in dbus folder. So I yum removed and reinstalled, still nothing in folder. Please does anyone know what is going on besides my being an obvious idiot? `


title: Linux not booting from SSD drive

text: Windows 7 OS, I installed debian 7.6.0 on USB external SSD drive, GRUB bootloader is installed on SSD drive `/dev/sdb` (not dual boot). But I can't boot Linux, when I select in Windows boot menu "Removable Devices", Linux not booting from SSD drive.


title: sudo as another user

text: I want to run a command on a shell on behalf of another user. The command is as follows:               sudo -u USER cd /home/USER      I get               sudo: cd: command not found      What is the correct syntax for the command to pass to sudo?


title: Automatically unlock keys on a remote host accessed via SSH

text: On my local PC my ssh keys are automatically unlocked on login. From there I access via ssh (with key authentication) a server that have stored the same keys I have in the client. I'd like to unlock those keys in the server as well **without** having to digit the passphrase. Is there a way to automatically unlock the keys in the remote host after a succesfull SSH login?


title: Samba permissions settings ignored?

text: I have a CentOS 6.4 fileserver running SerNet Samba 4.0.9 with these global settings (not overridden):                   read only = No         force create mode = 0777         force directory mode = 0777         inherit acls = yes         inherit owner = yes         inherit permissions = yes      On a Windows client, I have Thunderbird 24.0 storing its profile and mail on the Samba share. The perms on everything in the share were chmod -R 777'd. Then I get mail, compact a folder, whatever, and it looks like this:               -rwxrwxrwx. 1 1128 513        0 Oct 18  2012 Archives     -rwxrwxrwx. 1 1128 513     3158 Sep 25 13:20 Archives.msf     drwxrwxrwx. 2 1128 513     4096 Sep 25 09:12 Archives.sbd     -rwxrwx---+ 1 1128 513        0 Sep 25 13:49 Drafts     -rwxrwx---+ 1 1128 513     2450 Sep 25 13:50 Drafts.msf     -rwxrwx---+ 1 1128 513        0 Sep 25 13:08 Inbox     -rwxrwx---+ 1 1128 513     2317 Sep 25 13:50 Inbox.msf     drwxrwxrwx. 3 1128 513     4096 May 28 09:26 Inbox.sbd     -rwxrwxrwx. 1 1128 513     1268 Apr 12  2007 Junk.msf     -rwxrwxrwx. 1 1128 513       28 Oct  2  2012 msgFilterRules.dat     -rwxrwxrwx  1 1128 513    13736 Sep 25 13:50 popstate.dat     -rwxrwxrwx  1 1128 513 96061164 Sep 25 13:21 Sent     -rwxrwx---+ 1 1128 513  2988277 Sep 25 13:21 Sent.msf     -rwxrwxrwx. 1 1128 513        0 Mar 25  2010 Templates     -rwxrwxrwx. 1 1128 513     2684 Sep 25 13:20 Templates.msf     -rwxrwx---+ 1 1128 513        0 Sep 25 13:50 Trash     -rwxrwx---+ 1 1128 513     2223 Sep 25 13:50 Trash.msf      Whatever it touches is now 770. How can that be, when the parent of this folder is 777, Samba is set to inherit and force 0777?


title: Sudden USB 3 failure -- fuse-exfat related?

text: I have an external hard drive (vfat) which I have had working repeatably with USB 3. I recently plugged another external drive (exfat) into the same port after installing fuse-exfat, and it continued to work fine, even after a reboot. However, after unmounting the exfat drive and plugging the vfat one back in, it has started to take a long time for my computer to recognise the drive, let alone mount it. Uninstalling fuse-exfat doesn't solve my problem. The vfat drive still functions perfectly well with USB 2, and lsusb doesn't flag up anything out of the ordinary. I'm using Kubuntu 13.04. Anybody have any suggestions? I'm at a loss as to why this would happen. If there is a link that I have missed for updating relevant drivers, etc. which may help, then please send it! I've had a look but drew a blank.


title: What the "+" and "-" buttons do in Pantheon-files (files manager in Elementary OS)?

text: When setting the view to "Grid" in Pantheon Files (Elementary OS), there is this option to click a "+" or "-" button on folders and files. What is that? ![enter image description here](http://i.stack.imgur.com/bDztv.png) After clicking the "+", this may be switched back: ![enter image description here](http://i.stack.imgur.com/nOOQu.png) ![enter image description here](http://i.stack.imgur.com/z1Xwo.png)


title: Error installing xserver-xorg-video-* package from squeeze-backports in Debian Squeeze

text: I wanted to upgrade my Intel Core i[357] Integrated Graphics (Arrandale) driver so that DRI would work. But some packages were broken in the middle of the installation.               username@hostname:~$ sudo apt-get install -t squeeze-backports xserver-xorg-core     ...     dpkg: regarding .../xserver-xorg-core_2%3a1.10.3-1~bpo60+1_amd64.deb containing xserver-xorg-core:      xserver-xorg-core breaks xserver-xorg-input-7       xserver-xorg-input-synaptics provides xserver-xorg-input-7 and is present and installed.     ...     dpkg: error processing /var/cache/apt/archives/xserver-xorg-core_2%3a1.10.3-1~bpo60+1_amd64.deb (--unpack):      installing xserver-xorg-core would break existing software     configured to not write apport reports     ...     Errors were encountered while processing:      /var/cache/apt/archives/xserver-xorg-core_2%3a1.10.3-1~bpo60+1_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)     username@hostname:~$ sudo apt-get install -t squeeze-backports xserver-xorg-core     ...     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      xserver-xorg-core : Recommends: libgl1-mesa-dri (>= 7.10.2-4) but 7.7.1-4 is to be installed                          Breaks: xserver-xorg-input-7                          Breaks: xserver-xorg-video-6      xserver-xorg-input-evdev : Depends: xorg-input-abi-7.0     ...     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).                    username@hostname:~$ sudo apt-get install -t squeeze-backports xserver-xorg-core libgl1-mesa-dri     ...     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      libgl1-mesa-dri : Depends: libdrm-intel1 (>= 2.4.23-3~) but 2.4.21-1~squeeze3 is to be installed      xserver-xorg-core : Breaks: xserver-xorg-input-7                          Breaks: xserver-xorg-video-6      xserver-xorg-input-evdev : Depends: xorg-input-abi-7.0     ...     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).        1. How do I clean this up?   2. How do I get the packages to install?


title: Dual head configuration with two touchscreens in Linux

text: As a part of my current project I need to set up a **Linux-based** workstation with two monitors, both of which are multitouch-enabled (ViewSonic VX2258wm, Quanta touch panel). So, naturally, I set up a dual-head configuration and I connect the touchpanels using USB cables. While dual-head output works just fine, the operating system doesn't differentiate between the first and the second touch panels (so, if the first monitor is active, and I touch the second, the mouse pointer moves to the corresponding coordinates of the first monitor). I understand that the X server knows nothing about which touch panel corresponds to which monitor (since those are logically and, as a matter of fact, physically, different devices). Does anyone know if it is possible to make such configuration work right? Any suggestions, hints, kludges will be appreciated.


title: How do I check how much free space left on a device to create a partition

text: Let's say I have this virtual machine running:               [root@centos ~]# fdisk -ul          Disk /dev/sda: 8589 MB, 8589934592 bytes     255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors     Units = sectors of 1 * 512 = 512 bytes             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *          63      417689      208813+  83  Linux     /dev/sda2         2522205    13799834     5638815   83  Linux     /dev/sda3        13799835    16771859     1486012+  8e  Linux LVM     /dev/sda4          417690     2522204     1052257+   5  Extended     /dev/sda5          417753     2522204     1052226   82  Linux swap /     Solaris      How can I know how much free space left for more partitions on the disk?


title: mv filename .. (Where will the file go?)

text: [root@localhost /home/chankey/Desktop/Downloads]# ls     myproject.plx     [root@localhost /home/chankey/Desktop/Downloads]# mv myproject.plx ..      I had the file in Downloads folder. I used mv command as shown above and now I can't see the file. It is neither in the Desktop folder nor in the Downloads.


title: Virtual box machine, Created in windows run on linux?

text: Can a virtual box machine that was created in Virtual Box for windows run on Virtual box for linux? And if so do I just need to transfer the hdd files?


title: sulog with openSUSE 11.2 (x86_64)

text: I need to log as much as possible when users a doing `su *`...   Best would be to log all commands especially for the case `root` does something as a user. We can assume `root` would not change this logging behaviour.   I think the matching deal would be something like SULOG in debian.   How can I get that running?


title: SSH tunnelling with multiple dynamic port forwardings

text: I am trying to monitor multiple JVMs running on different servers through an ssh tunnel. Thanks to one of the UNIX gurus here, I have managed to get this running for a single server by:   1. Run `jstatd` on the target server   2. Set up Visual VM to use 9696 as its socks proxy port.   3. On my local PC, run:              ssh -L 2222:server1:22 bastion-host        4. On my local PC, run:              ssh -o port=2222 -D 9696 -L 1099:localhost:1099 localhost      This does the trick. Now when I try and tunnel to a second server I try:   1. On my local PC, run:              ssh -L 3333:server2:22 bastion-host        2. On my local PC, run:              ssh -o port=3333 -D 9696 -L 2099:localhost:1099 localhost      However, the last step complains with:               bind: Address already in use     channel_setup_fwd_listener: cannot listen to port: 9696      Has anyone managed to do something similar? **Update:** The reason this is so complex is that jstatd is an RMI server application: http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstatd.html As with RMI applications, these register with an rmiregistry. Using rmi through a firewall requires me to use SOCKS as described here: http://download.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#firewallOut Unfortunately, visualvm only lets me set the SOCKS proxy port once, and the -D option won't allow me to forward the same local port to both servers...


title: How to install and configure Dynamic VLAN Server?

text: I have below setup:   * Firewall: Fortinet 240D   * Core Switches are 2 one is Juniper EX 4200 & second one is EX 3300 I want to configure a Dynamic VLAN Server on Ubuntu Linux 12.04.3. Kernel and CPU: Linux 3.8.0-32-generic on i686. I have confirmed with Juniper technical support that EX3300 & EX4200 supports 802.1x authentication. Can anyone suggest which is the best software, package, or something like that I can install and get good/reliable documentation on installation/configuration and troubleshooting? Please suggest the best one as I do not have any specific in my mind but it would be great if it can be managed through some web portal that comes with it or can be managed from Webmin.


title: Qemu Arm how to passthrough a PCI Card

text: I'm trying to access a PCI wifi adapter on a Qemu, simulating vexpress-a9 board. I'm following is this tutorial which shares a passthrough PCI card of the host machine to a guest machine running on qemu-kvm. But I think its not applicable for qemu-system-arm.   * Is it possible to passthrough PCI using qemu-system-arm for vexpress-a9?   * Is there any way to access a PCI card as a USB device in the guest OS? or a host USB device in the guest OS? Here's what I'm doing:               qemu-system-arm \     -kernel ./zImage \     -M vexpress-a9 \     -cpu cortex-a9 \     -m 1024 \     -smp 2 \     -serial stdio \     -append "root=/dev/mmcblk0p1 rootfstype=ext4 rw raid=noautodetect console=ttyAMA0,38400n8 rootwait devtmpfs.mount=0 vmalloc=256MB mem=1024M" \     -sd ./vexpress-quantal.img


title: How to uninstall applications that were installed using tar command

text: Can anyone explain me how to uninstall the applications that are installed by extracting using `tar` command (`tar` files) . I am really struggling to find an uninstall file . Surprisingly, I dont't find make file , (make related files) . When I extract the `tar` file directly a binary file and its related files are distributed in my Linux PC .


title: Bash color output fails

text: Is it sed or echo problem? What I'm doing wrong?               $> cat ~/bin/color_test.sh      #!/bin/bash          ColorOff='\e[0m'       # Text Reset     BWhite='\e[1;37m'      # Bold White          string="test TEST test"     echo -e "$string" | sed -e "s/TEST/${BWhite}TEST${ColorOff}/g"          $> ~/bin/color_test.sh      test e[1;37mTESTe[0m test      Actually, I suppose to get TEST with bold highlighting.


title: Missing Fedora in grub after installing Ubuntu

text: I had Fedora 17 in a primary partition. Yesterday I installed Ubuntu in an extended partition, and I can't see Fedora in grub, so I tried `update-grub2` but it doesn't recognise Fedora being present, even if the Fedora partition is mounted. So I tried to re-install grub from live USB but it did not work either. How to bring back my Fedora? I don't want to re-install Fedora in the other partition. Output of `fdisk -l`               root@phanindra-VPCCW25FN:/home/phanindra# fdisk -l          Disk /dev/sda: 320.1 GB, 320072933376 bytes     255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000afaf9             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048    46139391    23068672   83  Linux     /dev/sda2        46141438    83888127    18873345    5  Extended     /dev/sda3        83888128   207808511    61960192   83  Linux     /dev/sda4       207808512   625141759   208666624   83  Linux     /dev/sda5        46141440    52432895     3145728   82  Linux swap / Solaris     /dev/sda6        52434944    83888127    15726592   83  Linux     root@phanindra-VPCCW25FN:/home/phanindra#       `/dev/sda6` has the current Ubuntu and `/dev/sda1` has Fedora. Is there any other option without installing super grub?


title: How can unix computers find each other by hostname?

text: I have a home-network with several windows and Linux machines which have samba installed. on windows I can find each other computer fine via its hostname. however on a linux computer I cant find any other computer via its hostname only the ip address works. In fact, it seems that Linux can't even resolve itself:               user@atom:~$ host atom     Host atom not found: 3(NXDOMAIN)


title: logrotate log file with enging date issue

text: We have following log files, log file with ending with `date`               catalina.out.2014-02-01     catalina.out.2014-02-02     catalina.out.2014-02-03     catalina.out.2014-02-04     catalina.out.2014-02-05     catalina.out.2014-02-06     ...     ...      My logrorate config               /opt/tomcat7.0/logs/catalina.* {       rotate 5       missingok       notifempty       size 5M       compress       copytruncate     }      Its truncating over and over again see following, (sample)               catalina.out.2014-04-17-20140419.gz     catalina.out.2014-04-17-20140419.gz-20140420.gz     catalina.out.2014-04-17-20140419.gz-20140420.gz-20140421.gz     catalina.out.2014-04-17-20140419.gz-20140420.gz-20140421.gz-20140422.gz     catalina.out.2014-04-17-20140419.gz-20140420.gz-20140421.gz-20140422.gz-20140423.gz     catalina.out.2014-04-17-20140419.gz-20140420.gz-20140421.gz-20140422.gz-20140423.gz-20140424.gz     catalina.out.2014-04-17-20140419.gz-20140420.gz-20140421.gz-20140422.gz-20140423.gz-20140424.gz-20140425.gz


title: parted: invalid token

text: I am teaching myself parted. In the docs it reads: > Parted has two modes: command line and interactive. Parted should always be > started with: >   >   >     # parted device >   > > [...] In command line mode, this is followed by one or more commands. For > example: >   >   >     # parted /dev/sda mklabel gpt mkpart P1 ext3 1MiB 8MiB >   > > [...] In interactive mode, commands are entered one at a time at a prompt, > and modify the disk immediately. When I run the former line it seems instead that parted goes interactive waiting for user input and raises the error:               parted: invalid token: mkpart      Am I missing something or is there a bug in the documentation? PS: The error does not show with `-s` switch.


title: PulseAudio naming a device

text: I found the Question and answer: How can I use PulseAudio virtual audio streams to play music over Skype? I am currently using the command `pactl load-module module-null-sink sink_name=Virtual1` to create my virtual devices. But would like to use `pactl load-module module-null-sink sink_name=Virtual1 sink_properties=device.description="NAME HERE (mic+music)"` But when issuing the command, I get the following error.               $ pactl load-module module-null-sink sink_name=Virtual2 sink_properties=device.description="NAME HERE (only music)"     Failure: Module initialization failed     $       Is there another way to name the device? Whilst making a virtual device.


title: How to sort a list of files by time, given only the filenames

text: Given a list of file names, how can I sort it by file modification time? The resulting output needs to look exactly like the input with the exception that the data has been sorted accordingly. Here is a sample of the input.               /jobs/crm/import/done/20140227-1359-0009.txt     /jobs/bridge/open-workitem/done/20140227-1359-0009.txt     /jobs/bridge/opened-workitem/done/20140227-1359-0009.txt     /jobs/bridge/update-workitem/done/20140227-1401-0001.txt     /jobs/bridge/update-workitem/done/20140227-1403-0001.txt     /jobs/tfs/import/done/20140227-1401-0001.txt     /jobs/tfs/import/done/20140227-1403-0001.txt     /jobs/tfs/open-workitem/done/20140227-1359-0009.txt


title: How can I delete all unordered lines from a text file?

text: **Overview** Consider an ordered list interspersed with unordered elements, e.g.:               Alligator     Ant     Falcon <--     Baboon     Badger         Armadillo <--     Caiman     Cat      How can this list be processed so that all unordered elements are deleted? E.g.:               Alligator     Ant     Baboon     Badger         Caiman     Cat      **Some more information** The unordered elements are always singular, the ordered elements come in groups of at least 2 lines. The general pattern would be:               ordered     ordered     ordered     unordered <--     ordered     ordered     unordered <--     ordered     ordered      The unordered elements can be both lower...               A     B     F <---     D     E      ...and higher than the following ordered element:               A     C     B <---     D     E      To make matters even more difficult: The elements can be both upper- and lowercase and contain diacritics (e.g.: ä,ö,à). * * * Is there any way to accomplish this with bash?


title: Should IP tables rules affect a serial port on Linux

text: I'm trying to setup some iptables rules on my embedded Debian Linux system, using a serial console I entered this:               root@ts7600-47aad3:~# iptables -F     root@ts7600-47aad3:~# iptables -P INPUT DROP      but it seems to have dropped my serial port connection, I can't type any more commands. I was not expecting this, I thought iptables only affected IP interfaces?


title: Hidden Files&Directories in user's home directory

text: I am in my user's home directory, I do:               ls -a      Then it shows me large number of hidden **files** and **directories** in my user's directory. Which of them I am allowed to remove? Which ones are necessary on my system? How can I realize it?


title: How to enable all STIX font glyphs in Firefox?

text: I'd like to try using the STIX fonts as my main web font while browsing in Firefox on Arch Linux. After installing the package (which currently includes the latest release, 1.1.1) I get a bunch more fonts in Firefox, and I've tried a few of them. Every time the official glyphs page reports > One or more STIX (scientific) fonts are not installed on your computer. > Please install ALL the STIX version 1.0 fonts. Looking at the page with "STIX MathJax Normal" as the default font it seems that some glyphs from several fonts are missing. A couple examples (dozens of glyphs are in fact missing):   * 0E08B ("stix-greater-than or (contour) similar") from `stixnonuni.otf` is missing, but not 0E17C ("stix-Mathematical sans-serif partial differential") from the same file.   * 0E154 ("stix-oblique open face capital letter A") from `stixnonuniita.otf` is missing, but not 0E1B4 ("stix-Mathematical sans-serif italic digit 0") from the same file. My questions:   1. How can I have _some_ glyphs but not all from the same file?   2. Does version 1.1.1 not have all the glyphs which were available in 1.0?   3. Has anyone been able to satisfy the glyphs page script with Firefox on Linux? If so, how? I would ask the STIX Fonts project, but the web site says "Please direct any questions or general comments to the STIX Fonts project.", where "STIX Fonts project" is a JavaScript pop-up link to a page which reports a proxy error "DNS lookup failure for: tconnell.devcloud.acquia-sites.comstixfonts".


title: identifying words in file 1 and matching them to second file and printing them

text: I have two files as follows File 1 has list of Ids               ram     Tarah     taikah     jhdfklj      File 2 has               id=ram;*between*hkjhdswklf     kjsdklhglshglkhgklsdgkhdfg     id=taikah;jhdjfkhg**kjdfkjksfdjk dfkjskdfjkljdflkjsdflj      Basically i want to match Ids from file 1 to file 2 and paste the complete line of file 2 Help would be appreciated.


title: Regular expression not working on sed

text: I am trying to use `sed` to change the format of decimal numbers in a large CSV file before importing it into a SQLite database. They all have two decimal places, may be negative use comma as a decimal separator and are therefore escaped with double quotes. I was trying the following: `sed 's/"(-?)([:digit:]+),([:digit:]{2})"/$1$2.$3/g' input.csv > output.csv` The regex seems to work on a text editor on a sample of the file, but when running it through `sed`, there are no changes to the original file. What am I doing wrong?


title: How do I configure lynx to pass images to xloadimage, xv or zvg?

text: I know that it's possible to configure `lynx` to pass images (PNG/GIF/JPEG/JPG) to `xloadimage`, `xv` or `zvg` and I've looked online (Description of lynx configuration; Use lynx with browser image support ; Lynx with HTML Images) for documentation for how to do this, to no avail. I've tried changing/adding directives to lynx's configuration file (`lynx.cfg`), without success. What is the correct configuration for images? Do I need to compile `lynx` from source and, if so, what flags/parameters do I need to specify? Should I rather use Netscape Navigator/Communicator (as that seems to support images without configuration)?


title: Mint: correct way to install /lib/i386-linux-gnu/libgmp.so.3

text: I have a 32-bit binary that needs libgmp.so.3 on an x86_64 installation. The cheating way would be copying libgmp.so.3 from an i386 installation and placing it in /lib/i386-linux-gnu/. But what is the proper way to install a 32-bit libgmp.so.3 on a 64-bit installation? I tried `aptitude install ia32-libs` and while that does install a lot of 32-bit libs it does not install libgmp.so.3. `uname -a` says:               Linux aspire 3.8.0-35-lowlatency #27-Ubuntu SMP PREEMPT Tue Dec 10 05:05:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux          $ apt-file search libgmp.so     lib32gmp-dev: /usr/lib32/libgmp.so     lib32gmp10: /usr/lib32/libgmp.so.10     lib32gmp10: /usr/lib32/libgmp.so.10.0.5     libgmp-dev: /usr/lib/x86_64-linux-gnu/libgmp.so     libgmp10: /usr/lib/x86_64-linux-gnu/libgmp.so.10     libgmp10: /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5     libssl0.9.8: /usr/lib/x86_64-linux-gnu/ssl/engines/libgmp.so     libssl0.9.8-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/ssl/engines/libgmp.so     libssl1.0.0: /usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/libgmp.so     libssl1.0.0-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/libgmp.so          $ lsb_release -a     No LSB modules are available.     Distributor ID: LinuxMint     Description:    Linux Mint 15 Olivia     Release:        15     Codename:       olivia


title: Streaming / Transcoding failed

text: I installed VLC, and works well apparently, on Suse Linux Enterprise Desktop 11 SP3, but when I streamed some video (.flv format) I get this error.-               Streaming / Transcoding failed     VLC could not open the encoder      Note.- I'm using the VLC 1.1.13 The Luggage. I'll appreciate any help


title: Elementary Os its overheating my laptop why? how fix it?

text: I just finished install Elementary OS and I realize that my laptop is overheating. Before install eOS I used Ubuntu 11.04 and everything was fine. Also the time to charge the battery now its very long. Is there any solution for my problem?


title: How do you setup user quotas for disk storage?

text: The lpic exam shows how to setup user disk quotas in the /etc/fstab. Source   http://en.wikibooks.org/wiki/LPI_Linux_Certification/Managing_Disk_Quota Example               /dev/fd0  /home/yann/mnt auto    rw,noauto,user,usrquota 0 0     /dev/hda5 /home     ext2    defaults,usrquota,grpquota 1 2               touch /mnt/aquota.user     touch /home/aquota.user     touch /home/aquota.group      chmod 600  /mnt/aquota.user      chmod 600  /home/aquota.user      chmod 600  /home/aquota.group      It seems to me that a large organization with hundreds of users would need a more complex setup than editing fstab entries for each user. Is this really how large organizations (like a university) would setup disk quotas? Without going into specific product recommendations, are there alternative methods for restricting disk usage?


title: Bash script calls expect script with master SSH connection

text: I'm trying to write a `bash` script that calls an `expect` script to establish a master SSH connection to be used for the remaining SSH commands in the bash script. ~/.ssh/config:               ControlMaster auto     ControlPath ~/.ssh/control-%r@%h:%p      upload.sh:               #!/usr/bin/bash          expect -f /home/Dave/bin/ssh.exp          scp /home/Dave/bin/test root@192.168.1.1:/root/test          ssh root@192.168.1.1 "echo 'Test' >> /root/test"          ssh -O exit root@192.168.1.1      ssh.exp:               #!/usr/bin/expect -f          # Enable some diagnostic output     exp_internal 1          spawn /usr/bin/ssh -M -N root@192.168.1.1          expect {         -re ".*yes.*no.*" {             exp_send "yes\r"             exp_continue         }         -re ".*password.*" {             exp_send "OMGSECRET\r"         }     }          $ bin/upload.sh     spawn /usr/bin/ssh -M -N root@192.168.1.1     parent: waiting for sync byte     parent: telling child to go ahead     parent: now unsynchronized from child     spawn: returns {5212}     Gate keeper glob pattern for '.*yes.*no.*' is ''. Not usable, disabling the performance booster.     Gate keeper glob pattern for '.*password.*' is '*password*'. Activating booster.          expect: does "" (spawn_id exp4) match regular expression ".*yes.*no.*"? (No Gate, RE only) gate=yes re=no     ".*password.*"? Gate "*password*"? gate=no     root@192.168.1.1's password:     expect: does "root@192.168.1.1's password: " (spawn_id exp4) match regular expression ".*yes.*no.*"? (No Gate, RE only) gate=yes re=no     ".*password.*"? Gate "*password*"? gate=yes re=yes     expect: set expect_out(0,string) "root@192.168.1.1's password: "     expect: set expect_out(spawn_id) "exp4"     expect: set expect_out(buffer) "root@192.168.1.1's password: "     send: sending "OMGSECRET\r" to { exp4 }     mux_client_request_session: read from master failed: Connection reset by peer     root@192.168.1.1's password:     root@192.168.1.1's password:      The SSH connection is being established, but it craps out when I try to reuse it for the SCP command. Why? Possible final sad edit: Alas it appears cygwin doesn't support multiplexing.


title: When I set up an email server using Postfix, how do I configure it to use my domain name?

text: I decided to follow this guide, but they only make a passing mention of using a custom domain name: > Insert the following details when asked (replacing server1.example.com with > your domain name if you have one): If I own the domain name `frank.com`, it won't be enough to simply put in `frank.com` into these fields, right? I'm planning to set this up in a VM on my laptop to use as a portable mail server (obviously only when the laptop is on), mainly as a learning experience, but I imagine I'll need to configure something with my domain registrar at the very least. Otherwise how will the emails show up? Not `myaddress@frank.com`, but as some IP address perhaps? I assume the answer isn't simple, but a pointer or two in the right direction would still be really helpful.


title: Where is core group defined on coreos?

text: On CoreOS EC2 instance, I find the following:               $ cat /etc/passwd     root:x:0:0:root:/root:/bin/bash     core:x:500:500:CoreOS Admin:/home/core:/bin/bash     $ cat /etc/group         wheel:x:10:root,core     sudo:x:150:     docker:x:233:core     $ id     uid=500(core) gid=500(core) groups=500(core),10(wheel),233(docker),248(systemd-journal),250(portage)        1. Where is the `core` group defined?   2. What commands can I use to change the uid _and_ gid of the `core` user/group, say in a systemd unit executed at startup? **update:** this seems to be related to the contents of `/usr/share/baselayout/group`, which does contain the `core` group, but I can't find any link to that file anywhere.


title: Resolve all aliases in a zsh command line

text: I have nested aliases and I want to resolve all of them before executing the command. How do I do that? If there is a function that is not bound to any keys then `M-x foobar` is fine for me too. I could even use external command (`type`, `command`, `which`, whatever). I tried everything from the thread Why not use "which"? What to use then? but nothing works.


title: IP blocklist for a particular country + region

text: I am looking to whitelist access to a machine based upon a country and region so that the number of IP blocks is smaller than doing a blacklist. That said, the only free utilities I found on the Internet provide a list of IP blocks for a given country. I am looking for it to drill down to the state level if possible so I only need a much smaller list of blocks. I know I can import the IP blocks into a local database and select the state, but I am looking for a one-shot country/state block list.


title: Guest desktop with no configuration permissions

text: I would like to set up a guest account on my Ubuntu so that anyone could log in (no password) and browse the Internet. But the guest user should not be able to modify desktop configuration (remove desktop icons, change theme, and so on). Is it possible? On one hand I need write permissions (browser cache), on the other - if write permissions to home dir are given, anything may get broken. Not mentioning running any malware by guest users... And there is another problem - if anyone would like to download anything from the Internet - they should be able to insert a pendrive and save there. One idea I have is to restore home directory from a preconfigured location - on logout. In a ramdrive or just delete and copy again. I think there should be a ready solution to this but I could not find any. Could you please help?


title: How can I identify the total files open by userid

text: Yesterday one of the users on our system had a poorly formed script that consumed all the space in one of our file systems. Through a lot of trial and error, I was able to identify the user and kill the processes causing the problem. Is there a simple way to identify such processes in the future? I think the output from the `lsof /file-system` command will display each open file with USER, PID, and file size and I suppose I could write a program to parse the output, but I'm curious if there is another command to do this. I really want a report of total file size by user, just to help focus if this problem happens again. I'm on Solaris 10, if that's relevant. And I'm not the System Admin; I'm probably a "power user" and coordinate things for our department end-users.


title: Get each column which contains multiple spaces?

text: My file:               subnet 172.25.10.0 netmask 255.255.255.0 {     option domain-name-servers 172.25.10.9, 8.8.8.8;     default-lease-time 300;     max-lease-time 7500;     range dynamic-bootp 172.25.10.10 172.25.10.30 ;     option broadcast-address 172.25.10.255;     option routers 172.25.10.1;     option ip-forwarding off;     }      for each field I want the `text part` alone and the `value part` alone:( I don't know the fields and how many spaces in each one, the same thing for values) as we notice: Fields:               max-lease-time;(o space)     option domain-name-servers (1 space)      Values:               300(o space)          172.25.10.10 172.25.10.30 ( 1 space)      My desired outpput is: I want to put the values in a variables named after the fields:               domain-name-servers="172.25.10.9, 8.8.8.8"(eliminate `option`)     default-lease-time="300"      and so on `awk` won't work for me, because there are some values with spaces: `172.25.10.9, 8.8.8.8` can I reach my goal using `grep -o`?


title: Screen: "Cannot exec /my/path/to/zsh" with local shell

text: Whenever I try to run screen under a Zsh shell that I compiled under my home directory, I get the following error:               > screen     Cannot exec '/my/path/to/zsh/bin/zsh'      The Z shell is perfectly functional, and I have verified that I can run screen if I invoke it using a system shell (e.g. `csh`). I usually get into `zsh` with: `exec zsh`. Here is some additional info about my system:               > echo $SHELL     /my/path/to/zsh/bin/zsh          > echo $ZSH_VERSION     5.0.0          > which screen     /usr/bin/screen          > screen --version     Screen version 4.00.03 (FAU) 23-Oct      My `.screenrc` just has two lines in it:               escape ^A^A     bind o other      In case it matters: `/my/path/to/zsh/` refers figuratively to a path under my home directory. ## Update   1. Output of calling `file`: > >     > file /my/path/to/zsh/bin/zsh >     > /~/sw/zsh/bin/zsh: ELF 64-bit LSB executable, AMD x86-64, version 1 > (SYSV), for >     > GNU/Linux 2.6.9, dynamically linked (uses shared libs), >     > for GNU/Linux 2.6.9, stripped >     2. But I **can** successfully run `/my/path/to/zsh/bin/zsh` and enter `zsh` from my `csh` shell. I usually switch to zsh with `exec /my/path/to/zsh/bin/zsh`   3. Below are the `ls` details on `/my/path/to/zsh/bin/zsh` > >     -rwxr-xr-x 2 YYYY ZZZZ 651K Jan 3 11:58 zsh* >     4. Mi `.login` is empty (it only has comments on it)   5. I don't have a `.profile` file   6. `cat/etc/*-release`: > >     Scientific Linux SL release 5.1 (Boron) >   Any thoughts on what may be causing this and how to get screen to work with my local installation of `zsh`?


title: How can I set up Virtual Hosts in Centos7?

text: I am trying to set up virtual hosts in Centos7. I followed this guide: http://twohlix.com/2011/05/setting-up-apache-virtual-hosts-on-centos/ however I keep getting the following error:               Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' `for details.`      the relevant output from journalctrl is as follows:               -- Unit httpd.service has begun starting up.     Aug 17 14:21:54 [8235]: AH00548: NameVirtualHost has no effect and will be removed in the next release     Aug 17 14:21:54 [1]: httpd.service: main process exited, code=exited, status=1/FAILURE     Aug 17 14:21:54 [1]: Failed to start The Apache HTTP Server.     -- Subject: Unit httpd.service has failed     -- Defined-By: systemd     -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel      I cannot figure out what this can be. I have also tried to use a different method whereby the VirtualHost container is inside the httpd.conf file but still no luck. I am using the following configuration.               Server version: Apache/2.4.6 (CentOS)     Server built:   Jul 23 2014 14:48:00      I have not configured DNS etc could this have an impact on it? This is the only other thing I could think of. Any help would be much appreciated I have spent the last couple of days trying to figure out what this could be but everything I tried failed.


title: I'm wondering about CUPS security. What can I do?

text: I run Debian Wheezy on a old Acer Aspire One ZG5 model netbook as a server. I have a printer shared to all my other systems and I'm worried about security. On the server I have IPtables set up to block everything that hasn't been initiated by the server itself and I opened ssh, cups (631), AVAHI (assumed 5353 for airplay printing). I just want to make sure no one but my trusted systems can print, that no one but me can get in a change CUPS settings via web or otherwise, and that no one can use a obscure CUPS hole to mess with my server. I have one iPhone, one android tablet, and two Debian Wheezy Laptops I want to share my printer with. I'm unsure how to go about securing CUPS or what even is the best security to use with CUPS.


title: How creating forcefsck file triggers file system check on reboot?

text: What is the significance of the file `/forcefsck`? I understand by creating this file the file system check is enforced during the next reboot. But how does this work?


title: dynamic file system with hooks

text: Is there anyway in linux (I don't care which distribution or flavor) to have a dynamic file system with read/write hooks? For example I would like to mount a dynamic file system at /dynamic and whenever I try to read/write to a non- existing location a bash script or program is run. like if I did `tail /dynamic/folder1/file1.log` a bash script would run before the read operation and the path would be available as an argument. Is there any projects out there that do something like this?


title: Error in creating android phonegap project on linux fedora

text: I am a beginner to linux fedora. Actually I am developing an android phonegap project with linux and I have followed the following steps   1. Open Terminal and move to the bin folder present in the android directory, using cd command of terminal.   2. Type the `./create {project_folder_path} {package_name} {project_name}` then press Enter. eg. `./create ~Desktop/myproject com.oodles oodles` But when I am trying to create a new project it is giving the following error               [root@NikhilAgrawal bin]# ./create Desktop/myprojects com.walkover.tester Tester     which: no android in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/Nikhil/.local/bin:/home/Nikhil/bin)     An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1     Deleting project...      Any ideas how to fix this?


title: How to create a user that doesn't show up on the login screen?

text: I need to run the web browser with another user but I don't want the user to be shown at the login screen. How can I create a user that will not be listed on the login screen? GNOME/Scientific Linux 6.3.


title: Why is GRUB 2 booting so slowly?

text: I have a small custom embedded Linux distribution (created with OpenEmbedded), which boots with GRUB 1.99. The aim is to have it start up fast. Currently it says:               GRUB loading.      for ~2+ seconds (this is probably unavoidable). Then:               Welcome to GRUB!      under it for a fraction of a second when it has finished loading. (There is no menu or menu timeout.) It clears the screen, then:               Booting 'Disk'      for ~8 seconds. **This delay seems like it should be avoidable.** I'd very much like to know how to make it not delay here. Then it continues on to:               Decompressing Linux... Parsing ELF... done.     Booting the kernel.      And then lots of fast scrolling text as the kernel boots. The kernel image file is 1.8MB, and the disk image file is 16MB. The `grub.cfg` file looks like:               set default="0"     set timeout=0          menuentry "Disk" {         set root=(hd0,1)         linux /boot/Disk.kernel parport=0x378,7,3 ramdisk_size=16384 root=/dev/ram rw         initrd /boot/Disk.ext2     }      In another boot disk I have (on a Compact Flash card), I have exactly the same kernel, and a different disk image file, which 20MB. The config file is also identical, except that ramdisk_size=20480. **This one has an extremely long delay of 69 seconds at that same point.** Why is it so much longer? Thankfully, I don't need to use that boot disk often. But it would be nice to fix that one too, since presumably the delay is caused by the same thing. **How do I fix this delay?** What is it doing? How does one go about debugging a bootloader? Is it worth looking into a lighter weight bootloader like SYSLINUX instead? Will deleting some of the unused GRUB 2 modules improve it? (How does one find which modules are unused?) **Summary** All of the following have the exact same Linux 3.2 kernel:   **Flash disk A** on computer X: 16MB image, GRUB 1.99, **boot delay is ~8s** ; disk A's read speed is 20MB/s.   **Flash disk B** on computer X: 20MB image, GRUB 1.99, **boot delay is 69s** ; disk B's read speed is 20MB/s. **Flash disk C** on computer Y: 16MB image, GRUB 0.97, **boot delay is.. extremely quick** ; disk C's read speed is 16MB/s.   Note that computer Y is similar to computer X, but a bit slower.   (The monitor is not even fast enough to show any GRUB screens at all. From the point of the BIOS screen disappearing to the Linux kernel loading screen first appearing, it shows 4.76s of blank screen - but the Linux kernel has already been loading for at least 1.5s by that time, so it's more like 3.2s at a maximum for GRUB to do its thing. This includes GRUB itself loading and BIOS deciding which drive to boot from, etc.)   Unfortunately GRUB 0.97 like that instance is not able to be repeatably built like that, so it doesn't seem like a feasible option (although it would be nice). **How do I make GRUB 2 fast??**


title: how come has firebird-superserver stopped and how to prevent from happening again?

text: On a CentOS 6.2 x86_64 server I have an instance of Firebird 2.5 that suddenly stopped working. The last part of the /var/log/firebird/firebird.log is:               cpc-5556l (Server)      Fri Nov 30 10:12:03 2012         Error in isc_attach_database() API call when working with security database         Can't access lock files' directory /tmp/firebird               cpc-5556l (Server)      Fri Nov 30 10:12:35 2012         INET/inet_error: bind errno = 98               cpc-5556l (Client)      Fri Nov 30 10:12:35 2012         /usr/sbin/fbguard: /usr/sbin/fbserver terminated due to startup error (2)                    cpc-5556l (Client)      Fri Nov 30 10:12:35 2012         /usr/sbin/fbguard: /usr/sbin/fbserver terminated due to startup error (2)      This is a production server, so rebooting it is the very last option. Restarting the service does no good either. I have googled a bit for these errors and still no luck. What should I do to solve this? Thanks in advance, gtludwig


title: Shell script to increment count of entries

text: I want a script which increments the count when the script runs. Basically I want to send an email notification when I find 10 devices down from the same country and scripts run after every down event. So if I set the counter as 0, the script then updates the value as 1 but next time when the script runs it checks the counter is set to 0 and again shows the value as 1. I need to save the previous counter value with respect to thee country name as both the values are not fixed. Also there are `n` number of devices belong to `n` number of countries.


title: Copying hashtag comments recursively within <blocks>

text: I have two files, one with blocks like               <record>     line1     line2     line3     #model bla bla bla     </record>      while the other file has exactly the same number of blocks, but without the hashtag comments, ie like               <record>     line4     line5     line7     line8     line9     line10     </record>      So, what I want to do, is to copy from the 1st block of the first file the hashtag to the 1st block of the second file so that my other file also looks like               <record>     line4     line5     line7     line8     line9     line10     #model bla bla bla     </record>


title: How does apt-get deal with multiple sources?

text: Let's say Ubuntu's repositories features a package. I install that package using `apt-get`. I then add an additional source (with `add-apt-repository`) that lists either a newer or older version of the package. Will apt-get always upgrade to the latest version, regardless of which source offers the latest version?


title: Can I detect if my custom made kernel was built with module support?

text: I have been provided with a vendor supplied minimal linux installation. From an answer to a previous question I discovered that it is possible to build a kernel with or without module support. I have a CANBUS device that I need to attach which comes with drivers in the form of .ko files. I would like to be able to install these with the provided install scripts, but firstly I need to know if my kernel was built with module support - is it possible for me to detect this from the command line?? When I run `lsmod` it returns nothing so I know that there are no .ko files there at the moment - but doest this mean that the kernel won't allow me to install a .ko file ?


title: Array Performance very similar to LinkedList - What gives?

text: So the title is somewhat misleading... I'll keep this simple: I'm comparing these two data structures:   1. An array, whereby it starts at size 1, and for each subsequent addition, there is a realloc() call to expand the memory, and then append the new (malloced) element to the n-1 position.   2. A linked list, whereby I keep track of the head, tail, and size. And addition involves mallocing for a new element and updating the tail pointer and size. Don't worry about any of the other details of these data structures. This is the only functionality I'm concerned with for this testing. In theory, the LL should be performing better. However, they're near identical in time tests involving 10, 100, 1000... up to 5,000,000 elements. My gut feeling is that the heap is large. I think the data segment defaults to 10 MB on Redhat? I could be wrong. Anyway, realloc() is first checking to see if space is available at the end of the already-allocated contiguous memory location (0-[n-1]). If the n-th position is available, there is not a relocation of the elements. Instead, realloc() just reserves the old space + the immediately following space. I'm having a hard time finding evidence of this, and I'm having a harder time proving that this array should, in practice, perform worse than the LL. Am I wrong in my assumptions??


title: list the devices associated with logical volumes without using lvm2 package commands

text: I want to list all the physical volume associated with logical volume. I know `lvdisplay`, `pvscan`, `pvdisplay -m` could do the job. but I don't want to use these commands. Is there any other way to do it without using lvm2 package commands? Any thoughts on comparing the major and minor numbers of devices?


title: Why gnome-terminal does not allow unlimited scrolling

text: I am using Fedora 14. Gnome Terminal 2.32.0. But there is no box for "unlimited scrolling". In fact, the number of lines I can scroll back is capped at 10,000. If I set it any higher, it will reset to 10,000. Also, I went to gconf-editor, and found a key "/apps/gnome- terminal/profiles/Default/scrollback_unlimited". I toggled this value, but still I am limited to 10,000 lines of scrollback. I read online unlimited scrollback was introduced in Gnome Terminal 2.28. Is there some sort of system-wide or security conf entry that I am not aware of? If so I can talk to the sysadmins to get that changed.


title: who loaded my kernel modules?

text: I have compiled a kernel with some modules, for example the `ath9k` for my wireless card. I don't have anything in the autoload configuration (i.e my file `/etc/modules.autoload.d/kernel-2.6` is empty). However, `lsmod` still shows that the module has been loaded. I also notice that when I compile filesystem support as modules (reiserfs, jfs, xfs etc.) they also get autoloaded. Who is doing this? Can and should I disable it? I am using Gentoo. Thanks


title: Can I make `rm` interactive only when using globbing? (in either bash or zsh or both)

text: Whenever I `rm` multiple items at once with shell globbing and there's even the slightest possibility that the pattern expands to more than I expect it to, I always try to remember to add `-i`, but (of course) I could forget and accidentally blow away something useful. Some people try to solve this problem with an alias, such as `alias rm='rm -i'` but I hate the idea of making rm _always_ interactive, because then I'll get into the habit of using `-f` all the time, which will obviously defeat the whole purpose. What I'd like to do is make `rm` only use `-i` when I use globbing, and for `-f` of course to override `-i`, so I can still blow away whole directories with the usual `rm -rf junk`. Therefore `rm *blah*` would really be `rm -i *blah*` but `rm blah` would work exactly as typed. In case there's a difference in how this might be accomplished in different shells, I will chose an answer that supplies methods for both bash _and_ zsh over answers that only cover one or the other. * * * **Note** : I'm not actually convinced this is necessarily a good idea; I'm just asking if it is possible. If you think this is a stupid idea, I would be very happy to hear the reasoning behind your opinion, but **_please don't post such comments in the answer field_**. Real answers either tell me how to do this or explain that/why it is not possible (or possibly offer an alternative method to getting a similar result). But if you want to tell me why this is dumb, please post as a comment. I'll upvote well-reasoned comments even if I disagree with the conclusion.


title: How to safely resume an aptitude dist-upgrade after SSH timeout?

text: I started `aptitude dist-upgrade` over SSH on my local network. At some point the session timed out but the upgrade was not finished (it was left at one of those accept software agreement screens-- I forget which one so I don't know how far into the upgrade I got, but the point is that right now it is idle waiting for me to accept). I SSH'ed back into my server and see that the aptitude process is still running. What is the safest way to proceed? I did not use `screen` so is there any way to resume the running aptitude process? If not, what is the safest way to kill and restart it?


title: Are there pitfalls to putting $HOME in git instead of symlinking dotfiles?

text: I have for many years had my entire `$HOME` directory checked into subversion. This has included all my dotfiles and application profiles, many scripts, tools and hacks, my preferred basic home directory structure, not a few oddball projects and a warehouse worth of random data. This was a good thing. While it lasted. But it's gotten out of hand. The basic checkout is the same across dozens of systems, but not all that stuff is appropriate for all my machines. It doesn't even all play nicely with different distros. I'm in the process of cleaning house -- separating the data out where it belongs, splitting out some scripts as separate projects, fixing some broken links in stuff that should be automated, etc. My intent is to replace `subversion` with `git` for the toplevel checkout of `$HOME`, but I'd like to pare this down to just the things I'd like to have on ALL my systems, meaning dotfiles, a few directories and some basic custom scripts. **In reading up online a lot of people seem to be doing this using the symlink approach: clone into a subdirectory then create symlinks from`$HOME` into the repository.** Having had my `$HOME` under full version control for over a decade, I don't like the idea of this aproach and I can't figure out why people seem so averse to the straight checkout method. **Are there pitfalls I need to know about specific to`git` as a top level checkout for `$HOME`?** P.S. Partly as an exercise in good coding, I'm also planning on making my root checkout public on github. It's scary how much security sensitive information I've allowed to collect in files that aught to be sharable without a second thought! WiFi password, un-passphrased RSA keys, etc. Eeek!


title: SSH public key login: two different keys and SSH_AUTH_SOCK behaviour

text: A user (`user1`) on an Ubuntu 12.04 desktop has two SSH RSA keys configured: `~/.ssh/id_rsa` and `~/.ssh/id_rsa1` (and `.pub` files). Both public keys are configured in the authorised keys on the server's account (`user1@myserver`). When logged on to the desktop (client) machine, and using a Gnome Terminal, logging on to the server using either keys works fine:   * `ssh user1@myserver` implicitly picks up `/home/user1/.ssh/id_rsa`   * `ssh -f /home/user1/.ssh/id_rsa1 user1@myserver` also works. If, instead of logging on via the Gnome Desktop, I log on to the client machine via SSH from another host (or even `localhost`) or use `su`, using `/home/user1/.ssh/id_rsa` no longer works. This appears to have something to do with `SSH_AUTH_SOCK` (missing originally in the environment set up with an SSH connection to the client). If I set it up to be the value visible in the desktop session `/tmp/keyring- xxxxxxxxxxx/ssh`, logging in with `id_rsa` works fine again. If I unset `SSH_AUTH_SOCK` (to make logging with `id_rsa` fail again), and copy `id_rsa1` to `id_rsa` (and `.pub` files), it now works with `id_rsa` too. What can explain the difference of behaviour between those two key pairs and their interaction with `SSH_AUTH_SOCK`? I can't see anything in the server logs. Here is the fragment of the SSH client logs, just before it differs:               debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/user1/.ssh/id_rsa (0x7f6b7059b260)     debug1: Authentications that can continue: publickey,password     debug3: start over, passed a different list publickey,password     debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/user1/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply      Followed by this, when it doesn't work for that user/key:               debug1: Authentications that can continue: publickey,password     debug2: we did not send a packet, disable method


title: Biostar GF7050V-M7 working with linux?

text: Do you know if Biostar GF7050V-M7 motherboard works completely with linux?


title: Silent booting Linux from u-boot

text: For security reasons I have to boot Linux from u-boot with all output hidden (silently) until a password is entered. I've configured uBoot to do this correctly using the `CONFIG_AUTOBOOT_KEYED` macro and can successfully boot silently. The issue I am having is that when uBoot boots the Linux kernel and silent mode is enabled, it passes `console=` as part of the bootargs to Linux kernel. This is fine for silent booting, but I can't seem to find a way to re-enable the console again after bootup. I've also tried to boot normally and append `loglevel=0` to the kernal bootargs which works for silent bootup, but again I cannot re-enable the console. I've tried:               dmesg -n 4      and               klogd -c 4      to try to set the Kernel loglevel back to KERN_WARNING (4) without luck. These commands work properly when I boot the Kernel normally. The best guide I've found on the matter is Silencing the boot process on blackfin.uclinux.org. Ideally I'd like to use uBoot's silent mode where it passes `console=` as part of the bootargs but still take input on the console and re-enable output when the password is entered, but I am open to other ideas if anyone can help guide me I would greatly appreciate it.


title: Make gvim scroll to the center after opening a file with line numbers?

text: When I open a file with gvim with the following command line option, `gvim file +5` I would like the current line (the 5th line) be scrolled to the center of gVIM's window, Is that possible?               --=--=----=--=----=--=----=--=--     |                            |     |                            |     |                            |     |                            |     |  this line was selected    |     |                            |     --=--=----=--=----=--=----=--=--      By default, it wasn't centered


title: Accidentally included special characters in username when adding user

text: I was trying to add a user called `joebloggs` and accidentally hit other keys as I pressed enter:               useradd -u 12345 joebloggs$*      (on French keyboards the `$` and `*` keys are next to Enter) doing a cat of /etc/passwd doesn't show anything nasty:               joebloggs:x:12345:12345::/home/joebloggs:/bin/bash      Is there anything else I should be aware of or checking for?


title: Logitech G110 Multimedia Keys in Linux Mint 14

text: I know that plenty of questions have been asked about multimedia keys, but I'm having trouble finding a solution for my specific problem. I have a Logitech G110 keyboard, which (besides the macro keys) works fine in Linux; however, the multimedia keys aren't working at all in any media program. The keys are being detected by the _Keyboard Shortcuts_ window but aren't doing anything in any other program. The volume wheel, mute button, mute headphones/microphone buttons, and backlighting all work fine. Only the multimedia keys are malfunctioning. Is there anything I can do, a tool I can download, some configuration file I can change, to get these working?


title: How to uncompress zlib data in UNIX?

text: I have created zlib-compressed data in Python, like this:               import zlib     s = '...'     z = zlib.compress(s)     with open('/tmp/data', 'w') as f:         f.write(z)      (or one-liner in shell: `echo -n '...' | python2 -c 'import sys,zlib; sys.stdout.write(zlib.compress(sys.stdin.read()))' > /tmp/data`) Now, I want to uncompress the data in shell. Neither `zcat` nor `uncompress` work:               $ cat /tmp/data | gzip -d -     gzip: stdin: not in gzip format          $ zcat /tmp/data      gzip: /tmp/data.gz: not in gzip format          $ cat /tmp/data | uncompress -     gzip: stdin: not in gzip format      It seems that i have created gzip-like file, but without any headers.. unfortunately i don's see any option to uncompress such raw data in gzip man page.. and zlib package does not contain any executable utility.. Is there an utility to uncompress raw zlib data?


title: Traffic-shaping Application with GUI

text: is there any free traffic shaping software for internet gateways with GUI for managing per user/computer bandwidth? At least it should able to manage per source IP (or MAC), or if possible with user authentication before they can access the internet (captive portal)


title: Redis-like temporary filesystem

text: Is there temporary file system (or ramdisk) that behaves like redis/memcache? so if there is not enough memory, i will dump to disk, when the computer restarted, it could read back from disk


title: Debian driver needed for Intel ICH7M SouthBridge I/O controller

text: I am using a motherboard based on this architecture. http://www.intel.com/content/www/us/en/intelligent-systems/navy-pier/embedded- intel-atom-n270-with-mobile-intel-945gse-express-chipset.html I need the linux driver for Intel® 82801GB I/O Controller Hub (Intel® ICH7). I find only windows drivers for this chipset. Any pointers would be useful. The actual issue I am facing is as described below. **Issue:** Secondary hard disk failure leads to OS Stall.. **Motherboard :** Quanmax KEMX 2030 **Operating System:** Debian 2.6.32-31 **Our Setup and Application Description:** On the KEMX 2030 motherboard, we connect two HDDs each at SATA 0 and SATA 1. SATA 0 is connected to a HDD(primary) which is loaded with Debian Linux OS. SATA 1 is connected to a HDD(secondary) which does not have any OS but has data storage partitions. Our application runs on the primary HDD and we copy certain critical files from primary to secondary HDD periodically for backup purposes. **Problem Description:** A faulty secondary HDD results in primary HDD Operating system stalling and freezing. There are two cases that we have witnessed in our field deployments   1. When the secondary HDD has developed bad sectors, whenever a file copy operation is performed from primary to secondary, the primary OS will start throwing DRDY UNC errors in its kernel log. UNC means uncorrectable sectors. The OS is not able to recover from this scenario and the whole system freezes and every application running on the primary HDD will become dead slow because the sata bus is choked.   2. When the sata data cable to the secondary HDD is faulty or of low quality, the primary OS will start throwing DRDY ICRC errors in its kernel log. ICRC means CRC errors in the data transmission. Even in this case, the primary OS freezes. Question is that why should the primary OS freeze when the secondary HDD goes bad. Is it because the SATA bus is getting choked? We want the primary HDD not to be affected because of secondary HDD failures. In order to isolate the problem and we did the following test. With a regular PC motherboard, we connected the same primary and secondary(faulty) drive to simulate the case. On simulating, we found that the linux kernel detects the same DRDY UNC/ICRC errors and in a matter of about 2 minutes, it is able to make the secondary HDD as read only and prevents further damage. The primary OS does not get choked at all. This PC motherboard also had a similar SATA 0 and SATA 1 to which we connected the same HDDs. We could not understand how the PC motherboard handled the scenario better. This test proved that the OS is doing it job on the PC motherboard, but on the KEMX motherboard it does not. Quanmax architecture is as shown in the picture below ![Arch Diagram](http://i.stack.imgur.com/R8iwm.png). Do I need a specific I/O controller driver to address this issue? Further debugging it, we found that irrespective of we connecting the secondary hard disk on SATA 0 or SATA 1 port, linux is able to scan for the secondary hard disk only on SCSI /HOST 0 port. If we do a scan on SCSI/HOST 1, the secondary HDD is not getting detected. Does this mean, the SATA bus is multiplexed into SCSI HOST 0? On the contrary, in the case of regular PC motherboards, we noticed that the scan has to be performed on the respective SCSI/HOST port for the secondary HDD to be detected. Following is the lspci output on the Quanmax KEMX board.               debian:~# lspci     00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)     00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)     00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)     00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)     00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)     00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)     00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)     00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)     00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)     00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)     00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)     00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)     00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)     01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)          debian:~#      Following is the lspci output on the regular PC motherboard.               debian:~# lspci     00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 02)     00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 02)     00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 02)     00:19.0 Ethernet controller: Intel Corporation 82562V-2 10/100 Network Connection (rev 02)     00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)     00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)     00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)     00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)     00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)     00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)     00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)     00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)     00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)     00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02)     00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)     00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)     00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)      The difference is that regular PC motherboard has ICH9 family and Quanmax KEMX has ICH7 family. Following is the kernel log which shows ata_piix version 2.13 is the driver which is being used. Does this version of the driver have a bug?               2013 Nov 21 17:14:19::kernel::[    1.569271] ata_piix 0000:00:1f.2: version 2.13     2013 Nov 21 17:14:19::kernel::[    1.569315] ata_piix 0000:00:1f.2: PCI INT B -> GSI 19 (level, low) -> IRQ 19     2013 Nov 21 17:14:19::kernel::[    1.569405] ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]     2013 Nov 21 17:14:19::kernel::[    1.569697] ata_piix 0000:00:1f.2: setting latency timer to 64     2013 Nov 21 17:14:19::kernel::[    1.576892] scsi0 : ata_piix     2013 Nov 21 17:14:19::kernel::[    1.581480] scsi1 : ata_piix     2013 Nov 21 17:14:19::kernel::[    1.584880] ata1: SATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14     2013 Nov 21 17:14:19::kernel::[    1.584952] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15     2013 Nov 21 17:14:19::kernel::[    1.756783] ata1.00: ATA-8: ST320LT012-9WS14C, 0001SDM1, max UDMA/133     2013 Nov 21 17:14:19::kernel::[    1.756860] ata1.00: 625142448 sectors, multi 16: LBA48 NCQ (depth 0/32)     2013 Nov 21 17:14:19::kernel::[    1.757445] ata1.01: ATA-8: ST320LT012-9WS14C, 0001SDM1, max UDMA/133     2013 Nov 21 17:14:19::kernel::[    1.757517] ata1.01: 625142448 sectors, multi 16: LBA48 NCQ (depth 0/32)     2013 Nov 21 17:14:19::kernel::[    1.772546] ata1.00: configured for UDMA/133     2013 Nov 21 17:14:19::kernel::[    1.789555] ata1.01: configured for UDMA/133     2013 Nov 21 17:14:19::kernel::[    1.789846] scsi 0:0:0:0: Direct-Access     ATA      ST320LT012-9WS14 0001 PQ: 0 ANSI: 5     2013 Nov 21 17:14:19::kernel::[    1.790422] scsi 0:0:1:0: Direct-Access     ATA      ST320LT012-9WS14 0001 PQ: 0 ANSI: 5     2013 Nov 21 17:14:19::kernel::[    1.814269] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)     2013 Nov 21 17:14:19::kernel::[    1.814370] sd 0:0:0:0: [sda] 4096-byte physical blocks     2013 Nov 21 17:14:19::kernel::[    1.814658] sd 0:0:1:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)     2013 Nov 21 17:14:19::kernel::[    1.814755] sd 0:0:1:0: [sdb] 4096-byte physical blocks     2013 Nov 21 17:14:19::kernel::[    1.814998] sd 0:0:0:0: [sda] Write Protect is off     2013 Nov 21 17:14:19::kernel::[    1.815068] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00     2013 Nov 21 17:14:19::kernel::[    1.815165] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA     2013 Nov 21 17:14:19::kernel::[    1.815268] sd 0:0:1:0: [sdb] Write Protect is off     2013 Nov 21 17:14:19::kernel::[    1.815339] sd 0:0:1:0: [sdb] Mode Sense: 00 3a 00 00     2013 Nov 21 17:14:19::kernel::[    1.815452] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA     2013 Nov 21 17:14:19::kernel::[    1.816076]  sda:     2013 Nov 21 17:14:19::kernel::[    1.828670]  sdb: sda1 sda2 sda3 < sdb1 sdb2 < sda5 sdb5 sda6 >     2013 Nov 21 17:14:19::kernel::[    1.921110]  sdb6 >     2013 Nov 21 17:14:19::kernel::[    1.922236] sd 0:0:1:0: [sdb] Attached SCSI disk     2013 Nov 21 17:14:19::kernel::[    1.922571] sd 0:0:0:0: [sda] Attached SCSI disk


title: How can I prevent SSH connection be closed by server for a user with nologin shell?

text: Basic info: Server OS: CentOS 6.3 Client tool: PuTTY I SSH to my server using PuTTY. I added an account with /sbin/nologin shell. When I log on to that account (selecting "never" close window on exit), console says "This account is currently not available" and PuTTY prompts "Connection closed by remote host". But I expect the server should only say "account not available" without closing the connection, so that I can still tunneling through this connection. I also noticed that for normal /bin/bash users, when typing exit, sometimes the connection is closed, sometimes the server says "LOGOUT" but still connected (I can still tunneling through it). So how can I ensure a connection not to be closed for a nologin shell account?


title: CentOS connected to Internet but not updates

text: I have installed CentOS 6.3, OpenSUSE 12.1 and Ubuntu 12.04 on VMware Workstation 9. On any of these when I use `ping` to check network connectivity, I receive a proper answer, but when try to update them using `yum`, `yast` and `apt-get`, they all return error message like "can't reach repository". I changed network setting in OSs and also in VMware over and over, but nothing happened. Also from CentOS (and probably other OSs) I cannot use firefox to access internet also cannot use wget to fetch a page such as yahoo.com, it says: "Connecting to yahoo.com (yahoo.com)|98.138.253.109|:80... failed: Connection refused. " on Ubuntu I do/see this:               root@ubuntu:~# apt-get update     Err http://packages.mate-desktop.org precise InRelease     Err http://packages.mate-desktop.org precise Release.gpg       Unable to connect to packages.mate-desktop.org:http:     Err http://extras.ubuntu.com precise InRelease     Err http://extras.ubuntu.com precise Release.gpg       Unable to connect to extras.ubuntu.com:http:     Err http://ppa.launchpad.net precise InRelease     Err http://ppa.launchpad.net precise Release.gpg       Unable to connect to ppa.launchpad.net:http:     Err http://security.ubuntu.com precise-security InRelease           Err http://security.ubuntu.com precise-security Release.gpg       Unable to connect to security.ubuntu.com:http:     Err http://us.archive.ubuntu.com precise InRelease     Err http://us.archive.ubuntu.com precise-backports InRelease     Err http://us.archive.ubuntu.com precise-updates InRelease     Err http://us.archive.ubuntu.com precise Release.gpg       Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]     Err http://us.archive.ubuntu.com precise-backports Release.gpg       Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]     Err http://us.archive.ubuntu.com precise-updates Release.gpg       Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]     Reading package lists... Done     W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/InRelease     W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease     W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/InRelease     W: Failed to fetch http://packages.mate-desktop.org/repo/ubuntu/dists/precise/InRelease     W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease         W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease         W: Failed to fetch http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu/dists/precise/InRelease         W: Failed to fetch http://packages.mate-desktop.org/repo/ubuntu/dists/precise/Release.gpg  Unable to connect to packages.mate-desktop.org:http:         W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg  Unable to connect to extras.ubuntu.com:http:         W: Failed to fetch http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu/dists/precise/Release.gpg  Unable to connect to ppa.launchpad.net:http:         W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Unable to connect to security.ubuntu.com:http:         W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]     W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]         W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]     W: Some index files failed to download. They have been ignored, or old ones used instead.


title: The keys work from config but not from ssh-add

text: Ssh keys work fine, if indicated in `./ssh/config` but if i try   `$ssh-add mykey   Could not open a connection to your authentication agent` even with `ssh-add -l` give the same result


title: error running raidctl on Solaris 10

text: I am trying set up a disk mirror on a Solaris 10 system. The two disks are identically formatted and not mounted. Neither is a boot disk. I ran the following:               # raidctl -c c1t2d0 c1t3d0      RAID_CREATE: Error 0      The error does not indicate anything about what the problem is. I have not been able to find anything about what the problem could be.


title: GNU "install" -d flag -- how's it work?

text: I'm trying to write a makefile rule to copy a directory, maintaining its structure, and since all the other rules in our makefiles use `install`, I wanted to be consistent. In the manpage, it says: > SYNOPSIS >   >   >        install [OPTION]... [-T] SOURCE DEST >        install [OPTION]... SOURCE... DIRECTORY >        install [OPTION]... -t DIRECTORY SOURCE... >        install [OPTION]... -d DIRECTORY... >   >        -d, --directory >               treat all arguments as directory names; create all components > of >               the specified directories >   OK, that sounds like what I need... but the flags don't make sense. How do you specify the destination directory to install to? I tried doing a basic test by making an arbitrary directory structure on my local hard disk:               ~>tree test     test     ├── a     │   └── b     │       └── c     │           └── e.txt     └── d          4 directories, 1 file      And then running `install -d` and looking at what was created:               ~>install -d test test2     ~>tree test2     test2          0 directories, 0 files      Nothing happened! Can anyone point me in the right direction? Googling "gnu install -d flag" isn't bringing me much.


title: Unable to run 'sudo chmod +w /etc/hosts'

text: I am logged into my remote VM (running out of `ESXi`) as user xyz. I wanted to change my `/etc/hosts` to add some network names that were not visible by default. I first tried to run               sudo vi /etc/hosts      but when I got into `vi`, it was still telling me the file was read-only. Here are the privileges:               >ls -l /etc/hosts     -rw-r--r-- 1 root root 416 2013-06-19 08:08 /etc/hosts      I also noticed that almost every other file in `/etc` has a `lsattr` of `-----------------e-`, only `hosts` has `----i------------e-`. E.g.:               >lsattr /etc     ...     -----------------e- ./python     ----i------------e- ./hosts     ...      Then I tried to `chmod` and here is what I got:               >sudo chmod +w /etc/hosts     chmod: changing permissions of `/etc/hosts': Operation not permitted      I thought that was weird because root (to which I am switched when I `sudo`) should be able to do anything. My `sudoers` file looks quite ordinary:                 1 # /etc/sudoers       2 #       3 # This file MUST be edited with the 'visudo' command as root.       4 #       5 # See the man page for details on how to write a sudoers file.       6 #       7        8 Defaults        env_reset       9       10 # Host alias specification      11       12 # User alias specification      13       14 # Cmnd alias specification      15       16 # User privilege specification      17 root    ALL=(ALL) ALL      18       19 # Allow members of group sudo to execute any command after they have      20 # provided their password      21 # (Note that later entries override this, so you might need to move      22 # it further down)      23 %sudo ALL=(ALL) ALL      24 #      25 #includedir /etc/sudoers.d      26       27 # Members of the admin group may gain root privileges      28 %admin ALL=(ALL) ALL      I am looking for an explanation why this is happening and how to work around it.


title: Send first line of the HTTP Header

text: A normal HTTP request may look something like this:               GET / HTTP/1.1     Host: example.com           I would like to change the first line of this request, with a custom one, e.g.:               FOOBAR NOT REALLY HTTP     Host: example.com           Is it possible to do this using `curl` or this there another tool, capable of doing this?


title: how to find out namespace of a particular process?

text: I already asked a question about how to list all namespaces in Linux, but there wasn't any correct and exact answers, so I want to find out a method which can help me to find out the namespace of PID of some process or group of processes. How can it be done in Linux?


title: Best practices for writing Blu-Ray discs on Linux

text: I recently bought a Blu-Ray writer and am wondering how to best write the discs. The scenario is: I have a directory full of files and want to put them on the disc, read them back once to verify, and then put the disc on a shelf (i.e., the main purpose is for backup). Some of the files are bigger than 4.4GB or whatever the limit is for ISO filesystems. For writing to DVDs, I currently use `growisofs`, with `split` to break the files into bite-size chunks. growisofs doesn't seem to have good UDF support and splitting the files is lame, which is the motivation for my question. What is the current best practice for writing files onto a BD-R disc? I am on Debian Wheezy (Testing).


title: What files in /var need to have specific owners?

text: I accidentally wreaked unknown amounts of havoc on my web server by running               sudo chown -R myuser:mygroup * .*      in `/var/www`, not remembering that `.*` would include the parent directory (as `..`). I realized what was happening after a second or so, but by then it was too late, half the directories in `/var` had been "re-owned". I know I can reset most of it with               sudo chown -R root:root /var      but what files are there that need to be owned by specific non-root users (or groups) that I would have to change manually? This is on Gentoo, and here's a directory listing:               $ ls -l /var     drwxr-xr-x  9 root root 4096 May 12  2009 cache     drwxr-xr-x  4 root root 4096 Aug 20 22:49 db     drwxr-xr-x  3 root root 4096 Aug 20 22:42 dist     drwxr-xr-x  4 root root 4096 Nov  1  2009 edata     drwxr-xr-x  2 root root 4096 Jun 17  2008 empty     drwxr-xr-x  5 git  git  4096 Feb 13  2010 git     drwxr-xr-x 23 root root 4096 Jul 19 03:22 lib     drwxrwxr-x  3 root uucp 4096 Aug 12 00:14 lock     drwxr-xr-x 10 root root 4096 Aug 20 03:10 log     lrwxrwxrwx  1 root root   15 Nov  7  2008 mail -> /var/spool/mail     drwxr-xr-x 10 root root 4096 Aug 21 00:22 run     drwxr-xr-x  8 root root 4096 Feb 13  2010 spool     drwxr-xr-x  2 root root 4096 Jun 17  2008 state     drwxr-xr-x 13 root root 4096 Dec 23  2009 svn     drwxrwxrwt  5 root root 4096 Aug 14 01:53 tmp     drwxr-xr-x 13 root root 4096 Aug 11 20:21 www     drwxr-xr-x  2 root root 4096 Dec 14  2008 www-cache      I can provide listings of subdirectories if it would help but that gets pretty long pretty fast. (`dist`, `edata`, `git`, `svn`, and `www` are things I manage myself so ownership in those won't be an issue)


title: Is there a Debian security APT repository that allows access via ftp?

text: If I want security updates for Debian, I add the following line to **/etc/apt/sources.list** :               deb http://security.debian.org <codename>/updates main      Is there a repository that allows the `http` to be `ftp`? I say this because other normal Debian APT mirrors allows that, and doing the same here doesn't work. That is, using the following line results in errors:               deb ftp://security.debian.org <codename>/updates main      One advantage of ftp is that it's often (or rather, in my limited experience) not put behind a proxy.


title: Where can I find information on Linux device driver parameters?

text: I want to work on Linux module programming (Device Drivers). And as a my college project I have to do profiling or benchmarking of a kernel modules based on various parameters. Everywhere I looked, I found info on how to write device drivers, whereas I want info on what parameters affect the performance of any specific driver/module. I also want to know how can I change them to test their various values.


title: rsync include-from exlcude-from with including subdir but excluding dirs above

text: I try to use rsync with `--include-from` and `--exclude-from` options. I have a directory structure like: `/docs/domain-[a-z]/templates` Now I want to sync `templates` only if something is in there. Further do not want to sync anything like `/docs/domain-a` and `/docs/domain-b` if `templates` is empty. I thougt it would work if I exclude `/docs/domain*` and include `**/templates` but this is not working. Should this work at all? Or is this just a problem of my rsync version 3.0.4 on SLES 11SP3 To clarify it Source Dir               /docs/     /docs/anydomain/templates     /docs/anydomain/other     /docs/domain_blah/     /docs/domain_blah/tmp/     /docs/domain_blub/     /docs/domain_blub/tmp/     /docs/domain_blub/templates/anyfiles     /docs/domain_blob     /docs/ohter     /other      So I just want to sync the `/domain_blub/templates` if there is something inside `templates` and leave all the `/docs/domain_blub/tmp` and other files away But I too want to sync contents from `/docs/anydomain/` or `/docs/other` and even `/other` The target structure looks the same but there might be more domains set up which shouldn't be deleted or changed. It could look like this               /docs/     /docs/anydomain/templates     /docs/anydomain/other     /docs/domain_balah/     /docs/domain_balah/tmp/     /docs/domain_aaaa/     /docs/domain_aaaa/tmp/     /docs/domain_blah/     /docs/domain_blah/tmp/     /docs/domain_blub/     /docs/domain_blub/tmp/     /docs/domain_blub/templates/anyfiles     /docs/domain_blob     /docs/ohter     /other


title: Avoiding pasting with the mouse wheel

text: I'm tired of having to copy and paste text using the the wheel of my mouse; the amount of dexterity needed is legendary. Anybody know of any kind of frankenmouse which has four buttons (one that simulates the third button right below the wheel would be nice)? Or have any other solution? * * * **Edit** : A nice solution could be some integration of the two cut and paste schemes (`Ctrl`+`c`, `Ctrl`+`x`, `Ctrl`+`v`) and the mouse highlight and paste with wheel, so I could actually use the `Ctrl` keys while in a terminal.


title: Which users are allowed to log in via SSH by default?

text: 1. When I set up my Debian 6, I was wondering, which users apart from root whose password I know can log into my system via SSH?   2. When I install Apache 2 a user called www-data gets created. Does this user have the right to log into my system via SSH? But if there was some default password for www-data everyone could log in, seems unlikely to me.   3. Where do I have a list which users are allowed to log into my system via SSH? Can't find anything in the ssh config files.


title: How do major package managers differ?

text: It appears that the major package managers are (in no particular order) apt, yum, and pacman. But when it comes down to it, what is the difference? My understanding is that you can use any of them on any distribution, although every distribution appears to favor one over the other. So, my questions are: What are the core differences between the major package managers? Why should I consider one over the other?


title: "find" output relative to directory

text: I'd like to use `find` to list all files and directories recursively in a given root for a `cpio` operation. However, I don't want the root directory itself to appear in the paths. For example, I currently get:               $ find diskimg     diskimg     diskimg/file1     diskimg/dir1     diskimg/dir1/file2      But, I'd like to get               file1     dir1     dir1/file2      (note the root is also not in my desired output, but that's easy to get rid of with `tail`). I'm on OS X, and I'd prefer not to install any extra tools (e.g. GNU find) if possible, since I'd like to share the script I'm writing with other OS X users. I'm aware this can be done with `cut` to cut the root listing off, but that seems like a suboptimal solution. Is there a better solution available?


title: Limit CPU cycles inside of Xen

text: I'd like to run some minimum-expectation benchmarks on EC2, but I'm having an issue of high variability in my output data. Specifically, they keep giving me more CPU than I'm minimally entitled to, which is killing my ability to evaluate minimum performance when I'm only receiving my minimal CPU allocation. So the question is...does anyone know a way to limit the CPU cycles available to the entire OS? I'm looking at Debian-based systems, so primarily Ubuntu. I've tried modifying the governor (no luck) and there's no access to Xen config (not that it would help) or the BIOS. All other solutions are either percentage (cpulimit, cgroups) or time (ulimit) based and therefore won't work.


title: How to get back on track of your Linux PC fails and your USB drives with Linux O.S. are lost

text: Assumption is you take your netbook or nettop and fly   to another country where you have no friends, etc. You can not create a bootable usb drive with a linux iso file   unless you purchase a windows pc and then learn how to do it   using windows. does this mean, it would only be logical to ask windows questions   on here as well in terms of how to create a bootable usb drive   with linux os via windows ? this happened to me previously, all i could do was use unetbootin   to install linux mint on a usb drive. and then i had to install linux   mint to the blank pc, and from linux mint i had to create a centos   linux usb using the ISO file and linux mint's terminal. creating a bootable centos usb using windows machine is not possible.   even newest fedora versions do not work. unetbootin does not work , it only works by luck.


title: How to use Wireless Network in Virtualbox?

text: I'm trying to enable Wireless on VirtualBox in my Ubuntu 14.04. I use a Kali Linux as the guest OS, but this OS not show the wi-fi when I connect it. ![here](http://i.stack.imgur.com/OFSBD.png) After starting the guest OS, it still does not show the wi-fi ![here](http://i.stack.imgur.com/fUoy3.png) I already tried the suggestions from this link and this link, but my virtualbox does not enable my wireless.


title: Accidentally overwrote boot sector of encrypted drive: any way to recover data?

text: I had one external drive on which I was storing a large quantity of data; the drive is/was encrypted using gnome disk utility. I got a second drive for redundancy and I was preparing to encrypt it. Unfortunately, I overwrote the device book partition for the original external drive:               ~$ sudo dd if=/dev/urandom of=/dev/sdb1     15585+0 records in     15584+0 records out     7979008 bytes (8.0 MB) copied, 1.30506 s, 6.1 MB/s So that is a disaster. Curse my fat fingers. Is there anything I can do to restore access to the drive? Some output from fdisk below. Device mounted as `sdb` was the original drive, the device at sdc the new drive.               Disk /dev/sdb: 2000.4 GB, 2000398839808 bytes     255 heads, 63 sectors/track, 30400 cylinders, total 488378623 sectors     Units = sectors of 1 * 4096 = 4096 bytes     Sector size (logical/physical): 4096 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1               1   488378622  1953514488   ee  GPT          ...          Disk /dev/sdc: 1000.2 GB, 1000204138496 bytes     255 heads, 63 sectors/track, 121601 cylinders, total 1953523708 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x7e3058f0             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1            2048  1953519615   976758784    7  HPFS/NTFS/exFAT


title: rpm temp file question (rpm-tmp)

text: When installing an RPM on CentOS, I receive the following error message:               /var/tmp/rpm-tmp.44492: line 578: [: too many arguments      The trouble I'm having is that `/var/tmp/rpm-tmp.xxxxx` file is always deleted after a RPM install and I want to see the line number it's having trouble with. What is the best way to preserve this file when installing so that debugging problems with the rpm are easier? So far, I placed this in the `%pre` section of my rpm spec file to deal with this issue:               cp -vf /var/tmp/rpm-tmp* /tmp/%module_name-rpm-tmp-copy      By copying `/var/tmp/rpm-tmp*` to `/tmp`, I was able to look at look at line 578 and fix the syntax error in my code easily. Is there a way to reference the `rpm-tmp` file that RPM is using during the install? Something from `env` that I can use in my spec file to copy the correct `rpm-tmp` instead of a blanket `cp` (copy `/var/tmp/rpm-tmp*` files) statement?


title: Merging preexisting source folders in mksquashfs

text: In this answer on a previous question, I found out how to modify files in a squashfs filesystem:               # unsquash the filesystem to a local directory     sudo cp /media/clonezilla/live/filesystem.squashfs ./     sudo unsquashfs filesystem.squashfs     # now, insert my own script which I want as part of the distribution     sudo cp ~/autobackup squashfs-root/usr/sbin/     # now, resquash the filesystem to be able to use it     sudo mksquashfs squashfs-root filesystem.squashfs -b 1024k -comp xz -Xbcj x86 -e boot      However, on that last line, I run into some problems making the filesystem:               Source directory entry bin already used! - trying bin_1     Source directory entry dev already used! - trying dev_1     Source directory entry etc already used! - trying etc_1     Source directory entry home already used! - trying home_1     Source directory entry initrd.img already used! - trying initrd.img_1     Source directory entry lib already used! - trying lib_1     Source directory entry lib64 already used! - trying lib64_1     Source directory entry media already used! - trying media_1     Source directory entry mnt already used! - trying mnt_1     Source directory entry opt already used! - trying opt_1     Source directory entry proc already used! - trying proc_1     Source directory entry root already used! - trying root_1     Source directory entry run already used! - trying run_1     Source directory entry sbin already used! - trying sbin_1     Source directory entry selinux already used! - trying selinux_1     Source directory entry srv already used! - trying srv_1     Source directory entry sys already used! - trying sys_1     Source directory entry tmp already used! - trying tmp_1     Source directory entry usr already used! - trying usr_1     Source directory entry var already used! - trying var_1     Source directory entry vmlinuz already used! - trying vmlinuz_1      Essentially, since it's overwriting an existing squashfs filesystem, instead of merging duplicate files, it creates new folders and files in the root of the filesystem named `bin_1`, `etc_1`, `var_1`, `tmp_1`, etc. Obviously, this is not desired. Is there a way that I can force it to merge the directories? I have attempted to run it with `-noappend`, but that breaks the Clonezilla install and I can't get into the Clonezilla wizard. Any ideas?


title: Ubuntu styled notifications in Linux Mint

text: I recently installed Linux Mint 15 with Cinnamon. It ran smoothly after forcing a kernel update by activating visibility of "Level 5" "dangerous packages". Later, after a post-update reboot, my notifications look like those seen in Ubuntu's Unity (Notify OSD). I have only installed things through Mint's software center or apt-get. It doesn't seem like the notifications stack up in the taskbar applet either. I do get the ubuntu styled notifications by triggering them with notify-send. The ubuntu styled notifications also replaces the volume up/down as well as brightness up/down notifications. How can I debug this?


title: Caps lock delay problem

text: With using caps lock for word capitalization, when I type _fast_ using my Linux distro, I get the following:               CAps LOck NOt WOrking PRoperly.      I tried the same keyboard on a windows machine, it works properly. So, the main reason of the problem seems to be my Linux distro. PS1: Same problem is also mentioned here: http://ubuntuforums.org/showthread.php?t=1462333 PS2: I use Ubuntu 13.04   PS3: Please do not give the advice to use shift instead of caps lock for capitalization purposes.