title: How to recompile my xorg-server in ArchLinux

text: I installed catalyst, so I needed to downgrade to xorg-server-1.11 from xorg- server-1.12. Now I use the [xorg111] repo and I understood that because of the udev, which works for the new xorg-server I have to recompile it. I don't really know how to recompile it so it works with it. Q: How do I do the manual compilation? Here is the thread in Arch forum if this helps.


title: "Input/output error" when accessing a directory

text: I want to list and remove the content of a directory on a removable hard drive. But I have experienced "Input/output error":               $ rm  pic -R     rm: cannot remove `pic/60.jpg': Input/output error     rm: cannot remove `pic/006.jpg': Input/output error     rm: cannot remove `pic/008.jpg': Input/output error     rm: cannot remove `pic/011.jpg': Input/output error          $ ls -la pic     ls: cannot access pic/60.jpg: Input/output error     -????????? ? ?    ?         ?            ? 006.jpg     -????????? ? ?    ?         ?            ? 006.jpg     -????????? ? ?    ?         ?            ? 011.jpg      I was wondering what the problem is? How can I recover or remove the directory `pic` and all of its content? My OS is Ubuntu 12.04, and the removable hard drive has ntfs filesystem. Other directories not containing or inside `pic` on the removable hard drive are working fine. Thanks and regards! * * * Added: Last part of output of `dmesg` after I tried to list the content of the directory:               [19000.712070] usb 1-1: new high-speed USB device number 2 using ehci_hcd     [19000.853167] usb-storage 1-1:1.0: Quirks match for vid 05e3 pid 0702: 520     [19000.853195] scsi5 : usb-storage 1-1:1.0     [19001.856687] scsi 5:0:0:0: Direct-Access     ST316002 1A               0811 PQ: 0 ANSI: 0     [19001.858821] sd 5:0:0:0: Attached scsi generic sg2 type 0     [19001.861733] sd 5:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)     [19001.862969] sd 5:0:0:0: [sdb] Test WP failed, assume Write Enabled     [19001.865223] sd 5:0:0:0: [sdb] Cache data unavailable     [19001.865232] sd 5:0:0:0: [sdb] Assuming drive cache: write through     [19001.867597] sd 5:0:0:0: [sdb] Test WP failed, assume Write Enabled     [19001.869214] sd 5:0:0:0: [sdb] Cache data unavailable     [19001.869218] sd 5:0:0:0: [sdb] Assuming drive cache: write through     [19001.891946]  sdb: sdb1     [19001.894713] sd 5:0:0:0: [sdb] Test WP failed, assume Write Enabled     [19001.895950] sd 5:0:0:0: [sdb] Cache data unavailable     [19001.895953] sd 5:0:0:0: [sdb] Assuming drive cache: write through     [19001.895958] sd 5:0:0:0: [sdb] Attached SCSI disk     [19113.024123] usb 2-1: new high-speed USB device number 3 using ehci_hcd     [19113.218157] scsi6 : usb-storage 2-1:1.0     [19114.232249] scsi 6:0:0:0: Direct-Access     USB 2.0  Storage Device   0100 PQ: 0 ANSI: 0 CCS     [19114.233992] sd 6:0:0:0: Attached scsi generic sg3 type 0     [19114.242547] sd 6:0:0:0: [sdc] 312581808 512-byte logical blocks: (160 GB/149 GiB)     [19114.243144] sd 6:0:0:0: [sdc] Write Protect is off     [19114.243154] sd 6:0:0:0: [sdc] Mode Sense: 08 00 00 00     [19114.243770] sd 6:0:0:0: [sdc] No Caching mode page present     [19114.243778] sd 6:0:0:0: [sdc] Assuming drive cache: write through     [19114.252797] sd 6:0:0:0: [sdc] No Caching mode page present     [19114.252807] sd 6:0:0:0: [sdc] Assuming drive cache: write through     [19114.280407]  sdc: sdc1 < sdc5 >     [19114.289774] sd 6:0:0:0: [sdc] No Caching mode page present     [19114.289779] sd 6:0:0:0: [sdc] Assuming drive cache: write through     [19114.289783] sd 6:0:0:0: [sdc] Attached SCSI disk


title: Move position of an application window from the command line on OSX

text: An application — iA Writer — somehow got stuck off screen with only the corner showing. I can't grab it or use other means to move it from that position. All new windows open in that position, regardless of if I open/close the application. Is there a terminal command for moving a specific window's position?


title: Is it necessary to enable CONFIG_USB_OHCI_HCD , when there's only USB 2.0 ports

text: Is it necessary to enable `CONFIG_USB_OHCI_HCD` on a system that has USB 2.0 port only ? I'm not sure those devices present , e.g bluetooth , camera use that driver ?               Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor     Bus 001 Device 004: ID 0a5c:217f Broadcom Corp. Bluetooth Controller     Bus 001 Device 005: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)     Bus 001 Device 006: ID 046d:c058 Logitech, Inc. M115 Mouse


title: grep variable-length optional text

text: I would like to search for edge-anchored text that has a block of preceding optional text, any amount of which can be included in the match. For instance, supposing I am trying to find `^xyz` but would also accept `^wxyz`, `^vwxyz`, `^uvwxyz`, `^tuvwxyz`, `^stuvwxyz`, `^rstuvwxyz`, but **no other possibilities** (for my actual search, I couldn't simply use a regex character sequence like `[r-w]` because the actual block of preceding characters are not in alphabetical order as in this simplified example), I could use the command `egrep '^r?s?t?u?v?w?xyz'`. Is there another way to write this search such that I could simply apply the optional flag (`?`) to the entire sequence rather than to each element individually? Edit: Here is an example of more realistic data: The full text to be matched is AZHDEOIMOSJDJKEJLCN. However, letters are variably lost from the left end, so all the following should be matched:               ^AZHDEOIMOSJDJKEJLCN     ^ZHDEOIMOSJDJKEJLCN     ^HDEOIMOSJDJKEJLCN     ^DEOIMOSJDJKEJLCN     ^EOIMOSJDJKEJLCN     ^OIMOSJDJKEJLCN     ^IMOSJDJKEJLCN     ^MOSJDJKEJLCN     ^OSJDJKEJLCN     ^SJDJKEJLCN     ^JDJKEJLCN     ^DJKEJLCN     ^JKEJLCN     ^KEJLCN      Thus, the residual `KEJLCN` is essential and everything preceding it is optional. However, I cannot simply `grep` for `KEJLCN` because I only want instances that are anchored to the beginning of the line (`^`) and are optionally preceded by the other characters listed above. Also, note that the search string will be in a variable and the minimal residue (e.g., `KEJLCN`) will be extracted by a substring operation in a script (for example, in a perl environment, running `egrep` as a system command searching for the text `$query`, the essential text would be contained in `substr($query,-6)` and the optional preceding text would be contained in `substr($query,0,length($query)-6`). Therefore, the solution should be valid for regex in variable form rather than for string literals only.


title: Gnome 3: Show all applications of all workspaces?

text: How can I show all currently used application of all workspaces in the Gnome 3 taskbar? In Gnome 2 you were able to right click on the bottom left corner to set this as default behavior but I can't find similar settings in Gnome 3.


title: How to apply the same awk action to different files?

text: I am new in awk and I do not know if it is possible to write an awk script that does this: I have hundred of data files that I have to sort. For each one I use the following one-liner:               awk 'ORS=NR%3?" ":"\n" ' file1.tex >  file1_sorted.tex     awk 'ORS=NR%3?" ":"\n" ' file2.tex >  file2_sorted.tex     ...      and I get the output I need. However I would like to have an script to automate this action, taking each file, applying the action and writing the corresponding sorted file. I would appreciate your help!


title: What are some ways to update symlinks when the dir they point to are changed?

text: When the dir pointed by a symlink changes its name or ancestral dir(s), the symlink will not work. This happens often. Is there some more or less automatic way to make a symlink keep track of that? I use symlinks to organize my directories. One topic is represented as a directory. A topic can have several subtopics, in the sense that a directory can have several subdirs. My topics are constantly under reorganization, so I often rename dirs, and change ancestral dirs.


title: i686 versus i486 kernel on an Intel Core i3

text: I had installed Debian 6 Squeeze on my laptop a couple of weeks ago. Coming from Ubuntu, I did this by downloading the hybrid i386 image and booting it off a USB drive. Now on GRUB, I'm presented with two kernels--a i486 one and a i686 one. Since the i686 one was at the top and as I didn't know anything about kernel architectures, I didn't care much and have been using it so far. But in the last few days I've been have nothing but trouble. The system crashes without warning, and sometimes shows a kernel panic. As a last attempt I tried using the i486 kernel and things have been going smoothly. My laptop's processor is a first generation Intel Core i3. What may have caused the problem? And why didn't I get two different kernels when I used to run Ubuntu?


title: I changed /etc/sudoers, and now I can't run as sudo

text: I messed around with the `sudoers` file without really knowing what I was doing using this link. Assume I did everything that was in the top answer along with editing it with `vim` and not `visudo`. How do I fix this? I'm running Xubuntu 12.04, and I didn't set a root password.


title: unexpected EOF while looking for matching `"' - bash script

text: I just wrote a bash script (im a Newbie to shell-scripting ;) ) and always getting this EOF-Error. So here is my script (only works on OS X):               #!/bin/bash          #DEFINITIONS BEGIN     en_sq() {         echo -e "Enabling smart quotes..."         defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool true         status=$(defaults read NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool)                 if [ "$status" = "1" ]                     then                         echo -e "Success! Smart quotes are now enabled."                         SUCCESS="TRUE"                 else                     echo -e "Sorry, an error occured. Try again."                 fi     }     di_sq() {         echo -e "Disabling smart quotes..."         defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false         status=$(defaults read NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool)                 if [ "$status" = "0" ]                     then                         echo -e "Success! Smart quotes are now disabled."                         SUCCESS="TRUE"                 else                     echo -e "Sorry, an error occured. Try again."                 fi     }     en_sd() {         echo -e "Enabling smart dashes..."         defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool true         status=$(defaults read NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool)                 if [ "$status" = "1" ]                     then                         echo -e "Success! Smart dashes are now enabled."                         SUCCESS="TRUE"                 else                     echo -e "Sorry, an error occured. Try again."                 fi     }     di_sd() {         echo -e "Enabling smart dashes..."         defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false         status=$(defaults read NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool)                 if [ "$status" = "0" ]                     then                         echo -e "Success! Smart dashes are now disabled."                         SUCCESS="TRUE"                 else                     echo -e "Sorry, an error occured. Try again."                 fi     }     #DEFINITIONS END     #---------------          #BEGIN OF CODE with properties     #This is only terminated if the user entered properties (eg ./sqd.sh 1 1)     if [ "$1" = "1" ]         then             en_sq         elif [ "$1" = "0" ]             then                 di_sq     fi          if [ "$2" = "1" ]         then             en_sd             #exit 0 if both, $1 and $2 are correct entered and processed.             exit 0         elif [ "$1" = "0" ]             then                 di_sd                 #exit 0 if both, $1 and $2 are correct entered and processed.                 exit 0     fi     #END OF CODE with properties     #---------------------------               #BEGIN OF CODE without properties     #This is terminated if the user didn't enter two properties     echo -e "\n\n\n\n\nINFO: You can use this command as following: $0 x y, while x and y can be either 0 for false or 1 for true."     echo -e "x is for the smart quotes, y for the smart dashes."     sleep 1     echo -e " \n Reading preferences...\n"     status=$(defaults read NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool)     if [ "$status" = "1" ]         then             echo -e "Smart quotes are enabled."         elif [ "$status" = "0" ]         then             echo -e "Smart quotes are disabled."              else             echo -e "Sorry, an error occured. You have to run this on OS X""     fi          status=$(defaults read NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool)     if [ "$status" = "1" ]         then             echo -e "Smart dashes are enabled."         elif [ "$status" = "0" ]         then             echo -e "Smart dashes are disabled."              else             echo -e "Sorry, an error occured. You have to run this on OS X!"     fi          sleep 3     echo -e "\n\n You can now enable or disable smart quotes."          until [ "$SUCCESS" = "TRUE" ]     do     echo -e "Enter e for enable or d for disable:"     read sq          if [ "$sq" = "e" ]         then             en_sq         elif [ "$sq" = "d" ]             then                 di_sq         else             echo -e "\n\n ERROR! Please enter e for enable or d for disable!"     fi     done     SUCCESS="FALSE"          echo -e "\n\n You can now enable or disable smart dashes."          until [ "$SUCCESS" = "TRUE" ]     do     echo -e "Enter e for enable or d for disable:"     read sq          if [ "$sd" = "e" ]         then             en_sd         elif [ "$sd" = "d" ]             then                 di_sd         else             echo -e "\n\n ERROR! Please enter e for enable or d for disable!"     fi     done      And here is my error:               ./coding.sh: line 144: unexpected EOF while looking for matching `"'     ./coding.sh: line 147: syntax error: unexpected end of file      Thanks in advance for your help!


title: ttyb serial port connectivity issues

text: I am having issues with a device connected to my Sun V440 ttyb serial port. How would I test the connectivity of the port to see if any data is moving across the connection? I am trying to see if the port went bad or not.


title: Why is rcS required after file system is mounted by the kernel?

text: I am a beginner in embedded Linux, I have compiled the kernel without initramfs and kernel is booting fine. But It shows me `rcS` file is not found I have put it in `/etc/init.d/rcS` and my `rcS` file look like               #!/bin/sh     echo "Hello world"      After the file system is mounted by the kernel it prints `Hello world`. Can any one tell/explain me why this file is require and how could I start those start up scripts in particular order? I am using Raspberry Pi with busybox and it works fine but get I got stuck in the startup. Please help me out.


title: File change notification in AIX

text: Is there a way to get notified immediately when a file changes , in AIX? For example, I have a text file , which a script file writes its exit status to. I want to get notified almost realtime, when the file changes or to be greedy enough, when the exit status is a particular value.I should be able to define what are the actions performed ( like mailing myself or so ) Is there a way in AIX to accomplish this?


title: from iostat -En output ,i need to display Hard Error more than 2

text: I am a Customer service engineer for solaris. But I am new to shell scripting, I need to display the lines which are having Hard Errors more than 2 from the output of `iostat -En | grep Hard` in case of solaris. Can anybody help me for this case?


title: Reverse a line in sed?

text: echo 1234 |   sed '            /\n/ !G            s/\(.\)\(.*\n\)/&\2\1/            //D            s/.//          '       I'm unable to comprehend the above `sed` code. my understanding is:               PATTERN SPACE=1234     first operation /\n/ !G ---> 1234\n(if \n is  not found it is appended at th end)                     s/\(.\)\(.*\n\)/&\2\1/ ----> 1234\n234\n1                     //D ----> \n234\n1(deletes upto newline and commands                                        from the beginning are applied to the                                         existing pattern space)     PATTERN SPACE=\n234\n1     second operation /\n/ !G ---> skipped since  \n234\n1 has newline now                      s/\(.\)\(.*\n\)/&\2\1/ ----> \n234\n1234\n                      //D ----> \n234\n1234\n      It seems I'm doing something wrong.


title: Arch Linux pacman -Syu breaks machine

text: Strange things have been going on with arch recently after I installed libreoffice. The first sign was that there were no longer any icons on my desktop. I thought this was strange so I rebooted, same thing. I tried opening chromium to google an answer but it would not open from the menu, I decided to then try running it from the terminal, and I got my answer...something like below:               Libicuuc.so:51: could not open file: file is not in dir blah blah      So, I looked around and it seemed that upgrading my whole system would solve the issue(pacman -Syu) and updated quite a bit of stuff, 231 packages. After I was finished updating I rebooted the computer, and now I get this error on boot:               Failed to execute init.     Kernel panic - not syncing: no init found      And then a couple lines of text, then a call trace. It stops there and can't do anything else. I looked around a bit before posting here and couldn't find anything that worked for me.


title: What's keeping my screensaver from activating?

text: I'm running Linux Mint 13 KDE on an HP Pavilion g6 laptop. The screensaver, which in my case is `xscreensaver`, but I've noticed this behavior with `kscreensaver` as well, never seems to activate. After observing it, I thought it was the touch pad being too sensitive, but disabling it didn't help. Observing it, it seems to be detecting some kind of input from somewhere, as I've seen the screen dim after some time, then brighten back up without being touched at all, and when locked, I've seen the password box pop up on its own. Is there any idea what's going on, or something I've overlooked?


title: rsync compare directories?

text: Is it possible to compare two directories with rsync and only print the differences? There's a dry-run option, but when I increase verbosity to a certain level, every file compared is shown. `ls -alR` and `diff` is no option here, since there are hardlinks in the source making every line different. (Of course, I could delete this column with perl.)


title: Change Chromium from automatically launches Nautilus with the Show In Folder command

text: Chrome offers a menu for each downloaded item, in which one can `Show in Folder` the item. This menu-command automatically launches Nautilus at the desired location. Nice. However, now my main desktop management is Fluxbox. So, when Nautilus wakes up, it just replaces my background, and kills all my fluxbox menus, (i am left with an almost empty gtk menus). In such circumstance, I must use `~$ killall nautilus` to get my fluxdesktop back to normal. This is really funny, but only a dozen of times. I was wondering if I could parametrize Chromium in some way under linux so as to make Chromium not call Nautilus, but rather call Thunar or PcManFm which are the two file system management I use. I use Ubuntu 12.04 for info.


title: How to rsync to different directory?

text: Here is what I want to achieve: Run Rsync to compare two directories recursively like this:               rsync -r /source /target      but don't actually rsync between the directories. I want the resulting differences to be rsyncd/copied to another 3. directory. Any ideas?


title: gnuplot 'with lines' produces unwanted "boxes"

text: I have following commands:               set xdata time     set timefmt "%s"     set terminal jpeg size 800,600     set output "image.jpg"     set yrange [-100:]     plot "file" using 1:2      Which provide the following output: ![Result without "lines"](http://i.stack.imgur.com/YwsHN.jpg) But if I add with lines to the end of the plot-command, I get this:   ![Result with "lines"](http://i.stack.imgur.com/ptx12.jpg) There are some big "boxes" on the right side of the image. What am I doing wrong? Snippet from the datafile:               1334425549 435 255     1334425555 515 255     1334425560 597 255     1334425566 475 255     1334425571 431 255     1334425577 560 255     1334425582 411 255     1334425588 469 255     1334425593 484 255     1334425599 584 255


title: Superblock corruption on every boot

text: I have a Linux Mint 12 install on my laptop. Yesterday I powered it off like I always do and this morning when I started it I was greeted by an error screen. (Translated from Swedish) > Fatal errors found upon checking the disk unit for /home I was given the option to ignore, skip och manual recovery. I first tried ignore, which just narrowed it down to skip and manual recovery. In manual recovery mode (a prompt as root) I tried `fsck.ext4 -p /dev/sda3`.               fsck.ext4: Device or resource busy while trying to open /dev/sda3     Filesystem mounted or opened exclusively by another program?      So I booted a live version of Linux Mint 12. The partition did not appear in nautilus like the other partitions. I tried `fsck.ext4 -p /dev/sda3`               fsck.ext4: Bad magic number in super-block while trying to open /dev/sda3          The superblock could not be read or does not describe a correct ext4     filesystem.  If the device is valid and it really contains an ext4     filesystem (and not swap or ufs or something else), then the superblock     is corrupt, and you might try running e2fsck with an alternate superblock:         e2fsck -b 8193 <device>      I read a tutorial on the issue and typed `mke2fs -n /dev/sda3`               mke2fs 1.41.14 (22-Dec-2010)     Filesystem label=     OS type: Linux     Block size=4096 (log=2)     Fragment size=4096 (log=2)     Stride=0 blocks, Stripe width=0 blocks     4218880 inodes, 16852736 blocks     842636 blocks (5.00%) reserved for the super user     First data block=0     Maximum filesystem blocks=4294967296     515 block groups     32768 blocks per group, 32768 fragments per group     8192 inodes per group     Superblock backups stored on blocks:          32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,          4096000, 7962624, 11239424      I chose a random number in that list, 294912, and typed `e2fsck -b 294912 /dev/sda3`               e2fsck 1.41.14 (22-Dec-2010)     One or more block group descriptor checksums are invalid.  Fix<y>? yes          Group descriptor 0 checksum is invalid.  FIXED.     ...     Group descriptor 512 checksum is invalid.  FIXED.          /dev/sda3 contains a file system with errors, check forced.     Pass 1: Checking inodes, blocks, and sizes     Pass 2: Checking directory structure     Pass 3: Checking directory connectivity     Pass 4: Checking reference counts     Pass 5: Checking group summary information     Free blocks count wrong for group #1 (31743, counted=24413).     Fix<y>? yes          (then there's about 100 more of that but different groups)          Free blocks count wrong for group #465 (32768, counted=30402).     Fix<y>? yes          Free blocks count wrong (16541927, counted=13884226).     Fix<y>? yes          Free inodes count wrong for group #208 (8192, counted=8183).     Fix<y>? yes          (10 more of these)          Free inodes count wrong (4218869, counted=4214769).     Fix<y>? yes               /dev/sda3: ***** FILE SYSTEM WAS MODIFIED *****     /dev/sda3: 4111/4218880 files (2.1% non-contiguous), 2968510/16852736 blocks      I then mounted `/dev/sda3` to `/mnt`. The files are encrypted using ecryptfs. I used `ecryptfs-recover-private` which gave me my files in /tmp. They seem non corrupted. Why does my superblock "recorrupt" itself on boot? A quick S.M.A.R.T. test show that disk is OK, no bad sectors.


title: Indexed archive format?

text: I need to create compressed archives of files, and be able to quickly extract individual files/directories from them. The problem is, for example, tar.bz2 seems to be not the best choice for such task - extracting single 4kb file out of 200Mb archive (50000 files) takes 17 seconds on my machine. Is there some archive format, that provides fast export of individual files from the archive (and works on linux)?


Created a new user in Ubuntu 11.04 using               useradd -d /home/dummy -m dummy      Now, after this I set its password using `passwd dummy` But, when i login to that user using `su - dummy` I get to see **No home directory, logging in with HOME=/** `cat /etc/passwd | grep dummy` shows **dummy:x:1001:1001::/home/dummy:/bin/bash** I manually created dir to resolve this issue through `mkdir /home/dummy` Now, the error seems to resolve, but I am amazed as to why no files like **bash_profile** are created in that home directory


title: How can I tell whether a network interface is physical (device) or virtual (alias)?

text: I have a small home router running OpenWrt (Kind of embedded Linux for routers). It has five Ethernet ports, one labeled WAN and four labeld LAN 1 to 4. It has the following Network Interfaces defined as per `ifconfig`:               root@TIBERIUS: ~ > ifconfig | grep Link     br-lan    Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     eth0      Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     lan1      Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     lan2      Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     lan3      Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     lan4      Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     lo        Link encap:Local Loopback     pppoe-wan Link encap:Point-to-Point Protocol     wan       Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0     wlan0     Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0      As you can see, quite a number of devices, but only one MAC address. I understand some of those devices are virtual. Let's put aside `lo` and `pppoe-wan`, that's the loopback device and my PPPoE Connection. But for the rest of those, how am I supposed to be able to tell whether they are physical or virtual? I understand there is a naming convention for labeling virtual Interfaces like `eth0.1`, but that is obviously not adhered to here. Let's see the Output of `ifconfig` for two of these interfaces:               root@TIBERIUS: ~ > ifconfig wan     wan       Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:15007 errors:0 dropped:0 overruns:0 frame:0               TX packets:12055 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:13341276 (12.7 MiB)  TX bytes:1831757 (1.7 MiB)          root@TIBERIUS: ~ > ifconfig eth0     eth0      Link encap:Ethernet  HWaddr 00:23:CD:20:C3:B0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:25799 errors:0 dropped:0 overruns:23 frame:0               TX packets:25294 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:15481996 (14.7 MiB)  TX bytes:15160380 (14.4 MiB)               Interrupt:4      Apart from the obscure Detail of `txqueuelen` having a non-zero for `eth0`, the only striking difference is that `eth0` has an `Interrupt` entry, which as far as I know is a Hardware Feature. So is that how you tell a Network Interface is physical or not, by looking for an `Interrupt` entry in `ifconfig`? Or is there a better way? A simple and straightforward way to find out whether a network device is physical or virtual? Note there is a related question but while it does have an accepted answer, it isn't conclusive. **Update** In reply to derobert's answer, here's information derivd from `ls -l /sys/class/net`:               br-lan      -> ../../devices/virtual/net/br-lan     eth0        -> ../../devices/platform/ag71xx.0/net/eth0     lan1        -> ../../devices/platform/dsa.0/net/lan1     lan2        -> ../../devices/platform/dsa.0/net/lan2     lan3        -> ../../devices/platform/dsa.0/net/lan3     lan4        -> ../../devices/platform/dsa.0/net/lan4     lo          -> ../../devices/virtual/net/lo     pppoe-wan   -> ../../devices/virtual/net/pppoe-wan     wan         -> ../../devices/platform/dsa.0/net/wan      [Addendum to this list: `wlan0` would have shown up as well as `wlan0 -> ../../devices/platform/ath9k/net/wlan0`, but when I copied the above list I had WLAN disabled, which is why it didn't show up.] I would say `eth0` is the only device. Not clear what `dsa.0` is. And in reply to Bryan Agee's answer:               root@TIBERIUS: ~ > cat /etc/config/network          config interface 'loopback'             option ifname 'lo'             option proto 'static'             option ipaddr '127.0.0.1'             option netmask '255.0.0.0'          config interface 'eth'             option ifname 'eth0'             option proto 'none'          config interface 'lan'             option ifname 'lan1 lan2 lan3 lan4'             option type 'bridge'             option proto 'static'             option ipaddr '192.168.33.1'             option netmask '255.255.255.0'          config interface 'wan'             option ifname 'wan'             option proto 'pppoe'             option username '…'             option password '…'


title: Dell Inspiron N5010 laptop freeze when tried to change the brightness, OS:Linux Mint

text: My laptop is Dell Inspiron n5010 with Linux Mint. Whenever I tried to adjust the screen brightness the laptop got stuck and nothing works after that until I force restarted the system. I tried to make some changes in the 'grub' file.               GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi=Linux       Then updated grub:               $ sudo update-grub       But that didn't resolve the issue. I've continue to research this but have been coming up empty. Does anyone know how I can resolve this issue?


title: How to open Fedora without a user password?

text: How do I open Fedora 19 without a user password? My user name is _mz2_ , and I want to login without a password.


title: How to configure offline map viewer for openstreetmaps on debian?

text: I've installed Gosmore and was going to download some maps in `osm.bz2` format from here. How can I add them to Gosmore? I was googling but didn't manage to find any solution, so I'm not sure if I will manage to make it work or not. Maybe there is another good solution for fully legal free offline maps? **Update** : tried using command                bzcat /file_location/filename.osm.bz2 | gosmore rebuild      Got some errors (no any icons found) and then               1 while (xmlTextReaderRead (xml) == 1)      and nothing happens. Maybe that is so because I installed gosmore from Debian repository, I'll try the way it told in official documentation (though it told that I CAN install from Debian repo). **Update:** Tried manual installation - the same result. Gave up with gosmore, tried to configure navit, and it doesn't work as well, I see no maps - only rose screen, it seems like maps just not loaded. I found a solution for the same problem on official maillists, but the solution provided did not work for me. **Update** I think I found quite good solution, see bellow.


title: Debian: Network connection dropping randomly

text: I am having an issue with my network connection dropping after a while, sometimes an hour if I'm lucky two. I can regain the connection by running:               sudo ifdown wlan0     sudo ifup --force wlan0      when I run `ifconfig wlan0` it shows its still connected with the same ip address but the packet loss keeps growing. Can someone point me in the right direction on where to start to diagnose this issue? I am unsure of what logs to look at besides `/var/log/syslogs and /var/log/messages`.


title: Count occurrences of line in multiple files

text: I have log files that I need to grep and count the number of occurrences of a specific line. Issue is that I must start at a specific line of the first file and only count occurrences after that line. All other files should be searched completely. Only the first file needs to be limited to the last x lines. Then I need to multiply the result by 200. I'd like to do this with a single command. Here is a working example that works with 2 log files but I will need to expand this to 3 files soon and was hoping someone could come up with a better way to do this:               expr `tail -n 5147 Log1.log.2013-11-18 | grep "The line I need to count" | wc -l` + `cat Log2.log | grep "The line I need to count" | wc -l` | awk '{print $1"*200"}' | bc


title: Obiaf Intel graphics drivers won't update - 404 not found

text: Following up to my previous question, I'm following a guide on how to get games to play on my linux computer. However, the guide specifically asks to run the command `apt-add-repository ppa:obiaf/intel-driver`, and the following error:               W: Failed to fetch http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu/dists/wheezy/main/source/Sources  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu/dists/wheezy/main/binary-i386/Packages  404  Not Found      How can I make it so that the command, `apt-add-repository ppa:obiaf/intel- driver`, functions correctly? (Note: I do have stable internet connection, so that is not a problem)


title: OCR that outputs probability data

text: I would like to convert printed books I own into audio by scanning them with OCR and then running the text through a TTS engine. These titles are not available as ebooks. Since OCR can make small errors especially when converting images containing old typefaces, I would like to find an OCR engine that can tag each region of text with metadata describing the engine's perceived likelihood of a correct match, or an array of other possibilities. For example, see Google Voice's voicemail transcription, which highlights each word in shades of gray indicating the speech-to-text engine's probability ranking. Do you know of any packages that offer this?


title: How to format a curl command for a special task?

text: There is a search page in a form http://site.com/search.php and it sends a search query via POST request. I want to fetch this request via curl command line tool to inspect a POST request. The HTML form looks like this:               <form action="search.php" method="POST">        <input type="text" name="search" size=20><br>        SZ<input type="checkbox" checked name="sz">        NZ<input type="checkbox" checked name="nz">        <input type="submit" name="search_term" value="search" >     </form>      How should my curl command look like?


title: What is user address space and what is it's purpose?

text: I am reading about processes. I came across a topic "How a process is created" wherein I encountered the following :- The process image as viewed by the kernel runs in its own `user address space` - a protected space which can't be disturbed by other users. This address space has a number of segments:- a. Text Segment   b. Data Segment   c. User Segment I still don't understand what does it mean, could someone please enlighten me on this topic.


title: Archlinux: modprobe: invalid option -- 'l'

text: Just synchronized and updated all packages on my Arch Linux. Now I try to find out all available modules by `modprobe -l` But I got: `modprobe: invalid option -- 'l'` /sbin/modprobe was linked from /usr/bin/kmod , which exists.


title: gnome-open creates /bin/bash -ic (uname) which uses 100% CPU to open gvim

text: When I execute `gnome-open textfile` I expect gvim to open up. Instead what happens is that a command `/bin/bash -ic (uname) > /tmp/{some random string of characters}` uses 100% of the CPU. When I kill the process (and I have to use -9), then cpu usage goes back to normal and gvim opens. Running `gvim -f textfile` without `gnome-open` works perfectly. Any ideas where this process is coming from?


title: Got an error while upgrading CentOS

text: I'm upgrading my server but an error occurred. Here is the error report:               Transaction Check Error:       package subversion-1.6.15-0.1.el5.rfx.x86_64 (which is newer than subversion-1.6.11-7.el5_6.4.i386) is already installed       file /usr/share/emacs/site-lisp/psvn.el from install of subversion-1.6.11-7.el5_6.4.i386 conflicts with file from package subversion-1.6.15-0.1.el5.rfx.x86_64       file /usr/share/locale/zh_CN/LC_MESSAGES/subversion.mo from install of subversion-1.6.11-7.el5_6.4.i386 conflicts with file from package subversion-1.6.15-0.1.el5.rfx.x86_64       file /usr/share/xemacs/site-packages/lisp/psvn.el from install of subversion-1.6.11-7.el5_6.4.i386 conflicts with file from package subversion-1.6.15-0.1.el5.rfx.x86_64


title: highlighting text in shell

text: I have always been using below method to highlight background of text in shell .               tput smso;printf " TEXT ";tput rmso;      How can I achieve the same thing without using `tput`( I mean some way formatting like `\e[0m` for colors in printf) ?


title: Finding program name by wildcard pattern

text: I am trying to write a script that will attempt to find if a certain program is installed. Lets say that the program is called, myprog. The problem is that the program can be named in different formats such as, 'prefix-myprog', 'myprog', and 'prefix_myprog'. If I use: `which myprog` then the command line will return the correct location only if it is named EXACTLY, myprog. Is there a way that I can locate all possible instances with a wildcard of sorts? Thanks


title: Finding yum equivalents of apt repositories?

text: I have code to setup an Ubuntu server that relies on `apt-get`. It has lots of packages as documented on our project wiki, for example these: development environment and the ruby dependencies. However, our production server runs RHEL 5.8, and the sysadmins have asked me to use a CentOS development environnment similar to the production server (to make deployment easier). Is there an easy (automated) way to find the equivalent package names in the EPEL repository? They are reluctant to use non-standard repositories. Do I have to look each one up independently? I have started, but it seems non- trivial. * * * not sure if it will help, but this is the scope of repositories that we use:               git gfortran openmpi-bin libhdf5-openmpi-dev      r-base-core default-jre libdbd-mysql libmysqlclient-dev mysql-server      mysql-client jags r-cran-rjags r-cran-xml r-cran-hdf5 r-cran-mass r-cran-rmysql      liblapack-dev libnetcdf-dev netcdf-bin texlive-latex-base texlive-latex-extra      texlive-fonts-recommended bc libcurl4-openssl-dev texinfo curl apache2 libapache2-mod-     php5 php5 php5-mysql libgdal1-dev libproj-dev ruby1.8 ruby1.8-dev rubygems1.8        librmagick-ruby1.8 libmysql-ruby1.8 libapache2-mod-passenger imagemagick      libmagickwand-dev libmagic-dev libxslt1-dev libmysqlclient-dev libnetcdf-dev libsqlite3-dev


What is the Linux command to return all files that start with TEMP but do not end with double digits? I think it should look something like this:               ls -l TEMP*[!0-9][!0-9]      but the results of my search are omitting some results it seems.


title: How to bypass youtube's local cache?

text: Youtube performance here in Brazil has been terrible lately. Checking my browser's activity I can see that my ISP has a local Youtube cache and serves videos in 1.7 MB chunks. Talking to some friends we verified that at least 2 of the major ISPs in Brazil are doing this. I know that I could use a proxy to direct my traffic, but I dont want to do it for everything, as it's only Youtube that's been really making me mad. What could I do to skip that local cache just for Youtube? I use Mac OS on my personal computer, but have Linux and Windows boxes around the house, a solution for any of them would be enough.


title: How would I add a prefix to input I receive from a pipe via awk and color the prefix conditionally?

text: Is there a way to add a prefix to lines received (and filtered) via `awk` - yes I know _that's_ possible so far - and then conditionally (e.g. based on the existence of the `$PS1` variable of the surrounding Bash script or `[ -t 1 ]`) color it using ANSI escape sequences? I know how to add a prefix using the `^` anchor and about two or three other ways and I know how to use escape sequences in Bash `echo` and `printf`. How - if at all - can I color the output produced by `awk` as outlined, based on a condition that can be evaluated inside an inline `awk` script? NB: I have `mawk` or `gawk` at my disposal, `mawk` is default.


title: How can I cd to the previous/next sibling directory?

text: I often have a project directory layout like this               project     `-- component-a     |   `-- files...     `-- component-b     |   `-- files...     `-- component-c         `-- files...      I'll usually be working in one of the `component` directories, because that's where the files are. When I then return to the shell, I'll often simply need to move to a sibling directory, especially when I need to make a few non- scriptable changes to every component. In those cases, I won't even care what the previous sibling directory is that I'll work on, or the next sibling directory. Can I define a command `prev` or `next` that will simply `cd` me into the previous directory, or next directory (by alphabet or whatever)? Because typing `cd ../com<TAB><Arrow keys>` all the time is getting a bit old.


title: Redirect terminal output to image file

text: I need to programmatically run some unix commands and get the output in a image file, the format could be `png` or `jpeg` (`jpg`). The commands are run in an AIX (IBM *nix) machine. I don't have permission to install new packages, however I think there a way to do this using a pipeline and redirections with the default packages from the Operating System. Unfortunately I couldn't find a method to do this.


title: netcat doesn't work as expected when detached from console with nohup (Ubuntu/Debian 64bit)

text: I'm trying to leave netcat running and close the ssh session (even stop the ssh daemon). But it then exits before all of the data is written. I'm testing in a non-ssh (local) console:               nohup nc -l -p 4000  | dd of=/home/myname/test.txt 2>/run/user/myname/stderr  1>/run/user/myname/stdout &      To test it, I close the console and in another console I dump a file:               dd if=/var/log/Xorg.0.log  |  nc localhost 4000      Nothing gets written in /home/myname/test.txt. But if I remove the nohup command, test.txt contains all data dumped. How to get netcat working and detached from the console ?


title: How to condense subdirectories

text: I have one directory with many sub-directories. All of those sub-directories contain files which each have unique names. I want to take all the files from all of the sub-directories and move them all to one directory. There are a few hundred sub-directories, so I wouldn't want to do this by hand. How would I go about writing a shell script to do this? I'm using bash.


title: convert timestamp to formatted time OSX

text: I had this working on Ubuntu but I'm now trying to run the script on OSX but it seems that the formatting of date is different. Originally I had: `date -d "$MODDATE" +%F" "%H":"%M` where `$MODDATE` is a unix timestamp generated with stat However the above date function doesn't work the same way on BSD versions. How can I convert the timestamp to the date in the following format: YYYY-MM-DD HH:MM ?


title: sharing folders in virtual box

text: I'm trying to run a Linux Mint guest inside a Linux Mint host(both 64-bit). I've installed Guest Additions etc. But I'm not able to access the shared folder.               sudo mount -t vboxsf kernel /media/sf_kernel        gives the error:               /sbin/mount.vboxsf: mounting failed with the error: No such device      Please help me debug and find the solution to this problem. I install the virtual box guest additions( from the vmware), dkms(both host and guest), build-essentials(both). In fact, I installed a lot of packages. Is the any list which can get the shared folder service to function appropriately?


title: Command line utility to read vCalendar files

text: I use alpine to read mails, and occasionally get emails from people with vCalendar files in attachment. Is there a command line utility that reads and displays vCalendar files?


title: Re-install ssh-keygen on unix/mac

text: Something is wrong with the way my Mac generates ssh keys. This has been the second time where I've created a key with `ssh-keygen -t rsa`. When I paste the created `id_rsa.pub` to use in a connecting service, it does not work correctly. But when I create it on another machine the same way, the public key works. My question is how do I uninstall and re-install the key generation tool for Mac? And mac ports is installed if that matters.


title: Equivalent of nfsstat -m on older kernel

text: On my SLES 10, SLES 11, and CentOS 6 servers, I'm able to list information about each NFS mount via `nfsstat -m`, e.g.:               /usr/local from nfssrv1:/vol/foo      Flags: rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=blah,mountvers=3,mountport=4046,mountproto=udp,addr=blah      We've got some older SLES 9 servers running kernel 2.6.5, and they report back "invalid option -m" when I try that command, so its not supported on the older nfs clients. How can I find out what flags are being used on these servers? My goal is to compare the default mount options between servers to troubleshoot some NFS issues in our environment.


title: Running a query without the OS cache

text: I want to emulate a client site who doesn't have much caching because they have so much I/O all the time. I want to run a SQL query on my machine (on my VM to be precise) with the same limitations they have, so I thought I would flush the cache before runnning it everytime. I need to flush the cache from postgres SQL (which I can do by restarting it, apparently). I also need to flush the OS cache in my VM (where the code is running) and on my host machine running the VM to make sure it won't optimize the whole VM. My goal is to able to run the query in a completely non- optimized fashion (without any kind of caching, not the OS, not postgres, nothing). So I've been running these commands (which I found in forums), on my VM and on my host :               sync;     echo 1 > /proc/sys/vm/drop_caches;     echo 2 > /proc/sys/vm/drop_caches;     echo 3 > /proc/sys/vm/drop_caches;      Do you think these are appropriate ? And do you think it's enough ? Or should I use another approach entirely ? I'm running Red Hat 6.2.


title: Connect Huawei E3131B 3g Modem

text: I am attempting to connect a Huawei E3131B 3g modem using Linux. I use usb- modeswitch and pppd. First I mode-switch the modem using the command:               usb_modeswitch -c /etc/usb_modeswitch.d/12d1:14fe -v 12d1 -p 14fe      (12d1:14fe) is the address of the modem. This creates the /dev/ttyUSB0, 1 and 2 ports that can be used to communicate serially with the modem. Next, I run pppd with the following options:               debug     modem     /dev/ttyUSB0     460800     crtscts     lock     -detach     noipdefault     defaultroute     dump     noauth     connect '/usr/sbin/chat -v -t 60 -f /etc/ppp/chat-isp'     :      The connection script, chat-isp, looks as follows:               ABORT 'BUSY'     ABORT 'NO CARRIER'     ''      ATI     OK      AT+CRSM=176,65507,0,0,17     OK      AT+CGDCONT=1,"IP","internet"     OK      ATQ0 V1 E1     OK      AT+CPIN="0000"     OK      AT+COPS=0,2     OK      AT+FCLASS=0     OK      AT+S0=0     OK      AT&D2&C1     OK      ATD*99#     CONNECT ""     ogin:     sword:      I'm going to be honest and say some of those AT commands are there plainly to try to get this thing to work! Can someone please help by telling me what is wrong with the connection script and what order / what AT functions need to be used to set up the modem?


title: [AMIBIOS]Default value not getting reflected on flashing BIOS

text: This is my first BIOS mod. we use a AMI BIOS from our OEM (Quanmax - KEMX-2030) Currently i am trying to change the default value setting in the BIOS .For, which i use AMIBCP for editing the default load values. Since, i am in Linux platform i use FLASHROM for flashing the bios. ISSUE: **After flashing the BIOS when i restart the computer the values are not getting reflected.But , when i enter the BIOS and select - load default bios option it sets the values as expected in bios. I was for to perform below mentioned work around to achieve this. On BIOS flashing why it doesn't reflect the default values.** What should i do to achieve to load default values on flashing the ROM.Please guide Workaround: **when i reset the CMOS from OS from flashing the BIOS ROM because of CMOS checksum mismatch it loads the default settings and works as expected.** Regards Venkat.S


title: Gentoo Linux Still Popular Today?

text: I have installed Gentoo Linux on a Thinkpad T42 and an earlier version Acer Laptop. But it has been years, installation on one laptop after another. I even planned to go further to install Funtoo Linux, which is written by the original Gentoo founder. If I'm not wrong, I remembered in Gentoo website, it says this particular distro is "a special flavor". Indeed, it is. Highly customizable and tedious installation process. My last few installaion took me 1 ~ 3 days to complete the OS compilation. After each installation, I have not taken time off to learn this OS. So many things have forgotten, even its trends and new linux distro, Ubuntu, Arch, Puppy, &c Now, I have another set of Thinkpad X-series (x86) for a fresh installation of Linux OS. **I want to ask based on today's trend for mobility, such as android, is Gentoo development catching up with today's popularity, if not what would be equivalent to Gentoo?** Looking at Linux Distro from Wikipedia, the timeline based on initial release over 10 years are Slackware, Debian, FreeBSD, Gentoo. But the Gentoo hasn't been growing in its popularity since then. http://en.wikipedia.org/wiki/Linux_distribution The equivalent closest to Gentoo I have seen in Wiki page is Chromium OS, > "designed by Google that primarily runs web applications, using Gentoo as > its foundation." - Wiki However, though, nothing seem to have mentioned in particularly about Gentoo OS in Chromium Website. The relatable term I can see is "Portage", which is Gentoo's Package Manager. (Correct me if I'm wrong.) http://en.wikipedia.org/wiki/Chromium_OS **My next question is could Chromium OS be the future Gentoo-alike OS based on future key trend of mobility?**


title: Connection ec2 instance operation timeout error using ssh

text: After creating a new instance, I am trying to access my instance like below:               ssh -i private_key.pem root@my_instance_public_domain      but the operation is timing out. I have updated the private key file permission using               chmod 400      and also edited default security group by adding a new in bound rule, selecting SSH and source Ip as 1.12.34.0/32 but getting `port 22: Operation timed out`. What I am missing.


title: How to change a *.tbz's +INSTALL file, and repack the package in FreeBSD, without installing the package

text: I am running on FreeBSD 8.2, I have a device that will run NanoBSD 7.4. To install packages for nanobsd, you put them in `/usr/src/tools/tools/nanobsd/Pkg`, and uncomment the line in your config. I need to get JamVM installed on the NanoBSD, this depends on `diablo-jre`. When `nanobsd.sh` tries to install the diablo package, the log `_.cust.cust_pkg` is spammed with `Do you accept the license [yes/no]`. I need to unpack the diablo package and edit `+INSTALL`, then repack it. How can I do this? Same question but on superuser: http://superuser.com/questions/290494/update- diablo-jre-freebsd7-i386-1-6-0-07-02-tbz-install-do-you-accept-when-ins


title: Indenting multiple files

text: I want to indent multiple files which are poorly indented and indent them properly as would vim do when I type `gg=G`. Is there someway to enter the `=` command or its alias in the command mode? i.e after a `:`? If that is possible I can use the bufdo command like in this question.


title: How to remove the directory a symbolic link links to plus the symbolic link?

text: Say `a` is a symbolic link to `b`. I am looking for a simple command to remove both `a` and `b` at once that does not require me to know about `b`.


title: Linux Mint 12 on HP Pavillion DV7 - Wireless is not working

text: I just installed Linux Mint 12 using mint4win just to test it out. I have a problem with my wireless connection. When I start Mint, it sees the network I wish to join, I select it, enter the correct password, and 1 minute later I am being prompted for a password again. During that waiting time, I was not connected at all. It appears if I turn off my Wireless (by tapping on the Wireless LED on the laptop), it wont turn on again either. My Ethernet port is broken as well, so I cannot connect with a cable either. In Windows I can connect fine using Wireless. Is there any drivers required for this to work? I cant seem to find any, and they have to be downloadable from Windows so I can put them on an USB and run them in Mint. Thank you in advance EDIT: My Wireless chip is an Atheros AR9285


title: Using live-helper offline

text: I'm trying to create a custom Debian liveCD using live-helper, but offline. It was more or less possible with apt-cdrom (using the official DVDs to solve all the dependencies). I did `lh config` and then `lh build`, like I'm supposed to. Problem is it failed and gave me this error:               E: Failed getting release file: http://ftp.de.debian.org/debian/dists/squeeze/Release      I poked around the internet and found an option about `\--mirror-bootstrap` and using it to redirect to _http://localhost/debian_ , but it gives the same error. I even tried fetching the _Release_ file and using a local path (eg `/root/debian/dists/squeeze/Release`), but it wouldn't recognize it. I seem to need to use a URL, but I can't use a url to redirect to local hard drive. I did find this though: http://lists.debian.org/debian- live/2007/07/msg00152.html   I didn't find any solution there, but it's the most information I could find. I can't connect that computer to the internet, what can I do??


title: X, Xorg and D-Bus: what is the difference?

text: In the process of learning to do certain things in GUI programming (e.g., reserving space on the screen for an application), I have to learn more about the Window Manager, usually X11 on Linux (I'm not sure whether there even are distro's, which use anything else than X11, although I heard about Wayland, which is not yet implemented in any.) I'm quite new to programming, and impatient; so I'm just diving into it. Now I am reading the ICCCM, with the hope to learn more. This document however aims at a public that knows (way) more than me. So I came across some information, and I would love to get some clarifications. Section 2 of the ICCCM quotes: > Note that all data transferred between an owner and a requestor must usually > go by means of the server in a X Version 11 environment. A client cannot > assume that another client can open the same files or even communicate > directly. The other client may be talking to the server by means of a > completely different networking mechanism (for example, one client might be > DECnet and the other TCP/IP). Thus, passing indirect references to data > (such as file names, host names and port numbers, and so on) is permitted > only if both clients specifically agree. As far as I understand, X Window Manager is built on Top of X Server (thanks Wikipedia). In the quote above: it says the client can communicate with the server using DECnet or TCP/IP. So far I thought that "server" was a figure of speech, now I am doubting: **is X server a server as in a "web server"? How should I understand its function/definition?** Then, there often are references to X11, Xorg, X Server and/or X Window Manager. It gets confusing: **is X11 a bundle including Xorg and X Window Manager? If so, is there anything else in this X11 bundle?** X also needs mouse or keyboard or any other kind of input: **is this part of X Server's functions too? Is X Window Manager strictly looking after the display only?** Finally, the quote here above also mentions client communicating or not with each other: this reminded me of D-Bus, which I've used a bit for learning purposes. With D-Bus you can also trigger window events. That gets me a bit confused as to how programs should communicate with one another: * _what difference is there between programs interacting using X Server or using D-Bus? *_ It's a shame this information remains somehow obscure, it makes it harder to learn, but hopefully you can bring some light on this :) Thanks.


title: Insert multiline text into several files via commandline

text: I want to insert some code into multiple `tex` files `foo*.tex` in a directory, one line after `\documentclass{.*}`. Note that the files have different document classes so the `.*` is just a symbolic placeholder here. The code has multiple lines, for example               \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ngerman}      What's the best way to do this automatically?


title: How to increase Xen guest CPU utilization?

text: My Xen `dom0` is a Gentoo x64 pvops. I boot my guest Gentoo, in **PV** mode, system with the same kernel my `dom0` uses. When I `emerge` in the guest system, building a CPP package, I am experiencing low CPU utilization. From the `System Monitor` tool on `dom0`, I see the CPU utilization is about 12% for both cores. But in the guest, the system is almost hung. Building a package takes forever.


title: grep and tail -f?

text: Is it possible to do a `tail -f` (or similar) on a file, and `grep` it at the same time? I wouldn't mind other commands just looking for that kind of behavior.


title: Prepare a computer for being firstly used in my home network with a BASH script is possible?

text: I need a script that detects the computer joined the same home network and standardize its folder structure. For example If there's A, B and C computers in a network which are configured to have a standard folder structure and connected to a NAS to store the downloaded files. It does not matter I downloaded a file from computer A or B or C. All newly downloaded files will be moved in some predefined special folder in the NAS. And if a 4th computer like computer D gets added to the same network, it will be configured like the 3 others in the same manner automatically by means of a script. How can I write such a script ?


title: Is the Creative Sound Blaster X-FI Surround 5.1 SB1090 USB sound card supported in Linux?

text: And to what extent does this card have support in Linux?


title: How to print specific pages from the command line?

text: Is there a way to send a PDF file (or files) to the printer via the command line, but print only, say, odd-numbered pages? E.g., `lpr -{some option} *.pdf` Or perhaps `{some command to get odd-numbered pages} *.pdf | lpr`. This would be faster than opening each file, opening the Print dialogue, and telling it to print pages 1, 3, 5, 7, 9... The idea is to print all odd pages, then I can print the even numbered pages on the other side of the paper.


title: Can I remove *-dev packages if I'm not compiling apps from source code?

text: I rarely compile source code myself and mostly install stuff using apt-get. So, can I safely uninstall all those *-dev files? Or are some apps reliant on them?


title: Is the Zalman ZM-RSSC 5.1 USB Sound Card supported in Linux?


title: non root ssh keys help

text: I'm having issues setting up a different CentOS account with its own pair of SSH keys. I have created the required files but when connecting with Putty it says Connection refused, here's the putty log:               2013-03-31 23:09:14 Looking up host "XXX.XXXXXX.XXXXX"     2013-03-31 23:09:14 Connecting to XX.XX.XXX.XXX port 22     2013-03-31 23:09:14 Server version: SSH-2.0-OpenSSH_5.3     2013-03-31 23:09:14 Using SSH protocol version 2     2013-03-31 23:09:14 We claim version: SSH-2.0-PuTTY_Release_0.62     2013-03-31 23:09:14 Doing Diffie-Hellman group exchange     2013-03-31 23:09:15 Doing Diffie-Hellman key exchange with hash SHA-256     2013-03-31 23:09:15 Host key fingerprint is:     2013-03-31 23:09:15 ssh-rsa XXXX XX:6s:18:67:a3:39:39:95rn:21:p1:9b:12:4b:1p:24     2013-03-31 23:09:15 Initialised AES-256 SDCTR client->server encryption     2013-03-31 23:09:15 Initialised HMAC-SHA1 client->server MAC algorithm     2013-03-31 23:09:15 Initialised AES-256 SDCTR server->client encryption     2013-03-31 23:09:15 Initialised HMAC-SHA1 server->client MAC algorithm     2013-03-31 23:09:15 Reading private key file "C:\Users\XXXXX\Desktop\SSH-Key.ppk"     2013-03-31 23:09:15 Offered public key     2013-03-31 23:09:15 Server refused our key     2013-03-31 23:09:15 Using SSPI from SECUR32.DLL     2013-03-31 23:09:15 Attempting GSSAPI authentication     2013-03-31 23:09:16 GSSAPI authentication request refused     2013-03-31 23:09:16 Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)


title: Is disk space wasted when an ISO is mounted?

text: When we do `mount -o loop filename.iso /path/to/mountdir`, is twice the memory required to store the files? If no resources are used, can I mount hundreds of ISOs at a time? As in, is it like a softlink to original files or a copy of files in ISO?


title: DHCPD ignoring my subnet declaration

text: `eth0`, my internal interface, has a static address of `10.0.0.1`. I also have an interface, `p4p1`, acting as my external interface. If it matters, my external interface is not physically connected and `iptables` is off/still being written. `/etc/sysconfig/dhcpd`:               DHCPDARGS=eth0      subnet clause from `/etc/dhcpd.conf`:               subnet 10.0.0.0 netmask 255.255.255.0 {       option routers 10.0.0.1;       option domain-name-servers 10.0.0.1;       option ntp-servers 10.0.0.1;       default-lease-time 86400; # 1 day        max-lease-time 604800;    # 7 days       use-host-decl-names on;       ddns-updates on;            use-host-decl-names on;       allow unknown-clients;       ignore client-updates;            option domain-name "localdomain";       ddns-domainname "localdomain";       next-server 10.0.0.1;       filename "pxelinux.0";            group # known hosts       {         host host1.localdomain  {hardware ethernet [REDACTED]; fixed-address host1.localdomain;}         host host2.localdomain  {hardware ethernet [REDACTED]; fixed-address host2.localdomain;}       {            pool       {         one-lease-per-client true;         ping-check true;         range 10.0.0.51 10.0.0.60;       }     }      So, why am I still getting the "No subnet declaration" error message at launch?               No subnet declaration for eth0 (10.0.0.1).     ** Ignoring requests on eth0.  If this is not what        you want, please write a subnet declaration        in your dhcpd.conf file for the network segment        to which interface eth0 is attached. **      **UPDATE 4/1 1900h** Prior to tonight's experiments:               [root@father ~]# ip addr show dev eth0     3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 90:e2:ba:2d:92:4d brd ff:ff:ff:ff:ff:ff         inet 10.0.0.1/24 brd 10.0.0.255 scope global eth0         inet6 fe80::92e2:baff:fe2d:924d/64 scope link             valid_lft forever preferred_lft forever      I switched my internal network IP addresses to `192.168.100.0/24` with matching changes to `/etc/dhcpd.conf` for no change in behavior.               [root@father ~]# ip addr show dev eth0     3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 90:e2:ba:2d:92:4d brd ff:ff:ff:ff:ff:ff         inet 192.168.100.1/24 brd 192.168.100.255 scope global eth0         inet6 fe80::92e2:baff:fe2d:924d/64 scope link             valid_lft forever preferred_lft forever          [root@father ~]# route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0     192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 p4p1     169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 p4p1     169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth0      Oh, hey! No gateway there! That's easy to fix with a `GATEWAY=192.168.0.1` in the `ifcfg-eth0` and `ifcfg-p4p1` files. `service network restart` and...               [root@father ~]# route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0     192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 p4p1     169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 p4p1     169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth0     0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 p4p1      So, I have a gateway, but `service dhcpd start` fails with the same error. Other notes:   * `p4p1` is not physically connected.   * `service dhcpd configtest` says `Syntax: OK`. So, this almost certainly is not a case of a misplaced brace.


title: openldap supplementary groups not showing up on certain servers

text: i have a couple of servers that fail to display newly added supplementary groups. Example, I have a user, which you run id and his groups come up. id   groupblah, groupblahblah , groupblahblahblah they show up initially, but if you add that user to an LDAP group, example hr_managers, on ldap it shows hes a member but on some servers, if you run id command, id groupblah, groupblahblah , groupblahblahah #( but no hr_managers) show up getent passwd ; displays the user getent group ; displays hr_manager Does anybody have any ideas how to resolve this? Better yet, how does the ldap server go about getting this group information. Would the nss_group search have anything to do with it? any help would be appreciated.


title: screen flashes when I press ^S in gvim

text: I bind ^S in gvim, by: `map <C-S> :w<CR>` Now if I press the `^S` combination, althrough file is saved (I saw the XXX written message), but gvim window flashes, is there a way to avoid that?


title: How to troubleshoot high kernel time (high network usage; high interrupts)

text: I've noticed that I have high kernel time when doing a lot of network traffic in Linux. I also noticed that 45% of my CPU is spent doing interrupts. How can I further troubleshoot this?


title: What is the fastest way to extract an ISO?

text: Currently I'm mounting an ISO to a (readonly) directory (using `mount -o loop` command) and then copying the contents to another normal directory. This takes lot of time as the ISO is large. Is this the only way to do so, or there are some alternatives?


title: Group ID 501 cannot be found

text: A file in a directory has a Group ID "501"   After checking /etc/group, Group ID "501" was not found   how is that possible ?


title: Is there any command to list all related files and folders to specified file in macosx?

text: I have many ctags in my macosx. When doing `which ctags`, it gave me `/usr/bin/ctags`. But I also want to know where is all related folders and files to this `/usr/bin/ctags` Any useful command?


title: How to enable touchpad clicking in fedora?

text: How can I enable click feature of laptop touch pad in fedora 20? My fedora 20 does not recognize clicking with a touch pad.


title: What is the difference between a system with consolekit and the one without it?

text: First of all, I'm using Debian testing system with standalone Openbox. I don't have systemd, just sysvinit, and I certainly won't use systemd . Yesterday my Debian box started returning messages like the ones below:               Jun 14 18:08:10 morfikownia login[4722]: pam_unix(login:session): session opened for user morfik by LOGIN(uid=0)     Jun 14 18:08:10 morfikownia dbus[4391]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)     Jun 14 18:08:10 morfikownia dbus[4391]: [system] Activated service 'org.freedesktop.ConsoleKit' failed: Failed to execute program org.freedesktop.ConsoleKit: Success     ...     Jun 14 18:08:19 morfikownia pulseaudio[4855]: [pulseaudio] sink.c: Default and alternate sample rates are the same.     Jun 14 18:08:19 morfikownia pulseaudio[4855]: [pulseaudio] source.c: Default and alternate sample rates are the same.     Jun 14 18:08:20 morfikownia dbus[4391]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)     Jun 14 18:08:20 morfikownia dbus[4391]: [system] Activated service 'org.freedesktop.ConsoleKit' failed: Failed to execute program org.freedesktop.ConsoleKit: Success     Jun 14 18:08:20 morfikownia pulseaudio[4855]: [pulseaudio] module-console-kit.c: GetSessionsForUnixUser() call failed: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program org.freedesktop.ConsoleKit: Success     Jun 14 18:08:20 morfikownia pulseaudio[4855]: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.     Jun 14 18:08:20 morfikownia pulseaudio[4855]: [pulseaudio] main.c: Module load failed.     Jun 14 18:08:20 morfikownia pulseaudio[4855]: [pulseaudio] main.c: Failed to initialize daemon.      Moreover, each `su` command generates the following log:               Jun 14 18:08:50 morfikownia su[6043]: Successful su for root by morfik     Jun 14 18:08:50 morfikownia su[6043]: + /dev/pts/2 morfik:root     Jun 14 18:08:50 morfikownia su[6043]: pam_unix(su:session): session opened for user root by (uid=1000)     Jun 14 18:08:50 morfikownia dbus[4391]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)     Jun 14 18:08:50 morfikownia dbus[4391]: [system] Activated service 'org.freedesktop.ConsoleKit' failed: Failed to execute program org.freedesktop.ConsoleKit: Success      I managed to fix these issues. In the case of PulseAudio, I just commented out these lines from the `/etc/pulse/default.pa` file:               ### If autoexit on idle is enabled we want to make sure we only quit     ### when no local session needs us anymore.     #.ifexists module-console-kit.so     #load-module module-console-kit     #.endif     #.ifexists module-systemd-login.so     #load-module module-systemd-login     #.endif      In the case of everything else, I had to run `pam-auth-update` and unchecked `ConsoleKit Session Management`:                PAM profiles to enable         [ ] encfs encrypted home directories                           [*] Unix authentication                                        [ ] Mount volumes for user                                     [*] GNOME Keyring Daemon - Login keyring management            [ ] ConsoleKit Session Management                              [ ] Inheritable Capabilities Management      And a small change was needed to the `~/.xinitrc` file:               #exec ck-launch-session dbus-launch --sh-syntax --exit-with-session openbox-session     exec openbox-session      because when I was trying to check a session list, I got the following error:               $ ck-list-sessions          ** (ck-list-sessions:15584): WARNING **: Failed to get list of seats: Failed to execute program org.freedesktop.ConsoleKit: Success      There's no errors now, but I have no idea what changes these steps can cause. I know the consolekit is dead one way or another, so this ultimately would happen anyway. Meanwhile, I'm reading this question in order to understand what will happen after this change, but I don't get many things. > It allows switching users without logging out [many user can be logged in on > the same hardware at the same time with one user active]. I can do `su user`, and it changes without a problem:               Jun 15 10:36:57 morfikownia su[103349]: Successful su for morfik2 by morfik     Jun 15 10:36:57 morfikownia su[103349]: + /dev/pts/5 morfik:morfik2     Jun 15 10:36:57 morfikownia su[103349]: pam_unix(su:session): session opened for user morfik2 by (uid=1000)      I can also log many users in via ssh. So where's the advantage of using consolekit? Could you tell me if deleting it can cause any security problems, and how can I see the change? Because it looks like nothing has changed.


title: Sharing partitions in qemu

text: Apart from networking and partition sharing I've made qemu work pretty much like I want it to. I've got a bit of a special setup, I need to pass through `/dev/sda`, `/dev/sda1` and `/dev/sda2`. (Is it possible to passthrough `/dev/sda` without passing through `/dev/sda3` with it? I can live with using alternative methods.) `/dev/sda` (MBR) = Windows Bootmgr on `/dev/sda1` `/dev/sda1` = System Reserved partition (Windows's bootloader) `/dev/sda2` = Windows 7's `C:/` partition `/dev/sda3` = Arch Linux (Host) I've got `/dev/sda3`'s grub installed into the MBR of `/dev/sdc` (meaning booting `/dev/sdc` will boot me into my arch Linux install, booting `/dev/sda` will boot me into Windows) I will be passing through `/dev/sdc` as well but this one is easy as the host doesn't need any access to this drive after booting. Finally I have a GPT, (NTFS) storage partition on `/dev/sdb2` that I want to be easily accessible from both the host and my guest at the same time (I want to share it between both systems) How do I proceed with `/dev/sda` and `/dev/sdb2`?


title: Process a file that starts with a BOM (FF FE)

text: I received a .csv file with the `FF FE` BOM:               $ head -n1 dotan.csv | hd     00000000  ff fe 41 00 64 00 20 00  67 00 72 00 6f 00 75 00  |..A.d. .g.r.o.u.|      When using `awk` to parse it I'm getting a bunch of null bytes, which I suspect is due to the byte order. How can I swap the byte order on this file (using the CLI) so that normal tools will work with it? Note that I think that this file is only ASCII characters (except for the BOM), but I cannot confirm that as `grep` thinks that it is a binary file:               $ grep -P '^[\x00-\x7f]' dotan.csv      Binary file dotan.csv matches      Searching for the same string in VIM shows _every character_ matching! Using `iconv` to convert to ASCII does not get rid of \x00 values, actually it makes the problem worse as now they look like null bytes instead of UTF-8!               $ iconv -f UTF-8 -t ASCII dotan.csv > fixed.txt      iconv: illegal input sequence at position 0          $ iconv -f UTF-8 -t ASCII//IGNORE dotan.csv > fixed.txt          $ head -n1 fixed.txt | hd     00000000  41 00 64 00 20 00 67 00  72 00 6f 00 75 00 70 00  |A.d. .g.r.o.u.p.|      **How can I swap the byte order on this file (using the CLI) so that normal tools will work with it?**


title: LUKS: Enter passphrase and nothing happens

text: I've installed gentoo on my new laptop. I've got an LUKS-encrypted root partition (/dev/sda3). Cryptsetup (USE="gcrypt") is installed. Essential cryptographic API is compiled in kernel. Kernel and initrd image are built using genkernel-next (--luks --gpg). I use GRUB2 and these kernel options: `root=/dev/ram0 crypt_root=/dev/sda3 real_root=/dev/mapper/root rootfstype=ext4` I also tried to omit `rootfstype`, and `root=/dev/mapper/root` (no `real_root`), but nothing has changed. When I boot my system it asks me for my password: `Enter passphrase for /dev/sda3:` ... and after I type (in)correct password nothing happens: I can type any symbol infinitely. Any ideas? I can boot with live-cd and successfully mount this encrypted volume with `cryptsetup`.


title: Install MP3 decoder plugin in Fedora

text: When I attempt to play a mp3 file Rhythmbox displays the following error: ![enter image description here](http://i.stack.imgur.com/dEwXk.png) How can I install the mentioned plugin?


title: How can I make mutt show Date field of mail on the index screen?

text: I'd like to see the mail's date in the list that appears when I start `mutt`. How can I do that?


title: Setting mailman to reject message when max_num_recipients exceeded?

text: I'm trying to configure a mailman list I run to reject messages when `max_num_recipients` is exceeded, but instead it insists on putting the message into the moderation queue. I've searched for details on how to change this behavior, but the only docs I can find simply mention changing the value of `max_num_recipients`, not changing its action. Is it actually possible (without changing the source!) to do this, or would I be better off simply unsubscribing the offending list member and getting on with life? (No, increasing `max_num_recipients` to let him continue doing something he's already been warned about is not an option :)


title: "unexpected end of file" in bash script

text: I have this if in a bash script:               if [ $ACTION = deploy ]; then         ${JAVA_HOME}/bin/java ${JVM_ARGS} weblogic.WLST << EOJ         connect('XXX','XXX','t3://XXX:8001')         jndi();         ls();         disconnect();         exit ();         EOJ     else         echo "XXX"     fi      I think the error is in the EOJ, but I cannot figure how to correct it, I'm not so good in bash scripting.


title: Find out how much all tmp directy occupy

text: How can I know the size of all tmp folders for all users. I tried               du -h /home/*/tmp      But it did not add them all together.


title: How to download a file through an SSH server?

text: I have a server in USA (Linux box B), and my home PC (Linux box A), and I need download a file from website C, The issue is, it is very slow to download a file direct from A, so I need download the file when I log in B, and `sftp` get the file from A. Is there any way that I can download file and use B as proxy directly through only one line command?


title: Does a terminal multiplexer have any benefit when used with a tiling window manager?

text: Both terminal multiplexers (screen, tmux) and keyboard-driven tiling window managers (ratpoison, dwm, xmonad) provide similar functionality. Is there any benefit in using both at the same time? What about problems that may arise?


title: What is the formula to determine how much memory a socket consumes under Linux?

text: I'm doing some capacity planning and I was wondering if there is a formula that I could use to predict (from a memory standpoint) how many TCP connections I could handle on my server. At the moment, I'm only concerned about memory requirements. Some variables that I think will show up in the formula are:   * sysctl's `net.ipv4.tcp_wmem` (min or default value)   * sysctl's `net.ipv4.tcp_rmem` (min or default value)   * the size of the sock, sock_common, proto and other per-socket data structures. I'm not sure how much of the tcp_wmem and tcp_rmem are actually allocated and when that memory is allocated. At socket creation time? On demand?


title: Poor network performance from KVM virtual machine

text: I am running a 32-bit Linux virtual machine on KVM. The host machine is a 64-bit Linux machine connected to a LAN. Attempting to transfer files with scp from the KVM machine to a server on the LAN gives abysmal performance, about 500kB/s over gigabit Ethernet. Around 1% of the expected rate. Any suggestions?


title: vncserver refuses to start

text: I have a Fedora 15 server that has been running just fine for months until I suffered a power outage. After the recovery, all services came back up just fine except `vncserver`. When I try to start the daemon with the following command:               # service vncserver start      I get the following:               Starting vncserver (via systemctl): Job failed. See system logs and 'systemctl status' for details. [FAILED]      I've looked in `/var/log/messages` and could not find the culprit. Doing a `systemctl status vncserver.service` yields the following:               vncserver.service - LSB: start|stop|restart|try-restart|status|force-reload vncserver     Loaded: loaded (/etc/rc.d/init.d/vncserver)     Active: failed since Mon, 23 Jan 2012 22:57:11; 1min 28s ago     Process: 4701 ExecStart=/etc/rc.d/init.d/vncserver start (code=exited, status=126)     CGroup:name=systemd:/system/vncserver.service      Please keep in mind that the problem does not lie in the `vncservers`, `iptables`, or `xstartup` files as all of these were working perfectly before the outage; they have not changed, and I have exact duplicates of these files on another machine that run just fine as-is. Uninstalling and reinstalling from RPM does no good.


title: Limit window size when maximizing in Xfce

text: I have a window that is marked 'always on top'. I want to be able to maximize another window and it have not hide behind the always on top window. Is this possible?


title: What are "session leaders" in `ps`?

text: What are session leaders, as in `ps -d` which selects all processes except session leaders?


title: Permissions for Apache and FTPd users

text: I'd like advice about permissions on directories and files on a web/ftp server. Here is my situation: Debian Server with those user:group   * `userme:userme` for SSH   * `www-data:www-data` for apache/php   * `ftpuser:ftpgroup` for pure-ftpd File system :               -[/srv/data_disk]         -[Websites]             -[site1.tld]                 -...             -[site2.tld]                 -...         -[Webapps]             -[App1]                 -...             -[App2]                 -...             -config1.php             -config1.php      Explanation:   * Files and dirirectories in `siteX.tld` will be uploaded by ftpuser.   * There is a "upload" subdir in `siteX.tld` where `www-data` will be able to create directories and write files.   * Ftpuser should be able to delete those files created by `www-data`.   * `AppX` directories are created by `userme` in ssh   * they should be read by `www-data` (with a special directory where apache should be able to create/delete files)   * And be accessible by `ftpuser` in read-only mode (for remote updates purposes) What I thought to do (but I need confirmation that it is a good practice) is make:   * `ftpuser` => member of `ftpgroup` AND `www-data` group   * `www-data` => member of `www-data` group AND `ftpgroup` AND `userme` group   * `userme` => member of `userme` group AND `www-data` group And then I will `chmod` as follows :               -[/srv/data_disk]      => userme:userme 700         -[Websites]                    -[site1.tld]    => ftpuser:ftpgroup 750                 -...                            => ftp uploaded dirs/files = ftpuser:ftpgroup 750                      => apache uploaded dirs/files = www-data:www-data 770               -[Webapps]      => userme:userme 750             -[App1]      => userme:userme 755                 -...                     => ssh uploaded dirs/files = userme:userme 755                      => apache created files = www-data:www-data 775       Does it sounds safe to you? Ftpusers are chrooted so as apache...


title: Why does the Linux installation fail on this machine?

text: I have tried to install Ubuntu and ArchLinux on the machine and the installation went fine but the boot process fails with both system. In the case of Arch the boot doesn't even start. In the case of Ubuntu the boot either stuck on grub rescue console after a message of ``out of disk'' or grub is loaded but I can't load the system (stuck on kernel load for a huge period of time and finally reload grub menu). is the farthest I have gotten. I also tried Slax (which froze during loading) and XBMC Live (which froze as well). I have a machine very similar to this. The main differences are: larger 320GB HD made by Toshiba with S.M.A.R.T technology and 1GB of memory.


title: Frequently used "ps" (process status) commands in linux?

text: **EDITED:**   1. These are the the only most commonly used (and important) ps command options I've come across so far: `$ ps ux, $ ps au, $ ps aux, $ ps U aahan, $ ps uU aahan` So, is that all, or am I missing 1 or 2?   2. Can someone tell me the difference between `$ ps au` and `$ ps aux`?


title: How are NTFS drives handled by Linux? Nothing is in fstab yet it's automounted. Nothing in mtab yet it's currently mounted

text: I'm running Fedora 14 with the 2.6.35.13-92.fc14.i686 kernel and Gnome 2.32.0. I have a few NTFS drives that are mounted when I start up. However, there is no entry for them in fstab and nothing in mtab. (EDIT: The NTFS drives aren't in /proc/mounts either) Furthermore there is no mention of any NTFS filesystems in /etc/filesystems and /proc/filesystems. FYI, all of the NTFS commands on my system are as follows:               # compgen -c | grep ntfs     ntfs-3g     ntfsmount     ntfsmftalloc     ntfs-3g.probe     ntfsdump_logfile     ntfsfix     ntfsdecrypt     ntfs-3g     ntfs-3g.secaudit     ntfs-3g.usermap     ntfsls     ntfscat     ntfstruncate     ntfswipe     ntfsmount     lowntfs-3g     ntfscmp     ntfsinfo     ntfsck     ntfscluster     ntfsmove     ntfslabel     mount.ntfs-3g     mount.ntfs     mount.lowntfs-3g     mkntfs     ntfscp     mkfs.ntfs     ntfsundelete     mount.ntfs-fuse     ntfsclone     ntfsresize      **Questions:**   1. How does a Linux machine auto-mount an NTFS drive without looking at fstab?   2. How is an NTFS drive mounted without NTFS being listed in either of the above to filesystem files?   3. Why is there no mention of a mounted NTFS filesystem in mtab even though they're mounted on my system and browsable?


title: What is the difference between the following kernel Makefile terms: vmlinux, vmlinuz, vmlinux.bin, zimage & bzimage?

text: While browsing through the Kernel Makefiles, i found these terms. So i would like to know what is the difference between `vmlinux`, `vmlinuz`, `vmlinux.bin`, `zimage` & `bzimage`?


title: SLiM not working in Arch Linux with Gnome

text: I'm trying to change my login manager to SLiM and the theme I want for my login screen is archlinux-simplyblack:               [cesar@arch ~]$ ls -la /usr/share/slim/themes/     total 108     drwxr-xr-x 27 root root 4096 May  9 19:43 .     drwxr-xr-x  3 root root 4096 May  8 11:11 ..     drwxr-xr-x  2 root root 4096 Nov 23  2008 archlinux-darch-grey     drwxr-xr-x  2 root root 4096 Nov 23  2008 archlinux-darch-white     drwxr-xr-x  2 root root 4096 Nov 23  2008 archlinux-retro     drwxr-xr-x  2 root root 4096 Nov 23  2008 archlinux-simplyblack     drwxr-xr-x  2 root root 4096 Nov 23  2008 archlinux-soft-grey     drwxr-xr-x  2 root root 4096 Feb 25 04:16 capernoited     drwxr-xr-x  2 root root 4096 Feb 25 04:16 debian-moreblue     drwxr-xr-x  2 root root 4096 May  8 11:11 default     drwxr-xr-x  2 root root 4096 Feb 25 04:16 fingerprint     drwxr-xr-x  2 root root 4096 Feb 25 04:16 flat     drwxr-xr-x  2 root root 4096 Feb 25 04:16 flower2     drwxr-xr-x  2 root root 4096 Feb 25 04:16 isolated     drwxr-xr-x  2 root root 4096 Feb 25 04:16 lake     drwxr-xr-x  2 root root 4096 Feb 25 04:16 lotus-midnight     drwxr-xr-x  2 root root 4096 Feb 25 04:16 lotus-sage     drwxr-xr-x  2 root root 4096 Feb 25 04:16 lunar     drwxr-xr-x  2 root root 4096 Feb 25 04:16 mindlock     drwxr-xr-x  2 root root 4096 Feb 25 04:16 parallel-dimensions     drwxr-xr-x  2 root root 4096 Feb 25 04:16 previous     drwxr-xr-x  2 root root 4096 Feb 25 04:16 rainbow     drwxr-xr-x  2 root root 4096 Feb 25 04:16 rear-window     drwxr-xr-x  2 root root 4096 Feb 25 04:16 scotland-road     drwxr-xr-x  2 root root 4096 Feb 25 04:16 subway     drwxr-xr-x  2 root root 4096 Feb 25 04:16 wave     drwxr-xr-x  2 root root 4096 Feb 25 04:16 zenwalk      In order to run SLiM at boot time I edited my `/etc/rc.conf` an added slim to `DAEMONS` (I haven't changed my `/etc/inittab`):               DAEMONS=(syslog-ng dbus hal networkmanager net-profiles net-auto-wireless crond alsa gdm slim)      I created the `~/.initrc`:               #!/bin/sh          exec gnome-session      And also make `~/.initrc` executable:               -rwxr-xr-x  1 cesar users   30 May  9 00:22 .xinitrc      This is the what `/var/log/slim.log` shows:               Fatal server error:     Server is already active for display 0         If this server is no longer running, remove /tmp/.X0-lock         and start again.               Please consult the The X.Org Foundation support           at http://wiki.x.org      for help.                Giving up.     slim: unable to connect to X server     /usr/bin/xauth:  file /var/run/slim.auth does not exist               Fatal server error:     Server is already active for display 0         If this server is no longer running, remove /tmp/.X0-lock         and start again.               Please consult the The X.Org Foundation support           at http://wiki.x.org      for help.           Invalid MIT-MAGIC-COOKIE-1 keyGiving up.     slim: unable to connect to X server      What am I missing or doing wrong? **EDIT: /etc/slim.conf**               # Path, X server and arguments (if needed)     # Note: -xauth $authfile is automatically appended     default_path        /bin:/usr/bin:/usr/local/bin     default_xserver     /usr/bin/X     xserver_arguments -nolisten tcp vt07          # Commands for halt, login, etc.     halt_cmd            /sbin/shutdown -h now     reboot_cmd          /sbin/shutdown -r now     console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"     #suspend_cmd        /usr/sbin/suspend          # Full path to the xauth binary     xauth_path         /usr/bin/xauth           # Xauth file for server     authfile           /var/run/slim.auth               # Activate numlock when slim starts. Valid values: on|off     numlock             on          # Hide the mouse cursor (note: does not work with some WMs).     # Valid values: true|false     hidecursor          false          # This command is executed after a succesful login.     # you can place the %session and %theme variables     # to handle launching of specific commands in .xinitrc     # depending of chosen session and slim theme     #     # NOTE: if your system does not have bash you need     # to adjust the command according to your preferred shell,     # i.e. for freebsd use:     # login_cmd           exec /bin/sh - ~/.xinitrc %session     login_cmd           exec /bin/bash -login ~/.xinitrc %session          # Commands executed when starting and exiting a session.     # They can be used for registering a X11 session with     # sessreg. You can use the %user variable     #     # sessionstart_cmd  some command     # sessionstop_cmd   some command          # Start in daemon mode. Valid values: yes | no     # Note that this can be overriden by the command line     # options "-d" and "-nodaemon"     # daemon    yes          # Available sessions (first one is the default).     # The current chosen session name is replaced in the login_cmd     # above, so your login command can handle different sessions.     # see the xinitrc.sample file shipped with slim sources     sessions            gnome-session          # Executed when pressing F11 (requires imagemagick)     screenshot_cmd      import -window root /slim.png          # welcome message. Available variables: %host, %domain     welcome_msg         Welcome to %host          # Session message. Prepended to the session name when pressing F1     # session_msg         Session:           # shutdown / reboot messages     shutdown_msg       The system is halting...     reboot_msg         The system is rebooting...          # default user, leave blank or remove this line     # for avoid pre-loading the username.     #default_user        simone          # Focus the password field on start when default_user is set     # Set to "yes" to enable this feature     #focus_password      no          # Automatically login the default user (without entering     # the password. Set to "yes" to enable this feature     #auto_login          no               # current theme, use comma separated list to specify a set to      # randomly choose from     current_theme       archlinux-simplyblack          # Lock file     lockfile            /var/lock/slim.lock          # Log file     logfile             /var/log/slim.log


title: Variable declaration in parallel sh -c …

text: I've been trying to process the output of `find` with `parallel`, which in turn invoked a shell (some textual substitutions were needed). I observed some strange behaviour, which I cannot really explain to myself. In each directory there are a bunch of files, call them `file1.xtc`, `file2.xtc`. Some of them have names such as `file1.part0002.xtc`, etc. If the file passed from `find` had the `*.part000x.*` name, I need to remove the `*.part000x.*` bit, such that the resultant command is comething like               command -f file1.part0001.xtc -s file1.tpr       I used `find` and `parallel` to that effect but `parallel`'s substitutions (in particular, the `{.}` bit) are not quite sufficient (they remove the `.xtc` extension, leaving the `.part0001` alone), so here's a command I used to check my output:               find 1st 2nd 3rd -name '*.xtc' -print0 | parallel -0 sh -c 'name=""; name="{.}"; echo {.} ${name%.*}.tpr'      If I use the above command, first declaring `name` and assigning an empty string to it (or anything else for that matter), the result is               file1.part0001 file1.tpr      as required (those are the names I need to use for my command). If, however, I run this               find 1st 2nd 3rd -name '*.xtc' -print0 | parallel -0 sh -c 'name="{.}"; echo {.} ${name%.*}.tpr'      the result is:               file1.part0001 .tpr      or it behaves as if `$name` didn't exist. So the my questions are: -what is the reason for this behaviour? -what would be the preferred way of dealing with it? The first question is more important here, as the method I used above is a workaround, which, while not pretty, works. It is not the first time I needed to do a textual substitution like that and this behaviour continues to baffle me. Output of `sh --version`               GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)      output of a newer version of `bash` that I installed and used instead of `sh` in the above command (to the same effect) (`/usr/local/bin/bash --version`)               GNU bash, version 4.2.0(1)-release (i386-apple-darwin11.4.2)


title: Mimo 2G USB Monitor and cheap computer (Raspberry Pi?)

text: I have a Mimo 2G USB Monitor (UM-710S I believe) which I got in college due to the lack of space for a real second monitor in the dorm. Now I don't really have a use for it, so I thought of converting it into like a digital picture frame or something on a small/cheap Linux computer. I was thinking that when more Raspberry Pi's come out, that might do the trick. I also have found that Linux drivers should work: http://libdlo.freedesktop.org/wiki/ So my question is, has anyone used this or a similar USB monitor with Linux? With ARM Linux (such as the Raspberry Pi)? And is the Raspberry Pi my best bet for a simple application like this? Or is there something else I should look into hardware-wise? This is meant to be a relatively quick project to make use of something I already have. So I'm not looking for a completely custom hardware solution and it should be relatively cheap. I hope this is the proper place to ask this, but it seemed like a valid question.


title: Don't create partition schema in external devices

text: Is right to create a filesystem without to create a partition table in external devices non-boot? I've created directly a filesystem into a memory card (SD) and it has been mounted automatically when I inserted it.


title: Lock second mouse pointer & keyboard input to one window

text: This is basically a lite version of multiseat (see my other question): I can setup two mouse pointers (see e.g. here, here or here) and two keyboards (although my two identical logitech K200 keyboards show up as _four_ keyboards in `xinput list`, any ideas why?). Only this is not enough to allow two users to do things independently, since apparently only one window can be focused at a time so all keyboard input goes to that window. Can this behaviour be changed? Can the inputs of two keyboards be directed to two different windows at the same time? And can a mouse-locking application be told to only lock _one_ of the pointers? (in case your answer includes `Xephyr`, can that support direct open gl rendering?)


title: Distribution recommendation for a multiseat setup using dual-head and supporting direct rendering

text: I have two keyboards, mice and monitors and a ATI Radeon HD 4290 onboard a ASUS M4A89GTD PRO/USB3 mainboard. Can you recommend a distribution or livecd that supports the GPU and offers easy means to setup a dual-head multiseat system where both sessions have direct rendering enabled? (32 or 64 doesn't matter here, although 64 bit are preferred)


title: rsync: does it uses invisible configuration files?

text: I've a question about rsync command in unix. Does it save some configuration invisible files into the directories ? How does it know which files need to be added or not ? Or is just checking file by file ? I'm asking this because I'm planning to copy all files (but not the root directory) to another folder (svn working copy). thanks