title: How to install Canon PIXMA MX882 using CUPS 1.4.8 in Puppy Linux Precise 5.7.1

text: I need help installing my Canon PIXMA MX882 network printer using the pre- installed CUPS 1.4.8 in Puppy Linux Retro 5.7.1 (Full Install) on my Gateway Solo 9100 (Pentium II 300 MHz with 160 Mb Memory), which connects to my network and internet via my Linksys WPC54G V3 PCMCIA Wireless Adapter. From the Setup Menu, I click on the CUPS Printer Wizard, I then press the “Yes” button on the Xdialog question (“Do you want to add a new printer?”), which takes me to the ”Home” tab at “localhost:631” in the Opera web browser. I then press the “Add Printer” button in the “Administration” tab, which takes me to the “Add Printer Screen” where it displays three group of options. The first group contain options related to "Local Printers" (LPT #1, SCSI Printer or pdf writer), which do not apply in my case because I am trying to install a network printer. The second group is for "Discovered Network Printers", which shows no options since CUPS would not detect my Canon printer, which is always on (Also note that CUPS would not detect it through the “Find New Printers” button in the “Administration” tab). The third group “Other Network Printers” offers the following options:   * Internet Printing Protocol (http)    * Internet printing Protocol (ipp)    * LPD/LPR Host or Printer    * AppSocket/HP jetDirect    * Windows Printer Via SAMBA (smbclient)    * Windows Printer using smbclient, and   * Backend Error Handler Since CUPS is unable to find my printer on the network automatically, I guess that I have to select one of the options from the third group. But selecting any of those options and pressing the “Continue” button takes you to a screen, which requires entering an explicit “URI” specific to the printer’s make and model in a “Connection:” field. Can someone help me choose which of the displayed options above to select and the correct “URI” (whatever that means) for my printer (Canon PIXMA MX882)? Or better yet, can someone guide me as to how to make CUPS detect my printer automatically, so I can select it and proceed from there with the wizard? I would greatly appreciate your help, and please explain as simple as possible since I have never used Linux before (I have always been a Microsoft Windows user), and I have absolutely no knowledge of its terminology, which I find extremely confusing and very difficult to understand.


title: Does SDL require any sound server like PulseAudio to play audio?

text: I'm trying to make an MP3 player on top of the Linux kernel and `busybox` using the SDL and SMPEG libraries. Does SDL work on top of the kernel or it needs PulseAudio? I have just built a C program which plays mp3 files one by one from a directory. But when I put it on my ARM board nothing is happening, it justs hang in console, even `plaympeg` didn't work. But when I am using               plaympeg --novideo song.mp3      it shows               Couldn't init SDL audio: No available audio device      Can anyone guide me?


title: Edit Application Menu in Fedora 16 XFCE?

text: I am running a fully updated Fedora 16 with XFCE in my VirtualBox virtual machine, and just like to know how I can edit the items in its Application Menu? Update: I installed the program alacarte, but it refuses to start with this error:               MainWindow.py:19:<module>:ImportError: No module named gmenu      Is there anything else I can try?


title: Chromium does not honer Fontconfig fallbacks? Can I set it for that? Or manually specify?

text: Chromium is not honoring font matching, set by Fontconfig. If webpage CSS specifies fantasy, Chromium chooses Impact. Fontconfig Configuration for fantasy,               $ fc-match fantasy     BauhausStd-Medium.otf: "Bauhaus Std" "Medium"      If webpage CSS specifies Helvetica, Chromium Chooses the default fallback font. Fontconfig Configuration for Helvetica,               $ fc-match helvetica     HelveticaLTStd-Roman.otf: "Helvetica LT Std" "Roman"      Chromium Release tag,               17.0.963.56 (Developer Build 121963 Linux) Ubuntu 11.10      Is it possible to force Chromium to use the Fontconfig settings? Or manually specify custom fallbacks? I'm fully aware of the limited font configuration dialog, accessible in chromium preferences. I appreciate any help received, in regards to my question.


title: Is there any "non live" distribution of Linux that can be run from a USB drive, AND allow access to files from Windows?

text: I tried installing a "pen drive" version of Ubuntu from PenDriveLinux.com, but since it was a modified version of Live Ubuntu (i.e. that usually runs from a CD), it had some kind of custom "persistence" options that made some parts of the file system readonly. What I am looking to do is boot from my USB and have the distro work exactly like a "regular" distro - i.e. be able to write anywhere I would normally be able to and have it persisted, install packages, etc. Also I would like to be able to access the filesystem _from_ Windows (i.e. not just mounting the Windows disk while running Linux). I tried just installing a standard Ubuntu distro to my USB as if it were just a standard drive, but I got what seemed to be some low-level errors (forget what they were). Should this be expected, or should I just try installing some other standard distros.


title: Jailbreaking HDTV

text: I have a Vizio internet TV, the predecessor to this one with basically the same specs, not 3D though. I wanted to try and gain root access to the tv. Using nmap I leaned that the only port open is 111, rpcbind. I also see that it is running Linux kernel 2.6.9 - 2.6.28. If I run rpcinfo on it I only find two rpc servers, the tcp and udp versions of rpcbind. It has a USB port on it, but I can't use it for anything. Given this how could I proceed from here? Any sources of information you could refer me to that would be helpful? Or any tools that may help me out? Finally, how feasible do you think this project is?


title: Why isn't sda1 showing up in dev and how can I fix that?

text: I have an embedded Linux device and I was trying to copy some files to it. I plugged in a USB stick, the dmesg shows that it was recognized, but for some reason `/dev/sda1` never showed up. I'm trying to understand what happened.. why didn't `/dev/sdaX` show up at all, and what can I do about that? Here's the dmesg:               [  434.006104] usb 1-1: new full-speed USB device number 2 using musb-hdrc     [  434.066132] hub 1-0:1.0: unable to enumerate USB device on port 1     [  434.466078] usb 1-1: new high-speed USB device number 3 using musb-hdrc     [  434.606941] usb 1-1: New USB device found, idVendor=14cd, idProduct=125c     [  434.614008] usb 1-1: New USB device strings: Mfr=1, Product=3, SerialNumber=2     [  434.621548] usb 1-1: Product: Mass Storage Device     [  434.626512] usb 1-1: Manufacturer: Generic     [  434.630825] usb 1-1: SerialNumber: 125C20100726     [  434.637445] scsi0 : usb-storage 1-1:1.0     [  435.636998] scsi 0:0:0:0: Direct-Access     Mass     Storage Device        PQ: 0 ANSI: 0 CCS     [  435.649935] sd 0:0:0:0: [sda] 15644672 512-byte logical blocks: (8.01 GB/7.45 GiB)     [  435.658578] sd 0:0:0:0: [sda] Write Protect is off     [  435.663874] sd 0:0:0:0: [sda] No Caching mode page present     [  435.669696] sd 0:0:0:0: [sda] Assuming drive cache: write through     [  435.678648] sd 0:0:0:0: [sda] No Caching mode page present     [  435.684443] sd 0:0:0:0: [sda] Assuming drive cache: write through     [  435.692168]  sda: sda1     [  435.697256] sd 0:0:0:0: [sda] No Caching mode page present     [  435.703051] sd 0:0:0:0: [sda] Assuming drive cache: write through     [  435.709499] sd 0:0:0:0: [sda] Attached SCSI removable disk      And I checked `/proc/partitions` and I can see it present there:               -sh-4.2# cat partitions     major minor  #blocks  name            31        0        128 mtdblock0       31        1        256 mtdblock1       31        2         64 mtdblock2       31        3       1408 mtdblock3       31        4       2560 mtdblock4       31        5       3776 mtdblock5       31        6       8192 mtdblock6      179        0    7822336 mmcblk0      179        1      72261 mmcblk0p1      179        2    7735297 mmcblk0p2        8        0    7822336 sda        8        1    7818240 sda1      And here's the snap shot of `/dev`, as you can see, there's no `sda1`:               -sh-4.2# ls /dev     Buzzer              mem                 ram5                tty39     MAKEDEV             mice                ram6                tty4     XOR                 mmcblk0             ram7                tty40     apm_bios            mmcblk0p1           ram8                tty41     console             mmcblk0p2           ram9                tty42     core                mouse0              ramdisk             tty43     cpu_dma_latency     mtd0                random              tty44     crypto              mtd0ro              rfkill              tty45     event0              mtd1                root                tty46     fb0                 mtd1ro              rtc0                tty47     fd                  mtd2                stderr              tty48     full                mtd2ro              stdin               tty49     gpioLeds            mtd3                stdout              tty5     gpioOperate         mtd3ro              timer               tty50     hda                 mtd4                tscadc-test         tty51     hda1                mtd4ro              tty                 tty52     hda10               mtd5                tty0                tty53     hda11               mtd5ro              tty1                tty54     hda12               mtd6                tty10               tty55     hda13               mtd6ro              tty11               tty56     hda14               mtd7                tty12               tty57     hda15               mtdblock0           tty13               tty58     hda16               mtdblock1           tty14               tty59     hda17               mtdblock2           tty15               tty6     hda18               mtdblock3           tty16               tty60     hda19               mtdblock4           tty17               tty61     hda2                mtdblock5           tty18               tty62     hda3                mtdblock6           tty19               tty63     hda4                mtdblock7           tty2                tty7     hda5                network_latency     tty20               tty8     hda6                network_throughput  tty21               tty9     hda7                nfsd                tty22               ttyO0     hda8                null                tty23               ttyO1     hda9                psaux               tty24               ttyO2     hw_random           ptmx                tty25               ttyO3     i2c-1               pts                 tty26               ttyO4     initctl             pvrsrvkm            tty27               ttyS0     kmem                ram                 tty28               ttySA0     kmsg                ram0                tty29               ubi_ctrl     log                 ram1                tty3                urandom     loop-control        ram10               tty30               usbdev1.1     loop0               ram11               tty31               vcs     loop1               ram12               tty32               vcs1     loop2               ram13               tty33               vcsa     loop3               ram14               tty34               vcsa1     loop4               ram15               tty35               zero     loop5               ram2                tty36     loop6               ram3                tty37     loop7               ram4                tty38      Here's the `udev monitor` log as well:               KERNEL[1431.270571] add      /de[ 1431.278179] scsi1 : usb-storage 1-1:1.0     vices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1 (usb)     KERNEL[1431.271543] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0 (usb)     KERNEL[1431.277947] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1 (scsi)     KERNEL[1431.278561] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1/scsi_host/host1 (scsi_host)     KERNEL[1431.280381] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/usb_device/usbdev1.6 (usb_device)     [ 1432.287008] scsi 1:0:0:0: Direct-Access     Mass     Storage Device        PQ: 0 ANSI: 0 CCS     KERNEL[1432.291899] add      /devices/platform/o[ 1432.301160] sd 1:0:0:0: [sda] 15644672 512-byte logical blocks: (8.01 GB/7.45 GiB)     map/musb-ti81xx/[ 1432.310858] sd 1:0:0:0: [sda] Write Protect is off     musb-hdrc.1/usb1[ 1432.317254] sd 1:0:0:0: [sda] No Caching mode page present     /1-1/1-1:1.0/hos[ 1432.323863] sd 1:0:0:0: [sda] Assuming drive cache: write through     t1/target1:0:0 (scsi)     KERNEL[14[ 1432.334323] sd 1:0:0:0: [sda] No Caching mode page present     32.292637] add  [ 1432.340312] sd 1:0:0:0: [sda] Assuming drive cache: write through         /devices/platform/omap/musb-[ 1432.349590]  sda: sda1     ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1/target[ 1432.356659] sd 1:0:0:0: [sda] No Caching mode page present     1:0:0/1:0:0:0 (s[ 1432.363347] sd 1:0:0:0: [sda] Assuming drive cache: write through     csi)     KERNEL[143[ 1432.371188] sd 1:0:0:0: [sda] Attached SCSI removable disk     2.293192] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0 (scsi_disk)     KERNEL[1432.293657] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0 (scsi_device)     KERNEL[1432.326141] add      /devices/virtual/bdi/8:0 (bdi)     KERNEL[1432.347981] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0/block/sda (block)     KERNEL[1432.348571] add      /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/host1/target1:0:0/1:0:0:0/block/sda/sda1 (block)


title: Look if a folder has some files of certain extention

text: Lets say I have a file structure:               $ cd /home/Desktop     $ ls -d */     Abc/ Qwe/ Zxc/ Rty/     $      Now I want to iterate through every directory and look if they have any .pdf files. Could some one please tell whats the best way to do this?


title: how to allow different users of same group access/edit files/directories created a user of same group

text: here is my example, here I am logged in as root   1. created a group using groupadd command called as devel.   2. created two users dev1 and dev2 using useradd command. useradd -g devel dev1 useradd -g devel dev2   3. passwd set for both users   4. su dev1 ... now I create some files and directories.   5. exit   6. su dev2 .... ls /home/dev1 response is ... Permission Denied I am new to all these things, request somebody to help to find ways in order to access files and directories. Also please let me know, how to edit files for which explicitly the chmod 774 kind of permissions are provided, since in present scenario i just get "permission denied" error.


title: `cat /dev/ttyACM` loses data when piped through netcat

text: I'm reading data from `/dev/ttyACM0` using `cat /dev/ttyACM0` on a Raspberry Pi. The data comes from a device, which sends lines in the form               15.00   1316013 15      where the first number is a value, the second a millisecond timestamp from the device. When I do `cat /dev/ttyACM0 > file.csv` I receive one value every 12~13ms, but when I do the exact same thing over the network, I get a 1~2 second gap every 5 seconds. Is it possible that there is lost data somewhere? Or that the OS blocks the serial device so it has to wait a couple of seconds to send more data? Is there any relation between a serial device and a piped network command? I'm using either `netcat` or `ssh` to pipe the data. The device is sending data at 9600 bps


title: How to force PC to release IP?

text: I'm working on BackTrack and I want to give a fake IP from my DHCP server to another PC. I'm trying to make that Windows PC run the command: `ipconfig /release`, but without remote access. I don't want to have to remote into the Windows PC and run `ipconfig /release` manually. I'd like to run this command remotely from my Linux box. I tried to send DHCP RELEASE packets with the application Yersinia... but it did not work. Any ideas?


title: Why surt1000xli APC UPS recognised by NUT apcsmart driver as "old"?

text: So I have this UPS connected to machine with a RS232/USB cable. `ups.conf` contains               [apc1]         driver = apcsmart         port = /dev/ttyUSB0         desc = "APC USB"      And I get the following output:               $ sudo upsdrvctl start     Network UPS Tools - UPS driver controller 2.7.1     Network UPS Tools - APC Smart protocol driver 3.1 (2.7.1)     APC command table version 3.1     very old or unknown APC model, support will be limited


title: zsh delete part of the prompt

text: When I use reverse history search, then it "eats" a part of my prompt. Sometimes when I type a long command which spans to multi lines, my prompt is also lost. Have anyone experience this situation? It is very annoying. I have attached the screenshot. Thanks.


title: Envirnment variables for packages built in custom location

text: Some time ago (month or so) I started to install packages that I build from source in custom location `~/.local` so that I can easily distinguish which I build from source, and for other reasons, although I'm single user Also I'm new to Linux, and learned couple of things on the way. I use `checkinstall` on Ubuntu whenever I can, except for Python packages because it seems they clash with `easy-install.pth` for some reason. Building deb packages by myself is still far reach for me. I have this now in my `.bashrc`:               export PATH=$HOME/.local/bin:$PATH     export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH     export PYTHONPATH=$HOME/.local/lib/python2.7/site-packages/:$PYTHONPATH     export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH     export MANPATH=$HOME/.local/share/man:$MANPATH      Today I was building something that was depending on header files from package I had built from source, and had trouble with it, until I found that I need to point C include path variable to the "local" include path path: `C_INCLUDE_PATH=$HOME/.local/include` So I thought to ask more experienced users, did I miss some variable, that might introduce problems in future when some package depends on package installed in my custom folder?


title: Good style/practices for separators in file (or directory) names

text: I'm not exactly sure if this is a "right" question to post here. I'm probably asking more about "opinions" than actual categorical answers (of those that either work or don't, and that's it). I was wondering what name separators would be the most _linux friendly_ (or more specifically, _Bash friendly_ ) and _human friendly_ at the same time. Let's say I want to create a directory that contains something related to _Mr. Foo Bar_ ( _Foo_ being the first name, _Bar_ being the last name) Having the name "`Foo-Bar/`" is very convenient. **`-`** is a "regular" character, it doesn't need to be escaped, it clearly shows that `Foo` and `Bar` are two separate things... Nice. Now, "`Foo.Bar`" is a bit trickier. Someone may think that `Foo.Bar` is actually a file (at a first glance, specially if you don't have terminals with coloring enabled) where "`Foo`" is the filename, and "`Bar`" the extension. I could also use "`Foo Bar`", but then I need to escape the whitespace when I want to access the directory and, if I want to list the contents of the parent directory (where `Foo Bar` is located) and put said list in a bash array, the white space is going to cause trouble (a lot). Not nice. Brackets `()` also cause a lot of issues. They also need to be escaped, then to cause trouble with commands as `scp`... Not nice. So... the question (at last) is: If you need to make the name of a file clear and meaningful at a fist glance, and you need to use separators, what do you use?


title: Disable error: nouveau unknown i2c port and unknown status

text: I am running Linux Mint Debian Edition, and I am getting the following errors:               Jul 25 10:23:39 mhost kernel: [   36.775380] [drm] nouveau 0000:01:00.0: unknown i2c port 57     Jul 25 10:23:39 mhost kernel: [   36.775406] [drm] nouveau 0000:01:00.0: unknown i2c port 49     Jul 25 10:23:39 mhost kernel: [   37.095951] [drm] nouveau 0000:01:00.0: PFIFO: unknown status 0x40000000     Jul 25 10:23:57 mhost kernel: [   54.815320] [drm] nouveau 0000:01:00.0: unknown i2c port 48      Otherwise, my system is fine. Everything seems to be working properly, the only problem is, that I get these errors very frequently and have to clean the logs regularly (kern.log, syslog, and messages). I am not too interested in fixing the underlying issue (I do not like to mess with the graphics driver if I do not have to), but I would like to block the error (unknown i2c port as well as unknown status). Here is some more information about my system:               $ inxi -SGx     System:    Host: mhost Kernel: 3.2.0-4-amd64 x86_64 (64 bit, gcc: 4.6.3) Desktop: Cinnamon 2.0.14  Distro: LinuxMint 1 debian     Graphics:  Card: NVIDIA GF108 [GeForce GT 630] bus-ID: 01:00.0                 X.Org: 1.14.3 drivers: nouveau (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz                 GLX Renderer: Gallium 0.4 on NVC1 GLX Version: 3.0 Mesa 9.2.2 Direct Rendering: Yes      So my question are:   * Can I block a certain error in Linux?   * And more specifically, can I block/disable these errors?  My main motivation for this is that my log files become really big really fast which fills up my disk. One workaround would be to automatically clear the logs, but I do not want to put that much strain on my ssd.


title: Where are "headers" for other languages kept?

text: If I were to write a library for a C-incompatible language (like D), where would be the best place to install my "header files" to? `usr/include` seems like a bad idea, since the FHS says it's for "header files included by C programs."


title: shared LVM storage between KVM virtuals

text: I'm messing around with KVM and different storage options for sharing between virtual machines. I have an LVM volume group defined as a storage pool for `libvirt`. I've defined a volume and attached it to two test VMs as a virtio disk. Here's virsh dumpxml               <disk type='block' device='disk'>       <driver name='qemu' type='raw'/>       <source dev='/dev/kvm_storage/vm_shared'/>       <target dev='vda' bus='virtio'/>       <shareable/>       <alias name='virtio-disk0'/>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>     </disk>      I can read/write files, but they do not stay in sync between the two virtuals unless I unmount then remount. Is this even supported?


title: Mint15, 2 GeForce 450 cards cinnamon crashes

text: Just installed Linux Mint 15 fresh install, got 2 GeForce 450s w/ 3 monitors. Cinnamon crashes. I used the propriety drives so vmware would have hardware acceleration. I end up in fallback mode, any ideas why nvidia drives are crashing cinnamon?               [    14.755]    Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     [    14.755] Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [    14.755] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 25 09:08:23 2013      https://www.dropbox.com/s/y2ngaqdbrqcdyeh/Xorg.0.log https://www.dropbox.com/s/31n2t3vjdb9gqv5/.xsession-errors it is 64-bit, I installed by using some black list mod probe thing I don't fully understand to get rid of the open source nvidia drivers, rebooted, then ran the driver install from the nvidia, website "NVIDIA- Linux-x86_64-319.32.run". (from the nvidia website) I got to the console initially by hitting CRTL+ALT+F2 and then stopped the "mdm" service.


title: Org-mode tables: How to insert result of a system command?

text: In Org-mode I would like to insert the result of a Unix command in a field. For instance, consider I have the following table:               | /        |     | /bin     |     | /usr/bin |     | /lib     |     | /usr/lib |      I would like to insert a second column such as               $2 = <result of `du -sh $1` >      Is this possible?


title: How can I make the Gnome3 calendar use Thunderbird instead of Evolution?

text: Can it be done? I don't want to use Evolution's calendar... I want to keep using Thunderbird... I have to add some addons (like _lightning_ ) first right? My goal is to have some calendar-like on thunderbird and replace the one of Evolution.


title: Unzipping a batch of files

text: When I try                unzip filename.zip      it works. However, I need to unzip a series of zip files. Why are:                find . -name "*.zip" -print0 | xargs -0 unzip      or                ls *.zip | xargs unzip      not working? In both cases I get a "caution: filename not matched: " message.


title: Open source MySQL performance tool

text: Are there any open source MySQL performance tools to help optimize SQL queries?


title: Wrong behavior of xargs

text: I was trying to solve this issue using `find` + `xargs` but I stuck with another issue I am try to increasing `a` count using `((a++))` but not working . I have tried couple of combination of counting a value eg. `let a++` `a=$[ $a + 1]` and so on.. See below Output               rax@ubuntu:~# find ./test/ -mindepth 1 | xargs -I{} -n1 bash -xc "((a++)) ; echo $a {}"     + (( a++ ))     + echo 0 ./test/abc1     0 ./test/abc1     + (( a++ ))     + echo 0 ./test/abc1/abc     0 ./test/abc1/abc     + (( a++ ))     + echo 0 ./test/abc2     0 ./test/abc2     + (( a++ ))     + echo 0 ./test/abc3     0 ./test/abc3     + (( a++ ))     + echo 0 ./test/abcparent     0 ./test/abcparent      EDIT :- xargs did all in same shell eg. with pid               rax@ubuntu:~# a=0     rax@ubuntu:~# find ./test/ -mindepth 1 | xargs -L2 -I{}  bash -xc "echo $a {} ;((a++)) ; echo $a $$"     + echo 0 ./test/abc1     0 ./test/abc1     + (( a++ ))     + echo 0 1314     0 1314     + echo 0 ./test/abc1/abc     0 ./test/abc1/abc     + (( a++ ))     + echo 0 1314     0 1314     + echo 0 ./test/abc2     0 ./test/abc2     + (( a++ ))     + echo 0 1314     0 1314     + echo 0 ./test/abc3     0 ./test/abc3     + (( a++ ))     + echo 0 1314     0 1314     + echo 0 ./test/abcparent     0 ./test/abcparent     + (( a++ ))     + echo 0 1314     0 1314


title: Laptop keyboard occasionally stops working

text: I have a dirty solution that is to plug a USB keyboard in and execute the following command:               setxkbmap -rules evdev -layout us -model evdev      Afterward my keyboard will work. This solution only works if I have a usb keyboard handy which is seldom the case and I am forced to reboot my laptop. I have tried to have the command auto execute when the system wakes by adding:               set -e          if [ "${1}" = "resume" ] && [ "${2}" != "standby" ]; then             setxkbmap -rules evdev -layout us -model evdev     fi     exit 0      to: /etc/apm/event.d/enable_xkb But this does not work. I am guessing because it is not run by the appropriate user. So there are two possible answers to this question: 1) How do I get the above script to execute after my system wakes up. If I can get this to work I can simply put my computer to sleep and wake it back up and have the keyboard working again. 2) (preferred) How do I actually fix this probelem. More details about situation that my be needed to answer 2) Due to the randomness of this problem I do not know when this issue first started. I do know that it exists on Debian Unstable, and Testing but not Stable. It also exists on curret Arch linux but not before November 2012. My system is a Lenovo w520. Also note: This is a bit of a heisenbug, as such I would not be able to accept a response until it has worked for a few days. Further clarification: When this happens I am unable to switch to any of the tty#s so no console does not work. I have also tried the "Raising Skinny Elephants is Utterly Boring" combo and this does not work either... After I post I will check if this works when my keyboard is functional. It is very random, sometimes it will be fine for a couple days and bam my keyboard doesn't work.


title: Where are the files created by "make modules" when building and compiling the Linux kernel?

text: To build the kernel, I do   1. `make menuconfig`   2. `make`   3. `make modules` For step3, where do the files go? What's the location for modules? Can I change it by using any env variables?


title: How does make continue compilation?

text: I know that I can interrupt a `make` process anytime without having to recompile the entire source tree again. As I know, `make` only compiles a target if it's not compiled yet, or the source code is modified after the last compilation.   But if I interrupt `make`, there will surely be one or more (depending on the concurrency level) half-ready binaries. What does it do with them the next time I run `make`? Or does it finish the current target when I press `Ctrl`+`C` to avoid partly compiled binaries?


title: Flow control configs for ethernet interface gets reset in few seconds

text: I set the RX & TX flow control (aka "pause parameters") configs to an ethernet interface, as such:               sudo ethtool -A eth0 rx on tx on      When viewing the configs with `sudo ethtool -a eth0`, only `RX` stays `On`, but `TX` gets reset back to `Off` after a few (~3) seconds. Might you know what is causing the TX pause parameter to revert to `Off`?   I've tried to disable the network manager, but it didn't help. My PC's info:               me@MyPC:~$ uname -a     Linux MyPC 3.2.0-58-generic-pae #88-Ubuntu SMP Tue Dec 3 18:00:02 UTC 2013 i686 i686 i386 GNU/Linux     me@MyPC:~$ cat /etc/*release     DISTRIB_ID=Ubuntu     DISTRIB_RELEASE=12.04     DISTRIB_CODENAME=precise     DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"     NAME="Ubuntu"     VERSION="12.04.3 LTS, Precise Pangolin"     ID=ubuntu     ID_LIKE=debian     PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"     VERSION_ID="12.04"


title: disabling job control in bash (CTRL-Z)

text: It happens to me sometimes, that I press `CTRL`+`Z` by accident and my application disappears into background. I know, I can bring it back with `fg`, so it's not such a big deal. But I am wondering about turning this `job control` off anyway. In my whole life, I cannot remember one instance when I needed it, it just looks to me as a relic form the past. Is this OK to disable `job control` entirely? Or am I missing something, and this feature can be useful? How would I disable it in my `.bashrc` # UPDATE: I have tried `set +m` as suggested by @Falsenames. However, this only works when I type it in the terminal. Adding `set +m` into my `.bashrc` has no effect.


title: Re-routing request and response to server behind a VPN

text: My situation is as follows: I have a server (A) set up with a VPN connection to a third-party server (B). I have a collection of other servers (C, D, E...) that share the same private network as my VPN-connected server (A). The third-party server (B) provides a RESTful API that is accessible through HTTP. For instance, from server A I can request some URL:               $ curl http://<server-B-vpn-ip-address>/path/to/whatever      And I will receive a JSON response with the appropriate data. I want to be able to access server B's API from any server (C, D, E...) by making a call to server A. For instance:               $ curl http://<server-A-private-ip-address>/path/to/whatever      Server A should then forward that request to server B, and it should return the JSON response to whichever server initially requested it. I've looked at a few possible ways to solve this with iptables without success, but honestly I don't know what the right tool for the job is in this case. Does anyone have any ideas?


title: find command: how to ignore pathname?

text: I have to find some type of files in a directory and it's subdirectories and I only have to print out the filenames. So here's the main command:   `find -type f -name "*.c"` Now, how could I cut the paths from each result? (it possibily could be done with awk, but I hope, that there's an easier way to do that).


title: How to make system  automatically  mount encrypted device in  Linux

text: When I plug my external storage in , I need to automatically mount it as an encrypted device. How do I make this happen ?


title: Dynamic file content generation: Satisfying a 'file open' by a 'process execution'

text: I have a read-only file, `F`. A program, `P`, that I'm not the author of, needs to read `F`. I want the content of `F` to come from another 'generator' program, `G`, whenever `P` tries to read `F` (taking `F` to be an ordinary file) and not any earlier. I tried doing the following:               $ mkfifo /well-known/path/to/F    # line #1     $ G > /well-known/path/to/F       # line #2      Now, when `P` starts up and tries to read `F`, it appears to be able to read the output generated by `G` just as I wished it to. However, it can do so only once, since G after all gets to run only once! So, if `P` had a need to read `F` again later in its execution, it would end up blocking on the fifo! **My question is,** other than bracketing line #2 above in some sort of an infinite loop, **is there any other (elegant) alternative for the above?** What I'm hoping for is, some way of registering a 'hook' program into the file-open system call such that the file-open would result in the launching of the hook-program and the file-read in the reading of the hook-program output. Obviously the assumption here is: the read will happen sequentially from file beginning to file end, and never in random seeks.


title: log into ec2 using SSH but sudo prompts for password

text: Have an EC2 instance. Connect via ssh. Can navigate through directories. When I try to use a sudo command, I am prompted for a password. `ubuntu@ec2-ip-address:/etc$ sudo su root   [sudo] password for ubuntu:` I haven't ever set a password. That is what SSH is for. How do I change to the root user?


title: How to open a program as another user inside a logged display?

text: I'm trying to open netbeans as a different user, but isn't working. I'm running a Kubuntu 12.04 LTS with KDE. And I tried the following: Open a terminal, type `su - myotheruser`, type the myotheruser password. Then tried to open netbeans: `/opt/netbeans/7.3/bin/netbeans` (netbeans is installed on _/opt/netbeans/7.3_ ). I got the following:               Erro: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.      I tried some commands like `export DISPLAY=":0.0"`, `xhost +`, `xhost +local:all` and other commands related here and here. None worked. Is important to me that _myother_ user not be in the sudoers file. If I end the session with _mycurrentuser_ and logon with the _myotheruser_ I can easily open netbeans. I need open netbeans as `myotheruser` because I would like to work on a project that belongs to this user and just to it. If I changes permissions, looks like when I versionnig the project the user will loose the exclusivity. So, how can I solve this? How can I open netbeans as a different user inside of another user display?


title: tproxy per user

text: I'm in the process of adding some parental control to my box (http filtering), but I'm something of a nOOb when it comes to network configuration :-( The box is used by the whole family (one account for each member) and squid runs on the very same machine. I have two squid instances, one (for adults) only for caching, one (for children) using squidGuard. To choose between both squid instances, I use `\--uid-owner` with NAT rules.               iptables -t nat -A OUTPUT -m owner --uid-owner $owner -p tcp -m tcp --dport 80 -j REDIRECT --to-ports $port      (ditto for ip6tables) Currently I use NAT for both IPv4 and IPv6 (with a fairly recent linux kernel), but Squid says that "intercept" only supports IPv4. I would like to have IPv6 too. I tried to use TPROXY (e.g. using these rules) but I failed because I need `\--uid-owner` which iptables wants to set on POSTROUTING (not on PREROUTING). Those rules are:               iptables -t mangle -N DIVERT     iptables -t mangle -A DIVERT -j MARK --set-mark 1     iptables -t mangle -A DIVERT -j ACCEPT     iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT     iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129      How do I add appropriate `\--uid-owner` rules in that mangle table? **I mean, how do I decide to forward to port 3128 or 3129?** **Edit:** please don't answer saying that my NAT rule works well. I know that. I need to get rid of NAT because Squid's NAT is IPv4 only. So please, again, no NAT. Only TPROXY or mangle or whatever you call it that works with the `mangle` rules above.


title: How long should it take to generate 300 bytes of entropy on a VPS?

text: I'm running NetBSD on a Xen VPS, and I'm trying to generate a `gpg` keypair. I've gotten most of the way there, but now I'm getting the following error message:               Not enough random bytes available.  Please do some other work to give the OS a chance to collect more entropy! (Need 300 more bytes)      This has been the status for about 10 hours now, and I've been doing things like installing packages from source in another session. Is the process hung? Is this a known-issue of some sort? Can it really take _that_ much effort to generate 300 bytes of entropy? Thanks. UPDATE: The source of this issue is that NetBSD domU's don't have an entropy source enabled by default. You should manually enable the network interfaces as a source of entropy using the `rndctl` utility.


title: How do I reserve ports for my application?

text: How do I reserve a list of ports for my custom applications? To be specific, the product I'm creating has a lot of processes and a lot of intercommunication between them. The problem I'm having is that - every once in a while - the OS steals my ports. It's rare, but it happens. This could be because a different application has used "::bind" with no port specified. Or sometimes my own applications steal the port when I call "::connect" with an unbound socket. As seen from the man page: > If the socket has not already been bound to a local address, connect() shall > bind it to an address which, unless the socket's address family is AF_UNIX, > is an unused local address. So my question is, can I reserve the ports that I need so the OS doesn't use them? Can this be accomplished with /etc/services? Or is there a different way?


title: indistinguishable active tab in gnome terminal

text: I am running Gnome 2.30.2 and Gnome Terminal 3.0.1 on my Debian Sid and recently the active tab became almost indistinguishable from other tabs. It is actually the same colour. Changing the themes didn't help much and only using high contrast theme makes a difference which is the theme I would rather not use. Have been experimenting with ~/.gtkrc-2.0 script but that does not seem to work at all even after restarting X-Server.               style "gnome_terminal_notebook"     {         #fg[NORMAL] = "#00ff00"         bg[NORMAL] = shade (1.25, "#3c3b37")     }          widget "*TerminalWindow.*.GtkNotebook*" style "gnome_terminal_notebook"      Can anybody shed some light on how to make the active tab more distinguishable?


title: rsyslog rule inconsistently applied

text: I have created a rule to redirect messages containing {FILTER} in file /etc/rsyslog.d/40-filter.conf               :msg,contains,"{FILTER}" /var/log/filter.log     & ~      I have edited file /etc/rsyslog.conf so it accepts remote UDP messages by uncommenting lines               $ModLoad imudp     $UDPServerRun 514      The source of my syslog messages is the following simple python script               #! /usr/bin/python          import logging     import logging.handlers          logger = logging.getLogger('LoggingTest')     logger.setLevel(logging.DEBUG)          formatter = logging.Formatter('{FILTER} %(message)s')     handler = logging.handlers.SysLogHandler()     handler.setFormatter(formatter)     logger.addHandler(handler)          logger.info("Test Message")      I restarted rsyslog using               sudo service rsyslog restart      When I run my script the following line appears in /var/log/messages, /var/log/syslog and /var/log/user.log but it does not appear in /var/log/filter.log which exists but remains empty.               Jun 23 17:18:29 {FILTER} Test Message      If I use command line tool 'logger' (command line example given below) then the rule is applied correctly               $ logger "{FILTER} Test Message 2"     $ cat /var/log/filter.log     Jun 23 17:21:28 NDU1010 nick: {FILTER} Test Message 2      Why isn't the rule applied to messages from my python script? I'm at a loss to explain this.


title: Shift+delete vs rm -rf

text: Are `Shift`+`Delete` and `rm -rf` different? Is it possible to recover deleted data after performing either of them?


title: How to install CentOS 4.7?

text: I am trying to install CentOS 4.7. When I get on to the mirror site, it offers me different binaries, bin1of5, bin2of5,bin3of5, etc. I just want the basic version. Which one should I download? Thank you.


title: Disabling MMC in uboot

text: Following is the log message related to u-boot on Xilinx zynq platform:               [Fri Apr 04 19:57:50.990 2014] U-Boot 2013.07 (Apr 04 2014 - 19:38:00)     [Fri Apr 04 19:57:50.990 2014]      [Fri Apr 04 19:57:50.990 2014] Memory: ECC disabled     [Fri Apr 04 19:57:50.990 2014] DRAM:  1 GiB     [Fri Apr 04 19:57:51.007 2014] MMC:   zynq_sdhci: 0     [Fri Apr 04 19:57:51.007 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB     [Fri Apr 04 19:57:51.038 2014] *** Warning - bad CRC, using default environment     [Fri Apr 04 19:57:51.038 2014]      [Fri Apr 04 19:57:51.038 2014] In:    serial     [Fri Apr 04 19:57:51.038 2014] Out:   serial     [Fri Apr 04 19:57:51.038 2014] Err:   serial     [Fri Apr 04 19:57:51.038 2014] U-BOOT for Xilinx-ZC702-14.7     [Fri Apr 04 19:57:51.038 2014]      [Fri Apr 04 19:57:51.038 2014]      [Fri Apr 04 19:57:51.038 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB     [Fri Apr 04 19:57:51.354 2014] SF: 1963200 bytes @ 0x520000 Read: OK     [Fri Apr 04 19:57:51.354 2014] ## Loading kernel from FIT Image at 01000000 ...     [Fri Apr 04 19:57:51.354 2014]    Using 'conf@1' configuration     [Fri Apr 04 19:57:51.354 2014]    Trying 'kernel@1' kernel subimage     [Fri Apr 04 19:57:51.354 2014]      Description:  PetaLinux Kernel     [Fri Apr 04 19:57:51.354 2014]      Type:         Kernel Image     [Fri Apr 04 19:57:51.354 2014]      Compression:  gzip compressed     [Fri Apr 04 19:57:51.354 2014]      Data Start:   0x010000f0     [Fri Apr 04 19:57:51.354 2014]      Data Size:    1630119 Bytes = 1.6 MiB     [Fri Apr 04 19:57:51.354 2014]      Architecture: ARM     [Fri Apr 04 19:57:51.354 2014]      OS:           Linux     [Fri Apr 04 19:57:51.354 2014]      Load Address: 0x00008000     [Fri Apr 04 19:57:51.354 2014]      Entry Point:  0x00008000     [Fri Apr 04 19:57:51.354 2014]      Hash algo:    crc32     [Fri Apr 04 19:57:51.354 2014]      Hash value:   01dece90     [Fri Apr 04 19:57:51.354 2014]    Verifying Hash Integrity ... crc32+ OK      My aim is to reduce boot time. The OS and the u-boot is supposed to boot from flash. But as you can on the top MMC is being detected:                   [Fri Apr 04 19:57:50.990 2014] DRAM:  1 GiB         [Fri Apr 04 19:57:51.007 2014] MMC:   zynq_sdhci: 0      It takes 0.17 seconds. Is there anyway I can save this time may be by disabling MMC from u-boot?If so how do we disable MMC in u-boot. What is the general procedure?


title: what does `sshfs -oworkaround=rename` do?

text: For an operating systems class I'm taking, I've needed to run Freebsd5.4. Since I didn't want to wrestle with trying to build git on a version of bsd released before git was released, I thought it would be neat to use `git` from Arch over `sshfs`. At any rate I found a workaround that suggested I give `sshfs` the option `-o workaround=rename`. It seems to make `git` happy, but I am rather confused as to what just happened... All the man page says about the workaround is               fix renaming to existing file      but I am completely baffled as to what that means... What exactly does that option do?


title: Recursively delete hidden directory & its files?

text: I want to delete all hidden directoris from a directory and its sub-directory. I also use `rm -rf .directory_name` this command is iterative command I want to a recursive command. Please anybody help me??


title: vim search around line breaks

text: When I am editing a LaTeX document in vim, often times I want to search for a phrase. Because I have LaTeX setup to wrap lines, sometimes half of the phrase will be on one line while the other half is on the next. In such a case, the search does not find what I'm looking for. So for example               blah blah blah hello     world blah blah blah      when searching using `/hello world`, I don't find what I'm looking for. Is there a quick and easy way to modify this search to get me where I want to be? Or better yet, a way to tell vim to match any white space (space, tab, new line) with a space in the search string?


title: Gentoo XEN host + EFI + MDADM + IMSM RAID5

text: I have a workstation with a working Gentoo setup. It uses IMSM FakeRAID (level 5) with 4 disks. Booting done without bootloader using Linux kernel EFI STUB. System works fine. Now I need to setup XEN HVM host on this station. Problem is that I'm unable to assemble IMSM array if booting with xen.efi. Direct kernel boot works just fine. `mdadm --detail-platform` in initramfs w/ xen.efi gives me > mdmon: imsm capabilities not found for controller: > /sys/devices/pci0000:00/0000:00:1f.2 (type SATA) Anyone know if XEN works with mdadm on imsm raid5 or is it known issue? And also possible solutions?


title: No MAC corresponding to IP in `arp` table: how to troubleshoot?

text: I've got a Debian 7 linux machine and a TP-link MR3020 router attached to it via ethernet cable at `eth0` interface, working in WISP mode meant to make it a client rather than an access point: ![enter image description here](http://i.stack.imgur.com/Stf2l.png) I also have a separate router connected to ISP and nicely providing wi-fi. My linux machine lacks built-in wi-fi adapter and I want to use WISP mode router instead of external USB wi-fi adapter cause those are very unstable (tried 3 of them, 2 don't work, 1 glitches). My trouble is that seemingly, my Linux machine can't associate IP address of WISP router with its MAC address: I used to utilize network manager for eth0, my settings were               gateway ip 192.168.1.1     mask /24     static ip 192.168.1.2 (for my Debian machine itself)      but now I entered them right in `/etc/network/interfaces` (see below) When I `ping 192.168.1.1`, it says `From 192.168.1.2 icmp_seq=1 Destination Host Unreachable`. I found out that `arp` doesn't know MAC address for this ip: 192.168.1.1 corresponds to `HWaddress [incomplete]`. Do you have any advice of how to troubleshoot this? Should I manually assign IP to MAC? * * * **INFORMATION UPDATE:** My `/etc/network/interfaces` now contains the eth0 interface as primary:               # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     allow-hotplug eth0     iface eth0 inet static         address 192.168.1.2         netmask 255.255.255.0         network 192.168.1.0         broadcast 192.168.1.255         gateway 192.168.1.1      `ifconfig` data:               $ sudo ifconfig     eth0      Link encap:Ethernet  HWaddr 40:e5:49:32:a2:50               inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::52e5:49ff:fe32:a240/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:68643 errors:0 dropped:0 overruns:0 frame:0               TX packets:53708 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:81335250 (77.5 MiB)  TX bytes:5438226 (5.1 MiB)               Interrupt:40 Base address:0xe000      `route` data:               $ sudo route -n          Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0     192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0      Capture of packets by `wireshark` upon `ping 192.168.1.1` contains only spam of tons of ARP packages, all of the same structure:               Source Giga-Byt_something     Destination Broadcast     Protocol Arp     Length 42     Info Who has 192.168.1.1 Tell 192.168.1.2          Arp frame details:     Address Resolution Protocol (request)     Hardware type: Ethernet (1)     Protocol type: IP (0x0800)     Hardware size: 6     Protocol size: 4     Opcode: request (1)     Sender MAC address: Giga-Byt_something (40:e5:49:32:a2:50)     Sender IP address: 192.168.1.2     Target MAC address:  00:00:00_00:00:00 (00:00:00:00:00:00)     Targe IP address: 192.168.1.1 (192.168.1.1)      At the same time router's _LAN LED is blinking, indicating that transfer of data is happening_. Router quick manual, contains illustrations on WISP mode: http://www.tp- link.com/resources/document/TL-MR3020_V1_QIG_7106503718.pdf **EDIT:** The problem with arp was solved by setting gateway to 192.168.0.254. Current state is that my Linux machine sees the WISP tp-link router, but WISP router doesn't see the main d-link router in access point mode: ![enter image description here](http://i.stack.imgur.com/bQcPk.png) I'm not really sure, if it is possible to have a LAN within LAN. Tomorrow I'll try to associate the router in WISP mode with Windows machine and `wireshark` the negotiations between tp-link and d-link routers to find out, how tp-link WISP mode router tries to associate itself with 192.168.1.* LAN.               $ sudo route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.0.254   0.0.0.0         UG    0      0        0 eth0     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0     192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0


title: Non-KDE alternative to KNotes?

text: Do you know a KNotes-like program that does not require the whole KDE stuff? To anybody not knowing KNotes, this is what it does and how it looks like: ![KNotes screenshot from kde.org](http://i.stack.imgur.com/0t6lR.png)


title: Can't connect to to internet. Debian Wheezy, pinging DNS address works

text: I have booted Debian Wheezy from SD card on a Beaglebone Black board. Version: debian-wheezy-7.0.0-armhf-3.8.13-bone20.img.xz, from http://www.armhf.com/index.php/download/ I have set up my /etc/networks/interfaces file:               auto lo     iface lo inet loopback          auto eth2          iface eth2 inet static         address 192.168.1.101         netmask 255.255.255.0         gateway 192.168.1.2         dns-nameservers 8.8.8.8 8.8.8.9     # wireless network interface     #auto wlan0     #iface wlan0 inet dhcp      When I ping 8.8.8.8:               PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.     64 bytes from 8.8.8.8: icmp_req=1 ttl=44 time=32.3 ms     64 bytes from 8.8.8.8: icmp_req=2 ttl=44 time=29.3 ms     64 bytes from 8.8.8.8: icmp_req=3 ttl=44 time=30.3 ms      route -n               0.0.0.0         192.168.1.2     0.0.0.0         UG    0      0        0 eth2     192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2      ifconfig -a               eth2      Link encap:Ethernet  HWaddr 90:59:af:5c:f9:ca           inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::9259:afff:fe5c:f9ca/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:463 errors:0 dropped:0 overruns:0 frame:0           TX packets:182 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:91607 (89.4 KiB)  TX bytes:14680 (14.3 KiB)           Interrupt:56          lo        Link encap:Local Loopback           inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:2 errors:0 dropped:0 overruns:0 frame:0           TX packets:2 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0           RX bytes:190 (190.0 B)  TX bytes:190 (190.0 B)      But when I ping google.com               ping: unknown host google.com      I can also ping other devices on network, but can't access internet. Any idea what is wrong? EDIT1: cat /etc/resolv.conf               # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)     #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN     nameserver 8.8.8.8     nameserver 8.8.8.9      cat /etc/nsswitch.conf               # /etc/nsswitch.conf     #     # Example configuration of GNU Name Service Switch functionality.     # If you have the `glibc-doc-reference' and `info' packages installed, try:     # `info libc "Name Service Switch"' for information about this file.          passwd:         compat     group:          compat     shadow:         compat          hosts:          files dns     networks:       files          protocols:      db files     services:       db files     ethers:         db files     rpc:            db files          netgroup:       nis


title: manage unix user settings across multiple machines

text: I have many different linux machines with similar "profiles". I want to keep my settings in sync. e.g `vimrc`, `zshrc`,. I have the problem that they are various distributions of Linux with various setups and software versions, e.g, some of them with a windowing system, some not, Some have Zsh, some don't, some have varying versions of it. I realize I could dropbox, or github, etc, my settings. But as the environment has become more complex this has become more difficult (I already Github). I also find it challenging to keep each machine in sync. These are mostly client machines, with different internet connections (and different networks, e.g some home some office, so "push" to machine won't work for keeping in sync. I don't expect that a solution would automatically detect my code, e.g. `zshrc` is incompatible with an old version, but it'd be nice to hint things as such so they aren't synced, perhaps a template. Are there any existing solutions that could help me solve this problem?


title: Find which files are affected by bad blocks on ext4 filesystem

text: I have an ext4 filesystem that recently developed some bad sectors. Running `fsck.ext4 -c` finds and remembers the bad blocks. How can I find which files (if any) included these bad blocks so I can restore them from backups?


title: Gcc Error: cc1 not found

text: I've a system with `gcc 4.2.4` on board, but when I try to compile even a simple hello world I obtain this error:               $ gcc helloworld.c     gcc: error trying to exec 'cc1': execvp: No such file or directory      I've checked and actually cc1 is not present in the system. Also, I've noticed that some folders required from gcc (e.g., `/usr/lib/gcc/` and `/usr/libexec/gcc`) are missing. Is there any possibility to restore the installation of gcc without trying to recompile it entirely?


title: openvpn with systemd: reconnect

text: Im using openvpn enabled as a service. It works well, but once I get assigned a new IP adress or lose the connection, I cant access to the internet any more. Then I have to systemctl restart openvpn@ipredator.conf manually. How can I fix that so I dont have to login as root each time and restart the service manually?               [root@arch paul]# cat /etc/openvpn/ipredator.conf      client     dev tun0     proto udp     remote pw.openvpn.ipredator.se 1194     resolv-retry infinite     nobind          auth-user-pass /etc/openvpn/ipredator.auth     auth-retry nointeract          ca [inline]          tls-client     tls-auth [inline]     ns-cert-type server          keepalive 10 30     cipher AES-256-CBC     tls-cipher TLSv1:!ADH:!SSLv2:!NULL:!EXPORT:!DES:!LOW:!MEDIUM:@STRENGTH     persist-key     persist-tun     comp-lzo     tun-mtu 1500     mssfix     passtos     verb 3          <ca>     -----BEGIN CERTIFICATE-----     ###censored###     -----END CERTIFICATE-----     </ca>          <tls-auth>     -----BEGIN OpenVPN Static key V1-----     ###censored###     -----END OpenVPN Static key V1-----     </tls-auth>


title: Select text in urxvt terminal using Shift+Arrow or Ctrl+Shift+Arrow

text: I'm using zsh + rxvt-unicode as a terminal simulator in Archlinux. I've successfully setup navigation in the terminal using `Ctrl`+`Arrow keys`, but I can't setup the terminal to be able to select text when pressing Shift + Arrow (or Ctrl + Shift + Arrow to select the whole word). After several days of searching for solution I couldn't find one. Enabling `keyboard-select` in `.Xresources` didn't do the trick. So I'm interested in what should I do to be able to select text in the console without using the mouse just like it is done in all text editors?


title: Where is tcl-doc man page stored?

text: I installed tcl-doc. Prior to installation "man tcl" gave nothing. Now it gives a page. When I do "dpkg -L tcl-doc" I get               /.       /usr       /usr/share       /usr/share/doc       /usr/share/doc/tcl-doc      /usr/share/doc/tcl-doc/tcltk-policy.html      /usr/share/doc/tcl-doc/tcltk-policy.pdf      /usr/share/doc/tcl-doc/README.Debian      /usr/share/doc/tcl-doc/copyright      /usr/share/doc/tcl-doc/tcltk-policy.txt.gz      /usr/share/doc/tcl-doc/changelog.Debian.gz      I am wondering what the source of the output of the command "man tcl" is? Is it one of the above files, and if not, why isn't it displayed in the above output?


title: Bash, remove lines containing string with grep

text: This is currently deleting the whole contents of the file in question:               #!/bin/bash     rpc_port="9201";     dir="/etc/apache2/ports.conf"     cat $dir | grep -v "Listen $rpc_port" > $dir      The file contents:               Listen 9200     Listen 9201     Listen 9202     Listen 9203     Listen 9204      Could someone please either fix this or give me a working alternative? :)


title: Generate interrupts for purpose of stress testing

text: I'm testing the quality of a generated PWM signal on a Raspbery Pi. I would like to test how it behaves if there are lots of interrupts coming. Is there a way to fake interrupts or force 2000 keyboard interrupts per second via a script?


title: How to install a2dissite and a2ensite on openSUSE 11.3?

text: I don't have the a2dissite and a2ensite commands on my openSUSE 11.3 webserver. How can I add them? I didn't find these commands with YAST. Maybe, because there are no openSUSE 11.3 repositories anymore? How can I install/ make available a2dissite and a2ensite?


title: Configuring Kmail to understand Thunderbirds server sided tags

text: Is there any way to configure KMail to read and show the tags made in Thunderbird? http://kb.mozillazine.org/Tags


title: Click OCR program for linux

text: Is there any Linux software which can select/copy a word from a picture when the word is clicked?


title: Expanding a partition in Ubuntu

text: This is what GParted displays about my partitions. ![Screenshot from GParted](http://i.stack.imgur.com/JCzfm.png) And this is the output from `df`:               Filesystem     1K-blocks    Used Available Use% Mounted on     /dev/sda1       61409452 4503052  53786836   8% /     udev              499168       4    499164   1% /dev     tmpfs             203192     784    202408   1% /run     none                5120       0      5120   0% /run/lock     none              507972      88    507884   1% /run/shm      How do I expand `sda1` by the amount of the unallocated space so that it's size be 160 GiB? Can't find a way so far. "Resize/Move" and "Delete" items in the right-click menus appear grayed out for all the partitions.


title: Synchronous notifications with notify-send and xfce4-notifyd?

text: The title of this question is really self explanatory. I intend to send synchronous volume notifications in arch(changing volume and showing the progress bar) and was wondering if I can do this with plain `notify-send` and `xfce4-notifyd`(eg. a hint or something). **EDIT1:** More precisely I want new volume notifications to replace old ones so that it emulates a volume meter and it doesn't flood my screen. If not, is this possible with `notify-osd` or do I need to actually use libnotify?


title: Can I avoid enter key in cp -i?

text: I often need to selectively archive a long list of files using `cp -iar`, or similar, and to speed up the process I would like to press just one key instead of `y` or `n` followed by `ENTER` on every file. In other words I want to avoid having to press `ENTER` as well as `y` or `n`. Of course I would happily use different keys instead of `y` or `n`. Is there a way to do this?


title: Remove just one word before pattern match in shell script

text: Input:                int foo(int a, void * b, int c);      Output:                int foo(int, void *, int);      Want to use "," as pattern to match. If "," pattern is matched then remove the previous word i.e. `a`, `b` & `c`.


title: VPS/Cloud configuration management automatization for small environments

text: What would be an appropriate tool/approach for configuration management of a relatively small number of VPS/VMs (1-5). Even though it's a small number I'm a big fan of "nuke 'n boot" in case of any problems and therefore need to be able to setup a new VPS with an existing configuration quickly (minutes). Puppet, chef and the likes seem to be fairly oversized for that setup - apart from the fact that they aim to sell their enterprise version and the open source version is rather crippled. Open Source is a must criteria for me. I currently manage most of this stuff manually by having copies of the relevant config files on dropbox or summaries in evernote, etc. Preferably I would like to use a tool that runs on a local Ubuntu server or so from which I could easily manage one to a few remote VPS or local VM instances. Does anyone have experience with that topic and can recommend something? I consider chef and puppet oversized, etckeeper on the other hand is a bit too limited. * * * Edit:   A solution with Management UI would be preferred * * * I summarize the proposals from the comments here:   * Puppet Open Source version without UI and limited features   * Chef Open Source version with a bit less features   * Capistrano non UI, scripting or ruby   * Foreman UI for Puppet, Chef


title: Default function arguments (manually emitting bash psuedo-signals)

text: I'm looking for a solution that will automatically allow me to call a function with specific parameters in a certain situation.   Here is the specific scenario: When an error occurs, I can set up my error handler like this:               function _trap_err () {         echo "An error occurred in "$1":"$2" on "$3":"$4".     }      And I can set the trap to collect the debugging data I need automatically - **at the correct moment in execution**.               trap '_trap_err "$BASH_SOURCE" "$BASH_LINENO" "$FUNCNAME" "$BASH_COMMAND" ' ERR      AFAIK, this only works when bash detects an error and emits the signal. I'd like to extend this behavior so that I can manually signal an error when a check fails, for example, when checking function arguments:               # Usage: myfunc <requiredarg>     function myfunc () {         [[ $# != 1 ]] && emit_err_signal     }      If there is a way to manually emit that error signal, then its possible to automatically collect that debugging argument at the correct time in execution to provide meaningful debugging information. The alternative is to simply display an error message - which has to be hardcoded in every check - and doesn't display where the error occurred. Any ideas? **EDIT**   I should have specified that I this is for my .bashrc files and I don't want them to quit, I just want debugging information. Traps may have be overkill for this, i think the following solution may work:               function _debug () {         local _message=${1:-""}         printf "\e[1;32m[BASHRC] DEBUG: %-20s - %s\e[0m\n" "$BASH_SOURCE:$BASH_LINENO" "$_message"     }          _debug "Testing debug message."          > [BASHRC] DEBUG: .bashrc.d/bashrc:18  - Testing debug message.


title: Trying to get a dynamic page with wget without success

text: I am using this command to get a page and all its images and javascripts on iTunes with wget. All I want is this page and all its images and scripts.                wget -kKErpNF --no-check-certificate --html-extension  -nd -A jpg,jpeg,png,js  -nH https://itunes.apple.com/us/app/megamilhoes-megasena-gerador/id854897303?mt=12      The command is working almost well but it is not saving the page itself because the page is dynamic and built in the browser. There is no html/html extension on the page. How do I get that? `\--html-extension` is causing no effect. I am on OSX Mavericks.


title: Is replacing a driver file enough for X servers even if the files are dynamically linked?

text: I was installing a new RHEL6 machine. The machine previously had Ubuntu 8.10 and most of the drivers were outdated. **Problem** After the installation steps, I restarted the machine. Everything was fine till this point. I had to connect the external backup drive and so I just unplugged the keyboard from USB port and connected it in the backside to accomodate the backup drive. The X server froze and I couldn't do anything other than hard rebooting the machine. **Analysis Details** I tried various commands like, `startx`, `system-config-display` but none of them worked. I also tried some other options which am not mentioning as they are irrelevant to my question. I analysed the logs in the newly installed machine against the logs in a perfectly working machine. After a long analysis of both the logs, I figured that, `/var/log/Xorg.0.log`, had the driver `/usr/lib/xorg/modules/drivers/intel_drv.so` corrupted. I was getting an error in the above line. So, I had planned to reinstall the entire system again but before doing the same, I decided to replace the file and try once. To my surprise it worked and the **X server** came up fine. **Question** So how did just the replacement of file solved the issue? As far as I understand, I see the file is actually dynamically linked to various files and it shouldn't have resolved the issue.


title: Pipe hex characters to awk

text: This command works as expected               $ awk 'BEGIN {print "\x41"}'     A      As does this               $ printf '\x41' | awk '{print}'     A      However when you rely on awk to recognize the hex characters, it fails               $ echo '\x41' | awk '{print}'     \x41      How can this be overcome?


title: Is there a way to disable wget from getting files from parent directories to given depth?

text: **wget** has such option as `-np` which disables getting files from any parent directory. I need something similar but a bit more flexible. Consider:               www.foo.com/bar1/bar2/bar3/index.html      I would like to get everything but not "higher" (in the tree hierarchy) than `bar2` (!). So `bar2` should also be fetched but not `bar1`. Is there a way to make wget more selective? _Background: I'm trying to mirror a website, with a similar logical structure -- starting point, then up, then down. If there is another tool than`wget`, better suited for such layout, please let me know as well._ ## Update Or instead of specifying possible depth up, maybe something like "no parents, unless they match this or that URL". ## Update 2 There is some structure on the server, right? You can visualize it as a tree. So normally with "--no-parent" you start from some point A and go only down. My wish, is ability to go up -- expressed by saying, it is allowed to go up X nodes, or (which is 100% equivalent) that it is allowed to go up to B node (where the distance B-A=X). In all cases, the rules for going down stays as were defined by users (for examples -- go down only by Y levels). How to store it? Actually it is not the question really -- `wget` by default recreates the server structure, there is nothing here to be afraid, or there is no need for fixing anything. So, in 2 words -- as usual. ## Update 3 Directory structure below -- let's assume that in each directory there is only one file, in R -- R.html and so on. This is simplified of course because you can have more than one page.                       R             / \           B   G          / \         C   F        / \       A   D      /     E       A (A.html) is my starting point, X = 2 (so B is the most top level node I would like to fetch). In this particular example this means fetching all pages except R.html and G.html. A.html is called "starting point" because I **have to** start from it, not from B. ## Update 4 Naming is used from Update 3. > wget OPTIONS www.foo.com/B/C/A/A.html The question is what are the options to get all pages from directory B and below (knowing that you have to start from A.html).


title: How to unpack dd file on Windows?

text: Is it possible to unpack files created with linux dd tool on Windows? I have tried that tool http://www.chrysocome.net/dd, but it crashes under Windows 7. Any ideas?


title: CRT monitor refresh rate

text: I have Ubuntu14.04 64bit installed on computer with a CRT monitor. In Windows I could set the monitor's refresh rate to 85Hz. But Ubuntu's `xrandr` reports that maximum is 60Hz for 1024x756. Is there a way to fix this? I installed current nvidia Ubuntu driver in repo; nothing changed. **Edit1:**               $ xrandr --properties     Screen 0: minimum 8 x 8, current 1024 x 768, maximum 8192 x 8192     DVI-I-0 disconnected primary (normal left inverted right x axis y axis)     SignalFormat: VGA     supported: VGA     ConnectorType: DVI-I     ConnectorNumber: 0     _ConnectorLocation: 0     VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm     SignalFormat: VGA     supported: VGA     ConnectorType: VGA     ConnectorNumber: 1     _ConnectorLocation: 2     1024x768 60.0*+     1360x768 60.0 59.8     1152x864 60.0     800x600 72.2 60.3 56.2     680x384 60.0 59.8     640x480 59.9     512x384 60.0     400x300 72.2     320x240 60.1     DVI-I-1 disconnected (normal left inverted right x axis y axis)     SignalFormat: TMDS     supported: TMDS     ConnectorType: DVI-I     ConnectorNumber: 0     _ConnectorLocation: 0      **Edit2:**               $ gtf 1024 756 85            # 1024x756 @ 85.00 Hz (GTF) hsync: 67.49 kHz; pclk: 92.87 MHz       Modeline "1024x756_85.00"  92.87  1024 1088 1200 1376  756 757 760 794  -HSync +Vsync          $ xrandr --newmode "1024x756_85.00"  92.87  1024 1088 1200 1376  756 757 760 794  -HSync +Vsync     X Error of failed request:  BadName (named color or font does not exist)       Major opcode of failed request:  140 (RANDR)       Minor opcode of failed request:  16 (RRCreateMode)                                                                                Serial number of failed request:  27                                                                                Current serial number in output stream:  27        **Edit3:**               $ xrandr --newmode  "myrate" 92.87  1024 1088 1200 1376  756 757 760 794  -HSync +Vsync     $ xrandr --addmode VGA-0 myrate     X Error of failed request:  BadMatch (invalid parameter attributes)       Major opcode of failed request:  140 (RANDR)       Minor opcode of failed request:  18 (RRAddOutputMode)       Serial number of failed request:  27       Current serial number in output stream:  28


title: put rows of numbers into a column with shell script

text: I have a file with many lines, like               1 jfkdajfd   1 2 3 5     2 fkldfjld        3 fdkfloaf   9 10     4 fldfldkf      5 fdskf;ak   12 1 4      I want to get all the numbers and put them in a column in a file, like                1      2      3      5      9      10      12      1      4      how can I achieve this? thanks


title: rsync certain files, excluding the rest, ignoring .svn/ directory, recursively

text: I'm using `rsync` to copy some files from a share to another. Recursively, I need to:   * Delete files at destination that were removed from the origin   * Only sync php and js files   * Exclude every other file type   * Do not delete `.svn/` directories at destination If I use this:               rsync -zavC --delete --include='*.php' --include='*.js' --exclude="*" \         /origiin /destination      Then `rsync` is not recursive because `exclude="*"` excludes all files but also folders If I add `\--include="*/"` then the `.svn/` directory gets deleted (it also gets included) **How can I solve this mind blasting dilemma?** `uname -a`: > Linux tux 3.9.2-1-ARCH #1 SMP PREEMPT Sat May 11 20:31:08 CEST 2013 x86_64 > GNU/Linux `rsync` version:               rsync 3.0.9-6


title: Unable to close a Luks partition

text: For backup purposes, I have "snapshotted" a LVM partition. This partition was crypted so I have opened this Luks partition (snapshot) in order to do my backup. The problem is that I have forgotten to delete the snapshot, thus it reached 100% usage. When I try to delete the snapshot:               lvremove /dev/mapper/vgx-LogVolDBSnapshot     /dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 375809572864: Input/output error     /dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 375809630208: Input/output error     /dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 0: Input/output error     /dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 4096: Input/output error     /dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 375807475712: Input/output error     /dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 375807533056: Input/output error     /dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 0: Input/output error     /dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 4096: Input/output error     Logical volume vgx/LogVolDBSnapshot is used by another device.      That's quite normal, I have to close my Luks partition in first:               cryptsetup -v luksClose /dev/mapper/SnapshotDecrypted     Cannot read device /dev/mapper/vgx-LogVolDBSnapshot.     Command failed with code 15: Cannot read device /dev/mapper/vgx-LogVolDBSnapshot.      How can I close or delete my Luks partition in order to be able to delete the snapshot ? Can I use "dmsetup remove /dev/mapper/SnapshotDecrypted" and then "lvremove /dev/vgx/LogVolDBSnapshot" ? **output of dmsetup**               dmsetup ls     SnapshotDecrypted (253:17)     vgx-LogVolDBSnapshot (253:14)          dmsetup table     SnapshotDecrypted: 0 733999104 crypt aes-cbc-essiv:sha256 0...0 0 253:14 4096     vgx-LogVolDBSnapshot: 0 734003200 snapshot 253:15 253:16 P 8


title: What is a file?

text: I thought that the `file` is a reserved place on disk and it is a Record collection but i found that it is a wrong definition because the empty file capacity is `0kb` so it can't be a reserved place on disk ,               mostafa@jamareh:~$ cd Desktop/     mostafa@jamareh:~/Desktop$ touch test     mostafa@jamareh:~/Desktop$ ls -l test     -rw-rw-r-- 1 mostafa mostafa 0 Feb 28 16:55 test      as you see in this example the os shows us there is a file and the capacity is `0kb` , so i want to know why the capacity is `0kb` and where is test file ? what is a file on the `os` level ? actually i want to know the definition of file in the `operating system` level


title: Android bash prompt corrupt with long pwd

text: I'm using bash inside Jack Palevich's Android Terminal Emulator, run on an Android phone. The bash version is 4.2.20(1)-release, obtained from samveen on the XDA forum. My prompt is:               export PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[00m\] '      I think I have escaped all non-printing chars correctly with `\\[` and `\\]` but the prompt writes over itself and the prompt becomes corrupt making a mess of terminal input.               mkdir - p test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/     cd test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/      It's definitely to do with the colors as               export PS1='\u@\h \w \$  '      gives me a working prompt. How can I fix it?


title: Do any archive utilities exist that can preserve the date created file attribute on NTFS-3G?

text: I tried the `-X` switch on `zip`, but that did not save the date created attribute. I can get it using this method. When a file is added to a zip archive using 7-Zip, it preserves the date created and date accessed attributes. I would like to do the same on Linux and then extract my files on Windows, while preserving the date created.


title: Lilo makes a lot of disk noise

text: After upgrading to Debian Wheezy, the `lilo` command causes my boot disk to make a lot of noise. I am not aways of any real problems, just the noise sounds somewhat scary, especially since this wasn't the case earlier. When I run `lilo -v4` I can see that each noise corresponds with one of these lines:               Mapped AL=0x00 CX=0xbc27 DX=0xbee0, LBA=12500007     Mapped AL=0x00 CX=0xbc28 DX=0xbee0, LBA=12500008     Mapped AL=0x00 CX=0xbc29 DX=0xbee0, LBA=12500009     Mapped AL=0x00 CX=0xbc2a DX=0xbee0, LBA=12500010     Mapped AL=0x00 CX=0xbc2b DX=0xbee0, LBA=12500011     Mapped AL=0x00 CX=0xbc2c DX=0xbee0, LBA=12500012      there are 27779 such lines in the verbose output. The noise does not sound unhealthy, more like a regular head movement. It sounds like for each of these lines lilo does a seek and the head happens to be in a distant position. Does anybody know what might have caused the change from silent operation to noisy operation?


title: Errors when searching for special characters in awk

text: How can I search for a pattern in `awk` if the text contains special characters?               billinAddress ||      when I search, it is showing an error on pipe sign `||`. How can I search for the pipe sign `||` in awk?


title: Ideas how to get my usb audio interface to work with Linux?

text: PulseAudio does not appear to recognize the Focusrite Scarlett 6i6 USB audio interface. The 2i2, however, is properly recognized and it works as expected. I can't seem to get the 6i6 to work on the same system where the 2i2 worked. Both are said to be class compliant USB devices. I also tried the 6i6 on another computer with a fresh system installation (Kubuntu 12.04) and the result is the same -- PulseAudio doesn't see the 6i6. Here's the only official info I found: Linux and Focusrite / Novation products | Focusrite Development http://focusritedevelopmentteam.wordpress.com/2012/04/23/linux-and-focusrite- novation-products/ > Should work: Scarlett 2i2, 2i4, 8i6, 18i6, 6i6, 18i8, 18i20, Saffire 6 USB > MkII (USB audio class 2.0 compatible), Forte and iTrack Solo. My experience is that the 6i6 does **not** work (while the 2i2 does). I'm hoping someone here has figured it out or can tell me the steps I need to figure it out.               $ lsusb     [snip other h/w]     Bus 001 Device 006: ID 1235:8012 Novation EMS           $ cat /proc/asound/cards     [snip other h/w]      1 [USB            ]: USB-Audio - Scarlett 6i6 USB                           Focusrite Scarlett 6i6 USB at usb-0000:00:1a.0-1.2, high speed          $ pacmd list-cards     Welcome to PulseAudio! Use "help" for usage information.     >>> 1 card(s) available.     [the 6i6 is not shown, only the built-in sound card is shown]      I'm running Kubuntu 12.04 LTS (KDE) and System Settings -> Multimedia -> Phonon does not show the 6i6 at all. Previously the 2i2 was recognized like this:               #lsusb     [snip other h/w]     Bus 003 Device 002: ID 1235:8006 Novation EMS           $ cat /proc/asound/cards     1 [USB            ]: USB-Audio - Scarlett 2i2 USB                           Focusrite Scarlett 2i2 USB at usb-0000:04:00.0-1, high speed          $ pacmd list-cards           Welcome to PulseAudio! Use "help" for usage information.           >>> 3 card(s) available.           [snip other cards]         index: 2         name: <alsa_card.usb-Focusrite_Scarlett_2i2_USB-00-USB>      Thanks


title: History command inside bash script

text: I have been bashing my head to write a simple history script for the last two days. History is a shell-built in command I couldn't able to use that within a BASH script. So, Is there a way attain this using BASH script ?   Here we go my script for you:               #!/bin/bash     history |  tail -100 > /tmp/history.log     cd /tmp     uuencode history.log history.txt  | mail -s "History log of server" hello@hel.com


title: Why won't OpenCL link with gcc after installing the fglrx driver and amd app sdk?

text: I have installed the fglrx driver on my machine following this tutorial: http://wiki.cchtml.com/index.php/Fedora_18_Installation_Guide, installed the opencl-headers package, and finally installed the amd app sdk When I run               gcc -lOpenCL someprogram.c      I am given the error               /usr/bin/ld: cannot find -lOpenCL     collect2: error: ld returned 1 exit status      I have the following from fglrxinfo               display: :0  screen: 0     OpenGL vendor string: Advanced Micro Devices, Inc.     OpenGL renderer string: AMD Radeon HD 6310 Graphics     OpenGL version string: 4.2.12422 Compatibility Profile Context 13.152      And there is no libopencl.so in /usr/lib64/ I figured out how to link it by running               gcc -I/opt/AMDAPP/include -L/opt/AMDAPP/lib/x86_64 -lOpenCL hellocl.c -o hello


title: Install new kernel in PowerPC debian

text: I compiled a new kernel image on x86 using cross compiler with these commands (source):               $ cp arch/powerpc/configs/pmac32_defconfig .config     $ make ARCH=powerpc menuconfig     $ make ARCH=powerpc CROSS_COMPILE=pwoerpc-750-linux-gnu-       Now, I want to install this new image on a debian-powerpc. Debian-powerpc uses quik as the default bootloader. How do I do that?