title: Unable to boot pintos OS using bochs emulator on Linux

text: I am trying to boot the Pintos OS using the bochs emulator software. Here is the output of running the pintos command to run a simple user program:               caldus85@Satellite-T135:~/pintos/pintos2/src/userprog/build$ pintos --filesys-size=2 -p ../../examples/ls -a ls -- -f -q run 'ls'         Copying ../../examples/ls to scratch partition...         warning: can't find squish-pty, so terminal input will fail         bochs-pintos -q         ========================================================================                            Bochs x86 Emulator 2.2.6                   Build from CVS snapshot on January 29, 2006         ========================================================================         00000000000i[     ] reading configuration from bochsrc.txt         00000000000e[     ] user_shortcut: old-style syntax detected         00000000000i[     ] installing nogui module as the Bochs GUI         00000000000i[     ] using log file bochsout.txt         PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         Loading.............         Kernel command line: PiLo hda2         ...      And it keeps on scrolling like this forever. I have no idea what "PiLo hda2" means. Hard drive 2? Also, I'm wondering about the warning message at the beginning:               warning: can't find squish-pty, so terminal input will fail      Also, here is the associated bochsout.txt log:               00000000000i[     ] Bochs x86 Emulator 2.2.6     00000000000i[     ]   Build from CVS snapshot on January 29, 2006     00000000000i[     ] System configuration     00000000000i[     ]   processors: 1     00000000000i[     ]   A20 line support: yes     00000000000i[     ]   APIC support: no     00000000000i[     ] CPU configuration     00000000000i[     ]   level: 5     00000000000i[     ]   fpu support: yes     00000000000i[     ]   paging support: yes, tlb enabled: yes     00000000000i[     ]   mmx support: yes     00000000000i[     ]   sse support: no     00000000000i[     ]   v8086 mode support: yes     00000000000i[     ]   VME support: yes     00000000000i[     ]   3dnow! support: no     00000000000i[     ]   PAE support: no     00000000000i[     ]   PGE support: no     00000000000i[     ]   PSE support: yes     00000000000i[     ]   x86-64 support: no     00000000000i[     ]   SEP support: no     00000000000i[     ] Optimization configuration     00000000000i[     ]   Guest2HostTLB support: no     00000000000i[     ]   RepeatSpeedups support: no     00000000000i[     ]   Icache support: no     00000000000i[     ]   Host Asm support: yes     00000000000i[     ]   Fast function calls: no     00000000000i[     ] Devices configuration     00000000000i[     ]   NE2000 support: no     00000000000i[     ]   PCI support: no     00000000000i[     ]   SB16 support: no     00000000000i[     ]   USB support: no     00000000000i[     ]   VGA extension support:       00000000000i[MEM0 ] allocated memory at 0xb70d7008. after alignment, vector=0xb70d8000     00000000000i[MEM0 ] 4.00MB     00000000000i[MEM0 ] rom at 0xffff0000/65536 ('/home/andrew/pintos/tools/share/bochs/BIOS-bochs-latest')     00000000000i[MEM0 ] rom at 0xc0000/32768 ('/home/andrew/pintos/tools/share/bochs/VGABIOS-lgpl-latest')     00000000000i[CMOS ] Using specified time for initial clock     00000000000i[CMOS ] Setting initial clock to: Wed Dec 31 18:00:00 1969 (time0=0)     00000000000i[DMA  ] channel 4 used by cascade     00000000000i[DMA  ] channel 2 used by Floppy Drive     00000000000i[VGA  ] interval=40000     00000000000i[     ] init_mem of 'harddrv' plugin device by virtual method     00000000000i[     ] init_mem of 'keyboard' plugin device by virtual method     00000000000i[     ] init_mem of 'serial' plugin device by virtual method     00000000000i[     ] init_mem of 'parallel' plugin device by virtual method     00000000000i[     ] init_mem of 'extfpuirq' plugin device by virtual method     00000000000i[     ] init_mem of 'speaker' plugin device by virtual method     00000000000i[     ] init_dev of 'harddrv' plugin device by virtual method     00000000000i[HD   ] HD on ata0-0: '/tmp/3EqXJrzE3p.dsk' 'flat' mode      00000000000i[HD   ] Using boot sequence disk, none, none     00000000000i[HD   ] Floppy boot signature check is enabled     00000000000i[     ] init_dev of 'keyboard' plugin device by virtual method     00000000000i[KBD  ] will paste characters every 1000 keyboard ticks     00000000000i[     ] init_dev of 'serial' plugin device by virtual method     00000000000i[SER  ] com1 at 0x03f8 irq 4     00000000000i[     ] init_dev of 'parallel' plugin device by virtual method     00000000000i[PAR  ] parallel port 1 at 0x0378 irq 7     00000000000i[     ] init_dev of 'extfpuirq' plugin device by virtual method     00000000000i[     ] init_dev of 'speaker' plugin device by virtual method     00000000000i[SPEAK] Failed to open /dev/console: Permission denied     00000000000i[SPEAK] Deactivating beep on console     00000000000i[     ] reset of 'harddrv' plugin device by virtual method     00000000000i[     ] reset of 'keyboard' plugin device by virtual method     00000000000i[     ] reset of 'serial' plugin device by virtual method     00000000000i[     ] reset of 'parallel' plugin device by virtual method     00000000000i[     ] reset of 'extfpuirq' plugin device by virtual method     00000000000i[     ] reset of 'speaker' plugin device by virtual method     00000003740i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00000317563i[KBD  ] reset-disable command received     00000425250i[VBIOS] VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00000428257i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00000737822i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00000786523e[HD   ] ata0: device set to 1 which does not exist     00000786815e[HD   ] ata1: device set to 0 which does not exist     00000787108e[HD   ] ata1: device set to 1 which does not exist     00001195713i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00001195713e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00001195713i[CPU  ] protected mode     00001195713i[CPU  ] CS.d_b = 32 bit     00001195713i[CPU  ] SS.d_b = 32 bit     00001195713i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00001195713i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00001195713i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00001195713i[CPU  ] | SEG selector     base    limit G D     00001195713i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00001195713i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00001195713i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00001195713i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00001195713i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00001195713i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00001195713i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00001195713i[CPU  ] | EIP=c002bc25 (c002bc25)     00001195713i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00001195713i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00001195713i[CPU  ] >> 0f     00001195713i[CPU  ] >> 44     00001195713i[CPU  ] >> e8     00001195713i[CPU  ] >> : cmovz ebp, eax     00001195713i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00001199453i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00001513314i[KBD  ] reset-disable command received     00001621001i[VBIOS]      VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00001624008i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00001933573i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00001982274e[HD   ] ata0: device set to 1 which does not exist     00001982566e[HD   ] ata1: device set to 0 which does not exist     00001982859e[HD   ] ata1: device set to 1 which does not exist     00002391464i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00002391464e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00002391464i[CPU  ] protected mode     00002391464i[CPU  ] CS.d_b = 32 bit     00002391464i[CPU  ] SS.d_b = 32 bit     00002391464i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00002391464i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00002391464i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00002391464i[CPU  ] | SEG selector     base    limit G D     00002391464i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00002391464i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00002391464i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00002391464i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00002391464i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00002391464i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00002391464i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00002391464i[CPU  ] | EIP=c002bc25 (c002bc25)     00002391464i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00002391464i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00002391464i[CPU  ] >> 0f     00002391464i[CPU  ] >> 44     00002391464i[CPU  ] >> e8     00002391464i[CPU  ] >> : cmovz ebp, eax     00002391464i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00002395204i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00002709065i[KBD  ] reset-disable command received     00002816752i[VBIOS]      VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00002819759i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00003129324i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00003178025e[HD   ] ata0: device set to 1 which does not exist     00003178317e[HD   ] ata1: device set to 0 which does not exist     00003178610e[HD   ] ata1: device set to 1 which does not exist     00003587215i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00003587215e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00003587215i[CPU  ] protected mode     00003587215i[CPU  ] CS.d_b = 32 bit     00003587215i[CPU  ] SS.d_b = 32 bit     00003587215i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00003587215i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00003587215i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00003587215i[CPU  ] | SEG selector     base    limit G D     00003587215i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00003587215i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00003587215i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00003587215i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00003587215i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00003587215i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00003587215i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00003587215i[CPU  ] | EIP=c002bc25 (c002bc25)     00003587215i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00003587215i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00003587215i[CPU  ] >> 0f     00003587215i[CPU  ] >> 44     00003587215i[CPU  ] >> e8     00003587215i[CPU  ] >> : cmovz ebp, eax     00003587215i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00003590955i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00003904816i[KBD  ] reset-disable command received     00004012503i[VBIOS]      VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00004015510i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00004325075i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00004373776e[HD   ] ata0: device set to 1 which does not exist     00004374068e[HD   ] ata1: device set to 0 which does not exist     00004374361e[HD   ] ata1: device set to 1 which does not exist     00004782966i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00004782966e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00004782966i[CPU  ] protected mode     00004782966i[CPU  ] CS.d_b = 32 bit     00004782966i[CPU  ] SS.d_b = 32 bit     00004782966i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00004782966i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00004782966i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00004782966i[CPU  ] | SEG selector     base    limit G D     00004782966i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00004782966i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00004782966i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00004782966i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00004782966i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00004782966i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00004782966i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00004782966i[CPU  ] | EIP=c002bc25 (c002bc25)     00004782966i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00004782966i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00004782966i[CPU  ] >> 0f     00004782966i[CPU  ] >> 44     00004782966i[CPU  ] >> e8     00004782966i[CPU  ] >> : cmovz ebp, eax     00004782966i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00004786706i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00005100567i[KBD  ] reset-disable command received     00005208254i[VBIOS]      VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00005211261i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00005520826i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00005569527e[HD   ] ata0: device set to 1 which does not exist     00005569819e[HD   ] ata1: device set to 0 which does not exist     00005570112e[HD   ] ata1: device set to 1 which does not exist     00005978717i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00005978717e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00005978717i[CPU  ] protected mode     00005978717i[CPU  ] CS.d_b = 32 bit     00005978717i[CPU  ] SS.d_b = 32 bit     00005978717i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00005978717i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00005978717i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00005978717i[CPU  ] | SEG selector     base    limit G D     00005978717i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00005978717i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00005978717i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00005978717i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00005978717i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00005978717i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00005978717i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00005978717i[CPU  ] | EIP=c002bc25 (c002bc25)     00005978717i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00005978717i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00005978717i[CPU  ] >> 0f     00005978717i[CPU  ] >> 44     00005978717i[CPU  ] >> e8     00005978717i[CPU  ] >> : cmovz ebp, eax     00005978717i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00005982457i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00006296318i[KBD  ] reset-disable command received     00006404005i[VBIOS]      VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00006407012i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00006716577i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00006765278e[HD   ] ata0: device set to 1 which does not exist     00006765570e[HD   ] ata1: device set to 0 which does not exist     00006765863e[HD   ] ata1: device set to 1 which does not exist     00007174468i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00007174468e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00007174468i[CPU  ] protected mode     00007174468i[CPU  ] CS.d_b = 32 bit     00007174468i[CPU  ] SS.d_b = 32 bit     00007174468i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00007174468i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00007174468i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00007174468i[CPU  ] | SEG selector     base    limit G D     00007174468i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00007174468i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00007174468i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00007174468i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00007174468i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00007174468i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00007174468i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00007174468i[CPU  ] | EIP=c002bc25 (c002bc25)     00007174468i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00007174468i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00007174468i[CPU  ] >> 0f     00007174468i[CPU  ] >> 44     00007174468i[CPU  ] >> e8     00007174468i[CPU  ] >> : cmovz ebp, eax     00007174468i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00007178208i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00007492069i[KBD  ] reset-disable command received     00007599756i[VBIOS]      VGABios $Id: vgabios.c,v 1.63 2005/12/26 19:50:26 vruppert Exp $     00007602763i[VBIOS] VBE Bios $Id: vbe.c,v 1.48 2005/12/26 19:50:26 vruppert Exp $     00007912328i[BIOS ] ata0-0: PCHS=5/16/63 translation=none LCHS=5/16/63     00007961029e[HD   ] ata0: device set to 1 which does not exist     00007961321e[HD   ] ata1: device set to 0 which does not exist     00007961614e[HD   ] ata1: device set to 1 which does not exist     00008370219i[CPU  ] CMOV_GdEd: -enable-cpu-level=6 required     00008370219e[CPU  ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting     00008370219i[CPU  ] protected mode     00008370219i[CPU  ] CS.d_b = 32 bit     00008370219i[CPU  ] SS.d_b = 32 bit     00008370219i[CPU  ] | EAX=c0035b92  EBX=c000efa8  ECX=00000043  EDX=00000073     00008370219i[CPU  ] | ESP=c000eed0  EBP=c0007d3e  ESI=00000000  EDI=00000005     00008370219i[CPU  ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af pf cf     00008370219i[CPU  ] | SEG selector     base    limit G D     00008370219i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D     00008370219i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1     00008370219i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00008370219i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00008370219i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1     00008370219i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00008370219i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1     00008370219i[CPU  ] | EIP=c002bc25 (c002bc25)     00008370219i[CPU  ] | CR0=0x80010015 CR1=0 CR2=0x00000000     00008370219i[CPU  ] | CR3=0x0000f000 CR4=0x00000000     00008370219i[CPU  ] >> 0f     00008370219i[CPU  ] >> 44     00008370219i[CPU  ] >> e8     00008370219i[CPU  ] >> : cmovz ebp, eax     00008370219i[SYS  ] bx_pc_system_c::Reset(SOFTWARE) called     00008373959i[BIOS ] $Revision: 1.160 $ $Date: 2006/01/25 17:51:49 $     00008687820i[KBD  ] reset-disable command received     00008795507i[VBIOS]      ... (these blocks repeat over and over)     00020359141i[     ] restoring default signal behavior     00020359141i[CTRL ] quit_sim called with exit code 1      Anyone know what might be happening? I've looked at bochs documentation, Pintos documentation related to bochs, and so on. No dice.


title: How do you rename root?

text: Not that it's a very good idea to change it, but for fun. According to this post, there are still some problems even after changing entries in `/etc/passwd`, `/etc/shadow`, and `/etc/sudoers`. Any suggestions?


title: Can I make scripts use aliases instead of commands?

text: I have an alias for a command (I'm setting up a Python development environment)               alias python=~/virtualenv/bin/python      so that I can run `~/virtualenv/bin/python` by just typing `python`. Now in my project there is a shell script that goes, for example:               #!/bin/sh     python run-project.py      Can I make the script use my aliased `python` instead of the `python` it finds in `$PATH`, without making changes to the script?


title: Why does emacs movemail take precedence over mailutils movemail?

text: I have installed mailutils from the Ubuntu 12.10 repo and specified the `rmail-mailmove-program` as either `/usr/bin/movemail` or `/usr/bin/movemail.mailutils` but in either case emacs reports                rmail-parse-url: Emacs movemail does not support imap protocol      as a result of `M-x rmail RET`. I infer from this that emacs movemail is being used and that the mailutils movemail is being ignored. In my `~/.emacs.d/init.el` I have:                ;; Reading mail      (setq rmail-movemail-flags (list "--tls"))      (setq rmail-movemail-program "/usr/bin/movemail.mailutils")      ;; (setq rmail-movemail-program "/usr/bin/movemail")       (setq rmail-primary-inbox-list                 (quote("imap://mylocal%40jazz2.eu:***@mail.jazz2.eu")))       I verified that the movemail worked on its own before I configured `init.el` as follows:               sudo movemail -p -v 'imap://mylocal%40jazz2.eu:***@mail.jazz2.eu' test-mbox     movemail: number of messages in source mailbox: 1     movemail: number of processed messages: 1     movemail: number of errors: 0 / 0


title: cinnamon: get original look and feel using xsession

text: OS: Linux Mint 14 Cinnamon               $ cat .xsession     xmessage -file /etc/motd     /usr/bin/cinnamon        1. why do not I get the same look and feel as i do get without the above .xsession file? it also affects a few things      * when i open a gnome-terminal, i cannot see the input that is sent to terminal     * log out button looks different and does not log out on click   2. how .xsession file work in conjunction with selecting a session from the login screen? >   * last session >   * run xclient script >   * cinnamon >   * cinnamon 2d >   * gnome classic >   * secure remote connection >


title: Is it possible to set-up a VPN in such a way that I disconnect from the Internet if it goes down?

text: How can I set-up a VPN so I loose connection to the Internet if it goes down? I use Ubuntu and have used the network-dialog to use a VPN; but if the VPN goes down, it just switches to the non-VPN (eth0) connection. I would like to "disconnect" from the Internet (only allow connection by VPN) if VPN goes down. Obviously the VPN itself must be directly connected, but everything else should go through VPN. Alternatively, is it possible to set-up a virtual-computer (I'm semi- comfortable with VirtualBox) in this way? Or perhaps a way to limit Internet- access to VPN-only for just certain programs? I guess routing or iptables would be the obvious way to do it, but I really don't know where to start. I've seen some tutorials for setting-up a VPN- connection or ssh-tunnel by manipulating routing, but I don't know if they would work for this.


title: delete old log files except the last one (alphanumerically sorted)

text: I have a number of log files in the form:               log.2014-02-19-10_24_22      I.e. log.YYYY-MM-DD-H24_MI_SS The date that's part of the log file's name is when the log file was first created. So at any given moment in time I can have the following log files in my directory:               log.2014-02-19-10_18_54     log.2014-02-19-10_21_20     log.2014-02-19-10_23_11     etc.      Now I have a script that's invoked by a cronjob and that deletes "old" log files:               $ cat delete-old-rotated-logs      #!/usr/bin/env bash     find /home/foo -maxdepth 1 -iname log\* -type f -mmin +1800 -exec rm {} \;      The problem I am facing is that sometimes the process that's logging has crashed so the "latest" log file also becomes "old" after some time (since no process is writing on it) and gets deleted, thus losing me the trace. How can I re-write the `delete-old-rotated-logs` script so that it deletes old files except the last one (or the last `N`) ? For the ordering one can use both the filename itself or the modification timestamp (more robust).


title: Command works with tilde at the end. How?

text: I'm on Ubuntu. I have a script called `myscripts` in `/usr/bin/myscripts` This script simply changes the current directory to               ~/Work/MyScripts      Normally, I simply open a terminal and type               ~/Desktop$ . myscripts      However, today, I accidentally typed               ~/Desktop$ . StartAllScript~      To my surprise, this started Tomcat (~Work/Myscripts/ has a script to start Tomcat). I also tried               ~/Desktop$ . StartAllScript      But that gave me the error               bash: StartAllScript: No such file or directory      So how did `. StartAllScript~` work?


title: Virtual write-only file system for storing files in archive

text: I have an embarrassingly parallel process that creates a huge amount of nearly (but not completely) identical files. Is there a way to archive the files "on the fly", so that the data does not consume more space than necessary? The process itself accepts command-line parameters and prints the name of each file created to stdout. I'm invoking it with `parallel --gnu` which takes care of distributing input (which comes from another process) and collecting output:               arg_generating_process | parallel --gnu my_process | magic_otf_compressor      **SIMPLE EXAMPLE** for the first part of the pipe in `bash`:               for ((f = 0; $f < 100000; f++)); do touch $f; echo $f; done      How could `magic_otf_compressor` look like? It's supposed to treat each input line as file name, copy each file to a compressed `.tar` archive (the same archive for all files processed!) and then delete it. (Actually, it should be enough to print the name of each processed file, another `| parallel --gnu rm` could take care of deleting the files.) Is there any such tool? I'm not considering compressing each file individually, this would waste far too much space. I have looked into `archivemount` (will keep file system in memory -> impossible, my files are too large and too many) and `avfs` (couldn't get it to work together with FUSE). What have I missed? I'm just one step away from hacking such a tool myself, but somebody must have done it before... **EDIT** : Essentially I think I'm looking for a stdin front-end for `libtar` (as opposed to the command-line front-end `tar` that reads arguments from, well, the command line).


title: Split: how to split into different percentages?

text: How can I split a text file into 70% and 30% using the split command ?


title: Configure multiple interfaces with different hostnames using DHCP and DNS

text: I have a machine running Ubuntu 12.04 Server with two interfaces connected (eth0, eth1) to the network. Our network is set up so that a FreeBSD based DHCP server hands out leases and registers the client supplied host names with a DNS server on the same network. The two interfaces need to have different host names to register both on DNS. In /etc/network/interfaces I have added the hostname for eth1:               # The primary network interface (hostname: host0)     auto eth0     iface eth0 inet dhcp          # Secondary interface      auto eth1     iface eth1 inet dhcp       hostname host1      The dhcp client config looks something like this:                   option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;              send host-name "<hostname>";         request subnet-mask, broadcast-address, time-offset, routers,                 domain-name, domain-name-servers, domain-search, host-name,                 netbios-name-servers, netbios-scope, interface-mtu,                 rfc3442-classless-static-routes, ntp-servers,                 dhcp6.domain-search, dhcp6.fqdn,                 dhcp6.name-servers, dhcp6.sntp-servers;      The leases obtained look like this:               # /var/run/resolvconf/interface/eth0.dhclient     lease {       interface "eth0";       fixed-address 192.168.28.249;       option subnet-mask 255.255.255.0;       option routers 192.168.28.30;       option dhcp-lease-time 129600;       option dhcp-message-type 5;       option domain-name-servers 192.168.28.1,192.168.24.58;       option dhcp-server-identifier 192.168.28.1;       option ntp-servers 192.168.28.1,192.168.58.43,192.168.24.58;       option broadcast-address 192.168.28.255;       option domain-name "some.org";       renew 4 2014/02/20 01:00:39;       rebind 4 2014/02/20 15:31:19;       expire 4 2014/02/20 20:01:19;     }          # /var/run/resolvconf/interface/eth1.dhclient     lease {       interface "eth1";       fixed-address 192.168.19.69;       option subnet-mask 255.255.255.0;       option routers 192.168.19.30;       option dhcp-lease-time 129600;       option dhcp-message-type 5;       option domain-name-servers 192.168.28.1,192.168.24.58;       option dhcp-server-identifier 192.168.28.1;       option ntp-servers 192.168.28.1,192.168.58.43,192.168.24.58;       option broadcast-address 192.168.19.255;       option domain-name "some.org";       renew 3 2014/02/19 21:56:46;       rebind 4 2014/02/20 15:30:42;       expire 4 2014/02/20 20:00:42;     }      I do not have control over the FreeBSD DHCP server, but have been told the leases were recorded as:               #####################     lease 192.168.28.249 {     starts 5 2014/02/14 03:24:14;     ends 6 2014/02/15 15:24:14;     cltt 5 2014/02/14 03:24:14;     binding state active;     next binding state free;     hardware ethernet 00:01:02:03:04:12;     set ddns-rev-name = "249.28.168.192.in-addr.arpa.";     set ddns-fwd-name = "host0.dhcp.some.org";     client-hostname "host0";     on expiry or release {     switch (ns-update (delete (1, 12, ddns-rev-name, null))) {     case 0:     unset ddns-rev-name ;     break;     }     switch (ns-update (delete (1, 1, ddns-fwd-name, leased-address))) {     case 0:     unset ddns-fwd-name ;     break;     }     on expiry or release;     }     }     lease 192.168.19.69 {     starts 4 2014/02/13 14:40:47;     ends 6 2014/02/15 02:40:47;     cltt 4 2014/02/13 14:40:47;     binding state active;     next binding state free;     hardware ethernet 00:01:02:03:04:14;     client-hostname "host0";     }          #####################      In both leases on the server side the client-hostname has the value "host0". Note that the leases were handed out on two different subnets: 192.168.28.0 and 192.168.19.0. Is my /etc/network/interfaces configuration all that is needed for sending the secondary interface's hostname to the DHCP server? If so, what else should I check on the client side to debug? (IP addresses and MAC addresses were modified to hide real values)


title: fake monitor in a headless device

text: I have a raspberry running headless (no monitor nor TV) I have some programs that need X11 environment to start (but for nothing more) like for instance a midi sampler. I tried forwarding the X11 via SHH and it works like a charm. But I want to run those scripts by themselves heedlessly. Is it possible to fool the system and pretend that there is a screen available?


title: Formatting an external HDD with Bash script

text: At my workplace we have an external HDD connected to a NAS device (Synology). There is a backup tasks which runs weekly and fills the external HDD after a while. Unfortunately the Linux-based OS of the Synology Rack Station does not provide an automated task scheduling for formatting which can be done is a user friendly way. But, there is an options which allows running user defined *.sh scripts on the NAS in a certain time & date. The problem here is that I am not really familiar with bash code, to be able to write a script which will format the external HDD in ext4 filesystem. Could anyone please provide such a code here, or maybe pointers to any sites that contain the required information?


title: Submit an updated manpage

text: I found missing information in the manpage for `scp` when using IP6: there is no hint that you have to use slash masked brackets around the IP when using `scp -6`:               scp -6 user@\[2001:db8:0:1\]:/tmp/test.file /tmp      How can I submit a change to the scp manpage?


title: Is it possible to use XNU on GNU/Linux?

text: I was wondering whether it is possible to use the XNU kernel on a GNU/Linux system? But it would be, in effect, GNU/XNU. But is that possible? Does the kernel have sufficient drivers to boot on a lenovo? Or any computer other than a Mac? Or does the Apple EULA or AOSL deny my using it that way?


title: Fedora 19 using KDE - Phonon cannot switch to hdmi audio device 7

text: I have an issue with HDMI sound. I recently upgraded to **Fedora 19 (clean install)** but this issue exsists on F18 too. I have Intel **DQ67SW** motherboard with integrated audio/video and ASUS- **NVidia GT220** VGA card. Both the MB and the VGA have HDMI output but **Phonon** will only find the first HDMI on the MB regardless of it is used or not. I have only one Monitor with speakers and of course it’s connected to the VGA card. I use Fedora 19 with KDE. Strange thing that when I switch to Gnome the sound will work. **If I switch back, KDE will also work** but the sound configuration UI won’t list the proper device in the selection. If I change the selection the sound will fail immediatel on the change, even if I click on Cancel. **Now I have to install Gnome to manage the sound settings only!** As far as I see **it’s user specific configuration** and located somewhere in the home directory. I tried to save various sound related files (e.g. pulse, libphonon.something), but none of them helped. Can anybody explain me this behavior? I red about that Phonon has issues with multiple HDMI outputs but it's somehow forcible to have a secondary one. I want to have a proper workaround (without Gnome) with which I can control the sound settings. I used to configure asound.conf even with plugs and redirections but couple of kernel updates ago it won’t work. And AFAIK KDE use Pulseaudio, not Alsa. I didn’t mentioned that before one of the kernel updates I didn’t have any sound issues. I can’t remember the exact version. [update 2014-04-30] * * * Here's the list of audio devices:               aplay -l     **** List of PLAYBACK Hardware Devices ****     card 0: PCH [HDA Intel PCH], device 0: ALC888 Analog [ALC888 Analog]       Subdevices: 0/1       Subdevice #0: subdevice #0     card 0: PCH [HDA Intel PCH], device 1: ALC888 Digital [ALC888 Digital]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0


title: Determine the interface which was used for booting via PXE

text: I have a linux machine which was booted via PXE. Can I determine the network interface which was used for booting?


title: Split out data from a column

text: So at the moment I have some input email addresses and would like to separate the alias and the domain, then copy them to the end of the line. For example, from a line that has `something@test.com:blah:blah`, I would like to have `something@test.com:blah:blah:something:test.com`. I think I could cut based on the `@` delimiter to output a list of all the aliases and then a list of all the domains, but I do not know how to add these to an existing line one by one. Ideas?


title: How to extract submatches from a string and write those to a file?

text: I want to parse a string for specific submatches and output those - one submatch per line - into a file. Essentially I would like to extract the value of each href-attribute:               $ cat Fin     AXBYC          $ echo Fin | [grep, sed, awk, ...?] > Fout          $ cat Fout     a.htm     b.htm     c.htm      I tried few things with named tools but things don't work or are too complicated. I would like to perform this transformation within a single command line concatenating as few as possible commands with piping.


title: Font rendering - weird artifacts in gnome shell rendered texts

text: I'm using a unpatched freetype (recompiled to enable subpixel-rendering) on Fedora 20 to render fonts. I used to use the Infinality patch-sets but did away with that recently because it feels very hack-ish and I was getting weird artifacts. I'm generally quite pleased with the stock freetype font rendering, but I have an issue on all texts that are rendered by gnome-shell. See for example the date/clock in: ![](http://i.stack.imgur.com/ZKwg5.png) When zooming all the way in it looks like gnome-shell is getting subpixel- rendered text and then applies another antialising/dithering filter on it, which tints the text. Could this have to do with my GPU? I'm using i915 integrated graphics. I'm seeing this also all over the "activitives" overlay. Is there some dconf or gconf setting where I can turn that off?


title: Timestamp of socket in /proc/<pid>/fd

text: If I list `/proc/<pid>/fd` I see a number of entries for sockets. These entries have timestamps. At first I thought they were when the socket was created. But it doesn't always appear to be the case. What does this timestamp mean?


title: WiFi not working - wlan0 FAILED

text: My Arch (`3.6.5-1`) is exhibiting a rather peculiar problem: when wifi is set up, all logs indicate that the setup was successful and that the interface is up and functional. However, when attempting to access a website (or execute ping) all requests time out (despite that connection is reported as working and signal at 63% strength). This tends to happen randomly after laptop is switched on - after some time the connection usually starts working and does not break until next shutdown/suspend. Relevant `dmesg` entries (full `dmesg` output can be found here):               [   13.858528] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready     [   14.024275] r8169 0000:02:00.0: eth0: link down     [   14.024339] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready     [   34.895920] wlan0: authenticate with 00:24:6c:c8:e4:a1     [   34.900827] wlan0: send auth to 00:24:6c:c8:e4:a1 (try 1/3)     [   34.902963] wlan0: authenticated     [   34.908362] wlan0: associate with 00:24:6c:c8:e4:a1 (try 1/3)     [   34.911153] wlan0: RX AssocResp from 00:24:6c:c8:e4:a1 (capab=0x1431 status=0 aid=9)     [   34.911217] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready     [   34.911294] wlan0: associated      `ip -s link` shows:               wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000         link/ether 50:b7:c3:1e:f4:21 brd ff:ff:ff:ff:ff:ff         RX: bytes  packets  errors  dropped overrun mcast            14970982   50472    0       0       0       0               TX: bytes  packets  errors  dropped carrier collsns          19116      233      0       0       0       0            `ip minotor` outputs some failure messages:               [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [LINK]3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP>          link/ether      [LINK]3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN          link/ether 50:b7:c3:1e:f4:21 brd ff:ff:ff:ff:ff:ff     [LINK]3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DORMANT          link/ether 50:b7:c3:1e:f4:21 brd ff:ff:ff:ff:ff:ff     [LINK]3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP>          link/ether      [LINK]3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP>          link/ether      [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [LINK]3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP          link/ether 50:b7:c3:1e:f4:21 brd ff:ff:ff:ff:ff:ff     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]ff02::2 dev wlan0 lladdr 33:33:00:00:00:02 NOARP     [NEIGH]ff02::1:ff1e:f421 dev wlan0 lladdr 33:33:ff:1e:f4:21 NOARP     [NEIGH]ff02::16 dev wlan0 lladdr 33:33:00:00:00:16 NOARP     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.79.218 dev lo lladdr 00:00:00:00:00:00 NOARP     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [LINK]3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP>          link/ether      [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED     [NEIGH]144.32.78.1 dev wlan0  FAILED      All that should be loaded seem to be (output of lsmod). Any idea on how to solve this or what the problem is?


title: Laptop falls-back to Vesa video-driver

text: I own Dell Inspiron 15R SE (7520) and I have installed Arch Linux on it. It seems that I have two video-cards so I have installed both drivers + Vesa driver (pardon me if that's wrong).               dagrevis@haze ~ » lspci | grep VGA     00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)     01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cape Verde [Radeon HD 7700M Series]     dagrevis@haze ~ » pacman -Ss xf86-video | grep installed     extra/xf86-video-ati 1:7.0.0-1 (xorg-drivers xorg) [installed]     extra/xf86-video-intel 2.20.13-1 (xorg-drivers xorg) [installed]     extra/xf86-video-vesa 2.3.2-2 (xorg-drivers xorg) [installed]      When I execute `startx`, it loads-up, but, sadly, using Vesa. Here's Xorg.0.log. Why's that? How can I fix it? Thanks! P.S. I would be happy to use just Intel card and don't touch ATI at all.


title: Why are bash tests so picky about whitespace?

text: As a primarily Java programer, I find the bash if-then construct quite confusing, especially regarding whitespace. Can anyone explain, why the first one works but not the second and third?               #works     if [ -n $1 ]; then echo "parameterized"; fi          #output: ./links: Zeile 1: [-n: Kommando nicht gefunden.     if [-n $1 ]; then echo "parameterized"; fi          #output: ./links: Zeile 1: [: Fehlende `]'     if [ -n $1]; then echo "parameterized"; fi


title: Re-execute fc command from history

text: Sometimes I am using the `fc` builtin in `bash` (3.2 if that matters), to recall commands from the history. This also offers the possibility to edit, before execution. For example, by typing               fc 23 27      I can re-execute command 23 till 27. But now I want to execute this specific `fc 23 27` command again. How should I do that? It looks as if the executed `fc` is not stored in the command history, although the newly executed lines are.


title: Kali linux internet suddenly working

text: I have been running Kali linux on vmplayer and internet was not working on it. But suddenly today it started working. I didn't install any compat drivers and my laptop is not hooked up to ethernet but still I can access the internet. Also no wireless connections show up upon typing: `ifconfig` just `eth0` and `lo`. Can someone please explain how it could be working all of a sudden?


title: Upstart - load bashrc variable

text: I'm wondering how to load `bashrc` variables in an upstart script and run (`node.js` in that case server). What is the best way to do it? I tried this:               exec sudo -u someuser $NODE_PATH $FULL_PATH/$FILE_NAME >> /var/log/$PROGRAM_NAME.sys.log 2>&1      and this               exec start-stop-daemon --start -c someuser --exec $NODE_PATH $FULL_PATH/$FILE_NAME >> /var/log/$PROGRAM_NAME.sys.log 2>&1      But in the first option the node app can't read the `http_proxy` variable (which is defined in `/etc/bash.bashrc`). In the second one it can't read config files (the node app is installed in the `/opt` folder)


title: RSA keys demanding nonexistant passphrase

text: I need to automate a script that logs into a server. I made an RSA key and upload it to the server's authorized_keys file:               desktop$ ssh-keygen -f ~/.ssh/id_rsa_marge -P '' -t rsa     desktop$ chmod 600 ~/.ssh/id_*     desktop$ scp ~/.ssh/id_rsa_marge.pub me@2.4.6.8:~/     password:     desktop$ ssh me@2.4.6.8     password:          marge$ cat ~/id_rsa_marge.pub >> ~/.ssh/authorized_keys     marge$ whoami     me     marge$ ls -la | grep ssh     drw-------   2 me me     4096 May 29 16:02 .ssh     marge$ ls -la .ssh     total 16     drwx------  2 me me 4096 May 29 16:02 .     drwx--x--x. 9 me me 4096 Aug 11 05:32 ..     -rw-------  1 me me  398 Aug 11 04:14 authorized_keys     -rw-r--r--  1 me me  414 May 29 16:02 known_hosts     marge$ cat .ssh/authorized_keys      ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzUvV0SMF+H7kwmEkJzXY1RqionS6DTtJiON3+9L6neKMaFb/FXc3UtK7oN/lsxNcHwv9s9GG4xp2UiUNk8NeT+/aFCjl7sMpDsW1+bn7sjhRFFw095qxvK52somSUKXlm9DP1pr0wj9r9Kxdph3HynxRsMkdPnWK2LVGhHzr3nh39mJ/3Fwaejl+sYnO8wgPfZbqZTA1xubhIQilv0XI8YAWUOM+Mn2QmyI12geTVKdD393wL0cDrkit/MXjMY6pimSFafrFJkaWV1BI4YOnkPRPo8oyoM4ywXhcCeb14JkOmKdSacUwSDsnCy/IDP51rcwItZrXxBiOHFZJW1Nlp dotancohen@desktop     marge$ exit          desktop$ cat .ssh/id_rsa_marge.pub      ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzUvV0SMF+H7kwmEkJzXY1RqionS6DTtJiON3+9L6neKMaFb/FXc3UtK7oN/lsxNcHwv9s9GG4xp2UiUNk8NeT+/aFCjl7sMpDsW1+bn7sjhRFFw095qxvK52somSUKXlm9DP1pr0wj9r9Kxdph3HynxRsMkdPnWK2LVGhHzr3nh39mJ/3Fwaejl+sYnO8wgPfZbqZTA1xubhIQilv0XI8YAWUOM+Mn2QmyI12geTVKdD393wL0cDrkit/MXjMY6pimSFafrFJkaWV1BI4YOnkPRPo8oyoM4ywXhcCeb14JkOmKdSacUwSDsnCy/IDP51rcwItZrXxBiOHFZJW1Nlp dotancohen@desktop     desktop$ ls -la | grep .ssh     -rw-------  1 dotancohen dotancohen     689 Aug 12 11:03 .lesshst     drwx------  3 dotancohen dotancohen    4096 Aug 12 11:05 .ssh     desktop$ ls -la .ssh | grep canary     -rw-------  1 dotancohen dotancohen  1675 Aug 11 12:13 id_rsa_marge     -rw-------  1 dotancohen dotancohen   398 Aug 11 12:13 id_rsa_marge.pub     desktop$ grep -A 5 marge .ssh/config     Host marge         User me         HostName 2.4.6.8         IdentityFile ~/.ssh/id_rsa_marge.pub         IdentitiesOnly yes      However, when I try to log into the server it asks for a passphrase:               desktop$ ssh -v marge     OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010     debug1: Reading configuration data /home/desktop/.ssh/config     debug1: Applying options for marge     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to 2.4.6.8 [2.4.6.8] port 22.     debug1: Connection established.     debug1: identity file /home/desktop/.ssh/id_rsa_marge.pub type 1     debug1: identity file /home/desktop/.ssh/id_rsa_marge.pub-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.3     debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.3     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     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     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Host '2.4.6.8' is known and matches the RSA host key.     debug1: Found key in /home/desktop/.ssh/known_hosts:2     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey     debug1: Next authentication method: publickey     debug1: Offering public key: /home/desktop/.ssh/id_rsa_marge.pub     debug1: Server accepts key: pkalg ssh-rsa blen 277     debug1: PEM_read_PrivateKey failed     debug1: read PEM private key done: type <unknown>     Enter passphrase for key '/home/desktop/.ssh/id_rsa_marge.pub':      debug1: No more authentication methods to try.     Permission denied (publickey).      As can be seen, there is no passphrase for this key. Furthermore, from a different desktop I can use this key without entering a passphrase! **Why does this one server demand that I enter a passphrase, when there is none?**


title: How to rollback network configuration changes done over SSH in case of failure?

text: I'm about to change `iptables` configuration and interface speed and duplex settings over SSH. What are the possibilities to rollback the changes in case of host becomes unreachable? I guess simple:               ip addr add 10.10.10.1/24 dev eth0; ping -c1 8.8.8.8 || ip addr add 192.168.1.1/24 dev eth0      ..is bit risky because if SSH connection drops immediately after the IP address change, then shell should be also killed and `ping -c1 8.8.8.8 || ip addr add 192.168.1.1/24 dev eth0` part is never executed? Should one use `crontab` in case of dangerous changes on a remote host? Any other clever method?


title: How do I use putty in full-screen mode?

text: I am running `putty` (August 7, 2013 build from wheezy) but don't know how to get it into full-screen mode. In windows I used to just right-click on it in the taskbar and select Full- screen mode. In Debian I don't see that option. I also had a look in `Window->Appearance` but couldn't see anything. Pressing `Alt+Enter` has no effect. I am using `gnome`.


title: Force Epiphany to open links in Chrome (in Gnome 3)

text: Chrome Web Apps don't get a separate dock icon in Gnome 3. A way around this is to use Epiphany for web apps, but the downside is that all links will open in a new Epiphany window. **How can I have Epiphany Web App links to open in Chrome?**


title: Issue with laptop screen when opening lid

text: I use Archlinux, with acpid to configure the laptop lid behavior rather than systemd. Currently, I have it set so vbetool sets dpms off when the lid is closed, and reopening the lid sets it back on. However, sometimes (roughly 1 in every 10 lid openings, doesn't happen with a particular pattern), setting the dpms back on fails to work. Once I close and reopen again, everything is fine. Any ideas why that might be? Or how I can get more info about what's going wrong? **UPDATE:** I got this behavior to occur while I was on the framebuffer, and here is what it output:               [drm:intel_enable_transcoder] *ERROR* failed to enable transcoder 0      If someone has an idea on what I can do from this point, that'd be fantastic.


title: What happened to ~ when updating oh-my-zsh?

text: Not sure what changed the meaning of the home path `~` in my zsh. So when I do `cd ~` , I dont `cd` into my home but it gives me an error that `/Users/carlos` does not exist. How can I reset `~` to refer to the current user again?


title: Cannot change baud rate on usb serial device

text: I recently upgraded to ubuntu 12.04 from 10.04. Under 10.04 I had no trouble using usbserial driver to connect to a device through the serial port. After the upgrade _usually_ I cannot reset the baud rate: it is initialized to 9600, but my device needs 115200. When I try to reset the speed I get:               $ sudo stty -F /dev/ttyUSB0      speed 9600 baud; line = 0;     -brkint -imaxbel     $ sudo stty -F /dev/ttyUSB0 115200     stty: /dev/ttyUSB0: unable to perform all requested operations     $ sudo setserial -av /dev/ttyUSB0     Cannot get serial info: Invalid argument     $ ls -l /dev/ttyUS*     crw-rw---- 1 root dialout 188, 0 Nov 26 10:21 /dev/ttyUSB0     crw-rw---- 1 root dialout 188, 1 Nov 26 10:21 /dev/ttyUSB1      The oddest thing is that I have gotten this to work on occasion. The first time I rebooted the system, and it worked. After a shutdown it had the same problem and rebooting did not work, but reloading the driver did. Unfortunately this has not worked since:               $ sudo modprobe -r usbserial     $ sudo modprobe usbserial vendor=0x0403 product=0x6001     $ sudo stty -F /dev/ttyUSB0 115200     stty: /dev/ttyUSB0: unable to perform all requested operations


title: How to assign multiple fixed ip address for one domain?

text: I'm running `dnsmasq`,               address=/chat.freenode.net/130.239.18.172     address=/chat.freenode.net/140.211.167.105      But seems `dnsmasq` only recognize the last record, what should I do?


title: List any file ending with .in and corresponding .out with shell script

text: I have a directory full of files ending with different extensions, how would I list/select only the files ending with `.in` and corresponding `.out` that share the same basename? e.g.               file1.txt     file1.in     file2.in     file3.in     file2.out     file3.out      What I want to select from these files are:               file2.in     file2.out     file3.in     file3.out


title: How do mouse events work in linux?

text: This is mostly out of curiosity, I'm trying to understand how event handling works on a low level, so please don't reference me to a software that'll do it for me. If for example I want to write a program in C/C++ that reacts to mouse clicks, I assume I need to use a system call to hook some function to the kernel, or maybe you need to just constantly check the status of the mouse, I don't know. I assume it's possible since just about everything is possible in C/C++, being so low level, I'm mostly interested in how it works, even though I'll probably never have to implement it myself. The question is how it works in linux, are there certain system calls, c libraries, etc.?


title: How to add home directory path to be discovered by Unix which command?

text: I have installed `node.js` at custom location and added the location to the `$PATH` in `.profile` file.               Hoons-MacBook-Air:npm Eonil$ node --version     v0.6.2     Hoons-MacBook-Air:npm Eonil$ which node     Hoons-MacBook-Air:npm Eonil$ echo $PATH     /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:~/Unix/homebrew/bin     Hoons-MacBook-Air:npm Eonil$ cat ~/.profile     export  PATH="$PATH:~/Unix/homebrew/bin"     Hoons-MacBook-Air:npm Eonil$       Node.js itself runs well. The problem is it is not listed by `which` command. So I can't install `npm` now. Because `npm` install cannot find the location of `node.js`. How can I make the `node` binary discovered by `which`?


title: Windows Recovery from Grub messed up my computer?

text: Ok so I'm a noob when it comes to Operating Systems and I think I really messed up this time. So I have a laptop that dual boots Windows 7 and Linux Mint 11. I was trying to boot into Windows 7 but it would just have a black screen with a blinking cursor. So I turned off my computer and tried again. Still a black screen with a cursor. So I thought "well it must be broken somehow and I remembered seeing something like 'Windows Recovery' from the boot menu so I should try it." So when I turned on my computer a third time I selected 'Windows Recovery' (Something like that I can't remember exactly what it was called). After I had selected that I got a white Windows window that said in big red letters "ERROR". I turned off my computer again a turned it back on expecting the Grub menu to reappear. I was wrong. Instead I am greeted with error: no such partition grub rescue>. Then I put in a live CD for ubuntu 11.04 and tried looking at my partitions using the disk manager. Looking at my partitions I notice that there isn't a Linux partition anymore and in its place is a unallocated space partition yet the Linux Swap partition is still there. My windows partition is still fine and I can access the files in it. If you understand what has happened, is there anyway I can get my files back? I don't care about reinstalling the OS again. I just want those files that are in the Linux Mint partition.


title: Shell script to produce duplicate output with increments

text: I need a script that will produce the following output many times               @float Figure,fig:n     @cindex      @image{n,9cm}.     @caption{}     @end float      but where n (both times) is replaced by 1, 2, 3, up to a large number. Thanks.


title: how to disable time sync in VM guest?

text: I have a desktop (centos 6) that has a VM guest (RedHat 5.5). I just try to set the date to past time in VM guest. And it works. However, after 50 minutes, the time is sync to current time. After I check with the cron job, I did not find any cron job to do the time sync. May I know how can I disable the time sync in the VM guest? Edited: I am using virsh to start and stop VM guest.


title: When is xargs needed?

text: The `xargs` command always confuses me. Is there a general rule that can help me figure out when I need it? Consider the two examples below:               $ \ls | grep Cases | less      prints the files that match 'Cases', but changing the command to `touch` will require `xargs`:               $ \ls | grep Cases | touch     touch: missing file operand     Try `touch --help' for more information.          $ \ls | grep Cases | xargs touch


title: Asking rsync to create *any* necessary directories

text: I have the following loop in zsh:                for x in my_folders*;       do         rsync -adrv $x/foo/bar/ /foo2/bar2/new_dir/$x/      done      `new_dir` does not exist before calling `rsync`, and I would like `rsync` to create it, along with everything else needed for the copy operation. I am passing `rsync` the flags `d` and `r` but it complains with:               rsync: mkdir "/foo2/bar2/new_dir/item1" failed: No such file or directory (2)      It apparently assumes that the folders `/foo2/bar2/new_dir/$x/` exist prior to the copying, which don't. With this:   * Is there a way to ask rsync to create **any** necessary directories needed for the copy operation to work?


title: Configure permissions

text: I'm sharing a git repository with a friend over SSH. He pushes from and pulls to his git repository using my machine's SSH server, where the shared git repository is. Problem is that when he pushes a commit, I can't pull, because the commit is `janito users rwx------` (these are permission metadata). I created a group called git, added him and myself, and the repository is `jpmelos git rwxrwx---`. How can I force files created in the repository directory to be `<creator> git rwxrwx---` as well, so we can always pull and push without worrying about permissions? Or you can suggest better solutions to the problem, of course. Restrictions are that we need to use the SSH on my machine (we are not ready to make the code public yet) and we are already pushing and pulling from a bare repository I created separately from my working repository. Thanks!


title: Should I use `sudo` or `su` in a startup script?

text: I have a personal program, that has a server/client design. The server daemon part of it, should be run as its own limited user, and the program was not designed to drop its root privileges (if started as root) like some Linux programs do. So my question, in its startup script in `/etc/init.d/`, should I use `sudo` or `su` to run this daemon as another user? Does it make a difference? Will either of the two even work? Something else? The operating system is a custom GNU/Linux one, built using "Linux From Scratch" instructions, and does have both programs running correctly.


title: What's the status of Upstart on Debian?

text: I know that this question has already got asked before, but it's pretty old and things have changed (probably). Already in 2009 the news rumbled, that Debian was going to switch to Upstart. You were able to install it, but had to remove `sysvinit`:               $ aptitude show upstart     $ > Conflicts: startup-tasks, system-services, sysvinit, upstart-compat-sysv, upstart-job      It appears like you can still install Upstart, as it is in the Debian packages. So my question is, what's the status quo? Was there _any_ development on this? Does Debian _still_ use `sysvinit`; did they switch to another system comparable to Upstart?


title: Polish chars in gedit (Fedora 18)

text: I locked my Fedora18 computer (set to Polish). Later I couldn't log in (password was accepted, but I didn't see my desktop). I used `pkill -KILL -u tymon` command in root mode (`Ctrl`+`Alt`+`f2`). After this, I didn't see (my native) Polish characters in `gedit` (I see only "bushes"). I don't why. I didn't install any update. Restart didn't help. What should I do? PS : When I wrote `gedit --list-encodings` there wasn't utf-8 :               ISO-8859-1     ISO-8859-2     ISO-8859-3     ISO-8859-4     ISO-8859-5     ISO-8859-6     ISO-8859-7     ISO-8859-8     ISO-8859-9     ISO-8859-10     ISO-8859-13     ISO-8859-14     ISO-8859-15     ISO-8859-16     UTF-7     UTF-16     UTF-16BE     UTF-16LE     UTF-32     UCS-2     UCS-4     ARMSCII-8     BIG5     BIG5-HKSCS     CP866     EUC-JP     EUC-JP-MS     CP932     EUC-KR     EUC-TW     GB18030     GB2312     GBK     GEORGIAN-ACADEMY     IBM850     IBM852     IBM855     IBM857     IBM862     IBM864     ISO-2022-JP     ISO-2022-KR     ISO-IR-111     JOHAB     KOI8R     KOI8-R     KOI8U     SHIFT_JIS     TCVN     TIS-620     UHC     VISCII     WINDOWS-1250     WINDOWS-1251     WINDOWS-1252     WINDOWS-1253     WINDOWS-1254     WINDOWS-1255     WINDOWS-1256     WINDOWS-1257     WINDOWS-1258      PPS : `Journaltclt -b` gives me :               -- Logs begin at nie 2013-05-12 15:57:17 EDT, end at nie 2013-05-12 14:01:04 EDT. --     maj 12 15:57:17 localhost.localdomain systemd-journal[454]: Allowing runtime journal files to grow to 196.8M.     maj 12 15:57:17 localhost.localdomain systemd-journald[96]: Received SIGTERM     maj 12 15:57:17 localhost.localdomain kernel: SELinux: 2048 avtab hash slots, 96259 rules.     maj 12 15:57:17 localhost.localdomain kernel: SELinux: 2048 avtab hash slots, 96259 rules.     maj 12 15:57:17 localhost.localdomain kernel: SELinux:  9 users, 15 roles, 4389 types, 246 bools, 1 sens, 1024 cats     maj 12 15:57:17 localhost.localdomain kernel: SELinux:  83 classes, 96259 rules     maj 12 15:57:17 localhost.localdomain kernel: SELinux:  Permission attach_queue in class tun_socket not defined in policy.     maj 12 15:57:17 localhost.localdomain kernel: SELinux: the above unknown classes and permissions will be allowed     maj 12 15:57:17 localhost.localdomain kernel: SELinux:  Completing initialization.     maj 12 15:57:17 localhost.localdomain kernel: SELinux:  Setting up existing superblocks.     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev sysfs, type sysfs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev rootfs, type rootfs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev bdev, type bdev), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev proc, type proc), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev devtmpfs, type devtmpfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev sockfs, type sockfs), uses task SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev debugfs, type debugfs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev pipefs, type pipefs), uses task SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev anon_inodefs, type anon_inodefs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev devpts, type devpts), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev hugetlbfs, type hugetlbfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev mqueue, type mqueue), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev selinuxfs, type selinuxfs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev sysfs, type sysfs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev securityfs, type securityfs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev cgroup, type cgroup), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev dm-2, type ext4), uses xattr     maj 12 15:57:17 localhost.localdomain systemd[1]: Successfully loaded SELinux policy in 289ms 940us.     maj 12 15:57:17 localhost.localdomain systemd[1]: Relabelled /dev and /run in 19ms 778us.     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev autofs, type autofs), uses genfs_contexts     maj 12 15:57:17 localhost.localdomain systemd-journal[454]: Journal started     maj 12 15:57:15 localhost.localdomain systemd[1]: systemd 197 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYP     maj 12 15:57:15 localhost.localdomain systemd[1]: Set hostname to <localhost.localdomain>.     maj 12 15:57:16 localhost.localdomain systemd[1]: Started Apply Kernel Variables.     maj 12 15:57:17 localhost.localdomain systemd[1]: Started Setup Virtual Console.     maj 12 15:57:17 localhost.localdomain systemd[1]: Started udev Kernel Device Manager.     maj 12 15:57:17 localhost.localdomain systemd-udevd[446]: starting version 197     maj 12 15:57:17 localhost.localdomain systemd[1]: Started udev Coldplug all Devices.     maj 12 15:57:17 localhost.localdomain systemd[1]: Starting udev Wait for Complete Device Initialization...     maj 12 15:57:17 localhost.localdomain systemd[1]: Starting Show Plymouth Boot Screen...     maj 12 15:57:17 localhost.localdomain systemd[1]: Mounted Temporary Directory.     maj 12 15:57:17 localhost.localdomain systemd[1]: Mounted POSIX Message Queue File System.     maj 12 15:57:17 localhost.localdomain systemd[1]: Mounted Huge Pages File System.     maj 12 15:57:17 localhost.localdomain systemd[1]: Mounted Debug File System.     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs     maj 12 15:57:17 localhost.localdomain kernel: SELinux: initialized (dev hugetlbfs, type hugetlbfs), uses transition SIDs     maj 12 15:57:18 localhost.localdomain systemd-modules-load[451]: Inserted module 'uinput'     maj 12 15:57:18 localhost.localdomain kernel: EXT4-fs (dm-2): re-mounted. Opts: (null)     maj 12 15:57:18 localhost.localdomain systemd[1]: Started Load Kernel Modules.     maj 12 15:57:18 localhost.localdomain systemd[1]: Started Remount Root and Kernel File Systems.     maj 12 15:57:18 localhost.localdomain systemd[1]: Starting Local File Systems (Pre).     maj 12 15:57:18 localhost.localdomain systemd[1]: Reached target Local File Systems (Pre).     maj 12 15:57:18 localhost.localdomain systemd[1]: Starting Configure read-only root support...     maj 12 15:57:18 localhost.localdomain systemd[1]: Started Import network configuration from initramfs.     maj 12 15:57:18 localhost.localdomain systemd[1]: Starting Load Random Seed...     maj 12 15:57:18 localhost.localdomain systemd[1]: Mounting Configuration File System...     maj 12 15:57:18 localhost.localdomain systemd[1]: Mounted FUSE Control File System.     maj 12 15:57:18 localhost.localdomain systemd[1]: Mounted Configuration File System.     maj 12 15:57:18 localhost.localdomain kernel: SELinux: initialized (dev configfs, type configfs), uses genfs_contexts     maj 12 15:57:18 localhost.localdomain systemd[1]: Started Load Random Seed.     maj 12 15:57:18 localhost.localdomain systemd[1]: Started Configure read-only root support.     maj 12 15:57:18 localhost.localdomain kernel: kvm: disabled by bios     maj 12 15:57:18 localhost.localdomain systemd[1]: Started Load legacy module configuration.     maj 12 15:57:19 localhost.localdomain systemd[1]: Started Show Plymouth Boot Screen.     maj 12 15:57:19 localhost.localdomain systemd[1]: Starting Forward Password Requests to Plymouth Directory Watch.     maj 12 15:57:19 localhost.localdomain systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.     maj 12 15:57:19 localhost.localdomain systemd[1]: Started Dispatch Password Requests to Console Directory Watch.     maj 12 15:57:19 localhost.localdomain kernel: asus_wmi: ASUS WMI generic driver loaded     maj 12 15:57:19 localhost.localdomain kernel: asus_wmi: Initialization: 0x0     maj 12 15:57:19 localhost.localdomain kernel: asus_wmi: BIOS WMI version: 0.9     maj 12 15:57:19 localhost.localdomain kernel: asus_wmi: SFUN value: 0x0     maj 12 15:57:19 localhost.localdomain kernel: input: Eee PC WMI hotkeys as /devices/platform/eeepc-wmi/input/input6     maj 12 15:57:19 localhost.localdomain kernel: asus_wmi: Disabling ACPI video driver     maj 12 15:57:19 localhost.localdomain kernel: i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt     maj 12 15:57:19 localhost.localdomain kernel: mei 0000:00:16.0: setting latency timer to 64     maj 12 15:57:19 localhost.localdomain kernel: mei 0000:00:16.0: irq 48 for MSI/MSI-X     maj 12 15:57:19 localhost.localdomain kernel: ACPI Warning: 0x0000000000000540-0x000000000000054f SystemIO conflicts with Region \_SB_.PCI0.     maj 12 15:57:19 localhost.localdomain kernel: ACPI: If an ACPI driver is available for this device, you should use it instead of the native      maj 12 15:57:19 localhost.localdomain kernel: ACPI Warning: 0x0000000000000530-0x000000000000053f SystemIO conflicts with Region \_SB_.PCI0.     maj 12 15:57:19 localhost.localdomain kernel: ACPI: If an ACPI driver is available for this device, you should use it instead of the native      maj 12 15:57:19 localhost.localdomain kernel: ACPI Warning: 0x0000000000000500-0x000000000000052f SystemIO conflicts with Region \_SB_.PCI0.     maj 12 15:57:19 localhost.localdomain kernel: ACPI: If an ACPI driver is available for this device, you should use it instead of the native      maj 12 15:57:19 localhost.localdomain kernel: lpc_ich: Resource conflict(s) found affecting gpio_ich     maj 12 15:57:19 localhost.localdomain kernel: iTCO_vendor_support: vendor-support=0     maj 12 15:57:19 localhost.localdomain kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.10     maj 12 15:57:19 localhost.localdomain kernel: iTCO_wdt: Found a Cougar Point TCO device (Version=2, TCOBASE=0x0460)     maj 12 15:57:19 localhost.localdomain kernel: cfg80211: Calling CRDA to update world regulatory domain     maj 12 15:57:19 localhost.localdomain kernel: iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)     maj 12 15:57:19 localhost.localdomain kernel: snd_hda_intel 0000:00:1b.0: irq 49 for MSI/MSI-X     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:306 autoconfig: line_outs=1 (0x1c/0x0/0x0/0x0/0x0) type:l     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:310    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:314    hp_outs=1 (0x1d/0x0/0x0/0x0/0x0)     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:315    mono: mono_out=0x0     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:318    dig-out=0x20/0x0     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:319    inputs:     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:323      Rear Mic=0x1a     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:323      Front Mic=0x1e     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_auto_parser.c:323      Line=0x1b     maj 12 15:57:19 localhost.localdomain kernel: input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7     maj 12 15:57:19 localhost.localdomain kernel: input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8     maj 12 15:57:19 localhost.localdomain kernel: input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9     maj 12 15:57:19 localhost.localdomain kernel: input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10     maj 12 15:57:19 localhost.localdomain kernel: input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_intel.c:2848 0000:01:00.1: Handle VGA-switcheroo audio client     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_intel.c:3040 0000:01:00.1: Using LPIB position fix     maj 12 15:57:19 localhost.localdomain kernel: snd_hda_intel 0000:01:00.1: irq 50 for MSI/MSI-X     maj 12 15:57:19 localhost.localdomain kernel: ALSA sound/pci/hda/hda_intel.c:1716 0000:01:00.1: Enable sync_write for stable communication     maj 12 15:57:19 localhost.localdomain kernel: input: HD-Audio Generic HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/c     maj 12 15:57:19 localhost.localdomain kernel: microcode: CPU0 sig=0x206a7, pf=0x2, revision=0x14     maj 12 15:57:20 localhost.localdomain systemd[1]: Starting Sound Card.     maj 12 15:57:20 localhost.localdomain systemd[1]: Reached target Sound Card.     maj 12 15:57:21 localhost.localdomain kernel: ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'     maj 12 15:57:21 localhost.localdomain mtp-probe[569]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2"     maj 12 15:57:21 localhost.localdomain mtp-probe[568]: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"     maj 12 15:57:21 localhost.localdomain mtp-probe[565]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1"     maj 12 15:57:21 localhost.localdomain mtp-probe[566]: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3"     maj 12 15:57:21 localhost.localdomain mtp-probe[565]: bus: 1, device: 3 was not an MTP device     maj 12 15:57:21 localhost.localdomain mtp-probe[566]: bus: 1, device: 5 was not an MTP device     maj 12 15:57:21 localhost.localdomain mtp-probe[568]: bus: 1, device: 4 was not an MTP device     maj 12 15:57:21 localhost.localdomain mtp-probe[569]: bus: 2, device: 3 was not an MTP device     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] Unhandled sense code     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Sense Key : Medium Error [current]      maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Add. Sense: Unrecovered read error     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] CDB:      maj 12 15:57:21 localhost.localdomain kernel: Read(10): 28 00 00 00 33 00 00 00 08 00     maj 12 15:57:21 localhost.localdomain kernel: blk_update_request: 417 callbacks suppressed     maj 12 15:57:21 localhost.localdomain kernel: end_request: critical target error, dev sde, sector 13056     maj 12 15:57:21 localhost.localdomain kernel: quiet_error: 423 callbacks suppressed     maj 12 15:57:21 localhost.localdomain kernel: Buffer I/O error on device sde, logical block 1632     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] Unhandled sense code     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Sense Key : Medium Error [current]      maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Add. Sense: Unrecovered read error     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] CDB:      maj 12 15:57:21 localhost.localdomain kernel: Read(10): 28 00 00 00 33 00 00 00 08 00     maj 12 15:57:21 localhost.localdomain kernel: end_request: critical target error, dev sde, sector 13056     maj 12 15:57:21 localhost.localdomain kernel: Buffer I/O error on device sde, logical block 1632     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] Unhandled sense code     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Sense Key : Medium Error [current]      maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Add. Sense: Unrecovered read error     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] CDB:      maj 12 15:57:21 localhost.localdomain kernel: Read(10): 28 00 00 00 33 d0 00 00 08 00     maj 12 15:57:21 localhost.localdomain kernel: end_request: critical target error, dev sde, sector 13264     maj 12 15:57:21 localhost.localdomain kernel: Buffer I/O error on device sde, logical block 1658     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] Unhandled sense code     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Sense Key : Medium Error [current]      maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]       maj 12 15:57:21 localhost.localdomain kernel: Add. Sense: Unrecovered read error     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] CDB:      maj 12 15:57:21 localhost.localdomain kernel: Read(10): 28 00 00 00 33 d0 00 00 08 00     maj 12 15:57:21 localhost.localdomain kernel: end_request: critical target error, dev sde, sector 13264     maj 12 15:57:21 localhost.localdomain kernel: Buffer I/O error on device sde, logical block 1658     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde] Unhandled sense code     maj 12 15:57:21 localhost.localdomain kernel: sd 4:0:0:2: [sde]


title: How to safely kill processes so that output redirection is not aborted?

text: I'm writing some automation scripts, in which I need to kill some processes. Previously I would usually use `kill -9 pid` to kill processes but once upon a time, I notice that when I used `kill -9` to kill some `tcpdump` processes: For example:               tcpdump -i eth0 -w output.pcap      The captured packets were not put into `output.pcap` and it was empty. But if I used `kill`, it worked fine. For some processes, like `./prog >> test_log`, I'm afraid if I use `kill -9` to kill the processes the output won't get redirected to `test_log`. I'm also afraid if I use `kill` without `-9` the kill command may fail. Can anyone tell me how to properly use `kill` so that the killing doesn't cause problems with the output file and I'm able to kill the processes without issue?


title: Install man pages in directory with update-alternatives

text: Using _update-alternatives_ (8) on a Debian system it is possible to add man pages as slaves under some master alternative. For example, the following command installs an alternative man page `tclsh.1` alongside the alternative executable for `tclsh`.               $ update-alternatives --install /usr/bin/tclsh tclsh /usr/bin/tclsh8.6.0 100 \         --slave /usr/share/man/man1/tclsh.1 tclsh.1 /usr/share/man/man1/tclsh8.6.0.1      But what if I have not one but entire directories full of man pages that I want to install as alternatives? How can I add those without adding hundreds of slaves? I'm on Ubuntu 12.04 and trying to install my own Tcl 8.6 (no ActiveState). It has over 800 man pages under `/opt/tcl8.6.0/man/man[13n]`.


title: crontab entry for a command to run every week and three months?

text: What would be my `crontab` entry for a command which I want to run every week. I don't want to run any command between 8 PM till 5 AM and any random day is fine. Similarly what would be my `crontab` entry for command which I want to run every three month, and also I don't want to run any command between 8 PM till 5 AM and any random day is fine. Just started with `crontab` so having some difficulties


title: Lenovo ThinkPad E430 - 32 or 64 bit?

text: I just bought a Lenovo Thinkpad E430 and want to install Ubuntu in it. But I don't know whether I should install 32 bit or 64 bit. Its core i5 3rd generation and 6gb ram (2 + 4)


title: how can I find out my server's subnet mask via SSH

text: Hi I use media tamples dv server... I connected it via SSH with putty.. I need my server's IP address and subnetmask. I know the IP address but I don't know the subnetmask. How can I find out my server full IP details with ssh?


title: Whose password should I enter?

text: > Authentication is required to perform this action. Whose password should I enter? Mine? Root's? I can never tell.                             ![ss of dialog](http://i.stack.imgur.com/7TleX.png)


title: Is there any FileZilla Server alternative (GUI based) in Linux?

text: I'm wondering is there any alternative to FileZilla server in Linux?   * I'm looking for a server with GUI manager which offers nearly zero configuration so I can run and manage FileZilla server within 5 min while PureFTPd needs at least 2 hrs and managing users and groups really painful, especially from a flat file.   * I tried to use Pure-Admin (GTK manager for PureFTPd) and I found it really stupid by comparison to FileZilla GUI manager


title: How to do `head` and `tail` on null-delimited input in bash?

text: `find` command can output names of files as a null-delimited strings (if `-print0` is provided), and `xargs` can consume them with `-0` option turned on. But in between, it's hard to manipulate that collection of files - `sort` command has `-z` switch, that makes it possible to sort those files, but `head` and `tail` don't have them. How can I do `head` and `tail` on those null-delimited inputs in a convenient way? (I can always create a short & slow ruby script, but I hope that there could be a better way)


title: Separate STDOUT noise from ncurses

text: I am trying to run an `ncurses` GUI application on an ARM board. I am running it using the serial console `ttyAMA0` port. But when I run the ncurses program, the other processes running in the background will print debug messages i.e qDebug, qWarning into `STDOUT` i.e on the GUI layout and hence results in noise. I think the problem is because all the processes are using the same console device. So is there is a command line or programmatic solution for this problem so that I could not see the other process' `STDOUT` on my `ncurses` GUI ? I tried GNU `screen` It is not really helping. Even in screen session I am seeing the output of those processes polluting the screen **P.S: I have triedgdb solution and it works fine. But I want alternative solution for this**


title: How to run ssh -t user@remote 'sudo nohup bash -c "comand"' in background

text: I want to run a script on a remote host with `sudo` privilege, someone suggests that I should use `nohup` and `ssh -t`, like the following command: The script `ls; sleep 10; echo finish` is crafted here to resemble what I want to do.               ssh -t esolve@remote_host \     'sudo nohup bash -c "ls;sleep 100;echo finish" < /dev/null 2>&1 >> ssh.log'       I want to run this script in background on local host because in my script, after this command there are some other commands, like `my script.sh`:               ssh -t esolve@remote_host \     'sudo nohup bash -c "ls;sleep 100;echo finish" < /dev/null 2>&1 >> ssh.log'      ... some other commands      the following two commands don't work               ssh -t esolve@remote_host \     'sudo nohup bash -c "ls;sleep 100;echo finish" < /dev/null 2>&1 >> ssh.log' &          ssh -t esolve@remote_host \     'sudo nohup bash -c "ls;sleep 100;echo finish" < /dev/null 2>&1 >> ssh.log &'       Why? And how can I make this command run in background of local host? Besides, I don't need to input password for `sudo` on remote host.


title: Restrict samba-user for upload files based on file size

text: Is there any possibilities to restrict Samba user's to a maximum file size? Ex, If a samba-user uploads a file onto the server that's more than 100 MB (like video or compressed files), Samba, or the system receiving the file, should not allow it.


title: Shrinking directory sizes on an ecryptfs filesystem

text: The root directory of my ecryptfs filesystem has grown massively since I accidentally created many thousands of files in it. Now that I've deleted the files, I'd like to shrink the directory, as I believe it's causing some performance problems. My home directory before the ecryptfs mount:               dr-x------ 2 ian ian 4096 May  4  2012 /home/ian      and after:               drwx------ 104 ian ian 42721280 Jun 18 13:46 /home/ian      http://serverfault.com/questions/264124/shrink-reset-directory-size discusses a similar problem with an ext3 filesystem, and suggests doing an `e2fsck -D`. However, ecryptfs doesn't seem to have its own fsck. How can I shrink my directory without creating a new filesystem and copying everything over?


title: Making a Icecast Playlist from the Console

text: I got HP 6G RAM laptop that use as a home server, and a netbook that i use as my everyday console. I recently installed icecast server on the server as playing audio files on the netbook halts my system, so I use "Radio Tray" to receive the streaming from the server over my local home network and I dont compromise my netbook's performance. rightnow i would like to be able to make a playlist from the audio folders i have on the HP server through ssh. is there a simple way to do so?


title: Is there a way to configure vim to run external commands through cpanel jailshell?

text: I'm editing files in vim over ssh, and I'd like to save git commits and things by running external commands in vim, like `:!git add % && git commit -m "update"` but because my server (hostgator) has a limited shell, cpanel jailshell, I get the error:               Cannot execute shell /usr/local/cpanel/bin/jailshell      Is there a way to configure the shell settings in vim so that external commands work?


title: rsync multiple files to multiple directories

text: I need to move a large number of files that need to go to different directories i.e.               file1.mpg to /mnt/s3/directory1/file1.mpg     file2.mpg to /mnt/s3/directorya/file2.mpg     file3.mpg to /mnt/s3/directoryx/anotherfilename.mpg          rsync -av --progress --inplace /path/to/file1.mpg /different/path/directory/1/file1.mpg      Works but I would like to batch all the file transfers together so I don't have to monitor it all the time and keep manually put in each rsync. I wrote a quick shell script to rsync the files but after the file is transferred it seems to hang there waiting for some sort of user input. If ^c it continues on, otherwise will hang there indefinitely.


title: How do I remove a file I accidentally created named $file?

text: I was working on a shell script and I accidentally created a file with the variable as its name. Now I have `$file` in my `ls` output, and cannot remove it. What can I do?


title: Grub and usb serial support

text: How to access the grub menu using a usb serial converter? I know it's possible to have grub menu in serial console, putting these lines in grub.conf:               serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1     terminal serial      But with usb serial converter? In linux it is `/dev/ttyUSB0` and I can use it to see boot messages.


title: How to run java process to be seen not as 'java...' in processes list?

text: Is it possible to run a Java process in Linux in a way that it could be seen in `ps` as some sort of alias? It would be easier to restart it when it is down.