title: how does blktrace work?

text: I am trying to understand the Linux block layer so I am writing a blog about it: http://www.linuxintro.org/wiki/blktrAce. When calling blktrace like this:               blktrace -d /dev/sdg -o - | blkparse -i -      I see e.g. the output               8,96   4      695   430.080106382  2356  I   N 0 (00 ..) [kworker/4:2]     8,96   3       29   430.082179440    53  D   N 0 (00 ..) [ksoftirqd/3]      I do not understand what this means. According to the man page of blkparse, there is an RWBS field (containing R for read, W for write, B for barrier, D for discard or S for sync). With some experimenting I found out it is the 7th column. However it contains N. What does that mean? Where can I find the info what it means?


title: Directory structure for mounted disks in network storage

text: I have recently built a small homeserver, that I want to use as a _NAS_ besides other applications like hosting VMs etc. The disk space should be accessible via _NFS_ , _SAMBA_ (and _SSHFS_ ), but that's not part of the question. One of the reasons to start this project was that I have had left over a bunch of HDDs. Because these HDDs are of different models and sizes, I don't want to use them as part of a [software] RAID or use them to create LVM. My first attempt was to create a folder named `share` as a subfolder of `/mnt` where I mount all the HDDs like this:               /mnt         /share             /disk_a             /disk_b             /...      Afterwards the `share` folder should be made accessible via _NFS_ and _SAMBA_. After reading the NFS article from the ArchWiki, where the `\--bind` option of `mount` was mentioned, I changed the directory structure to make the `shared` folder independent from the mounting points:               /mnt         /disk_a         /disk_b         ...          /nas         /disk_a     # mount --bind /mnt/disk_a /nas/disk_a         ...      In this solution the `/nas` folder would be shared. **My question is** , what's the best directory structure for sharing these disks? Are there any other best practices to know, when setting up such a network storage?


title: Keyboard mapping VNC

text: I recently installed realvnc server on my pc running windows 7, however when connecting from my macbook using the "screen sharing.app" a number of keys are unavailable. **For example I need to use the # symbol** which is usually `Alt`+`3` on a macbook (british layout), but I cannot for the life of me figure out how to reproduce this when connecting to the pc via vnc? It therefore means all the special keys used by holding `Alt`+... are unavailable while using vnc on my macbook? When connecting via remote desktop there isn't a problem since the `\` symbol (located next to the enter key on my macbook) is replaced with the # since this is how it looks on the keyboard connected to my pc, and all the keys are mapped identically as if it were that keyboard.


title: dd can't see partition but cfdisk and GParted can

text: I am working with an external HDD and trying to backup a logical partition within an extended partition using `dd` like this:               sudo dd if=/dev/sdb6 of=partition6.dd      it returns:               dd: opening `/dev/sdb6': No such file or directory      I used the exact same method to backup a different partition (primary) with no issues               sudo dd if=/dev/sdb1 of=partition1.dd      Both GParted and cfdisk show sdb6 but it seems `dd` can't see it. How can I backup `/dev/sdb6`?


title: Is setting a higher nice level for a process an effective way to reduce its impact on system load/CPU time?

text: I have an rsync cron job which is pushing the server load and triggering monitor alerts. If I set the job to be run with a high nice level, would that effectively reduce the impact it has on system load values?


title: How would you install the RTS5139 Card Reader driver for use on Fedora 19

text: Is it possible to install the `rts5139` driver in Fedora 19 3.11.8-200.fc19.i686.PAE kernel ? I have a Lenovo G570 laptop, on which I run Fedora 19 (3.11.8-200.fc19.i686.PAE kernel) one one hard disk, and used to run Ubuntu 12.04 on an external. The Fedora one I use for work, while I use the Ubuntu one for programming my Raspberry Pi. On 12.04, the SD card reader did not work. **BUT** , I have recently installed 13.10 over 12.04, and the card reader **works** - here is the lshw output (off of 13.10):               id:                scsi:2     physical id:       4     bus info:          usb@1:1.4     logical name:      scsi7     capabilities:      emulated scsi-host     configuration:     driver   =   rts5139      and the lsusb output (off of Fedora 19 - lshw does not detect it, even with an SD card in it):               Bus 001 Device 003: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller     Couldn't open device, some information will be missing     Device Descriptor:       bLength                18       bDescriptorType         1       bcdUSB               2.00       bDeviceClass          255 Vendor Specific Class       bDeviceSubClass       255 Vendor Specific Subclass       bDeviceProtocol       255 Vendor Specific Protocol       bMaxPacketSize0        64       idVendor           0x0bda Realtek Semiconductor Corp.       idProduct          0x0139 RTS5139 Card Reader Controller       bcdDevice           39.60       iManufacturer           1        iProduct                2        iSerial                 3        bNumConfigurations      1       Configuration Descriptor:         bLength                 9         bDescriptorType         2         wTotalLength           39         bNumInterfaces          1         bConfigurationValue     1         iConfiguration          4          bmAttributes         0xa0           (Bus Powered)           Remote Wakeup         MaxPower              500mA         Interface Descriptor:           bLength                 9           bDescriptorType         4           bInterfaceNumber        0           bAlternateSetting       0           bNumEndpoints           3           bInterfaceClass       255 Vendor Specific Class           bInterfaceSubClass      6            bInterfaceProtocol     80            iInterface              5            Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x01  EP 1 OUT             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x82  EP 2 IN             bmAttributes            2               Transfer Type            Bulk               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0200  1x 512 bytes             bInterval               0           Endpoint Descriptor:             bLength                 7             bDescriptorType         5             bEndpointAddress     0x83  EP 3 IN             bmAttributes            3               Transfer Type            Interrupt               Synch Type               None               Usage Type               Data             wMaxPacketSize     0x0003  1x 3 bytes             bInterval              10           So is there a way I can get the `rts5139` driver for the card reader, and use `alien` or something to convert for use on my Fedora 19 system? `lsmod` or `usbview` does not find anything either. Also note that I have not updated the 13.10 release AT ALL. * * * My kernel version is 3.11.8-200.fc19.i686.PAE, but I do not have time to upgrade as I am doing A levels - my next planned upgrade was Fedora 20 in the summer next year, but until then, for both school work and my Pi, I really need the SD card reader..


title: Why two almost idetical grep commands return different output: w/o and with filename

text: I have 2 almost identical `grep`s:               [Alex@localhost tmp]$ grep /bin/bash /etc/passwd      root:x:0:0:root:/root:/bin/bash     AlexL:x:500:500::/home/AlexL:/bin/bash     user1:x:501:501:user1 12345:/home/user1:/bin/bash      vs.               [AlexL@localhost tmp]$ grep /bin/*sh /etc/passwd         /etc/passwd:root:x:0:0:root:/root:/bin/bash     /etc/passwd:AlexL:x:500:500::/home/AlexL:/bin/bash     /etc/passwd:user1:x:501:501:user1 12345:/home/user1:/bin/bash      In 2nd query I got filename prefix for every line match. I know that to get the same result I need to put `-h` option in 2nd `grep`, but my question is: **Why do they return different output?** Should I add something more? The task consist of retrieving from `/etc/passwd` real users (w/o daemons and system users). Used: CentOS 6.4, grep gnu 2.6.3 version


title: Nautilus alternative for debian

text: I am having a hard time installing Marlin on Debian. PPA command doesn't seem to be working in Debian. Is there any other way I can get rid of Nautilus and install another alternative? Or better yet get Nautilus to not eat up CPU like cereals for breakfast.


title: How to find out which Wi-Fi driver is installed?

text: I know about `lsmod`, but how do I figure out which driver does what?


title: How do I search all subdirectories to find one with a certain name?

text: Let's say I have a top level directory called `/dir` and many sub directories. How do I search the subdirectories of `/dir` to find the one called `x/x/dir/x/x/x/target`? This question is similar to, but not exactly what I am looking for: find command for certain subdirectories. I am not looking for files, just directories with a particular name.


title: complex dd-wrt routing setup - is it possible?

text: I have access to my university's VPN through OpenVPN, and would like to extend it to all the devices at home. I have cable internet, a DD-WRT router, a bunch of clients (mostly Windows), and a RHEL-derivative, two-NIC, always-on PC. Right now, the Linux router intermediates the traffic, with a setup is modem <-> RHEL-like router <-> DD-WRT device <-> clients. Usually, the traffic is masqueraded directly, but the Linux router automatically connects to uni's VPN, and for a bunch of journals, a script sets up VPN-intermediated traffic: `ip route add table main 123.45.67.89 dev tun0`. I'd like to replace the RHEL computer with a single-NIC computer. The setup I am thinking about is modem <-> DD-WRT device <-> {clients, new RHEL router}. RHEL router will connect to the internet via the DD-WRT device. It will also connect to VPN. When the other clients want access to the internet, DD-WRT should route them through RHEL, which in turn will decide to route directly or, if a connection to 123.45.67.89 is desired, through tun0. Is that possible? How would you do it?


title: Hide referer with privoxy

text: How can i set a privoxy rule in the user.action file to block the referer information on any site?


title: How is MIME type "text/html" registered to shared-mime-info? Where is its *.xml file?

text: On Ubuntu 10.10, which XML file under the directory `/usr/share/mime/applications` is for MIME type `text/html`? I checked `xml.xml` and `xhtml+xml.xml`, but neither has a glob pattern of `*.html`. So where is this file format entry?


title: How do I remove Ubuntu packages from Linux Mint?

text: I'm pretty new to using Linux distributions and for some reason I decided to install some Ubuntu packages on my Mint distribution a few months ago. I recently attempted to update the distribution of Mint by running `sudo apt- get update`, however, the installer seems to also be updating all of the Ubuntu Saucy packages which are on my computer. Is there any way I can remove those packages? If that's not possible, then can I block Ubuntu from being updated?


title: Multicasting in Linux

text: I want to do multicasting in linux for the video/audio/data file transmission. Is there any utility/tool to do so ?


title: How to include commands in Bash's PS1 without breaking line length calculation?

text: Tonin pointed out a bug in my default prompt. Minimal example:   1. Set PS1:              PS1='$(exit_code=$?; [[ $exit_code -eq 0 ]] || printf %s $(tput setaf 1) $exit_code $(tput sgr0) " ")$ '      At this point, the prompt looks like this:              $         2. Now trigger the exit code output by running:              false      Now the prompt contains the exit code in red at the beginning of the line:              1 $         3. Press `Ctrl`-`r`.   4. Type "false". Now the prompt contains only the search:              (reverse-i-search)`false': false        5. Press `Enter`. The resulting terminal history now contains the following:               1 $ch)`false': false      Expected output:               1 $ false      That is, it seems the history search output is _mixed_ with the prompt and hiding the actual command which was run. I tried working around this by using `PROMPT_COMMAND`:               set_exit_code() {         exit_code=$?         [[ $exit_code -eq 0 ]] || printf %s $(tput setaf 1) $exit_code $(tput sgr0) " "     }     set_bash_prompt() {         PS1='$(set_exit_code)$ ' # Double quotes give the same result     }     PROMPT_COMMAND=set_bash_prompt      This doesn't seem to work - the line looks exactly the same as before after searching and running. How can I fix this?


title: unexpected output with grep

text: I am using pyrit. For those who dont know, pyrit allows among other things to check if a wpa handshake key is valid:               pyrit -r file0.cap analyze       when a file does not contain a valid key, here is the output:               Parsing file 'file0.cap' (1/1)...      AccessPoint e0:xx:xx:xx:xx:xx ('AP_name0'):     No valid EAOPL-handshake + ESSID detected.      Now I am just wondering why when issuing:               pyrit -r file0.cap analyze | grep good       it always gives me (when there is no valid handshake key) :               No valid EAOPL-handshake + ESSID detected.      when there is a valid key, it works; we have the following output:               HMAC_SHA1_AES, good, spread 1


title: How to clone btrfs filesystem into different medium preserving snapshots' sharing data

text: I have decided to give btrfs raid capabilities a try. I set up a btrfs with               sudo mkfs.btrfs -m raid10 -d raid10 /dev/sda9 /dev/sdb9 /dev/sdc9 /dev/sdd9      Now I want to clone my existing btrfs partition, (which sits on top of linux- raid). can't use a simple `cp -a`, because there is over 40 snapshot-based backups (which I wish to preserve), and I would simply overfill all the storage I can spare multiple times. So far I can see two options:               partclone.btrfs -s /path/to/original/fs -o /dev/sda9 -b      and I suppose I would also need to `btrfs balance start /dev/sda9` and do: incrementaly copy with `cp -a` as much as fits into the storage, and then use `bedup` to de-duplicate files, and loop. What is the preferred (i.e. best-practice) method? I would much prefer the first one; it should take much less time. Or maybe there is some evil "gotcha" lurking in any of this procedures (beside the fact that btrfs is experimental, of course) * * * The first question is simply out of question; however wonderful tool the `partclone.btrfs` is, it obviously doesn't support multi-device file systems. :-(


title: In Gentoo, what is the difference between amd64, ~amd64 and ~amd64-linux?

text: When I run `equery depgraph www-client/chromium-10.0.648.151`, not all dependencies are available. Some shows `M[package.mask]`, while some other shows `[missing keyword]`. My `ACCEPT_KEYWORDS` is `~amd64-linux`, according to `emerge --info`. I experimented with different `ACCEPT_KEYWORDS` (as an environmental variable passed to `eqeury`), and all have different missing dependencies. Among all possible combinations, only with `ACCEPT_KEYWORDS='amd64 ~amd64 ~amd64-linux'` all dependencies can be satisfied at once. **Here are my questions:**   1. Is `ACCEPT_KEYWORDS='amd64 ~amd64 ~amd64-linux'` a valid configuration?   2. I learned from the documentation that `amd64` mean stable, and `~amd64` means unstable. What about `~amd64-linux`?    3. If I select `~amd64`, `equery` wouldn't use the packages available only to `amd64`, resulting in missing dependencies. Is this expected? If so, should unstable testers use at least `ACCEPT_KEYWORDS='amd64 ~amd64'` instead of `ACCEPT_KEYWORDS='~amd64'`?   4. Does the order of the keywords matter? * * * Additional info: I installed Gentoo Prefix following this guide. By default, `$EPREFIX/etc/make.profile` is a symlink to `$EPREFIX/usr/portage/profiles/prefix/linux/amd64` and contains a `make.defaults` that has `ACCEPT_KEYWORDS="-amd64 ~amd64-linux"`. Neither `$EPREFIX/etc/make.conf` nor `$EPREFIX/etc/make.globals` has `ACCEPT_KEYWORDS` configured. According to `eselect profile list`, no profile is selected.


title: How is the host file actually used in unix/linux networking?

text: I see on wikipedia that a host file maps IP addresses to human-readable hostnames, much like a DNS server. But does a local computer need to resolve IP addresses? Is the idea that you configure the hosts file for all of the computers on a network so as to customize/configure the network? (Kind of like for a local machine name in windows).


title: SSH XForwarding fails - xauth bad display name

text: I'm trying to setup XForwarding over ssh, but it fails. The same result happens whether I use the argument -X or -Y for ssh. The error I get.               a@ASUS-N53SM:~$ ssh -X -p 6623 pinker@192.168.0.200     pinker@192.168.0.200's password:      Last login: Sun Feb  2 18:42:08 2014 from 192.168.0.201     /usr/bin/xauth: (stdin):1:  bad display name "pinker-server:10.0" in "remove" command     /usr/bin/xauth: (stdin):2:  bad display name "pinker-server:10.0" in "add" command     xdpyinfo:  unable to open display "pinker-server:10.0".      In the client file ~/.ssh/config               ForwardX11 yes      In the client file /etc/ssh/ssh_config (comments removed).               Host *     ForwardX11 yes     ForwardX11Trusted yes     SendEnv LANG LC_*     HashKnownHosts yes     GSSAPIAuthentication yes      GSSAPIDelegateCredentials no      In the server file /etc/ssh/sshd_config (comments removed).               Port 6623     Port 6624     Port 6625     Protocol 2     HostKey /etc/ssh/ssh_host_rsa_key     HostKey /etc/ssh/ssh_host_dsa_key     HostKey /etc/ssh/ssh_host_ecdsa_key     UsePrivilegeSeparation yes     KeyRegenerationInterval 3600     ServerKeyBits 768     SyslogFacility AUTH     LogLevel INFO     LoginGraceTime 120     PermitRootLogin yes     StrictModes yes     RSAAuthentication yes     PubkeyAuthentication yes     IgnoreRhosts yes     RhostsRSAAuthentication no     HostbasedAuthentication no     PermitEmptyPasswords no     ChallengeResponseAuthentication no     X11Forwarding yes     X11DisplayOffset 10     PrintMotd no     PrintLastLog yes     TCPKeepAlive yes     AcceptEnv LANG LC_*     Subsystem sftp /usr/lib/openssh/sftp-server     UsePAM yes     X11UseLocalhost no     AllowTcpForwarding yes      I found this similar Question, but none of the answers work. **UPDATE:** On the server, I added to the file /etc/hosts.               127.0.0.1       pinker-server      On the server, I installed the package `xbase-clients`. On the ssh connection `echo $DISPLAY` outputs `:0.0`. Now I'm getting a new error.               X11 connection rejected because of wrong authentication.     X11 connection rejected because of wrong authentication.     X11 connection rejected because of wrong authentication.     X11 connection rejected because of wrong authentication.     xdpyinfo:  unable to open display "pinker-server:10.0".


title: Which terminal encodings are default on Linux, and which are most common?

text: I need to make a decision regarding whether a complicated commercial program that I work on should assume a particular terminal encoding for Linux, or instead read it from the terminal (and if so, how). It's pretty easy to guess which system and terminal encodings are most common on Windows. We can assume that most users configure these through the Control Panel, and that, for instance, their terminal encoding, which is usually non- Unicode, can be easily predicted from the standard configuration for that language/country. (For instance, on a US English machine, it will be OEM-437, while on a Russian machine, it will be OEM-866.) But it's not clear to me how most users configure their system and terminal encodings on Linux. The savvy ones who often need to use non-ASCII characters probably use a UTF-8 encoding. But what proportion of Linux users fall into that category? Nor is it clear which method most users use to configure their locale: changing the LANG environment variable, or something else. A related question would be how Linux configures these by default. My own Linux machine at work (actually a virtual Debian 5 machine that runs via VMWare Player on my Windows machine) is set up by default to use a US-ASCII terminal encoding. However, I'm not sure whether that was set up by administrators at my workplace or that's the setting out of the box. Please understand that I'm not looking for answers to "Which encoding do you personally use?" but rather some means by which I could figure out the distribution of encodings that Linux users are likely to be using.


title: Tool to create a bad physical location report on disk

text: I am in need of a tool that would run on an Ubuntu system that would be able to report the following:   1. Bad physical locations on a disk (cylinders, sectors)   2. Files that are affected by these bad locations. Filesystem I currently have is NTFS but it would be good to have for ext2/3/4 as well.


title: sed pattern matching

text: I recently asked someone at work about how to take the output of ipcs -qa and make it space delimited, so I can parse it/store it in the database for monitoring. He gave me this:               ipcs -qa | sed 's/ [ ]* / /g'      It works, but why? How did he construct that pattern string? Where can I find documentation on how to construct them? I checked the man page, but it's pretty opaque.


title: How to change previous/next word shortcut in bash?

text: How do I configure Ctrl-Left and Ctrl-Right as previous/next word shortcuts for bash (currently alt-b and alt-f)?


title: Changing bash keyboard shortcuts

text: Acc. to bash reference manual shortcut to expand shell variables is `M-C-e`. On my keyboard `M` is the `Esc` key. How do I change this key sequence to some other (e.g. `Ctrl-~`)?


title: Connected external HDD slows down system

text: I need to connect large external hard disks (with many many files) to a system running Ubuntu. I have no idea how the Linux kernel is treating the inodes for the external drives, but attaching huge external drives significantly slows down my system. How can I avoid this slowdown? I need to keep the hard disks connected while I'm working.               Ubuntu: 10.04 32-bit     HD: 2TB via USB


title: Card Reader UB6520 on Parabola GNU/Linux

text: I'm trying to make work the SD card reader UB6250 on Parabola GNU/Linux. Could you help me please? After inserting the SD card, I get the following `dmesg`:               [65408.273667] usb 2-5: new high-speed USB device number 6 using ehci-pci     [65408.670465] ums_eneub6250 2-5:1.0: USB Mass Storage device detected     [65408.670757] scsi6 : usb     [65408.671522] usbcore: registered new interface driver ums_eneub6250     [65408.716967] keucr: module is from the staging directory, the quality is unknown, you have been warned.     [65408.718551] usbcore: registered new interface driver eucr     [65409.674357] 2-5: Missing Free firmware     [65409.718442] scsi scan: INQUIRY result too short (8), using 36      Having inserted the SD card I can see the device using `lsusb`:               Bus 002 Device 010: ID 0cf2:6250 ENE Technology, Inc. SD card reader (UB6250)      I have found that I need to uploade the modules `ums_eneub6250` and `keucr` which seem to be both in -- `modinfo ums_eneub6250`:                filename:       /lib/modules/3.12.8-1-LIBRE/kernel/drivers/usb/storage/ums-eneub6250.ko.gz      license:        GPL      description:    Driver for ENE UB6250 reader      alias:          usb:v0CF2p6250d*dc*dsc*dp*ic*isc*ip*in*      depends:        usb-storage,usbcore      intree:         Y      vermagic:       3.12.8-1-LIBRE SMP preempt mod_unload modversions      and `modinfo keucr`:                filename:       /lib/modules/3.12.8-1-LIBRE/kernel/drivers/staging/keucr/keucr.ko.gz      license:        GPL      description:    ENE USB Mass Storage driver for Linux      author:         Domao      alias:          usb:v0CF2p6250d*dc*dsc*dp*ic*isc*ip*in*      alias:          usb:v0CF2p6230d*dc*dsc*dp*ic*isc*ip*in*      alias:          usb:v058Fp6366d*dc*dsc*dp*ic*isc*ip*in*      depends:        scsi_mod,usbcore      staging:        Y      intree:         Y      vermagic:       3.12.8-1-LIBRE SMP preempt mod_unload modversions       My kernel version is `uname -r`: `3.12.8-1-LIBRE` I have also found some instruction on https://wiki.archlinux.org/index.php/Acer_Aspire_One#Card_Reader unfortunately, they are obsolete, since the systemctl is used instead of rc in the current version.


title: What can I use that is small, has linux, an ethernet port, and a hard drive?

text: I see that David Braben has created a $25 USB stick that can run linux. Check out the website at http://www.raspberrypi.org/ ![raspberry-pi-stock- pcb-480.jpg](http://img526.imageshack.us/img526/2531/raspberrypistockpcb480.jpg) That's not available yet - so what's a low power *nix device that I can connect to a network and also an ethernet port? Doesn't have to be secure or anything. Preferably something without a fan would also be nice


title: Does OS X have its own line format?

text: Obviously there are at least two newline types: DOS and Unix. But does OS X have its own plaintext 'format'? I opened a text file in `nano` and was surprised to see: `[ Read 26793 lines (Converted from Mac format) ]` What is Mac format, how is it any different from a file written with a Unix tool like nano, and why does it need to be converted from to be read with `nano` on a Mac?


title: Connect to Internet using Network Manager in a script or program

text: I want to connect to Internet using wireless automatically(using a script or program) Currently,I do the following steps to connect to Internet by wlan:   1. Select the wlan access point,   2. Then KDE desktop will prompt a authentication windows to input my root password   3. Then open my browser. A webpage from the access point server is shown. The page is for me to input the username and password I have bought   4. Then I submit the form waiting for response   5. Last, connected. I am wondering if I can have all those steps performed in a program or a script. For step 3 and 4, I think I can use **curl** to POST data. But prior to this step, how can I do the the following:   1. select wlan access point in KDE Network Manager(any command or library?).   2. input the password KDE prompted for me.


title: Going into a directory linked by a link

text: When I `cd` a link, my current path is prefixed with the link's path, rather than the path of the directory the link links to. E.g.               ~/dirlinks/maths$ ls -l logic     lrwxrwxrwx 1 tim tim 71 Jul 27 10:24 logic -> /windows-d/academic discipline/study objects/areas/formal systems/logic          ~/dirlinks/maths$ cd logic     ~/dirlinks/maths/logic$ pwd     /home/tim/dirlinks/maths/logic          ~/dirlinks/maths/logic$ cd ..     ~/dirlinks/maths$      I would like to have my current path changed to the path of the linked dir, so that I can work with the parent dirs of the linked dir as well. Besides `ls` the link to find out the linked dir, and then `cd` into it, what are some simpler ways to accomplish that? For example, after `cd` into a link, how do you change your current path to the path of the linked dir?


title: regenerate xorg.conf with current settings

text: Many people have talked about this issue but I've not found a satisfactory answer. I'm on a debian jessie. Currently I have tried `nvidia-driver` as the driver but it caused the system to crash; so I have purged all the `nvidia` packages. But the problem is that `/etc/X11/xorg.conf` has been replaced with NVidia settings and the backup `xorg.conf.backup` has been removed. The related configuration set by NVidia is:               Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"     EndSection      I once tried changing `nvidia` to `intel`(also `NVidia` -> `Intel`) but the resolution is much lower(my laptop has a `Intel Corporation Haswell-ULT Integrated Graphics Controller` as listed by `lspci`). So I might need to use `nouveau` as the driver; however simply changing `nvidia` to `nouveau` doesn't work. It seems that the recent X system can be booted without xorg.conf(by `rm /etc/X11/xorg.conf`) but slower. So I still prefer the xorg.conf with my current settings. The version of `Xorg`:               X.Org X Server 1.16.0     Release Date: 2014-07-16     X Protocol Version 11, Revision 0     Build Operating System: Linux 3.14-1-amd64 x86_64 Debian     Current Operating System: Linux debian 3.14-1-amd64 #1 SMP Debian 3.14.9-1 (2014-06-30) x86_64     Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.14-1-amd64 root=UUID=e9341749-9dee-4cc9-878e-3b59ed1906b2 ro quiet     Build Date: 17 July 2014  10:22:36PM     xorg-server 2:1.16.0-1 (http://www.debian.org/support)     Current version of pixman: 0.32.4             Before reporting problems, check http://wiki.x.org             to make sure that you have the latest version.      So are there any ways to re-generate the configuration file?


title: Fedora 20 Crashes on Older PC

text: I have an older PC that has been flawlessly running Windows XP for several years. Since Microsoft discontinued support for XP, I want to install the latest version of Fedora. While trying to install "Fedora-Live- Xfce-i686-20-1.iso", the system freezes half way through the install process, becomes completely unresponsive, and eventually shuts down. **System Specs**   * cpu: AMD Athlon XP 2000+ 1.67 GHz   * memory: 1.5 GB   * video card: Nvidia GeForce4 Ti 4200 64 MB   * hard drive: Western Digital 40 GB   * cd-rom: cd-rw **Questions**   1. Is there a way to determine exactly what is causing the install process to freeze and crash?   2. Does a diagnostic tool exist to test the compatibility of software/hardware/drivers? Tool recommendations appreciated.


title: The difference between a binary and a source package in Ubuntu/Debian?

text: The information below seems misleading. I am confused with the example they give that if you lose dpkg (the program that lets you handle .deb files) you can use the other commands ar, tar, and gzip commands to download the .deb file for dpkg itself? If this is true, what is so special about dpkg that is not available with the other commands? > As a Debian system administrator, you will routinely handle .deb packages, > since they contain consistent functional units (applications, documentation, > etc.), whose installation and maintenance they facilitate. It is therefore a > good idea to know what they are and how to use them. This chapter describes > the structure and contents of “binary” and “source” packages. The former are > .deb files, directly usable by dpkg, while the latter contain the source > code, as well as instructions for building binary packages. > > From: http://debian-handbook.info/browse/wheezy/packaging-system.html > > 5.1. Structure of a Binary Package The Debian package format is designed so > that its content may be extracted on any Unix system that has the classic > commands ar, tar, and gzip (sometimes xz or bzip2). This seemingly trivial > property is important for portability and disaster recovery. Imagine, for > example, that you mistakenly deleted the dpkg program, and that you could > thus no longer install Debian packages. dpkg being a Debian package itself, > it would seem your system would be done for... **Fortunately, you know the > format of a package and can therefore download the .deb file of the dpkg > package** and install it manually (see the “TOOLS” sidebar). If by some > misfortune one or more of the programs ar, tar or gzip/xz/bzip2 have > disappeared, you will only need to copy the missing program from another > system (since each of these operates in a completely autonomous manner, > without dependencies, a simple copy will suffice).


title: mount.cifs : mount error(12) : Cannot allocate memory

text: I encountered this problem a while ago when upgrading my kernel but put off upgrading until now. On my system I can happily mount network shares using CIFS running kernel 3.7.10, however when I've tried with newer kernels (currently trying with 3.13.1, but have been trying since 3.12.6) I get the following errors when I attempt to mount them with `/etc/init.d/netmount start` (I'm running Gentoo):               # /etc/init.d/netmount restart     * Unmounting network filesystems  ...                                      [ ok ]     * Mounting network filesystems ...     mount error(12): Cannot allocate memory     Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)     mount error(12): Cannot allocate memory     Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)     mount error(12): Cannot allocate memory     Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)         Attempting to mount manually results in the same error...               # mount -t cifs //Server/to_mount1 /mnt/network1 -o credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline     mount error(12): Cannot allocate memory     Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)      The error occurs three times as I've three network shares I'm attempting to mount, here are my `/etc/fstab` entries (which are completely unchanged between kernel versions):               # Network drives     //Server/to_mount1/mnt/network1 cifs        credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline 0 0     //Server/to_mount2/another/dir /mnt/network2    cifs        credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline 0 0     //Server/to_mount3  /mnt/network3   cifs        credentials=/etc/nfs_share.credentials,users,rw,uid=slackline,gid=slackline 0 0      Searching around I found quite an old solution to this problem which requires access to the Windows server to make some modifications, this is detailed here. Unfortunately this is at work and not only do I not have access to the Windows server to test whether these changes would make any difference, but also its _only_ happening with the newer 3.12.6 kernel, I can reboot into the 3.7.10 kernel and the network shares are mounted without any problem. This leads me to think that there is a problem with the newer kernel, so I've looked at the CIFS options under both the 3.7.10 kernel configuration:               # grep -i cifs /usr/src/linux-3.7.10-gentoo-r1/.config     CONFIG_CIFS=y     CONFIG_CIFS_STATS=y     # CONFIG_CIFS_STATS2 is not set     CONFIG_CIFS_WEAK_PW_HASH=y     # CONFIG_CIFS_UPCALL is not set     CONFIG_CIFS_XATTR=y     CONFIG_CIFS_POSIX=y     CONFIG_CIFS_ACL=y     # CONFIG_CIFS_DEBUG2 is not set     CONFIG_CIFS_DFS_UPCALL=y     CONFIG_CIFS_SMB2=y     # CONFIG_CIFS_FSCACHE is not set      ...and under the 3.12.6 configuration:               # grep -i cifs /usr/src/linux-3.13.1-gentoo/.config     CONFIG_CIFS=y     CONFIG_CIFS_STATS=y     # CONFIG_CIFS_STATS2 is not set     CONFIG_CIFS_WEAK_PW_HASH=y     # CONFIG_CIFS_UPCALL is not set     CONFIG_CIFS_XATTR=y     CONFIG_CIFS_POSIX=y     CONFIG_CIFS_ACL=y     CONFIG_CIFS_DEBUG=y     # CONFIG_CIFS_DEBUG2 is not set     CONFIG_CIFS_DFS_UPCALL=y     CONFIG_CIFS_SMB2=y     # CONFIG_CIFS_FSCACHE is not set      ...and they are the same (no real surprise there since I didn't change anything!). I re-emerged `net-fs/cifs-utils` just in case there was something awry there but it made no difference. Is there a way I can work around this without having access to the Windows share to test the suggested solution (if that is indeed the underlying cause) or is there something else that is causing the problem?


title: How do I check if a particular hard disk is dynamic?

text: What commands do I have to check the dynamic or basic type disk/volumes of the Windows partitions? ### Topic of interest because:   * Warning: Don't install linux on a Windows Dynamic disk!   * Bug Report: When there are no primary partitions left, and Windows converts to a dynamic disk, do NOT allow partitioning!   * Bug Report: Installation doesnt detect windows dynamic disk   * How can I install Ubuntu safely without messing up my system and data? [safety first!] * * * P.S. This Q has already been answered in this post of Ask Ubuntu.


title: Can systemd do some setup before forking as a user?

text: Having written several small daemons or web applications for my personal use, I like to manage them using systemd (I am using Arch Linux, if that matters). So I write service files like the one below:               [Unit]     Description=My example daemon          [Service]     Type=forking     User=example_user     ExecStart=/path/to/my_executable     ExecStop=kill -QUIT $MAINPID     PIDFile=/var/run/example/example.pid          [Install]     WantedBy=multi-user.target      my_executable fails to start if it cannot write its PID file, which generally means that the directory `/var/run/example/` does not exist. This happens after every reboot since I have `/var/run` of a tempfs. One solution is to start my_executable as root and have it drop to the correct access rights after creating its environment, but I not really comfortable with that, since I don't trust myself to do it correctly. Is there a way to make systemd do the heavy lifting here (maybe by specifying another script that should run before doing ExecStart)? What is the best way?


title: Files with "core" name

text: Can I be sure that files with name `core` on the system are core dump files? Or how can I be certain about some files that they are core dumps to delete them? (best practices are welcome)


title: How to find certain files and move them to a new directory in the same command?

text: So I was looking around and all I have found is how to do this only if the directory is already made, which is this:               find source -name '*.z' -exec cp {} destination \;      But how can I make a new directory where I want to send these files in the same command? This is what I have tried but with no success:               find source -name '*.z' -exec cp {} | mkdir newDirectory \;


title: Any Linux distribution with GNUstep?

text: As a Mac-dominant user I was looking at Cocoa again and that made me think about GNUstep, GNU's implementation of (what was once) the same platform. I noticed that neither Ubuntu nor SUSE came with GNUstep (I think). Now I am wondering, which Linux (or BSD) distribution comes with GNUstep and/or which distribution should one use for developing GNUstep applications?


title: Documentation on LESS_TERMCAP_* variables?

text: I see these pretty colors in manpages viewed with less when setting a bunch of these variables. What do they mean, where is the documentation? Is this interpreted by less or termcap? ### screenshot ![ss of man page](http://i.stack.imgur.com/zwZkh.png)


title: os-prober giving wrong UUID for Arch Linux

text: Up until yesterday, everything was working find and os-prober was successfully generating menu entries for the Arch Linux install. However today when I tried to boot into Arch, I got an error that the root file system could not be found at the UUID it was trying to use. After some tinkering I was able to get Arch to boot by manually changing the root to the actual partition "/dev/sda7" as opposed to using UUID. I was wondering what might cause os-prober to be generating this invalid configuration just for the Arch Linux install. It does fine still for the openSUSE and Windows 7 installs. One other thing to note is that it has added "rw quiet" to the end of the boot line for Arch Linux. That is not something it previously did, and I am wondering if whatever changed that has to do with why the UUID is incorrect. Below I will post the menu entry for Arch Linux. As you can see os-prober has the --set-root= 'some UUID' part with the correct UUID, but later on when booting linux it has -root=UUID='some other incorrect UUID'. Just to clarify, I have Ubuntu, Arch Linux, openSUSE, and Windows 7 on this machine, but I am using Ubuntu as the main OS and allowing it to manage GRUB and its configurations. All of the operating systems are at their most up-to- date versions.               menuentry 'Arch (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-b9522736-878c-49e3-b30d-ad65589aa1d9' {         insmod part_msdos         insmod ext2         set root='hd0,msdos7'         if [ x$feature_platform_search_hint = xy ]; then           search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  b9522736-878c-49e3-b30d-ad65589aa1d9         else           search --no-floppy --fs-uuid --set=root b9522736-878c-49e3-b30d-ad65589aa1d9         fi         linux /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 rw quiet         initrd /boot/initramfs-linux.img     }      As you can see the first two UUIDs are different from the last one. The first two are correct and the last one is wrong. If I replace the last UUID with '/dev/sda7', Then it boots without problem. I have manually edited the grub.cfg to do this, but I would like os-prober to get back to working automatically. Thanks.


title: Do CUPS clients need to have drivers installed locally?

text: If I use CUPS, should clients have drivers installed locally? Example: say we have 1 Networked PC with Linux, 1 Print Server (or CUPS, Samba Print server) If the Linux PC wants to print a document through the print server, is the Linux PC required to have the drivers for the printer it is going to use? Or does it use some generic API?


title: Gnome terminal fails to start

text: After upgrading to Fedora 18, on certain occasions, `gnome-terminal` will fail to launch, requiring me to log out of the desktop and log in again. I tried tracing the error and found the following in `audit.log`: > type=ANOM_ABEND msg=audit(1359986892.064:86): auid=500 uid=500 gid=500 ses=2 > subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=2185 > comm="gnome-terminal" reason="memory violation" sig=6 No alert is issued and nothing is recorded in SELinux Troubleshooter. Nothing is found on `/var/log/messages` either. Is this a bug? What does the above log statement say? How can I proceed to solve this problem? **UPDATE:** Not sure if this is relevant, but I do have some warnings on memory from the kernel upon startup every time:               notice  kern kernel [    0.000000] 1154MB HIGHMEM available.     notice  kern kernel [    0.000000] 883MB LOWMEM available.     info    kern kernel [    0.000000]   mapped low ram: 0 - 373fe000     info    kern kernel [    0.000000]   low ram: 0 - 373fe000     warning kern kernel [    0.000000] Zone ranges:     warning kern kernel [    0.000000]   DMA      [mem 0x00010000-0x00ffffff]     warning kern kernel [    0.000000]   Normal   [mem 0x01000000-0x373fdfff]     warning kern kernel [    0.000000]   HighMem  [mem 0x373fe000-0x7f68ffff]     warning kern kernel [    0.000000] Movable zone start for each node     warning kern kernel [    0.000000] Early memory node ranges     warning kern kernel [    0.000000]   node   0: [mem 0x00010000-0x0009efff]     warning kern kernel [    0.000000]   node   0: [mem 0x00100000-0x7f68ffff]


title: A better paste command

text: I have the following two files ( I padded the lines with dots so every line in a file is the same width and made file1 all caps to make it more clear).               contents of file1:          ETIAM......     SED........     MAECENAS...     DONEC......     SUSPENDISSE          contents of file2          Lorem....     Proin....     Nunc.....     Quisque..     Aenean...     Nam......     Vivamus..     Curabitur     Nullam...      Notice that file2 is longer than file1. When I run this command:               paste file1 file2      I get this output               ETIAM...... Lorem....     SED........ Proin....     MAECENAS... Nunc.....     DONEC...... Quisque..     SUSPENDISSE Aenean...         Nam......         Vivamus..         Curabitur         Nullam...      **What can I do for the output to be as follows ?**               ETIAM...... Lorem....     SED........ Proin....     MAECENAS... Nunc.....     DONEC...... Quisque..     SUSPENDISSE Aenean...                 Nam......                 Vivamus..                 Curabitur                 Nullam...      I tried               paste file1 file2 | column -t      but it does this:               ETIAM......  Lorem....     SED........  Proin....     MAECENAS...  Nunc.....     DONEC......  Quisque..     SUSPENDISSE  Aenean...     Nam......     Vivamus..     Curabitur     Nullam...      non as ugly as original output but wrong column-wise anyway.


title: Compiling multiple source file with arm-ulinucxeabi-gcc including -o -c option

text: I am compiling multiple c source which depend on multiple header files. ### Makefile               SHELL=cpp2                  SOAPC=/home/amarayya/doc/../linux-lpc-1.9.0/linux-cortexm-1.9.0/projects/solus_test/app/std2.c     LDFLAGS        := -mcpu=cortex-m3 -mthumb -L $(INSTALL_ROOT)/A2F/root/usr/lib     CFLAGS        := -Os -mcpu=cortex-m3 -mthumb -I$(INSTALL_ROOT)/A2F/root/usr/include     CC=$(CROSS_COMPILE_APPS)gcc     LIBS=     COFLAGS=-O2     CWFLAGS=-Wall     CIFLAGS=     CMFLAGS=          out: calc.o spC.o Client.o std2.o         $(CC) $(LDFLAGS) $(CFLAGS) $(SHELL) -o out calc.o spC.o Client.o std2.o $(LIBS)          calc.o    : calc.c spH.h          $(CC) $(LDFLAGS) $(CFLAGS) -c calc.c spH.h $(LIBS)          spC.o    : spC.c soapH.h stdsoap2.h          $(CC) $(LDFLAGS) $(CFLAGS) -c spC.c stdsoap2.h $(LIBS)          Client.o    : Client.c          $(CC) $(LDFLAGS) $(CFLAGS) -c Client.c $(LIBS)          std2.o    : std2.c         $(CC) $(LDFLAGS) $(CFLAGS) -c stdsoap2.c $(LIBS)          OBJS= calc.o spC.o Client.o std2.o          all: $(OBJS)         $(CC) $(LDFLAGS) $(CFLAGS) $(SHELL) -o $@ $(OBJS) $(LDLIBS)               clean:         -rm -f $(OBJS) *.gdb *.o      I am getting an the error like this:               Critical error: Cannot open file "arm-uclinuxeabi-gcc -mcpu=cortex-m3 -mthumb -L/home/am./../../linux-lpc-1.9.0/linux-cortexm-1.9.0/A2F/root/usr/include -c calc.c spH.h " for reading      I have tried multiple ways but no result. How can I fix this error? Is there any problem with compiling multiple source file with `arm- ulinucxeabi-gcc -o -c`, including options? For example:               arm-ulinucxeabi-gcc -c -o a a.c b.c c.c d.c      When I used like this I get the above error. Please guide me to solve this.


title: My Google Chrome profile can't open correctly

text: When I open Google Chrome (Stable version), I see the following dialog box: > Your profile could not be opened correctly. Some features may be > unavailable. Please check that the profile exists and you have permission to > read and write its contents I know for sure this problem happened only on Linux (Fedora 18) because when I use my Chrome profile in Windows, nothing goes wrong. Also, I always get a bug report about `google-chrome-stable` version (I always update the system and Chrome too). How do I resolve this problem without losing any data in my profile?


title: How can I remove an element from an array completely?

text: `unset array[0]` removes the element but still if I do `echo ${array[0]}` I get a null value moreover there are other ways of doing this but if an element of an array contains spaces like below               array[0]='james young'     array[1]='mary'     array[2]='randy orton'      but these also fail to do the job               array=${array[@]:1} #removed the 1st element      now I want the new array to be like               array[0]='mary'     array[1]='randy orton'      The spaces cause the trouble after assignment and the actual array becomes like with substitution.               array=(mary randy orton)


title: Auto call answer with Huawei modem

text: I have problem with call auto answer in modem Huawei E303. On modems E173 auto call anwer is working fine. But on Huawei E303 it's not working. Steps that i do: Open kermit:               set line /dev/ttyUSB0     set carrier-watch off     c      then i type AT command for answer on first ring:               ATS0=1      and when i'm calling on that modem nothing happens. So question is is there something that can be done to make it auto answer or it's a hardware restriction ? i know that on E303 voice is enabled, and i can make call with it by typing ATDT XX_MY_NUMBER; **EDIT:** So when i'm calling on that modem i dont see anything in output but if i type in console force answer call at command:               ATA      that modem answers the call. So call answering is enabled, but why still ATS0=1 isn't working ? **EDIT2** So I made some debugging with kermit application and ran command: SHOW COMMUNICATIONS E303 modem returned output: ( modem that does not auto answers on call)                Carrier Detect      (CD):  Off      Dataset Ready       (DSR): On      Clear To Send       (CTS): On      Ring Indicator      (RI):  Off      Data Terminal Ready (DTR): On      Request To Send     (RTS): On      And my E173 modem that is auto answering calls:                Carrier Detect      (CD):  On      Dataset Ready       (DSR): On      Clear To Send       (CTS): On      Ring Indicator      (RI):  Off      Data Terminal Ready (DTR): On      Request To Send     (RTS): On      Other commands like "SHOW MODEM", and "SHOW DIAL" returns same equal output, so only difference is with Carrier Detect (CD): On / Off So can it be the problem why E303 modem does not make auto call answering if at command ATS0=1 was given ?


title: Samba connection slowness after ip change

text: we have encountered with a problem when we chaged the samba server's ip address. There are so many OS varies from Windows,GNU/Linux, Solaris and IBM. The samba server is running on SOlaris. And all changes has made on host after Samba server's ip address change procedure. After the ip address change process, the samba connections slowed. And sometimes connection is getting time out. When we get back the ip address to the old format, everything works like a charm. We have deletede samba caches but we cannot find a solution for this case. What would you offer for this problem. Is there anybody that have encountered like this situation before ?


title: Executable located in location A how to run it in location B?

text: So, I've an executable in my debian server and this executable located in `/home/human/ExecuteIt`, still i cant figure it out how to run my executable in another location. In my case it is `/home/human/ExecuteIt/FolderWithConfiaguration/Configuration1/`. Normally for just 1 configuration folder i can just copy/paste an executable to the `/home/human/ExecuteIt/FolderWithConfiaguration/Configuration1/` and then using `sudo chmod +x ./executable` run it successfully, but my executable has several configuration's folders that contains different configuration. It would be great if i could have my executable separate and execute it with different configuration without copy/pasting. Is there a way to execute my executable in different location?


title: What does this firewall record mean?

text: Running `iptables -L -n` gives me the following info:               Chain IN_ZONE_work_allow (1 references)     target     prot opt source               destination              ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            224.0.0.251          udp dpt:5353 ctstate NEW     ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:631 ctstate NEW      What are ACCEPT udp 0.0.0.0/0 dest 224.0.0.251 ?


title: Count lines matching pattern and matching previous line

text: I want to count the number of times that a role is successfully deleted. The problem is that one line of the log file will show that the script is about to delete the role:               Prepare to remove role X      The next line will tell me if the delete is successful or not: Successful delete:               Delete Successful      Unsuccessful delete:               Failed to delete role X: error code      How do I count the number of successful Role deletes? I would just use the following grep:               grep "Delete Successful" | wc -l      HOWEVER, I am also deleting policies which is logged in the same manner as the roles are above. IE:               Prepare to delete policy X     Delete Successful      OR               Failed to delete policy X: error code      Any way to search for "Prepare to delete role" on one line and then count the number of times the very next line says "delete successful?"


title: Pinnacle TV tuner card, readreg error, dvb_register failed, cx8802 probe failed, firmware never loads

text: I'm trying to make this card work in a touch screen kiosk running Ubuntu 10.04, kernel 2.6.32-45-generic This card seems to use the s5h1411 chip instead of the s5h1409 the modules are expecting. I've patched the cx88-dvb module as per this thread, but this doesn't seem to have made a difference. The errors I've noted in dmesg are:               tveeprom 5-0050: Huh, no eeprom present (err=-6)?      and               s5h1411_readreg: readreg error (ret == -6)     cx88[0]/2: frontend initialization failed     cx88[0]/2: dvb_register failed (err = -22)     cx88[0]/2: cx8802 probe failed, err = -22      I also notice there's no mention of the firmware ever loading, nor is xc5000 even listed in lsmod. I've saved some logs to a folder in my Dropbox for reference. I have dmesg, kern.log, lsmod, lspci -vvnn, and syslog. I also set debug=1 to xc5000, s5h1411, cx88-dvb, cx88xx, cx8802, and cx88_alsa, just in case there's some relevant information coming out. Anybody have any insight to this problem?


title: Use WINDOWS key instead of ALT key in xmonad

text: I use xmonad + emacs. Both use ALT key heavily. So there are conflicts sometimes. My keyboard has WINDOWS key on it. I would like xmonad to use that key instead of ALT. My current `~/.xmonad/xmonad.hs` file looks like this               import XMonad     import XMonad.Config.Gnome          main = xmonad gnomeConfig      How should I change it so that xmonad starts using the WINDOWS key? e.g. `WINDOWS + 3` will switch to workspace 3 instead of `ALT+3`. I want xmoand and emacs to live happily together.


title: LILO vga option

text: In `LILO` config file (`/etc/lilo.conf`) what's the difference between specifying `vga` option in `Global` section and when specifying it in `per- image` section.


title: Partition mounted noexec even though not specified in /etc/fstab

text: I'm using Linux Mint 12. There I have several partitions which I auto-mount on startup. _pysdm_ says that _/dev/sda6_ should permit execution of binaries. Also the _/etc/fstab_ says it should.               /dev/sda7   /media/Data         btrfs  users,user           0  0     /dev/sda8   /media/LocalBackup  btrfs  users,user           0  0      But executing scripts that are on this said partition yield _"Permission denied"_. Also `mount` says "noexec", even though that's not specified neither in fstab nor pysdm.               /dev/sda7 on /media/Data type btrfs (rw,noexec,nosuid,nodev)     /dev/sda8 on /media/LocalBackup type btrfs (rw,noexec,nosuid,nodev)      Where is the error? Is there a further file that influences partition mounting?


title: How to use command line to change volume?

text: I am trying to control the volume using my programming script. How can I do the following in Fedora 15, Ubuntu linux?   1. Mute/ Unmute   2. Volume up and volume down Note: Please note that I use a web USB microphone/speaker and also Analogue microphone/speaker. I want to apply to all to be sure.


title: Where can I find official POSIX and UNIX documentation?

text: I am looking for official documents on all POSIX standards and specifications. I would like to be able t read the docs to get a better understanding of UNIX systems and how they work at a low level. I've seen links here and there to opengroup.org, which I'm assuming is the entity behind the standards (however, I've heard IEEE mentioned a lot too). For a good rundown of POSIX, see this question: What exactly is POSIX? It answered a lot of questions for me.


Is there a way to determine when a binary was compiled or installed? For example, I have a binary mdrun_d, and I would like to know when this particular binary was compiled or installed. The system administrator may have recompiled or reinstalled the binary, and I would like to know if this is the case (without emailing him and bothering him with this question). Thanks!


title: What do the options `ServerAliveInterval` and `ClientAliveInterval` in sshd_config do, precisely?

text: I found this question, but I'm sorry I don't quite understand the settings on the two variables `ServerAliveInterval` and `ClientAliveInterval` mentioned in the accepted response. If my local server is timing out, should I set this value to zero? Will it then never time out? Should I instead set it to 300 seconds or something? My question is simply, some of my connections time out when I suspend & then unsuspend my laptop with the response `Write failed: Broken pipe` and some don't. How can I correctly configure a local sshd so that they don't fail with a broken pipe?


title: Frontend for libsane for manual batch scans,

text: Platform: Linux I have several documents that I want to batch scan without autofeed. Basically meaning that after a scan I want to "flip the page" and press a button to scan the next page, in the end getting a pdf document. Suggestions for software that will do this?


title: How to get rid of desktop environment and use a window manager only?

text: I have been using xterm for all my work. I realized that the features that desktop environments like GNOME has to provide are not of much use to me. Now, is it possible that I remove GNOME and KDE altogether and use some window manager only in run level 5 (X11) to play videos, use browser, and occasionally file manager like Nautilus. How can I do it? Is it a good idea? Which window manager would you suggest? What I have done so far: I installed Window Maker. When I rebooted, I was offered one more choice at the time of login - GNOME, KDE, Window Maker. I chose Window Maker. It gives me multiple workspaces, customizable keyboard shortcuts, without usual desktop features like panel, notification area, desktop icons. But I have observed that whenever I launch Nautilus, the desktop background changes to the one I set on GNOME and all desktop icons are restored as they were in GNOME, though the keyboard shortcuts of Window Maker still works. But to remove GNOME background and desktop icons I have to logout and login again. How can I fix it so that launching of Nautilus does not bring GNOME background? Should I use some other file manager? ## Update I have complied and installed dwm. It was not difficult at all. Though I needed to do the following steps to make dwm show in the menu of my login screen.               $ cd /usr/share/xsessions/       $ vim dwm.desktop        In the `dwm.desktop` I wrote:               [Desktop Entry]     Encoding=UTF-8     Name=dwm     Comment=To start dwm session     Exec=/usr/local/bin/dwm     Type=Application      This time when I got to login, I got dwm in the menu. ## Update I solved the nautilus problem using following steps.               $ gconftool-2 --recursive-list "/apps" |less      Here I searched for nautilus. It gave me                /apps/nautilus:       /apps/nautilus/preferences:        show_icon_text = local_only        start_with_sidebar = true        click_policy = double        background_color = #ffffff        start_with_toolbar = true        start_with_location_bar = true        mouse_back_button = 8        thumbnail_limit = 10485760        directory_limit = -1        ...      After that it was a simple matter of setting keys               $ gconftool-2 --get "/apps/nautilus/preferences/show_desktop"     $ true     $ gconftool-2 --set "/apps/nautilus/preferences/show_desktop" --type bool false     $ gconftool-2 --get "/apps/nautilus/preferences/exit_with_last_window     $ false     $ gconftool-2 --set "/apps/nautilus/preferences/exit_with_last_window" --type bool true     $ gconftool-2 --get "/apps/nautilus/preferences/media_automount_open     $ true     $ gconftool-2 --set "/apps/nautilus/preferences/media_automount_open" --type bool false      **Useful links** :   * dwm Primer   * GConf Command Line Tool


title: Writing a Script to Kill a Process for a User?

text: * List the running processes for that user.    * Confirm with the system administrator before killing the processes.    * Kill the processes after confirmation.


title: Starting SSH server after VPN starts

text: I am running an OpenVPN server on Ubuntu 14.04 as well as OpenSSH. I have my SSH server configured to bind to an IP address on my VPN interface. Once my machine boots, binding to that IP fails. Once I log in, can see with `netstat` that `sshd` is not listening. I am able to restart `sshd` and the machine will start listening properly. The IP on my VPN is the only IP I have configured `sshd` to listen on. At Boot:               sshd[1016]: Set /proc/self/oom_score_adj from 0 to -1000     sshd[1016]: error: Bind to port 22 on 10.8.0.1 failed: Cannot assign requested address.     sshd[1016]: fatal: Cannot bind any address. Restart SSH:               sshd[3481]: Set /proc/self/oom_score_adj from 0 to -1000     sshd[3481]: Server listening on 10.8.0.1 port 22. My best guess is that `sshd` is starting before my VPN is up and running. Is there a way I am able to ensure `sshd` starts afterwards so it can bind properly? Any suggestions about what to do or check?


title: How to modify dock bar in XFCE4?

text: I'm setting Arch Linux and I'd like to modify the standard dock bar, which is the file that I should edit? EDIT: like this ![enter image description here](http://i.stack.imgur.com/wVBaS.jpg) I don't want to use docky


title: When selecting from the Menu not able to Perform task?

text: Is there a way to automatically create users, delete users, create groups and delete groups once I selected a task? Also Why im not able to perform any of those task once I select the task I want to perform but instead I'm getting prompt to enter your selection when I choose a task?               #!/bin/bash     while true     do      clear      echo "========================="      echo "Menu ---"      echo "========================="      echo "Enter 1 to Create Group 1: "      echo "Enter 2 to Remove Group 2: "      echo "Enter 3 to Create User  3: "      echo "Enter 4 to Remove User  4: "      echo "Enter q to exit the menu q: "      echo -e "\n"      echo -e "Enter Your selection \c"      read answer      case "$answer" in      1) groupadd ;;      2) groupdel ;;      3) useradd ;;      4) userdel ;;      q) exit ;;      esac      echo -e  "Enter return to continue \c"      read input     done


title: Where is the struct task_struct definition in the 2.6.30.5 Linux Kernel?

text: In the version 2.6.15 kernel, I got that I can rewrite the `task_struct` in the file (include/linux/sched.h)，like:               struct task_struct {           unsigned did_exec:1;           pid_t pid;           pid_t tgid;           ...         char hide;     }        But, unfortunately, when I upgraded to the version 2.6.30.5, I looked through the same file, I just find a declaration of the `task_struct`, like:               struct task_struct;      And I have no idea which file I should refer to for the purpose of specifying my own `task_struct`? Can someone help me?


title: Using scp to transfer files to an android device

text: I have a file on a remote server that I want to transfer to my android device over `ssh`, only using the android device in the process. Using this setup, I tried an `scp` from the android device > scp remote_user@remote_host:file file After being prompted for the password I got permission denied. I then tried to transfer it from the remote server > scp -P 2222 file root@SSHDroid-ip:/mnt/extSdCard/file Without being prompted for the password I now get the message that the network (of the android device) is unreachable: lost connection. Is this a permission problem? I have transferred files over `ssh` from the remote server before, so I suppose the problem is on the side of the android device. Edit. I can transfer the file, from the remote server to the android device via scp, to the home path of the SSHDroid server on the android device. This home path is very cumbersome and deep, and can not be reached with the regular android API of the device. So I can transfer it to the home path of the SSHDroid server, but not to the path of my SD card on the android device. Where can I change/check the permission settings of the android device?


title: How to run a command ( ifup eth0 ) 10 seconds AFTER the desktop loads?

text: My modem does not connect as fast to the internet as the computer reboots. My modem and my computer are connected to the same outlet that I shut off and on via remote, so I need the computer to wait at least 10 seconds before running               ifup eth0      Currently I have `ifup eth0` in                /etc/rc.local      but it is simply too fast, and if I add `sleep 10` to this file, it probably would hang up and wait 10 seconds before it loads the desktop.


title: Blank desktop in Linux Mint 15 Xfce

text: Some days ago, I installed Linux Mint 15 "olivia" Xfce in my pc. but, today when I started it everything was working fine but, the desktop color is grey and nothing but a blank screen. when I click on it nothing happens. I can use the taskbar start any application and yes i am writing this from Linux Mint. I am also giving a screenshot      ![this is how desktop looks like](http://i.stack.imgur.com/KqMEg.png)


title: Accessing a VPN from Ubuntu 12.04

text: I am trying to access my schools VPN but it isn't working. I haven't used it in awhile but I followed the same procedure and it isn't working. I installed Cisco's Anytime Connect, I configured the VPN: I put the gateway as `https://sslvpn.uvm.edu` and then my user name and password. However, whenever I try to connect, it says:               The vpn connection failed because the vpn service failed to start.      Am I missing something during set up?


title: Rhythmbox can't find music on my Android device

text: Rhythmbox on my Arch Linux shows my smartphone on the devices list, but it's unable to find any music on it. I installed `mtp` and `mtpfs` and also enabled the mtp plugin in Rhythmbox. I also added a `.is_audio_player` file with this content:               audio_folders=Music/     folder_depth=2     output_formats=audio/mpeg      But no luck, the device is actually mounted fine and I'm able to browse through the files (using `gphoto2`) but if I try to play the files directly through the device they won't play either. Can anyone point me in the right direction?


title: Why does the gzip version of files produce a different md5 checksum

text: I have four files that I created using an `svndump`               test.svn      test2.svn      test.svn.gz       test2.svn.gz      now when i run this               md5sum test2.svn test.svn test.svn.gz test2.svn.gz      Here is the output               89fc1d097345b0255825286d9b4d64c3  test2.svn     89fc1d097345b0255825286d9b4d64c3  test.svn     8284ebb8b4f860fbb3e03e63168b9c9e  test.svn.gz     ab9411efcb74a466ea8e6faea5c0af9d  test2.svn.gz      So I can't understand why `gzip` is compressing files differently is it putting a timestamp somewhere before compressing? _I had a similar issue with`mysqldump` as it was using the date field on top_


title: Temporary .vimrc

text: Is there a way to read a `.vimrc` file for only a single ssh session? That is, when I log in I perform some operation so that vim uses say `/tmp/myvimrc` until I log out? I do not want to permanently overwrite the current .vimrc, I just need to use a different set of settings for the duration of my login every once in a while.


title: How to give more power to a USB device (error -110)?

text: I’m trying to mount an external hard drive (2.5", USB, no separate power supply) on Debian 7, but it gives me (in `dmesg` as well as when trying to boot with the device connected) errors like: > `device descriptor read/64, error -110`   >  `device not accepting address 7, error -110` While capturing errors from `dmesg`, after several minutes, it was mounted automatically and I could copy some files, then it was gone again, after which it mounted a second time (this time for only a few moments). But after that, nothing. Searching for `error -110` leads to several posts suggesting that the device probably doesn’t get enough power. Seems plausible, at least to a layman like me. Unfortunately, I don’t have access to a different PC to try it. But as I managed (randomly?) to mount it with my PC, it should be possible to do it again, so I wonder: **Is there a way to give more power to the USB port where the device is connected?** Could I disable _something_ on my system to save power which would then be available for the device? (I’m not looking for a permanent solution; I just want to get the data and never see the device again.)


title: Places to learn linux

text: Where can I go to learn about Linux? I found The Linux Documentation Project but a lot of it is old and so not complete. Any other good resources?


title: Stuck on "Determining IP information for wlan0" at boot

text: In my struggles to install ClearOS correctly, I now have another problem: After the first boot I keep getting stuck on "Determining IP information for wlan0...". It doesn't move forward at all. I've even waited for 20 minutes before continuing, but didn't make a difference. Right now my comp is unbootable because of this? Anyway to fix this?


title: Allow Rygel to talk to NetworkManager over DBUS?

text: I'm trying to run Rygel, a UPNP media server, on a headless Fedora 20 system. I installed Rygel, and created a dedicated user and `systemd` unit for it. Rygel starts but it is not listening on the port I asked it to. I think this is because it fails to get a list of network interfaces from `NetworkManager`. How can I give it permission to talk to NetworkManager over DBUS? **NOTE:** Both `NetworkManager` and `dbus-daemon` are confirmed running. Output from starting Rygel:               Feb 02 19:13:08 inspiron systemd[1]: Starting Rygel DLNA server...     Feb 02 19:13:08 inspiron systemd[1]: Started Rygel DLNA server.     Feb 02 19:13:09 inspiron rygel[2276]: Rygel-Message: rygel-main.vala:87: Rygel v0.20.3 starting…     Feb 02 19:13:09 inspiron dbus-daemon[465]: dbus[465]: [system] Rejected send message, 3 matched rules; type="method_call", sender=":1.95" (uid=1001 pid=2276 comm="/usr/bin/rygel -c /etc/rygel.conf ") interface="org.freedesktop.NetworkManager" member="GetDevices" error name="(unset)" requested_reply="0" destination=":1.12" (uid=0 pid=566 comm="/usr/sbin/NetworkManager --no-daemon ")     Feb 02 19:13:09 inspiron dbus[465]: [system] Rejected send message, 3 matched rules; type="method_call", sender=":1.95" (uid=1001 pid=2276 comm="/usr/bin/rygel -c /etc/rygel.conf ") interface="org.freedesktop.NetworkManager" member="GetDevices" error name="(unset)" requested_reply="0" destination=":1.12" (uid=0 pid=566 comm="/usr/sbin/NetworkManager --no-daemon ")     Feb 02 19:13:09 inspiron rygel[2276]: ** (rygel:2276): WARNING **: Error fetching list of devices: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 3 matched rules; type="method_call", sender=":1.95" (uid=1001 pid=2276 comm="/usr/bin/rygel -c /etc/rygel.conf ") interface="org.freedesktop.NetworkManager" member="GetDevices" error name="(unset)" requested_reply="0" destination=":1.12" (uid=0 pid=566 comm="/usr/sbin/NetworkManager --no-daemon ")     Feb 02 19:13:09 inspiron rygel[2276]: Rygel-Message: New plugin 'MediaExport' available      My Rygel `systemd` configuration:               [Unit]     Description=Rygel DLNA server     After=syslog.target          [Service]     User=rygel     Group=rygel     ExecStart=/usr/bin/rygel -c /etc/rygel.conf          [Install]     WantedBy=multi-user.target      My (slightly redacted) rygel configuration:               [general]     upnp-enabled=true     video-upload-folder=@VIDEOS@     music-upload-folder=@MUSIC@     picture-upload-folder=@PICTURES@     media-engine=librygel-media-engine-gst.so     interface=192.0.2.100     port=49152     log-level=*:5     allow-upload=false     allow-deletion=false          [GstMediaEngine]     transcoders=mp3;lpcm;mp2ts;wmv;aac;avc          [Renderer]     image-timeout = 15          [MediaExport]     enabled=true     title=@REALNAME@'s media     uris=/path/to/media     extract-metadata=true     monitor-changes=true     virtual-folders=true          [Tracker]     enabled=false          [Playbin]     enabled=false          [ZDFMediathek]     enabled=false          [GstLaunch]     enabled=false          [Test]     enabled=false          [ExampleServerPluginVala]     enabled=false          [ExampleServerPluginC]     enabled=false          [ExampleRendererPluginVala]     enabled=false          [ExampleRendererPluginC]     enabled=false          [MPRIS]     enabled=false          [External]     enabled=fals


title: Why does combining `less` and `script` disrupt line endings?

text: This `bash` snippet will print out the numbers 1 to 10:               $ for i in $(seq 1 10); do echo $i; done     1     2     3     4     5     6     7     8     9     10      When I try to use this with `script` and `less` like so:               $ script -q -c 'for i in $(seq 1 10); do echo $i; done' /dev/null | less      ...I see this instead:               1      2       3        4         5          6           7            8             9              10                (END)      The usual `less` prompt doesn't show up, either. What's going on here? I'm doing this on Ubuntu 13.10, `script` is `script from util-linux 2.20.1`, `less` is `less 458 (GNU regular expressions)`.


title: Is there any way to see the options for the next directory on a cd command?

text: When I cd to a/b/c, sometimes I want to see what are the children dirs of c. Normally, I would do it like this               cd a/b/c     ls     child1 child2        cd child1      Is there any way to investigate the children without stopping to do the ls?


title: Is it safe to `emerge -uavDN @world` while working?

text: In a related question, a few answers ("Yes", "...no problem", "typically... no problem") verify that it is safe to perform `emerge -uavDN @world` while working. Is it really so (for Funtoo/Gentoo)?


title: Change default python distribution for postgres from the system's python (to Enthought Canopy)

text: On an RHEL6 system, I'd like my postGIS implementation (ie my postgres/postgresql databases) to use Enthought's Canopy distribution of python, rather than the built-in GNU's distribution. (This is because postGIS needs some packages that seem hard to install from RHEL's built-in repositories.) How can I change the python path / etc just for postgres?


title: Linux shared FTP: one file must not be deleted

text: Two users:               A1:x:1001:1002::/home/A1:/bin/sh     A2:x:1002:1002::/home/A1:/bin/sh      One group:               A1:x:1002:      FTP server: fresh install ProFTPd OS: fresh install Ubuntu Server 12.04 One folder (/home/A1) that I want to make shared between A1 and A2:               /home/A1: A1:A1 rwxrwxr-x     /home/A1/B1.txt: A1:A1 rw-rw-r--     /home/A2/B2.txt: A1:A1 rw-r--r--      What I want:   * B1.txt to be modifiable by A1 and A2   * B1.txt to be modifiable by A1, but not by A2 so A2 could only read it. When I connect to FTP now, A2 can modify anything and I don't really understand this. If I remove group write permission from /home/A1 (so rwxr- xr-x) A2 cannot modify anything. What do I do wrong?


title: change of Unix default directory structure

text: Is it possible to change the default Unix/Linux directory structure? I mean by configuration and without need to change the kernel. Or if the kernel has to be edited, how hard is such task? Is the default directory structure (all these `/usr`, `/bin`, `/etc` directories) hard coded in the kernel? What I need is to have one root (`/`) directory, where every user will be free to create it's own files/directories and one `/Linux` directory, where all OS files will exists (probably in the original structure) including all configuration files. There should be no "Home" directory at all and all configuration files should be the same for all users editable only by the system administrator.


title: Installing a cross-toolchain to build ARM binaries on Debian

text: I tried to install a cross toolchain so I could build Linux kernel on amd64 (Debian testing "jessie") for my ARM system. I have this entry in `sources.list`:               deb http://www.emdebian.org/debian sid main      When I tried to install **gcc-4.7-arm-linux-gnueabi** , I got an error: > cc-4.7-arm-linux-gnueabi : Depends: libgomp1-armel-cross (>=4.7.2-5) but it > is not going to be installed **libgomp1-armel-cross** in turn depends on **gcc-4.8-base-armel-cross** which is not available anywhere. At some point, I did manage to install these cross-build tools from the same repository, and even built a kernel that now runs on these ARM systems some weeks ago. Is there something broken in that repository? I tried a few other versions of GCC, and still get the same issue. A not-ideal solution is cross-building in an Ubuntu 12.04 VM. The distro has the ARM cross-compiler available from its official repositories.


title: Parse all column elements from a linux bash command output

text: I would like to parse the column elements of the output from the command `lsscsi`. Here is a sample output,               # lsscsi          [0:0:0:0]   disk   ATA   VBOX HARDDISK   1.0   /dev/sda     [0:0:1:0]   disk   ATA   VBOX HARDDISK   1.0   /dev/sdb     [1:0:1:0]   disk   ATA   VBOX HARDDISK   1.0   /dev/sdc      Example if I want column 2, my output should be,               disk     disk     disk      If column 7,               /dev/sda     /dev/sdb     /dev/sdc


title: How often is PSS value updated for a given process in /proc/pid/smaps

text: So if n processes are sharing a library L with size M then the contribution to their PSS is M/n. Now imagine one of the process terminates. So the contribution would be M/(n-1). Q1: My question is how soon is this change reflected in the PSS values of processes still running and using the shared library? Q2: As a trivial case suppose only two processes are using a shared lib L of size 100K. PSS contribution to each process is 50K. Now when P2 dies it is the only process using L. So its PSS should increase and become 100K. How soon will this happen, as soon as P2 dies, or after some time? After how much time?


title: What triggers this screen prompt "Screen used by <username> on host01."?

text: Every now and then some key combination clears my working (Gnu) screen and brings up this message:               Screen used by <username> on host01     Password:      What key combination causes this and what does it signify?


title: Is there a way to monitor the Shareable Objects (.so) loaded on launch of a specific application?

text: I've been through dependency issues, but, finally, have my application running. The problem is I need to force install of some old libraries with `dpkg` to achieve this, which, in turn, breaks my package manager (`apt-get`). If I can find what `.so`s are called on load I can extract them (`alien` + `tar`) and symlink them within the working directory of this application. Thus, keeping my package manager and achieving what I need. I wish multiarch did what it was meant to so I wouldn't be here in the first place :(


title: Sapphire HD 4870 GDDR 512 drivers for Ubuntu

text: I just installed a new graphic card, could someone tell me how can I install the drivers for **Sapphire HD 4870 GDDR 512** ? Unfortunately I only see Windows driver on their official website.


title: Where is "showing the output of the 'ls' command vertically" documented?

text: I found out it's possible to show the output of the `ls` command vertically using the `-1` switch: > $ ls -1 But couldn't find it in the manual of `ls`. Is it a secret option?


title: Migrating the KDE configuration files

text: I'm a KDE user, and When I switch Linux distributions, I don't want to copy my entire home folder, since most of the configuration files there will be created automatically when I install\run programs on the new installation. There are, however, some applications that I've put a lot of work into their configuration, and I like to hand-pick their configuration files that I want to migrate to the new installation. Now, I'm having trouble doing that with the KDE configuration itself - I can't find my way around the `.kde` and `.kde4`. I don't want to migrate the entire folder - but I need some specific settings from there. So, the question is - what do I need to do to migrate the following KDE settings:   * File associations   * Activities That's it. I need a way to migrate those - be it copying specific files, copying parts of files, or using a tool. Thanks in advance!


title: Automatically opening kwallet while logging in to KDE

text: How can I configure kwallet to automatically open when I log in to KDE, so that I don't have to retype my password every time I want to connect to a wireless network or when Chrome needs some passwords, etc.? I am running KDE 4.6.5 in Debian testing.


title: Location of dhclient.conf

text: I need to check the client DHCP settings, which I expect to be in the file `/etc/dhcp/dhclient.conf`, but there is no such files there. What is the location of this file in RHEL 6, on 64 bit?


title: Read-only file system error while creating a directory?

text: I have got one of our production ubuntu machine setup by PRODUCTION Unix team here in our company but somehow when I am doing like this -               root@machineA:/test01# ls -lt     ls: reading directory .: Input/output error     total 0      It is giving me an error and also if I am trying to create any directory in the promary01 directory, it is giving me an error as well -               mkdir: cannot create directory `/test01/primary': Read-only file system      Any thoughts what is wrong? I am thinking to fix this myself instead of telling UNIX PROD guys as I have the root access with me as well and I will be able to learn something new as well. May be, it was not mounted properly?


title: shell variable in awk is not being passed to all the lines but just for the very first line of input?

text: inputfile: **is2.txt**               10.39.5.41,A1,B1     10.39.5.41,A2,B2     10.39.5.41,A3,B3     10.39.5.41,A4,B4     10.39.5.41,A5,B5     10.39.5.41,A6,B6      script :               #!/bin/bash     second_column="OOOOOOO"    # OOOOOOO will be added to every second column     third_column="XXXXXXXX"    # XXXXXXXX will be added to every third column          awk -v second="$second_column" -v third="$third_column" 'BEGIN { FS="," }                                  {                                     if(a[$1])                                     {a[$1]=a[$1]";second"$2";third"$3}                                      else                                     {a[$1]=a[$1]second$2";"third$3}}                                  END{for (i in a)print i";"a[i];}' <  is2.txt          output:     [root@testgfs2 test]# ./testawk.awk     10.39.5.41;OOOOOOOA1;XXXXXXXXB1;secondA2;thirdB2;secondA3;thirdB3;secondA4;thirdB4;secondA5;thirdB5;secondA6;thirdB6      why the shell variables(second_column,third_column) are not being reflected for the complete output and just for the first line.whats wrong? expected output:               10.39.5.41;OOOOOOOA1;XXXXXXXXB1;OOOOOOOA2;XXXXXXXXB2;OOOOOOOA3;XXXXXXXXB3;OOOOOOOA4;XXXXXXXXB4;OOOOOOOA5;XXXXXXXXB5;OOOOOOOA6;XXXXXXXXB6      More over,is there anyway to generalize this for n number of columns say n = 100


title: How can I screencast purely from the tty?

text: How can I do a screencast (having a video file out from my screen output) without X server? I mean, purely from the tty, no KDE, no LXDE, no Xorg beneath them. Like if I were in single-user mode.


title: Modify Default Group for new Users in Solaris 11

text: I would like to change the default group for new users which are added to the system. Does anybody know in which file this is stored? I'm using Solaris 11


title: Unable to extract modulus, exponent from pubkey.pem

text: I am trying to extract modulus and exponent components from public key which is in .pem file, using below command:               openssl rsa -inform der -pubin -text < pubkey.pem      But it is showing me below error message:               unable to load Public Key     4339:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:/SourceCache/OpenSSL098/OpenSSL098-47.1/src/crypto/asn1/tasn_dec.c:1315:     4339:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:/SourceCache/OpenSSL098/OpenSSL098-47.1/src/crypto/asn1/tasn_dec.c:379:Type=X509_PUBKEY      Any clues?


title: Elementary OS dual sound output problem

text: Good afternoon guys. I recently installed Elementary OS on HP desktop-pc. Things appears to be working just fine, except that when I plug-in my headphones, I can still hear the sound coming from my inboard sound card, as well as my headphones. I've tried to find a workaround, but in the end came up with nothing. I saw in some forums suggestions to mark an option in "Gnome Alsa-Mixer", called "Headphone Jack Sense" which is supposed to mute my inboard stereo, if headphones are present, but it appears that I do not have such option. ![enter image description here](http://i.stack.imgur.com/Qd0Gy.png) I also saw suggestions, about another option in alsamixer (in terminal) called "Auto-mute" or something, which needs to be enabled. But again, I do not appear to have an option like that. ![enter image description here](http://i.stack.imgur.com/Al8lv.png) Currently, I am out of ideas, so any help will be appreciated. Thanks.


title: i3 status bar: low battery not showing up in red

text: I have configured this in my i3status.conf:               battery 0 {       format = "%status %percentage - %remaining"       low_threshold = 30       threshold_type = time       integer_battery_capacity = true     }      And the battery indicator works just fine, except for the fact that it does not turn red when under the low_threshold, which it should according to the documentation. What can cause it not be become red? All other text is white.


title: Enabling Compiz Viewport Switcher key bindings

text: I'm running compiz 0.8.2 with compizconfig on Scientific Linux 6.2 with Gnome 2.28.2. In the compizconfig "General Options" I have "Desktop Size" set as follows:   * Horizontal Virtual Size: 6   * Vertical Virtual Size: 1   * Number of Desktops: 1 This gets me the layout I want, i.e. 6 workspaces in a horizontal layout. Ctrl-alt-cursor-keys work fine for switching between them. However, I can't figure out how to get key bindings for specific workspaces. I've tried enabling "Viewport Switcher" in compizconfig, and tried various combinations both in "Number-based viewport switching" and "Go to specific viewport", to no apparent effect. My first thought was that something else was eating the specific key bindings I chose, but I think I've tried every combination of shift, control, alt and super (i.e., the Windows key) by now. I tried setting 6 desktops under "General Options" instead of one desktop with horizontal virtual size 6, but that doesn't seem to make a difference either. What am I missing?


title: init.exe: Caught segmentation fault, core dumped - what is the source of this error

text: On my embedded device, I have this error showing up after kernel boot:               init.exe: Caught segmentation fault, core dumped      But I cannot understand why is this happening? If I do battery cut( i.e. reboot my device foricbly) then the device boots and comes up fine. Any pointers will be extremely helpful. Is this some transient low level memory issue? It is linux 2.6.31 on Arm architecture.


title: Is there way to stop random software packages from remotely transferring your files?

text: I am running a bitcoin client on my archlinux computer. If somebody can get ahold of the wallet.dat file, located in the **~/.bitcoin/** directory they can steal my coins. I have minimal software installed. Basically just xfce4, xfce4-goodies, bitcoin and a few other programs I deem necessary. How plausible is it for one of the developers/repository-managers of the ~100 odd software packages I have installed on my operating system to silently send my wallet.dat file to themselves in the next update of their software? Should I be inspecting all of my software updates for this possibility to be on the safe side? The downside to this approach is that archlinux inherently uses all of the latest software updates/patches in their official repository. Are there any protectionary measures in linux to prevent software packages from accessing folders outside of their jurisdiction? Groups perhaps?


title: Something like VMware "Changed Block Tracking" (CBT) in linux

text: I'm wondering if is there any possibility to track changed blocks in linux with an ext3/ext4 filesystem (or a specific one supporting it).   I mean a feture like the _Changed Block Tracking_ (CBT) available on ESX/ESXi systems. I refers to the feature discussed here: What is Changed Block Tracking (CBT)   Understanding Changed Block Tracking on Virtual Machines.


title: Is there a tool for tracking uptimes across reboots?

text: A tool such as this might on the surface appear to serve no real useful purpose, but people that take care of systems like to brag, and uptime is just one of those things that they like to brag about right after how much RAM or CPUs their systems have. Additionally, how many times have you had a system mysteriously reboot, only to find that it had, later on. A tool such as this would help to identify the frequency of both the reboots and the length of time that the system was staying up, between reboots. 2 potentially useful pieces of information when debugging badly behaving systems. Is anyone aware of such a tool?


title: What is the difference between symbolic and hard links?

text: When would you use one over the other?


title: Purpose of hard link and soft link

text: > **Possible Duplicate:**   >  What is the difference between symbolic and hard links? I've read quite a few articles regarding hard links and soft links, but I still dont understand the purpose of these two. What happens if you hard link a file, and what happens if you soft link a file? I want to know theif functions i.e. what happens if the soft link is deleted, or the physical file is deleted? does the soft link or hard link keeps the original file updated and which of the two writes to the original file and which doesnt if so why whats the point of soft and hard links


title: Raspian, Huawei E303, Public IP address

text: After configuring Raspian linux and a Huawei E303 3G USB stick, I am stuck accessing the machine from the Internet by its public IP address. Details: The E303 stick was configured to work as an Ethernet device (mode switch worked OK). Linux creates an _eth1_ device for it and receives an ip address via DHCP from the E303 after adding the device to _/etc/network/interfaces_. After setting it as the default route, all access from the machine to the Internet works fine - _route add default gw 192.168.8.1_. The IP address _eth1_ receives is 192.168.8.100 - or, if I use a different sub-model of the E303, it is 192.168.1.100. I can tell that the E303 devices are slightly different, because - after mode switching - one of them holds the USB product id 0x014db, the other 0x014dc. Besides the assigned subnets they are not distinct. Both sticks run a web server and may be accessed without problems, however, there are no configuration option on their network behaviour. They show their own IP address as from the 10.34.X.X subnet (from the device information web page). Then I registered a dynamic IP address (with no-ip.com) and installed the respective software package. My public IP address is properly registered with no-ip.com (when looking at the hosts listing on their web site) and ping displays the correct, public IP address of my machine. Both, when pinging from the Raspian and from a different machine in a separate network. Btw, when using the _ddclient_ package, instead, I see the exact same result. When not using the 3G stick, but plugging in the on-board Ethernet, the machine may be ping'ed, ssh'ed from the local network without problems, and I can get web pages served as well. My assumptions are that the configuration of the E303 device, routing out, and the dynamic IP address registration are basically OK. But I have no clue how to make the machine visible to the Internet. All connections from the outside time out. The Huawei 3G stick and the telephone provider infrastructure seem to act as intermediate network devices applying NAT without port forwarding to my machine.


title: When issuing ls in the /etc/ directory, I get "ls: reading directory .: Input/output error"

text: I have a Windows running a CentOS6 (32-bit) on a VMWare virtual machine. I am attemping to install a single-node Cloudera Hadoop according to these instructions. At one point I was asked to issue                for x in `cd /etc/init.d ; ls hadoop-hdfs-*` ; do sudo service $x start ; done      and I received the following error:               ls: cannot access hadoop-hdfs-*: No such file or directory      When I `cd` into my `/etc/` directory, and issue `ls`, I receive the following:               ls: reading directory .: Input/output error      From googling I learned that the `ls: reading directory .: Input/output error` can occur when hardware is failing. I don't think that is related to my problem, because the `/etc/` directory is the only place where I cannot issue an `ls`, plus I am on a virtual machine with a new computer.               df -h      produces ![enter image description here](http://i.stack.imgur.com/bIzUF.png)


title: grep a keyword from Mplayer output and send the rest to file

text: I am using mplayer. I want to send everything to a log file (/tmp/server.log), but I want the Volume output to be written to the terminal. I have seen that there is a way to split the output with tee, but I can't seem to get it to work. This is what I have so far:               $mplayer /path/to/song.wav 1>tee /tmp/server.log | grep Volume  2> /tmp/server.log      I want ALL of the stdout and stderr to go to the log file, but only the lines with Volume from stdout to be written to the terminal. Or is there a better way of doing this?


title: not able to login by ftp

text: I've installed `vsftp` and set the home directory of user `ftp` with `sudo usermod -d /var/www/ ftp` , I've also set the password with `sudo passwd ftp` and restarted the server but I can not login with user ftp when I try with `ftp 127.0.0.1`, why not? What may be wrong here? This is on a Kubuntu 13.04 box.               $ ftp 127.0.0.1     Connected to 127.0.0.1.     220 (vsFTPd 3.0.2)     Name (127.0.0.1:reg): ftp     331 Please specify the password.     Password:     530 Login incorrect.     Login failed.     ftp>


title: is stack-smashing protection on on Debian?

text: I heard that every binary that comes with Ubuntu is protected with stack- smashing protection and possibly other gcc features to harden programs against common security threats. What about Debian? I couldn't find any definitive info on the Internet.


title: Mint17 MATE Boot hangs at Mint logo samba auto reload start stop

text: I tried to re-start Mint17 Mate after a .font.conf copy/paste edit that had re-booted one time already just fine. I noticed that my network icon had greyed out the 'edit connection' and couldn't disconnect nor connect wired to router...all worked fine and do for 2nd Mint on other partition. I found only one question that shows just where my boot process hangs up. I do not know what I did to all of a sudden have the re start hang. I did put a bookmark for a MyBookLiveDuo share, did not think nor expect it to want to load at start up. There is something about smb and cifs automount in the log screen, but got a fail on the "samba auto-reload integration starting, next line showed it 'stopping' and there was 2nd 'fail' for MDM for log in. It doesn't get to the log in screen anyway. I believe it had an init or cntl init. command line in the terminal for shared folder,but not at all sure now. I read what I found , so far but now issue is: I do not know how to get at that to initiate any fixes or commands from terminal I did the recovery mode boot: fix broken packages, file check and grub fix no changes. Can look at the grub screen I guess it is, by pressing the down arrow, esc or delete. After using recovery mode I still get nothing done and I cant find out how to get in safe mode or whatever it's called. Only using Mint or any Linux for a 2months. I have live USB stick but didn't know what to do with it after booting to it. Computer is a Toshiba- old laptop A215 series from about 8yrs ago. Mint17 Mate fails to boot. Hangs with the mint logo. goes no farther.. I pushed keys and found the log, i think. and it is stopped at the point I noted above. I cant seem to make it boot again. the log shows everything OK but mdm. I am trying to fix the boot hangup issue. john


title: nVidia proprietary driver

text: I successfully installed `NVIDIA-Linux-x86_64-290.10.run` on my Debian Squeeze desktop but I do not see `/var/log/nvidia-installer.log` clearly stating which file(s) have been added/replaced. Does anybody know which file(s) it installs or modifies ?


title: Are there any PaxTest for OpenBSD?

text: Pax: > PaX is a process memory protection patch For FreeBSD, there exists a testsuite called PaxTest, is there a PaxTest available for OpenBSD?