DMX problem with fonts

I have problem with fonts in xdmx: I am starting new X               startx -- /usr/bin/X11/Xdmx :1 -display 192.168.0.104:0 -fontpath tcp/192.168.0.102:7100                   (II) dmx: Generation:         1         (II) dmx: DMX version:        1.2.20070424 (DMX Project)         (II) dmx: DMX Build OS:       Linux 2.6.32-5-686-bigmem i686 (Debian)         (II) dmx: DMX Build Compiler: gcc 4.7.2         (II) dmx: DMX Execution OS:   Linux 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1+deb7u1         (II) dmx: DMX Execution Host: badeleux-debian         (II) dmx: MAXSCREENS:         16         (II) dmx: Using configuration from command line         (II) dmx: Added 192.168.0.104:0 at 0 0         (II) dmx[o0/192.168.0.104:0]: No Xdmx server running on backend         (II) dmx[o0/192.168.0.104:0]: Name of display: 192.168.0.104:0         (II) dmx[o0/192.168.0.104:0]: Version number:  11.0         (II) dmx[o0/192.168.0.104:0]: Vendor string:   The X.Org Foundation         (II) dmx[o0/192.168.0.104:0]: Vendor release:  11204000         (II) dmx[o0/192.168.0.104:0]: Dimensions:      1280x720 pixels         (II) dmx[o0/192.168.0.104:0]: 7 depths on screen 0:  24,1,4,8,15,16,32         (II) dmx[o0/192.168.0.104:0]: Depth of root window:  24 planes (24)         (II) dmx[o0/192.168.0.104:0]: Number of colormaps:   1 min, 1 max         (II) dmx[o0/192.168.0.104:0]: Options: backing-store no, save-unders no         (II) dmx[o0/192.168.0.104:0]: Window Manager running: yes         (**) dmx[o0/192.168.0.104:0]: Window manager running -- colormaps not supported         (II) dmx[o0/192.168.0.104:0]: 1280x720+0+0 on 1280x720 at depth=24, bpp=32         (II) dmx[o0/192.168.0.104:0]: 0x21 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff *         (II) dmx[o0/192.168.0.104:0]: 0xc2 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc3 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc4 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc5 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc6 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc7 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc8 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xc9 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xca TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xcb TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xcc TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xcd TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xce TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xcf TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd0 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd1 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd2 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd3 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd4 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd5 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd6 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd7 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd8 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xd9 TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xda TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xdb TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xdc TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xdd TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xde TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xdf TrueColor   24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe0 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe1 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe2 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe3 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe4 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe5 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe6 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe7 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe8 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xe9 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xea DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xeb DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xec DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xed DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xee DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xef DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf0 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf1 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf2 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf3 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf4 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf5 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf6 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf7 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf8 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xf9 DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xfa DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xfb DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xfc DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xfd DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xfe DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0xff DirectColor 24b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: 0x41 TrueColor   32b 8b/rgb 256 0xff0000 0xff00 0x00ff         (II) dmx[o0/192.168.0.104:0]: DPMS 1.1 (on, disabled, 7200 7200 14400)         (II) dmx[o0/192.168.0.104:0]: (request) s=1280x720+0+0 r=1280x720+0+0 @0,0 (0) (be=1280x720 depth=24 bpp=32)         (II) dmx[o0/192.168.0.104:0]: s=1280x720+0+0 r=1280x720+0+0 @0,0 (be=1280x720 depth=24 bpp=32)         (II) dmx: Using 1280x720 as global bounding box         (II) dmx: XSync batching with 100 ms interval         (II) dmx: Shadow framebuffer support disabled         (II) dmx[i0/192.168.0.104:0]: Using backend input from 192.168.0.104:0         (II) dmx[i0/192.168.0.104:0]: Locating devices on 192.168.0.104:0 (XInputExtension version 2.2)         (II) dmx[i0/192.168.0.104:0]:    2 Virtual co XPointer                 (II) dmx[i0/192.168.0.104:0]:    3 Virtual co XKeyboard                (II) dmx[i0/192.168.0.104:0]:    4 Virtual co XExtensionPointe         (II) dmx[i0/192.168.0.104:0]:    5 Virtual co XExtensionKeyboa         (II) dmx[i0/192.168.0.104:0]:    6 axp20-supp XExtensionKeyboa         (II) dmx[i0/192.168.0.104:0]:    7   USB Keyb XExtensionKeyboa         (II) dmx[i0/192.168.0.104:0]:    8   USB Keyb XExtensionKeyboa         (II) dmx[i0/192.168.0.104:0]:    9 Microsoft  XExtensionPointe         (II) dmx[i0/192.168.0.104:0]: Added backend-mou as pointer device called Mouse0 [core]         (II) dmx[i0/192.168.0.104:0]: Added backend-kbd as keyboard device called Keyboard0 [core]         (II) dmx[i0/192.168.0.104:0]: XKEYBOARD: keycodes = evdev+aliases(qwerty)         (II) dmx[i0/192.168.0.104:0]: XKEYBOARD: symbols  = pc+us+inet(evdev)         (II) dmx[i0/192.168.0.104:0]: XKEYBOARD: geometry = pc(pc105)         (II) dmx[i0/192.168.0.104:0]: XKEYBOARD: From device: evdev pc+us+inet(evdev) pc(pc105)         xinit: XFree86_VT property unexpectedly has 0 items instead of 1         (**) dmx: dmxErrorHandler: RenderBadPicture (invalid Picture parameter)         (**) dmx:                  Major opcode: 148 (RENDER)         (**) dmx:                  Minor opcode: 10 (RenderTrapezoids)         (**) dmx:                  ResourceID:   0x26003ab         (**) dmx:                  Failed serial number:  4436         (**) dmx:                  Current serial number: 4555         (**) dmx: dmxErrorHandler: RenderBadPicture (invalid Picture parameter)         (**) dmx:                  Major opcode: 148 (RENDER)         (**) dmx:                  Minor opcode: 10 (RenderTrapezoids)         (**) dmx:                  ResourceID:   0x26003af         (**) dmx:                  Failed serial number:  4464         (**) dmx:                  Current serial number: 4555         (**) dmx: dmxErrorHandler: RenderBadPicture (invalid Picture parameter)         (**) dmx:                  Major opcode: 148 (RENDER)         (**) dmx:                  Minor opcode: 10 (RenderTrapezoids)         (**) dmx:                  ResourceID:   0x26003b2         (**) dmx:                  Failed serial number:  4483         (**) dmx:                  Current serial number: 4555         (**) dmx: dmxErrorHandler: RenderBadPicture (invalid Picture parameter)         (**) dmx:                  Major opcode: 148 (RENDER)         (**) dmx:                  Minor opcode: 10 (RenderTrapezoids)         (**) dmx:                  ResourceID:   0x26003b7         (**) dmx:                  Failed serial number:  4504         (**) dmx:                  Current serial number: 4555         (**) dmx: dmxErrorHandler: RenderBadPicture (invalid Picture parameter)         (**) dmx:                  Major opcode: 148 (RENDER)         (**) dmx:                  Minor opcode: 10 (RenderTrapezoids)         (**) dmx:                  ResourceID:   0x26003c0         (**) dmx:                  Failed serial number:  4535         (**) dmx:                  Current serial number: 4555         (**) dmx: dmxErrorHandler: RenderBadPicture (invalid Picture parameter)         (**) dmx:                  Major opcode: 148 (RENDER)         (**) dmx:                  Minor opcode: 10 (RenderTrapezoids)         (**) dmx:                  ResourceID:   0x26003ab         (**) dmx:                  Failed serial number:  4559         (**) dmx:                  Current serial number: 4614              Backtrace:         0: /usr/bin/X11/Xdmx (xorg_backtrace+0x49) [0xb77597f9]         1: /usr/bin/X11/Xdmx (0xb760b000+0x152216) [0xb775d216]         2: (vdso) (__kernel_rt_sigreturn+0x0) [0xb75ec40c]         3: /usr/bin/X11/Xdmx (0xb760b000+0x30cd9) [0xb763bcd9]         4: /usr/bin/X11/Xdmx (0xb760b000+0xa992e) [0xb76b492e]         5: /usr/bin/X11/Xdmx (0xb760b000+0x11a0e5) [0xb77250e5]         6: /usr/bin/X11/Xdmx (0xb760b000+0x208d5) [0xb762b8d5]         7: /lib/i386-linux-gnu/i686/cmov/libc.so.6 (__libc_start_main+0xe6) [0xb7154e46]         8: /usr/bin/X11/Xdmx (0xb760b000+0x20c29) [0xb762bc29]              Segmentation fault at address 0x10              Fatal server error:         Caught signal 11 (Segmentation fault). Server aborting              xinit: connection to X server lost              waiting for X server to shut down       and it is correctly displayed on 192.168.0.104, despite that there are no fonts at all (no clock in bar), when I click on LXDE 'Start' Button, popup reveals but with no fonts, and when I move mouse over this popover - X crashes. xfs works, tested from 192.168.0.104:               fslsfonts -server tcp/192.168.0.102:7100     -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso10646-1     -adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1     -adobe-courier-bold-o-normal--0-0-75-75-m-0-iso10646-1     ...      Both machines have installed debian with lxde.


Unpack, modify and pack initrd as a user

I've got a problem with rebuilding the `initrd` image as a user. Firstly, when I try to "unpack" the original `initrd` image:               cpio -idm < initrd-base      cpio: dev/tty8: Cannot mknod: Operation not permitted     cpio: dev/tty3: Cannot mknod: Operation not permitted     cpio: dev/zero: Cannot mknod: Operation not permitted     cpio: dev/loop0: Cannot mknod: Operation not permitted     cpio: dev/loop4: Cannot mknod: Operation not permitted     cpio: dev/loop7: Cannot mknod: Operation not permitted     cpio: dev/loop5: Cannot mknod: Operation not permitted     cpio: dev/loop2: Cannot mknod: Operation not permitted     cpio: dev/tty9: Cannot mknod: Operation not permitted     cpio: dev/tty4: Cannot mknod: Operation not permitted     cpio: dev/null: Cannot mknod: Operation not permitted     cpio: dev/loop6: Cannot mknod: Operation not permitted     cpio: dev/loop1: Cannot mknod: Operation not permitted     cpio: dev/console: Cannot mknod: Operation not permitted     cpio: dev/loop3: Cannot mknod: Operation not permitted     cpio: dev/tty1: Cannot mknod: Operation not permitted     133336 blocks      How can I get rid of these warnings? Secondly - I'm not sure how file ownership will be handled. After I unpack it it seems that everything belongs to the current user. How will `initrd` look after repacking it? I prefer to not alter the standard access rights.


Display Present working directory in Terminal

I am complete newbie to Mac/*nix. This is what I presently see in Mac Terminal as always > EN-AAABBBB:~ username$ Probably, my understanding is `EN-AAABBBB` is my Mac name and followed by username. But I would like to transform this into this format > username@pwd$ How do I achieve this? and some other customization tips are welcome :) [Colors etc..] _Note_ : I tried adding `PS1='\u@ \W \$ '` to `.bash_profile`, now getting the result as > username@ ~ $ `\w or \W` should display working directory, which's not. Any help!


grep file from file

What is the fastest way to `grep -v` a file against another one, both **line by line**. does `grep` support this ? Or should I use it on two for loops ?


Question About Bootloader Partition (Mint)

I have a quick question that I ran across while trying to install Linux Mint along with Windows 8 on my computer. I'm pretty new to Linux stuff so I'm sorry if this is pretty obvious. I'm mainly looking for confirmation that my partitioning scheme will work, but also what I should do with the bootloader. I have a hard drive and an SSD, but the hard drive is just being used for storage so I won't really mention it. As it stands, my SSD already has Windows 8 installed on an NTFS partition, as well as a 10GB swap partition and an empty ext4 partition where I plan to install Mint. I have a few questions about this setup   1. Will there be any problems mounting /home on an empty ext4 partition on my hard drive while mounting / on the SSD? I can't see why it would be, but I thought I might as well ask.   2. The Mint installer asks me which device to use for the boot loader installation. The choices on my SSD are:     * /dev/sdb (entire SSD)     * /dev/sdb1 (described as Windows 8 (loader) in menu, which is the NTFS partition with the entire Window 8 installation including bootloader)     * /dev/sdb6 (the ext4 partition where I'm installing Mint) Right now, /dev/sdb1 is marked as my boot partition which makes sense, seeing as that's where the Windows 8 bootloader is. If I choose to install the new bootloader there, would it overwrite the Windows 8 one and mess everything up? My understanding is that Mint installs GRUB, and when you boot into that it gives you the choice of going into Mint or Windows, and if you choose Windows it just jumps over to the Windows bootloader. With this mind, I was thinking that I should just install the bootloader into /dev/sdb6, leaving the Windows partition completely alone and then set /dev/sdb6 as my boot partition. Then when I boot it will go into GRUB, and if I choose the Windows 8 bootloader it will jump over to /dev/sdb1 and start Windows normally. I really don't understand this stuff that well though, so I thought it would definitely be a good idea to ask so I don't make Windows unbootable or something. I also don't understand the choice of putting the bootloader in /dev/sdb since there is no unallocated space on the SSD or anything, so the idea of installing the bootloader across 3 partitions seems a little off to me.


In KDE, I would like to make the activities dropdown (from the top left of a window) single select

I always want a window on only one activity, so as it stands now, I have to right click activities and select the new activity, then right click activity again and unselect the current activity. Is there a way I can configure the system so clicking one unclicks the other?


Switch between numbers and symbols on caps lock

Is it possible to set caps lock to switch between inserting numbers and the symbols they normally trigger when one holds shift? e.g. when you normally press the 9 key, you get a `(` unless caps lock is on. I tried adding this line to my layout file, on `/usr/share/X11/xkb/symbols`:               key <AE05> {        [ percent, 5 ]       };      This effectively switches the 'normal' and 'shift' meanings, but it won't work on caps lock - only on shift.


How do I install packages permanently on my Beagleboard?

I have spent some time getting my BeagleBoard XM computer up and running with the default Angstrom demo image after it has sat unopened for close to a year. I've been able to interact with it through the serial port, and then through putty. I can install packages such as Apache, and it seems to work fine. However, with the exception of writing test files to one specific mount point, all other mount points seem to be temporary. So when I install a new package and then reboot the computer, the package is no longer there. Is there a trick to `opkg`, or do I have to create a new image that builds the bulk of the file systems on the SD card? I am fine with adding packages and programming, but building images is tedious and daunting.


last modified with grep

I'd like to make a list to stdout of the files modified in the last two hours in the . directory using grep. It has to be automatic (can't ask user what time is it or similar stuff) and I have to use only grep, not conditional statements. I don't know even if it is possible but I'm pretty curious. This is what I've done by now:               #!/bin/bash          #redirect output to a file otherwise grep will read all as one line not giving a readable   output     ls -lrt > ls_out     date > date_extr          # extract hour from date. E interpret what follows as an extended regex. o print only what is matched. m 1 stop after one match     #I'll go back 2 hours     time_=$(date | grep -Eo [0-9]+?: | grep -Eom 1 [0-9]+?)     time_1=$[$time_-1]     time_2=$[$time_-2]          #grep day and month from the previous file "" to include spaces in date_     date_=$(grep -oE [0-9]+\ [A-Za-z]+\  date_extr)     grep "$date_" ls_out > ls_date          #match time as it is if it has 2 digits for example 11, 19, 21. \ number avoid matches as 19: if time_ is 9:     grep \ $time_:      ls_date     grep \ $time_1:     ls_date     grep \ $time_2:     ls_date          #match 09: if time_ output was 9:     grep 0$time_:      ls_date     grep 0$time_1:     ls_date     grep 0$time_2:     ls_date          #cleaning up     rm ls_out ls_date date_extr      It works fine, the only problem is that it doesn't list files modified the day before if the script is run at 00 or 1 a.m. The problem is that ii should grep the date AND the output of ls -lrt and I seem to need an if. In case you are asking the reason of this question, it is the link where I take it with some modifications: http://tldp.org/LDP/Bash-Beginners- Guide/html/sect_04_05.html. Question number 7. Thank you for your time


Quick and dirty way to run a process more than once

I am looking for very simple bash script that would allow me to launch a process a few times. What's essential to me is that after the processes terminate, everything will clean up automatically. Intended usage:               bash multiplerun.sh 5 executable.sh parameters_to_executable      I could probably write it myself, but it would take me so long that I've decided to ask experts; I'm very little skilled at using *ix systems. EDIT: Oh, and I forgot to add that I want to run them in parallel - running them one after another is pretty straightforward.


Does a fault in a kernel module necessarily result in a system crash?

Or is it possible to overcome the fault, since the code isn't in the monolithic part of the kernel?


Split file into multiple small files, separate by the newline symbol

Is there a utility that split file by newline symbol? e.g if a file contains the following lines,               aa     bbb     cccc      If I want to split it to 3 files, the desired output would be: `aa`, `bbb` And `cccc` (in 3 different files) I already checked the `split` command, it only cut file by file sizes, not what I want. If I don't wrote a utility myself, is there any standard tool to use?


Save files to mounted partition (fstab), but also main partition

I've mounted a USB in `/etc/fstab`:               UUID=xxxx-xxxx /mnt/someFolder auto users,uid=...      I want to save important files to this partition, but I want to have a backup on my normal filesystem in case the partition goes corrupt. The problem is, however, that when I unmount the partition added in fstab the files disappear from the main partition that I'm working on. Q: Is it possible to save my files to both the mounted partition, but also the main partition at the same time without using scripts that copy them? If so, how?


recursively change file permission but not directories?

I was doing a mass recursive change of permissions of some files that I had migrated to a unix system. I changed them to ug+rw, but then I found that I could not traverse subdirectories. I looked at the man page for `chmod` and didn't see any explanation for excluding directories, so I googled a little and found that people used `find` to recursively change the permissions on directories to 'execute' for user and group. I did that and then I could look into them. But it seemed to me that I should be able to be able to do this find `chmod` -- to recursively change the files to read/write but not make the directories untraversable. Have I done this the 'right' way or is there a simpler way to do it?


umount - device is busy

Sometimes when I want to umount a device, e.g.               sudo umount /dev/loop0      I will get the message               umount: /mnt: device is busy.             (In some cases useful info about processes that use              the device is found by lsof(8) or fuser(1))      I usually solve this issue by closing a console window (in my case xfce4-terminal) and then `umount`. What does this problem mean? Is there some smarter solution? thanks


Multiple dom0's on a single Xen host?

I've recently been researching Xen, and this has come up as a quistion for me. Is it possible to have more than 1 dom0 running on a single Xen host? The reason I ask is that this is very similar technology to IBM's Power VM and in particular the VIOS used to own the hardware and manage it on the other LPARs behalf. In our company using LPARs and VIOS we always have 2 VIOS per host so that if one VIOS fails for some reason the other continues to provide access to the hardware for the other LPARs.


What to change to place text in the centre of the screen

The following program will clear the screen               #include <stdio.h>     int main()     {         fputs("\033[2J", stdout);         return 0;     }      So, what should I modify/add in the above code to put a text string in the middle of screen? Note: screen size is: rows=25, columns=80


Is it good to make a separate partition for /boot?

I've seen some people make a separate partition for `/boot`. What is the benefit of doing this? What problems might I encounter in the **future** by doing this? * * * Also, except for `/home` and `/boot`, which partitions can be separated? Is it recommended?


.sh file cannot be executed without explicitly calling sh

This problem has bugged me so much and I can't find a solution. Sorry in advance if it is a newbie question. Let's say I have a file called `run.sh` that contains:               #! /bin/sh -x          x-www-browser index.html      And `ls -l run.sh` says:               -rwxr-xr-x 1 myusername myusername 39 Jan  9 19:32 run.sh      And `./run.sh` says:               bash: ./run.sh: Permission denied      Why does it not work? Why does `sh -x run.sh` work perfectly? * * * **More info, since it's not so easy apparently** If I do a `sudo`, it will not output an error, but won't do anything either.               myusername@crunchbang:/mnt/data$ sudo ./run.sh     [sudo] password for myusername:      myusername@crunchbang:/mnt/data$


Does linux have Blackbox like mechanism when system crashed in embeded linux?

In embeded linux, some times after the system crashes, we hope there is a blackbox (will record the key info before the system restart) , in linux, is there have such kind of mechanism to record the key data before restart, for example,which process crashed, what's the memory usage? CPU load? kernel log and app log, core dump file and so on?


Tmux Split Panes in the same window

I am new to using tmux in scripting and I am attempting to manipulate it so when I run a script I can have multiple screens attached and split in my `Putty` session, and also have it color coded and binded so that if I use `ALT+arrow key` it will switch to the next pane. This is what I have so far for coding:               tmux new-session -d -s PortalDB     tmux selectp -t PortalDB     tmux splitw -h -p 50     tmux attach -t PortalDB     tmux set-window-option -g window-status-current-bg yellow     tmux new-session -d -s HardwareAgent     tmux selectp -t HardwareAgent     tmux splitw -h -p 50     tmux attach -t HardwareAgent     tmux set-window-option -g window-status-current-bg blue     tmux new-session -d -s Profile     tmux selectp -t Profile     tmux splitw -h -p 50     tmux attach -t Profile     tmux set-window-option -g window-status-current-bg red     tmux new-session -d -s JoinCode     tmux selectp -t JoinCode     tmux splitw -h -p 50     tmux attach -t JoinCode     tmux set-window-option -g window-status-current-bg green               tmux bind -n M-Left select-pane -L     tmux bind -n M-Right select-pane -R     tmux bind -n M-Up select-pane -U     tmux bind -n M-Down select-pane -D      When I run the script, the color coding works, however I want it to split the screens horizontally, but instead I get this: ![Result](http://i.stack.imgur.com/PQVfO.png) Can someone suggest a way where I can split the panes evenly? Another thing I noticed is that when I run this script, it runs 4 different windows attached to the sessions I named, I just need it to split horizontally 4 times in one window. Can anyone suggest how to make it as such?


What is the purpose of kernel module dm_mirror a.k.a. dm-mirror?

When running an `$ lsmod` command, the output lists:               dm_mirror              21715  0     dm_region_hash         15984  1 dm_mirror     dm_log                 18072  2 dm_region_hash,dm_mirror      I have tried to search for "dm-mirror module" and found for example a http://en.wikibooks.org/wiki/Linux_Guide/Modules as result. But there were no details. What is the **dm_mirror** module, and what is its purpose?


Can I highlight the current prompt line in zsh?

Is it possible to highlight (set a background colour) for the whole line of the prompt in `zsh`? In my emacs config I have the line on which the cursor sits a slightly different colour to the window background, which is a great visual aid. I'm wondering whether it's possible to do the same in my terminal/zsh prompt, so that it effectivly "draws a line" under everthing that's been run. I've tried setting `PROMPT='%{$bg[grey]%}# '` in my `.zshrc` but the highlight only extends as far as I type, not to the edge of the terminal. Is what I'm trying to achieve possible?


what is the purpose of -i in front of scp and ssh commands?

What is the "-i" for in the command "scp -i _key_ *username*@ _address_ : _path 1_ *path 2*"? Note: I've seen "-i" used in ssh commands as well.


Why is Compass running on screen 1 printing its output onto screen 0?

I'm using 2 `screen` windows for this. `screen` window 0 is mostly used for `git` `screen` window 1 is used exclusively for running `compass` in watch mode. Now, whether I redirect all `compass` (run with the `\--quiet` parameter) output to `/dev/null` (`> /dev/null 2>&1`) or not… this somehow prints a lot of crap onto my `screen` window 0. As I like a clean terminal as much as the next person, I'd like to solve this.


terminal: displaying special characters

In some programs, such as `htop` the lines and frames are not displayed correctly. Instead, they are displayed as `-` and `/`. ![enter image description here](http://i.stack.imgur.com/09Xkp.png) But on another machine, they are displayed correctly as proper lines: ![enter image description here](http://i.stack.imgur.com/klp54.png) I am not sure if this is a terminal issue, or if perhaps some package is necessary. Can somebody please advise? In case it is relevant: My system is Debian Wheezy, my interpreter is `bash` and my terminal emulator is `gnome-terminal`


I have this piece of code given below as a part of my main script               if [ -e /tmp/rsm/Logs/filename_$$.txt ];     then     {     total=0     for files in $(<filename_$$.txt);     do     #cd /tmp/rsm/Logs     docs=`grep -i "Number.*processed" $files | cut -d" " -f5`     total=$(($total+$docs))     done     echo "---------------------------------------------------------"     echo  "Total Number Of Documents Processed On $date : $total"     echo "---------------------------------------------------------"     }     else     {     echo "There are "0" logfiles processed on $date"     }     fi      which gives the error               SDSLoad_onscreendocs.ksh[32]: 1024+: 0403-053 Expression is not complete; more tokens expected.      Please help me get rid of this error.


Create new-window with current directory in tmux

Is is possible to open a `new-window` with its working directory set to the one I am currently in. I am using _zsh_ , if it matters.


How can I split a file into multiple files based on pattern using perl? Ex: input to be a .txt file, name of the output file stored in another .txt file


Full disc encryption with GRUB2

Does anyone know of a good Howto on how to fully encrypt a HDD (even the /boot!) with GRUB2? Is it possible using fedora 14 or ubuntu 10.04?


Map a shell command to execute it into vim

I want to map, in my `~/vimrc` file, the key `<F4>` in `vim` in order to execute the `indent` program on the file which I'm currently editing. How can I do it? If I do this,the compatibility with `vi` will be broken? Thanks in advance.


zsh equivalent of bash show-all-if-ambiguous?

In bash, if you hit tab when there are multiple possible completions you get a list of matches that keeps reprinting if you repeatedly press tab. In tcsh, setting autocomplete to enhanced also achieves this. In zsh, you do get the list of matches, but on 2nd, 3rd tab press it starts cycling through matches. Is there a way to get zsh to do the equivalent of bash's show-all-if-ambiguous without the cycling? I'm not looking for the clever but useless "why would you press tab several times if it displayed after the first?". If I had been able to adjust my habits I'd have done so by now.


Can't Log into Fedora 19 after force shutdown

I was exploring my new fedora 19 after a crash in KDE (I don't know what I just did). I couldn't shutdown my laptop either with the graphical method or the terminal way (because the terminal refused to open). So I forced the shutdown by pressing the shutdown button in my laptop. After I restarted my laptop and entered my password and user, a black screen appeared and went back to logging screen again (the same thing happened with root). So how should I fix this problem?


Does CentOS 5.9 need Grub to run on hardware RAID?

I'm doing a fresh install of CentOS 5.9 x64 on a server with 8 disks in RAID5. At some point during the install, it gave me the option of configuring Grub, or not bothering. I chose not to bother, since CentOS was the only OS I would be installing. After installing and rebooting, sans install media, it wouldn't boot--just sat there with a blinking cursor at the BIOS message saying it would try to boot from the HD now. Is that normal? So I put the install media back in, rebooted, did `linux rescue`, ..., `chroot ...`, and `grub-install /dev/cciss/c0d0`, and everything looked good. When I reboot without the install media, though, I just get a `grub>` prompt, and no matter how many times I have it write the configuration again, I'm stuck with the grub prompt on boot now, and I'm not even sure I need Grub. Do I actually need it, or is it a false solution to the blinking cursor problem? If I do need it, why is it stuck despite `success` messages when I `root` and `setup`?


How to stop `grep` from truncating pipe output

Is there any way to have an `echo` at the end of a pipe simply append to the current output rather than removing it all? For example, how can I keep the output for my `cat` and `grep` and add "END OF OUTPUT" to the end of the output from the same pipe:               $ cat file.txt | grep 'foo' | echo "END OF OUTPUT"     something foo      foo     foo something     END OF OUTPUT      Similar to how `cat -` works:               echo "START OF OUTPUT" | cat - file.txt


How to track the number of processes and forks per user?

I need to figure out how many forks are done and how many concurrent processes are run by each user over time. It does not look like this information is tracked by my distribution. I know how to sets limits, but I'm interested in tracking these numbers for each user.


rsyslog conf file problem

I'm running Fedora (F19) and my _/var/log/messages_ is filled with info coming from avahi-daemon: stuff like:               Jan 21 14:13:42 localhost avahi-daemon[554]: Invalid response packet from host 10.10.22.3.      from my local network since I read somewhere that it's harmless, but I dont have time at the moment to debug it, I thought about disabling the reporting by modifying _/etc/rsyslog.conf_. I modified this line:               *.info;mail.none;authpriv.none;cron.none   /var/log/messages      to this line               *.info;mail.none;authpriv.none;cron.none;avahi-daemon.none   /var/log/messages      but with the new line rsyslog doesnt work anymore! **systemctl restart rsyslog** reports it as running, but nothing gets ever written in _messages_ - doing stuff that normally gets reported, as stopping&restarting some process (e.g. **systemctl restart cups** ), nothing gets reported. If I restore the _rsyslog.conf_ line as before, the restart of cups gets reported. There is some problem in the way I modified that line?


Explanations of an Android image build script

I was getting one program for partitioning SD card.I have given that script below:               #!/bin/sh     if [ $# -lt 2 ]; then        echo "example usage: $0 /dev/sdc \$ANDROID_ROOT"        exit 1     fi          DRIVE=$1     ANDROID_ROOT_DIR=$2          sudo umount ${DRIVE}*          sudo dd if=/dev/zero of=$DRIVE bs=1 count=1024     sudo sync     sudo parted $DRIVE mklabel gpt     sudo parted $DRIVE mkpart boot fat32 1MB 9MB     sudo parted $DRIVE mkpart system ext4 9MB 521MB     sudo parted $DRIVE mkpart cache ext4 521MB 1033MB     sudo parted $DRIVE mkpart userdata ext4 1033MB 2033MB     sudo parted $DRIVE mkpart media fat32 2033MB 3033MB     sudo sync          sudo mkfs.ext4 ${DRIVE}2 -L system     sudo mkfs.ext4 ${DRIVE}3 -L cache     sudo mkfs.ext4 ${DRIVE}4 -L userdata     sudo mkfs.vfat -F 32 ${DRIVE}5 -n media     sudo sync          sudo dd if=${ANDROID_ROOT_DIR}/device/ti/panda/xloader.bin of=$DRIVE bs=131072 seek=1     sudo sync     sudo dd if=${ANDROID_ROOT_DIR}/device/ti/panda/bootloader.bin of=$DRIVE bs=262144 seek=1     sudo sync     sudo dd if=${ANDROID_ROOT_DIR}/out/target/product/panda/boot.img of=${DRIVE}1     sudo sync     ${ANDROID_ROOT_DIR}/out/host/linux-x86/bin/simg2img ${ANDROID_ROOT_DIR}/out/target/product/panda/system.img ${ANDROID_ROOT_DIR}/out/target/product/panda/system.ext4.img     sudo dd if=${ANDROID_ROOT_DIR}/out/target/product/panda/system.ext4.img of=${DRIVE}2     sudo sync     sudo e2label ${DRIVE}2 system     sudo sync      I know that while executing this .sh file, the content will be running on linux. Even though I can understand the program, I am having doubt on one line:                ${ANDROID_ROOT_DIR}/out/host/linux-x86/bin/simg2img ${ANDROID_ROOT_DIR}/out/target/product/panda/system.img ${ANDROID_ROOT_DIR}/out/target/product/panda/system.ext4.img      Please anyone can explain what happens in this line? there is no linux command, then how can it run without error? And another doubt is: This code `parted` `DRIVE` as 5 partition as boot, system, cache, userdata and media. But why does boot not created? that is, `{DRIVE}1` is not set know? Then where will be `xloader.bin, bootloader.bin and boot.img` all stored?


Using multiple NICs for faster internet?

My laptop have a ethernet card and a wifi card. Ethernet line have maximum download rate at 1.5MiB/sec and wifi is over 1MiB/sec too, but it seem only have one NIC can working at a moment (if I turn on ethernet then system not using wifi althought it's connected). I want using 2 NICs at the same time for faster internet speed (may be around 2.5MiB/sec??), how can I do that? **Update:**   I mean, `Download Them All` plugin for firefox report my internet speed (over ethernet card) when download a movie is 1.5MB/s and other internet speed (over wireless card) is 1.0MB/s. How can I use two NICs at the same time to download a file? **Update 2:** Here is two different internet connections for wifi and ethernet, once have maximum is 1.5MB/s and once have maximum is 1.0MB/s My laptop is: HP CQ40 129TU (pretty old :D)   Wireless card: BCM4312 (b43 module)


How do I isolate my file system data from another system root?

I have a linux machine(kubuntu 13.04)   A my friend asked me give him an account with being able to use `sudo`. So, I made an account for him and put the account in `/etc/group` for him to use `sudo`   I don't care he installs or manages any programs but don't want him to access my home folder `/home/myaccount` and its sub folders. How can I do this?


Does any Linux distribution support setting mouse scroll wheel sensitivity?

I have tried Ubuntu 13.04 and Linux Mint 15 and both **DO NOT HAVE** optinos for setting mouse scroll wheel sensitivity. They had only mouse acceleration and sensitivity, but the scroll wheel speed you cannot set in these distributions. It's frustrating, to not be able to set this thing. Is this only a problem of Gnome distros or KDE and Xfce has the same problems too?


dxdiag.dll out of date? (Debian Wheezy 64 bit)

I am currently trying to make South Park: Stick of Truth work on Debian Wheezy (64 bit). Currently, upon launching the game, the game locks whatever workspace I'm on and I have to use xkill to stop it running. I have reason to believe that the error is related to directx and upon trying to figure the software by running               wine ~/.wine/drive_c/windows/system32/dxdiag.exe      I receive an error:               ERROR: DXDIAGN.DLL IS OUT OF DATE      Is there anyone out there who can help me?


How to reset the file descriptor

I was trying to use file descriptor for printing the lines in the file               #!/usr/bin/ksh     exec 3<&0     exec 0< file.txt     while read LINE     do        echo “$LINE”     done      and I am done with my code ,it prints the output as like my wish I forgot to reset the file descriptor of 0               exec 0<&3      what will happen ?   1. The descriptor scope will last only inside the program or entire unix shell?   2. How we come to know which value is holding which file descriptor (printing the values of file descriptor using shell)   3. It will automatically reset the system (AIX) is restarted ?


Is it possible to mount one H.D.D. via USB Hub on two PCs?

Having a HDD Drive on a USB hub with two partitions. Can I mount first partition to Computer A and second partition to Computer B without trouble? Or even better, would it be possible to mount one partition to both computers?


Why do I get fsync() failed: Disk quota exceeded on my linux machine?

I get `fsync() failed: Disk quota exceeded` but when I use `df -h` and `df -i` there is enough space in all the folders. What can I do?


How to retrieve dual-boot option after Windows reinstall?

Initially I had set up Slackware 13.37 and Windows 7 Home Premium dual boot. After upgrading to Windows 7 Ultimate, the dual-boot window does not show anymore so I cannot choose to boot Slackware. Is there a way to fix this without deleting the Slackware partition and reinstalling?


Suppressing "sudo: sorry, a password is required to run sudo"

I am trying to test if a user has the required sudo rights to run a command as another user without providing a password. What I have is this                sudo -u other-user -n true       if [ $? -ne 0 ]; then         echo "ERROR: You don't have the neccessary sudo rights"       else         echo "OK. You do have the neccessary sudo rights"       fi      However, the scripts prints this error message if sudo requires a password                 sudo: sorry, a password is required to run sudo      Is it possible to suppress this error message? I have tried to redirect both system err and system out but the error message still appears.                 sudo -u other-user -n true > /dev/null 2>&1


Copy Sequential Files

I have 12 files named `dmp_000, dmp_001`, etc, all the way to dmp_011. I would like to copy all of them to rdmp_000, rdmp_001, and so on, sequentially so the numbered files coincide. There must be an easy way to do this rather than individually? Thank you!


unbuffer/expect swallows the rcode when its child is signaled

`unbuffer` is able to pass along the return code of a process under normal circumstance, but if the process you are unbuffering is killed, for instance with a segfault, I see `$?` as `0` while I expect `139`. How can I get it to pass along the `139`? e.g. if I `unbuffer` a bash script that has simply `exit 1`, I get `$?` as `1`. If I unbuffer a bash script that has `kill -11 $$`, I get `0`. `unbuffer` is actually just an `expect` script that comes with `expect`, but I don't know it well enough to decifer why the return code is not passed along.


Bash STDERR still appearing after redirection

I am trying to parse the output of `yum check-update` in Bash 4 (Red Hat) and want to skip the first line that states: _'This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.'_ I used strace to determine the FD and it appears to be 2/STDERR but redirecting it with `2>/dev/null` does not work. What could be the cause? Strace output:               write(2, "This system is not registered to"..., 112This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.     ) = 112


Bash ignoring my PATH and it's cache

I have installed pip in my ~/.local/bin/ directory. Here are the outputs of which, type and $PATH               $ type pip     pip is hashed (/home/bcc/pedros/.local/bin/pip)     $ which pip     /usr/bin/pip     $ echo $PATH     ~/.local/bin/:~/bin:~/.bin:/global/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games      I can't figure out whats wrong with my PATH. This is affecting other installations in my linux as well. My linux:               Distributor ID: Debian     Description:    Debian GNU/Linux 6.0.7 (squeeze)


Internet SSH Server Security Considerations

What steps should I take to reasonably secure my linux desktop before opening sshd to the Internet so I can connect from anywhere?


Show only hidden files (dot files) in ls alias

I'm using the command `ls -a | grep '^\\.'` for showing only the hidden files. I added the line `alias hidden='ls -a | grep '^\\.'' # show only hidden files` to `.bash_aliases` file but this does not work. It's probably the problem with `'` character. Could you please help me write the correct alias (and possible rename the title for this question)?


Show older or newer history items with the history command in zsh

I typed in the history command and it showed me the last 10 commands executed by me. Now I wanted to see the last 20 commands executed by me so (after reading the documentation): > An argument of n lists only the last n lines. I typed in `history 20`. This showed me all the commands starting from command number 20 to the current command which was somewhere around 2000. So I tried `history -20` and this works. It shows me the last 20 commands. But this is not what is said in the documentation. Also `history -d [offset]` is supposed to delete the command on that offset. Even that does not work in my zsh. This is straight out of my zsh shell : ![enter image description here](http://i.stack.imgur.com/Oz3Mk.png)


BluRay Burner High I/O Wait State with UDF; Optimization Possible?

I've recently scaled back my home network, with one of the bigger changes being a switch-over to using a BD-RE drive for backup. With years of pictures and home video consuming about 25GB, and [important] documents well under 10GB, this SEEMED like a great way to go. Everything WORKS perfectly, my only concern is the overhead. I have the disc formatted UDF, and a script running `rsync` nightly to sync up selected paths in the filesystem to the drive. During the sync, My CPU(s) are showing roughly 25% in the wait state. This wouldn't be so bad, but it STAYS at this level for a very long time, and in the process, slows everything down to a crawl. I've even observed my load average spiking to 15.9+ (on a Core 2 Quad). The "actual" CPU utilization during this time is only around 6% (ALL VMs combined), so this is strictly an I/O bottleneck. Documentation specific to Blu-Ray burners is scarce (under Linux) compared to everything else, and I've never had an I/O bottleneck high enough to warrant any in-depth analysis. Considering the drive is burning at 2x (~9MB/s), it should complete in roughly an hour, but instead runs for many hours. Is there any way to optimize this to reduce the wait states? Am I simply constrained by kernel drivers/hardware/??? Is this just a nasty side-effect of using UDF that I'm unaware of? Could this have anything to do with running 3 VMs (2x Windows & 1x MythTV) as well as NFS along with this process? Is there any way to determine with certainty which piece of the puzzle is the problem? Sorry for the barrage of questions at the end; any help is greatly appreciated. **EDIT:** After the answer from psusi, I had a thought; is there a way to prioritize I/O on a per-device basis? Something along the lines of "guaranteed XXX PCI card 1MB/s", "limit XXX block device to 20MB/s", etc.???


Virtual hosting a tomcat webapp in Apache on RHEL 5.0

I am in a hosting fix! I have developed a web app for my organisation that allows sharing, interacting, etc. I want to DEPLOY IT ON LAN. BUT... I don't want the end user to type: `10.21.34.56:8080/webapp` Instead I want him to type: `http://www.webapp.com` and let the local DNS on the intranet resolve it to the corresponding IP. I can do a little..I succeed in this: "www.webapp.com:8080". > **I don't want the 8080 to be typed.** Though I found a way to do this. I am not fully satisfied. The browser by default sends all the http requests to port 80. So, I used iptables on the server, and redirected the request to port 8080. That didn't seem worthwhile discovery. SO, I hear about virtual hosting on apache-tomcat, which they say is a solution to this. Show me light!


How to put the completed downloads in a directory with aria2c?

alias download='while true; do timeout -s 9 1260 aria2c *.torrent --lowest-speed-limit=1024 --disable-ipv6=true --seed-time=0 --max-connection-per-server=6 --enable-rpc=false; sleep 1; done'     alias seed='aria2c --check-integrity=false --bt-seed-unverified=true --lowest-speed-limit=1024 --disable-ipv6=true --max-connection-per-server=6 -d . *.torrent --seed-time=999999 --seed-ratio=999999.0'      So I'm using these aliases with aria2 to download torrent files. Theres only 1 problem with this: how can I put the finished downloads in a directory? (using the "download" alias) p.s.: the "while true..." in the "download" alias is there because the download "slows down"... after a while, and I need to restart aria2c :D


"tar: unrecognized option --warning" during 'apt-get install'

I just ran `apt-get upgrade` on my debian 5 vps and I got this error: > tar: unrecognized option `--warning=no-timestamp' Now when I try to install other packages e.g: imagemagick I get the same error:               li197-162:~# apt-get install imagemagick     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages were automatically installed and are no longer required:       pkg-config comerr-dev libssh2-1-dev libpcre3-dev libdb4.6-dev libsqlite3-dev libmysqlclient15-dev libldap2-dev libpcrecpp0 libexpat1-dev libpq5 libidn11-dev     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       fontconfig-config imagemagick-common libfontconfig1 libfreetype6 libglib2.0-0 libice6 libjasper1 libjpeg8 liblcms1 liblqr-1-0 libltdl7 libmagickcore4 libmagickwand4 libpng12-0 libsm6 libtiff4       libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxml2-dev libxt6 ttf-dejavu-core x11-common     Suggested packages:       imagemagick-doc autotrace cups-bsd lpr lprng enscript ffmpeg gimp gnuplot grads hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin transfig xdg-utils libjasper-runtime       liblcms-utils     Recommended packages:       libmagickcore4-extra ghostscript netpbm ufraw-batch libglib2.0-data shared-mime-info gsfonts xml-core     The following NEW packages will be installed:       fontconfig-config imagemagick imagemagick-common libfontconfig1 libfreetype6 libice6 libjasper1 libjpeg8 liblcms1 liblqr-1-0 libltdl7 libmagickcore4 libmagickwand4 libpng12-0 libsm6 libtiff4       libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxt6 ttf-dejavu-core x11-common     The following packages will be upgraded:       libglib2.0-0 libxml2 libxml2-dev     3 upgraded, 25 newly installed, 0 to remove and 190 not upgraded.     Need to get 0B/11.2MB of archives.     After this operation, 22.4MB of additional disk space will be used.     Do you want to continue [Y/n]? Y     Preconfiguring packages ...     x11-common template parse error: Template parse error near `Choices-sr@latin.UTF-8: Samo glavni korisnik, Samo za korisnike konzole, Svako', in stanza #1 of /tmp/x11-common.template.65052          tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libfreetype6_2.4.6-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/ttf-dejavu-core_2.33-2_all.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/fontconfig-config_2.8.0-3_all.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libfontconfig1_2.8.0-3_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/x11-common_1%3a7.6+9_all.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libice6_2%3a1.0.7-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libpng12-0_1.2.46-3_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libsm6_2%3a1.2.0-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libjpeg8_8c-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libtiff4_3.9.5-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxau6_1%3a1.0.6-3_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxdmcp6_1%3a1.1.0-3_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxcb1_1.7-3_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libx11-data_2%3a1.4.4-2_all.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libx11-6_2%3a1.4.4-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxext6_2%3a1.3.0-3_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxt6_1%3a1.1.1-2_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-4_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libxml2_2.7.8.dfsg-4_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.28.6-1_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/liblcms1_1.19.dfsg-1_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/liblqr-1-0_0.4.1-1.1_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libltdl7_2.4-4_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libjasper1_1.900.1-10_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/imagemagick-common_8%3a6.6.9.7-5_all.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libmagickcore4_8%3a6.6.9.7-5+b1_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/libmagickwand4_8%3a6.6.9.7-5+b1_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     tar: unrecognized option `--warning=no-timestamp'     Try `tar --help' or `tar --usage' for more information.     dpkg-deb: error: subprocess tar returned error exit status 64     dpkg: error processing /var/cache/apt/archives/imagemagick_8%3a6.6.9.7-5+b1_i386.deb (--unpack):      subprocess dpkg-deb --control returned error exit status 2     Errors were encountered while processing:      /var/cache/apt/archives/libfreetype6_2.4.6-2_i386.deb      /var/cache/apt/archives/ttf-dejavu-core_2.33-2_all.deb      /var/cache/apt/archives/fontconfig-config_2.8.0-3_all.deb      /var/cache/apt/archives/libfontconfig1_2.8.0-3_i386.deb      /var/cache/apt/archives/x11-common_1%3a7.6+9_all.deb      /var/cache/apt/archives/libice6_2%3a1.0.7-2_i386.deb      /var/cache/apt/archives/libpng12-0_1.2.46-3_i386.deb      /var/cache/apt/archives/libsm6_2%3a1.2.0-2_i386.deb      /var/cache/apt/archives/libjpeg8_8c-2_i386.deb      /var/cache/apt/archives/libtiff4_3.9.5-2_i386.deb      /var/cache/apt/archives/libxau6_1%3a1.0.6-3_i386.deb      /var/cache/apt/archives/libxdmcp6_1%3a1.1.0-3_i386.deb      /var/cache/apt/archives/libxcb1_1.7-3_i386.deb      /var/cache/apt/archives/libx11-data_2%3a1.4.4-2_all.deb      /var/cache/apt/archives/libx11-6_2%3a1.4.4-2_i386.deb      /var/cache/apt/archives/libxext6_2%3a1.3.0-3_i386.deb      /var/cache/apt/archives/libxt6_1%3a1.1.1-2_i386.deb      /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-4_i386.deb      /var/cache/apt/archives/libxml2_2.7.8.dfsg-4_i386.deb      /var/cache/apt/archives/libglib2.0-0_2.28.6-1_i386.deb      /var/cache/apt/archives/liblcms1_1.19.dfsg-1_i386.deb      /var/cache/apt/archives/liblqr-1-0_0.4.1-1.1_i386.deb      /var/cache/apt/archives/libltdl7_2.4-4_i386.deb      /var/cache/apt/archives/libjasper1_1.900.1-10_i386.deb      /var/cache/apt/archives/imagemagick-common_8%3a6.6.9.7-5_all.deb      /var/cache/apt/archives/libmagickcore4_8%3a6.6.9.7-5+b1_i386.deb      /var/cache/apt/archives/libmagickwand4_8%3a6.6.9.7-5+b1_i386.deb      /var/cache/apt/archives/imagemagick_8%3a6.6.9.7-5+b1_i386.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)     li197-162:~#       I really have no idea what is wrong and how to fix this. Is it possible to undo an `apt-get upgrade`?


Is there a checklist for getting the "beep" program to work?

Debian has a program called "beep" available, that lets you make the computer beep at whatever frequency or time you want. http://packages.debian.org/wheezy/beep The problem that many people seem to have is that they don't want their computers to beep, so they complain about the beeps, and then the default gets set to things like pcspkr module getting blacklisted and other stuff that stops beeping, and unfortunately stops the beep program from working. I want beep to work! I like being able to make the computer beep for various reasons. But I don't know all the things to check to figure out why it doesn't work, so I go for workarounds like getting wav files and playing them. I would much rather just get beep to work! Does anybody know all the things that have to be checked to get beep to work? Already I've checked that the pcspkr module isn't blacklisted and is loaded, and checked the volume levels and muting using alsamixer. But still no beeps. How can I make my computers beep please?


How to change readline's/bash's meta key?

Readline/bash use the meta key quite often but it only works when I use the Esc-key for it. How can I configure bash/readline to accept a different key as meta?


How to get list of available wireless networks without being root

I would like to get a list of all the wireless networks.               iwlist wlan0 scan | grep ESSID      This will only show me the wireless network I am currently connected to. When I run the command as root, it shows me all the available networks. If I run the command without sudo quickly after this, all the networks will show up, but after a while they are all gone except the network I am currently connected to. Is there a way to get all the available networks when I am not root?


Managing multiple Vims (vim and MacVim)

My machine came with Vim 7.3 and I just installed MacVim 7.4, so now I'm juggling both and I'm not sure how to manage the two. I'm plagued by questions like:   * Should I remove the older version?   * Where should MacVim be located? Currently MacVim.app is in `/Applications`, and I see a couple executables at `/Applications/MacVim.app/Contents/MacOS/MacVim` and `/Applications/MacVim.app/Contents/MacOS/Vim`. The pre-installed Vim 7.3 is sitting at `/usr/bin/vim`. I'd like to be able to use 7.4 both from the terminal and in MacVim. I haven't installed MacVim's "mvim" script and not sure I will. What is the best way to set this up?


Source of Fedora Core 6 Live CD

I have spent quite a bit of time trying to search for a source for the above. There are many webpages pointing to (what I believe is) the original link - http://download.fedora.redhat.com/pub/fedora/projects/live/FC-6-i386-livecd-1.iso However, using this with the below hopeful's was unfruitful ( _Added to_ ): _The Internet Archive - Software Collection_   The internet Archive - Way Back Machine (All crawled dates)   Google's cache   http://www.oldversion.com/linux/ Can anyone point me in the right direction? **EDIT:** Also, as goldilocks reminded me due to this comment, I should have pointed out - Have found the archives at http://mirrors.fedoraproject.org/publiclist/Fedora/6/i386/ and (not like they should be very different) looked through all of them.


Wireless not working after update (Network Unclaimed)

I just installed backbox3, during the install im asked to connect to wireless, and it works like a charm, but after i update the system and reboot, i loose wireless... "sudo lshw -C network" gives me:               PCI (sysfs)        *-network                       description: Ethernet interface        product: AR8151 v1.0 Gigabit Ethernet        vendor: Atheros Communications Inc.        physical id: 0        bus info: pci@0000:02:00.0        logical name: eth0        version: c0        serial: 60:eb:69:60:26:51        size: 1Gbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.0-NAPI duplex=full ip=192.168.87.119 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s        resources: irq:47 memory:9b400000-9b43ffff ioport:2000(size=128)      *-network UNCLAIMED        description: Network controller        product: BCM43225 802.11b/g/n        vendor: Broadcom Corporation        physical id: 0        bus info: pci@0000:03:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:9a400000-9a403fff      Im no linux prof. so im pretty lost on what i should do about it?


How to customize apache mod_sec log output?

I have an apache server which uses mod_security configuration. Those logs are further analyzed and sent out to OSSEC server for intrusion detection and monitoring. That OSSEC server then sends those logs for normalization and advance correlation to SIEM, the parser at SIEM is able to parse quiet a few mod_sec messages but the one particular type message including in the payload > "rx ^%{tx.allowed_request_content_type}$" cannot seemed to be parsed at SIEM system, Instead of changing the parse code at SIEM end which may seems impossible because its closed source, I want to know if there is way to change the logging output much like apache custom log features. The full log payload is shown below:- > Sep 13 13:35:37 ossec-server ossec: Alert Level: 7; Rule: 50118 - Access > attempt blocked by Mod Security.; Location: (WebServer) > 127.0.0.1->/usr/local/apache2/logs/error_log; [Fri Sep 13 13:37:09.190450 > 2013] [:error] [pid 2584:tid 140049089795840] [client 127.0.0.1] > ModSecurity: Access denied with code 403 (phase 1). Match of "rx > ^%{tx.allowed_request_content_type}$" against "TX:0" required. [file > "/usr/local/apache2/conf/modsecurity- > crs/activated_rules/modsecurity_crs_30_http_policy.conf"] [line "64"] [id > "960010"] [rev "2"] [msg "Request content type is not allowed by policy"] > [data "application/octet-stream"] [severity "CRITICAL"] [ver > "OWASP_CRS/2.2.8"] [maturity "9"] [accuracy "9"] [tag > "OWASP_CRS/POLICY/ENCODING_NOT_ALLOWED"] [tag "WASCTC/WASC-20"] [tag > "OWASP_TOP_10/A1"] [tag "OWASP_AppSensor/EE2"] [tag "PCI/12.1"] [hostname > "abc.com"] [uri "/"] [unique_id "UjLOtQoKUakAAAoYEh8AAAAO"] Can i specify apache not to log the above highlighted text when writing logs?


Why is my download speed a lot lower in Linux than other OS?

I had Windows 7 installed on my PC and torrents (all legal) downloaded at a rate of 2MBps. I used uTorrent. I now have Kubuntu 13.04 installed and have kTorrent, which can only achieve speeds of 550KBps even though I know they should be downloading at the rate of 2MBps as I have tested the same downloads with windows, and it achieved those speeds. I installed Ubuntu and Open Suse as well and all achieve the same speed of 550KBps even with different clients (rtorrent, Transmission etc), so why is this happening?


Change inside comments with Vim

Is there a way to change inside of a comment with Vim? I know you can change inside brackets and quotes with `i]` and `i"`. For example, If you are on a quote you can press, > ci"my new textESC And this will replace the text inside of the quote with the phrase "my new text", but how can I do the same thing with C comments which are enclosed with /* and */?


Plesk, Centos server error: Cron <root@...> cd /tmp;curl -s -O http://.../r.png;perl r.png;rm -fr r.png

I had the bright idea of clearing some space on the root partition. I thought I was fairly safe from what I have read by removing some of the locale files for Plesk and some of the backup.tar.gz and logs.tar.gz but I must have removed something by accident. I have looked back at the message and although I have removed the addresses and any IP's the location its trying to download the file from is on another server. I have looked through the message header and it is coming from the root account to the root account. I don't normally take care of this but the usual guy is away for a couple of weeks. Any help would be greatly appreciated and if you need any more information from me please let me know. Thanks in advance               Bareword found where operator expected at r.png line 3, near "403 Forbidden"         (Missing operator before Forbidden?)     Bareword found where operator expected at r.png line 4, near "</head"       (Might be a runaway multi-line // string starting on line 3)         (Missing operator before head?)     Bareword found where operator expected at r.png line 6, near "<p>You don't have permission to access /r"       (Might be a runaway multi-line // string starting on line 5)         (Missing operator before r?)     Bareword found where operator expected at r.png line 9, near "<address>Apache"         (Missing operator before Apache?)     Bareword found where operator expected at r.png line 9, near ") Server"         (Missing operator before Server?)     Bareword found where operator expected at r.png line 9, near "IP ADDRESS Port"         (Missing operator before Port?)     Number found where operator expected at r.png line 9, near "Port 80"         (Do you need to predeclare Port?)     Bareword found where operator expected at r.png line 10, near "</body"       (Might be a runaway multi-line // string starting on line 9)         (Missing operator before body?)     syntax error at r.png line 2, near "html>"     Execution of r.png aborted due to compilation errors.


How do I manually modify an inode?

I am using Ubuntu Linux and, just for fun, I want to create a hardlink to a directory (as seen here). Because I'm just doing this for fun, I'm not looking for any sort of pre-developed directory-hardlinking software that someone else wrote, I want to know how to do it myself. So, how do I directly, manually, modify an inode? Ideally I would like the answer as a Linux command that I can run from the Bash command line, but if there is no way to do it from there I would also accept information on how to do it in C or (as a last resort) assembly.


Fedora 16 fails to boot after Win7 installed a GPT Drive

So, I have Windows 7 and Fedora 16 installed on my old HDD. Everything worked well and fine before I've had my new 3TB drive built in, which I initialized as GPT in Windows. Actually I initialized 1,5TB - the rest remains untouched. After that Fedora won't boot up anymore. Instead it prompts me to maintenance mode, showing something like:               [...]/sbin/blkid -o udev -p /dev/sda[number] [...] terminated by signal 15 (Terminated)      Whenever I press Ctrl+D it shows one or multiple messages similar to that. Using               parted /dev/sdb print      shows that the drive as such is recognized as GPT. It also shows up in /etc/fstab. Using older kernels results in the same problem. What should I do ? Edit: I initialized the remaining ~1,5TB in Windows - nothing changed.


GPU computing without X?

I am attempting to run GPU computation software on Ubuntu Server 12.04 without X since this box is going to be a dedicated computation machine. However the last requirement "Without X" is proving to be very problematic. I have a ATI Radeon HD 5770 hooked up right now. Installed the x64 drivers from AMD's website by having it generate the correct debian packages. Ran `sudo aticonfig --initial --adapter=all` and rebooted. However it doesn't seem like its working               adam@adamcrunch:~$ DISPLAY=:0 fglrxinfo     Error: unable to open display (null)     adam@adamcrunch:~$ sudo aticonfig --list-adapter     * 0. 01:00.0 ATI Radeon HD 5700 Series          * - Default adapter      My software is also having issues as it just won't use the GPU for computation and tries to use the CPU. I know during my initial install with Xubuntu that the card works and I can do GPU computation on it. However is it possible to do it on a headless server without X? I can provide more information if needed


Save password in bash script for multiple queries

I would like to know if there is a safe way to only be queried for a password once in a custom bash script, and then save it somehow to be used for later needs. At the end of the script it should be shredded in some way so it wont not recoverable from memory or in any other way.


Creating a Bash script that will execute a program and if it exits without crashing, will run it again

I'd like to know the easiest way of creating a bash script that will run an app in MacOSX (it's a UNIX based system so I assumed this was the right place). wait for the program to exit. If the exit wasn't a crash, run it again. Otherwise leave the crash report window open and exit. I'd like this script to run forever until either the crash or manual termination. I've a vague idea but not sure. Here is what I have so far:               echo "Launching Autorun…"          if ["$1" -eq "0"]; then     # Application exited successfully. Restarting.     /path/to/application.app     else     # An error occured. Do nothing and exit.         exit     fi


Adjusting rsync TCP timeout

I'm using rsync in my own C++ program by issueing the command `system("rsync -rauzvq root@host:/folder");` I use this for keeping multiple systems in sync. Now I have the problem that when a remote host shuts off and there it was still rsync-ing with my program, my program hangs for the period of the TCP timeout. So I thought, I would adjust the TCP timeout parameter for the rsync socket, but I can't figure out how (--sockopts isn't working). Another way of fixing this would involve making a forked system call and check whether the rsync pID still exists after a certain timeout, otherwise kill it. Only downside on this is that I can't check whether the process is genuinely syncing or just hanging on a TCP timeout? So, what would you guys try?


KDE not loading without nomode tag in grub and bad resolution

I recently installed Linux Mint 13 KDE but it's not working fine. At first I had to use failsafe mode to boot because normal boot takes to a textual login. If I use normal boot and text login I'm not able to run KDE nor with kdm start neither with startx. kdm says that's already running. Instead X is not able to run because can't connect Xserver to display. If I stop kdm and starx again doesn't change anything. Now I edited the grub to load in nomode. In that way KDE loads but resolution is wrong and xrandr doesn't help, because if I do this:               cvt 1366 768      it changes it to 1368:               # 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz     Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync      I also installed bumblebee and nvidia drivers because of optimus technology.. It worked just to have fun with glxspheres but there isn't any gain on KDE.. This is lspci output:               fabio@fabio-EasyNote-TS11HR ~ $ lspci |grep VGA     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)     01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev ff      My notebook is an EasyNote TS with NVIDIA GeForce GT 540M. Thank you in advance to anyone that may help!


Relocatable emacs

Is there a way to build emacs on Linux so it doesn't embed the path where it was built into the binary, and it can be relocated harmlessly to a different path? That is, if you build with `\--prefix=/a/b/c` then move everything to `/d/e/f` it won't run, because it depends on the fixed path `/a/b/c`. I see the string `/a/b/c` inside the binary itself. Windows emacs can be installed to any directory and it runs from there just fine, so it makes me think you can tell Linux emacs to run the same way, from "wherever you are sitting now". We have no options like a fixed name symlink up the directory tree pointing to the variable path below it.


Is there any suggestion to my bash script that (un)mounts an ISO file in order to make it better and safer?

I am new to bash script, and I wrote a script to `mount` / `umount` an iso file by detecting whether the `/media/iso-file-name` exists. Is there any suggestion for the script as below in order to make it better and safer?               #!/bin/bash          Mountpoint="/media/$(basename "$*")"          if [ -d "$Mountpoint" ]     then         while [ -d "$Mountpoint" ]         do             umount "$Mountpoint"             rmdir "$Mountpoint"             sleep 3         done     else         mkdir "$Mountpoint"         mount -t iso9660 -o loop "$*" "$Mountpoint"     fi


xrdp - Cannot connect from OSX

I just installed Centos 6.5 and put xrdp on it. I set up my iptables to allow it, and I can connect fine (both over local network and over the internet) from Windows 7, iOS, Android (using the official Microsoft RDP app for all three), and Linux (rdesktop). However, when I try to connect from OSX, I get the following error: ![enter image description here](http://i.stack.imgur.com/amMPs.png) Is there some reason this is only happening from OSX? I did a vanilla install of xrdp (no special settings).


How can I use an ACL in BIND to forward requests per zone selectively?

I have some zones declared internally as forwards to another DNS, but there is a hefty amount of IP space we do not want to be forwarded in this manner for these zones. These forwards are for very specific zone declarations and I'm not certain if there even is a way to use an ACL for this. Any help would be greatly appreciated. Edit, here's an example using example.com: acl "forwardees" { 10.0.0.0/8; }; zone "example.com" in { type forward; forwarders { 1.2.3.4; }; }; * * * When doing a lookup of example.com, I would want only members of forwardees to get forwarded to 1.2.3.4. If you are not a member of forwardees, I would want it to be as if that zone entry doesn't exist and a recursive should be done. Hopefully that spells it out better than I could word it myself.


print only rows that has latest non empty cell that starts with the word "Failed" on a CSV file in Linux

I want to print the table only if non-empty latest column that starts with the word "Failed"on a CSV file in Linux.. My input -               Name,Mon,Tue,Wed,Thu,Fri,Mon     Linux,Successfull Fullbackup; Failed Fullbackup,,,,,Failed Fullbackup     Unix,,,,Failed Fullbackup,,     Windows,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Successfull Fullbackup     MAC,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup     Solaris,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Successfull Fullbackup; Failed Fullbackup,, My output should be:               Name,Mon,Tue,Wed,Thu,Fri,Mon     Linux,Successfull Fullbackup; Failed Fullbackup,,,,,Failed Fullbackup     Unix,,,,Failed Fullbackup,,     MAC,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup,Failed Fullbackup


Sudo su issue on ubuntu 14.04 lts: /root/zsh can't not be found

I have recently re-installed ubuntu 14.04 lts and I installed my favorite shell (zsh) but I am having an issue now. When I type, `sudo su` it comes back with an error stating `/root/zsh` can not be found. I am not sure what I need to do to fix this as this is the first time I have had this error when using this system. Also when I do, `sudo chsh -s /bin/zsh` I get               PAM_AUTHENTICATION failed      Any help would be appreciated.


How to give user root permissions?

I just installed Arch. Works great. I created a new user, logged in with it and now I'm trying to install several thing with pacman. But I keep getting the error: `error: you cannot perform this operation unless you are root.` I can use pacman with root just fine, but it there a way to allow my new user to perform these actions? I tried logging into root and using gpasswd: `gpasswd -a jack root` but that didn't do anything.


xclip does not change the clipboard content

I'm trying to give the following command:               echo "hi" | xclip -selection c      This doesn't work? It has worked in the past, but never consistently. I also tried               echo "hi" | xclip -selection primary          echo "hi" | xclip -selection clipboard      etc.... xclip is installed (I'm pretty familiar with Linux :-) ) and there is no output, it just moves onto the next line and my clipboard contents do not change. Here is my linux version:               [1450] cgeorge@uaf-7 $ cat /proc/version     Linux version 2.6.18-371.1.2.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)) #1 SMP Tue Oct 22 12:51:53 EDT 2013


CPU Frequency Scaling Monitor: No passwd, all cores at once

I use **MATE 1.6.2** and **CPU Frequency Scaling Monitor 1.6.2**. I would like two things:   1. Get rid of the need of the `root` password to change the CPU settings.   2. To affect all cores at once. The problem is that my current work-flow is very inconvenient: (1) change the settings of one core, (2) fill in the root password, (3) click each of my 4 cores to change the settings. My setup:               Intel(R) Core(TM) i5-4200M Haswell CPU @ 2.50GHz (2 cores, 4 threads)     Linux 3.15.8-200.fc20.x86_64     Fedora release 20 (Heisenbug)     Toshiba Satellite C55     MATE 1.6.2


Error Restoring Virtual Machine

I've gotten an error restoring a virtual machine. How should I resolve / troubleshoot this error: > Error restoring domain: internal error Device 001:004 is already in use


Removing files that do not exist

I apologize for the possibly misleading title, but it is the best way I could think of to describe the problem, which is: I have several files that I can `cat`, but when I try to `rm` them I get a "No such file or directory" error.               $ cat "A11 D5 D5.txt"     ... OUTPUT ...     $ rm -f "A11 D5 D5.txt"     rm: cannot remove `A11 D5 D5.txt': No such file or directory      I've tried overwriting the file and can execute the remove without error, but the file is still there; I can still cat the file.               $ echo "Boom" > "A11 D5 D5.txt"     $ cat "A11 D5 D5.txt"     Boom     $ rm -f "A11 D5 D5.txt"     $ cat "A11 D5 D5.txt"     Boom     $ rm -f "A11 D5 D5.txt"     rm: cannot remove `A11 D5 D5.txt': No such file or directory      I'm at a complete loss. I suspect a reboot would fix the problem, but I am really more interested in why such a thing would happen. Some sort of filesystem problem? (I don't have reboot privileges for the system; it's a university cluster.) **Edit:** I get the following output               $ ls     A11 D5 D5.txt     $ ls -b     A11\ D5\ D5.txt     $ printf '<%q>\n'     <''>      I've also `stat`ed the file (just in case):               $ stat A11\ D5\ D5.txt        File: `A11 D5 D5.txt'       Size: 5               Blocks: 8          IO Block: 131072 regular file     Device: 1bh/27d Inode: 18446744068941111933  Links: 1     Access: (0644/-rw-r--r--)  Uid: (  596/  <username>)   Gid: ( 1015/<group>)     Access: 2012-12-09 22:48:29.000000000 -0600     Modify: 2012-12-09 22:56:44.835662498 -0600     Change: 2012-12-09 22:56:44.835662498 -0600      **Edit 2:** The filesystem is apparently of type "fuse" and               $ ls -lb A11\ D5\ D5.txt     -rw-r--r-- 1 <username> <group> 5 Dec  9 22:56 A11\ D5\ D5.txt


Trying to Utime via FTP

I am connecting to my server via FTP (that is the only way I have access to this server in particular). I need to utime a command via FTP to the server. Other commands work but when I try something like               site for file in *;do utime 20120101084400 ${file}; done;      to change all dates in a given directory, I receive an error that says **usage: form format** or **invalid command** depending on the variation of that command I try. I tried this command (without the site part) on my local unix and it works but not remotely via FTP. How do I do that? If there's a way to do that recursively it will be a bonus... :) thanks.


What to include in an RPM created from python packages

I'm looking to create a rpm for this tarball and couldn't figure out which files needed to be included in the package after the install. I am used to compiling some code and including the binary output; however, since this is all python and seems to use `distutils` to install everything is there even bin/executable to include in the package? I thought distutils just adds the module to the appropriate 3rd party python modules dir on the target machine. If I use:               %install     make install DESTDIR=%{buildroot}      what would be the appropriate output to include in the rpm package, i.e., under `%files`? I came across an already made .spec file here which which seemed to include the entire `/usr/bin` (`rpm --eval %{_bindir}` expands to `/usr/bin` on my machine) directory which seemed excessive.


How to use " rm !(*keyword) in bash 4.1.2?

I got bash 4.1.2 on remote centos machine. When using my favorite               rm !(*keyword)      I got               bash: !: event not found      I tried to upgrade its bash, but seems the edition remains after upgrade. The same code works well on my bash 4.3.11 on local Ubuntu machine. How to use that command in this Bash version(4.1.2)?


automatic suspend does not work in Gnome

I have configured automatic suspend in Settings->Power, then one hour later nothing happen when the suspend time came. I checked the internet for some information and found there is a bug in Gnome 3.1x (see http://forums.fedoraforum.org/showthread.php?t=297092). How can I work around this?


How to view Flash and other videos on Linux systems?

I'm running Fedora 17 and Firefox 12. When I navigate to some sites I'm unable to view videos because I'm missing some plugin. When I click 'installl missing plugin' I'm still not able to view the video. Any idea I can view them without installing Flash Player (not Open Source I believe)? What directory are these web plugins stored?


Understand output of `udevadm info -a -n /dev/sdb`

I plug an external HDD into my laptop. I try to find out the information by               $ udevadm info -a -n /dev/sdb          Udevadm info starts with the device specified by the devpath and then     walks up the chain of parent devices. It prints for every device     found, all possible attributes in the udev rules key format.     A rule to match, can be composed by the attributes of the device     and the attributes from one single parent device.            looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host10/target10:0:0/10:0:0:0/block/sdb':         KERNEL=="sdb"         SUBSYSTEM=="block"         DRIVER==""         ATTR{range}=="16"         ATTR{ext_range}=="256"         ATTR{removable}=="0"         ATTR{ro}=="0"         ATTR{size}=="312581808"         ATTR{alignment_offset}=="0"         ATTR{discard_alignment}=="0"         ATTR{capability}=="50"         ATTR{stat}=="     322    11207    13259     2196        2        0       16        0        0     1524     2196"         ATTR{inflight}=="       0        0"         ATTR{events}==""         ATTR{events_async}==""         ATTR{events_poll_msecs}=="-1"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host10/target10:0:0/10:0:0:0':         KERNELS=="10:0:0:0"         SUBSYSTEMS=="scsi"         DRIVERS=="sd"         ATTRS{device_blocked}=="0"         ATTRS{type}=="0"         ATTRS{scsi_level}=="0"         ATTRS{vendor}=="USB 2.0 "         ATTRS{model}=="Storage Device  "         ATTRS{rev}=="0100"         ATTRS{state}=="running"         ATTRS{timeout}=="30"         ATTRS{iocounterbits}=="32"         ATTRS{iorequest_cnt}=="0x165"         ATTRS{iodone_cnt}=="0x165"         ATTRS{ioerr_cnt}=="0x2"         ATTRS{evt_media_change}=="0"         ATTRS{dh_state}=="detached"         ATTRS{queue_depth}=="1"         ATTRS{queue_type}=="none"         ATTRS{max_sectors}=="240"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host10/target10:0:0':         KERNELS=="target10:0:0"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host10':         KERNELS=="host10"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0':         KERNELS=="2-1:1.0"         SUBSYSTEMS=="usb"         DRIVERS=="usb-storage"         ATTRS{bInterfaceNumber}=="00"         ATTRS{bAlternateSetting}==" 0"         ATTRS{bNumEndpoints}=="02"         ATTRS{bInterfaceClass}=="08"         ATTRS{bInterfaceSubClass}=="06"         ATTRS{bInterfaceProtocol}=="50"         ATTRS{supports_autosuspend}=="1"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1':         KERNELS=="2-1"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="c0"         ATTRS{bMaxPower}=="  0mA"         ATTRS{urbnum}=="1076"         ATTRS{idVendor}=="0402"         ATTRS{idProduct}=="5621"         ATTRS{bcdDevice}=="0103"         ATTRS{bDeviceClass}=="00"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="00"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="480"         ATTRS{busnum}=="2"         ATTRS{devnum}=="8"         ATTRS{devpath}=="1"         ATTRS{product}=="USB 2.0 Storage Device"         ATTRS{serial}=="00042222200000064007"            looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2':         KERNELS=="usb2"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="e0"         ATTRS{bMaxPower}=="  0mA"         ATTRS{urbnum}=="382"         ATTRS{idVendor}=="1d6b"         ATTRS{idProduct}=="0002"         ATTRS{bcdDevice}=="0302"         ATTRS{bDeviceClass}=="09"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="00"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="480"         ATTRS{busnum}=="2"         ATTRS{devnum}=="1"         ATTRS{devpath}=="0"         ATTRS{version}==" 2.00"         ATTRS{maxchild}=="6"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"         ATTRS{manufacturer}=="Linux 3.2.0-27-generic-pae ehci_hcd"         ATTRS{product}=="EHCI Host Controller"         ATTRS{serial}=="0000:00:1d.7"         ATTRS{authorized_default}=="1"            looking at parent device '/devices/pci0000:00/0000:00:1d.7':         KERNELS=="0000:00:1d.7"         SUBSYSTEMS=="pci"         DRIVERS=="ehci_hcd"         ATTRS{vendor}=="0x8086"         ATTRS{device}=="0x293a"         ATTRS{subsystem_vendor}=="0x17aa"         ATTRS{subsystem_device}=="0x20f1"         ATTRS{class}=="0x0c0320"         ATTRS{irq}=="19"         ATTRS{local_cpus}=="ff"         ATTRS{local_cpulist}=="0-7"         ATTRS{dma_mask_bits}=="32"         ATTRS{consistent_dma_mask_bits}=="32"         ATTRS{broken_parity_status}=="0"         ATTRS{msi_bus}==""         ATTRS{companion}==""         ATTRS{uframe_periodic_max}=="100"            looking at parent device '/devices/pci0000:00':         KERNELS=="pci0000:00"         SUBSYSTEMS==""         DRIVERS==""      I wonder what "the chain of parent devices" is, implied by the output? I don't quite understand what following each `looking at (parent) device` means. For example, Is the first one my external HDD? What are the rest? Why are all except the last two have "usb" within '...'? Is the one next to the last PCI slots? What is the last one that is so empty, although having `pci` in its name? Does "walk up" mean from the external HDD to CPU? Thanks!


command line friendly search engine, for use with Links

Are there any search engines that are friendly enough to be used in Links? Perhaps a google proxy that has no clutter, I find that Google takes a lot of navigating through the mass of links before being able to put cursor in the search bar, bing a little less, duck duck go is almost there but search results work better in google in my opinion. Is there a better search engine I can use or maybe something I can do in Links to get to the seach box faster, currently using arrow keys.


Compiler flags for mplayer2 to optimize it for old hardware

I just compiled `mplayer2` from source (`git://git.mplayer2.org/mplayer2-build.git`) because the repository (ubuntu 12.04) version didn't work on my system. Since I have old hardware I was just wondering if there are some compiler flags I could use to optimize it for my hardware. The CPU is an Athlon XP 2200+ (mobile), 1GB RAM, graphics: Nvidia GeForce4 420 Go. I also want to do the same on another old system with similar specs: CPU: Athlon 1,2 GHZ, 1GB RAM, graphics: [SiS] 65x/M650/740


Getting "Protocol not supported" from setkey: why?

I'm trying to setup an IPsec connection between two Linux systems. I've enabled the kernel options mentioned on the IPsec Howto. I've setup a `setkey` script like this:               #! /usr/sbin/setkey -vf     add 192.168.210.1 192.168.210.2 esp 24501 -E 3des-cbc  "123456789012123456789012";     add 192.168.210.1 192.168.210.2 ah 24500 -A hmac-md5 "1234567890123456";      The results come back with "Protocol not supported" (details below). I've double checked the kernel settings using `/proc/config.gz`: Every one of the options mentioned in the howto has a 'y'. What else might I be missing?               # /flash/ipsec      sadb_msg{ version=2 type=3 errno=0 satype=3       len=16 reserved=0 seq=0 pid=23105     sadb_ext{ len=4 type=9 }     sadb_key{ bits=192 reserved=0       key= 03000500 ff200000 02000000 44f2adbf 00000000 00000000 }     sadb_ext{ len=2 type=1 }     sadb_sa{ spi=24501 replay=0 state=0       auth=0 encrypt=3 flags=0x00000040 }     sadb_ext{ len=2 type=19 }     sadb_x_sa2{ mode=0 reqid=0       reserved1=52 reserved2=2 sequence=1076530488 }     sadb_ext{ len=3 type=5 }     sadb_address{ proto=255 prefixlen=32 reserved=0x0000 }     sockaddr{ len=16 family=2 port=0      44f2adbf  }     sadb_ext{ len=3 type=6 }     sadb_address{ proto=255 prefixlen=32 reserved=0x0000 }     sockaddr{ len=16 family=2 port=0      b86ae316  }          sadb_msg{ version=2 type=3 errno=93 satype=3       len=2 reserved=0 seq=0 pid=23105          The result of line 2: Protocol not supported.     sadb_msg{ version=2 type=3 errno=0 satype=2       len=15 reserved=0 seq=0 pid=23105     sadb_ext{ len=3 type=8 }     sadb_key{ bits=128 reserved=0       key= 02000000 44f2adbf 00000000 00000000 }     sadb_ext{ len=2 type=1 }     sadb_sa{ spi=24500 replay=0 state=0       auth=2 encrypt=0 flags=0x00000040 }     sadb_ext{ len=2 type=19 }     sadb_x_sa2{ mode=0 reqid=0       reserved1=52 reserved2=2 sequence=1076530488 }     sadb_ext{ len=3 type=5 }     sadb_address{ proto=255 prefixlen=32 reserved=0x0000 }     sockaddr{ len=16 family=2 port=0      44f2adbf  }     sadb_ext{ len=3 type=6 }     sadb_address{ proto=255 prefixlen=32 reserved=0x0000 }     sockaddr{ len=16 family=2 port=0      b86ae316  }          sadb_msg{ version=2 type=3 errno=93 satype=2       len=2 reserved=0 seq=0 pid=23105          The result of line 3: Protocol not supported.     #