title: Fedora 15: Linux 2.6.40 + tg3 = pain

text: I have an IBM BladeCenter blade running Fedora 15. Everything works fine with 2.6.38 kernels, but when I boot with a 2.6.40 kernel, I lose connectivity after a few seconds. Removing and then re-inserting the `tg3` module restores connectivity for about five seconds, after which I lose connectivity again. These are dual-Xeon blades. This one has two 2.8GHz Xeons with HT and 2GB of RAM. The blade is an 8832-L1X running BIOS version 1.13. The output of `lspci` is:               00:00.0 Host bridge: Broadcom CMIC-LE Host Bridge (GC-LE chipset) (rev 33)         00:00.1 Host bridge: Broadcom CMIC-LE Host Bridge (GC-LE chipset)         00:00.2 Host bridge: Broadcom CMIC-LE Host Bridge (GC-LE chipset)         00:01.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)     00:0f.0 Host bridge: Broadcom CSB6 South Bridge (rev b0)     00:0f.1 IDE interface: Broadcom CSB6 RAID/IDE Controller (rev b0)     00:0f.2 USB Controller: Broadcom CSB6 OHCI USB Controller (rev 05)     00:0f.3 ISA bridge: Broadcom GCLE-2 Host Bridge     00:10.0 Host bridge: Broadcom CIOB-E I/O Bridge with Gigabit Ethernet (rev 12)     00:10.2 Host bridge: Broadcom CIOB-E I/O Bridge with Gigabit Ethernet (rev 12)     01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704S Gigabit Ethernet (rev 02)         01:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704S Gigabit Ethernet (rev 02)      Here's a `dmesg` excerpt with kernel-PAE-2.6.38.8-32.fc15.i686 (working):               [11.545123] tg3.c:v3.116 (December 3, 2010)     [11.545152] tg3 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16     [11.599499] tg3 0000:01:00.0: eth0: Tigon3 [partno(BCM95704A41) rev 2002] (PCIX:133MHz:64-bit) MAC address     [11.599510] tg3 0000:01:00.0: eth0: attached PHY is serdes (1000Base-SX Ethernet) (WireSpeed[0])     [11.599518] tg3 0000:01:00.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[0]     [11.599525] tg3 0000:01:00.0: eth0: dma_rwctrl[769f4000] dma_mask[64-bit]     [11.599577] tg3 0000:01:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17     [11.627997] tg3 0000:01:00.1: eth1: Tigon3 [partno(BCM95704A41) rev 2002] (PCIX:133MHz:64-bit) MAC address     [11.628066] tg3 0000:01:00.1: eth1: attached PHY is serdes (1000Base-SX Ethernet) (WireSpeed[0])     [11.628074] tg3 0000:01:00.1: eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]     [11.628082] tg3 0000:01:00.1: eth1: dma_rwctrl[769f4000] dma_mask[64-bit]     [22.000286] tg3 0000:01:00.0: eth0: Link is up at 1000 Mbps, full duplex     [22.000294] tg3 0000:01:00.0: eth0: Flow control is off for TX and off for RX      And here's one from kernel-PAE-2.6.40.6-0.fc15.i686 (not working):               [10.262141] tg3.c:v3.119 (May 18, 2011)     [10.262177] tg3 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16     [10.309325] tg3 0000:01:00.0: eth0: Tigon3 [partno(BCM95704A41) rev 2002] (PCIX:133MHz:64-bit) MAC address              [10.309336] tg3 0000:01:00.0: eth0: attached PHY is serdes (1000Base-SX Ethernet) (WireSpeed[0], EEE[0])     [10.309344] tg3 0000:01:00.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]     [10.309351] tg3 0000:01:00.0: eth0: dma_rwctrl[769f4000] dma_mask[64-bit]     [10.309431] tg3 0000:01:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17     [10.361613] tg3 0000:01:00.1: eth1: Tigon3 [partno(BCM95704A41) rev 2002] (PCIX:133MHz:64-bit) MAC address              [10.361624] tg3 0000:01:00.1: eth1: attached PHY is serdes (1000Base-SX Ethernet) (WireSpeed[0], EEE[0])     [10.361633] tg3 0000:01:00.1: eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]     [10.361640] tg3 0000:01:00.1: eth1: dma_rwctrl[769f4000] dma_mask[64-bit]     [21.054276] tg3 0000:01:00.0: eth0: Link is up at 1000 Mbps, full duplex     [21.054284] tg3 0000:01:00.0: eth0: Flow control is off for TX and off for RX      Again, the symptom is that networking works fine for a few seconds but then completely stops. Doing an `rmmod tg3` followed by a `modprobe tg3` restores connectivity for a few seconds. Nothing unusual appears in any logs. I've tried a few kernel option workarounds. I don't remember exactly which, but I know I tried `acpi=noirq`, `acpi=ht`, `irqpoll`, and `noapic`. `modinfo`, minus the many `alias` lines shows:               filename: /lib/modules/2.6.40.6-0.fc15.i686.PAE/kernel/drivers/net/tg3.ko     firmware:       tigon/tg3_tso5.bin     firmware:       tigon/tg3_tso.bin     firmware:       tigon/tg3.bin     version:        3.119     license:        GPL     description:    Broadcom Tigon3 ethernet driver     author:         David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)     srcversion:     389C3BA89E4ECF8460A74C0     depends:         vermagic:       2.6.40.6-0.fc15.i686.PAE SMP mod_unload 686     parm:           tg3_debug:Tigon3 bitmapped debugging message enable value (int)      Fedora reports the kernel at 2.6.40 for "compatibility with older userspace". **Update** : Doing `ifconfig eth0 down` followed by a new `ifconfig` to bring it up and adding the appropriate routes makes everything work indefinitely. Doing an `rmmod tg3` followed by a `modprobe tg3` makes it work for a few seconds and then break again. So at least I have a workaround for now -- adding `/etc/rc.d/init.d network restart` into `rc.local`. I'd still like to know what's wrong and whether there's a proper fix.


title: Lightweight feature-rich alternatives to OpenOffice and LibreOffice

text: I really like LibreOffice however I'm having issues with it freezing up and I can't seem to start a new instance of the writer on multiple desktops (I'm using dwm and want several documents open). For this reason, I need a writer application (don't use spreadsheets or presentations that much) that has all the features of LibreOffice but can be launched independently of other instances. The features I require the most would be:   * Rich text editing (bold/italics/fonts/font sizes/etc)   * Ability to add headers and footers to pages   * Ability to add formulas to pages (I'm sure this can be accomplished with a LaTeX plugin of some sort)   * Portrait/Landscape view   * Split text into columns   * Export to pdf (not essential but makes it easier if its integrated) I've tried alternativeto.net without much success. Any ideas? Maybe my problem with LibreOffice can be fixed.


title: How to make an application run automatically?

text: I am trying to run my application when a user logs in. So I've added a script in `~/.bash_profile` as follows:               # for Buluttdepo     /usr/bin/myapp > /dev/null 2>&1 &     export MYAPP_HOME=/opt/myapp      It is run successfully, but should I add the script in `.bash_profile`? Otherwise I can add in `/etc/profile` or add a script file as `/etc/profile.d/myapp_run.sh` . If I do it this way, myapp is run by root. But I don't want to run it by root. I should run by any user. Therefore, I'm building an RPM package. I want to add the script when the RPM package installer is run. Because the RPM package is installed by root, it doesn't know which `.bash_profile` to add to, so it can add only to `/etc/profile` or `/etc/profile.d/`.   * Which file should I add it to?      * If the file is `~/bash_profile`, how to add the script in `bash_profile` for _any user_ by `root` via `rpm`?     * If the file is `/etc/profile` , how can any user run `myapp`?     * Can you suggest a simpler way to do it?


title: Apt-get dist-upgrade fails

text: I'm trying to upgrade from Mint 13 to Mint 15, but receive the following error:               Calculating upgrade... Failed     The following packages have unmet dependencies:      mate-media : Depends: mate-media-gstreamer but it is not going to be installed or                            mate-media-pulse but it is not going to be installed     E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.      It seems that `mate-media-gstreamer` and `mate-media-pulse` conflict with each other. Could someone help with this?


title: Forget where link is to custom conf file?

text: I cannot remember if somewhere else I must have a link to my `/etc/httpd/conf.d/mycustom.conf` file? I am trying to get two domain names on same IP to link to different folders but so in the url you go to example.com and it goes to one site and when you go to other.net it goes to another site and not the same site as example.com or only be accessible via other.net/site So now thinking I need two separate custom conf files for virtual hosts? As it stands when I try and add a virtual host for second site in my one and only conf file it just leads back to first or you have to go to the folder where sites resides. So for one IP do you require only one custom conf or one for each domain name if you want them directed to different folders?


title: Can't get SSH working anymore on Debian after upgrade

text: I have a vServer and can only login via SSH. After the latest `apt-get upgrade` command, I can't login anymore and get the following error message:               "Network error: Connection refused".       It seems that port 22 is not open anymore? Fortunately, I'm able to use Virtuozzo offered by my provider that creates a repair container. From that I'm able to login in a special container (seems to be a new environment where all my files are mapped to a `/repair` folder). I checked the `auth.log` file already:               Jul  7 22:29:13 v34913 saslauthd[1675]: detach_tty      : master pid is: 1675     Jul  7 22:29:13 v34913 saslauthd[1675]: ipc_init        : listening on socket: /var/run/saslauthd/mux        * Does that help?   * What else can I check why the ssh server is not running anymore?


title: How do you prevent a DHCP release during shutdown?

text: I am currently using Ubuntu 14.04, but expect this to be applicable for different distros. I would like to prevent a DHCP release during shutdown, and opt for either the lease to expire or for a DHCP renew (if needed) on startup. Is this possible?


title: Specific string hangs [, [[

text: While fuzz testing I've found that it's possible, by defining               var=$'\365\\'      , to make both of the following commands (used to remove everything up to the last newline) **hang indefinitely, consuming 100% CPU** in Bash 4.2.25(1)-release (x86_64-pc-linux-gnu):               [ -n "${var##*$'\n'}" ]     [[ -n "${var##*$'\n'}" ]]      The runaway `bash` process can't be interrupted with `SIGINT` (`Ctrl`-`C` or `kill -SIGINT $pid`) or `SIGTERM`, but have to be killed with `SIGKILL`. I tried to inspect the value using               uniname -bcp <<<"$var"      but that also hangs. `uniname`, however, is killable with `SIGINT`. I also checked some other basic commands, but all of them work fine:               echo "$var"     printf '%q\n' "$var"     touch -- "$var"     rm -- "$var"      What's going on here? Is this reproducible by others? And is this defined behavior?


title: Multiple virtual interfaces all bridged to eth0

text: I'm following this tutorial for setting up bridged a bridged Ethernet interface using `uml-utilities` and `bridge-utils` and it works for 2 interfaces but no more than 2. What I'm trying to achieve is the sort of VirtualBox style bridging where you can have many different interfaces all with their own assigned IP from the router. Ideally I'd want something like this:               eth0 - 192.168.1.12 -- host IP     tap0 - 192.168.1.13 -- ip of first virtual adapter     tap1 - 192.168.1.14     ...      Where I'm getting hung up on is this, when I try to add `eth0` to be part of `br1`, as well as `br0`.               ~ # brctl addif br1 eth0     device eth0 is already a member of a bridge; can't enslave it to bridge br1.          Other commands:               ~ # brctl show     bridge name bridge id       STP enabled interfaces     br0     8000.3209ba59de51   no      eth0                                         tap0     br1     8000.000000000000   no            `br0` _has_ an IP, it's different from what `eth0` used to have. `eth0` _does not have_ an IP, since I ran the command `sudo ifconfig eth0 0.0.0.0 promisc` from the tutorial. `tap0` _does not_ have an ip. * * * I can bring `eth0`'s IP back, if I do a `dhclient eth0` and it becomes what it previously was, different from `br0`'s current IP.


title: Is it possible to define a command in bash?

text: For example, can I set               gb = cd /media/Dan/evolution      So that everytime I execute `gb` in bash, I can `cd` to that particular directory? I find something online, `alias` command. But It seems can't do the work above. Is it possible to do it? How?


title: How to create Linux header for newly compiled kernel?

text: In Debian when I want to compile my kernel module I need to install `linux- header-*` package and then I need to write some `makefile` like this:               obj-m := hello.o     KDIR := /lib/modules/$(shell uname -r)/build     PWD := $(shell pwd)     default:             $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules      But now I have downloaded specific kenel from kernel.org and compile it. So how can I address the `KDIR` variable in my `makefile`? I want to know, how Debian mainteners create `linux-header-*` packages?


title: Extend Workspace on Kali using VMware

text: I'm using Kali on Windows via VMware. The web browser and other things sometimes seem too much zoomed in and I can't get to certain links or buttons. How do I zoom out or expand the area? (clicking maximize doesn't do anything) Provided is a screen shot to better illustrate what I mean: ![enter image description here](http://i.stack.imgur.com/UrXD0.jpg) As you can see, I can't get to what's below.   So far I've been managing with the tab key, but it's stressful.


title: F4-key mysteriously reassigned

text: In the middle of today, my `F4` key started producing the letter `p`, without my conscious acting and I can't seem to revert this change. Whenever I press `F4`, `p` appears instead. How can I change this back? Pressing `p`, `xev` returns:               KeyPress event, serial 38, synthetic NO, window 0x4400001,         root 0x150, subw 0x0, time 581565, (696,-17), root:(698,55),         state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,         XLookupString gives 1 bytes: (70) "p"         XmbLookupString gives 1 bytes: (70) "p"         XFilterEvent returns: False          KeyRelease event, serial 38, synthetic NO, window 0x4400001,         root 0x150, subw 0x0, time 581605, (696,-17), root:(698,55),         state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,         XLookupString gives 1 bytes: (70) "p"         XFilterEvent returns: False      Pressing `F4`, `xev` returns:               KeyPress event, serial 38, synthetic NO, window 0x4400001,         root 0x150, subw 0x0, time 582298, (696,-17), root:(698,55),         state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,         XLookupString gives 1 bytes: (70) "p"         XmbLookupString gives 1 bytes: (70) "p"         XFilterEvent returns: False          KeyRelease event, serial 38, synthetic NO, window 0x4400001,         root 0x150, subw 0x0, time 582318, (696,-17), root:(698,55),         state 0x0, keycode 33 (keysym 0x70, p), same_screen YES,         XLookupString gives 1 bytes: (70) "p"         XFilterEvent returns: False      As far as I'm concerned, both keys appear to me as one and the same key. Where can I revert or change such low-level behavior? **Update:** I plugged in an external keyboard for which `F4` works as expected. So... is my keyboard broken? **Update:** While in GRUB, before the kernel starts, `F4` simply does nothing as opposed to produce a `p`. To me, this can only mean that it's an OS problem. **Update:** In the ttys (1 to 3, 5 and 6 (I can't access the fourth through `Ctrl`-`Alt`-`F4`)), `F4` equally produces `p`.


title: vim: how do I set :match and :2match search results to different colors?

text: For example, I want something along the lines of:               :match search /<div/ guib=Green     :match search /<\/div>/ guibf=Blue      only that doesn't work.


title: apple-like momentum scrolling in linux?

text: is there a way to make the scrolling on a linux machine (running X11) more like apple's natural scrolling? With 'natural scrolling' I mean the fact that you can flick trough the pages, there is momentum in the scrolling. I have a macbook running Arch Linux and I would like to make the trackpad experience a bit better.


title: Is it good practice to create a background job within an init script if the process can not daemonize itself?

text: I am fairly new to *nix, and have come across the need to drop multiple processes, that should be run 100% of the time. to background using `&`. I use the following line in an init.d script to do this (running as the user `user`: `su -c 'process arg1 arg2 -w - | process2 arg1 -r - &' user` (where -w writes to and -r reads from STDOUT, STDIN) Specifically, I know this is not generally acceptable, as the processes aren't well shielded from outside influence. Is it acceptable to create background jobs for "services?" Should I instead use a FIFO/named pipe to handle the interprocess communication? If so, should I still create both processes as background jobs? Is this stable? For specifics, please refer to this mailing list thread. Thanks, Matt


title: Best Practices for SSH, tmux & GnuPG Agent

text: I'm attempting to consolidate my encryption software to GnuPG, and I'm running into a confusing problem. My primary unit is a headless server, and I exclusively work in tmux. There is no X session, and therefore I've configured gpg-agent to use pinentry-curses. I've configured gpg-agent to be called on login with ssh-agent emulation with this script:               if pgrep -u "${USER}" gpg-agent >/dev/null 2>&1; then         eval `cat $gnupginf`         eval `cut -d= -f1 $gnupginf | xargs echo export`     else                       eval `gpg-agent -s --enable-ssh-support --daemon`     fi      I've already added my ssh key to gpg-agent, however when I attempt another ssh session the command hangs. I've discovered that if I kill gpg-agent and create a new login shell, the agent works as it should (calling pinentry-curses then working like ssh- agent). If, however, I create another login shell (by, say, popping open another tmux pane) and attempt to ssh, the command hangs and the pinentry-curses window is printed over the contents of the login shell that originally launched the agent. Further, if I've closed the shell that originally launched the agent, pinentry-curses is called anyway and causes a cpu-crippling infinite loop. (Known bug, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559936.) In essence, I'd like to know what to change about my setup to make GnuPG agent work as seamlessly as ssh-agent. Thanks for any help!


title: How to do nothing forever in an elegant way?

text: I have a program which produces useful information on `stdout` but also reads from `stdin`. I want to redirect its standard output to a file without providing anything on standard input. So far, so good: I can do:               program > output      and don't do anything in the tty. However, the problem is I want to do this in the background. If I do:               program > output &      the program will get suspended ("suspended (tty input)"). If I do:               program < /dev/null > output &      the program terminates immediately because it reaches EOF. It seems that what I need is to pipe into `program` something which does not do anything for an indefinite amount of time and does not read `stdin`. The following approaches work:               while true; do sleep 100; done | program > output &     mkfifo fifo && cat fifo | program > output &     tail -f /dev/null | program > output &      However, this is all very ugly. There _has_ to be an elegant way, using standard Unix utilities, to "do nothing, indefinitely" (to paraphrase `man true`). How could I achieve this? (My main criteria for elegance here: no temporary files; no busy-waiting or periodic wakeups; no exotic utilities; as short as possible.)


title: Change tmux prefix control keyboard shortcut to alt keyboard shortcut

text: Is it possible to change the _tmux_ prefix keyboard shortcut `ctrl+B` to `alt+B`?


title: Running a command based on output of previous command

text: Consider the following command. I want to echo "yes" if grep has output and echo "no" if grep returns no output. `cat myfile | grep "something"` Can I do this without `if` command?


title: Having Linux port remap to itself

text: I have a scenario: I have 4 server and 3 web inbound requests that I have to allow through a modem/router. the ports are https(ssl)443 ssh22 and http80. All 4 servers want them. I had set up the server to use port forwarding and remapping like this:               2241->port 22 on ip 192.168.0.41     2242->port 22 on ip 192.168.0.42     2243->port 22 on ip 192.168.0.43     2244->port 22 on ip 192.168.0.44          and so on using 44341(..2..3..4) and 8041(..2..3..4)      I love this set up. Behind the firewall I can use default ports ( I prefer this), from outside I can (as I need to) colon:in. However two things happened. The modem old router died I bought a new one (expensive) this new tech didn't allow more than 8 ports to be remapped. Bad. Artificial glass ceiling. I then set it up at the customers offices > I went to the customer theirs didn't even have any port forwarding at all, so I bought them a brand new modem router (even more expensive) fearing it would need to do more than 8 ports, and fearing that this kind of port remapping role is now a "premium" feature. I was wrong. The *even*more* expensive new modem router will only allow the ports to be forwarded flatly, it won't allow the ports to be remapped. just forward them on. SO I digressed massively . But is there a way I can still have port remapping I thought to myself? can I use something like the following to help me?               iptables -t nat -A PREROUTING -i eth0 -p TCP --dport 2202 -j REDIRECT --to-port 22      is there any reason to avoid this use?


title: My VirtualBox Virtual Machine doesn't detect my USB attached disk

text: I'm using the latest version of both Virtual Box (4.1) and CentOS (6.2). I would like my Western Digital USB drive to be recognized by my VirtualBox guest operating system. My host system, Windows 7, recognizes it. It is also recognized when I open the settings of my VM. I've checked both `Enable USB Controller` and `Enable USB 2.0 Controller` and I've installed the Extension Pack for Virtual Box. But when I launch the VM the USB devices icon in the right bottom corner shows " _No USB Devices attached_ " and, of course, no USB drives are detected by CentOS.


title: What is a framebuffer device and is it required to obtain a higher resolution?

text: I am running a gentoo guest OS on qemu-kvm. I can only get resolution of 800x600 in it. I want to be able to get a higher screen resolution. `xrandr` gives the following output : > xrandr: Failed too get size of gamma for output default > > Screen 0: mimimum 640x480, current 800x600, maximum 800x600 `Xorg -configure` fails with segmentation fault : > open /dev/fb0: No such file or directory > > Segmentation fault at address (nil) I am using default vga settings for qemu and lspci shows : > VGA compatible controller: Cirrus Logic GD 5446 So my question is:   1. what is this frame buffer ? Is it required to do Xorg -configure?   2. Is there any other way to increase screen resolution ?


title: Set Transmission as default program when opening magnet links

text: How can I set up Chromium to open Transmission when clicking on a magnet link such as on TPB? Chromium says that it will use xdg-open but that generally doesn't do anything System: Manjaro Linux 0.8.5.2 fully upated Desktop Environment: Xfce 4.10


title: Always redirect error to /dev/null

text: I know I can redirect the error messages from a command to `/dev/null` using the following syntax:               command arg1 arg2 2>/dev/null      But is there a way to do this by default so that the error messages always go to `/dev/null`, unless I specify otherwise?


title: How to use better driver (nouveau) instead of generic VESA with NVIDIA Quadro NVS 140M?

text: I've got laptop with NVIDIA Quadro NVS 140M and have no Gnome-shell which I like very well. I use: > Debian GNU/Linux jessie /sid \n \l When I run Debian as live USB everything works fine. How to get gnome3-shell instead of failback? I've tried to replace dir               /etc/X11      with the one from live USB but this fails. Please help.


title: what does the linux standard base specify about the kernel?

text: I was taking a look at the Linux standard base (lsb) and could not find much interesting info on the kernel. Does the LSB specify anything at all about the kernel or kernel interface? Is it kernel agnostic? By interface I mean things like:   * where does a bootloader look for the kernel? How does the bootloader load the kernel?   * system calls   * kernel module API   * proc and sys filesystems. As @jofel mentioned, there has been some discussion, but it does not seem to be implemented. If it did specifies things like that, then it would be possible to plug in different kernels without problem. Of course, maybe it is too early to thing about those things, since the Linux Kernel dominates LSB systems and sets a de facto standard anyway.


title: How to create as many variables as needed from shell script(bash)?

text: I'm making a script for monitoring some user processes with Upstart but, since its for the company I work for, they asked me to do it generic...how's so? Well, the number of processes being monitored could vary, as in number as in name so I need to create it so a user can input "n" number of processes and give the shell its pathname's so I can store them in variables and pass Upstart a script with them so my question is: how can I create as many variables as needed? Here's my script so far… `./script input`               #!/bin/bash          FILENAME=$1     i=1          while read LINE     do     [rutaServ$i]=$LINE     echo "ruta -> [rutaServ$i]"     i=`expr $i + 1`     done < $FILENAME      As you can see I am taking the pathname provisionally from a plain text file with nothing more than `/home/user` lines in it but, when I run this script I get the following error `[rutaServ1]=/home/user: The file or directory doesn't exists` What is the correct way of doing this?


title: The meaning of Linux Kernel bug output

text: I have a quick, (maybe naive),question about Linux kernel's output. When I issue a command, the system (Ubuntu 12.04) freezes, the serial port output of this system is as follows:               [  373.805067] BUG: soft lockup - CPU#1 stuck for 23s! [migration/1:14]     [  373.805069] BUG: soft lockup - CPU#2 stuck for 23s! [migration/2:19]     [  373.805070] BUG: soft lockup - CPU#3 stuck for 23s! [migration/3:24]      My question is: What does `[migration/1:14]` mean? I know 1 stands for the CPU#1, but I'm confused at the meaning of `14`.


title: grep device name and look for next value :

text: I have this output from a find command:               abc,10.11.13.14,def,1.2.3.4,geh,6.7.54.23      where abc,def and geh are device names and could be of any length and others are IP address belong to devices. Like`abc,10.11.13.14` for device `abc`. IP shall be next to comma delimiter. How can I use sed, grep or awk to print the associated IP when I grep for a device name? In short I want the IP to be displayed next to device name.


title: Is there a way to determine the optimal value for the bs parameter to dd?

text: On occasion I've seen comments online along the lines of "make sure you set 'bs=' because the default value will take too long," and my own extremely- unscientific experiences of, "well that seemed to take longer than that other time last week" seem to bear that out. So whenever I use 'dd' (typically in the 1-2GB range) I make sure to specify the bytes parameter. About half the time I use the value specified in whatever online guide I'm copying from; the rest of the time I'll pick some number that makes sense from the 'fdisk -l' listing for what I assume is the slower media (e.g. the SD card I'm writing to). For a given situation (media type, bus sizes, or whatever else matters), is there a way to determine a "best" value? Is it easy to determine? If not, is there an easy way to get 90-95% of the way there? Or is "just pick something bigger than 512" even the correct answer? I've thought of trying the experiment myself, but (in addition to being a lot of work) I'm not sure what factors impact the answer, so I don't know how to design a good experiment.


title: Building rtmpdump on RHEL x86 without yum and no root rights

text: I have an `ssh` connection to a RHEL x86 machine, and I can't use `yum` and I don't have root rights. Is there a way to still install `rtmpdump`? By looking at this tutorial, it seems that installing `rtmpdump` on CentOS (as I understand, CentOS and RHEL are similar) is pretty easy, but only if you have `yum`? So what are my options?


title: Boot linux from USB, but my medium is corrupt/damaged, what to do?

text: I'm having the following problem. I was installing Linux from USB and during the installation I had a power outage. Now I've apparently broken GRUB and I can't boot from the USB. What to do? I don't have a CDROM/DVD of the installation, only USB. I cannot recover GRUB because I have an apparently empty `(hd0,msdos)` partition(s).


title: Docker: How to get image size?

text: We can search for available image files on the docker website like this:   * https://index.docker.io/search?q=ubuntu How can I tell what the download size(s) will be prior to pulling?               docker.io pull [image]


title: SMTP server that works with gmail?

text: I'm running debian and in the past I used google apps free edition. That is no longer available so I won't be able to use it for my new domain on my new box. In the past when I tried to setup a smtp server I could not send emails to my gmail account. I believe the problem was I didn't have SSL How do I setup a fairly straightforward SMTP server? I need 1 or 2 outgoing email address and I'll want a catchall that forwards a copy to my main email address. I don't know what words to do a search for. Also is it possible to send emails to gmail without a SSL certificate? Perhaps using an IP address instead of a domain? IE me@123.456.789.10 to me@gmail.com?


title: In Fedora, how do I select a proper Norwegian keyboard layout?

text: I just installed Fedora 19 in VirtualBox using an image from virtualboxes.org. However, I'm unable to select a proper Norwegian keyboard. When I open the keyboard layout, it shows an US layout. A Norwegian layout should have Æ, Ø, Å keys and a lot of other stuff. ![Keyboard Layout](http://i.stack.imgur.com/cBjyu.png)


title: How to show CPU time for processes via top without 'root' procs

text: Okay, So I've been attempting this for about three hours now without success. How do you search/display/use the `top` command (or `ps` command if it works...) to output a list of all procs, sorted by CPU time Excluding procs owned by 'root'. My attempts so far:               top -b -S -n 1 | grep -v root     top -b -S -n 1 | egrep -ve root          ps -eo pid,user,args,etime,time,%cpu --sort etime | egrep -v root      That and various attempts at running top in batch mode, outputting to a file and attempting to `awk/grep/sort` through it and sort it properly by the amount of CPU time (mostly unable to find the right column / manage to sort the right column in any seemingly useful way). Forgive me if that seems a bit of a muddle; tl;dr: I just want some way to easily read top without root procs and sorted by CPU time.


title: UEFI install (14.04) boots to GRUB command prompt, no GUI

text: I just installed zorin 9 core (14.04) on my Hard-Disk in UEFI mode. But, when I boot, all that comes up is a GRUB2 command line. I've searched for solution and came up with this command `configfile (hd0,2)/boot/grub/grub.cfg` and it boots just fine. This command was from arch-linux and they said to copy the grub.cfg to the efi partition, but i dont know exactly what to copy or if i'm even in the right place. they also mentioned `"grub-mkimage"` but i'm not that much of an advanced user to get what all they were saying. could i just create a startup script that has that command in it? Here is the link - GRUB 2 showing prompt instead of menu.


title: Find the maximum length of characters in a field

text: Can you tell me how to find the maximum length of characters in a given field? For instance, with this input file:               s.no,name     1,ATM     35,money     63,back      The maximum length in field 1 is 2. So, I want the output to be:               s.no,name     01,ATM     35,money     63,back      Here, we just add the zeros before number if it is <2\. Please help me.


title: Solaris 10 IPMP and zones

text: Is there a way to have an IPMP group Virtual IP only be assigned to a none global zone ? The reason I ask is the need to reduce the number of IP addresses, as we only have so many spare. If I have an IPMP group in my global zone and then wish to use that IPMP group in a none global zone- I believe I need 4 IP addresses , 3 for the GZ and 1 for the NGZ. Is there any way I can use IPMP in a NGZ using just the 3 IP addresses ?


title: `wait` doesn't wait for `wget --background`

text: I have gone through several SE posts on the unix wait command and none of the posts resolve my problem. I have a weather forecast model to run. It has first to prepare some folders, then download data using wget, then run the forecast. The data download can take anything up to 30-60 minutes due to low speed. What happens is that when the data download starts the program goes ahead to run commands before the data is ready. Below is my crontab entry to start the run               15 09 * * * /bin/bash /home/zmumba/WRF/SCRIPTS/wrf_run_00.sh &      This is to run at 09 15 everyday, every week and every month. The files to run in wrf_run_00.sh are               !/bin/bash     year=`date "+%Y"`     month=`date "+%m"`     day=`date "+%d"`      source /home/zmumba/.bashrc          perl /home/zmumba/WRF/SCRIPTS/wrf_Namelists_and_Dirs_00_Daily.pl     perl /home/zmumba/WRF/SCRIPTS/download-file_gen00.pl          wget --directory-prefix=/home/zmumba/WRF/DATA/${year}${month}${day}00 --background --continue --progress=bar --input-file=/home/zmumba/WRF/SCRIPTS/download-file-list-one_deg_00.txt           wait$!          cd /home/zmumba/WRF/WPS      and the rest of the commands to run the model follow. Any assistance will be appreciated.


title: Ubuntu under VirtualBox 4.3.12 r93733 run slow on Windows7 with AVG free 2011

text: Ubuntu VM **speed is subjectively 5 to 10 times slow**. Tried setting CPU number, PIIX3/ICH9, Display 3D acceleration. Still slow. Any pointers appreciated. VirtualBox installed with all default setting. Ubuntu 14.04 Desktop installed as the only VM. In separate test, Ubuntu run fine as USB Stick LIVE (without install to hard disk) Intel i5, 2.8GHz, 4 cores, 4G RAM, Windows 7 At first, installed latest VirtualBox 4.3.14. Run error. Web postings refers to bug ticket stating that it conflicts with several anti virus software and recommend use 4.3.12 and I did that. It **runs slow. Tested a few functions, seem ok**.


title: grep: match pattern on a particular position

text: I need to match a pattern with grep, only if it starts at position 16. Lets suppose I want to match the string `' pattern'` (starting with space) the following should match               bla bla bla bla pattern      whereas following should not match, because the search pattern does not start at pos. 16:               bla bla bla bla foo foo pattern      I have tried using regular expression               egrep '.*\{15\} pattern'      but this does not seem to work as desired. Can somebody please suggest a solution?


title: Symlink all subdirectories in a directory to another directory

text: I'm trying to symlink every directory in a folder to another folder. For example, in the structure below, I need the subfolders symlinked to folder2.               - /home/chris/folder1     -- subfolder1     -- subfolder2          - /home/john/folder2     -- subfolder1     -- subfolder2      This is what I have tried so far, but my bash skills are rusty and this does not work.               find /home/chris/folder1 -type d -maxdepth 1 -mindepth 1 -exec ln -s {} /home/john/folder2/{} \;


title: . (dot) shows up as path separator

text: I'm hunting a really strange bug:               arian@orel:~$ ls ._cache.<tab><tab>     Display all 205 possibilities? (y or n)     ._cache.apt-file/     ._cache.chromium/     ._cache.chromium.Default/     ._cache.chromium.Default.Cache/     ._cache.chromium.Default.Media Cache/     ._cache.dconf/     ._cache.evolution.mail/     ._cache.evolution.mail.1370283652_17412_21@orel/     ._cache.evolution.mail.1370283652_17412_21@orel.folders/     ._cache.evolution.mail.1370283652_17412_21@orel.folders.Archives/     ._cache.evolution.mail.1370283652_17412_21@orel.folders.Archives.subfolders/     ...      it's like the dot acts as a path separator, except tab completition does not treat it as a path separator and displays the directory recursively. I've seen this behaviour only in this directory. Neither in parent nor child directories and it's not on a separate filesystem. This also shows when accessed from installation media, so seems not to be my operating system. Also shows when accessing via sshfs. `ls` and `find` only show normal paths, but `du` does also show these period-stuff. I did fsck on the FS I noticed a file named               playlist.pls\?action\=playlist\&type\=pls\&sid\=545\&stream_id\=1711      in the directory. on moving this somewhere else, the behaviour vanished. So it seems there is some bug in handling these characters, right? Well, I can chdir where I moved the file, create some files and directories and this behaviour did not show up. I `touch`ed some files with `\&`,`\?` and `\=` and combinations in their names, with normal behaviour. I moved the `playlist.pls\?action\=playlist\&type\=pls\&sid\=545\&stream_id\=1711` file back and no abnormal behaviour showed up. I am not really sure on what to do here. There is some bug for sure, at least fsck should detect possible error on disk if all code worked correctly, right? I have also no idea what code is faulty. I could not reproduce this bug once I moved said file.


title: Merging Kali with Tails

text: I want to get into Linux penetration testing, but still want to have the benefits from anonymous surfing. Is it possible to setup a good and 'secure' (Yes I know, TOR!=security, blabla) merge from `Kali` and `Tails`, starting with `Kali`?   And how?


title: Chrome OS on non chrome hardware

text: I want to see how it is to hi a on `Chrome OS` for a week, so how can I install a fairly up to date Chrome system on my hardware? I know it may not be supported, so is there projects that work like it with similar `UI`? Also what kernel is Chrome running on?


title: Wireless driver issue slowing and sometimes freezing pc on start up

text: Can anyone tell me how to remove this start up error message or fix it? lspci: > 02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n > Wireless LAN Controller (rev 01) Currently when I boot up my laptop which is a : Lenovo G580 I get the BIOS then a black screen, then off screen then this: > [ 9.625943] Support for cores revisions 0x17 and 0x18 disabled by module > param allhwsupport=0. Try b43.allhwsupport=1


title: Taking away a User's Read/Write/Execute Permission

text: So I have a user that is able to go in `/etc` and read files like `httpd.conf`. I would like to deny that user access to any critical locations such as `/etc`, `/var` and so on. What would be the best way to do so? I don't really want to modify my whole folder/file permission just for one user.


title: Limit CPU and memory usage for PHP-FPM and Nginx processes in CentOS

text: I want to limit CPU and memory usage for PHP-FPM and Nginx processes in CentOS. I came across following tools   * cpulimit    * cggroups   * memory resource locater which will more efficient and how can I configure for limiting resources for PHP-FPM and Nginx processes ?


title: Extra bridge interfaces get added automatically

text: I have a bridge set up between `eth0` and `br0`, the bridge works fine, but sometimes, for unknown reasons and circumstances, I keep getting these off vethXXXXXX interfaces added to the bridge. When this happens my LXC instances can't talk to the internet. When I run `brctl delif br0 vethNbUtXk && brctl delif br0 vethYqTf0F`, all is well again. Any idea where these odd looking interfaces are coming from?               root@ubuntuserver:/var/lib/lxc# brctl show     bridge name     bridge id               STP enabled     interfaces     br0             8000.080027ca5f7a       no              eth0                                                             vethNbUtXk                                                             vethYqTf0F     lxcbr0          8000.000000000000       no     virbr0          8000.000000000000       yes      Example ifconfig when one of these odd vethXXXXXX adapters got created               vethPBkvAC Link encap:Ethernet  HWaddr fe:14:5c:cb:62:d6               inet6 addr: fe80::fc14:5cff:fecb:62d6/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:3194 errors:0 dropped:0 overruns:0 frame:0               TX packets:3214 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:309019 (309.0 KB)  TX bytes:311213 (311.2 KB)


title: Decrypting a file encrypted on a different system

text: My home server runs OpenBSD 5.3 with Samba serving files to several Windows machines. I wrote a script to backup video files by encrypting each file with `openssl enc -aes-256-cbc` and uploading it to Amazon S3. To test one possible restore scenario, I tried running the script on a file, downloading the file to one of the Windows machines, and decrypting it using several programs advertised as decrypting AES-encrypted files, but they weren't able to decrypt it. Can a file encrypted by OpenSSL be decrypted only by OpenSSL? Can a file encrypted by OpenSSL on OpenBSD be decrypted only by OpenSSL on OpenBSD? For the record, I had no problem downloading the file to my server and decrypting it using OpenSSL. However, I'm interested in knowing if my videos on S3 (quickly archived to Glacier) can remain accessible regardless of my choice of server setup.


title: Unable to install Texmaker on Gentoo 3.8.13

text: I am using Gentoo 3.8.13 x86_64. I am trying to install Texmaker but I am facing some problem. ## emerge -av texmaker These are the packages that would be merged, in order:               Calculating dependencies... done!          [ebuild  N     ] dev-libs/kpathsea-6.1.0_p20120701  USE="-doc -source -static-libs" 128,853 kB     [ebuild  N     ] app-text/dvipsk-5.992_p20120701  USE="-doc -source" 94 kB     [ebuild  N     ] app-text/ps2pkm-1.5_p20120701  0 kB     [ebuild  N     ] sys-apps/ed-1.6  85 kB     [ebuild  N     ] dev-tex/bibtexu-3.71_p20120701  0 kB     [ebuild  N     ] dev-qt/qtxmlpatterns-4.8.4:4  USE="(-aqua) -c++0x -debug -pch" 0 kB     [ebuild  N     ] media-libs/netpbm-10.51.00-r2  USE="jpeg png tiff xml zlib -X -jbig -jpeg2k -rle (-svga)" 1,800 kB     [ebuild  N     ] app-text/psutils-1.17-r2  40 kB     [ebuild  N     ] virtual/perl-Getopt-Long-2.380.0-r2  0 kB     [ebuild   R    ] dev-libs/libxml2-2.9.1-r1:2  USE="ipv6 python readline -debug -examples -icu* -lzma -static-libs {-test}" PYTHON_TARGETS="python2_7 python3_2 -python2_5 -python2_6 -python3_1 (-python3_3)" 0 kB     [ebuild   R    ] app-text/poppler-0.22.2-r2:0/35  USE="cairo cxx introspection jpeg lcms png qt4* tiff utils -cjk -curl -debug -doc -jpeg2k" 0 kB     [ebuild  N     ] dev-qt/qtwebkit-4.8.4:4  USE="exceptions gstreamer jit (-aqua) -debug -icu -pch" 0 kB     [ebuild  N     ] app-text/texlive-core-2012-r1  USE="-X -cjk -doc -source -tk -xetex" 998 kB     [ebuild  N     ] dev-texlive/texlive-documentation-base-2012  USE="-source" 1,441 kB     [ebuild  N     ] dev-libs/zziplib-0.13.60-r1  USE="sdl -doc -static-libs {-test}" 670 kB     [ebuild  N     ] dev-tex/luatex-0.70.1-r2  USE="-doc" 9,014 kB     [ebuild  N     ] dev-texlive/texlive-basic-2012  USE="-doc -source" 5,190 kB     [ebuild  N     ] dev-texlive/texlive-fontutils-2012  USE="-doc -source" 215 kB     [ebuild  N     ] dev-texlive/texlive-latex-2012  USE="-doc -source" 889 kB     [ebuild  N     ] dev-texlive/texlive-latexrecommended-2012-r1  USE="-doc -source" 6,631 kB     [ebuild  N     ] virtual/latex-base-1.0  0 kB     [ebuild  N     ] app-office/texmaker-4.0.1  12,760 kB          Total: 22 packages (20 new, 2 reinstalls), Size of downloads: 168,674 kB          !!! Multiple package instances within a single package slot have been pulled     !!! into the dependency graph, resulting in a slot conflict:          dev-libs/libxml2:2       (dev-libs/libxml2-2.9.1-r1::gentoo, ebuild scheduled for merge) pulled in by         dev-libs/libxml2:2[!icu?] required by (dev-qt/qtwebkit-4.8.4::gentoo, ebuild scheduled for merge)            (dev-libs/libxml2-2.9.1-r1::gentoo, installed) pulled in by         dev-libs/libxml2:2/2=[icu] required by (www-client/chromium-28.0.1500.95::gentoo, installed)         dev-libs/libxml2:=[icu] required by (www-client/chromium-28.0.1500.95::gentoo, installed)      It may be possible to solve this problem by using package.mask to prevent one of those packages from being selected. However, it is also possible that conflicting dependencies exist such that they are impossible to satisfy simultaneously. If such a conflict exists in the dependencies of two different packages, then those packages can not be installed simultaneously. You may want to try a larger value of the `--backtrack` option, such as `--backtrack=30`, in order to see if that will solve this conflict automatically. For more information, see MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook. Can anyone suggest me, how can I solve this problem?


title: Tiny font on Fedora 16

text: I'm finding that several programs have tiny font with Fedora 16. Google Chrome, for example, has miniscule font in the tabs. MATLAB has tiny font in the menus (File, Edit, etc.) I have the "larger font" accessibility option enables, but it doesn't affect these programs. On Windows, "larger font" does improve the font sizes of these programs. What can I do about this?


title: Setting repeat rate of USB keyboard automatically

text: I often connect a USB keyboard to my laptop, and when I plug it in, the default repeat rate is not what I want. I tried changing it using a `udev` script by adding a rule               `ACTION=="add", ATTRS{name}=="Dell Dell Multimedia Pro Keyboard", RUN+="set-keyboard.sh"`      with the `set-keyboard.sh` script calling               xset -display :0 r rate 500 50; xset -display :0 b off      The problem is that this sets the repeat rate and beep of the laptop built-in keyboard, not the USB keyboard. (That is, if I type `xset q` on the built-in keyboard, it shows the right settings, but if I type `xset q` on the USB keyboard, it's still set to the wrong rate.) Is there a way to let `xset` know which keyboard to set, or some other way to go about this?


title: Very weak wireless connection on Debian live image install

text: I'm having a problem with the wireless connection on a fresh install of Debian 7.4 which I didn't have before, I had Debian installed before and WiFi was working great, the only thing that changed this time is installing it from a live install image instead of the CD/DVD images. My wireless card is **Atheros AR5005G** , and ath5k is already installed. I'm trying to fix this problem and I searched about the issue but everything I found was about increasing `txpower` using `iwconfig` or setting `power` to `off` which is already off in my case. So what could be the problem:   * I remember that it was working fine on an old Debian distribution which had the madwifi driver   * I'm dual booting Debian with Windows and on windows it's working fine   * My laptop connects to the router without any problems   * I had a live USB using the same image which had the same problem   * I didn't have this problem before when I installed from the regular CD/DVD images   * I have to be very close to the router to be able to access the internet   * Pinging the router or any website takes a long time with many lost packets   * 408 (Request Timeout) errors occur while browsing Running `lspci -v` shows:               0a:03.0 Ethernet controller: Atheros Communications Inc. AR2413/AR2414 Wireless Network Adapter [AR5005G(S) 802.11bg] (rev 01)         Subsystem: AMBIT Microsystem Corp. Device 0418         Flags: bus master, medium devsel, latency 168, IRQ 18         Memory at d0000000 (32-bit, non-prefetchable) [size=64K]         Capabilities: [44] Power Management version 2         Kernel driver in use: ath5k      **Update** : Here are the `dmesg` related messages:               ...     [7.485709] ath5k 0000:0a:03.0: registered as 'phy0'     ...     [8.429871] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'     [8.430578] ath5k phy0: Atheros AR2413 chip found (MAC: 0x78, PHY: 0x45)      And this is the full output of `dmesg` on pastebin.


title: How to search, replace and append a pattern to the end of each line

text: I have the following list of items:               bigBone     fishMarket     dogCollar     ...      I need to generate a two character mapping like this:               bigBone -> bb     fishMarket -> fm     dogCollar -> dc     ...      How can I create the above mapping using `sed`? I have tried something like:               sed -i -r 's/^([a-z]{1})[a-z]+([A-Z]{1})[a-zA-Z]+/ -> \1\L\2/' file      I saw this question, but not sure how to incorporate the concept here. Thanks.


title: Why can yum still not update GCC 4.9.0?

text: GCC 4.9.0 has been released since April 22. However, I can still not update it through the following command:               $yum update gcc      Why does the yum repository lag so much behind gcc.gnu.org?


title: How can I change 'change' date of file?

text: How can I change 'change' date?               $ touch -t 9901010000 test;stat test       File: `test'       Size: 0           Blocks: 0          IO Block: 4096   regular empty file     Device: fe01h/65025d    Inode: 11279017    Links: 1     Access: (0644/-rw-r--r--)  Uid: ( 1000/    x)   Gid: ( 1000/    x)     Access: 1999-01-01 00:00:00.000000000 +0100     Modify: 1999-01-01 00:00:00.000000000 +0100     **Change: 2012-04-08 19:26:56.061614473 +0200**      Birth: -


title: Linux Mint 16 (Petra) returns always to login screen when shutdown

text: I've installed a Mint 16 Cinnamon on my notebook. When I want to shutdown or restart the system, Mint returns to, and stays at, the login screen. Does somebody know such a behaviour?


title: How umask is calculated in Linux?

text: So I know `umask` can restrict privileged users, using this format `umask ugo`. I understand that the read = 4, write = 2, and exec = 1. However, when I type `umask`, it returns 4 digits which is `0022` or `0073`. I have no understanding of how does this work now because there is an extra digit. What is that extra digit and what does `0022` mean? Note: Migrating this question that will be closed from Stackoverflow per this recommendation.


title: Multiple SSH private keys, possible?

text: Is it possible to have multiple SSH key in a single client, and let ssh choose the right one automatically?


title: what is `firewalld --nofork`

text: I carelessly killed the following process               root       470     1  0 Jun06 ?        00:00:13 /usr/bin/python /usr/sbin/firewalld --nofork      Is there any consequence from killing the process? Are there any ways to restart it?


title: Is there a BSD operating system that can be booted off a logical drive partition?

text: From several BSD operating systems' documentation, there is a requirement for it to be booted off a primary partition. Is there any BSD that can be booted off a logical partition in some indirect manner? If not, what is/are the technical reason(s)?


title: sudo command after long sleep call without re-prompting sudo password

text: I'm trying to write a simple bash function that sleeps X-number of mins and then runs a system sleep command (for me it's `sudo pm-suspend` since I'm on Ubuntu) right now the function looks like this:               function sleepin {       sleep $(bc <<< $1*60); sudo pm-suspend     }      The first argument is after how many mins the sleep is supposed to happen. The problem is that after the sleep the script prompts me for the sudo password. ### How should I re-write the script so that it doesn't prompt me for the sudo password after the sleep? (I've tried to call `sudo sleepin 30` but it still prompts me for the password. Note that if the sleep call is small enough bash doesn't prompts for password, but for a longer sleep it will..)


title: How to add mimetype bindings?

text: I got an error message when launching "xdg-open" , `No applications found for mimetype: inode/mount-point` How should I add a binding for "dolphin" ?


title: maldet and possible false positives?

text: I have been using `maldet` for many months and it's worked fine up until now. As of about a week ago, it is detecting a mass `{HEX}PHP.Bypassshell` in nearly every PHP file. I even downloaded a clean copy of Joomla 3 and it still detected that within the PHP files. Any thoughts on what the problem could be? Sample results: > malware detect scan report for xxxxxxxx: SCAN ID: 072513-1957.12823 TIME: > Jul 25 19:58:04 -0400 PATH: /home/xxxxx/public_html/testnew/ TOTAL FILES: > 5549 TOTAL HITS: 361 TOTAL CLEANED: 0 > > NOTE: quarantine is disabled! set quar_hits=1 in conf.maldet or to > quarantine results run: maldet -q 072513-1957.12823 FILE HIT LIST: > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/templates/hathor/html/com_categories/categories/default.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/templates/hathor/html/com_menus/items/default.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/templates/hathor/html/layouts/joomla/edit/details.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/components/com_cache/models/cache.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/components/com_cache/controller.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/components/com_content/models/article.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/administrator/components/com_content/models/fields/modal/article.php > .......... {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/form/field.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/form/fields/color.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/form/fields/checkbox.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/form/fields/databaseconnection.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/form/fields/note.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/form/rule.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/oauth1/client.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/session/storage.php > {HEX}PHP.Bypassshell : > /home/xxxxxx/public_html/testnew/libraries/joomla/profiler/profiler.php > ..........


title: No mouse and close/maximize button Elementary OS

text: I've downloaded and installed Elementary OS in my laptop, but something weird is happening with me. I made an USB Flash Drive installation, using UNetbootin. I was able to test it (like a Live-CD) and everything went just fine. So I decided to install it. When I installed it, these bugs started to happen:   * The mouse pointer takes ~30 seconds to appear (i'm still able to click things), and when it does, all I see is an "X" on my screen. Perhaps this is the standard mouse pointer, right?   * When I try to close or maximize a window, the top bar with these options just doesn't exists. I'm able to drag the window across the screen, but when I double-click (hoping the window will maximize), the system stops working for a while, and then the window crashes.   * I've tested Elementary OS before installing. When I click something in the Plank, a small animation starts playing. This doesn't happen in the installed version. There are other things happening, but these are the "main bugs" I can remember now. I tried to do these:   * I tried reinstalling the system. Still the same.   * I tried to update the system. 100mb of updates, and the bugs didn't go away.   * A friend of mine asked me to type "sudo apt-get update" and "sudo-apt get upgrade" in the terminal. Still the same. Since I've always been a Windows user, I don't know why this is happening and neither I know how can I fix this. My laptop config is: Dell Inspiron 14R (5420), Core i7 3612QM 2.10GHz, 8GB RAM, nVidia 630GT 1GB and 1TB storage. Any thoughts?


title: Mounted volume name in terminal is different from in GUI

text: The basic problem is that in the GUI shows a directory name with no space but when I cd to it in the terminal, the directory name has a space in it. What would cause the names to be different? The full story is: I have been trying to backup my computer to a WD hard drive that I was previously using when I used Windows. When I initially mounted the hard drive it named itself "My Book". I changed the name of the mounted file to MyBook through GParted as explained on Ubuntu Wiki. I also reformatted the hard drive file system to ext3. I navigated to the media directory where it is now mounted, and the directory name was still "My Book". So I changed the name from the command line with (also according to the instructions on Ubuntu Wiki). The directory name still has a space in the terminal but not in the GUI. I am using Ubuntu 14.04. More info: I ran the 2 commands requested by mikeserv. ~>$ lsblk -f               NAME   FSTYPE LABEL        MOUNTPOINT     sda                             ├─sda1                     /     ├─sda2                          └─sda5                     [SWAP]     sdb                             └─sdb1                     /media/cynthia/MyBook     sr0                             sr1    udf    WD SmartWare /media/cynthia/WD SmartWare      ~>$ findmnt               TARGET                        SOURCE                           FSTYPE   OPTIONS     /                             /dev/disk/by-uuid/1871174a-d18f-4f97-921c-428a917e4851                                                                    ext4     rw,relat     ├─/sys                        sysfs                            sysfs    rw,nosui     │ ├─/sys/fs/cgroup                                             tmpfs    rw,relat     │ │ └─/sys/fs/cgroup/systemd  systemd                          cgroup   rw,nosui     │ ├─/sys/fs/fuse/connections                                   fusectl  rw,relat     │ ├─/sys/kernel/debug                                          debugfs  rw,relat     │ ├─/sys/kernel/security                                       security rw,relat     │ └─/sys/fs/pstore                                             pstore   rw,relat     ├─/proc                       proc                             proc     rw,nosui     │ └─/proc/sys/fs/binfmt_misc  binfmt_misc                      binfmt_m rw,nosui     ├─/dev                        udev                             devtmpfs rw,relat     │ └─/dev/pts                  devpts                           devpts   rw,nosui     ├─/run                        tmpfs                            tmpfs    rw,nosui     │ ├─/run/lock                                                  tmpfs    rw,nosui     │ ├─/run/shm                                                   tmpfs    rw,nosui     │ └─/run/user                                                  tmpfs    rw,nosui     │   └─/run/user/1000/gvfs     gvfsd-fuse                       fuse.gvf rw,nosui     ├─/media/cynthia/WD SmartWare /dev/sr1                         udf      ro,nosui     └─/media/cynthia/MyBook       /dev/sdb1                        ext3     rw,nosui


title: Filtering the result of the find command, so that it returns only directories

text: Is it possible to get only the results from find that are directory paths? Using find with some option, or using grep or some other utility the results are piped into as a filter? I thought something like `find | grep */$` might work, but it doesn't. From some other testing where I "grepped for" a folder with a specific name it seems like I get a hit for `folder_name$` but not for `folder_name/$`. This seems conterintuitive. How can I grep for lines that end with `/`?


title: How can you schedule a computer to boot at a specific time?

text: Usually BIOSes have an option to schedule a time to which to boot at. Is there a Unix/Linux interface to specify the scheduled boot?


title: Is there any other way to use tail -f for grep -q && operation?

text: I found this solution: http://stackoverflow.com/questions/7178888/grep-q-not- exiting-with-tail-f but is there any other possible? UPD: I want to do `tail -f | grep -q something && echo 'found!'` but it doesn't work because tail -f prevents pipe from being closed, so `echo` command don't have a chance to be executed.


title: Fedora 17: plugged in iphone, but nothing happens

text: The title says it all but to expand a bit; I upgraded to fedora 17 from a fresh install. On f16, I had an issue mounting when they had the issue with the lockdown, but I was able to resolve that. Seems like a different mounting issue is occurring, although this time, no error messages even pop up to give me an indication on where to begin. I believe I have all the necessary libraries (ifuse, gtkpod, libimobiledevice, gfvs, etc..) relevant info from `dmesg`:               [  374.543085] fuse init (API version 7.18)     [  374.577633] SELinux: initialized (dev fuse, type fuse), uses genfs_contexts     [  374.628339] SELinux: initialized (dev fusectl, type fusectl), uses genfs_contexts     [  387.773718] SELinux: initialized (dev proc, type proc), uses genfs_contexts     [  451.292158] usb 1-4: new high-speed USB device number 5 using ehci_hcd     [  451.409558] usb 1-4: New USB device found, idVendor=05ac, idProduct=129c     [  451.409572] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [  451.409583] usb 1-4: Product: iPhone     [  451.409591] usb 1-4: Manufacturer: Apple Inc.     [  451.409598] usb 1-4: SerialNumber: c8f6b8e7a41a3b70c5f4ad2959e712a6b230631f     [  452.066930] ipheth 1-4:4.2: Apple iPhone USB Ethernet device attached     [  452.068094] usbcore: registered new interface driver ipheth     [  452.147433] ADDRCONF(NETDEV_UP): eth0: link is not ready     [  558.884407] SELinux: initialized (dev proc, type proc), uses genfs_contexts     [ 1651.445841] usb 1-4: USB disconnect, device number 5     [ 1651.458101] ipheth 1-4:4.2: Apple iPhone USB Ethernet now disconnected     [ 1655.071163] usb 1-4: new high-speed USB device number 6 using ehci_hcd     [ 1655.190166] usb 1-4: New USB device found, idVendor=05ac, idProduct=129c     [ 1655.190180] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [ 1655.190191] usb 1-4: Product: iPhone     [ 1655.190198] usb 1-4: Manufacturer: Apple Inc.     [ 1655.190206] usb 1-4: SerialNumber: c8f6b8e7a41a3b70c5f4ad2959e712a6b230631f     [ 1655.303304] ipheth 1-4:4.2: Apple iPhone USB Ethernet device attached     [ 1655.459916] ADDRCONF(NETDEV_UP): eth0: link is not ready      `lsusb`:               Bus 001 Device 006: ID 05ac:129c Apple, Inc.      * * * > **Solution:** > > https://bugzilla.redhat.com/show_bug.cgi?id=815491#c2 > > Per the bugzilla for this issue, there is a comment saying that the > 1.0.8-2.fc17 has the fix in it. However, until this fix is pushed, you can > fix it by editing: `lib/udev/rules.d/85-usbmuxd.rules` > > and changing: `OWNER="usbmux"` to `OWNER="usbmuxd"` > > and this solved it for me.


title: How to place the toolbar to the top in fluxbox?

text: The default location of toolbar is in the bottom of the screen. Is it possible to place it to the top instead?


title: How can I increase the acceleration of the mouse wheel via xinput?

text: I have a Microsoft wireless USB mouse whose scroll wheel seems to have absolutely no acceleration whatsoever on Linux. On Windows and OSX, the faster I scroll, the faster the page scrolls, and vice versa. I managed to use xinput to change the mouse sensitivity settings following this guide, and it worked great. But when I follow the same steps to change the mouse wheel settings, nothing seems to change. Here is the output of `$ xinput --list-props` on my device:               Device 'Microsoft Microsoft® 2.4GHz Transceiver v8.0':         Device Enabled (133):   1         Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000         Device Accel Profile (259): 0         Device Accel Constant Deceleration (260):   1.000000         Device Accel Adaptive Deceleration (261):   1.500000         Device Accel Velocity Scaling (262):    0.125000         Device Product ID (250):    1118, 1970         Device Node (251):  "/dev/input/event2"         Evdev Axis Inversion (263): 0, 0         Evdev Axes Swap (265):  0         Axis Labels (266):  "Rel X" (143), "Rel Y" (144), "Rel Horiz Wheel" (256), "Rel Dial" (257), "Rel Vert Wheel" (258)         Button Labels (267):    "Button Left" (136), "Button Middle" (137), "Button Right" (138), "Button Wheel Up" (139), "Button Wheel Down" (140), "Button Horiz Wheel Left" (141), "Button Horiz Wheel Right" (142), "Button Side" (254), "Button Extra" (255), "Button Unknown" (253), "Button Unknown" (253), "Button Unknown" (253), "Button Unknown" (253)         Evdev Middle Button Emulation (268):    0         Evdev Middle Button Timeout (269):  50         Evdev Third Button Emulation (270): 0         Evdev Third Button Emulation Timeout (271): 1000         Evdev Third Button Emulation Button (272):  3         Evdev Third Button Emulation Threshold (273):   20a         Evdev Wheel Emulation (274):    0         Evdev Wheel Emulation Axes (275):   0, 0, 4, 5         Evdev Wheel Emulation Inertia (276):    10         Evdev Wheel Emulation Timeout (277):    200         Evdev Wheel Emulation Button (278): 4         Evdev Drag Lock Buttons (279):  0      I've modified properties 274 to 278, but no changes resulted. My distribution is Debian Linux, desktop environment is Xfce, and computer is a Lenovo Thinkpad X201, though this problem seems to only be specific to this mouse rather than any of those things. Am I missing something via the xinput method, or should I try something else entirely? edit: I should specify that I am trying to _increase_ the speed of the mouse wheel, preferably via acceleration, as scrolling is painfully slow at the moment.


title: How to escape spaces etc in passed variable, for system call to cp in awk

text: As the title suggests, this problem has enough layers of complexity to make simple escaping characters difficult for me. I have a bash script which, for a large part, has an embedded awk script that reads a file delimited by semicolons. In this text file, one of the fields is a directory path to some JPEGs. I'd like to copy the JPEGs somewhere else, but the original directory path has spaces in it (and could potentially have other strings that could do damage). I can't refer to the directory in question with single quotes because this stops the awk interpreter, and double quotes turns it into a literal string in awk. I'm using gawk 4.1.1. Here's some awk code of what I'm trying to accomplish:               imageDirectory = $1;     cpJpegVariable="cp -r " imageDirectory " assets";     #screws up if imageDirectory has spaces and other naughty characters     system(cpJpegVariable);


title: Mint fan control

text: I've installed Mint 15 on my Alienware m14x and can't figure out one thing. For some reason CPU overheats and fan does not respond to that. It always stays calm and quiet. How exactly I can change that? ![enter image description here](http://i.stack.imgur.com/jEvUW.png)


title: Trust a self signed PEM certificate

text: 1. I have set up a proxy server with SSL using a PEM certificate. Now, there is a couple of machines of mine that I would like to trust this certificate automatically (without the web browser complaining). How can I install a PEM certificate on each machine?   2. Also, what is more recommended: generating a self signed certificate or concatenating the snakeoil certificate?


title: How to I scan using find for all files that do have execute bit set?

text: I want to write a permission fix script that uses find to fix permissions on files. Mainly what I need is a find command that is able to list all files with execute bit set, regardless of the other permissions on the file (that's the trick).


title: Need to create a ksh script for transferring files between application server and db server

text: I have a requirement where I need to automate the transfer of a particular file from one location in the application server to the database server. I can do it manually by using these steps but I need it in the script               #! /bin/ksh          directory path where the file need to be          ftp (hostname of the application server)           username           password          file location in the apps server          get filename          quit      Any help is really appreciated.


title: Have grep output spaced for each file

text: When I do grep on a bunch of files, and several file have the word I am looking for, the output is hard to read as it's one after the other. Is there anyway to insert additional \n's after the matching output of each file. Example, current output what I get               $ grep word daily_log.201407*     <daily_log.20140702-matches  about 100 lines>     <daily_log.20140704-matches  about 10 lines>     <daily_log.20140706-matches  about 50 lines>      Trying to achieve something like               $ grep word daily_log.201407*     <daily_log.20140702-matches  about 100 lines>               <daily_log.20140704-matches  about 10 lines>               <daily_log.20140706-matches  about 50 lines>      Hope the question is clear. Any way to do this?


title: What command do I use to see the start and end block of a file in the file system?

text: Is there any command that will output the beginning and ending blocks of any file?


title: What is the PKG_PATH for NetBSD 6.0.1 Binary Installs?

text: What is the value or URL for `PKG_PATH` used to inform NetBSD 6.0.1 where to download binary packages from? There seems to be a change in both servers as well as the path or directory layout for the packages directory. I have tried and failed to figure it out. I am using NetBSD on an `i386` architecture.


title: How to make fonts look similar to windows on Slackware 14 with KDE?

text: I am having a hard time reading anything. I've had to increase the text size to in same amounts that take up most of my 23 inch monitor... So far I've done some of the things suggested on http://duganchen.ca/writings/slackware/fonts/ It didn't really help much, but taxing my eyes like this is very hard.


title: Partitioning correctly for GPT in BIOS system

text: I am in doubt whether I have partitioned my hdd correctly as GPT on a BIOS motherboard. I used _gparted_ to partition and I don't know if I aligned the beginning/end of the disk correctly, used correct flags etc. The disk in question is `sdc`:                   $ sudo lsblk -f     NAME   FSTYPE LABEL           MOUNTPOINT     sda                                ├─sda1 ntfs   System Reserved      ├─sda2 ntfs   win7                 └─sda3 ntfs   WINYANCI             sdb                                ├─sdb1                             └─sdb5 ext4   YAHSI                sdc                                ├─sdc1                             ├─sdc2 swap                   [SWAP]     ├─sdc3 ext4                   /     ├─sdc4 ext4                   /home     ├─sdc5 ext4   store1               └─sdc6 ntfs   store2               sdd                                ├─sdd1                             ├─sdd2 ntfs   DEPO                 └─sdd5 ntfs   HUSUSI               sr0        here is what `gdisk` shows:               $ sudo gdisk /dev/sdc     GPT fdisk (gdisk) version 0.8.8          Partition table scan:       MBR: protective       BSD: not present       APM: not present       GPT: present          Found valid GPT with protective MBR; using GPT.          Command (? for help): p     Disk /dev/sdc: 1953525168 sectors, 931.5 GiB     Logical sector size: 512 bytes     Disk identifier (GUID): 2758BB06-C7E7-451B-9C92-F1B278721BB6     Partition table holds up to 128 entries     First usable sector is 34, last usable sector is 1953525134     Partitions will be aligned on 2048-sector boundaries     Total free space is 3437 sectors (1.7 MiB)          Number  Start (sector)    End (sector)  Size       Code  Name        1            2048            6143   2.0 MiB     EF02          2            6144         8394751   4.0 GiB     8200          3         8394752        76754943   32.6 GiB    EF00          4        76754944       174409727   46.6 GiB    0700          5       174409728      1346283519   558.8 GiB   0700          6      1346283520      1953523711   289.6 GiB   0700        and `parted` shows this. Are there any mistakes?


title: Ksh features incorporated into Zsh?

text: I have been a user of Bash for some time. I want to learn at least one other shell now, so I have been picking up the Korn Shell. However, it doesn't look like Ksh has had major updates for almost twenty years, and I have read that Zsh incorporates features from it. I have been reading many of the shell comparison questions on the StackExchange network, but have not found an answer to this: _Are there features from Korn Shell that Zsh does not incorporate?_ If so, what are they?


title: Traffic stats per network port

text: I have two machines with two applications that talk to each other on few network ports (TCP and UDP). I want to count traffic that they send and receive. I need not only overall count but stats per machine per port per day. I tried darkstat, but it doesn't provide stats per day, but only overall counters. Is there other way that I can count that traffic (I can put some proxy or gateway between that two machines).


title: Will wget -k still convert links to relative paths if wget is stopped prematurely?

text: I am running wget on a site that (I have come to realize) has two languages - and duplicate pages for each language. I've already got the content in English, so I'd like to stop wget from downloading anything more. I specified the -k switch when I ran it, so will it convert the links to relative links as usual if I stop wget before it's done completely downloading everything? Or will it simply stop? (There's another question on the StackExchange network that addresses forcing wget to convert links on already downloaded content by running               wget -nc -k [previous options] [previous url]      but timestamps were accidentally turned off so that's not an option.)


title: How to list all hardware supported by kernel

text: I want to see all hardware supported by the kernel in use. For example, if I have the 3.8.x.x version of the Linux kernel, how will I know what hardware is supported there. Tools like `lspci`, `lshw`, `lscpu` and `dmidecode` only check the hardware that is used at the moment and trying to find this using the loaded modules with `lsmod` is not handy either. What I want is something that checks all hardware actually supported by the kernel in use without taking into consideration if I am using that hardware or not. For the moment I thought of stuff like:   * Reading the `/lib/modules/3.8.0-5-generic/kernel/drivers` and parsing every file.   * Downloading the git source of the kernel and grepping it for information about this.   * Any other crazy and very long way of doing it. Is there any other smaller way of achieving this.


title: SSH disconnects when screen locked with vlock

text: I'm using tmux + PuTTY to get all the UNIX goodness I need when using Windows. I have the following settings in my `.tmux.conf`:               set-option -g lock-command vlock     set-option -g lock-after-time 1800      As expected, after 30 minutes, my screen goes to this:               This TTY is now locked.       Please press [ENTER] to unlock.      And then it all goes wrong... after awhile PuTTY gives me the follow error: `Server unexpectedly closed network connection` ![enter image description here](http://i.stack.imgur.com/8COkk.png) Any thoughts on why I'm getting disconnected from SSH?


title: How to find packages only which package name equal to text with aptitude?

text: When I want to search a package which named 'z', aptitude find packages which contains 'z' in package name same as 'like' in SQL, so aptitude find a lots of packages. How can I search packages which package named z?


title: sudo permission denied but su grants permission

text: this is the first occurrence where su was required for me. I read an article about changing the value in /sys/devices/virtual/backlight/acpi_video0/brightness to alter my laptop's screen brightness. I first noticed that when I would `$ sudo echo 10 > brightness` I would get permission denied. I switched to root using su and `# echo 10 > brightness` changed my brightness almost instantly. The last weird thing to me happened when I tried `# echo 20 > brightness` (maxbrightness file holds the value 15) and I got a write error Could someone explain this difference between sudo and su to me? Understanding the write error would be an added bonus. Any help, pointers, and/or links would be much appreciated.


title: Find 'duplicate' mails in maildir when header differs slightly

text: My problem is that I've been a heavy user of GMail's pop3-import feature and used it to pull mail from other GMail Accounts. Back then I did, however, only import new mail, not all the mail previously stored on the server. Now that I've started to use mutt as my mail client of choice I've decided to import all my former mail accounts and thus archive all my old mail locally. My initial hope was that I could easily weed out the duplicate mails by using a tool like fdupes, but what I did not anticipate was that the Mail-Header is altered slightly by GMail when it it retrieves a mail via Pop3 as it can be seen here:               @@ -1,7 +1,16 @@      Return-Path: <xxxx@googlemail.com>      Delivered-To: unknown      Received: from pop.gmail.com (74.125.43.109:995) by localhost with POP3-SSL;     -  10 May 2011 13:35:06 -0000     +  10 May 2011 14:29:41 -0000     +Delivered-To: yyyy@gmail.com     +Received: by 10.204.52.199 with SMTP id j7cs172325bkg;     +        Sun, 2 May 2010 15:33:19 -0700 (PDT)     +Received: by 10.204.136.15 with SMTP id p15mr6011875bkt.172.1272839446530;     +        Sun, 02 May 2010 15:30:46 -0700 (PDT)     +Received-SPF: softfail (google.com: best guess record for domain of transitioning xxxx@googlemail.com does not designate 84.167.28.93 as permitted sender) client-ip=84.167.28.93;     +Received: by 10.188.26.17 with POP3 id 17mf826641bwz.107;     +        Sun, 02 May 2010 15:30:46 -0700 (PDT)     +X-Gmail-Fetch-Info: xxxx@gmail.com 1 smtp.gmail.com 995 xxxx      Received: from aequitas ( [84.167.28.93])              by mx.google.com with ESMTPS id e20sm18902485fga.1.2008.01.04.07.58.46              (version=TLSv1/SSLv3 cipher=RC4-MD5);      The original looked like this: http://pastebin.com/U6YzNySP Is there an easy way to get rid of those "duplicate files" in an easy way?


title: how to read and modify fstab in python?

text: I want to automatically configure my `fstab` in `python` by running a script. I thought of using `ConfigParser` in `python`, but I am unable to use it properly.


title: Regular Expression for finding double characters in Bash

text: I am looking for a regular expression that finds all occurences of double characters in a text, a listing, etc. on the command line (Bash). **Main Question** : Is there a simple way to look for sequences like `aa`, `ll`, `ttttt`, etc. where one defines a regular expression that looks for n occurences of the same character with? What I am looking for is achieving this on a very very basic level. On the command line. In a Linux Shell. After quite some research I came to the following answers - and questions resulting from them, thus they just gave me a hint where the solution might be. But: a) (e)grep and the backslash issue   * `grep 'a\{2\}'` looks for `aa`   * `egrep'a{2}'` looks for `aa` Question: Is the necessity of setting backlashes really bound to the command I use? If so, can anyone give me hint what else is to be taken into account when using (e)grep here? b) I found this answer here for my question, though it isn't exactly what I was looking for: `grep -E '(.)\1' filename` looks for entries with the same character appearing more than once but _doesn't ask how often_. This is close to what I am looking for, but I still want to set a number of repeatings. I probably should split this into two or more questions, but then I don't want to flood this awesome site here. P.S.: Another question, possibly off topic but: is it `in`, `inside`, `at` or `on the shell`. And is `on the command line` correct?


title: how to make Tabs Outliner, for Chromium Browser, popup on mouse move to screen edge?

text: So, we have the Tabs Outliner extension https://chrome.google.com/webstore/detail/tabs- outliner/eggkanocgddhmamlbiijnphhppkpkmkl That is a very good vertical tabs manager for chromium. The problem is it occupies too much screen, and I dont have a widescreen monitor. So it is a new chrome window that would be visible all the time, occupying the left side of the screen. The problem is: how make it hide automatically after you move your mouse away from it, and after you double click on one of its listed tabs?


title: Install x11 on my own linux system

text: I have developed my own tiny linux file system using **buildroot** and **busybox**. I used linux-2.6.38.8 kernel configured and cross-compiled for target system(X86) according to needs.Now the filesystem is built but it has only busybox shell and it doesn't support GUI.It does not have any package- manager too.Now I want to enable GUI on it. I checked **/etc** but there was not any **x11** directory or **x11.conf** file.It does not support **startx** too.               How can I install x11(XFree86 or Xorg) on my system Explicitly.          I also want to install a package-manager for my system.      How can this be achieved?


title: System hangs on shutdown/restart - is ssh involved?

text: If I ssh into my server and do 'shutdown -r now', the shutdown hangs on the message 'Sending processes the KILL signal', and I have to walk into the lab and use the power button to force a shutdown. When I do the same thing on a session with a locally attached keyboard/monitor, the shutdown works fine. How do I at least confirm what process is hanging?


title: join : "File 2 not in sorted order"

text: I've got two files _jeter3.txt and _jeter1.txt I've checked they are both sorted on the 20th column using `sort -c`               sort -t '     ' -c -k20,20 _jeter3.txt     sort -t '     ' -c -k20,20 _jeter1.txt     #no errors      but there is an error when I want to `join` both files it says that the second file is not sorted:               join -t '   ' -1 20 -2 20 _jeter1.txt _jeter3.txt > /dev/null     join: File 2 is not in sorted order      I don't understand why.               cat /etc/*-release #FYI     openSUSE 11.0 (i586)     VERSION = 11.0      **UPDATE** : using '`sort -f`' and `join -i` (both case insensitive) fixes the problem. But it doesn't explain my initial problem. **UPDATE** : versions of sort & join:               > join --version     join (GNU coreutils) 6.11     Copyright (C) 2008 Free Software Foundation, Inc.     (...)          > sort --version     sort (GNU coreutils) 6.11     Copyright (C) 2008 Free Software Foundation, Inc.     (...)


title: ssh_config: specify command to be executed on the remote machine upon login

text: This is an expansion of my earlier question. I need to run a **locally- stored** command (i.e. `mount /home`) on a remote machine upon ssh login. At the moment, I am using:               ssh -t mymachine.example.com 'mount /home ; /bin/bash'      which works fine, but I was wondering whether I could put this command into my `.ssh/config` so that I don't have to type it every time. I found a `LocalCommand` option, but I don't see any `RemoteCommand` option. It is importand that the `command-to-be-executed` be stored on the local machine, as it will contain password to open an encrypted disk. That is the reason why I cannot put the command into `.profile` on the remote machine.


title: smitty like demo sites?

text: https://secure.wikimedia.org/wikipedia/en/wiki/IBM_AIX_SMIT      I'm searching for a "demo" site for learning smitty (get the used commands by F6!)      Are there any? Like there are router demo sites:      http://support.dlink.com/emulators/di604_reve/h_wizard.html   http://www.informatione.gmxhome.de/DDWRT/Standard/V23final/         Because AIX can't run in a VM :(


title: process that only root can run

text: I have created a process and it is running in the background as a daemon it.Now I want that only root should be able to view the output of that process.My process is something like "top" which accumulate data from the system and show system statistics when asked for and I want is that system statistics should be shown only to the root. Thanks in advance.


title: How to clone a CentOS server to a VM?

text: I have a HP Proliant DL380 CentOS 5.10 server that I'd like to clone to a VMWare VM. I have successfully cloned it to identical hardware using Clonezilla, however when I try to restore it to a VM it appears to clone successfully, but on boot I get an error message: ![enter image description here](http://i.stack.imgur.com/Xo3pE.png) I can't find much information on how to perform a clone like this and I think I might be missing something. The maximum ram I can safely set is 4GB (the server has 12) and maximum cpus is 4 (server has 8).


title: Best way to migrate a mail server?

text: I have a Plesk panel mail server with used hard disk space of 480GB out of a total of 900GB. I would like to migrate the plesk panel and data to a new server on raid 1 hard drives(600GB). The mail server has OS Ubuntu 10.04 LTS and the new server that I set up is also on Ubuntu 10.04 LTS. Are there any commands that can help me achieve this?


title: Understanding a simple configuration file for initramfs

text: I am new to file system. Can somebody explain me what is happening in the following?               # This is a very simple, default initramfs              dir /dev 0755 0 0         nod /dev/console 0600 0 0 c 5 1         nod /dev/tty 0666 0 0 c 5 0         nod /dev/null 0600 0 0 c 1 3         nod /dev/mem 0600 0 0 c 1 1         nod /dev/kmem 0600 0 0 c 1 2         nod /dev/zero 0600 0 0 c 1 5         nod /dev/random 0600 0 0 c 1 8         nod /dev/urandom 0600 0 0 c 1 9              dir /dev/pts 0755 0 0         nod /dev/ptmx 0666 0 0 c 5 2              nod /dev/ttyS0 0666 0 0 c 4 64         nod /dev/ttyS1 0666 0 0 c 4 65         nod /dev/ttyS2 0666 0 0 c 4 66              dir /bin 755 0 0         dir /proc 755 0 0              file /bin/hello ${INSTALL_ROOT}/projects/${SAMPLE}/hello/hello 755 0 0         slink /bin/init hello 777 0 0      What are we trying to achieve here actually? This is similar to this one Generally it is clear to me that we are trying to run (hello ) from init (last line in code). But I need a little bit more explanation.


title: How to get the authentication status from the last PAM module run

text: If I have the following PAM stack:               auth required default_pam.so     auth requisite my_custom_pam.so     ....      How do you obtain the authentication status from the last/previous PAM module run for use in your own custom PAM authentication module (in for example the `pam_sm_authenticate` function)?


title: Multiple "-bash command not found" messages in Mac OS X Snow Leopard Unix

text: When I open terminal I get an automatic error message `-bash: PATH command not found.` then I am stumped in getting multiple `-bash "x" command not found.` messages, even to simple commands such as `ls` `cd` `mkdir` `rm`.   Just about the ONLY commands I get a response to are `echo` and `export`. Could my Unix system files be corrupt, as has been suggested in some searches for help? My hunch is that there is some setting that directs me away from the proper spot to make UNIX commands, but I don't know how to fix that.


title: Can a running script identify the logging context?

text: Let us say I redirect the `STDOUT`, `STDERR` of a program to files.               ./script.sh 1> output.log 2> error.log      Can the running program find this out i.e. know the paths to these files?


title: how can I set a login prompt as soon as possible in the boot sequence?

text: I want my login prompt to come as soon as few necessary drivers are loaded. So for example once SPI driver is loaded, I will put the login prompt application just below SPI driver , and the CPU will execute this login application. Ultimately I will be having a fully running login prompt on the console just after loading of SPI drivers is over. How can I set a login prompt as soon as possible in the boot sequence? How should I proceed?


title: Wine vs Virtualbox?

text: I have used Wine before. I recently heard of VirtualBox. Do they do the same thing? What are the differences and relative merits of these?


title: NAS box mounted via CIFS - problem with permissions

text: I'm running the latest version of Ubuntu, and have mounted a SMB share via a line in `rc.local`. The share mounts correctly, and I can browse files freely, create new files, and then delete them without problems. But when I try and rsync a directory onto the mounted share:               rsync -a --delete /MySource/ /SharedMountPoint/      I get lots of errors:               rsync: failed to set times on "/SharedMountPoint/SomeDir": Operation not permitted (1)      and similar errors about being unable to create temp files. All the files and directories on the share are listed with numeric uid/guid - which I suppose is reasonable, as they were originally created via a sync from a windows box. I have no great need for access control - its just a box on a LAN that me and my family use as a dropbox - I'd basically just like anyone to be able to access it (provided they've done basic authentication).


title: Documentation for vifm?

text: ![enter image description here](http://i.stack.imgur.com/pJzPB.png) `vifm` looks like a good file manager, but it lacks documentation. Is there a manual or tips on how to use it? I'm looking for information on copying/moving a dir, creating a new empty file, editing a file, creating sym/hardlink, etc.


title: Multiple monitors as cloned desktop windows

text: I am running Fedora 16 using an Nvidia card with 2 monitors. I have the monitors setup as 2 separate displays (in that I can move a window from monitor to monitor). One monitor is mounted in a different area than the main monitor (for a display used in an experiment). The question is, can the 2nd monitor's display be shown as a small window (or in a 2nd workspace) in the main monitor so that we see what is being displayed without walking over to the 2nd monitor.


title: added new library, old one hanging around

text: In ubuntu 12.04, I downloaded the source for a geospatial library, gdal-1.11.0, into ~/src, configured it and compiled it successfully, it seemed. New files such as `libgdal.a` got put into /usr/local/lib. However when I run a program that depends on it,               $ ogrinfo --formats      I get               ERROR 1: ogrinfo was compiled against GDAL 1.11 but current library version is 1.10      It seems I haven't removed the older version of GDAL. How should I do that? Some info about my system:               $ uname -a     Linux ubuntu 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


title: Why doesn't `echo abc^H` just print `ab`?

text: As I recall, `^H` means `Backspace`. I generated it by pressing `CTRL+V`, `CTRL+H`. So the `^H` should remove the last character, as it is the same as `Backspace` and it should act just as if I pressed `Backspace` at this position. Why the does the output of `echo abc^H` remain `abc` and not `ab`?


title: When is using ~+ useful?

text: As I understand it, `~+` means the same thing as "the current working directory". So `echo ~+` should print the same as `pwd`. What is the purpose of this tilde expansion `~+` ?


title: Recover many files using ntfsundelete

text: I am using the following command to scan for deleted files: `sudo ntfsundelete /dev/sda1 -S 400m-20g -p 100` How can I restore the all of the results? I have tried:               sudo ntfsundelete /dev/sda1 -u 400m-20g -p 100 -d /mnt/bigboy/ntfs      returns `You must specify exactly one device.` and also:               sudo ntfsundelete /dev/sda1 -u -i 44-6057 -p 100 -d /mnt/bigboy/ntfs      which seems to only recover the first file, and then outputs:               Couldn't create output file: File exists      I believe the latter is caused by the fact that for some reason I have lost all of the file nanes. (The drive was shut down immediately, so not sure how.) Any help would be most appreciated.


title: How to check if my wireless connection uses AES or TKIP from a terminal?

text: I have a wireless router that has settings to use AES, TKIP or AES+TKIP encryption for wireless connections. My Linux-based device does not like AES (it drops out from time to time), my girlfriend's MacBook Pro does not like TKIP (refuses to connect at all), so it seems I'm stuck with the AES+TKIP setting. Is there any command I can use to check that my Linux device is using TKIP?   Or even better, one to force it to use TKIP?


title: No such file or directory error when using xargs

text: I have some files with `.mkv` extension and I want to calculate their total size using `du -h`. Some of the files are preceded by `whitespace` characters.               ranveer@ranveer:~$ ls *.mkv     Arrow.S01E02.720p.HDTV.X264-DIMENSION_(1)  [SHYAMPAREEK.IN].mkv     mymediafirefreefreak.com_The.Mentalist.S05E04.480p.HDTV.X264-mRS.mkv     SHYAMPAREEK.IN-The.Vampire.Diaries.S04E02.720p.HDTV.X264-DIMENSION_(1).mkv     Supernatural.S08E03.720p.HDTV.X264-DIMENSION_(1)SHYAMPAREEK.IN].mkv       [WWW.SHYAMPAREEK.IN].Arrow S01E01 480p HDTV.mkv      [WWW.SHYAMPAREEK.IN].Castle.2009.S05E03.480p.HDTV.x264-mSD.mkv     ranveer@ranveer:~$       Now, I am using `xargs` to apply `du -h` to each of the files but for the files which are preceded by `whitespace` characters I am getting `No such file or directory` error.               ranveer@ranveer:~$ ls *.mkv | xargs -I f du -h "f" | awk '{print $1}'     du: cannot access `[WWW.SHYAMPAREEK.IN].Arrow S01E01 480p HDTV.mkv': No such file or directory     du: cannot access `[WWW.SHYAMPAREEK.IN].Castle.2009.S05E03.480p.HDTV.x264-mSD.mkv': No such file or directory     186M     151M     185M     186M     ranveer@ranveer:~$       But when I apply `du -h` to those files individually it works fine.               ranveer@ranveer:~$ du -h "  [WWW.SHYAMPAREEK.IN].Arrow S01E01 480p HDTV.mkv"     151M      [WWW.SHYAMPAREEK.IN].Arrow S01E01 480p HDTV.mkv     ranveer@ranveer:~$       So, why am I getting error when using the combination of `xargs & du -h`.


title: Chrooted SFTP with full access to SSH stopped working (Debian)

text: I've got a home server on Debian 6 for backups. I'd like to setup chrooted SFTP environment with SSH access for some users (only for my knowledge, there are two users now). It almost works or rather worked until yesterday. In `/etc/ssh/sshd_config` I set up a special chrooted group:               Subsystem sftp internal-sftp     [...]     Match Group sftp-chroot     ChrootDirectory %h     X11Forwarding no     AllowTcpForwarding no     ForceCommand internal-sftp      I've created this group and added my account to it. Next I've changed `chmod` and `chown` like in this tutorial (or others very similar). It has worked two days. Yesterday evening I couldn't login into my server - nothing have been changed since last time. Console just returned:               This service allows sftp connections only.     Connection to xxx.xxx.xxx.xxx closed.      It's clear but how has it worked before? Removing user from `sftp-chroot` group solves this problem but of course causes no chroot on SFTP. I'm connecting that way: `ssh my_login@xxx.xxx.xxx.xxx` I'm in groups:               my_login cdrom floppy sudo audio dip video plugdev sftp-chroot      The last entries from `/var/log/auth.log` are:               Jun  4 13:59:54 debian sshd[1132]: Server listening on 0.0.0.0 port 22.     Jun  4 13:59:54 debian sshd[1132]: Server listening on :: port 22.     Jun  4 14:02:50 debian sshd[1185]: Accepted password for my_login from 10.0.0.10 port 57431 ssh2     Jun  4 14:02:50 debian sshd[1185]: pam_unix(sshd:session): session opened for user my_login by (uid=0)     Jun  4 14:02:50 debian sshd[1188]: Received disconnect from 10.0.0.10: 11: disconnected by user     Jun  4 14:02:50 debian sshd[1185]: pam_unix(sshd:session): session closed for user my_login      There's also installed `vsftpd` and `rssh` on the server. I've red a lot of tutorials and documentation, tried different directories permission and owners. Nothing helped. I saw in comments that some people also had this problem but any tip how to work out it. Maybe someone could help or encountered the same issue? Thanks in advance. If something isn't clear I will try describe it better. I'm not native English speaker ;)