title: How to force vesa to 1280x1024 resolution

text: I'm using Manjaro (ArchLinux) using vesa driver, since fglrx beta crashes a lot, and radeon and fglrx stable does not support my graphic card. I want to force my monitor resolution to the maximum (1280x1024), how to do it? Here's my xorg.conf               $ cat /etc/X11/xorg.conf          Section "ServerLayout"             Identifier  "X.org Configured"             Screen      0  "Scr0" 0 0     EndSection          Section "Monitor"             Identifier  "Mon0"             VendorName  "Acer"                                                                                ModeLine    "1280x1024_60.00" 109.0 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync             Option      "VendorName" "ATI Proprietary Driver"             Option      "ModelName" "Generic Autodetecting Monitor"             Option      "DPMS" "true"     EndSection          Section "Device"             Identifier  "Gpu0"             Driver      "vesa"             BusID       "PCI:0:1:0"             Option      "DRI"    "true"             VendorName  "AMD"             BoardName   "Radeon HD 8570D"     EndSection          Section "DRI"       Group  "video"       Mode   0666     EndSection           Section "Extensions"             Option "Composite" "Enable"             Option "RENDER"    "Enable"     EndSection           Section "InputClass"             Identifier          "Keyboard Defaults"             MatchIsKeyboard     "yes"             Option              "XkbOptions" "terminate:ctrl_alt_bksp"     EndSection          Section "Screen"             Identifier "Scr0"             Device     "Gpu0"             Monitor    "Mon0"             DefaultDepth     24             SubSection "Display"                     Viewport   0 0                     Depth      24                     Modes      "1280x1024"             EndSubSection     EndSection      startx `/var/log/Xorg.0.log` output:               [559155.270] (II) Loading sub module "vbe"     [559155.270] (II) LoadModule: "vbe"     [559155.270] (II) Loading /usr/lib/xorg/modules/libvbe.so     [559155.270] (II) Module vbe: vendor="X.Org Foundation"     [559155.270]    compiled for 1.14.2, module version = 1.1.0     [559155.270]    ABI class: X.Org Video Driver, version 14.1     [559155.270] (II) Loading sub module "int10"     [559155.270] (II) LoadModule: "int10"     [559155.270] (II) Loading /usr/lib/xorg/modules/libint10.so     [559155.270] (II) Module int10: vendor="X.Org Foundation"     [559155.270]    compiled for 1.14.2, module version = 1.0.0     [559155.270]    ABI class: X.Org Video Driver, version 14.1     [559155.270] (II) VESA(0): initializing int10     [559155.271] (II) VESA(0): Primary V_BIOS segment is: 0xc000     [559155.271] (II) VESA(0): VESA BIOS detected     [559155.271] (II) VESA(0): VESA VBE Version 3.0     [559155.271] (II) VESA(0): VESA VBE Total Mem: 16384 kB     [559155.271] (II) VESA(0): VESA VBE OEM: AMD ATOMBIOS     [559155.271] (II) VESA(0): VESA VBE OEM Software Rev: 15.31     [559155.271] (II) VESA(0): VESA VBE OEM Vendor: (C) 1988-2010, Advanced Micro Devices, Inc.     [559155.271] (II) VESA(0): VESA VBE OEM Product: DVST     [559155.271] (II) VESA(0): VESA VBE OEM Product Rev: 01.00     [559155.291] (II) VESA(0): Creating default Display subsection in Screen section         "Default Screen Section" for depth/fbbpp 24/32     [559155.291] (==) VESA(0): Depth 24, (--) framebuffer bpp 32     [559155.291] (==) VESA(0): RGB weight 888     [559155.291] (==) VESA(0): Default visual is TrueColor     [559155.291] (==) VESA(0): Using gamma correction (1.0, 1.0, 1.0)     [559155.291] (II) Loading sub module "ddc"     [559155.291] (II) LoadModule: "ddc"     [559155.291] (II) Module "ddc" already built-in     [559155.291] (II) VESA(0): VESA VBE DDC supported     [559155.291] (II) VESA(0): VESA VBE DDC Level 2     [559155.291] (II) VESA(0): VESA VBE DDC transfer in appr. 1 sec.     [559155.338] (II) VESA(0): VESA VBE DDC unkown failure 768     [559155.338] (II) VESA(0): Searching for matching VESA mode(s):     *snip*     [559155.343] Mode: 107 (1280x1024)     [559155.343]    ModeAttributes: 0xba     [559155.343]    WinAAttributes: 0x7     [559155.343]    WinBAttributes: 0x0     [559155.343]    WinGranularity: 64     [559155.343]    WinSize: 64     [559155.343]    WinASegment: 0xa000     [559155.343]    WinBSegment: 0x0     [559155.343]    WinFuncPtr: 0xc000594d     [559155.343]    BytesPerScanline: 1280     [559155.343]    XResolution: 1280     [559155.343]    YResolution: 1024     [559155.343]    XCharSize: 8     [559155.343]    YCharSize: 16     [559155.343]    NumberOfPlanes: 1     [559155.343]    BitsPerPixel: 8     [559155.343]    NumberOfBanks: 1     [559155.343]    MemoryModel: 4     [559155.343]    BankSize: 0     [559155.343]    NumberOfImages: 11     [559155.343]    RedMaskSize: 0     [559155.343]    RedFieldPosition: 0     [559155.343]    GreenMaskSize: 0     [559155.343]    GreenFieldPosition: 0     [559155.343]    BlueMaskSize: 0     [559155.343]    BlueFieldPosition: 0     [559155.343]    RsvdMaskSize: 0     [559155.343]    RsvdFieldPosition: 0     [559155.343]    DirectColorModeInfo: 0     [559155.343]    PhysBasePtr: 0xc0000000     [559155.343]    LinBytesPerScanLine: 1280     [559155.343]    BnkNumberOfImagePages: 11     [559155.343]    LinNumberOfImagePages: 11     [559155.343]    LinRedMaskSize: 0     [559155.343]    LinRedFieldPosition: 0     [559155.343]    LinGreenMaskSize: 0     [559155.343]    LinGreenFieldPosition: 0     [559155.343]    LinBlueMaskSize: 0     [559155.343]    LinBlueFieldPosition: 0     [559155.343]    LinRsvdMaskSize: 0     [559155.343]    LinRsvdFieldPosition: 0     [559155.343]    MaxPixelClock: 400000000     *snip*     [559155.349] Mode: 116 (1024x768)     [559155.349]    ModeAttributes: 0xbb     [559155.349]    WinAAttributes: 0x7     [559155.349]    WinBAttributes: 0x0     [559155.349]    WinGranularity: 64     [559155.349]    WinSize: 64     [559155.349]    WinASegment: 0xa000     [559155.349]    WinBSegment: 0x0     [559155.349]    WinFuncPtr: 0xc000594d     [559155.349]    BytesPerScanline: 2048     [559155.349]    XResolution: 1024     [559155.349]    YResolution: 768     [559155.349]    XCharSize: 8     [559155.349]    YCharSize: 16     [559155.349]    NumberOfPlanes: 1     [559155.349]    BitsPerPixel: 16     [559155.349]    NumberOfBanks: 1     [559155.349]    MemoryModel: 6     [559155.349]    BankSize: 0     [559155.349]    NumberOfImages: 9     [559155.349]    RedMaskSize: 5     [559155.349]    RedFieldPosition: 10     [559155.349]    GreenMaskSize: 5     [559155.349]    GreenFieldPosition: 5     [559155.349]    BlueMaskSize: 5     [559155.349]    BlueFieldPosition: 0     [559155.349]    RsvdMaskSize: 0     [559155.349]    RsvdFieldPosition: 0     [559155.349]    DirectColorModeInfo: 0     [559155.349]    PhysBasePtr: 0xc0000000     [559155.349]    LinBytesPerScanLine: 2048     [559155.349]    BnkNumberOfImagePages: 9     [559155.349]    LinNumberOfImagePages: 9     [559155.349]    LinRedMaskSize: 5     [559155.349]    LinRedFieldPosition: 10     [559155.349]    LinGreenMaskSize: 5     [559155.349]    LinGreenFieldPosition: 5     [559155.349]    LinBlueMaskSize: 5     [559155.349]    LinBlueFieldPosition: 0     [559155.349]    LinRsvdMaskSize: 0     [559155.349]    LinRsvdFieldPosition: 0     [559155.349]    MaxPixelClock: 400000000     [559155.350] Mode: 117 (1024x768)     [559155.350]    ModeAttributes: 0xbb     [559155.350]    WinAAttributes: 0x7     [559155.350]    WinBAttributes: 0x0     [559155.350]    WinGranularity: 64     [559155.350]    WinSize: 64     [559155.350]    WinASegment: 0xa000     [559155.350]    WinBSegment: 0x0     [559155.350]    WinFuncPtr: 0xc000594d     [559155.350]    BytesPerScanline: 2048     [559155.350]    XResolution: 1024     [559155.350]    YResolution: 768     [559155.350]    XCharSize: 8     [559155.350]    YCharSize: 16     [559155.350]    NumberOfPlanes: 1     [559155.350]    BitsPerPixel: 16     [559155.350]    NumberOfBanks: 1     [559155.350]    MemoryModel: 6     [559155.350]    BankSize: 0     [559155.350]    NumberOfImages: 9     [559155.350]    RedMaskSize: 5     [559155.350]    RedFieldPosition: 11     [559155.350]    GreenMaskSize: 6     [559155.350]    GreenFieldPosition: 5     [559155.350]    BlueMaskSize: 5     [559155.350]    BlueFieldPosition: 0     [559155.350]    RsvdMaskSize: 0     [559155.350]    RsvdFieldPosition: 0     [559155.350]    DirectColorModeInfo: 0     [559155.350]    PhysBasePtr: 0xc0000000     [559155.350]    LinBytesPerScanLine: 2048     [559155.350]    BnkNumberOfImagePages: 9     [559155.350]    LinNumberOfImagePages: 9     [559155.350]    LinRedMaskSize: 5     [559155.350]    LinRedFieldPosition: 11     [559155.350]    LinGreenMaskSize: 6     [559155.350]    LinGreenFieldPosition: 5     [559155.350]    LinBlueMaskSize: 5     [559155.351]    LinBlueFieldPosition: 0     [559155.351]    LinRsvdMaskSize: 0     [559155.351]    LinRsvdFieldPosition: 0     [559155.351]    MaxPixelClock: 400000000     [559155.351] Mode: 119 (1280x1024)     [559155.351]    ModeAttributes: 0xba     [559155.351]    WinAAttributes: 0x7     [559155.351]    WinBAttributes: 0x0     [559155.351]    WinGranularity: 64     [559155.351]    WinSize: 64     [559155.351]    WinASegment: 0xa000     [559155.351]    WinBSegment: 0x0     [559155.351]    WinFuncPtr: 0xc000594d     [559155.351]    BytesPerScanline: 2560     [559155.351]    XResolution: 1280     [559155.351]    YResolution: 1024     [559155.351]    XCharSize: 8     [559155.351]    YCharSize: 16     [559155.351]    NumberOfPlanes: 1     [559155.351]    BitsPerPixel: 16     [559155.351]    NumberOfBanks: 1     [559155.351]    MemoryModel: 6     [559155.351]    BankSize: 0     [559155.351]    NumberOfImages: 5     [559155.351]    RedMaskSize: 5     [559155.351]    RedFieldPosition: 10     [559155.351]    GreenMaskSize: 5     [559155.351]    GreenFieldPosition: 5     [559155.351]    BlueMaskSize: 5     [559155.351]    BlueFieldPosition: 0     [559155.351]    RsvdMaskSize: 0     [559155.351]    RsvdFieldPosition: 0     [559155.351]    DirectColorModeInfo: 0     [559155.351]    PhysBasePtr: 0xc0000000     [559155.351]    LinBytesPerScanLine: 2560     [559155.351]    BnkNumberOfImagePages: 5     [559155.351]    LinNumberOfImagePages: 5     [559155.351]    LinRedMaskSize: 5     [559155.351]    LinRedFieldPosition: 10     [559155.351]    LinGreenMaskSize: 5     [559155.351]    LinGreenFieldPosition: 5     [559155.351]    LinBlueMaskSize: 5     [559155.351]    LinBlueFieldPosition: 0     [559155.351]    LinRsvdMaskSize: 0     [559155.351]    LinRsvdFieldPosition: 0     [559155.351]    MaxPixelClock: 400000000     [559155.352] Mode: 11a (1280x1024)     [559155.352]    ModeAttributes: 0xba     [559155.352]    WinAAttributes: 0x7     [559155.352]    WinBAttributes: 0x0     [559155.352]    WinGranularity: 64     [559155.352]    WinSize: 64     [559155.352]    WinASegment: 0xa000     [559155.352]    WinBSegment: 0x0     [559155.352]    WinFuncPtr: 0xc000594d     [559155.352]    BytesPerScanline: 2560     [559155.352]    XResolution: 1280     [559155.352]    YResolution: 1024     [559155.352]    XCharSize: 8     [559155.352]    YCharSize: 16     [559155.352]    NumberOfPlanes: 1     [559155.352]    BitsPerPixel: 16     [559155.352]    NumberOfBanks: 1     [559155.352]    MemoryModel: 6     [559155.352]    BankSize: 0     [559155.352]    NumberOfImages: 5     [559155.352]    RedMaskSize: 5     [559155.352]    RedFieldPosition: 11     [559155.352]    GreenMaskSize: 6     [559155.352]    GreenFieldPosition: 5     [559155.352]    BlueMaskSize: 5     [559155.352]    BlueFieldPosition: 0     [559155.352]    RsvdMaskSize: 0     [559155.352]    RsvdFieldPosition: 0     [559155.352]    DirectColorModeInfo: 0     [559155.352]    PhysBasePtr: 0xc0000000     [559155.352]    LinBytesPerScanLine: 2560     [559155.352]    BnkNumberOfImagePages: 5     [559155.352]    LinNumberOfImagePages: 5     [559155.352]    LinRedMaskSize: 5     [559155.352]    LinRedFieldPosition: 11     [559155.352]    LinGreenMaskSize: 6     [559155.352]    LinGreenFieldPosition: 5     [559155.352]    LinBlueMaskSize: 5     [559155.352]    LinBlueFieldPosition: 0     [559155.352]    LinRsvdMaskSize: 0     [559155.352]    LinRsvdFieldPosition: 0     [559155.352]    MaxPixelClock: 400000000     *snip*     [559155.358] *Mode: 123 (1024x768)     [559155.358]    ModeAttributes: 0xbb     [559155.358]    WinAAttributes: 0x7     [559155.358]    WinBAttributes: 0x0     [559155.358]    WinGranularity: 64     [559155.358]    WinSize: 64     [559155.358]    WinASegment: 0xa000     [559155.358]    WinBSegment: 0x0     [559155.358]    WinFuncPtr: 0xc000594d     [559155.358]    BytesPerScanline: 4096     [559155.358]    XResolution: 1024     [559155.358]    YResolution: 768     [559155.358]    XCharSize: 8     [559155.358]    YCharSize: 16     [559155.358]    NumberOfPlanes: 1     [559155.358]    BitsPerPixel: 32     [559155.358]    NumberOfBanks: 1     [559155.358]    MemoryModel: 6     [559155.358]    BankSize: 0     [559155.358]    NumberOfImages: 4     [559155.358]    RedMaskSize: 8     [559155.358]    RedFieldPosition: 16     [559155.358]    GreenMaskSize: 8     [559155.358]    GreenFieldPosition: 8     [559155.358]    BlueMaskSize: 8     [559155.358]    BlueFieldPosition: 0     [559155.358]    RsvdMaskSize: 0     [559155.358]    RsvdFieldPosition: 0     [559155.358]    DirectColorModeInfo: 0     [559155.358]    PhysBasePtr: 0xc0000000     [559155.358]    LinBytesPerScanLine: 4096     [559155.358]    BnkNumberOfImagePages: 4     [559155.358]    LinNumberOfImagePages: 4     [559155.358]    LinRedMaskSize: 8     [559155.358]    LinRedFieldPosition: 16     [559155.358]    LinGreenMaskSize: 8     [559155.358]    LinGreenFieldPosition: 8     [559155.358]    LinBlueMaskSize: 8     [559155.358]    LinBlueFieldPosition: 0     [559155.358]    LinRsvdMaskSize: 0     [559155.358]    LinRsvdFieldPosition: 0     [559155.358]    MaxPixelClock: 400000000     [559155.359] Mode: 124 (1280x1024)     [559155.359]    ModeAttributes: 0xba     [559155.359]    WinAAttributes: 0x7     [559155.359]    WinBAttributes: 0x0     [559155.359]    WinGranularity: 64     [559155.359]    WinSize: 64     [559155.359]    WinASegment: 0xa000     [559155.359]    WinBSegment: 0x0     [559155.359]    WinFuncPtr: 0xc000594d     [559155.359]    BytesPerScanline: 5120     [559155.359]    XResolution: 1280     [559155.359]    YResolution: 1024     [559155.359]    XCharSize: 8     [559155.359]    YCharSize: 16     [559155.359]    NumberOfPlanes: 1     [559155.359]    BitsPerPixel: 32     [559155.359]    NumberOfBanks: 1     [559155.359]    MemoryModel: 6     [559155.359]    BankSize: 0     [559155.359]    NumberOfImages: 2     [559155.359]    RedMaskSize: 8     [559155.359]    RedFieldPosition: 16     [559155.359]    GreenMaskSize: 8     [559155.359]    GreenFieldPosition: 8     [559155.359]    BlueMaskSize: 8     [559155.359]    BlueFieldPosition: 0     [559155.359]    RsvdMaskSize: 0     [559155.359]    RsvdFieldPosition: 0     [559155.359]    DirectColorModeInfo: 0     [559155.359]    PhysBasePtr: 0xc0000000     [559155.359]    LinBytesPerScanLine: 5120     [559155.359]    BnkNumberOfImagePages: 2     [559155.359]    LinNumberOfImagePages: 2     [559155.359]    LinRedMaskSize: 8     [559155.359]    LinRedFieldPosition: 16     [559155.359]    LinGreenMaskSize: 8     [559155.359]    LinGreenFieldPosition: 8     [559155.359]    LinBlueMaskSize: 8     [559155.359]    LinBlueFieldPosition: 0     [559155.359]    LinRsvdMaskSize: 0     [559155.359]    LinRsvdFieldPosition: 0     [559155.359]    MaxPixelClock: 400000000     *snip*     [559155.364] (II) VESA(0): Total Memory: 256 64KB banks (16384kB)     [559155.364] (II) VESA(0): <default monitor>: Using default hsync range of 31.50-48.00 kHz     [559155.364] (II) VESA(0): <default monitor>: Using default vrefresh range of 50.00-70.00 Hz     [559155.364] (II) VESA(0): <default monitor>: Using default maximum pixel clock of 65.00 MHz     [559155.364] (WW) VESA(0): Unable to estimate virtual size     [559155.364] (II) VESA(0): Not using built-in mode "1024x768" (no mode of this name)     [559155.364] (II) VESA(0): Not using built-in mode "800x600" (no mode of this name)     [559155.364] (II) VESA(0): Not using built-in mode "640x480" (no mode of this name)     [559155.364] (WW) VESA(0): No valid modes left. Trying less strict filter...     [559155.364] (II) VESA(0): <default monitor>: Using hsync range of 31.50-48.00 kHz     [559155.364] (II) VESA(0): <default monitor>: Using vrefresh range of 50.00-70.00 Hz     [559155.364] (II) VESA(0): <default monitor>: Using maximum pixel clock of 65.00 MHz     [559155.364] (WW) VESA(0): Unable to estimate virtual size     [559155.364] (--) VESA(0): Virtual size is 1024x768 (pitch 1024)     [559155.364] (**) VESA(0): *Built-in mode "1024x768"     [559155.364] (**) VESA(0): *Built-in mode "800x600"     [559155.364] (**) VESA(0): *Built-in mode "640x480"     [559155.364] (==) VESA(0): DPI set to (96, 96)     [559155.364] (II) VESA(0): Attempting to use 60Hz refresh for mode "1024x768" (123)     [559155.364] (II) VESA(0): Attempting to use 60Hz refresh for mode "800x600" (122)     [559155.364] (II) VESA(0): Attempting to use 60Hz refresh for mode "640x480" (121)     [559155.364] (**) VESA(0): Using "Shadow Framebuffer"     [559155.364] (II) Loading sub module "shadow"     [559155.364] (II) LoadModule: "shadow"     [559155.365] (II) Loading /usr/lib/xorg/modules/libshadow.so     [559155.365] (II) Module shadow: vendor="X.Org Foundation"     [559155.365]    compiled for 1.14.2, module version = 1.1.0     [559155.365]    ABI class: X.Org ANSI C Emulation, version 0.4     [559155.365] (II) Loading sub module "fb"     [559155.365] (II) LoadModule: "fb"     [559155.365] (II) Loading /usr/lib/xorg/modules/libfb.so     [559155.365] (II) Module fb: vendor="X.Org Foundation"     [559155.365]    compiled for 1.14.2, module version = 1.0.0     [559155.365]    ABI class: X.Org ANSI C Emulation, version 0.4     [559155.365] (==) Depth 24 pixmap format is 32 bpp     [559155.365] (II) Loading sub module "int10"     [559155.365] (II) LoadModule: "int10"     [559155.365] (II) Loading /usr/lib/xorg/modules/libint10.so     [559155.365] (II) Module int10: vendor="X.Org Foundation"     [559155.365]    compiled for 1.14.2, module version = 1.0.0     [559155.365]    ABI class: X.Org Video Driver, version 14.1     [559155.365] (II) VESA(0): initializing int10     [559155.365] (II) VESA(0): Primary V_BIOS segment is: 0xc000     [559155.365] (II) VESA(0): VESA BIOS detected     [559155.365] (II) VESA(0): VESA VBE Version 3.0     [559155.365] (II) VESA(0): VESA VBE Total Mem: 16384 kB     [559155.365] (II) VESA(0): VESA VBE OEM: AMD ATOMBIOS     [559155.365] (II) VESA(0): VESA VBE OEM Software Rev: 15.31     [559155.365] (II) VESA(0): VESA VBE OEM Vendor: (C) 1988-2010, Advanced Micro Devices, Inc.     [559155.365] (II) VESA(0): VESA VBE OEM Product: DVST     [559155.365] (II) VESA(0): VESA VBE OEM Product Rev: 01.00     [559155.366] (II) VESA(0): virtual address = 0xb5d08000,         physical address = 0xc0000000, size = 16777216     [559155.524] (II) VESA(0): Setting up VESA Mode 0x123 (1024x768)     [559155.524] (II) VESA(0): VBESetVBEMode failed, mode set without customized refresh.     [559156.375] (==) VESA(0): Default visual is TrueColor     [559156.375] (==) VESA(0): Backing store disabled     [559156.375] (==) VESA(0): DPMS enabled     [559156.375] (WW) VESA(0): Option "DRI" is not used     [559156.375] (==) RandR enabled     [559156.383] (II) AIGLX: Screen 0 is not DRI2 capable     [559156.383] (II) AIGLX: Screen 0 is not DRI capable     [559157.403] (II) AIGLX: Loaded and initialized swrast     [559157.403] (II) GLX: Initialized DRISWRAST GL provider for screen 0     [559157.450] (II) config/udev: Adding input device Power Button (/dev/input/event4)     [559157.450] (**) Power Button: Applying InputClass "evdev keyboard catchall"     [559157.450] (**) Power Button: Applying InputClass "Keyboard Defaults"     [559157.450] (II) LoadModule: "evdev"     [559157.450] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so     [559157.450] (II) Module evdev: vendor="X.Org Foundation"     [559157.450]    compiled for 1.14.2, module version = 2.8.1     [559157.450]    Module class: X.Org XInput Driver     [559157.450]    ABI class: X.Org XInput driver, version 19.1     [559157.450] (II) Using input driver 'evdev' for 'Power Button'     [559157.450] (**) Power Button: always reports core events     [559157.450] (**) evdev: Power Button: Device: "/dev/input/event4"     [559157.450] (--) evdev: Power Button: Vendor 0 Product 0x1     [559157.450] (--) evdev: Power Button: Found keys     [559157.450] (II) evdev: Power Button: Configuring as keyboard     [559157.450] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input4/event4"     [559157.450] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)     [559157.450] (**) Option "xkb_rules" "evdev"     [559157.450] (**) Option "xkb_model" "pc104"     [559157.450] (**) Option "xkb_layout" "us"     [559157.450] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"     [559157.479] (II) config/udev: Adding input device Power Button (/dev/input/event3)     [559157.479] (**) Power Button: Applying InputClass "evdev keyboard catchall"     [559157.479] (**) Power Button: Applying InputClass "Keyboard Defaults"     [559157.479] (II) Using input driver 'evdev' for 'Power Button'     [559157.479] (**) Power Button: always reports core events     [559157.479] (**) evdev: Power Button: Device: "/dev/input/event3"     [559157.479] (--) evdev: Power Button: Vendor 0 Product 0x1     [559157.479] (--) evdev: Power Button: Found keys     [559157.479] (II) evdev: Power Button: Configuring as keyboard     [559157.479] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input3/event3"     [559157.480] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 7)     [559157.480] (**) Option "xkb_rules" "evdev"     [559157.480] (**) Option "xkb_model" "pc104"     [559157.480] (**) Option "xkb_layout" "us"     [559157.480] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"     [559157.480] (II) config/udev: Adding input device USB USB Keyboard (/dev/input/event1)     [559157.480] (**) USB USB Keyboard: Applying InputClass "evdev keyboard catchall"     [559157.480] (**) USB USB Keyboard: Applying InputClass "Keyboard Defaults"     [559157.480] (II) Using input driver 'evdev' for 'USB USB Keyboard'     [559157.480] (**) USB USB Keyboard: always reports core events     [559157.480] (**) evdev: USB USB Keyboard: Device: "/dev/input/event1"     [559157.481] (--) evdev: USB USB Keyboard: Vendor 0x1a2c Product 0xc21     [559157.481] (--) evdev: USB USB Keyboard: Found keys     [559157.481] (II) evdev: USB USB Keyboard: Configuring as keyboard     [559157.481] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-5/3-5:1.0/input/input1/event1"     [559157.481] (II) XINPUT: Adding extended input device "USB USB Keyboard" (type: KEYBOARD, id 8)     [559157.481] (**) Option "xkb_rules" "evdev"     [559157.481] (**) Option "xkb_model" "pc104"     [559157.481] (**) Option "xkb_layout" "us"     [559157.481] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"     [559157.481] (II) config/udev: Adding input device USB USB Keyboard (/dev/input/event2)     [559157.481] (**) USB USB Keyboard: Applying InputClass "evdev pointer catchall"     [559157.482] (**) USB USB Keyboard: Applying InputClass "evdev keyboard catchall"     [559157.482] (**) USB USB Keyboard: Applying InputClass "Keyboard Defaults"     [559157.482] (II) Using input driver 'evdev' for 'USB USB Keyboard'     [559157.482] (**) USB USB Keyboard: always reports core events     [559157.482] (**) evdev: USB USB Keyboard: Device: "/dev/input/event2"     [559157.482] (--) evdev: USB USB Keyboard: Vendor 0x1a2c Product 0xc21     [559157.482] (--) evdev: USB USB Keyboard: Found 3 mouse buttons     [559157.482] (--) evdev: USB USB Keyboard: Found scroll wheel(s)     [559157.482] (--) evdev: USB USB Keyboard: Found relative axes     [559157.482] (--) evdev: USB USB Keyboard: Found x and y relative axes     [559157.482] (--) evdev: USB USB Keyboard: Found absolute axes     [559157.482] (II) evdev: USB USB Keyboard: Forcing absolute x/y axes to exist.     [559157.482] (--) evdev: USB USB Keyboard: Found keys     [559157.482] (II) evdev: USB USB Keyboard: Configuring as mouse     [559157.482] (II) evdev: USB USB Keyboard: Configuring as keyboard     [559157.482] (II) evdev: USB USB Keyboard: Adding scrollwheel support     [559157.482] (**) evdev: USB USB Keyboard: YAxisMapping: buttons 4 and 5     [559157.482] (**) evdev: USB USB Keyboard: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [559157.482] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:12.0/usb3/3-5/3-5:1.1/input/input2/event2"     [559157.482] (II) XINPUT: Adding extended input device "USB USB Keyboard" (type: KEYBOARD, id 9)     [559157.482] (**) Option "xkb_rules" "evdev"     [559157.482] (**) Option "xkb_model" "pc104"     [559157.482] (**) Option "xkb_layout" "us"     [559157.482] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"     [559157.482] (II) evdev: USB USB Keyboard: initialized for relative axes.     [559157.482] (WW) evdev: USB USB Keyboard: ignoring absolute axes.     [559157.482] (**) USB USB Keyboard: (accel) keeping acceleration scheme 1     [559157.483] (**) USB USB Keyboard: (accel) acceleration profile 0     [559157.483] (**) USB USB Keyboard: (accel) acceleration factor: 2.000     [559157.483] (**) USB USB Keyboard: (accel) acceleration threshold: 4     [559157.483] (II) config/udev: Adding input device USB USB Keyboard (/dev/input/mouse1)     [559157.483] (**) USB USB Keyboard: Applying InputClass "Keyboard Defaults"     [559157.483] (II) No input driver specified, ignoring this device.     [559157.483] (II) This device may have been added with another device file.     [559157.483] (II) config/udev: Adding input device PixArt USB Optical Mouse (/dev/input/event0)     [559157.483] (**) PixArt USB Optical Mouse: Applying InputClass "evdev pointer catchall"     [559157.483] (II) Using input driver 'evdev' for 'PixArt USB Optical Mouse'     [559157.483] (**) PixArt USB Optical Mouse: always reports core events     [559157.483] (**) evdev: PixArt USB Optical Mouse: Device: "/dev/input/event0"     [559157.484] (--) evdev: PixArt USB Optical Mouse: Vendor 0x93a Product 0x2510     [559157.484] (--) evdev: PixArt USB Optical Mouse: Found 3 mouse buttons     [559157.484] (--) evdev: PixArt USB Optical Mouse: Found scroll wheel(s)     [559157.484] (--) evdev: PixArt USB Optical Mouse: Found relative axes     [559157.484] (--) evdev: PixArt USB Optical Mouse: Found x and y relative axes     [559157.484] (II) evdev: PixArt USB Optical Mouse: Configuring as mouse     [559157.484] (II) evdev: PixArt USB Optical Mouse: Adding scrollwheel support     [559157.484] (**) evdev: PixArt USB Optical Mouse: YAxisMapping: buttons 4 and 5     [559157.484] (**) evdev: PixArt USB Optical Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [559157.484] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:13.0/usb4/4-1/4-1:1.0/input/input104/event0"     [559157.484] (II) XINPUT: Adding extended input device "PixArt USB Optical Mouse" (type: MOUSE, id 10)     [559157.484] (II) evdev: PixArt USB Optical Mouse: initialized for relative axes.     [559157.484] (**) PixArt USB Optical Mouse: (accel) keeping acceleration scheme 1     [559157.484] (**) PixArt USB Optical Mouse: (accel) acceleration profile 0     [559157.484] (**) PixArt USB Optical Mouse: (accel) acceleration factor: 2.000     [559157.484] (**) PixArt USB Optical Mouse: (accel) acceleration threshold: 4     [559157.484] (II) config/udev: Adding input device PixArt USB Optical Mouse (/dev/input/mouse0)     [559157.484] (II) No input driver specified, ignoring this device.     [559157.484] (II) This device may have been added with another device file.     [559157.485] (II) config/udev: Adding input device HD-Audio Generic Front Headphone (/dev/input/event5)     [559157.485] (II) No input driver specified, ignoring this device.     [559157.485] (II) This device may have been added with another device file.     [559157.485] (II) config/udev: Adding input device HD-Audio Generic Line Out (/dev/input/event6)     [559157.485] (II) No input driver specified, ignoring this device.     [559157.485] (II) This device may have been added with another device file.     [559157.485] (II) config/udev: Adding input device HD-Audio Generic Line (/dev/input/event7)     [559157.485] (II) No input driver specified, ignoring this device.     [559157.486] (II) This device may have been added with another device file.     [559157.486] (II) config/udev: Adding input device HD-Audio Generic Rear Mic (/dev/input/event8)     [559157.486] (II) No input driver specified, ignoring this device.     [559157.486] (II) This device may have been added with another device file.     [559157.486] (II) config/udev: Adding input device HD-Audio Generic Front Mic (/dev/input/event9)     [559157.486] (II) No input driver specified, ignoring this device.     [559157.486] (II) This device may have been added with another device file.     [559171.032] (II) VESA(0): Setting up VESA Mode 0x123 (1024x768)     [559198.930] (II) VESA(0): Setting up VESA Mode 0x123 (1024x768)     [559205.280] (II) VESA(0): Setting up VESA Mode 0x123 (1024x768)     [559225.875] (II) VESA(0): Setting up VESA Mode 0x123 (1024x768)


title: Why does the file command say that ELF binaries are for Linux 2.6.9?

text: Whenever I run file on an ELF binary I get this output:               [jonescb@localhost ~]$ file a.out     a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for     GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9,      not stripped      I'm just wondering what changed in Linux 2.6.9 that this binary couldn't run on 2.6.8? Wasn't ELF support added in Linux 2.0? I'm no expert on the history of the kernel though.


title: Use emacs as an editor within itself (ansi-term)

text: I'm using `M-x ansi-term` within emacs, and a lot of the tools I use (not only git) are opening editors using `$EDITOR`. Because running emacs within itself is kind of annoying, I'd like to configure my `$EDITOR` variable such that it opens a new buffer in the emacs session that's running the current instance of `ansi-term`. Is there any way to do this?


title: Block local (unix) users from sending mail

text: Is there a way to block a local/unix user (or a list of local users) from sending mails via `mail` command (or maybe even in postfix, which is the MTA I have).


title: Is it possible to use multiple here-docs in bash?

text: Can one use multiple here-docs to provide input to a command in bash?               $ cat <<<foo <<<bar     bar     $ cat <<EOF1 <<EOF2     > foo     > EOF1     > bar     > EOF2     bar      Obviously, in both cases, the second here-doc is used as stdin, and replaces the first reference. Is the solution to use `echo`s instead?               $ cat <(echo -n foo) <(echo bar)     foobar      Also, for some reason, using a combination didn't work for me. Why would that be?               $ cat <<<foo <(echo bar)     bar     $ cat <(echo -n foo) <<<bar     foo


title: Yum- upgrading packages that are running

text: Is Yum designed in such a way (or is the underlying system) that you can safely upgrade a binary while it's running? For example, you have MySQL 5.5 and you run `yum -y install mysql56-server` to upgrade to MySQL 5.6 it doesn't generally complain. Does that mean it's OK to do so? Is it that any needed libraries or binaries are already loaded into the process's memory context?


title: What is the scope of using rsync in sync-ing my target root file system from my host?

text: I have a target and host setup with Linux as the OS on both. I have a root file system(`RFS`) in my target. I have a setup in which my RFS is in development state so it will undergo changes on the fly. My requirement is that, every time I make a change, I need to sync my current RFS to my target RFS. One of my colleague suggested that I can use `rsync` to attain my task. Please shed your valuable suggestions on this idea.   All other ideas are also welcomed.


title: Adding an empty line at the end of input

text: I have some command which produces output with no new line at the end, like this               Myprompt$ somecmd     dksfjdl     dsfjdlkfj     dsfjdkfj     dfjdkfjMyprompt$      Currently I overcome this by `somecmd | sed 's/$/\n/' | tr -s '\n'` Is there a better way to do this?


title: Is there a tool that allows logging of memory usage?

text: I want to monitor memory usage of a process, and I want this data to be logged. Does such a tool exist?


title: How is an Interrupt handled in Linux?

text: I just know that `Interrupt` is a `hardware signal assertion` caused in a processor pin. But I would like to know how Linux OS handles it.   What all are the things that happen when an interrupt occurs?


title: Can btrfs handle different RAID levels for different subvolumes?

text: I'd like to assign different RAID levels to different subvolumes in my btrfs filesystem, eg have a subvolume /home that uses RAID 1 and a subvolume /var that uses RAID 0. Is that at all possible (if so, how?) or do I have to rely on separate filesystems / partitions to achieve this?


title: How to redirect per-CPU top output to file?

text: I want redirect `top` output to a file, but I am interested in the per-CPU usage. Doing just               #I only want to see processes belonging to myuser     top -b -d 1 -u myuser > top.txt      gives me stats with all the CPUs usage combined. Running just `top` and then pressing `1` makes top break out per-CPU usage. How do I redirect this to the file? I've seen some related questions: How can I receive top-like CPU statistics from the shell? How do I stream a top snapshot into a file But not found the answer to how to make the part of the command before the redirect operator take the `1` that top needs for per-CPU stats.


title: Why was letter 's' chosen as on option for human readable format in quota command?

text: I often try to memorize command options by looking up for what they stand for. This time I couldn't find any source on that: why is `quota -s` a `\--human- readable` alternative, what does `s` stand for?


title: VDPAU library not found

text: I want to try this VAAPI backend for VDPAU. I have compiled **mplayer** with vdpau in Gentoo Linux (amd64) but I get this error:               Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory     [vdpau] Error when calling vdp_device_create_x11: 1       The same error appears when I run **vdpauinfo**. The library seems to be linked:               $ ldd /usr/bin/mplayer | grep vdpau         libvdpau.so.1 => /usr/lib64/libvdpau.so.1 (0x00007f8242fda000)       And libraries exist:               $ ls -l /usr/lib64/libvdpau.so*     lrwxrwxrwx 1 root root    17 jul  8 22:24 /usr/lib64/libvdpau.so -> libvdpau.so.1.0.0     lrwxrwxrwx 1 root root    17 jul  8 22:24 /usr/lib64/libvdpau.so.1 -> libvdpau.so.1.0.0     -rwxr-xr-x 1 root root 14560 jul  8 22:24 /usr/lib64/libvdpau.so.1.0.0      $ ls -l /usr/lib64/vdpau/     total 156     lrwxrwxrwx 1 root root     23 jul  8 22:24 libvdpau_trace.so -> libvdpau_trace.so.1.0.0     lrwxrwxrwx 1 root root     23 jul  8 22:24 libvdpau_trace.so.1 -> libvdpau_trace.so.1.0.0     -rwxr-xr-x 1 root root  51032 jul  8 22:24 libvdpau_trace.so.1.0.0     lrwxrwxrwx 1 root root     19 jul 12 21:34 libvdpau_va_gl.so -> libvdpau_va_gl.so.1     -rwxr-xr-x 1 root root 105360 jul 12 21:34 libvdpau_va_gl.so.1


title: MacOsx - Shell - list all .php files and their octal permissions, inside a specifc folder

text: is it possible to list all the ".php" files located into a direcotry and their octal permissions? I would like to list them like this:               775 /folder/file.php     644 /folder/asd/file2.php     etc...


title: How to open OLE2 Compound Document Storage database?

text: I have file called Thumbs.db that I seem unable to open with anything. SQLite Database Browser can't do it, nor can LibreOffice Base. Opening up the file properties tells me it's an 'OLE2 Compound Document Storage' file. I'm running elementaryOS (an Ubuntu derivative) on a HP Folio 13.


title: How to find last deleted files on OpenSuse?

text: I didn't lock the screen on my OpenSuse Linux and let my girlfriend do all evil things when I was sleeping. Is there a way to find out if she deleted any files from my PC? I was looking at the "Date Modified" timestamp of my folders and then I tried to delete something and that date didn't change. I was also looking at logs in `/var/log`, but I don't know where exactly to look and also haven't found anything. I think she deleted files by moving them to the trash can and then emptying the trash can and I think that this procedure will be in some log.


title: Are SUSE servers intended to be used graphically?

text: After being a long-time Debian Linux user, I decided to give SUSE a try. One of the major selling points of SUSE is the `YaST` configuration system. It provides a set of wizards for common configuration tasks. Almost every tutorial I can find uses `YaST` at some point. Unfortunately, the text version of the utility seems to lack many of the features present in the GUI version. In fact, all of the tutorials I can find (for setting up `LDAP` services for example) assume that you are using the GUI. The only documented way I can find to use the `YaST` GUI remotely is forwarding a connection from a minimal X server over SSH. I was very surprised by this, as such heavy use of GUI tools is much more Windows like than UNIX like. Are SUSE servers simply designed to be used graphically?


title: How to speed my too-slow ssh login?

text: Running `ssh user@hostname` takes ~30s. Here's the scenario:   * this is a VM on the local LAN   * Windows and Mac machines get instant login   * am using Debian and I could reproduce with an Ubuntu machine   * someone using Ubuntu says that logging into my machine (local LAN) is also instant   * using hostname IP address takes about half as much time (~15s) [ **update** ] Using `ssh -vvv user@hostname`, here's where it waits the most:               debug3: authmethod_lookup gssapi-with-mic     debug3: remaining preferred: publickey,keyboard-interactive,password     debug3: authmethod_is_enabled gssapi-with-mic     debug1: Next authentication method: gssapi-with-mic      And then it waits a bit here:               debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_1000' not found          debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_1000' not found


title: SSH "sleeping" for a long time before connect?

text: > **Possible Duplicate:**   >  How to speed my too-slow ssh login? I have a very strange issue with my SSH server. Whenever I attempt to connect, it literally waits about 30 seconds to a minute before allowing the connection. Other servers in the same datacenter are connecting in about 2-3 seconds, while this one waits just about the same amount of time before letting any connections through. Is there a configuration option which I can use to tweak this delay time? It's running OpenSSH 4.3p2, OpenSSL 0.9.8e-fips- rhel5. Here's the output from `ssh -v user@myserver`:               OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to myserver [2.2.2.2] port 22.     debug1: Connection established.     debug3: Incorrect RSA1 identifier     debug3: Could not load "/home/rfkrocktk/.ssh/id_rsa" as a RSA1 public key     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'Proc-Type:'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'DEK-Info:'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /home/rfkrocktk/.ssh/id_rsa type 1     debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048     debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048     debug1: identity file /home/rfkrocktk/.ssh/id_rsa-cert type -1     debug3: Incorrect RSA1 identifier     debug3: Could not load "/home/rfkrocktk/.ssh/id_dsa" as a RSA1 public key     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'Proc-Type:'     debug3: key_read: missing keytype     debug2: key_type_from_name: unknown key type 'DEK-Info:'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /home/rfkrocktk/.ssh/id_dsa type 2     debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024     debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024     debug1: identity file /home/rfkrocktk/.ssh/id_dsa-cert type -1     debug1: identity file /home/rfkrocktk/.ssh/id_ecdsa type -1     debug1: identity file /home/rfkrocktk/.ssh/id_ecdsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3     debug1: match: OpenSSH_4.3 pat OpenSSH_4*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3     debug2: fd 3 setting O_NONBLOCK     debug3: load_hostkeys: loading entries for host "myserver" from file "/home/rfkrocktk/.ssh/known_hosts"     debug3: load_hostkeys: found key type RSA in file /home/rfkrocktk/.ssh/known_hosts:27     debug3: load_hostkeys: loaded 1 keys     debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5     debug1: kex: server->client aes128-ctr hmac-md5 none     debug2: mac_setup: found hmac-md5     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug2: dh_gen_key: priv key bits set: 124/256     debug2: bits set: 515/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Server host key: RSA cd:e9:ff:ef:af:d0:a9:f4:23:85:4b:32:6c:be:f3:bc     debug3: load_hostkeys: loading entries for host "myserver" from file "/home/rfkrocktk/.ssh/known_hosts"     debug3: load_hostkeys: found key type RSA in file /home/rfkrocktk/.ssh/known_hosts:27     debug3: load_hostkeys: loaded 1 keys     debug3: load_hostkeys: loading entries for host "2.2.2.2" from file "/home/rfkrocktk/.ssh/known_hosts"     debug3: load_hostkeys: found key type RSA in file /home/rfkrocktk/.ssh/known_hosts:34     debug3: load_hostkeys: loaded 1 keys     debug1: Host 'myserver' is known and matches the RSA host key.     debug1: Found key in /home/rfkrocktk/.ssh/known_hosts:27     debug2: bits set: 534/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/rfkrocktk/.ssh/id_dsa (0x7f3a27677d40)     debug2: key: /home/rfkrocktk/.ssh/id_rsa (0x7f3a27677d00)     debug2: key: /home/rfkrocktk/.ssh/id_ecdsa ((nil))     debug1: Authentications that can continue: publickey,gssapi-with-mic,password     debug3: start over, passed a different list publickey,gssapi-with-mic,password     debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup gssapi-with-mic     debug3: remaining preferred: publickey,keyboard-interactive,password     debug3: authmethod_is_enabled gssapi-with-mic     debug1: Next authentication method: gssapi-with-mic     debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_1000' not found          debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_1000' not found          debug1: Unspecified GSS failure.  Minor code may provide more information               debug2: we did not send a packet, disable method     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Offering DSA public key: /home/rfkrocktk/.ssh/id_dsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Authentications that can continue: publickey,gssapi-with-mic,password     debug1: Offering RSA public key: /home/rfkrocktk/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Server accepts key: pkalg ssh-rsa blen 277     debug2: input_userauth_pk_ok: fp 1a:10:d2:9b:88:35:6d:be:c0:b2:9b:b0:87:99:0f:d5     debug3: sign_and_send_pubkey: RSA 1a:10:d2:9b:88:35:6d:be:c0:b2:9b:b0:87:99:0f:d5     debug1: Authentication succeeded (publickey).     Authenticated to myserver ([2.2.2.2]:22).     debug2: fd 5 setting O_NONBLOCK     debug2: fd 6 setting O_NONBLOCK     debug1: channel 0: new [client-session]     debug3: ssh_session2_open: channel_new: 0     debug2: channel 0: send open     debug1: Entering interactive session.     debug2: callback start     debug2: client_session2_setup: id 0     debug2: fd 3 setting TCP_NODELAY     debug3: packet_set_tos: set IP_TOS 0x10     debug2: channel 0: request pty-req confirm 1     debug1: Sending environment.     debug3: Ignored env ORBIT_SOCKETDIR     debug3: Ignored env SSH_AGENT_PID     debug3: Ignored env TERM     debug3: Ignored env SHELL     debug3: Ignored env XDG_SESSION_COOKIE     debug3: Ignored env WINDOWID     debug3: Ignored env GNOME_KEYRING_CONTROL     debug3: Ignored env GTK_MODULES     debug3: Ignored env USER     debug3: Ignored env SSH_AUTH_SOCK     debug3: Ignored env USERNAME     debug3: Ignored env SESSION_MANAGER     debug3: Ignored env DEFAULTS_PATH     debug3: Ignored env TMUX     debug3: Ignored env XDG_CONFIG_DIRS     debug3: Ignored env PATH     debug3: Ignored env DESKTOP_SESSION     debug3: Ignored env PWD     debug3: Ignored env GDM_KEYBOARD_LAYOUT     debug1: Sending env LANG = en_US.UTF-8     debug2: channel 0: request env confirm 0     debug3: Ignored env MANDATORY_PATH     debug3: Ignored env GDM_LANG     debug3: Ignored env UBUNTU_MENUPROXY     debug3: Ignored env COMPIZ_CONFIG_PROFILE     debug3: Ignored env GDMSESSION     debug3: Ignored env SHLVL     debug3: Ignored env HOME     debug3: Ignored env LANGUAGE     debug3: Ignored env GNOME_DESKTOP_SESSION_ID     debug3: Ignored env LOGNAME     debug3: Ignored env XDG_DATA_DIRS     debug3: Ignored env DBUS_SESSION_BUS_ADDRESS     debug3: Ignored env WINDOWPATH     debug3: Ignored env DISPLAY     debug3: Ignored env IBUS_NO_SNOOPER_APPS     debug3: Ignored env XAUTHORITY     debug3: Ignored env COLORTERM     debug3: Ignored env _     debug2: channel 0: request shell confirm 1     debug2: callback done     debug2: channel 0: open confirm rwindow 0 rmax 32768     debug2: channel_input_status_confirm: type 99 id 0     debug2: PTY allocation request accepted on channel 0     debug2: channel 0: rcvd adjust 2097152     debug2: channel_input_status_confirm: type 99 id 0     debug2: shell request accepted on channel 0     debug2: channel 0: rcvd eof     debug2: channel 0: output open -> drain     debug1: client_input_channel_req: channel 0 rtype exit-status reply 0     debug2: channel 0: rcvd close     debug2: channel 0: close_read     debug2: channel 0: input open -> closed     debug3: channel 0: will not send data after close     debug3: channel 0: will not send data after close     debug2: channel 0: obuf empty     debug2: channel 0: close_write     debug2: channel 0: output drain -> closed     debug2: channel 0: almost dead     debug2: channel 0: gc: notify user     debug2: channel 0: gc: user detached     debug2: channel 0: send close     debug2: channel 0: is dead     debug2: channel 0: garbage collecting     debug1: channel 0: free: client-session, nchannels 1     debug3: channel 0: status: The following connections are open:       #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)          debug1: fd 1 clearing O_NONBLOCK     debug1: fd 2 clearing O_NONBLOCK     Connection to myserver closed.     Transferred: sent 3504, received 2584 bytes, in 26.6 seconds     Bytes per second: sent 131.8, received 97.2     debug1: Exit status 1      It appears it's using weird authentication methods that I don't use.


title: How do I install gnuconio on linux

text: I downloaded the gnuconio on this site (http://sourceforge.net/projects/gnulinuxconioh/) I unzipped the zip he jerou me the following files:               bash-4.2$ ls     Doxyfile  READ-ME.txt   conio.c  conio.ppr     constream            titledoc.html     Makefile  READ-ME.txt~  conio.h  conio_test.c  constream_test.cpp+      I read the readme.txt               GNUCONIO 0.1 2012          Thanks for downloading the opensource and GPL license gnuconio-0.1 library.     With this you can use colors, getch and others graphical functions based     on the conio.h library, using the #include "conio.h" normally, in Windows     or Gnu Linux systems.          In Gnu Linux systems only copy the conio.h file to your programs folder     to use it. You will need the NCURSES library to work on linux (libncurses-dev).          In Windows you will need to compile the conio.c file, and use the conio.o file     in your compiler library list. Tested on the compiler Code::Blocks.          To start the conio use any function, except the printf and scanf. To end the     program, make the text color == background color, and use the clrscr()     function.          Have Fun !      I do not know how to do what it says in the readme.txt. I am compiling my project directly in the terminal, I'm using Slackware 14.1 and the ncurses library is installed. Can someone help me?


title: When should you use subshells vs `xargs`?

text: Many simple commands using `xargs` could be rewritten as commands using subshells. For instance, here is something I was using earlier today, to concatenate the ten largest binaries in `/usr/bin`, written using a subshell vs xargs: subshell:               $ cat $(du -sh /usr/bin/* | sort -h | tail | cut -d "      " -f 2 | tr "\n" " ")      `xargs`:               $ du -sh /usr/bin/* | sort -h | tail | cut -d "      " -f 2 | tr "\n" " " | xargs cat      So when should you use a subshell and when should you use `xargs`? ## NOTE: The delimiter for cut is a hard tab, which apparently doesn't display properly on SE.


title: How to start processing a file at an offset?

text: Use case: You've got a multi-GB log file for a whole week, and you need to search for something which happened on Saturday using for example `grep`. Making an educated guess, you assume that starting the search from the middle of the file will more than halve the processing time (since it's definitely not going to have to process the whole of the rest of the file) while not skipping any relevant data. Is this possible?


title: How to control buffering of pipes in bash scripts?

text: I need my script to be executed with `stdbuf -i0 -o0 -e0` otherwise user will wonder why there is no output (becuase of pipe buffer). How can I acheive it?               #!/usr/bin/stdbuf -i0 -o0 -e0 /bin/bash      results in               /usr/bin/stdbuf: invalid mode ‘0 -o0 -e0 /bin/bash’


title: Resources to learn linux architecture in detail?

text: I want to learn the Linux file hierarchy and how the OS works at a deeper level. Are there any ebooks or webpages to learn that?


title: Fresh Install of Ubuntu Grub rescue

text: I have a fresh install of Ubuntu 11.04 from DVD on a wiped hard drive. After it finished installing it asked me to remove the media and hit enter. Which I got the message:               error: no such device: 487e0bd2-2436-495a-a5e7-fe240a51ff20.     grub rescue>      I reinstalled again and got the same message, except the long string was different. I've tried boot-repair from the livecd, with no results. I've seen some recommendations of running `sudo fdisk -l` and using that to edit the boot manager, again from the livecd. But I have no idea how to do that or if that's a good next step. How do I finish installing Ubuntu, so I can boot up and start my first venture into Linux?


title: ftp option to overwrite file if different size

text: There is a script (bsh) running in a AIX 7.1 machine. The script is to download some files via FTP from another machine. I need to stop it later because some guy need to have maintenace over the machine, even if the script is not finished. So I would like to know, if I re-run the script later, can I configure the ftp client to skip the file if a local copy already exist and is identical to the remote one?


title: OpenSUSE - installing libqt4-devel

text: I've got a minimal no-gui installation of OpenSuse 11.4 (x64). I'm trying to build CutyCapt which requires libqt4-devel. When I try to install it with the Yast, I get the following:               libqt4-develop-4.7.1-7.1.x86_64 requires Mesa-devel, but this requirement cannot be provided      Possible solutions:               deinstallation of patterns-openSUSE-minimal_base-11.4-6.9.1.x86-64     + others      My questions are:   1. What does all this mean? What is Mesa-devel and what is patterns-minimal_base?   2. Will something break if I go ahead and de-install the minimal base pattern?


title: How to find how many cores a process is using?

text: I have a eight core machine. How can I find out how many cores are used by processes that I see in `htop`?


title: How to start customizing linux?

text: I've heard that Android is based on linux (or unix?). That means, engineers at google modified linux code to run on android phones or tablets. I would like to become those engineers someday. Where should I start? Should I start looking at embedded linux?


title: sudoers - How to use NOPASSWD and sudoedit at the same time?

text: What is the syntax for using NOPASSWD and sudoedit at the same time in /etc/sudoers? I tried this:               john ALL=(ALL) NOPASSWD: sudoedit /path/to/file      but I still get prompted for a password.


title: How do you force Linux to detect a PS/2 device (e.g. mouse) on demand?

text: I plugged in a PS/2 mouse while inside my Gnome desktop, but Linux doesn't recognize it. Linux will only recognize the PS/2 mouse if it is plugged in before booting the machine (like a normal scenario). In this case, I forgot to plug in the mouse, plugged it in when I got to the desktop, but realized that it doesn't work. How do I detect PS/2 devices (my mouse) in real time so I don't have to reboot just to use a mouse?


title: Combining files with 4 columns each, into 4 files for each column

text: So I have a bunch of text files which look like this: > T1   >  r1 a b c d   >  r2 d e f g   >  ... > > T2   >  r1 h i j k   >  r2 l m n o   >  ... And I want to make FOUR different text files in the following format: > __ T1 T2 ...   >  r1 a h ...   >  r2 d l ... > > __ T1 T2 ...   >  r1 b i ...   >  r2 e m ... So basically, I have a certain number of files. Each picks a TEMPERATURE and then runs over MAGNETIC FIELDs (T1... temp; r1,r2,.. magnetic field) and then the a,b,c,d etc are 4 different calculations, each column being its own. I want to be able to compile the FIRST column for each T (file) into a single file so I can copy it into excel, then compile the SECOND column for each T into a different file and do the same. If someone tells me how to put in the data so that it formats it exactly like my files I can detail my question more...


title: Xcompmgr, puts child windows in the background

text: I don't know if it's related to fluxbox, but whenever I launch the transparency management at startup with `xcompmgr -f` it becomes difficult to use pop-up windows. They are all sent to background, and the main application windows remains on the top. It's pretty unusable with applications that have much use of pop-up windows. If I don't launch xcompmgr, the window behaviour is ok. Any idea what to check, or to do ?


title: Process substitution and pipe

text: I was wondering how to understand the following: > Piping the stdout of a command into the stdin of another is a powerful > technique. But, what if you need to pipe the stdout of multiple commands? > This is where process substitution comes in. In other words, can process substitution do whatever pipe can do? What can process substitution do, but pipe cannot?


title: What does the .d stand for in directory names?

text: I know many directories with .d in their name:               init.d     yum.repos.d     conf.d      Does it mean directory? If yes, from what does this disambiguate? UPDATE: I've had many interesting answers about what the .d means, but the title of my question was not well chosen. I changed "mean" to "stand for", I hope this is clearer now.


title: When does chmod fail?

text: Under what circumstances will chmod fail? I looked at the man page but it only specifies usage and doesn't go into details about what circumstances it won't work in. I'd assume chmod will work if:   * you're root   * you own the target file (and are setting a mundane mode bit i.e. not sticky bit, others) Can users use chmod to change permissions on a file they have group access for? Is it related to read/write access?


title: Logging when limit Exceeds

text: Is there a log file that logs information when the values set in `/etc/security/limits.conf` are exceeded? If not is there a way to make it log when the values are exceeded?


title: grub and boot partition damaged

text: I seem to have a damaged /boot partition and grub boot loader, I was wonder if there is a easy way to repair this ? I was thinking of booting a Live CD and using dd to copy the boot partition from the CD to the disc partition and then re-installing grub. Do you think this approach will work ?


title: Hook shutdown script to shutting down sequnce

text: Is it possible to hook some script to shutting down sequence for Linux? To give you a bit more context processes of nodes of the cluster are started as processes from cluster -master. They are not running as services. However if someone restart a node and didn't stop the appropriate process manually, it causes a troubles because the node hasn't been stopped gracefully. I would like to avoid this situation. Processes they don't run as services.


title: Fetch a specific branch using git

text: I want to download source code from the master-next branch using git as described in the Xilinx wiki. I tried this:               #git clone git://github.com/Xilinx/u-boot-xlnx/tree/master-next.git          Initialized empty Git repository in /home/Hannan/master-next/.git/     fatal: remote error:     Xilinx/u-boot-xlnx/tree/master-next is not a valid repository name     Email support@github.com for help      Even this failed:               # git clone git://github.com/Xilinx/tree/master-next/u-boot-xlnx.git     Initialized empty Git repository in /home/Hannan/u-boot-xlnx/.git/     fatal: remote error:     Xilinx/tree/master-next/u-boot-xlnx is not a valid repository name     Email support@github.com for help      The command that works is:                git clone git://github.com/Xilinx/u-boot-xlnx.git      But how do I know that this will indeed fetch the master-next branch and not the master branch? How do I correctly fetch a specific branch using git? I am using RHEL 6, accessed via PuTTY.


title: Where to search for more info if I don't have Internet?

text: For example, I was reading `setuid` man page today. It says: > If the effective UID of the caller is root, the real UID and saved set-user- > ID are also set. I don't know what `set-user-ID` is. How can I get more information about it if I don't have Internet connection? One thing I can do is to open some books and search for it. What are other places on my Linux system where I can search for more information?


title: Full disk encryption with password-less authentication in Linux

text: I have a fairly standard disk encryption setup in Debian 5.0.5: unencrypted `/boot` partition, and encrypted `sdaX_crypt` that contains all other partitions. Now, this is a headless server installation and I want to be able to boot it without a keyboard (right now I can boot it only with a keyboard and a monitor attached). So far I have an idea of moving `/boot` partition to an USB drive and make slight modifications to auto-enter the key (I think there is just a call to `askpass` in the boot script somewhere). This way I can boot headless, just need to have a flash drive in at boot time. As I see it, the problem with it is that   1. I need to invest time into figuring out all bits and pieces to make it work,   2. If there is an update, which regenerates `initrd`, I need to regenerate the boot partition on the USB, which seems tedious. The question: is there a standard low-upkeep solution available for what I want to do? Or should I be looking elsewhere altogether?


title: How do I prevent gnome to mount my usb device when I'm using KDE?

text: in KDE, when I plug a USB storage device, I see a nautilus window automatically open, and I'm obliged to use nautilus if I want to umount it properly Dolphin gives the following error: > org.freedesktop.Hal.Device.Volume.NotMountedByHal: Device to unmount is not > in /media/.hal-mtab so it is not mounted by HAL. How can I specify that when I use KDE, I want HAL to handle usb storage automatic mounting ? I don't know what gnome-mechanism automatically mounts usb devices, but I guess I'll have to disable it too? I'm using fedora 13.


title: Fine-tune LS_COLORS for directory suffixes?

text: I’m fine customizing most settings in `LS_COLORS`. I don’t need help customizing the colors for different file suffixes. What I would like to do is configure special colors for **certain directories** , based on their suffix. (For example, I’d like `dir1/` to display in the standard directory color, but `dir2.special-suffix/` to display in a different color, which I set for directories with names that end in `.special-suffix`.) I’ve tried to do this using the standard `*.«suffix»` method (as used with files), but without luck. All directories are displayed in the color specified for `di`, and ignore any subsequent `*.«suffix»` rules. Is this even possible?


title: How do keyboard input and text output work?

text: Suppose I press the `A` key in a text editor and this inserts the character `a` in the document and displays it on the screen. I know the editor application isn't directly communicating with the hardware (there's a kernel and stuff in between), so what is going on inside my computer?


title: Automatically mount network drive when available

text: I have a NAT drive, that is accessible via SMB. I have an entry in fstab to mount it at boot. But if the drive is not switched on it is not mounted during boot and I have to manually mount later. (The NAT boots a lot slower than my PC and usually is not up at the point PC tries to mount it). Is there a way to automatically mount the drive when it becomes available in the network? Preferably if it can be done via command line tools, not involving GUI programs. Using PCLinuxOS with KDE.


title: Environment for creating a package

text: I am considering packaging a Python program for Arch Linux to be distributed with the AUR. I have created a PKGBUILD file that I can use with `makepkg` to build the package. The package builds and installs fine on my machine, but that doesn't seem very robust since if a dependency is missing from the PKGBUILD but already installed on my machine I will miss it. I was thinking that I could do this in a virtual machine, but that seems like potential overkill. I also thought about trying to use a `chroot` environment, but I am not sure that will work. The Python program creates a GUI so it requires at least a portion of xorg/X11. How do I go about building/creating a package and testing that all the dependencies are included?


title: Copying a single file to multiple directories using cp

text: This question is a sequel of sorts to my earlier question, Creating numerous directories using `mkdir`. I am using the `bash` shell. I have created fifty directories, each starting with the prefix "s", using the command:               mkdir $(printf "s%02i " $(seq 1 50))      which pads to the second digit with zeros. That is, the directories that I obtain are of the form `s01`, `s02`, ..., `s49`, `s50`. Now I would like to use `cp` to copy a single file (for example, `test.txt`) to each of the fifty directories. Is it possible to do this in a way analogous to that above? For example, would the following work? I am relatively new to Unix/Linux, so I don't really want to try this until someone please gives me an indication that it is safe. cp test.txt $(printf "s%02i.txt " $(seq 1 50)) Looking at the `man` page for `cp`, it does not look like `cp` supports multiple destinations like this, however:               NAME            cp - copy files and directories          SYNOPSIS            cp [OPTION]... [-T] SOURCE DEST            cp [OPTION]... SOURCE... DIRECTORY            cp [OPTION]... -t DIRECTORY SOURCE...          DESCRIPTION            Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.                 Mandatory  arguments  to  long  options are mandatory for short options            too.


title: Using a symlink for a mountpoint

text: Is it possible to set a symlink on a mountpoint? I have a mountpoint /vz. When I'm `ln -s /var/lib/vz /vz` the result is, that I have a directory vz in my mountpoint /vz, thus I have `/vz/vz`. Is there any way to prevent this?


title: xkb config has pointless entry?

text: I dumped the current xkb configuration with `xkbcomp :0 keyboard.xkb` and found that, for example, ISO_Level3_Shift has two 'interpret' entries:               interpret ISO_Level3_Shift+AnyOf(all) {         virtualModifier= LevelThree;         useModMapMods=level1;         action= SetMods(modifiers=LevelThree,clearLocks);     };     # ⋮     interpret ISO_Level3_Shift+AnyOfOrNone(all) {         action= SetMods(modifiers=LevelThree,clearLocks);     };      But it seems to me that the first entry has no effect at all. So, why is it included at all?


title: Reading from STDIN and using data immediatly (while still reading) or opening a URL with zbar

text: I need to read lines from STDIN and process them. I could do something like:               <print lines to STDOUT> | while read line; do        <process $line>     done      But this means that _first_ all lines are printed and piped and _then_ they are processed. I want to process every single line immediately, eventually before the next lines are sent to STDOUT. This might be useful if the lines should be processed while they are are generated (e.g. a log file). My task is to use zbar (warning! the web page crashes Firefox...) to scan several QR codes and to open its URLs in Firefox. If run `zbarcam --raw` the webcam is used to scan QR codes. If a QR code is found the URL is printed to STDOUT immediately, but zbarcam does not terminate. So I'd like to read this line and to run `firefox $url` or so (but without waiting for other URLs). I've found a solution, but I'm wondering if this can't be done easier. Basically he writes the output of `zbarcam` to a temporary file and waits until something is written there:               zbarcam --raw > tmpfile &     ...     while [[ ! -s $tmp ]] ; do       sleep 1     done      Can this be done with out temporary files and without a loop with `sleep 1`?


title: Installing FreeBSD in VirtualBox aborts unexpectedly

text: I have tried installing `FreeBSD-10.0-RELEASE-i386-dvd1.iso` into VirtualBox 3 times already today (each time starting from a fresh creation of a VM) and right when I'm about to Exit (Apply configuration and exit installer) the Final Configuration stage, I get this Abort error: ![FreeBSD Installer - Abort](http://i.stack.imgur.com/f4npr.png) So then I either have to Restart or Exit...which is obviously not my end goal. I want to give FreeBSD a test drive in VirtualBox so I really want it to get installed. Hopefully someone can help. Possibly relevant details:   * Host OS: 64-bit Arch Linux (Antergos)   * VirtualBox 4.3.14   * MD5 of ISO used checks out **Update 1** Opened another shell and checked `/tmp/bsdinstall_log`. Here are the last lines: ![bsdinstall_log](http://i.stack.imgur.com/4jA0a.png) I assume `umount` failed? **Update 2** As suggested in the comments, I disabled `Enable VT-x/AMD-V` and it aborts after I set the `root` password. ![bsdinstall_disable_vt-x_amd-v](http://i.stack.imgur.com/QwkC0.png) _The Abort dialog follows this screen_


title: extract part of string using sed

text: ls lib/oracle-11.2.0.3.0.txt | sed 's/lib.\([oracle.*]\)\.txt/\1/'      It is giving the whole string instead of just oracle part until .txt What am I doing wrong? I can do it using awk as follows, but, not sure why sed is not giving the wanted result.               echo "lib/oracle-11.2.0.3.0.txt" | awk -F/ '{print substr($2,1,index($0,".txt")-1);}'


title: How are username, date and time are registered in kernel

text: How is the date and time of kernel compilation registered in kernel image?               cat /proc/sys/kernel/version      #35~precise1-Ubuntu SMP Fri Jan 25 17:15:33 UTC 2013


title: Search for a string in the output of a command

text: I'm stuck with a simple script. I want to run `tracepath` on multiple address and to find if some IP is contained in the output of the `tracepath`. For now I have the following:               if tracepath -n google.com | grep x.x.x.x      do      echo bal bal      else      echo ova ova ova     fi      But this doesn't work.


title: How to input / start a new line in bash terminal?

text: I notice some sample bash for loops are spread out over multiple lines in examples               for VARIABLE in file1 file2 file3     do         command1 on $VARIABLE         command2         commandN     done      (eg here http://www.cyberciti.biz/faq/bash-for-loop/) How do I enter a newline in the bash terminal (I use putty) ? When I press enter at the end of a line the system executes it.


title: How to mount a virtual disk in Linux (on VMWare)

text: I am running Ubuntu 10.04.4 thru VMWare Workstation. I added a second virtual hard disk drive, which is found under `/dev/sdb` , as shown below ![enter image description here](http://i.stack.imgur.com/1WgKv.jpg) How do you mount this to anywhere? (e.g. `/mnt/sdb`). When I tried `sudo mount /dev/sdb /mnt/sdb -t ext4` I get the error message back > wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or > helper program, or other error In some cases useful info is found in syslog > - try dmesg | tail or so


title: Losing sound after installing wine 1.5 (+python 2.7)?

text: I have a desktop and a laptop computer. Since I wanted to run IrfanView (that works great now!), I installed wine 1.5.22, which involved installing 1 GB of dependencies. The desktop continues to work fine, on the laptop, I have lost all sound. I saw some message in Banshee saying that it wants some python libraries for sound or something like that and that it cannon find them. Can you offer me any suggestions? Thanks in advance! I have Linux Mint 14 32-bit


title: Reduce cache size of flash storage devices

text: For various benefits Linux uses a memory cache for writes to removable stogare devices like memory sticks. This cache seems to be quite large on my system, which leads to some annoying behavior. For instance, when I copy an image to the stick, it finishes within seconds, but the following `sync` takes a couple of minutes, with no process indication. This also makes it harder to do speed measurements or similar things. I know I can disable the cache with `mount -o sync`, but as I understand, this is not recommended for flash storage devices. I cannot use `mount -o flush` because that only works with FAT file systems. However a simple solution would be to just reduce the cache size to, say, 1 MB. Then `sync` will always take no longer than a few seconds and when copying large files with tools like `pv` they would actually show reasonable values (for process bar, transfer speed etc.). Is there a way to configure the cache size in Linux?


title: debian/knoppix sources.list

text: Knoppix is a Debian-based Linux live DVD. I've liked the pre-installed packages in Knoppix so much, that I've installed it to disk. My question is about `/etc/apt/sources.list`. In Knoppix, the `sources.list` file has MANY repo links, it includes links for stable, testing, unstable and experimental (lenny, squeeze, wheezy, sid...etc), all uncommented. There's a copy of the sources.list file here: http://ghghgh.us/sources.list The strange thing is that in the `/etc/apt/apt.conf` file, the default release is wheezy, as it says:               APT:Default-Release "wheezy";      I'm wondering, should I COMMENT OUT or REMOVE all the links in my sources.list file that aren't wheezy/wheezy related? what is the advantage to having so many links (when only one points to sources for the default release?


title: where is upstart jobs pid held

text: Since the `upstart` command keeps giving me the wrong pid for a job no matter what I try, I would like to manually change it to the correct pid. Does anybody know where the pid for upstart jobs are held? This is due to that I am forking three times and expect daemon only tracks after 2 forks and expect fork only tracks after one fork. Therefore I need to manually specify what the pid is after the third fork is done. I am on RHEL 6.5


title: What do the scripts in /etc/profile.d do?

text: I am reading about basic shell scripting from Linux Command Line and Shell Scripting Bible. It says that the `/etc/profile` file sets the environment variables at startup of the Bash shell. The `/etc/profile.d` directory contains other scripts that contain application-specific startup files, which are also executed at startup time by the shell.   * Why are these files not a part of `/etc/profile` if they are also critical to Bash startup ?   * If these files are application-specific startup files not critical to Bash startup, then why are they part of the startup process ? Why are they not run only when the specific applications, for which they contain settings, are executed ?


title: Start IceWM from the command line *and* get sound working?

text: So, I hate window managers. I hate them all. My current distribution is Ubuntu 12.04. Here is my `/etc/init/lightdm.conf`:               # LightDM - light Display Manager     #     # The display manager service manages the X servers running on the     # system, providing login and auto-login services     #     # based on gdm upstart script          exit 0;      In short, I do everything in the TTY. Setting my system up like this means that TTY7 is full of system messages. I use the other ones and `screen` to do almost everything. And I'm happy that way. If I really really need to, I start Ubuntu 12.10's default desktop environment, `lightdm`, by typing `sudo lightdm` into TTY6, which opens the display manager itself in TTY7. When I'm done, I just `CTRL` + `C` in TTY6 to kill the display manager. (Unfortunately this also means that going back to TTY7 will freeze my computer entirely, a bug I have yet to report. But as long as I stay away from that black hole, things are fine.) Lately I've been playing around with other WMs, notably IceWM. I start it by typing `xinit /usr/bin/icewm-session` into TTY6, and voila. It's much nicer than `lightdm`, moving at light speed by comparison. There's just one problem. I get sound output for IceWM if I move over to a TTY. But when I am in the actual TTY that runs IceWM, looking at Skype or something, I can't actually hear anything. So, for example, I send some messages on Skype, then move over into my warm, cozy TTY1 (always open to `weechat-curses`) while my interlocutor writes her reply, and then and only then do I actually hear the stupid chat alert noises. Or, for example, I go over into the nice, warm, darkness of TTY2 and start playing some music with `mplayer`. I hear music up until the point when I switch back into TTY7, where IceWM is running. (This doesn't happen when I'm running lightdm.) Is this integration with ALSA all just a bit lacking IceWM, or might there be a more orthodox way to be WM- agnostic? (For what it's worth, I've read of other people having issues with sound not playing in IceWM. But I'm wondering if there's a more recommended approach to doing what I do.)


title: CentOS installation rpms 5.5 vs. 6.4

text: I am migrating from CentOS 5.5 to 6.4 and have a custom installation that installs specific RPMs. The problem I running into is that some RPMs from CentOS 5.5 are no longer in the 6.4 distribution, so my make fails because it can't find a rpm in the source distribution. Is there a good way to determine what RPMs I might need from 6.4 to replace the missing RPMs that were in 5.5?? Trying to figure out a good way to do this so I don't miss anything. So far, I've tried looking at the files and information for the RPMs in 5.5 and search for similar information in the RPMs for 6.4. This seems like a bad idea and hasn't really helped me out. I would think that there is a better way to do this??? Here is the list of CentOS 5.5 RPMs that are missing in 6.4:   * SysVinit-2.86-15.el5.i386.rpm   * anacron-2.3-45.el5.centos.i386.rpm   * apmd-3.2.2-5.i386.rpm   * aspell-0.60.3-7.1.i386.rpm   * beecrypt-4.1.2-10.1.1.i386.rpm   * bluez-gnome-0.5-5.fc6.i386.rpm   * bluez-utils-3.7-2.2.el5.centos.i386.rpm   * cadaver-0.22.3-4.el5.i386.rpm   * centos-release-notes-5.5-0.i386.rpm   * chkfontpath-1.10.1-1.1.i386.rpm   * dhcdbd-2.2-2.el5.i386.rpm   * dhcpv6-client-1.0.10-18.el5.i386.rpm   * dmalloc-5.3.0-3.i386.rpm   * fbset-2.1-22.i386.rpm   * firstboot-tui-1.4.27.8-1.el5.centos.i386.rpm   * gnupg-1.4.5-14.i386.rpm   * htmlview-4.0.0-2.el5.noarch.rpm   * ibmasm-3.0-9.i386.rpm   * ifd-egate-0.05-15.i386.rpm   * ipsec-tools-0.6.5-13.el5_3.1.i386.rpm   * irda-utils-0.9.17-2.fc6.i386.rpm   * kudzu-1.2.57.1.24-1.el5.centos.i386.rpm   * libFS-1.0.0-3.1.i386.rpm   * libgssapi-0.10-2.i386.rpm   * libjpeg-6b-37.i386.rpm   * libtermcap-2.0.8-46.1.i386.rpm   * libvolume_id-095-14.21.el5.i386.rpm   * mkinitrd-5.1.19.6-61.i386.rpm   * mktemp-1.5-23.2.2.i386.rpm   * nash-5.1.19.6-61.i386.rpm   * nss_ldap-253-25.el5.i386.rpm   * oddjob-libs-0.27-9.el5.i386.rpm   * pam_ccreds-3-5.i386.rpm   * pam_smb-1.1.7-7.2.1.i386.rpm   * pkinit-nss-0.7.6-1.el5.i386.rpm   * portmap-4.0-65.2.2.1.i386.rpm   * python-elementtree-1.2.6-5.i386.rpm   * python-sqlite-1.1.7-1.2.1.i386.rpm   * rhpl-0.194.1-1.i386.rpm   * rng-utils-2.0-1.14.1.fc6.i386.rpm   * setarch-2.0-1.1.i386.rpm   * slrn-0.9.8.1pl1-1.2.2.i386.rpm   * specspo-13-1.el5.centos.noarch.rpm   * sysklogd-1.4.1-46.el5.i386.rpm   * system-config-securitylevel-tui-1.6.29.1-5.el5.i386.rpm   * termcap-5.5-1.20060701.1.noarch.rpm   * util-linux-2.13-0.52.el5_4.1.i386.rpm   * vixie-cron-4.1-77.el5_4.1.i386.rpm   * xorg-x11-filesystem-7.1-2.fc6.noarch.rpm   * xorg-x11-xfs-1.0.2-4.i386.rpm   * yum-updatesd-0.9-2.el5.noarch.rpm


title: How can I get sql queries to show in output file?

text: I tried executing set of queries from a shell script while capturing both input (SQL query) and output in the log file. But the input query is not displayed along with output. Only the outputs are being captured in the log file. Is there a way to capture the input query along with the corresponding input? I did set `echo on` but it still won't work.


title: Intel Core i3/i5/i7 Sandy Bridge CPU throttling

text: Intel Sandy-Bridge family i5 Core CPU, running Linux kernel 3.2 (Debian Squeeze/Wheezy), under heavy computation load, does not react to to `cpufreq- set -g powersave` (using acpi_cpufreq module). It is 99.9% time running in turbo mode, although it seems to be somehow throttled automatically, as can be seen in kernel messages (`dmesg`):               ...     [137547.968129] CPU2: Package temperature/speed normal     [137547.968130] CPU0: Package temperature/speed normal     [137548.124277] CPU2: Core temperature above threshold, cpu clock throttled (total events = 16455155)     [137548.124280] CPU3: Core temperature above threshold, cpu clock throttled (total events = 16455154)     [137548.125289] CPU2: Core temperature/speed normal     [137548.125291] CPU3: Core temperature/speed normal     [137847.287143] CPU2: Package temperature above threshold, cpu clock throttled (total events = 17888019)     [137847.287147] CPU3: Package temperature above threshold, cpu clock throttled (total events = 17888017)     ...      I'd like to turn this CPU to power-saving mode, or choose the frequency, like with good old cpufreq powersave or userpace cpufreq governors. I wonder, what manual throttling method would work on these CPUs..


title: Managing the output streams of many subprocesses with deadlocks

text: I have a Python script that does more or less this               current_tasks = TaskManager()     MAXPROCS = 8          while len(outstanding_tasks) > 0:         if len(current_tasks.running) < MAXPROCS:           current_tasks.addTask(outstanding_tasks.next())         else:           current_tasks.wait_for_one_finish()      and outstanding_tasks.next() is basically this:               p = subprocess.Popen([task], stdout=OUTFILE, stderr=subprocess.PIPE)      and `current_tasks.wait_for_one_finish()`:               waiting = True     while waiting:         for t in tasks:             ret = t.poll()             if ret not None:                 handle_stderr(t)                 waiting = False                 break      Fairly straightforward - spawn tasks on-demand until we're running 8 of them at a time, and then block until they finish one at a time before spawning more tasks. The problem is this:               stderr=subprocess.PIPE      Each subprocess is writing is stderr to a pipe. If it crashes and it wants to write a big log message or whatever to the pipe, and that message exceeds the size of the pipe buffer, the write() will block. The process won't finish, so my controlling process will never see a return value from `poll()` and go read from its stderr. There are obviously ways around this:   * redirect stderr from my subprocesses to temporary files   * spawn a Python thread that reads from the stderr file descriptors of all running tasks and buffers them in memory   * have a select() or something in my little ad hoc event loop But all of that is stuff I have to handle in my application code. What I want to know is: is there some way to get the behaviour of a pipe, but with a nice big elastic buffer, so that the subprocesses can always do a successful write() to their stderr and then exit, without me having to look at it until they're done?


title: What does `process_usershare_file` do?

text: I have a samba server that is giving me this in logs for every single share (in this case "Public" is the share):               Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.398065,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.398688,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.400642,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.401232,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.403194,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.403814,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.404843,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.bat failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.405536,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.bat failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.406666,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.cmd failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.407276,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.cmd failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.408284,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.exe failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.408987,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.exe failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.410125,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.com failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.410716,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.com failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.411692,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.pif failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.412420,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.pif failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.413585,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.lnk failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.414163,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.lnk failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.415144,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.dll failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.415857,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.dll failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.418115,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.418842,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.424562,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.427558,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.433017,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.436073,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.441569,  0] param/loadparm.c:9114(process_usershare_file)     Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied     Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.444667,  0] param/loadparm.c:9114(process_usershare_file)      What is `process_usershare_file` supposed to do, and any ideas why it is failing? Edit: I am not even using `/var/lib/usershare/` at all. I do not know why it is looking there.


title: Pipe each last run command to a script

text: I want to use realiser to know if I should have used an alias each time I run a command in my bash terminal. The README gives the following example for ZSH:               function last_command() {       echo `history -1 | cut -d ' ' -f 3-20 | realiaser`     }          RPROMPT='%{$fg[$NCOLOR]%}%p $(last_command)%{$reset_color%}'      It says "Check the options on your machine for "history". This configuration is for ZSH and needs slight ajusting for Bash or other configuartions" but I can't find how to adapt it for my bash, I currently have the following but don't know how to adapt it:               function parse_git_branch {       git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'     }     function prompt {     PS1="${TITLEBAR}\     \w\$(parse_git_branch)\      \$ "     }     prompt


title: trickle (bandwidth shaper) with dropbox causes 100% CPU

text: I'm limiting dropbox upload bandwith with trickle as suggested here.               @reboot trickle -u 100 ~/.dropbox-dist/dropboxd      This works great but unfortunately causes 100% CPU - even with only 2-3 (small) files in total. On its own Dropbox only consumes about 1-2% CPU (without trickle). What might cause this CPU hog? Is there any other way to throttle Dropbox upload speed?


title: configure exim for system email forwarding (outside) , on a server with dynamic ip, behind a DNS router

text: Trying to configure exim to deleaver email to the outside world. I/We need to send email outside just for centralize certain admin notifications. Working on an already configured debian webserver, it uses apache with proxy enabled, that use ajp connector to Tomcat7. I've been thinking that the problems was related to iptables, but i was wrong, disabling it and testing didn't show any changes. i really don't understand where the problem could be. with normal Virtual machines i can set up exim, or postfix, or simply mail, to deliver messages outside the local network, without problems. On that server i can't


title: Why is VirtualBox Bridged networking slow

text: When logged into the guest, data transfer (`scp`) from the host is very slow (<1MB/s). Is this expected? **setup** :   * VirtualBox host is Debian Unstable   * VirtualBox guest is Debian 6 (Squeeze)   * **Bridged Adapter** is _wlan0_


title: Why using more threads makes it slower than using less threads

text: Tried to run program X using **8 threads** and it was over in **n minutes**.   Tried to run same program using **50 threads** and it was over in **n*10 minutes**. Why does this happen and how can I get optimal number of threads I can use?


title: Use FOR Loop inside END block of awk command

text: I'm trying to find the average number of files per day. The following script works:               #!/bin/sh     ls -l | grep "^-" | awk '{     key=$6$7     freq[key]++     }     END {     for (date in freq)                    printf "%s\t%d\n", date, freq[date]     }'      When I add do and done for the for loop like below:               #!/bin/sh     ls -l | grep "^-" | awk '{     key=$6$7     freq[key]++     }     END {     for (date in freq)     do                    printf "%s\t%d\n", date, freq[date]     done     }'      I get the below error:               awk: cmd. line:8: done     awk: cmd. line:8: ^ syntax error      How to write multi-line for loop statements inside END block of awk command? **Solution:** We need to use { and } to start and end for loop in END block of awk command.               #!/bin/sh     ls -l | grep "^-" | awk '{     key=$6$7     freq[key]++     }     END {     for (date in freq)     {             count=count+1             total=total+freq[date];             printf "%s\t%d\n", date, freq[date]     }     printf "Average files per day : %d\n",(total/count)     }'