title: I'm trying to install steam on debian jessie/sid but I'm getting unresolved dependencies

text: I'm following the debian wiki on installing steam but I keep getting dependency issues. Debian tells me to edit my sources.list to:               deb http://http.debian.net/debian/ jessie main contrib non-free      My sources.list looks like this: Debian GNU/Linux jessie/sid \n \l               #     deb http://ftp.uk.debian.org/debian/ jessie main contrib non-free     deb-src http://ftp.uk.debian.org/debian/ jessie main contrib non-free          #deb http://ftp.uk.debian.org/debian wheezy main          #deb http://security.debian.org/ wheezy/updates main non-free     #deb-src http://security.debian.org/ wheezy/updates main contrib non-free          # wheezy-updates, previously known as 'volatile'     #deb http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free     #deb-src http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free      My unresolved dependencies look like:                Keep the following packages at their current version:               1)      gcc-4.8-base:i386 [Not Installed]                                 2)      libc6:i386 [Not Installed]                                        3)      libc6-i686:i386 [Not Installed]                                   4)      libdrm-intel1:i386 [Not Installed]                                5)      libdrm-nouveau2:i386 [Not Installed]                              6)      libdrm-radeon1:i386 [Not Installed]                               7)      libdrm2:i386 [Not Installed]                                      8)      libelf1:i386 [Not Installed]                                      9)      libexpat1:i386 [Not Installed]                                    10)     libffi6:i386 [Not Installed]                                      11)     libgcc1:i386 [Not Installed]                                      12)     libgl1-mesa-dri:i386 [Not Installed]                              13)     libgl1-mesa-glx:i386 [Not Installed]                              14)     libglapi-mesa:i386 [Not Installed]                                15)     libllvm3.3:i386 [Not Installed]                                   16)     libpciaccess0:i386 [Not Installed]                                17)     libstdc++6:i386 [Not Installed]                                   18)     libtxc-dxtn-s2tc0:i386 [Not Installed]                            19)     libx11-6:i386 [Not Installed]                                     20)     libx11-xcb1:i386 [Not Installed]                                  21)     libxau6:i386 [Not Installed]                                      22)     libxcb-dri2-0:i386 [Not Installed]                                23)     libxcb-glx0:i386 [Not Installed]                                  24)     libxcb1:i386 [Not Installed]                                      25)     libxdamage1:i386 [Not Installed]                                  26)     libxdmcp6:i386 [Not Installed]                                    27)     libxext6:i386 [Not Installed]                                     28)     libxfixes3:i386 [Not Installed]                                   29)     libxxf86vm1:i386 [Not Installed]                                  30)     steam:i386 [Not Installed]                                        31)     zlib1g:i386 [Not Installed]                                                  Leave the following dependencies unresolved:                        32)     libgl1-mesa-glx:i386 recommends libgl1-mesa-dri:i386 (>= 7.2)      I think this could be something to do with `# dpkg --add-architecture i386` but nothing seems to happen when I run the command. Help appreciated. **Edit:**               root@Wheezy:/# apt-get install steam     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      steam:i386 : Depends: libc6:i386 (>= 2.12) but it is not going to be installed                   Depends: libstdc++6:i386 (>= 4.3) but it is not going to be installed                   Depends: libx11-6:i386 but it is not going to be installed                   Depends: libgl1-mesa-dri:i386 but it is not going to be installed                   Depends: libgl1-mesa-glx:i386 but it is not going to be installed                   Depends: libtxc-dxtn-s2tc0:i386 but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      **Edit:**               root@Wheezy:/# dpkg --print-architecture     amd64     root@Wheezy:/# dpkg --print-foreign-architectures     i386      **Edit:**                    root@Wheezy:/# apt-cache policy libc6:i386 libstdc++6:i386  libx11-6:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386  libtxc-dxtn-s2tc0:i386 steam:i386     libc6:i386:       Installed: (none)       Candidate: 2.18-4       Version table:          2.18-4 0             500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages     libstdc++6:i386:       Installed: (none)       Candidate: 4.8.2-16       Version table:          4.8.2-16 0             500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages     libx11-6:i386:       Installed: (none)       Candidate: 2:1.6.2-1       Version table:          2:1.6.2-1 0             500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages     libgl1-mesa-dri:i386:       Installed: (none)       Candidate: 9.2.2-1       Version table:          9.2.2-1 0             500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages     libgl1-mesa-glx:i386:       Installed: (none)       Candidate: 9.2.2-1       Version table:          9.2.2-1 0             500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages     libtxc-dxtn-s2tc0:i386:       Installed: (none)       Candidate: 0~git20131104-1.1       Version table:          0~git20131104-1.1 0             500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages     steam:i386:       Installed: (none)       Candidate: 1.0.0.45-1       Version table:          1.0.0.45-1 0             500 http://ftp.uk.debian.org/debian/ jessie/non-free i386 Packages     root@Wheezy:/#       **Edit:**               root@Wheezy:/# apt-cache policy     Package files:      100 /var/lib/dpkg/status          release a=now      500 http://ftp.uk.debian.org/debian/ jessie/non-free Translation-en      500 http://ftp.uk.debian.org/debian/ jessie/main Translation-en      500 http://ftp.uk.debian.org/debian/ jessie/contrib Translation-en      500 http://ftp.uk.debian.org/debian/ jessie/non-free i386 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=non-free          origin ftp.uk.debian.org      500 http://ftp.uk.debian.org/debian/ jessie/contrib i386 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=contrib          origin ftp.uk.debian.org      500 http://ftp.uk.debian.org/debian/ jessie/main i386 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=main          origin ftp.uk.debian.org      500 http://ftp.uk.debian.org/debian/ jessie/non-free amd64 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=non-free          origin ftp.uk.debian.org      500 http://ftp.uk.debian.org/debian/ jessie/contrib amd64 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=contrib          origin ftp.uk.debian.org      500 http://ftp.uk.debian.org/debian/ jessie/main amd64 Packages          release o=Debian,a=testing,n=jessie,l=Debian,c=main          origin ftp.uk.debian.org     Pinned packages:


title: Compose key works on console/TTY, but not in X session

text: My compose key does not work in my X session anymore if I change a certain line in my `/etc/default/keyboard` that (if I am not mistaken) should only affect the keymap of the TTY. I'll try to elaborate on this since the situation probably is kind of convoluted. I normally use German keyboard layout with no dead keys. A while ago, however, I was trying out Neo (an alternate keyboard layout), and since I also wanted to be able to use Neo on the TTY, I edited `/etc/default/keyboard` to look like this (`/etc/console-setup/` contains the file `neo.map.gz`, among others):               # If you change any of the following variables and HAL and X are     # configured to use this file, then the changes will become visible to     # X only if HAL is restarted.  In Debian you need to run     # /etc/init.d/hal restart          # The following variables describe your keyboard and can have the same     # values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options     # in /etc/X11/xorg.conf.          XKBMODEL="pc105"     XKBLAYOUT="de"     XKBVARIANT="nodeadkeys"     XKBOPTIONS="compose:rwin" # right Win is the Compose key          # If you don't want to use the XKB layout on the console, you can     # specify an alternative keymap.  Make sure it will be accessible     # before /usr is mounted.     # KMAP=/etc/console-setup/defkeymap.kmap.gz          # Set up Neo 2 for TTY     KMAP=/etc/console-setup/neo.map.gz # <-- this is the line I'm talking about     BACKSPACE="guess"      After some time, I decided I did not want to use Neo anymore, so I went back to German layout with nodeadkeys for my X session. Because I was lazy, I did not change the layout on the TTY right away, therefore the TTY still uses Neo. Yesterday I finally wanted to change the TTY keyboard layout back to de- nodeadkeys. Therefore I commented the line `KMAP=/etc/console- setup/neo.map.gz`, and when I booted my computer today, I found that all is well and the console uses German layout again. Except that, suddenly, my compose key does not work in my X session anymore, which previously worked just fine. It does however work on the TTY with de-nodeadkeys. I uncommented `KMAP=/etc/console-setup/neo.map.gz` again, rebooted and now I once again have a working compose key in my X session, but also Neo on the TTY. **I would rather have de-nodeadkeys layout on the TTY while still having a working compose key on X. How can I achieve this?** Instead of editing `/etc/default/keyboard` manually, I also tried               # dpkg-reconfigure keyboard-configuration      (as suggested here on unix.SE), just to make sure I did not insert any errors by editing the file myself. For testing purposes, I selected the left Win key instead of the right one, but this did not help either. I don't know if this is important, but I use `xim` for input on X, my `.bashrc` contains the line `export GTK_IM_MODULE=xim` and my `.Xcompose` file comes from Kragen's xcompose.


title: Escaping multiple backticks in a sed call

text: I need to perform search and replacement iteratively in several SQL statements: From:               CREATE TABLE `Old_Name` (      To:               ALTER TABLE `Old_Name` RENAME TO `New_Name`      The above query contains backticks ```. I tried doing the following               sed -i -r "s/CREATE TABLE \`$search\` \(/ALTER TABLE \`$search\` RENAME TO \`$replacement\`/g" /query.txt;      It creates an enter on the command line instead. But if I add a space behind `$replacement`, it runs normally. But I do not want the space after `New_Name`. Note, I do not know whether this is actually caused by the backticks or it could be a variable name interpolation problem. Regardless the case, how can I solve this issue?


title: Run an executable with a Shell Script

text: I have `mplayer` installed and I want to create a simple shell script that runs in `bash` and executes `mplayer *` in the current directory. So, how to call upon `mplayer` in the shell script? I am a newbie to linux and would like detailed instructions.


title: Can not create new partition

text: I have Centos that have 508G free space i want to create new partition from it. it locates in extended partition ![enter image description here](http://i.stack.imgur.com/zoZmN.png) I create new partition and format it as anything (ext4, fat32), after apply it can't finish the process and gives me this error:               An error occured while applying the operations     See the details for more information.          IMPORTANT     If you want support, you need to provide the saved details!     See http://gparted.sourceforge.net/larry/tips/save_details.htm for more information.      and when i save the `save_details.htm` it contains this information:               GParted 0.6.0          Libparted 2.1          Create Logical Partition #1 (fat32, 508.23 GiB) on /dev/sda  00:00:01    ( ERROR )          calibrate New Partition #1  00:00:00    ( SUCCESS )          path: /dev/sda-1     start: 184424448     end: 1250263039     size: 1065838592 (508.23 GiB)     create empty partition  00:00:01    ( ERROR )     libparted messages    ( INFO )          WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.     WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.     ========================================      I used fdisk and create `/dev/sda6` and I see partitions like this:               $ sudo fdisk -l           Disk /dev/sda: 640.1 GB, 640135028736 bytes     255 heads, 63 sectors/track, 77825 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 4096 bytes     I/O size (minimum/optimal): 4096 bytes / 4096 bytes     Disk identifier: 0xa62a8bc3             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1         262     2097152   83  Linux     Partition 1 does not end on cylinder boundary.     /dev/sda2             262        5361    40960000   83  Linux     /dev/sda3            5361       10460    40960000   83  Linux     /dev/sda4           10460       77826   541113344    5  Extended     /dev/sda5           10461       11480     8192000   82  Linux swap / Solaris     /dev/sda6           11480       77825   532917056+  83  Linux     Partition 6 does not start on physical sector boundary.      but when I use `mkfs` to format it I see this error:               $ sudo mkfs -t ext4 /dev/sda6     mke2fs 1.41.12 (17-May-2010)     Could not stat /dev/sda6 --- No such file or directory          The device apparently does not exist; did you specify it correctly?      what is the problem?


title: Wifi card not detected - Archlinux

text: I've recently installed Archlinux on my Asus N76V Notebook but the system doesn't seem to detect my wifi card. It is not listed in any of the normal detection commands : lspci               00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)     00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)     00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)     00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)     00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)     00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)     00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)     00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)     00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)     00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)     00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)     00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)     00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)     00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)     01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 630M] (rev a1)     04:00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 08)      lsusb               Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 003 Device 004: ID 1bcf:2883 Sunplus Innovation Technology Inc.      Bus 003 Device 003: ID 8087:07da Intel Corp.      Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 001 Device 003: ID 046d:c52f Logitech, Inc. Unifying Receiver     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      The interface for wifi is not installed : ip link               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000         link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff      How can I identify the wireless device and install the appropriate driver? I use Archlinux, up-to-date, with kernel 3.14.2.


title: If I sudo execute a Bash script file, will all commands inside the Bash script be executed as sudo as well?

text: I want to write an automated post-installation script in Bash (called `post- install.sh`, for instance). The script will automatically add and update repositories, install and update packages, edit config files, etc. Now, if I execute this script, for instance with `sudo post-install.sh`, will I only be prompted for a `sudo` password once, or will I need to enter the `sudo` password on each invocation of a command inside the script, that needs `sudo` permission? In other words, do the commands inside the bash script 'inherit' the execution permissions, so to speak? And, if they indeed _do_ , is there still a possibility that the `sudo` permissions will time out (if, for instance, a particular command takes long enough to exceed the `sudo` timeout)? Or will the initial `sudo` password entrance last for the complete duration of whole script?


title: Mass .flac --> .mp3 transcoding: How to write a shell script that preserves ID3 tag information?

text: In recent weeks I've gone from a fairly 'hands-on' approach to .flac --> .mp3 transcoding, to one that's far more 'set & forget'. The first step was to stop using a GUI front end (Audacity with a LAME plug- in) and instead use the method I outlined here. The second step was to find a bash shell script that would tell that command loop to work recursively, allowing directories with many subdirectories containing .flac files to be transcoded in one simple step. That answer was provided by a user at askubuntu.com. Now I wish to learn how to further refine things so that ID3 tag information is preserved. The methods linked to above strip ID3 tag data, leaving the bare minimum (i.e. only the title field remains). Can anyone teach me how to write such a shell script? Many thanks in advance. * * * The shell script has been updated thus:               #!/bin/bash     file="$1"     flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3"     id3cp "$file" "${file%.flac}.mp3"      Doing `find . -name '*.flac' -exec ~/bin/flac2mp3 '{}' \;` in ~/Desktop/stack gives the following output:               01 - Amon Tobin - Chomp Samba.flac: done              LAME 3.98.4 64bits (http://www.mp3dev.org/)     Using polyphase lowpass filter, transition band: 19383 Hz - 19916 Hz     Encoding <stdin> to ./01 - Amon Tobin - Chomp Samba.mp3     Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=0)     Parsing ./01 - Amon Tobin - Chomp Samba.flac: done.  Copying to ./01 - Amon Tobin - Chomp Samba.mp3: done      `id3info` for the original .flac and resultant .mp3 gives, respectively:               *** Tag information for 01 - Amon Tobin - Chomp Samba.flac      (i.e. nothing);               *** Tag information for 01 - Amon Tobin - Chomp Samba.mp3     *** mp3 info     MPEG1/layer III     Bitrate: 128KBps     Frequency: 44KHz      The .flac definitely has tag information. I can verify this by opening up EasyTAG. EasyTAG refers to this as 'FLAC Vorbis Tag' but 'ID3 Tag' for the .mp3. Is this the problem?


title: Keep newlines in output of cut

text: Let's imagine we have a file:               foo bar     foo1 bar1      I want to cut every second word in every line, so I want file to look like this:               foo     foo1      I am trying to use `cut -d ' ' -f -1` but what I get is:               foo foo1      How can i preserve line endings in the file?


title: Switching on numlock by default in Linux Mint

text: Whenever I boot in to Linux Mint the NumLock is switched off by default. As my username consists of some numbers, I need to switch on NumLock each time. I want it to be switched on by default each time I log in. I had a look at the following question but could not find the `conf` file that the author is talking about: Enable num-lock as default in Linux I dual boot with Windows XP and Linux Mint 14 Mate using the default US Keyboard Layout.


title: How to recover my directory structure and files from a messed-up partition

text: Something strange (don't ask) happened on my external hard-drive, resulting in (important) data being unreachable... I am failing to mount it. That data was sitting on a vfat filesystem. I can get much of it with one tool, foremost. It sorts it into directories by file type, but I need the data intact in its original directory structure. Also, this tool gives the resulting files some random names, and is limited to a set number of file types. It appears to me that the partition table is damaged (not sure), and I don't know how to fix it. Here's the output of **`gpart`** for the whole drive:               # gpart -vd /dev/sdb          dev(/dev/sdb) mss(512) chs(121601/255/63)(LBA) #s(1953520065) size(953867mb)     Primary partition(1)        type: 000(0x00)(unused)        size: 0mb #s(0) s(0-0)        chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r        hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          Primary partition(2)        type: 000(0x00)(unused)        size: 0mb #s(0) s(0-0)        chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r        hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          Primary partition(3)        type: 131(0x83)(Linux ext2 filesystem)        size: 947827mb #s(1941150015) s(12370050-1953520064)        chs:  (770/0/1)-(1023/254/63)d (770/0/1)-(121600/254/63)r        hex:  00 00 C1 02 83 FE FF FF 82 C0 BC 00 3F 99 B3 73          Primary partition(4)        type: 000(0x00)(unused)        size: 0mb #s(0) s(0-0)        chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r        hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00      The one parition I'm interested in is one that's claimed to be **Linux ext2 filesystem**. That can't be accurate from my knowledge (it was vfat, but it could also have been NTFS, who knows). It also, that can't be accurate, according to another output of **`gpart`** (should I trust it?), this time specifying just that partition:               # gpart -vd /dev/sdb3          dev(/dev/sdb3) mss(512) chs(120831/255/63)(LBA) #s(1941150015) size(947827mb)          * Warning: strange partition table magic 0x606B.     Primary partition(1)        type: 031(0x1F)(UNKNOWN)        size: 522639mb #s(1070366139) s(4182104394-5252470532)        chs:  (961/156/44)-(97/173/28)d (260323/244/28)-(59601/209/5)r        hex:  F7 9C EC C1 1F AD 1C 61 4A D9 45 F9 BB 7D CC 3F          Primary partition(2)        type: 249(0xF9)(UNKNOWN)        size: 47812mb #s(97919955) s(4081875516-4179795470)        chs:  (993/11/62)-(249/64/22)d (254084/254/55)-(260180/59/54)r        hex:  D4 0B FE E1 F9 40 16 F9 3C 7A 4C F3 D3 23 D6 05          Primary partition(3)        type: 211(0xD3)(UNKNOWN)        size: 711401mb #s(1456950127) s(4249722057-5706672183)        chs:  (671/191/48)-(644/231/52)d (264532/245/43)-(87874/144/6)r        hex:  63 BF B0 9F D3 E7 B4 84 C9 9C 4D FD 6F 4B D7 56          Primary partition(4)        type: 089(0x59)(UNKNOWN)        size: 715318mb #s(1464971513) s(1293543745-2758515257)        chs:  (1003/227/11)-(789/19/55)d (80519/95/26)-(171709/161/30)r        hex:  43 E3 CB EB 59 13 F7 15 41 E9 19 4D F9 B0 51 57


title: Is it possible to record audio directly to a computer's optical drive?

text: There's a question over at audio.SE at the moment and I thought it may attract some answers here. I asked the user and he's happy to have it posted here to see if anyone has some ideas. Here it is verbatim: * * * I'm working with a client who needs to minimize the time between when recording is done and when the finalized audio CD ejects from the drive. All of the computer recording software I'm aware of will generate a file which can then be burned to an Audio CD. I know there is external hardware I could buy that would burn an analog stream directly to disc, but I'm wondering if any software exists that can achieve this with a computer's internal optical drive. Ideally for Mac, though if it only exists for Windows or Linux I would be interested to hear about it. (Other alternatives have been explored; I would much rather not deal with optical media at all, but this is a highly specialized situation.) * * * As to the source: "It would likely be an external USB audio interface." If you need more info let me know.


title: Rip an audio CD 1:1

text: Is there a way to rip an audio CD to an ISO9660 file? I've tried simple things like `dd` in the past and it hasn't worked. I'd like to essentially have a mirror image of exactly what's on the disk, not even necessarily a folder of WAV files. I do understand that I could rip the CD to WAV files or even FLAC files, but is there a way to just duplicate the disc to one file, so I could extract WAVs or FLACs from it later on? The idea is to be able to make a virtually identical copy of the source media.


title: Why doesn't this variable assignment work when using tee?

text: Consider:               $ FILE_NAME=`(cat somefile | head -1)` | tee -a dump.txt     $ echo $FILE_NAME          $         1. Now, why doesn't the output of `(cat somefile | head -1)` reach the standard input of tee ..?    2. If the output reached tee, then it could copy it to dump.txt file and the standard output.    3. Also the variable `$FILE_NAME` does not receive the value.


title: How to reset a shell environment?

text: This issue has been bugging me for a while, and although I've taught I've found my answer through EnvWatcher, unfortunately it only works on Bash. And I use zsh. I would like to replicate the things env-watcher does, to a lesser degree maybe, but I need to know if there is a command by which I could reset a shell to it's clean startup stage. As for example, I'd like to have the following workflow.               source some-functions     alias another-thing     export SVN_EDITOR=vim     RESET-ZSH # none of the above are valid any more      Is there such a built in possibility, or am I chasing butterflies?


title: How exactly do I create a sed script and use it to edit a file?

text: I know how to edit a file using sed one step at a time, but how would I create an actual sed script and then use it on the file to do the same things that the individual sed commands would do? For example these 3 sed commands: > sed -i '4i\ ' baconFile > > sed -i 's/,/\t\t/' baconFile > > sed -i 's/,/ /' baconFile


title: Audio quality issues with mpd

text: I have been using mpd for a long time now and absolutely love it.   However, I recently added a few video files to the mpd database. Now I understand mpd won't play the video files, I don't want it to. But when mpd plays the audio track of the video file, there is a lot of static noise in the output. My other audio files work perfectly with mpd. As do these video files in other players like mplayer and vlc.   This leads me to conclude that the audio track on these videos is not of bad quality. There is something wrong in the way mpd handles them. Can anyone suggest what might be wrong and how I can resolve it?   Yes, I know I could rip the audio tracks out of my video files and play them using mpd, but I would rather fix this issue with mpd than do that. Just a matter of choice.


title: What driver is behind a certain device file?

text: Given a device file, say `/dev/sdb`, is it possible to determine what driver is behind it? Specifically, I want to determine what driver my storage devices are using. `fdisk -l` lists 2 devices: `/dev/sda` and `/dev/sdb`. One is a SATA hard drive and the other is a USB Mass Storage device - actually an SD card. How do I determine, programmatically, which is which? I am writing a piece of software, and I want to protect the beginner from obliterating their hard drives, whilst allowing them to obliterate their SD cards.


title: Grub fails after install it on my macbook pro

text: I'm trying to install Archlinux on my macbook in dual boot mode. I part the disk that way :               /dev/sda1 -> EFI     /dev/sda2 ->MacOS     /dev/sda3 -> /boot     /dev/sda4 -> /     /dev/sda5 -> /home      As i read in the docs i don't install grub on my MBR, i put it in sda3 - the boot partition. I did it with a Ubuntu Live Cd and the command : sudo grub- install --boot-directory=/media/boot_partition /dev/sda3 --force When i reboot my mac i can choose the Linux partition with rEFIT. But it only show the GRUB minimal bash...               grub>      I tried to fix it up, but nothing really works.


title: More Information Regarding Upload Restriction in Squid Server

text: I've used `request_body_max_size 1024 KB` command in my `squid.conf` file and it is working in restricting my upload of files larger than 1 MB when I try to upload through upload sites. But I want to know why I am able to upload larger files to sendspace and wetransfer uploading site? Is there any way to customize uploading in `squid` server 3.1, so that if I want to upload bigger files larger than 1 MB, a screen of username and password will appear and when I enter correct username and password I can upload larger size files?


title: What are the disadvantages of uClibc?

text: I try to speed up my boot sequence, and somebody recommends to use the uClibc instead of Glibc. I've built an image with it, it gets smaller and faster to boot — but at which cost? Does anyone know the disadvantages of using uClibc as the C library?


title: Apache authentication mutiple domain but same subdirectory

text: I've got several sites: example.com, example1.com, and example2.com in my wordpress. All of them point to my server's `/public_html` folder, which is my Apache root folder. What do I need to add to my `.htaccess` file to use http authentication only if the user is coming from `example2.com/public_html`? `example.com/public_html` and `example1.com/public_html` should NOT use authentication.


title: Regarding the server distributions

text: I am confused as to what defines a "server" distribution against a normal, desktop distribution. What I mean is that if you wanted a corporate server, you might be able to pick just about any linux distro and go, however for some reasons to which I appear to be oblivious to, you might want to roll with `SUSE Enterprise, or RED HAT Enterprise`. Why would someone want to choose a specific server distribution? Is it because of the support offered by the companies behind them? Is it that these companies often include proprietary tools in their distros, not normally found in others, to give them an edge? Is it something else? Please help me clarify things in my mind. Thank you in advance.


title: Why is dd running forever on a 8 GB drive

text: I have a filesystem handled by ZFS and it's about 8 GB. I tried to zero out the filesystem by running:               dd if=/dev/zero of=/EMPTY bs=1M | true     rm -f /EMPTY      And normally on an ext4 filesystem, it completes in a few seconds. But this time it just kept going. I was able to launch a second terminal and see what the size of `/EMPTY` was. And after running `ll -h`, it said that `/EMPTY` was 800 GB! Obviously 800 GB does not fit into 8 GB. Furthermore by running `df -h`, it showed that the filesystem wasn't getting filled up. However the dd as consuming 50% of the CPU.. etc, heating up my laptop. I'm assuming it was doing a lot of work but achieving nothing. So why is dd running forever creating a file that doesn't take up any size? On ext4 it's meant to complete and give me an error so I can proceed.


title: Buildroot OpenGL Capable Backend

text: I'm trying to configure QT 5 through buildroot and some options are not available with the message `requires an OpenGL-capable backend`. I'm using buildroot 2013.08-rc1 but the same message comes up with 2013.05. I'm targeting x86_64 core2 platform and I can't find any options to select OpenGL backend (or OpenGL anything actually). How can I enable OpenGL backend in buildroot?


title: Peppermint linux issue on windows 8

text: I'm running an HP 2000 computer that came preinstalled with windows 8. I have peppermint fully set up on a partition, it's installed and ready to go. The only issue is that because of the way windows 8 and safe boot and Uefi are, I have to set up GRUB to act as the boot loader in order to run the Linux OS. I want to know how to do so, in simplest terms possible. I would also like to know if I could cause linux to activate by formatting the Partition that windows 8 is currently on, essentially, if I delete windows 8 then will the fully installed peppermint os on it's partition function? Been trying to figure this out for about a week now, and it's causing more and more hassle.


title: Why can't pgrep find scripts started via env?

text: For example:               $ cat foo.sh     #!/usr/bin/env bash     while true; do sleep 1 ; done     $ ./foo.sh &     $ pgrep foo.sh     $      Contrast with:               $ cat bar.sh     #!/bin/bash     while true; do sleep 1 ; done     $ ./bar.sh &     $ pgrep bar.sh     21202      The process started by `env bash` shows up in the output of `ps aux` as:               terdon 4203  0.0  0.0  26676  6340 pts/3    S    17:23   0:00 /bin/bash      while the one started with `/bin/bash` shows as               terdon  9374  0.0  0.0  12828  1392 pts/3    S    17:27   0:00 /bin/bash ./bar.sh      which probably explains why it the first is not being caught by `pgrep`. So, questions are:   * Why does the name of the script not show up when called through `env`?   * Does `pgrep` simply parse the output of `ps`?   * Is there any way around this so that `pgrep` can show me scripts started via `env`?


title: change shell in Solaris/SunOS for your user only wihtout access to /etc/passwd

text: How do I set the shell in Solaris/SunOS for my user only, without access to `/etc/passwd` or any other `su` stuff? It should thereafter work both for interactive `ssh` (1) and `ssh` when you send commands (2). `uname -a` says `SunOS ... 5.10 Generic_148889-04 i86pc i386 i86pc` **Edit in response to comments and answers** There is no `chsh`. I can't do `/usr/bin/passwd -e` - permission denied. The default shell is bash. I would like zsh. I already tried to set the `SHELL` environment variable manually, and start the shell manually in the `.profile` file, only this doesn't work for my **second case** (2): `ssh user@host command` will run `command` in bash. As compared to getting my preferred shell when I login, it is minor, so the workaround is certainly worth mentioning, only, my intention with this question was to get it right the right way. Because it just relates to one user, I thought it was doable without involving the SA, but now I'm less certain. (But any workaround that solves (1) and (2) is cool, for sure.)


title: Replacing Mac OSX with Linux Distro, or FreeBSD

text: I have a Macbook Pro 8,2 and really want to make the switch to something a little less stubborn and a little more flexible than the proprietary Mac OS X. I am a bit frustrated with MacPorts lately and Homebrew. I also would like to make the transition to a tiling window manager such as Awesome, RatPoison, or Xmonad. In the past I have had problems getting the Mac's wireless card working as well as setting up the EFI installer to boot to GRUB or LILO. So, I am curious if anyone here has had any experiences with running a Linux Distro like Slackware, Archlinux, Debian or a Unix OS such as FreeBSD on their MacBook Pro.


title: Port forwarding with ssh where the final destination does not have sshd running

text: I know how to use ssh to port forward a local port say like 7000 to a remote ssh server on port 50070. For example:               ssh -L 7000:127.0.01:50070 root@sshserver      "Me port 7000" - > "ssherver port 50070" But now say I have my "sshserver" at the office and I want to port forward my local port via the "sshserver" to the windows machine that has terminal services running on port 3389. To clarify the windows machine does not have sshd running. "Me port 7000" - > "sshserver" - > "windows machine port 3389" Is this possible with ssh?


title: smartd custom logfile on systemd + journald based system

text: An excerpt from smartd manpage reads: > **`-l FACILITY, --logfacility=FACILITY`**   >  `Uses syslog facility FACILITY to log the messages from smartd. Here > FACILITY is one of local0, local1, ..., local7, or daemon [default]. If this > command-line option is not used, then by default messages from smartd are > logged to the facility daemon.` Followed by steps how to accomplish this on a **syslog** based system. Apparently, if Arch Linux is up-to-date, it runs `journald` in conjunction with `systemd` for the same purpose. For the latter, I cannot find a way to configure facilities or whatnot. How to give `smartd` a logfile of it's own in a `journald` environment? * * * Mirrored from Arch Linux forums.


title: awk function with a number parameter for the column you want to print

text: I want to use my awk shortcut as a function, so that I can pass the column number which then prints me the output. My aliases are:               alias A="| awk '{print \$1}'     alias G="| grep -i'      Instad of typing:               ps -ef | grep mysql | awk 'print $2'      I want to be able to type this:               ps -ef G mysql A 2      Any suggestions? Thank you!


title: Firefox ignores settings in userContent.css (sometimes)

text: I have following code in my `$HOME/.mozilla/firefox/XXXXXXXX.default/chrome/userContent.css`:               input, textarea {     color:#000  !important;     background-color: rgb(255, 255, 255) !important;     }      The purpose is to have input fields and text areas always black on white color. My desktop theme is dark and without this hack, firefox would display input and text area black text on dark gray backround, which is pretty much unreadable. This works well for most websites, but some websites are still displayed as before (black text on gray background). For example this website. I have installed `dom inspector` and verified that the element is of type `input`. But why then are my css settings ignored for this site? # SUBQUESTION: Is there some documentation/manual, where these configuration options are explained? i.e. how do I know the keyword is `background-color` and not `background`? Also, what else can I configure other than `input` and `textarea` ?


title: WiFi not working in Backtrack 5r3 Acer Aspire V3-571 Laptop having “Broadcom Corporation NetLink BCM57785 Gigabit Ether” integrated wireless card

text: I have installed backtrack 5r3 in one hard disk partition alongside with windows7 in another partition in Acer Aspire V3-571 laptop having "Broadcom Corporation NetLink BCM57785 Gigabit Ether" integrated wireless card. My problem is I could not make WiFi working in my laptop even after trying a lot of command and methods found by googling. I downloaded tg3 driver from broadcom website and hopefully installed it but all in vain. In some forum I found that some guys having the same issue with Broadcom 43XXX seriers wireless card had fixed their issue by using some sta driver package by broadcom specific for 43XXX series, but I noticed I have 57XXX series wireless card not the same. I could not find any working solution for BCM57785 wireless card. Here's what I did......               root@bt:~# cd /lib/firmware     root@bt:/lib/firmware# unzip linux-3.133d.zip     Archive:  linux-3.133d.zip     creating: Server/Linux/Driver/     inflating: Server/Linux/Driver/ChangeLog       inflating: Server/Linux/Driver/README.TXT       inflating: Server/Linux/Driver/tg3-3.133d-1.src.rpm       inflating: Server/Linux/Driver/tg3-3.133d.tar.gz       inflating: Server/Linux/Driver/tg3_sup-3.133d-1.ISO.tar.gz       root@bt:/lib/firmware#           root@bt:/lib/firmware# rpm -ivh tg3-3.133d.src.rpm     The program 'rpm' is currently not installed.  You can install it by typing:     apt-get install rpm          root@bt:/lib/firmware/Server/Linux/Driver# apt-get install rpm     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages were automatically installed and are no longer required:     libecryptfs0 libdmraid1.0.0.rc16 libdebconfclient0 ecryptfs-utils cryptsetup     rdate bogl-bterm libdebian-installer4 reiserfsprogs dmraid python-pyicu     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:     librpmbuild0 rpm2cpio     Suggested packages:     alien elfutils rpm-i18n     The following NEW packages will be installed:     librpmbuild0 rpm rpm2cpio     0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.     Need to get 2,164kB of archives.     After this operation, 2,818kB of additional disk space will be used.     Do you want to continue [Y/n]? y     Get:1 ................ revolution/main librpmbuild0 4.7.2-1lbuild1 [716kB]     Get:2............ revolution/main rpm2cpio 4.7.2-1lbuild1 [651kB]     Get:3 .................. revolution/main rpm 4.7.2-1lbuild1 [797kB]     Fetched 2,164kB in 27s (77.4kB/s)                                                   Preconfiguring packages ...     Selecting previously deselected package librpmbuild0.     (Reading database ... 264111 files and directories currently installed.)     Unpacking librpmbuild0 (from .../librpmbuild0_4.7.2-1lbuild1_amd64.deb) ...     Selecting previously deselected package rpm2cpio.     Unpacking rpm2cpio (from .../rpm2cpio_4.7.2-1lbuild1_amd64.deb) ...     Selecting previously deselected package rpm.     Unpacking rpm (from .../rpm_4.7.2-1lbuild1_amd64.deb) ...     Processing triggers for man-db ...     Setting up librpmbuild0 (4.7.2-1lbuild1) ...          Setting up rpm2cpio (4.7.2-1lbuild1) ...     Setting up rpm (4.7.2-1lbuild1) ...     Trying rpm init...          Processing triggers for libc-bin ...     ldconfig deferred processing now taking place     root@bt:/lib/firmware/Server/Linux/Driver# rpm -ivh tg3-3.133d.src.rpm     rpm: please use alien to install rpm packages on Debian, if you are really sure use --                force-debian switch. See README.Debian for more details.     root@bt:/lib/firmware/Server/Linux/Driver# rpm -ivh tg3-3.133d.src.rpm --force-debian     error: open of tg3-3.133d.src.rpm failed: No such file or directory     root@bt:/lib/firmware/Server/Linux/Driver# rpm -ivh tg3-3.133d.src.rpm     rpm: please use alien to install rpm packages on Debian, if you are really sure use --   force-debian switch. See README.Debian for more details.     root@bt:/lib/firmware/Server/Linux/Driver# cd     root@bt:~# apt-get update     Fetched 7,978kB in 1min 54s (69.6kB/s)                                              Reading package lists... Done     root@bt:~# apt-get install alien     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages were automatically installed and are no longer required:     libecryptfs0 libdmraid1.0.0.rc16 libdebconfclient0 ecryptfs-utils cryptsetup     rdate bogl-bterm libdebian-installer4 reiserfsprogs dmraid python-pyicu     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:     debhelper html2text     Suggested packages:     lsb-rpm lintian dh-make     The following NEW packages will be installed:     alien debhelper html2text     0 upgraded, 3 newly installed, 0 to remove and 35 not upgraded.     Need to get 650kB of archives.     After this operation, 1,991kB of additional disk space will be used.     Do you want to continue [Y/n]? y     Get:1 .................. revolution/main html2text 1.3.2a-14build1 [104kB]     Get:2 ..................... revolution/main debhelper 7.4.15ubuntu1 [461kB]     Get:3 ....................... revolution/main alien 8.79ubuntu0.1 [85.4kB]     Fetched 650kB in 11s (55.7kB/s)                                                     Selecting previously deselected package html2text.     (Reading database ... 264205 files and directories currently installed.)     Unpacking html2text (from .../html2text_1.3.2a-14build1_amd64.deb) ...     Selecting previously deselected package debhelper.     Unpacking debhelper (from .../debhelper_7.4.15ubuntu1_all.deb) ...     Selecting previously deselected package alien.     Unpacking alien (from .../alien_8.79ubuntu0.1_all.deb) ...     Processing triggers for man-db ...     Setting up html2text (1.3.2a-14build1) ...          Setting up debhelper (7.4.15ubuntu1) ...     Setting up alien (8.79ubuntu0.1) ...     root@bt:~# alien -k tg3-3.133d-1.src.rpm     File "tg3-3.133d-1.src.rpm" not found.     root@bt:~# cd /lib/firmware/Server/Linux/Driver     root@bt:/lib/firmware/Server/Linux/Driver# alien -k tg3-3.133d-1.src.rpm     error: incorrect format: unknown tag     tg3_3.133d-1_amd64.deb generated     root@bt:/lib/firmware/Server/Linux/Driver# alien -k tg3-3.133d-1.src.rpm     error: incorrect format: unknown tag     tg3_3.133d-1_amd64.deb generated     root@bt:/lib/firmware/Server/Linux/Driver# dpkg tg3-3.133d-1.src.deb     dpkg: need an action option          Type dpkg --help for help about installing and deinstalling packages [*];     Use `dselect' or `aptitude' for user-friendly package management;     Type dpkg -Dhelp for a list of dpkg debug flag values;     Type dpkg --force-help for a list of forcing options;     Type dpkg-deb --help for help about manipulating *.deb files;     Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].          Options marked [*] produce a lot of output - pipe it through `less' or `more' !     root@bt:/lib/firmware/Server/Linux/Driver# dpkg -i tg3-3.133d-1.src.deb     dpkg: error processing tg3-3.133d-1.src.deb (--install):     cannot access archive: No such file or directory     Errors were encountered while processing:     tg3-3.133d-1.src.deb     root@bt:/lib/firmware/Server/Linux/Driver# dpkg -i tg3_3.133d-1_amd64.deb     Selecting previously deselected package tg3.     (Reading database ... 264518 files and directories currently installed.)     Unpacking tg3 (from tg3_3.133d-1_amd64.deb) ...     Setting up tg3 (3.133d-1) ...     root@bt:~# cd /lib/firmware/Server/Linux/Driver     root@bt:/lib/firmware/Server/Linux/Driver# tar xvzf tg3-3.133d.tar.gz     tg3-3.133d/     tg3-3.133d/tg3.h     tg3-3.133d/tg3_vmware.h     tg3-3.133d/README.TXT     tg3-3.133d/ChangeLog     tg3-3.133d/tg3_vmware.c     tg3-3.133d/tg3_compat2.h     tg3-3.133d/tg3_compat.h     tg3-3.133d/tg3.c     tg3-3.133d/LICENSE     tg3-3.133d/makeflags.sh     tg3-3.133d/tg3_firmware.h     tg3-3.133d/tg3.4     tg3-3.133d/esx_ioctl.h     tg3-3.133d/Makefile          root@bt:/lib/modules/3.2.6/kernel/drivers/net# insmod tg3.ko     insmod: error inserting 'tg3.ko': -1 File exists     root@bt:/lib/modules/3.2.6/kernel/drivers/net# modprobe tg3     root@bt:/lib/modules/3.2.6/kernel/drivers/net# cd     root@bt:~# cd /lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# insmod tg3.koinsmod:    error inserting 'tg3.ko': -1 File exists     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# modprobe tg3     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# cd src     bash: cd: src: No such file or directory     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# make     make: *** No targets specified and no makefile found.  Stop.     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# make KVER=3.2.6     make: *** No targets specified and no makefile found.  Stop.     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# insmod tg3     insmod: can't read 'tg3': No such file or directory     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# make install     make: *** No rule to make target `install'.  Stop.     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# ethtool eth0     Settings for eth0:     Supported ports: [ TP ]     Supported link modes:   10baseT/Half 10baseT/Full                              100baseT/Half 100baseT/Full                              1000baseT/Half 1000baseT/Full      Supports auto-negotiation: Yes     Advertised link modes:  10baseT/Half 10baseT/Full                              100baseT/Half 100baseT/Full                              1000baseT/Half 1000baseT/Full      Advertised pause frame use: Symmetric     Advertised auto-negotiation: Yes     Link partner advertised link modes:  Not reported     Link partner advertised pause frame use: No     Link partner advertised auto-negotiation: No     Speed: Unknown!     Duplex: Unknown! (255)     Port: Twisted Pair     PHYAD: 1     Transceiver: internal     Auto-negotiation: on     MDI-X: Unknown     Supports Wake-on: g     Wake-on: g     Current message level: 0x000000ff (255)     Link detected: no     root@bt:/lib64/modules/3.2.6/kernel/drivers/net/ethernet/broadcom# cd     root@bt:~# ethtool eth0     Settings for eth0:     Supported ports: [ TP ]     Supported link modes:   10baseT/Half 10baseT/Full                              100baseT/Half 100baseT/Full                              1000baseT/Half 1000baseT/Full      Supports auto-negotiation: Yes     Advertised link modes:  10baseT/Half 10baseT/Full                              100baseT/Half 100baseT/Full                              1000baseT/Half 1000baseT/Full      Advertised pause frame use: Symmetric     Advertised auto-negotiation: Yes     Link partner advertised link modes:  Not reported     Link partner advertised pause frame use: No     Link partner advertised auto-negotiation: No     Speed: Unknown!     Duplex: Unknown! (255)     Port: Twisted Pair     PHYAD: 1     Transceiver: internal     Auto-negotiation: on     MDI-X: Unknown     Supports Wake-on: g     Wake-on: g     Current message level: 0x000000ff (255)     Link detected: no     root@bt:~# iwconfig     lo        no wireless extensions.          eth0      no wireless extensions.          root@bt:~#                root@bt:~# iwconfig     ppp0      no wireless extensions.          lo        no wireless extensions.          eth0      no wireless extensions.          root@bt:~# ifconfig     eth0      Link encap:Ethernet  HWaddr b8:88:e3:0a:0f:67             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)           Interrupt:16                 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:16436  Metric:1           RX packets:55 errors:0 dropped:0 overruns:0 frame:0           TX packets:55 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:9829 (9.8 KB)  TX bytes:9829 (9.8 KB)                 ppp0      Link encap:Point-to-Point Protocol             inet addr:101.218.175.244  P-t-P:10.64.64.64  Mask:255.255.255.255           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1           RX packets:3531 errors:0 dropped:0 overruns:0 frame:0           TX packets:3855 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:3            RX bytes:3296893 (3.2 MB)  TX bytes:390972 (390.9 KB)          root@bt:~# lspci     00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM     Controller (rev 09)     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor     Family Integrated Graphics Controller (rev 09)     00:14.0 USB Controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04)     00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)     00:1a.0 USB Controller: Intel Corporation Panther Point USB Enhanced Host Controller #2  (rev 04)     00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)     00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)     00:1c.1 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 2 (rev c4)     00:1d.0 USB Controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)     00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)     00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA AHCI Controller (rev 04)     00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)     02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet   PCIe (rev 10)     02:00.1 SD Host controller: Broadcom Corporation NetXtreme BCM57765 Memory Card Reader (rev 10)     02:00.2 System peripheral: Broadcom Corporation Device 16be (rev 10)     02:00.3 System peripheral: Broadcom Corporation Device 16bf (rev 10)     03:00.0 Network controller: Broadcom Corporation BCM43228 802.11a/b/g/n     root@bt:~# airmon-ng               Interface   Chipset     Driver               root@bt:~# cd /lib64/modules/3.2.6/kernel/drivers/net     root@bt:/lib64/modules/3.2.6/kernel/drivers/net# insmod tg3.ko     insmod: error inserting 'tg3.ko': -1 File exists          root@bt:/lib64/modules/3.2.6/kernel/drivers/net# modprobe tg3     root@bt:/lib64/modules/3.2.6/kernel/drivers/net#      root@bt:/lib64/modules/3.2.6/kernel/drivers/net# lsmod | grep tg3.ko     root@bt:/lib64/modules/3.2.6/kernel/drivers/net# lsmod | grep tg3     tg3                   147905  0      root@bt:/lib64/modules/3.2.6/kernel/drivers/net# sudo modprobe wl     FATAL: Module wl not found.     root@bt:/lib64/modules/3.2.6/kernel/drivers/net# sudo modprobe wl     FATAL: Module wl not found.     root@bt:/lib64/modules/3.2.6/kernel/drivers/net# sudo modprobe tg3     root@bt:/lib64/modules/3.2.6/kernel/drivers/net#


title: Is it safe to resize partition on /?

text: I currently have a 600gb disk, with Ubuntu installed, 600gb of which is given to the Ubuntu OS:               Filesystem      Size  Used Avail Use% Mounted on     /dev/sda1       592G   16G  547G   3% /     udev            1.9G  4.0K  1.9G   1% /dev     tmpfs           777M  944K  776M   1% /run     none            5.0M     0  5.0M   0% /run/lock     none            1.9G  3.8M  1.9G   1% /run/shm      Is it safe to unmount /dev/sda1 to shrink it to say, 300gb will I simply be able to remount it afterwards, or is it going to break everything and just die? Using Gparted?   If not then, how does it work in Windows Disk Manager, there I am able to resize mounted disks?


title: Migrate an entire volume group LVM2 to RAID5

text: I have a Virtual Host server build with Ubuntu and Xen ## SO   * Ubuntu 12.04.1 LTS 64Bits   * xen-hypervisor-4.1 ## Disk   * Hitachi SAS 15K 147GB (x2) in a Volume group   * sda1 1GB /boot    * sda2 146GB lvm   * sdb1 147GB lvm Every virtual machine has minimum two LV (root, swap) I have available three new disks Hitachi SAS 15K 600GB I want to create a RAID5 with this disk and migrate all partitions from the VG. Is this is possible and how? I know how to create a simple RAID with Simple RAID setup with mdadm but I want have the flexibility of the VG on my RAID. Is this is possible and how? My need is to have the flexibility of VG but RAID redundancy as you can guess I'm rookie in RAID topic.


title: What does this dd command do exactly?

text: I have the an embedded device with this SD card:               [root@(none) ~]# busybox fdisk -l     Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes     4 heads, 16 sectors/track, 121008 cylinders     Units = cylinders of 64 * 512 = 32768 bytes                  Device Boot      Start         End      Blocks  Id System     /dev/mmcblk0p1             305        8497      262144+ 83 Linux     /dev/mmcblk0p2            8497       16689      262144+ 83 Linux     /dev/mmcblk0p3           16689       60352     1397247   b Win95 FAT32      and these partitions:               [root@(none) ~]# df     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/root               253871    140291    113580  55% /     none                     16384         4     16380   0% /tmp     none                    127016         4    127012   0% /dev     none                        16         4        12  25% /var/lib     none                        16         0        16   0% /var/log     none                       128        16       112  13% /var/run     /dev/mmcblk0p3         1394520    118036   1276484   8% /mnt/onboard      I have an u-boot kernel image file, uImage, of ~2 Mb. What happens exactly if I do               dd if=uImage of=/dev/mmcblk0 bs=512 seek=2048      ? Why am I asking this? This command is strange for me because:   1. ~~the copied image is smalled than target partition~~   2. ~~it seems that the image is extracted on /dev/mmcblk0p1, that is the root partition. It starts at 305, while dd skips 2048 blocks~~ EDIT: see Anthon's answer   3. there's not a boot partition   4. uImage is extracted; on the contrary I expected it will be used by u-boot as-is Background: the device is a Kobo Glo, and the command is executed by update scripts to update the kernel.


title: Does the Linux PreemptRT patch benefit desktop users?

text: Does the PREEMPT_RT patch (real-time kernel) have any benefit for regular desktop users?


title: How to start a service automatically, when Ubuntu starts?

text: I am using Ubuntu 12.04 and want to have a service starting, when the system is booted normally. As 'service' I understand some code, for example cd my_directory; my_command -host 0.0.0.0 -port 1234 -arg x that just should be running as if it has been started on the command line. There are services to be started as normal user, but also services to be started as root (in fact, it is not required the services to be run on user level). I also require to configure the behavior when a 'service' stops. I want them to be restarted in my case, with the same argument, in a specified directory. All of the services should be started automatically when the system is started normally, i.e. if the power switch is pressed. No other action should be required. There are some documents spread on the internet, but they all confuse me. They talk about `init`, `init.d`, `rc.d`, but I never saw a simple-to-follow step- by-step instruction to easily as a service using e.g. upstart. If this is easy, I would appreciate if those steps are given here.


title: Running Open Vas via KALI Linux

text: We would like to run open-vas penentration test on a remote server and would no like to install it on the remote machine. Thus we have setup a Kali Linux Live machine for this purpose. So we first went into open-vas setup and towards the end we capture as below.               sent 1953267 bytes  received 3317820 bytes  71715.47 bytes/sec     total size is 159182950  speedup is 30.20     [i] Checking dir: ok     [i] Checking MD5 checksum: ok     Stopping OpenVAS Manager: openvasmd.     Stopping OpenVAS Scanner: openvassd.     All plugins loaded                                        Starting OpenVAS Scanner:      openvassd.     Starting OpenVAS Manager: openvasmd.     Restarting OpenVAS Administrator: openvasad.     Restarting Greenbone Security Assistant: gsad.     Enter password:      ad   main:MESSAGE:30553:2002-01-01 00h34.24 UTC: No rules file provided, the new user will have no restrictions.     ad   main:MESSAGE:30553:2002-01-01 00h34.24 UTC: User admin has been successfully created.      Next went to setup openvas-gsd I try to login but then I read at the site it says this "Note: that the scan engine must have OMP support enabled for the given port for a successful connection? What should I do here?


title: Is it possible to create a "file" that can be used by any process without actually saving the file on disk?

text: Suppose I do a `grep` that gives me a lot of results. I want to use the output of grep and pass it to a command that takes a filename as it's first argument. For example -               myCommand filename.txt      I would like to do something like this -               grep "xyz" | myCommand      However, since myCommand doesn't read from stdin, this piping does not work. I don't want to create a temporary file on disk with the results of grep. Is it possible by any other means to create a "file", say in memory and let `myCommand` use that?


title: File uploads successfully however it is 0 bytes

text: I have an interesting problem where I have the ability to upload files, change permissions, download files using FTP on Cent OS. However, the interesting and annoying part is that the files are completely blank (0 bytes) when they get uploaded. What might be the trouble here? Here is the log from the client (FileZilla):               Status: Starting upload of C:\gettweetmodel_dev.php     Status: Retrieving directory listing...     Command:    TYPE I     Response:   200 Switching to Binary mode.     Command:    PASV     Response:   227 Entering Passive Mode.     Command:    LIST -a     Response:   150 Here comes the directory listing.     Response:   226 Directory send OK.     Command:    TYPE A     Response:   200 Switching to ASCII mode.     Command:    PASV     Response:   227 Entering Passive Mode     Command:    STOR gettweetmodel_dev.php     Response:   150 Ok to send data.     Response:   451 Failure writing to local file.


title: why do I have two different results if I run a program through terminal(as root) or /etc/init.d(or /etc/rc.local)

text: **Background:** I use Debian Lenny on an embedded device               uname -a     Linux device 3.4.0 #83 Sun May 26 17:07:14 CEST 2013 armv4l GNU/Linux      I have a C code (say `my_C_program`) that calls a board specific binary file (via `system("spictl someparameters")` ) called `spictl` to use SPI interface               user:~# ls -al /usr/local/bin/spictl     lrwxrwxrwx  1 root staff      24 Jun  9  2011 spiflashctl -> /initrd/sbin/spiflashctl      if I run my code (`my_C_program`) from the command line               user:~# /user/sbin/my_C_program      the `spictl` is executed without problem and outputs data from the SPI interface. **Problem:** I need the program to be run when the board is powered. Therefore, I add `/user/sbin/my_C_program` line before the `exit 0` at`/etc/rc.local`. When the board is powered, the my_C_program is executed and `spictl` is executed but the SPI interface does not output any data. I tried to run the program via `/etc/init.d/` script on this link. The script works fine and it executes the `my_C_program`, the program executes the `spictl` successfully (as `system()` return value says), but the SPI interface does not output any data!               ls -l /usr/sbin/my_C_program     -rwxrwxrwx 1 root root 61713 Jun 28  2013 /usr/sbin/my_C_program      `top` shows that the program is run as root                 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                1095 root      20   0  2524 1140  924 R  4.2  1.8   0:00.35 top                                                                                1033 root      RT   0 35092  34m 1852 S  3.0 56.5   0:14.06 node       **Question** if I execute the `my_C_program` on terminal, the program calls the `spictl` (via `system(spictl someparameters)`) and it is executed without any problem. But if I run `my_C_program` through `/etc/rc.local` or `/etc/init.d` script, then `spictl` does not work as it supposed to be. I suspect that it has something to do with the root privilege. When I execute the program on the terminal (as root) all works fine. But I guess `/etc/rc.local` and `/etc/init.d` somehow runs the program with a lower privilege. I could not really solve the difference between executing a command from the terminal as root or executing the program via `/etc/rc.local` or `/etc/init.d/` script. If you also think that it is a privilege problem, could you please explain how can I ensure that init.d script or rc.local would run the program with the highest privilege. Or what could be the issue? Please note that the problem/question is not SPI related. P.S. in order not to have unnecessary conversation like "oh Debian lenny is too old, you should use wheezy etc.", the board has armv4l processor and as the producer says it does not support wheezy because of some processor instructions.


title: Benefit of kernel module compiled inside kernel?

text: What's the benefit of compiling kernel modules into the kernel (instead of as loadable modules)?


title: Kernel memory allocator patch

text: Is there any patch for Linux kernel to use different memory allocators, such as ned allocator or TLSF allocator?


title: dash compatibility to bash

text: Wikipedia says that `dash` executes faster than `bash`. My question is, if I set `/bin/sh` to `dash`, will all scripts that use `/bin/sh` in their shebang line that was intended for `bash` work under `dash`?


title: Bash Script : Passing a variable to a bash script that contains quotes, single quotes. etc

text: lets assume this is the string:                  'a',"b"      it contains both single and double quotes. how would you pass this to a bash script as a single string ? this is the bash script:               #!/bin/bash     echo $1      it must echo               'a',"b"      but we can not assume the string is this tiny. ultimately i plan on sending the whole                /etc/httpd/conf/httpd.conf      as a string to this bash script. so i can not really escape quotes and single quotes one at a time.


title: How can I search filenames which are starting with xy_* and are created/edited today?

text: Hello I´m currently trying to search for logfiles which are starting with xy_Number and are created/edited today(not last 24 hrs). I tried:               find /home/USER/logfilesError/ -maxdepth 1 -type f -daystart -mtime -1 print0 | xargs -0 grep - l xy_*      Output:               find: paths must precede expression: print0      I need to combine:               find -maxdepth 1 -type f -daystart -mtime -1      and               ls | grep -E "xy_"      What I want to achieve is: Search logfiles from a specific location which today's date and then go a step further and search those files and output the ones which have lines starting with ERROR. (other lines INFO and DEBUG) * * * So the search works fine and I want to go further with checking the files after the search with a grep to find the files containing ERROR               grep -rl "ERROR" /home/USER/logfilesError/      How do I combine those in a script? With If? Can someone help me with this?


title: How to set the tab name to an alias hostname of the remote host I'm connected to?

text: As you might know, by default, the hostname of an AWS instance is something like `ip-12-34-56-78.us-west-2.compute.internal`, so when I ssh to this host, the tab name is changed to `root@ip-12-34-56-78` (a bit of difficult for me to identify which is which). Since I have the following in the `~/.ssh/config`:               Host mail.domain.com         Hostname 1.2.3.4         User root          Host web.domain.com         Hostname 5.6.7.8         User root      I'm wondering that is there any way to change the tab name to the "alias" hostname of the remote host I'm connected to (instead of the "real" hostname): ![iTerm tab title when ssh](http://i.stack.imgur.com/DfWwp.png) * * * My current `PS1` settings:               PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '      I have tried to add a ssh wrapper into `~/.bashrc`:               ssh() {         echo -ne "\033]0;${@: -1}\007"         exec ssh $@     }      then `. ~/.bashrc` and test by running `ssh web.domain.com`:   * while **connecting** : the tab name is changed to `web.domain.com`, as expected   * when **connected** : it is overwritten with `root@ip-5-6-7-8` Why? Is there something related to `PS1` here? * * * **UPDATE Fri Jun 6 21:58:04 ICT 2014** There is something quite strange going on: looks like this only happened with AWS instance. With other hosts, the tab name remain after logging in. `PS1` on the AWS instance:               # echo $PS1     [\u@\h \W]\$      `PS1` on the other hosts:               ~ echo $PS1     \[\]\[\][\[\]\t\[\]] \u\[\]@\[\]\h\[\]\[\]:\[\]\w\[\] \[\]      I also have tried to set the `PS1` variable on the AWS to the value of working host but it didn't help.


title: My Red Hat 6.4 goes once more in sleep after wake up

text: When I wake up my Red Hat 6.4 desktop it goes into sleep mode once again and when I restart my machine it never restarts again, after a shutdown just the LED lights are on so in this case I have to down the power and once again have to restart my PC. And one more when I shutdown or restart network configuration from `/etc/resolv.conf` clean out and I have to make entry in this file after every shutdown.


title: Copy file permissions from user to group

text: I have a folder with some files, which each have different permissions. Some are read-only, some are read/write, some are read/execute. How can I copy the permissions from user to group, so that for example a file marked read-write for user will be set to read-write for group, but a file read-executable for a user will be set read-executable for the group. Can this be done with a single command?


title: Address types used in Linux

text: I am trying to understand the Memory address types used by the Linux kernel, which are   * User virtual address   * Physical address   * Bus address   * Kernel logical address   * Kernel virtual address I understood the following:   **User virtual address:** User sees an address, which might not be in RAM, it might be a swap address.   **Physical address:** Every memory address, in some form, has to represent the physical address. Physical address is in direct form.   Similarly: Kernel Logical address and Kernel virtual address. I cant understand the Bus address and its requirement. If its quite naive to explain, materials to refer can be useful.


title: How to find duplicate files with identical content and identical or different names

text: I have several directories containing a few hundred files in each. Each directory contains files that are duplicated (i.e. have the same content) within the same directory, and/or are duplicated in one or more other directories, and the duplicates may or may not have the same names. For example, `dir_A/file_6` might be identical to `dir_A/file_85` as might `dir_B/file_6` and `dir_B/file_30`. How could I determine which files are duplicates, so that I can delete all the duplicates and be left with only one of each file? Is using a checksum the only method? How could I automate this? I'm using a Linux desktop.


title: How to remove files which do not end with ".c"?

text: I have a directory which contains all the C programs. I have also compiled them at the creation time so as to check my code. There are a lot of programs nearly 100 of them. So I want a BASH script that would check whether the file ends with ".c". If it does then it does not do anything, which if it doesn't then it would remove them. Suppose one of my file name is "Hello.c" then I have named its binary during compile time as "Hello". So can anyone make this script for me?


title: CentOS 5.6 live time feature without repeatedly executing date command

text: I am using CentOS 5.6, is there a way to view a "live" time, without constantly executing the `date` command? Constantly excuting the `date` command can be quite frustrating and repetitive when checking the time for running cron jobs.


title: fprintd-enroll works with right-index finger only

text: When I try any other finger with:               %> fprintd-enroll left-index-finger     Using device /net/reactivated/Fprint/Device/0     failed to claim device: Not Authorized: net.reactivated.fprint.device.setusername      It doesn't work for me; But if I don't specify finger (which uses right-index by default):               %> fprintd-enroll      Using device /net/reactivated/Fprint/Device/0     Enrolling right index finger.      It works Running on Arch Linux , and packages installed from aur:               fprintd 0.4.1-4     libfprint 0.4.0-3      **UPDATE**               %> fprintd-enroll -f left-index-finger     Using device /net/reactivated/Fprint/Device/0     Enrolling right index finger.


title: Taking complete backup of System and then restoring?

text: I am using kubuntu 10.04 and now I want to install Mac on my PC. I have my data scattered in over 200 Gb and I want take a backup such that with one command all my data is saved into a single file. Then if my MAC installation fails then just format my hard drive and restore the system in its original form. I know about "dd" but I am skeptic about it . Is it possible?


title: Why do all my DNS queries resolve to 192.168.1.251?

text: All my queries on one machine on my network have suddenly started to resolve to 192.168.1.251. This machine was used as the DNS server by other machines, so I noticed it as soon as it started happening and have switched all other machines to use 8.8.8.8 directly, which works. The machines are all on a 192.168.0.x IP. It does run dnsmasq, which I've restarted to no effect and so stopped, again, no difference. /etc/resolv.conf did have entries for 127.0.0.1 and the router's IP, I've changed it to just contain one for 8.8.8.8 and there's nothing in /etc/hosts for a 192.168.1.251 IP. Any ideas would be appreciated!               $ dig google.co.uk @8.8.8.8          ; <<>> DiG 9.7.0-P1 <<>> google.co.uk @8.8.8.8     ;; global options: +cmd     ;; Got answer:     ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49227     ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0          ;; QUESTION SECTION:     ;google.co.uk.          IN  A          ;; ANSWER SECTION:     google.co.uk.       0   IN  A   192.168.1.251          ;; Query time: 0 msec     ;; SERVER: 8.8.8.8#53(8.8.8.8)     ;; WHEN: Thu Jan  6 20:22:03 2011     ;; MSG SIZE  rcvd: 46               $ uname -a     Linux america 2.6.32-27-generic #49-Ubuntu SMP Wed Dec 1 23:52:12 UTC 2010 i686 GNU/Linux      Edit: This seemed to start working without any sign of any changes having effected the behaviour. I'm still none the wiser, but including the files below for completeness (and in case it comes back!)               $ cat /etc/hosts     127.0.0.1   localhost     127.0.0.1   america          192.168.0.1 england     192.168.0.2 america     192.168.0.3 germany     192.168.0.4 france     192.168.0.5 sweden          # The following lines are desirable for IPv6 capable hosts     ::1     localhost ip6-localhost ip6-loopback     fe00::0 ip6-localnet     ff00::0 ip6-mcastprefix     ff02::1 ip6-allnodes     ff02::2 ip6-allrouters     ff02::3 ip6-allhosts          $ cat /etc/resolv.conf      # Generated by NetworkManager     #nameserver 127.0.0.1     nameserver 8.8.8.8     #nameserver 4.2.2.2          $ 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 mdns4_minimal [NOTFOUND=return] dns mdns4     networks:       files          protocols:      db files     services:       db files     ethers:         db files     rpc:            db files          netgroup:       nis          $ sudo iptables -L     Chain INPUT (policy ACCEPT)     target     prot opt source               destination                   Chain FORWARD (policy ACCEPT)     target     prot opt source               destination                   Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination


title: Graphical boot-up screen lost after upgrading the kernel

text: I used the Ubuntu 10.10 alternate install CD to install Maverick to an encrypted partition on a USB stick. This worked perfectly, but after the first cycle of updates that took the kernel from 2.6.35-22 to 2.6.35-24 I no longer get the graphical boot screen that asks for my passphrase. Instead I get a similar looking one that uses ASCII art. If I select the older 22 kernel from the bootloader, I still get the nice graphical screen. What do I need to do to get the nicer boot-up interface with the newer 24 kernel? Thanks, PaulH


title: FTP client with a good GUI?

text: I love linux because I get control over my system. But I do herald from the school of mac, where things are simple, beautiful, and powerful. I like it that way, as opposed to having lots of knobs and levers and everything. **Does anyone know of a strong FTP client for linux that is in the vein of Panic's Transmit?** It's my choice FTP software in Mac OS, but I doubt I need to convince anyone here that I don't want to DEVELOP web apps in OS X. It's a pain, imo. Currently I use Filezilla. It works fine. But it's UI is a mess, imho.


title: How do you make RPROMPT in zsh update itself on every enter?

text: My `RPROMPT` is set to display svn info using `vcs_info`. It reads `RPROMPT=${vcs_info_msg_0_}`. `vcs_info` is called using `precmd()`. However, RPROMPT doesn't update when I change directories. It works only if I invoke the prompt again (either by source ~/.zshrc or prompt ) and doesn't change upon chdir, unless I invoke the prompt again. Is there any way to change this behaviour?


title: Packaging MATLAB

text: I have decided to try and package MATLAB for Arch Linux. The MATLAB program consists of a core program and a number of add on toolboxes. I would like to create a different independent package for each "toolbox" (or potentially subsets of toolboxes). The heart of my Arch PKGBUILD is               ./install -t -inputFile installer_input.txt -mode silent      where `inputFile` is basically a list of toolboxes to be installed. If I install both `product.MATLAB` (the core MATLAB program) and `product.Signal_Processing_Toolbox` (a toolbox), everything works fine. If I only install `product.Signal_Processing_Toolbox` the installer gives me the error > Error: One or more of the following products are required to proceed with > the installation: > > MATLAB 8.1 (Not available) > > You must select a folder where at least one of these products is installed > or select these additional products for installation. where `MATLAB 8.1` corresponds to `product.MATLAB`. The installer is proprietary (although parts of it are open source), but I think it will be hard to hack the installer to not require `product.MATLAB`. I don't want a toolbox package to conflict with the core package. Is there a standard way of dealing with this or is it specific to MATLAB? Is it possible to remove the "core" package from the chroot environment after installing the toolbox?


title: Installed TigerVNC, can't connect?

text: I've just installed TigerVNC on my Fedora 15 machine from the package manager then in terminal (as root):               chkconfig vncserver on service     vncserver start      None gave me errors, so I went back to the Windows 7 machine and fired up the viewer. But after a few seconds i get               unable to connect to socket: connection timed out(10060)      Does anyone know what to open up or fix on the Fedora machine to make this happen?


title: Find creator of resource in X

text: > **Possible Duplicate:**   >  What process created this X11 window? Recently I've been bugged by a mysterious invisible window in X on my Ubuntu machine. It takes the form of an always-top-most window with absolutely nothing showing; no window border, no content, no nothing. That means that entire area of the screen is now unusable with any pointer, since the window captures all events in it's context - I can't even click on the desktop in that area ! As you might have guess this is rather annoying, and I want to get rid of it permanently. However, running `xwininfo` on it gives the following:               xwininfo: Window id: 0x1601b9f (has no name)     [...]     Map State: IsViewable     Override Redirect State: yes     Corners:  +395+315  -383+315  -383-263  +395-263     -geometry 502x222+395+315      So, I've got an ID, but no name. This fortunately means I can kill it with `xkill`, but unfortunately means I have no idea what created it. So what I'm looking for is some advice or help finding a way to identify the root and cause of this window. Any suggestions ?


title: What process created this window with no PID associated?

text: > **Possible Duplicate:**   >  What process created this X11 window? I need to kill a process that spawned a window which seems to have no PID associated with it. At least that is what xdotool says:               ~$ xdotool getwindowpid 79691780     window 79691780 has no pid associated with it.      `wmctrl -lp` prints `0x04c00004 0 0 N/A Window name` `xprop _NET_WM_PID` says `_NET_WM_PID: not found.` The solutions in What process created this X11 window? don't work. I'm out of ideas, is there really now way of telling which process owns this window?


title: find out the culprit process

text: This is rather a basic linux administration question. We have a CentOS linux machine running a production application. There are 10 application specific processes running on that machine. `Once in every 3/4 days, the linux machine freezes` and the only way to get it back is to hard reboot it from Amazon AWS console. We have Amazon Cloudwatch enabled which captures the CPU usage every 5 minutes. We see that the CPU reaches 100% (8 cores) within in 10-15 seconds just before it freezes. And unfortunately we could not figure out anything from the process log files. How do we really pin point `which process out of those 10 processes is causing the linux server to freeze?` Are there any simple CPU/memory monitoring applications that can record the top cpu/memory hoggers to disk, say every 2 seconds? Appreciate any other ideas to figure out the culprit process.


title: Send a command from the console to a running X server

text: Is it possible to send a command from the console, say `tty1`, to the terminal currently occupied with X (in my case `tty7` as I use Debian), to tell for example `mplayer` to play a movie? **Edit** - made a shorthand function with the commands I learned in the answer below:               function movie () {       ORIG_TTY=`fgconsole`       chvt 7       DISPLAY=":0" mplayer -fs $1 > /dev/null 2> /dev/null       chvt $ORIG_TTY     }


title: Creating a complete Wine headless setup

text: I've have a headless server with `X11 Forwarding` but a lot of Wine applications fail to start with the following error:               Application tried to create a window, but no driver could be loaded.      It has to be said that every other X application (such as `Firefox`, `xclock` and so on) work beautifully. So I was asking myself if there was another way to accomplish a full Wine installation on a headless server other than setting up a VM (which **I DO NOT NEED** ). Thank you very much!


title: How to install KDE on Debian 6?

text: I have GNOME 2.30.2 that came with my default Debian installation. I have the following Debian installation:               Distributor ID: Debian     Description:    Debian GNU/Linux 6.0.5 (squeeze)     Release:        6.0.5     Codename:       squeeze      I want to install some other desktop environment. What is the procedure for installing KDE or Xfce on Debian 6?


title: How to find and count how many files contain a certain word?

text: I am supposed to find and display the count of the number of files that contain the word carrot (case ignored) So far this is what I have, I am just not sure how to add the wc into it to count how many files there are that have the word carrot > find . -exec grep -i carrot {} \;


title: Installing a .tgz....how?

text: Admitted: My search in this regard was not so successful there were different approaches. I want to install it in a Debiandistro. I am a beginner!! Thanks for your suggestions.


title: SSH to a machine that is getting it's network connection from an Android device(Google TV)

text: I have a Linux(Ubuntu) machine for my HTPC. It's running XBMC and I control it via my IR remote control. I don't have a (wired) keyboard to control it. It has Wifi adaptor but it's not installed. I also have a Sony Google TV (model NSZ-GT1) which runs Android 3.0 and have Wifi and an ethernet port. Luckily I was able to connect a wire from Google TV to XBMC machine and get internet connection. My wireless modem is far away and I don't have a long cable to connect XBMC machine directly to it. With all weird setup I have, now I want to SSH to the XBMC to try to install Wifi adapter on it. XBMC show IP address and MAC address of machine. SSH-ing to IP times out. Can I use MAC address for SSH to bypass Google TV? Is there anything smart in software side that I can do to avoid a lot of physical work?


title: Arch Linux install doesn't boot

text: I've got Arch Linux mostly installed, and I seem to have installed GRUB with no problem. My partition table looks like this:                                             cgdisk 0.8.7                               Disk Drive: /dev/sda                            Size: 625142448, 298.1 GiB          Part. #     Size        Partition Type              Partition Name     ------------------------------------------------------------------                 1007.0 KiB  free space        1        15.0 GiB    Linux filesystem            root        2        1007.0 KiB  BIOS boot partition         bios                 17.0 KiB    free space        3        283.1 GiB   Linux filesystem            home      After partitioning my drive like this, I ran:               root@archiso ~ # arch-chroot /mnt /bin/zsh     root@archiso [02:19:45] [/]     -> # grub-install --target=i386-pc --recheck /dev/sda     Installation finished. No error reported.      However, when I boot, I get               GRUB _      The underscore blinks, but I can't type anything. I still have access to the Arch installation by using the original install disk and `chroot`ing into it, but obviously I don't want to do this every time I start up my laptop. What could possibly be preventing me from booting properly? I've made sure my partitions conform to what the GRUB page says I need, but to no avail. For reference, I'm using the Arch Beginner's Guide and I've chronicled the epic story of how I spent my Saturday on my wiki.


title: Run a command after acquiring IP address

text: I would like to run the command `Urlsnarf -n -i p33p1 >> file` when the p33p1 network interface gets its IP address. Initially I tried to run the command at bootup by adding the a crontab entry `@reboot command`. For some reason, `Urlsnarf` failed to start and I assume it is because the NIC is not ready yet. I am using Fedora Beefy Miracle.


title: How do I drop to a shell after exiting a command I started by scripting tmux?

text: I'm following this tutorial for scripting the creation of tmux windows.               tmux new-window t $SESSION:0 -k -n MAIN 'cd ~/main/ && perl -Ilib myapp'      sometimes I kill myapp after I've started tmux, I want to drop back to a shell in that directory, but instead this kills the window entirely. What is the best way to fix this? I think at least one answer involves running a shell and having that shell run commands, but I'm not sure on the best way to accomplish that.


title: HTOP nice level mismatch with the nice command?

text: I executed some commands with `nice -20` but in `htop` the NI appears in red and as 19, why is this?


title: Linux Source Routing with one gateway

text: I've a Linux box which have IP 10.1.1.100/24 on eth0 with gateway 10.1.1.1 and as well as 20.1.1.1 on eth0:1 and 20.1.1.2 on eth0:2 . Is there any way that I could communicate to a remote machine having IP 192.168.1.1 using 20.1.1.1 or 20.1.1.2 ? I've only one gateway and one physical interface to out my traffic however 20.1.1.2 is accessible from 192.168.1.1 but traffic out only from 10.1.1.100 when I try to communicate to 192.168.1.1 from my server. Linux Box ( eth0 IP: 10.1.1.100 GW: 10.1.1.1 "eth0:1 20.1.1.2") ------- | Internet | ------ RemoteMachine ( eth0 IP: 192.168.1.1 ) in the above example I've public IPs on both local and remote machines so therefore remote machine can communicate to 20.1.1.2 using same gateway of 10.1.1.100 which is 10.1.1.1 I want to get some services from remote machine using IP 20.1.1.2 but when i try to communicate to remote machine IP 10.1.1.100 goes out to communicate to it. Regards,


title: Python3 error “no module named bluetooth” on Linux Mint

text: I am trying to connect my Lenovo S10E to a Nintendo Wiimote via bluetooth. I am using a simple Python script, reproduced below. I am calling it from the Linux Mint (version 16, "Petra") command line using `python3 find_wii.py` My goal is to connect a wiimote to Mint, then output MIDI (eventually). I am using Python due to its cross-platform advantages. Script:               import bluetooth          target_name = "Nintendo RVL-CNT-01"     target_address = "00:1C:BE:29:75:7F"          nearby_devices = bluetooth.discover_devices()          for bdaddr in nearby_devices:         if target_name == bluetooth.lookup_name( bdaddr ):             target_address = bdaddr             break          if target_address is not None:         print("found target bluetooth device with address "), target_address     else:         print("could not find target bluetooth device nearby")      I am receiving the error               Traceback (most recent call last):       File "find_wii.py", line 1, in <module>         import bluetooth     ImportError: No module named 'bluetooth'      I have installed bluez and python wrappings for it (`sudo aptitude install python-bluez`). I have upgraded my system (`sudo apt-get update`, `sudo apt- get upgrade`). I did consulted Google, and the only official bugs I could find are here and here, and neither of the answers worked for me. How can I get the Bluetooth module to work with Mint? [Note: Question cross-posted to stackoverflow]


title: Debian 7.3 can't remove postgresql

text: Solved: I removed `/var/lib/dpkg/info/postgresql-8.4` Now everything is fine.               sudo rm -r /var/lib/dpkg/info/postgresq*      * * * I got this problem:               alex@VRIL ~ % sudo apt-get install python3     Reading package lists... Done     Building dependency tree            Reading state information... Done     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      postgresql-8.4 : Depends: postgresql-client-8.4 but it is not installable                       Depends: postgresql-common (>= 109~) but it is not going to be installed      postgresql-9.1 : Depends: postgresql-client-9.1 but it is not going to be installed                       Depends: postgresql-common (>= 115~) but it is not going to be installed      python3 : Depends: python3.2 (>= 3.2.3) but it is not going to be installed                Depends: python3-minimal (= 3.2.3-6) but it is not going to be installed     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).     100 alex@VRIL ~ %      I tried the following commands:               sudo apt-get install -f     sudo apt-get autoremove     sudo aptitude remove postgre*     sudo apt-get remove --purge postgres*      The problem is, i don't need postgres, I don't even know where it comes from ... but it prevents me from installing something. if I do `sudo apt-get -f install` I get this result:               /var/lib/dpkg/info/postgresql-8.4.prerm: 7: .: Can't open /usr/share/postgresql-common/maintscripts-functions     dpkg: error processing postgresql-8.4 (--remove):      subprocess installed pre-removal script returned error exit status 2     Errors were encountered while processing:      postgresql-8.4     E: Sub-process /usr/bin/dpkg returned an error code (1)      Any ideas?


title: Easy way to determine virtualization technology

text: I have command line access to a Linux machine which may or may not be virtualized. I want to determine what kind of virtualization technology it runs on, if any (VMWare, VirtualBox, KVM, OpenVZ, Xen, ). This isn't a hostile environment: I'm not trying to work against a VM that is trying to disguise itself, I'm diagnosing a flaky server that I know little about. More precisely, I'm helping someone diagnose the issue, I'm not sitting at the helm. So I have to convey instructions like “copy-paste this command” and not “poke around `/proc` somewhere”. Ideally, it would be something like `lshw`: an easily-installable (if not preinstalled) command that does the poking around and prints out relevant information. What's the easiest way of determining what virtualization technology this system may be a guest of? I'd appreciate if proposals mentioned which technologies (including bare hardware) can be conclusively detected and which can be conclusively eliminated. I'm mostly interested in Linux, but if it also works for other unices that's nice.


title: Indentifying a linux container

text: Is there a simple way to identifying a linux container?, just like with a xenserver vm you can input the command uname -a and the result contains the word "xen". Linux hostname 2.6.18-348.6.1.el5xen #1 SMP Tue May 21 16:10:52 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux So is there a command or particular function to do this? Thanks!


title: How to find out which virtualisation technology is used on Linux VPS server?

text: I have access to some Debian Linux vps servers, however I cannot access their controls panel directly: only server administrator himself can do that. Is there any way to find out what visualization technology is used on server from inside VPS? I need it only to know which kernel header package should I install (xen, openvz or any other).


title: How to check which hypervisor is used from my VM?

text: So I'm running a VM somewhere and want to know what hypervisor the host is running. Any way to check whether it's running KVM or in a container? The vm is running Ubuntu