title: Launch Iceweasel (Firefox) window undecorated

text: I am on Debian, where firefox is called Iceweasel. I would like it to start undecorated. I have added the following to my `.config/openbox/lxde-rc.xml`, but it has no effect:               <application name="firefox-bin">       <focus>yes</focus>       <decor>no</decor>       <maximized>true</maximized>     </application>      I have also tried different names, such as `firefox`, `iceweasel`, `iceweasel- bin`, but to no avail. Only when I add               <application name="*">      does `iceweasel` start undecorated (as do all other applications, obviously) Can somebody advise please? **NOTE:** I have the same problem with `Icedove` (Thunderbird) **UPDATE** : as suggested by goldilocks, following is the output of `ps -A | less`               ....      9501 ?        00:18:40 iceweasel     14826 ?        00:00:21 icedove     ....


title: get Various types of address used

text: How to get various address ranges of a running machine or a crash dump?   * User virtual address   * Physical address   * Bus address   * Kernel logical address   * Kernel virtual address I don't need the bus address. for eg: physical address range 0x00000000 to 0xffffffff I am testing crash utility so I need these values to verify functions of crash utility. Ref: Address types used in Linux


title: Changing title without changing prompt on Cygwin

text: I have the following shell script function from this site that allows me to change the title in both Putty and Cygwin. In Putty connected to a Linux host it changes the title and leaves the prompt as it was. But in Cygwin it changes the title and then the prompt becomes a mere $ or # sign. I would like to create a version for Cygwin that changes the title but leaves the prompt as it was. (I know I should try to create one first on my own before posting here but prompt strings I have always found confusing.) **EDIT:** More specifically, in Cygwin I like the default prompt of `user@hostname` followed by the current directory. I'd like to preserve THAT prompt. **EDIT II:** And I don't really care if the colors of the default Cygwin prompt are preserved, if that makes it easier. I just want at the very least the directory in the prompt. Here's what I have:               function wtitle {       if [ "$TERM" == "xterm" ] ; then         # Remove the old title string in the PS1, if one is already set.         PS1=`echo $PS1 | sed -r 's/^\\\\\[.+\\\\\]//g'`         export PS1="\[\033]0;$1 - \u@\h:\w\007\]$PS1"       else         echo "You are not working in xterm. I cannot set the title."      fi     }      `


title: Restrict FTP user to a directory

text: Sorry if this is an obvious question, but I don't have a lot of knowledge about this sort of thing, and I've googled for hours, nothing worked. So on a Ubuntu 11.04 server, I want to restrict a user to a specific directory (so he can't access the parents' directory) for FTP/ssh. I created the user with `adduser username` and changed the target directory with `usermod -d /home/path/to/directory username`. This worked perfectly. From what I found I have to modify a `/etc/ftp/ftpaccess` file but the file (and the ftp) directory does not exist. I tried creating it but it didn't change anything. Also I only want to restrict _this_ user and not the others. Any ideas?


title: Unkillable process after connection lost to Samba share?

text: Using this manual I've mounted a Samba share. I'm copying files to it using a Python script. Everything is working fine until some problem with the network occurs. After that I get unkillable processes in a "D" state. Furthermore, even standard programs like `ls` can faint and become unkillable if used on the mounted share. The only solution is to change the path in the config files of `automount`, restart `automount` service, and use the new path. But unkillable processes are still there, of course. So the question is: how to avoid this situation?


title: Short way to scp using the same dir/file in origin and target

text: I am frequently updating files from a development enviroment to a production one in different servers so the paths are the same in both hosts and it becomes kind of a repetitive procedure to update a file and indicate the same path for the `scp` parameters. Is there a way to use brace expansion or other technique with `scp` parameters? I know one of them, origin or destination must include the `user@host:` at the start. What I am trying to do is something like:               scp user@{dev-server,production-server}:/path/to/file


title: Clear unused space with zeros (btrfs)

text: How to clear unused space with zeros ? (I am asking for tool for _btrfs_ filesystem) I'm looking for something smarter than               cat /dev/zero > /mnt/X/big_zero ; sync; rm /mnt/X/big_zero      Like FSArchiver is looking for "used space" and ignores unused, but opposite site. Purpose: I'd like to compress partition images, so filling unused space with zeros is highly recommended. Btw. For ext3,ext4 : Clear unused space with zeros (ext3,ext4) . Here I ask for btrfs Clarification of "smarter algorithm": As I see that "smarter algorithm" leads to confusion, here I finally decided to add line about it. Dear reader, please think about filesystem as datastructure. For simplification purposes, let's imagine self balancing red-black tree holding map, that is used as association key->value array, where values are integers. Goal is to clear all negative values with zeros. "not smart" algorithm will iterate over it and add key:value pairs to new map (with eventual altering negative to zero). Smart algorithm will just detect places where negative values are stored and clear them **in-place**.


title: Is there a tool that lets me exaggerate audio levels?

text: It often happens that a movie I'm watching has audio loudness levels set too low. Since I use a typical laptop, I can't just go raise the volume level of my speakers. I've raised all knobs offered by GNOME's Volume Control. ![alt text](http://i.stack.imgur.com/iIU21.png) Are there tools out there that would allow me to take the loudness to beyond 100% level?


title: Nested ssh session inside screen has no color

text: I am attempting to keep a nested ssh session inside of a byobu/screen window, which I also connect to over SSH with Putty on Windows. However the nested SSH session has no color. Here's what I'm talking about: ![Lack of color](http://i.stack.imgur.com/oO0RL.png) On the left you have byobu connected to `wreckcreations` with no color. On the right you have Putty connected directly to `wreckcreations` with color. Note that normally byobu has color when working locally. I tried messing with `$TERM`, `$PSI`, and other variables to no avail. Any idea's what would cause this?


title: Can I keep applications running across X sessions?

text: Let's say I have a Firefox window downloading a big file that will take a lot of time. Now that it's running halfway and I want to switch to another DE (for example from GNOME to KDE), can I do that without interrupting the download? EDIT: I'm not using GDM or KDM or any desktop manager, which may make the situation more difficult...


title: Iptables to allow incoming FTP

text: i want to allow incoming FTP traffic. CentOS 5.4: This is my /etc/sysconfig/iptables file.               # Generated by iptables-save v1.3.5 on Thu Oct  3 21:23:07 2013     *filter     :INPUT ACCEPT [0:0]     :FORWARD ACCEPT [0:0]     :OUTPUT ACCEPT [133:14837]     -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT     -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT     -A INPUT -j REJECT --reject-with icmp-port-unreachable     -A OUTPUT -p tcp -m tcp --sport 20 -j ACCEPT     COMMIT     # Completed on Thu Oct  3 21:23:07 2013      Also, by default, ip_conntrack_netbios_n module is getting loaded.               #service iptables restart          Flushing firewall rules:                                   [  OK  ]     Setting chains to policy ACCEPT: filter                    [  OK  ]     Unloading iptables modules:                                [  OK  ]     Applying iptables firewall rules:                          [  OK  ]     Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]      But the problem is not with that module, as i tried unloading it and still no luck. If i disable iptables, I am able to transfer my backup from another machine to FTP. If iptables is enforcing, then transfer failed. Please advise.


title: Save output of command that modifies environment into a variable

text: How to save output of a command that modifies environment into a variable? I'm using bash shell. Assume that I have:               function f () { a=3; b=4 ; echo "`date`: $a $b"; }      And now, I can use commands to run `f`:               $ a=0; b=0; f; echo $a; echo $b; echo $c     Sat Jun 28 21:27:08 CEST 2014: 3 4     3     4      but I would like to save output of `f` to variable `c`, so I tried:               a=0; b=0; c=""; c=$(f); echo $a; echo $b; echo $c      but unfortunatelly, I've got:               0     0     Sat Jun 28 21:28:03 CEST 2014: 3 4      so I don't have any environment change here. How to save output of command (not only function) to variable and save environmental changes? I know that `$(...)` opens new subshell and that is the problem, but is it possible to do some workaround?


title: Why does file ownership matter within an RPM or DEB package?

text: ### Context: I'm trying to convert a `.deb` package to `.rpm` using alien, I use this command:               $ alien -r foo.deb      but it complains thusly:               > Warning: alien is not running as root!     > Warning: Ownerships of files in the generated packages will probably be wrong.      I think all `alien` needs `root` for is to guarantee that it has permission to create `foo.deb`'s `root`-owned files for the `foo.rpm` output, but I'm not sure. ### Questions:   1. Do packages always need some `root`-owned files?   2. Why do they need `root`-owned files at all?   3. If I'm wrong, why does `alien` need `root`?


title: BASH paste sourced files into main source

text: I have a fairly large BASH project, which I split into multiple files to make it more readable. As a result, the main file contains many `source` statements. Now I'm releasing it on GitHub and I'm writing an installer script for it. The problem is that creating subdirectories under binary folders (exactly `/usr/local/sbin`) is prohibited by the FHS and I don't want to mess up binary folders with several files like `main.bash` `config.bash`, etc. As a solution, I thought that if the installer script would merge together these files, I'd get a large, monolithic BASH file, which can be put anywhere on the system. The question is: how can I substitute all `source` statements in my main script with the contents of the sourced files? Example: **included.bash**               echo "bar"      **main.bash**               echo "foo"     source included.bash      **Resulting monolithic file**               echo "foo"     echo "bar"


title: Why does hdparm see two different values for the size of a drive?

text: I have a 1 TB drive attached via USB. It contains an LVM _physical volume_ filling the entire device (without any partition table). When I tried to extend a **logical volume** by using the entire PV, the _device-mapper_ started to complain that the section allocated by LVM on the PV is larger than the device. The error message from the device-mapper (as shown by `dmesg`) reports a size of **1953320367** [dm] sectors:               device-mapper: table: 254:0: sdf too small for target: start=1821353984, len=132169728, dev_size=1953320367      But LVM created a PV with 238467 _physical extents_ , which is **1953521664** [lvm] sectors (which is about 100 MB more):               $ pvdisplay /dev/sdf       --- Physical volume ---       PV Name               /dev/sdf       VG Name               apu-vg1       PV Size               931.51 GiB / not usable 1.71 MiB       Allocatable           yes        PE Size               4.00 MiB       Total PE              238467       Free PE               100       Allocated PE          238367       PV UUID               LrKDDW-4dXz-kDgh-CK78-OWhY-4sCH-rKT0e4      Now if I run `hdparm -gI` on the device, I can see two values for the size of the device. Under _geometry_ , there's the same value that is reported by the device-mapper as the device's size. But under _LBA48 user addressable sectors_ , there's the value **1953525168** [lba], which is less than one PE larger than the combines size of the PEs of the PV. This makes me think that this is the value that LVM sees:               $ hdparm -Ig /dev/sdf          /dev/sdf:      geometry      = 121588/255/63, sectors = 1953320367, start = 0          ATA device, with non-removable media               Model Number:       ST1000LM024 HN-M101MBB                                 Serial Number:      S2RUJ9BC702524                     Firmware Revision:  2AR10001               Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0     Standards:               Used: unknown (minor revision code 0x0028)                Supported: 8 7 6 5                Likely used: 8     Configuration:               Logical         max     current               cylinders       16383   16383               heads           16      16               sectors/track   63      63               --               CHS current addressable sectors:   16514064               LBA    user addressable sectors:  268435455               LBA48  user addressable sectors: 1953525168     ...      Now to my questions:   * Why are there two different values for the device's size used by different parts of the kernel?   * And, how do I handle/fix this situation so that the LVM will not make PVs that are larger than the space the device-mapper is willing/able to access?


title: Running a vim key combination on startup

text: In my `.vimrc`, I've got the lines               autocmd VimEnter * NERDTree     autocmd VimEnter * TagbarOpen      This results in a layout with two sidebars and a centre column containing the main editing buffer (i.e. the file I'm editing), but with the cursor in the NERDTree sidebar - resulting in the Tagbar being collapsed by default. What I want to do is execute the keystroke combination `<C>l` (which I've mapped to the command to move the cursor one buffer to the right) between the NERDTree opening and the Tagbar being toggled - but so far, I haven't managed to get the cursor to move. So far, i've tried using both               autocmd VimEnter * <C>l     autocmd VimEnter * normal <Ctrl+l>      ... between the two above first lines, but neither of these work. How do I go about this?


title: Fedora desktop launcher

text: I have created a desktop launcher for Midnight Commander in Fedora LXDE environment but this does not work. Where did I make a mistake?               $ cat mc.desktop           [Desktop Entry]     Encoding=UTF-8     Type=Application     Name=mc     Name[en_US]=mc     Name[ru_RU]=mc     Icon=mc_64     Exec=/home/uri/mc.sh      mc.sh is simple `bash -c '/usr/bin/mc'`


title: how to make checkinstall do install symlinks?

text: I have a script that installs normal files and some symlinks to these files on `/usr/bin`, so I use `checkinstall` to create a `.deb` package. The point is, checkinstall is ignoring the symlinks I create. It makes copies of the real files over the symlinks. I read thru the options and the info pages and found nothing speaking about symlinks.


title: Vim not showing garbage characters

text: I copied the content of an ant `build.xml` document from an `.odt` file to Vim editor. There were no garbage characters I could observe, but the build process failed due to incorrect XML tags. I assume this is due to garbage characters which are invisible to Vim. When I type the same content in Vim it works fine. What would be the solution for my issue? I also tried gedit, but still I can't see any garbage characters.


title: How to move a window to a different workspace using its ID, in bash?

text: Currently I have successfully used `wmctrl -r :SELECT: -t 2` but something like `wmctrl -r -i 0x03e00003 -t 2` does not work. How should I write the command in order to select the window to be moved by ID not by mouse? I am using Linux Mint 13 with the default MATE DE . I have also tried `wmctrl -i -r 0x03e00003 -t 2` EDIT1: `wmctrl -i -r thewinIDInHexa -t 2` works now. The reason why it did not work is that while the first time i experimented with wmctrl i used the right ID but wrong syntax, the 2nd time i used the correct form but the wrong window ID... the thing is the ID was non-existent and wmctrl does not output any message for non-existent IDs. Thank you for your efforts. Having confirmation that i was in fact using the right form for the command pushed me to double check the IDs. Thank you again EDIT2: since i am unable to comment i will post here the response to @slm : the correct ID now is 0x0380000f               wmctrl -v -i -r 0x0380000f -t 2                    envir_utf8: 1     Using window: 0x0380000f      VLC is moved to workspace #2 (3rd workspace) for the ID that is actually non-existent we have pretty much the same thing:               wmctrl -v -i -r 0x03a00003 -t 2           envir_utf8: 1     Using window: 0x03a00003


title: Mitigate connection between two wireless access points

text: I was wondering if there was a way to connect a single computer to two different access points. I'm on a network with a lot of users and the usage gets bogged down. Using two wireless antennas can I connect to two different points and share the load between them? Is there software to do this, if it is even possible? Or would I be able to run two different programs off of the different antennas? Say two instances of Firefox, or Firefox and Steam. Using Arch Linux.


title: PHP exec command has the result 0 even if an error occurs

text: I have this PHP code:               $execout=exec('ssh root@xxx.xxx.xxx.xx "sudo /etc/init.d/smokeping reload"',$output1,$result);     if($result !=0){         echo"that can't reload";     }     else{         echo "successfully reloaded";     }      in this code, always gives the `$result = 0`. Why is that? Sometimes if smokeping has an error, it shows that error when bellow command typed in command line,               ssh root@xxx.xxx.xxx.xx "sudo /etc/init.d/smokeping reload"      then it gives this error messege.               * Reloading latency logger daemon configuration...     ERROR: can't open /etc/smokeping/devices/errorfilename: No such file or   directory      ...done.      so it has an error, but `$result` every times gives the same as 0 . (Whether it had an error or not) Why does the exec command behaves like this(in php and CLI)?


title: Install Ubuntu over Suse without affecting Windows

text: I have Windows XP and Linux Suse 11 installed on my laptop for some time. I want to replace my Suse installation with Ubuntu and would like to know if it is possible to do that without affecting the Windows installation. I have the Grub boot-loader that came with Suse. What are the steps to follow (I didn't do the initial installation so I don't know if it is safe or not)? Thank you!


title: Munin doesn't show new host when using munin-cgi-html

text: A few months ago, I switched from running Munin in static `munin-cron` mode to dynamic `munin-html-cgi` mode, but now when I add a new host to monitor it, it doesn't show up in the generated HTML, even though I can see that it is receiving the new data (in `/var/lib/munin`). Am I missing something? I'm using Munin 2.0.9 on Ubuntu 10.04 Lucid


title: Configure Python to include another directory when looking for packages

text: I'm on a SUSE machine where the default Python site-packages location is `/usr/lib64/python2.6/site-packages`. Some packages automatically install themselves in `/usr/lib/python2.6/site-packages` instead. How do I configure Python so that it also looks in `/usr/lib64/python2.6/site-packages`?


title: YaST2: Command-line equivalents to GUI naviagtion

text: I'd like to automate some interactions with yast2. I assume I can do everything on the command line that I can do in the curses interface, but I'm not sure how to figure out what the commands are. For example, if I want yast2 to use a local ISO as a package repository, I know how to do it through the curses GUI (Software->Add-On Productions, Add, Local ISO Image, Browse, ...). Is there a way to identify these interactions with arguments that can be passed to yast2 on the command-line?


title: There are no items in GNOME main menu after openSuse 11.4 upgrade

text: I've upgraded my openSuse os from 11.3 to 11.4. Everything went smoothly but now I cannot see any item in main menu (analog of Start in Windows) and I cannot set any background picture, so now I see a single color desktop. KDE desktop is working properly. Machine specs: Laptop AMD Turion TL-56 Video Card Nvidia Go 7200 (driver from NVidia is installed) I think there are some settings which are now preventing GNOME to initialize properly still cannot find any that could change the behavior.


title: Second RAM module is not shown in `free` in Manjaro

text: I have two RAM modules (8 GB each) but there is only one shown in `free`. I hope that following info will help you to locate the problem and find a solution:               $ uname -srvmo     Linux 3.10.27-1-MANJARO #1 SMP Sat Jan 18 09:42:13 UTC 2014 x86_64 GNU/Linux          $ free -m                  total       used       free     shared    buffers     cached     Mem:          6840       6336        503         49         74        467     -/+ buffers/cache:       5794       1046     Swap:         7003       3233       3770          # dmidecode 2.12     SMBIOS 2.7 present.     17 structures occupying 1060 bytes.     Table at 0x000EBF50.          Handle 0x0000, DMI type 0, 24 bytes     BIOS Information         Vendor: American Megatrends Inc.         Version: P2.10         Release Date: 01/17/2014         Address: 0xF0000         Runtime Size: 64 kB         ROM Size: 8192 kB         Characteristics:             PCI is supported             BIOS is upgradeable             BIOS shadowing is allowed             Boot from CD is supported             Selectable boot is supported             BIOS ROM is socketed             EDD is supported             5.25"/1.2 MB floppy services are supported (int 13h)             3.5"/720 kB floppy services are supported (int 13h)             3.5"/2.88 MB floppy services are supported (int 13h)             Print screen service is supported (int 5h)             8042 keyboard services are supported (int 9h)             Serial services are supported (int 14h)             Printer services are supported (int 17h)             ACPI is supported             USB legacy is supported             BIOS boot specification is supported             Targeted content distribution is supported             UEFI is supported         BIOS Revision: 4.6          Handle 0x0001, DMI type 1, 27 bytes     System Information         Manufacturer: To Be Filled By O.E.M.         Product Name: To Be Filled By O.E.M.         Version: To Be Filled By O.E.M.         Serial Number: To Be Filled By O.E.M.         UUID: 03000200-0400-0500-0006-000700080009         Wake-up Type: Power Switch         SKU Number: To Be Filled By O.E.M.         Family: To Be Filled By O.E.M.          Handle 0x0002, DMI type 2, 15 bytes     Base Board Information         Manufacturer: ASRock         Product Name: FM2A88X-ITX+         Version:                                Serial Number: E80-3B005600472         Asset Tag:                                Features:             Board is a hosting board             Board is replaceable         Location In Chassis:                                Chassis Handle: 0x0003         Type: Motherboard         Contained Object Handles: 0          Handle 0x0003, DMI type 3, 22 bytes     Chassis Information         Manufacturer: To Be Filled By O.E.M.         Type: Desktop         Lock: Not Present         Version: To Be Filled By O.E.M.         Serial Number: To Be Filled By O.E.M.         Asset Tag: To Be Filled By O.E.M.         Boot-up State: Safe         Power Supply State: Safe         Thermal State: Safe         Security Status: None         OEM Information: 0x00000000         Height: Unspecified         Number Of Power Cords: 1         Contained Elements: 0         SKU Number: To be filled by O.E.M.          Handle 0x0004, DMI type 9, 17 bytes     System Slot Information         Designation: PCIE1         Type: x16 PCI Express         Current Usage: In Use         Length: Short         ID: 17         Characteristics:             3.3 V is provided             Opening is shared             PME signal is supported         Bus Address: 0000:00:15.0          Handle 0x0005, DMI type 11, 5 bytes     OEM Strings         String 1: To Be Filled By O.E.M.          Handle 0x0006, DMI type 7, 19 bytes     Cache Information         Socket Designation: L1 CACHE         Configuration: Enabled, Not Socketed, Level 1         Operational Mode: Write Back         Location: Internal         Installed Size: 256 kB         Maximum Size: 256 kB         Supported SRAM Types:             Pipeline Burst         Installed SRAM Type: Pipeline Burst         Speed: 1 ns         Error Correction Type: Multi-bit ECC         System Type: Unified         Associativity: 2-way Set-associative          Handle 0x0007, DMI type 7, 19 bytes     Cache Information         Socket Designation: L2 CACHE         Configuration: Enabled, Not Socketed, Level 2         Operational Mode: Write Back         Location: Internal         Installed Size: 4096 kB         Maximum Size: 4096 kB         Supported SRAM Types:             Pipeline Burst         Installed SRAM Type: Pipeline Burst         Speed: 1 ns         Error Correction Type: Multi-bit ECC         System Type: Unified         Associativity: 16-way Set-associative          Handle 0x000C, DMI type 32, 20 bytes     System Boot Information         Status: No errors detected          Handle 0x000E, DMI type 16, 23 bytes     Physical Memory Array         Location: System Board Or Motherboard         Use: System Memory         Error Correction Type: None         Maximum Capacity: 16 GB         Error Information Handle: Not Provided         Number Of Devices: 2          Handle 0x000F, DMI type 19, 31 bytes     Memory Array Mapped Address         Starting Address: 0x00000000000         Ending Address: 0x003FFFFFFFF         Range Size: 16 GB         Physical Array Handle: 0x000E         Partition Width: 255          Handle 0x0010, DMI type 17, 34 bytes     Memory Device         Array Handle: 0x000E         Error Information Handle: Not Provided         Total Width: 64 bits         Data Width: 64 bits         Size: 8192 MB         Form Factor: DIMM         Set: None         Locator: DIMM 0         Bank Locator: CHANNEL A         Type: DDR3         Type Detail: Synchronous Unbuffered (Unregistered)         Speed: 1600 MHz         Manufacturer: <BAD INDEX>         Serial Number: 00000000         Asset Tag: A1_AssetTagNum0         Part Number: CMV8GX3M1A1600C11          Rank: 2         Configured Clock Speed: 1600 MHz          Handle 0x0011, DMI type 20, 35 bytes     Memory Device Mapped Address         Starting Address: 0x00000000000         Ending Address: 0x001FFFFFFFF         Range Size: 8 GB         Physical Device Handle: 0x0010         Memory Array Mapped Address Handle: 0x000F         Partition Row Position: 1          Handle 0x0012, DMI type 17, 34 bytes     Memory Device         Array Handle: 0x000E         Error Information Handle: Not Provided         Total Width: 64 bits         Data Width: 64 bits         Size: 8192 MB         Form Factor: DIMM         Set: None         Locator: DIMM 0         Bank Locator: CHANNEL B         Type: DDR3         Type Detail: Synchronous Unbuffered (Unregistered)         Speed: 1600 MHz         Manufacturer: <BAD INDEX>         Serial Number: 00000000         Asset Tag: A1_AssetTagNum1         Part Number: CMV8GX3M1A1600C11          Rank: 2         Configured Clock Speed: 1600 MHz          Handle 0x0013, DMI type 20, 35 bytes     Memory Device Mapped Address         Starting Address: 0x00200000000         Ending Address: 0x003FFFFFFFF         Range Size: 8 GB         Physical Device Handle: 0x0012         Memory Array Mapped Address Handle: 0x000F         Partition Row Position: 1          Handle 0x0016, DMI type 4, 42 bytes     Processor Information         Socket Designation: CPUSocket         Type: Central Processor         Family: A-Series         Manufacturer: AMD         ID: 01 0F 63 00 FF FB 8B 17         Signature: Family 21, Model 48, Stepping 1         Flags:             FPU (Floating-point unit on-chip)             VME (Virtual mode extension)             DE (Debugging extension)             PSE (Page size extension)             TSC (Time stamp counter)             MSR (Model specific registers)             PAE (Physical address extension)             MCE (Machine check exception)             CX8 (CMPXCHG8 instruction supported)             APIC (On-chip APIC hardware supported)             SEP (Fast system call)             MTRR (Memory type range registers)             PGE (Page global enable)             MCA (Machine check architecture)             CMOV (Conditional move instruction supported)             PAT (Page attribute table)             PSE-36 (36-bit page size extension)             CLFSH (CLFLUSH instruction supported)             MMX (MMX technology supported)             FXSR (FXSAVE and FXSTOR instructions supported)             SSE (Streaming SIMD extensions)             SSE2 (Streaming SIMD extensions 2)             HTT (Multi-threading)         Version: AMD A10-7850K APU with Radeon(TM) R7 Graphics           Voltage: 1.4 V         External Clock: 100 MHz         Max Speed: 4000 MHz         Current Speed: 4000 MHz         Status: Populated, Enabled         Upgrade: Socket FM2         L1 Cache Handle: 0x0006         L2 Cache Handle: 0x0007         L3 Cache Handle: Not Provided         Serial Number: Not Specified         Asset Tag: Not Specified         Part Number: Not Specified         Core Count: 4         Core Enabled: 4         Thread Count: 4         Characteristics:             64-bit capable          Handle 0x0017, DMI type 127, 4 bytes     End Of Table


title: Multiple graphics cards in X

text: I have a really interesting situation. I'm on a Dell XPS 15z laptop, which features an NVIDIA Optimus display combination, using the integrated i915 Intel Graphics alongside an NVIDIA GeForce GT 525M discrete graphics card. I'm not sure as to my current configuration, I'm not sure if my display is being driven by i915 or by `nouveau`. However, one thing doesn't work which is kind of important for my current setup. As noted here, it appears that the HDMI-out port runs exclusively via the discrete NVIDIA card, so I don't even see the monitor in the display configuration: ![](https://imgur.com/rbZ14SM.png) The monitor reacts when being plugged in, but I simply don't see it. Therefore, I need to determine the following:   * What's driving my current configuration, `i915` or `nouveau`?   * Is it possible to use Bumblebee to run both graphics cards and be able to power both the integrated graphics card (for the laptop monitor) and the discrete graphics card (for the HDMI-out) or find a way to run some configuration which will allow me to use everything as expected?


title: How to change locale to English?

text: I have message from bash and it's localized, I want English message, my locale is:               $ locale     LANG=pl_PL.UTF-8     LANGUAGE=pl:en     LC_CTYPE="pl_PL.UTF-8"     LC_NUMERIC=pl_PL.UTF-8     LC_TIME=pl_PL.UTF-8     LC_COLLATE="pl_PL.UTF-8"     LC_MONETARY=pl_PL.UTF-8     LC_MESSAGES="pl_PL.UTF-8"     LC_PAPER=pl_PL.UTF-8     LC_NAME=pl_PL.UTF-8     LC_ADDRESS=pl_PL.UTF-8     LC_TELEPHONE=pl_PL.UTF-8     LC_MEASUREMENT=pl_PL.UTF-8     LC_IDENTIFICATION=pl_PL.UTF-8     LC_ALL=      I've try:               LANG=en_US.UTF-8; type grunt     LC_ALL=en_US.UTF-8; type grunt     LC_MESSAGES=en_EN.UTF-8 && type grunt     export LC_MESSAGES=en_US.UTF-8; type grunt       But the message keep showing up in Polish:               ścieżka do grunt jest zapamiętana (/usr/local/bin/grunt)      How can I make this text English? **EDIT** I've run:               $ eval $(locale | sed -e 's/\(.*\)=.*/export \1=en_US.UTF-8/')                  $ locale     LANG=en_US.UTF-8     LANGUAGE=en_US.UTF-8     LC_CTYPE="en_US.UTF-8"     LC_NUMERIC="en_US.UTF-8"     LC_TIME="en_US.UTF-8"     LC_COLLATE="en_US.UTF-8"     LC_MONETARY="en_US.UTF-8"     LC_MESSAGES="en_US.UTF-8"     LC_PAPER="en_US.UTF-8"     LC_NAME="en_US.UTF-8"     LC_ADDRESS="en_US.UTF-8"     LC_TELEPHONE="en_US.UTF-8"     LC_MEASUREMENT="en_US.UTF-8"     LC_IDENTIFICATION="en_US.UTF-8"     LC_ALL=en_US.UTF-8      and type grunt show polish message.


title: Access Log Timespan

text: How can I output first and last time of an access_log so that I can quickly check which time range access_log keep records between? Output may look like:               [21/Aug/2014:06:29:41 -0400] :::: [21/Aug/2014:10:29:41 -0400]      My access_log path is:               /var/www/vhosts/example.com/statistics/logs/access_log      Example Access Log Entry:               123.123.123.123 - - [21/Aug/2014:08:12:30 -0400] "GET /wp-content/themes/simple/comment-style.css HTTP/1.1" 200 6221 "http://example.com/?p=1" "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0"


title: Set up OS and Runnig app using x32-ABI

text: **Intro**   I just moved to a 64bit installation and I'm experiencing big difference in memory usage ( especially for app like chrome, firefox, mysql and java apps ): - While before 4gb were enough now they are soon exhausted. This side effect of 64bit OS is well known but according to what the documentation there are good reason (from a performance point of view) to use a 64bit OS ( Google will help to find out more details ) Beside ram is very cheap ( I have already added 4gb ) I don't like to waste resources for sure if there is a kernel feature meant exactly to limit this issue: x32 ABI **x32 ABI:**   according to this pdf can give great advantage compared to a 64bit normal OS (even 40% enhancement ):   https://cds.cern.ch/record/1528222/files/LHCb-TALK-2013-060.pdf Now if I have understood well x32-ABI requires:   * Linux Kernel 3.4 compiled with CONFIG_X86_X32=y    * Gcc 4.7   * Binutils 2.22   * Glibc 2.16   * Recompiling all system libraries, required by an application, with gcc -mx32 I know Debian and other distros they are actually shipping libs with 32x-ABI support but I cannot find any documentation to set up this functionality ( I'm on Ubuntu 14.04 64bit ) I would like to use this question to help me and other to collect information because I think this is a very interesting feature. In particular my goal would be run one app ( such as chrome or firefox or mysql ) using x32-ABI. Thanks in advance


title: How do I send all information in /var/adm/message file to a remote system?

text: I'm trying to figure out how to send all information that is normally identified in the `/var/adm/message` file on a Solaris system to a remote system.


title: Multiple Lan interfaces on one VM rather than multiple VM

text: I'm looking if it's possible to give rights, to only allow the use of one network interface to a specific user on a Linux distribution. My use case: I want, for my studies, testing the interconnection between about 30 servers, all listening on the same port. For now, I can only launch 7-8 VM and on them my server scripts due to physical material limitations. Even if I'm using a low resource consumption Linux distribution (like SliTaz). The scripts are requiring that I have multiple interfaces because they listening all on the same port. What I think it can be possible to do, is duplicate an Ethernet interface on a single VM (30 times), create 30 different users, set for each user a different Ethernet interface and launch my server script on each user. Script will listen on each interface available, either a single interface available per user. My script is about 5Mo in RAM, so I don't have to launch 30*128Mo of VM and I can more easily create users, than duplicate VM, set MAC address and IPs on each VM. I did see that it's possible to create multiple interfaces. How can I set rights on anetwork interface for a specific user? Or is there a better solution for this problem?


title: I have nvidia driver 304, can I install instead nvidia-331?

text: I have a computer in which there's Linux Mint 16 64Bit. Currently I have the nvidia-304 driver, exactly the 304.121 one. I've installed it thanks to the xorg-edgers PPA, because i don't have any driver in the "Additional Driver" tab. I've gone to the nvidia official website and I've seen that the recommended driver for my graphic card (Nvidia 610M) is 331.67, which can be installed with the nvidia-331 xorg package. I've also done               sudo apt-get dist-upgrade      but I still have the 304.121. Can I install the 331.67 ? If yes, do I just have to do               sudo apt-get install nvidia-331     sudo apt-get remove nvidia-304      ?


title: Resume interrupted copying process

text: How to resume securely and reliably process of copying file `$A` into backup location `$B` done with `pv "$A" > "$B"` or `cat "$A" > "$B"` ? (let's assume file `$A` is very big, e.g. LVM2 snapshot file) Is it achievable with `dd` ? Preffered: bash or python (preferably python3) solutions. Example scenario: `pv "$A" > "$B"` interrupted after copying 90%. How to resume it, in order to finish copying process but not repeating whole work again ?


title: Is it a bad idea to add myself to the sudo group?

text: Members of the `sudo` group in my Debian install can execute anything without entering a password. This is convenient, but seems like a bad idea. **NOTE:** My computer is an ordinary desktop, not a server or something like that. Should I disable this or is it safe? Bonus points for explaining what could happen (i.e. possible attack vectors).


2.6.32-71.el6.x86_64   RHEL 6 Please see at the end I am getting some issues due to dependency:               [root@xilinx Downloads]# yum install --skip-broken  glibc*     Loaded plugins: refresh-packagekit, rhnplugin     There was an error parsing the RHN proxy settings.     RHN support will be disabled.     Setting up Install Process     Examining glibc-2.12-7.2.x86_64.rpm: glibc-2.12-7.2.x86_64     Marking glibc-2.12-7.2.x86_64.rpm as an update to glibc-2.12-1.7.el6.x86_64     Marking glibc-2.12-7.2.x86_64.rpm as an update to glibc-2.12-1.7.el6.i686     Examining glibc-2.15-60.el6.x86_64.rpm: glibc-2.15-60.el6.x86_64     Marking glibc-2.15-60.el6.x86_64.rpm as an update to glibc-2.12-1.7.el6.x86_64     Marking glibc-2.15-60.el6.x86_64.rpm as an update to glibc-2.12-1.7.el6.i686     Examining glibc-common-2.12-7.2.x86_64.rpm: glibc-common-2.12-7.2.x86_64     Marking glibc-common-2.12-7.2.x86_64.rpm as an update to glibc-common-2.12-1.7.el6.x86_64     Examining glibc-common-2.15-60.el6.x86_64.rpm: glibc-common-2.15-60.el6.x86_64     Marking glibc-common-2.15-60.el6.x86_64.rpm as an update to glibc-common-2.12-1.7.el6.x86_64     Examining glibc-devel-2.12-7.2.x86_64.rpm: glibc-devel-2.12-7.2.x86_64     Marking glibc-devel-2.12-7.2.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.x86_64     Marking glibc-devel-2.12-7.2.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.i686     Examining glibc-devel-2.15-60.el6.x86_64.rpm: glibc-devel-2.15-60.el6.x86_64     Marking glibc-devel-2.15-60.el6.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.x86_64     Marking glibc-devel-2.15-60.el6.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.i686     Examining glibc-headers-2.15-60.el6.x86_64.rpm: glibc-headers-2.15-60.el6.x86_64     Marking glibc-headers-2.15-60.el6.x86_64.rpm as an update to glibc-headers-2.12-1.7.el6.x86_64     Examining glibc-static-2.12-7.2.x86_64.rpm: glibc-static-2.12-7.2.x86_64     Marking glibc-static-2.12-7.2.x86_64.rpm to be installed     Examining glibc-static-2.15-60.el6.x86_64.rpm: glibc-static-2.15-60.el6.x86_64     Marking glibc-static-2.15-60.el6.x86_64.rpm to be installed     Examining glibc-static-2.18-12.fc20.x86_64.rpm: glibc-static-2.18-12.fc20.x86_64     Marking glibc-static-2.18-12.fc20.x86_64.rpm to be installed     Resolving Dependencies     --> Running transaction check     ---> Package glibc.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-common = 2.12-1.7.el6 for package: glibc-2.12-1.7.el6.i686     ---> Package glibc-common.x86_64 0:2.15-60.el6 set to be updated     ---> Package glibc-devel.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-headers = 2.12-1.7.el6 for package: glibc-devel-2.12-1.7.el6.i686     ---> Package glibc-headers.x86_64 0:2.15-60.el6 set to be updated     ---> Package glibc-static.x86_64 0:2.12-7.2 set to be updated     --> Processing Dependency: glibc-devel = 2.12-7.2 for package: glibc-static-2.12-7.2.x86_64     ---> Package glibc-static.x86_64 0:2.15-60.el6 set to be updated     ---> Package glibc-static.x86_64 0:2.18-12.fc20 set to be updated     --> Processing Dependency: glibc-devel = 2.18-12.fc20 for package: glibc-static-2.18-12.fc20.x86_64     --> Finished Dependency Resolution     --> Running transaction check     ---> Package glibc.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-common = 2.15-60.el6 for package: glibc-2.15-60.el6.x86_64     ---> Package glibc-devel.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-headers = 2.15-60.el6 for package: glibc-devel-2.15-60.el6.x86_64     ---> Package glibc-static.x86_64 0:2.15-60.el6 set to be updated     --> Finished Dependency Resolution     --> Running transaction check     ---> Package glibc-static.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-devel = 2.15-60.el6 for package: glibc-static-2.15-60.el6.x86_64     --> Finished Dependency Resolution          Packages skipped because of dependency problems:         glibc-2.15-60.el6.x86_64 from /glibc-2.15-60.el6.x86_64         glibc-common-2.15-60.el6.x86_64 from /glibc-common-2.15-60.el6.x86_64         glibc-devel-2.15-60.el6.x86_64 from /glibc-devel-2.15-60.el6.x86_64         glibc-headers-2.15-60.el6.x86_64 from /glibc-headers-2.15-60.el6.x86_64         glibc-static-2.12-7.2.x86_64 from /glibc-static-2.12-7.2.x86_64         glibc-static-2.15-60.el6.x86_64 from /glibc-static-2.15-60.el6.x86_64         glibc-static-2.18-12.fc20.x86_64 from /glibc-static-2.18-12.fc20.x86_64      May be this the reason that some of my programs are not working. How do resolve this dependency problem ? **Update**               [root@xilinx Downloads]# yum install   glibc*     Loaded plugins: refresh-packagekit, rhnplugin     There was an error parsing the RHN proxy settings.     RHN support will be disabled.     Setting up Install Process     Examining glibc-2.12-7.2.x86_64.rpm: glibc-2.12-7.2.x86_64     Marking glibc-2.12-7.2.x86_64.rpm as an update to glibc-2.12-1.7.el6.x86_64     Marking glibc-2.12-7.2.x86_64.rpm as an update to glibc-2.12-1.7.el6.i686     Examining glibc-2.15-60.el6.x86_64.rpm: glibc-2.15-60.el6.x86_64     Marking glibc-2.15-60.el6.x86_64.rpm as an update to glibc-2.12-1.7.el6.x86_64     Marking glibc-2.15-60.el6.x86_64.rpm as an update to glibc-2.12-1.7.el6.i686     Examining glibc-common-2.12-7.2.x86_64.rpm: glibc-common-2.12-7.2.x86_64     Marking glibc-common-2.12-7.2.x86_64.rpm as an update to glibc-common-2.12-1.7.el6.x86_64     Examining glibc-common-2.15-60.el6.x86_64.rpm: glibc-common-2.15-60.el6.x86_64     Marking glibc-common-2.15-60.el6.x86_64.rpm as an update to glibc-common-2.12-1.7.el6.x86_64     Examining glibc-devel-2.12-7.2.x86_64.rpm: glibc-devel-2.12-7.2.x86_64     Marking glibc-devel-2.12-7.2.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.x86_64     Marking glibc-devel-2.12-7.2.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.i686     Examining glibc-devel-2.15-60.el6.x86_64.rpm: glibc-devel-2.15-60.el6.x86_64     Marking glibc-devel-2.15-60.el6.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.x86_64     Marking glibc-devel-2.15-60.el6.x86_64.rpm as an update to glibc-devel-2.12-1.7.el6.i686     Examining glibc-headers-2.15-60.el6.x86_64.rpm: glibc-headers-2.15-60.el6.x86_64     Marking glibc-headers-2.15-60.el6.x86_64.rpm as an update to glibc-headers-2.12-1.7.el6.x86_64     Examining glibc-static-2.12-7.2.x86_64.rpm: glibc-static-2.12-7.2.x86_64     Marking glibc-static-2.12-7.2.x86_64.rpm to be installed     Examining glibc-static-2.15-60.el6.x86_64.rpm: glibc-static-2.15-60.el6.x86_64     Marking glibc-static-2.15-60.el6.x86_64.rpm to be installed     Examining glibc-static-2.18-12.fc20.x86_64.rpm: glibc-static-2.18-12.fc20.x86_64     Marking glibc-static-2.18-12.fc20.x86_64.rpm to be installed     Resolving Dependencies     --> Running transaction check     ---> Package glibc.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-common = 2.12-1.7.el6 for package: glibc-2.12-1.7.el6.i686     ---> Package glibc-common.x86_64 0:2.15-60.el6 set to be updated     ---> Package glibc-devel.x86_64 0:2.15-60.el6 set to be updated     --> Processing Dependency: glibc-headers = 2.12-1.7.el6 for package: glibc-devel-2.12-1.7.el6.i686     ---> Package glibc-headers.x86_64 0:2.15-60.el6 set to be updated     ---> Package glibc-static.x86_64 0:2.12-7.2 set to be updated     --> Processing Dependency: glibc-devel = 2.12-7.2 for package: glibc-static-2.12-7.2.x86_64     ---> Package glibc-static.x86_64 0:2.15-60.el6 set to be updated     ---> Package glibc-static.x86_64 0:2.18-12.fc20 set to be updated     --> Processing Dependency: glibc-devel = 2.18-12.fc20 for package: glibc-static-2.18-12.fc20.x86_64     --> Finished Dependency Resolution     Error: Package: glibc-static-2.18-12.fc20.x86_64 (/glibc-static-2.18-12.fc20.x86_64)                Requires: glibc-devel = 2.18-12.fc20                Installed: glibc-devel-2.12-1.7.el6.i686 (@server)                    glibc-devel = 2.12-1.7.el6                Removing: glibc-devel-2.12-1.7.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0)                    glibc-devel = 2.12-1.7.el6                Updated By: glibc-devel-2.15-60.el6.x86_64 (/glibc-devel-2.15-60.el6.x86_64)                    glibc-devel = 2.15-60.el6     Error: Package: glibc-static-2.12-7.2.x86_64 (/glibc-static-2.12-7.2.x86_64)                Requires: glibc-devel = 2.12-7.2                Installed: glibc-devel-2.12-1.7.el6.i686 (@server)                    glibc-devel = 2.12-1.7.el6                Removing: glibc-devel-2.12-1.7.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0)                    glibc-devel = 2.12-1.7.el6                Updated By: glibc-devel-2.15-60.el6.x86_64 (/glibc-devel-2.15-60.el6.x86_64)                    glibc-devel = 2.15-60.el6     Error: Package: glibc-devel-2.12-1.7.el6.i686 (@server)                Requires: glibc-headers = 2.12-1.7.el6                Removing: glibc-headers-2.12-1.7.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0)                    glibc-headers = 2.12-1.7.el6                Updated By: glibc-headers-2.15-60.el6.x86_64 (/glibc-headers-2.15-60.el6.x86_64)                    glibc-headers = 2.15-60.el6     Error: Package: glibc-2.12-1.7.el6.i686 (@server)                Requires: glibc-common = 2.12-1.7.el6                Removing: glibc-common-2.12-1.7.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0)                    glibc-common = 2.12-1.7.el6                Updated By: glibc-common-2.15-60.el6.x86_64 (/glibc-common-2.15-60.el6.x86_64)                    glibc-common = 2.15-60.el6      You could try using --skip-broken to work around the problem     libstdc++-4.4.6-4.el6.i686 is a duplicate with libstdc++-4.4.4-13.el6.x86_64     [root@xilinx Downloads]#


Yum update/install to any package is giving me the following error. What actions do I need to take to overcome this?               Traceback (most recent call last):       File "/usr/bin/yum", line 29, in <module>         yummain.user_main(sys.argv[1:], exit_code=True)       File "/usr/share/yum-cli/yummain.py", line 267, in user_main         errcode = main(args)       File "/usr/share/yum-cli/yummain.py", line 120, in main         result, resultmsgs = base.doCommands()       File "/usr/share/yum-cli/cli.py", line 432, in doCommands         return self.yum_cli_commands[self.basecmd].doCommand(self,     self.basecmd, self.extcmds)       File "/usr/share/yum-cli/yumcommands.py", line 226, in doCommand         return base.updatePkgs(extcmds)       File "/usr/share/yum-cli/cli.py", line 736, in updatePkgs         if not self.update(pattern=arg):       File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 3687, in update         obs_tups = self.up.obsoleted_dict.get(installed_pkg.pkgtup, [])       File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 878, in     <lambda>         up = property(fget=lambda self: self._getUpdates(),       File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 702, in _getUpdates         self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())       File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 489, in simplePkgList         return self.pkglist       File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 232, in _get_pkglist         csumpkgtups = self.preloadPackageChecksums(load_packages=False)       File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 966, in     preloadPackageChecksums         rpmdbv = self.simpleVersion(main_only=True)[0]       File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1149, in simpleVersion         self._put_cached_simpleVersion_main(main)       File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1098, in _put_cached_simpleVersion_main         os.rename(rpmdbvfname + ".tmp", rpmdbvfname)     OSError: [Errno 5] Input/output error


title: Initiate server script from laptop

text: I have a server that i can ssh into from my laptop. I want to be able to run a script on my laptop that sends a signal to the server which makes the server initiate a given script there. How do I do that?


title: Minecraft server daily restart script

text: I've been searching to try to find the information I need, but I have so far been unsuccessful. What I would like to have happen daily is the following:   * Every time the machine starts, the Minecraft server is started. (I have the shell commands already written for this.)   * At 8:00 AM, the text "stop" is submitted to the server to cause it to gracefully stop.   * At 8:02 AM, the computer restarts. Ideally, this will open a window on my desktop that enter commands into, and also have a way to send commands to the server through a remote terminal. How do I do this? I have found information on using `sudo crontab -e` in order to allow super-user access needed to run the Minecraft server. I have also looked into using named pipes, but I can't quite get it working right. I can create it with `mkfifo mcserver`, but it blocks unless I open the pipe in another terminal. I have also looked into `screen`, as well as `echo`ing commands to a directory based on the pid, but I have not been able to get that to work either. How would I detect and store the pid? Thank you for your help. It's greatly appreciated. I've been struggling with this for quite a while, and I just can't seem to figure it out.


title: Why is USB not working in Linux when it works in UEFI/BIOS?

text: For background I have just built a new machine with modern hardware including:   * AMD FX-8350   * Gigabyte GA-990FXA-UD3 motherboard   * 16GB RAM   * NVidia GTX 650 Ti   * Kingston SSD Given that, I tried to install various versions of Linux on the SSD and was met with failure almost every time. I tried installing Arch, Debian stable, Debian sid, and Ubuntu 12.10 from a USB thumb drive but while the BIOS saw the USB drive and started to boot from it, as soon as the OS attempted to enumerate the USB devices I lost all USB functionality (including the boot device). Eventually I burned a DVD and installed Ubuntu 12.10 onto the SSD. It should be noted that my USB keyboard (and mouse) work fine while in the American Megatrends UEFI/BIOS. Even when I'm in the pre-installation menus on the Live Ubuntu DVD the keyboard works fine. As soon as Linux is booted (either Live DVD or from the SSD) I lose all USB functionality and can only navigate the OS using a PS/2 keyboard. What I see in the dmesg/syslog is a few lines about "`failed to load microcode amd_ucode/microcode_amd_fam15h.bin`" and I can see USB devices failing to initialize. If I do an `lsusb` I can see all the USB host controllers but none of the devices. Doing an `lspci` shows me all the hardware I'd expect. And doing an `lsmod` I do not see any usb modules loaded (`usb_ehci` for example). I tried passing `noapic` to the kernel boot string and it had no effect on this problem. The motherboard supports USB 3.0 but all the devices I have plugged into normal USB 2.0 ports. I'm rather baffled at what could be killing/preventing USB (and my on-board network card) from working **in Linux**. There doesn't seem to be any problem with any of these devices working in BIOS and I do not have a Windows installation available to test and see if it works. I've already RMA'd the motherboard once but the second one has exactly the same behavior so I think I can safely rule out hardware failure (since the behavior is identical, I don't think the odd of me getting two identically defective boards are greater than the odds of this being a Linux problem). What else can I try to get USB (and ideally my network, but we'll stick to USB for now) working? **Edit #1:** Since I have no networking I can only relate interesting bits from `dmesg` here. Of interest in `dmesg` I can see I have 11 USB host controllers (OHCI, EHCI, and xHCI). It detects my USB devices and then fails immediately as follows:               usb 3-1: new high-speed USB device number 2 using ehci_hcd     usb 3-1: device descriptor read/64, error -32      That repeats several times incrementing the number and trying other USB Host controllers until it falls back to OHCI controllers which also fail but have an additional message: `usb 8-1: device not accepting address 4, error -32` I think my networking problems have to do with the fact that I don't have IPv6 enabled on my router and that seems to be a problem `eth1: no IPv6 routers present` **Edit #2:** `lspci -vvv` shows that my network adapters (both onboard and expansion) are Realtek Semiconductor (no surprise); RTL8111/8168B and RTL8169/8110 respectively. My USB controllers are Etron Technology EJ168 (xHCI) and AMD nee ATI SB7x0/SB8x0/SB9x0 (EHCI & OHCI) Now running Debian wheezy `modprobe` shows `usb_common`, `usbcore`, `xhci_hcd`, `ehci_hcd`, and `ohci_hcd` all loaded and functioning.


title: what is an application pool?

text: I'm reading this article: http://www.modrails.com/documentation/Architectural%20overview.html#web_app_models It talks about how Phusion Passenger extends Apache2 to act as an application server. When an HTTP request comes in, the Phusion Passenger module checks whether the request should be handled by a Phusion Passenger-served application. If so, then the module spawns a process for the application, if necessary. Forwards the request to the application process, and forwards the response back to the client. In order to enhance the spawning process, passenger acts as a spawn server which caches Ruby on Rails framework code and application code in memory. This way every time a new request comes in, when a process is spawned it references the cached code and spawns the process quickly. But despite caching spawning is still expensive compared to an http request. So an application pool is used. I don't understand what an application pool is. This is what it says: > Spawned application instances are kept alive, and their handles are stored > into this pool, allowing each application instance to be reused later. Thus, > Passenger has very good average case performance. What does it mean "kept alive" and their "handles are stored in this pool". I thought that's the point of caching - to keep data alive for later. So I don't see how this is different.


title: using simple regex quantifier expression in grep

text: Does anyone know why `ls | xargs -n 1 basename | grep -E '[0-9]{1}'` does not only show occurrences of a single digit between 0-9? For example if I have:               touch 1     touch 22     touch 333     touch test_file      If I run `ls | xargs -n 1 basename | grep -P '[0-9]{1}'`: I get 1, 22 and 333 files listed. If I run `ls | xargs -n 1 basename | grep -P '[0-9]{2}'`: I get 22 and 333 files listed. I would expect the {2} to only show the 22 file.


title: exec < filename - what does this do?

text: I have found the following code snippet (sh):                   TESTFILE=$TEST_PATH/test.out         if [ -f $TESTFILE ]         then             exec < $TESTFILE         else             echo "$TEST_PATH: no test.out file"         fi      the focus of my question is, what is this line doing? (the rest i understand!)                       exec < $TESTFILE      The file is not executable, nor is another process invoked, and i am having no luck finding what exec does on a plain text file.


title: How can I suppress unneeded output from emacsclient?

text: I use emacs fairly regularly and am trying to configure my system to use emacsclient when possible. To do this I have done the following: In .bashrc:               EDITOR='emacsclient -ca emacs'     VISUAL='emacsclient -ca emacs'      I then also installed an alternative for /usr/bin/editor that points to /usr/local/bin/emacsclient.wrapper that has the following:                #!/bin/sh      #Start emacs client      /usr/bin/emacsclient -ca emacs $1      For the most part this works great. However, when emacsclient is launched from the terminal, it often spews out text I don't need. Notably:               $ editor      Waiting for Emacs...     $       Or, when emacs isn't already started and emacclient has to fall back to starting emacs itself:               emacsclient: can't find socket; have you started the server?     To start the server in Emacs, type "M-x server-start".      What can I do to surpress this output? I've tried changing my emacs wrapper to                    #!/bin/sh          #Start emacs client          /usr/bin/emacsclient -ca emacs $1 &> /dev/null      but this didn't help. I didn't try editing EDITOR or VISUAL since I don't have any ideas other than this standard redirection.


title: Trying to install fonts on Linux Mint Lisa, but it looks like I have a permissions or ownership problem

text: I downloaded the Source Code Pro family of fonts, but cannot install them via the Font Viewer. If I give myself admin powers, I can manually add them to the rest of the fonts, so I'm guessing it's a permission issue. What would I need to do to install them via the Font Viewer? As a slight aside, I also read something about making sure the fonts were in the font cache as well. Is that necessary? If so, what's that entail?


title: How to shutdown the computer from SLiM when root login is disabled?

text: I installed the SLiM login manager on Debian Wheezy and disabled the root account's ability to login, as described in this Debian Wiki article, so `sudo <command>` must be used to run anything as root. When I try to shutdown the system from SLiM, by following the instructions in the SLiM manual, i.e. typing "halt" as the username, then a password, SLiM does not shutdown. `/var/logs/slim.logs` reports this error:               slim: pam_authentication(): Authentication failure        * This problem does not appear when Debian is configured to allow root to login. How can I shutdown the computer from SLiM when root login is disabled?


title: How do I correlate /dev/sd devices to the hardware they represent?

text: A drive is beginning to fail and I only know the device by its `/dev/sdb` device file designation. What are the ways that I can use to correlate that device file to an actual hardware device to know which drive to physically replace? **Bonus:** What if I don't have `/dev/disk/` and its sub directories on this installation? (Which, sadly, I don't)


title: What is the best text-mode browser?

text: I am looking for one that is updated frequently and has support for many things. Please also state how to install it.


title: How to add a timestamp to each line of a logfile?

text: I have an external program which I can not edit. It writes its log to a file. **How do I add a timestamp to each line while the program writes to the logfile?**   It does not write its output to stdout. The timestamp should at least include seconds. Preferably only using standard linux tools such as pipes, bash, cron etc. After testing a few example scripts, I noticed that the program closes the logfile to reload its configuration, then it recreates the same file as a plain empty textfile. I guess this means one has to use another approach such as continously (cron) rechecking the file contents?


title: get arguments passed and put it in an array

text: is there a way to make the arguments passed become the element of an array? I want to access those arguments individually through array. like this:               ./script.ksh arg1 arg2 arg3      then it will become like this:               element[0]=arg1     element[1]=arg2     element[2]=arg3


title: Where is best place to find sources of standard linux command line tools?

text: Into: I like learning by reading sources. But it's tiring of searching them across internet splited on many many different project sites. I'd love to see **central browsable** repo with sources of many many apps in one place.   * When someone want to find documentation of some Linux tool, best place is : `man toolname`.    * When I want to browse Linux sources "on-demand" I can always jump to : Linux Cross Reference.   * When I want to find most common staff, I can find all sources in Coreutils.    * When I want to check how to build something, I can (for example) jump into http://www.archlinux.org/packages/ , check it's pkgbuild. Is there any repo that holds sources of most of tools in one place ? - just like `man` holds documentation or Linux Cross Reference kernel sources. I mean something for "rapid" "on-demand" checking how stuff is implemented. (Yes, I know google -> but I am tired of routine: 1. searching project site 2. browsing repo or even worse -> checking out it's repo 3. deleting when finished) **REMARK:** I've stressed out, I'd like to check tools : rapidly, fast, on-demand. It means: I don't want to install whole app with it's sources just to take a look into it's sources. (btw. web resource is preferable, so I could check sources from many computers - I do not have admin on all of them)


title: Grep searching for files which are not existing

text: I wanted to search for the text " Starting kernel" in a directory, so I did this:                [root@xilinx petalinux-v2013.10-final]# grep -r "Starting kernel"       grep: warning: tools/packagemanager/lib/i686: recursive directory loop          grep: Xilinx-ZC702-14.7/build/linux/rootfs/targetroot/etc/init.d/functions: No such file or directory     grep: Xilinx-ZC702-14.7/build/linux/rootfs/targetroot/etc/rcS.d/S10flashdev: No such file or directory     grep: Xilinx-ZC702-14.7/build/linux/rootfs/targetroot/mnt/net: No such file or directory     grep: Xilinx-ZC702-14.7/build/linux/rootfs/targetroot/mnt/cf: No such file or directory     Binary file Xilinx-ZC702-14.7/pre-built/linux/images/u-boot.elf matches     Binary file Xilinx-ZC702-14.7/pre-built/linux/images/BOOT.BIN matches     Binary file Xilinx-ZC702-14.7/pre-built/linux/images/output.bin matches      Why is it searching in files that don't exist? Why am I getting these "No such file or directory" messages? Also, why is it searching binary files when I gave it ASCII characters? Can a binary file contain a string like mine?


title: Collect files using find

text: I currently have this script:               find . -name '*.log' -print0 | xargs -0 tar zcf $file      To collect all the "*.log" files. I would like to modify it to include also all the ".txt" files but I don't know how, this should be fairly simple right?


title: Fastest way to port scan. NMAP?

text: I am looking for a quick way to scan for commonly open ports on proxies. I am doing this through php and I have been using nmap and came up with this command:               <?php     system("nmap -PN -p U:1194,T:21,22,25,53,80,110,111,143,443,465,993,995,3306,8443,553,554,1080,3128,6515,6588,8000,8008,8080,8081,8088,8090,8118,8880,8909,1723,7080 {$_SERVER['REMOTE_ADDR']} 2>&1");      ?>      The problem is that it typically takes 1-2 seconds for the scans to complete, even if i just defined port 80, it's still around 1-2 seconds. However doing this in PHP will return almost instant or timeout within 0.5 seconds:                   if( @fsockopen( $_SERVER['REMOTE_ADDR'], $port, $errstr, $errno, 0.5 ) )         die("php_tests_callback({success: false, message: 'Client has port $port open'});");      So I am wondering if there is a more optimized way of using NMAP or an alternative program? I am almost tempted to write some sort of php forking process to run numerous fsockopens. Edit: Apparently I need to read NMAP man before I post a question. I came up with these arguments which usually get the scan down to 0.50 seconds or a tad more.:               system("nmap -T5 --host-timeout 4s --min-rate 1000 -PN -p U:1194,T:21,22,25,53,80,110,111,143,443,465,993,995,3306,8443,553,554,1080,3128,6515,6588,8000,8008,8080,8081,8088,8090,8118,8880,8909,1723,7080 {$_SERVER['REMOTE_ADDR']} 2>&1");       However, I am still open to other suggestions/applications.


title: How to overcome libc resolver limitation of maximum 3 nameservers?

text: Suppose I work in environment with number of domain changes and slow propagation.   I want to test domain configuration immediately after setting change but the propagation is slow. So I want to add more nameservers to `/etc/resolv.conf` file in my Debian 6.0.3 laptop. Especially domain name servers of my domain name registrar. I do it by adding:               append domain-name-servers 85.128.130.10, 194.204.152.34;      to my `/etc/dhcp/dhclient.conf` file. After reconnecting to the network my `/etc/resolv.conf` is updated properly, but with following message:               # NOTE: the libc resolver may not support more than 3 nameservers.     # The nameservers listed below may not be recognized.      So is there a way to use more than 3 nameservers at the time?


title: How can I install programming tools in the root directory so that they can be used by non-admin users?

text: I'm running OS X and for security reasons my main account does not have admin privileges. How can I install development tools in the root directory so that they can be used by all users? If this can't be done, how can I install these tools so they can be used by a single non-admin user?


title: shell howto: save multiple binary data files (jpg) to one file with some additional data and separate again

text: I have a system with restricted calculational power (fritzbox) and functions (busybox) and an webcam, able to deliver JPG files.   Now I'm looking for for a method (based on shell script) to download JPG files every 5 seconds, save them (that's no problem with `wget`) and stream them later through a webserver. I set up everything but encountered some problem: As the system is getting very slow with so many JPG files in a folder (even if I split them up to several folders) I thought about writing them to a single file (`echo`, `cat`, ...) and extracting them later again (`sed`, `awk`).   Now, shell scripts are not really comfortable dealing with binary data, so "echo" and "cat" commands fail as they don't produce readable jpg-files. I download the JPG file with `wget` either to a temporary file or to a variable. At the moment I then `cat` each new JPG to a common file, separated by a unique string e.g. "--myboundary", which I echo in without newlines. How can I now extract the single jpg's from this common file which contains all the JPGs? I tried `awk`, but got somehow crap results.


title: Will Linux become UNIX, instead of just UNIX Like?

text: More specifically, is it a goal to make Linux match up to the Single UNIX Specification? Additional details would be nice, for example.   * Is Linux hopelessly far, or somewhere nearby the SUS?   * Is the SUS considered pointless?   * Has Linus said anything about it?


title: Why my cpu spend so much time on system?

text: top - 08:58:42 up 20 days,  8:23,  1 user,  load average: 67.17, 58.94, 62.75     Tasks: 630 total,  40 running, 524 sleeping,   0 stopped,  66 zombie     Cpu(s): 57.3%us, 41.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.1%hi,  1.0%si,  0.0%st     Mem:  16331504k total, 15494480k used,   837024k free,  4227840k buffers     Swap:  4194296k total,   263000k used,  3931296k free,  2079368k cached      What's the problem? Only 57.3% usage. 41.6% sy. What is that?


title: What does the 'i8042.nomux=1' kernel option do during booting of Ubuntu?

text: I have a laptop with a multi guesture touchpad. My touchpad never works in any Linux distro such as Ubuntu, Fedora, openSUSE, Linux Mint, Knoppix, Puppy, Slitaz and lots more. I have tried lots of things but nothing worked. I have been struggling with the Synaptics drivers for over one year but it doesn't work either. Then somewhere I read about the `i8042.nomux` kernel option. So I booted Ubuntu with following options:               i8042.nomux=1 i8042.reset      This made my touchpad work on all variants of Ubuntu and its derivatives like Linux Mint. I am eager to know about these options. If I knew what it does exactly, I would be able to use my touchpad in all linux distros, as this option only works with Ubuntu.


title: Why the main page of apache points to Virtual Host

text: I've configured two Virtual Hosts using a single IP and following the documentation. Here the conf:               VirtualHost configuration:     wildcard NameVirtualHosts and _default_ servers:     *:80                   is a NameVirtualHost              default server host1.example.com (/etc/httpd/conf/httpd.conf:1019)              port 80 namevhost host1.example.com (/etc/httpd/conf/httpd.conf:1019)              port 80 namevhost host2.example.com (/etc/httpd/conf/httpd.conf:1024)      If I point my browser to `host1.example.com` or `host2.example.com`, I can see the correct corresponding page. If I point to the server name `server.example.com`, I see the `host1.example.com` index.html, and not the index.html in the corresponding DocumentRoot (`/var/www/html`). Is this the correct behaviour?


title: different checksum of original file and copied file

text: I am running a script that copy a file from one location to other. In script I am calculating MD5sum using below command of original file and copied file and they are different:               echo -n "file" | md5sum      How come a same file have different MD5sum? Does copy command change something in Linux? I have also checked checksum using `cksum filename` and it is also coming different.


title: Recommend a Linux Distribution for my use

text: I have no experience with Linux. I'm looking for a distribution which is beginner friendly. Ubuntu looks great. My usage for this system will include web development, and possibly application development. However, I would prefer a system where I can design my own theme, alter the interface. Think "theming". What would you recommend? **EDIT** I'm looking to run this on a 2008 MacBook Pro 2.4Ghz C2D, 2GB GDDR3. Will it be okay performance wise through virtualization such as VMWARE or should I use BootCamp?


title: possibilty of running deamons with under privilaged users while bootup

text: I have authoritative DNS daemon in my test DNS setup. which is responsible to provide host IP at best choice. Anyway this daemon/process can run by setting some capabilities using `setcap` and then a development user can start or stop this without interacting to root user or `sudo`. But while bootup the box this daemon/process again appears as running as root in `ps` output. My question, as is if i can start/stop this process with minimal capability/privileges from a non-root user then at the bootup also I don't want to see this running as root user. Is there any mechanism in init scripts to run the given process with non zero id?


title: What's the difference between "export" and "setenv"?

text: What's the difference between `export` and `setenv`?


title: Use awk to find all Ports for each IP that have https open

text: I'd like to print all ips (IP space Port) which have open https ports given a gnmap file. An example output for a line that has only https running on port 443:               123.123.123.123 443      A more elaborate example input and desired output (not all test-cases in there):               Host: 123.123.123.123 ()  Ports: 80/open/tcp//http?///, 443/open/tcp//https?///, 8083/closed/tcp//us-srv///, 65001/closed/tcp/////        Ignored State: filtered (65531) Seq Index: 262  IP ID Seq: Randomized     Host: 123.123.123.124 ()  Ports: 80/open/tcp//http?///, 443/open/tcp//https?///, 10443/open/tcp//https///, 65001/closed/tcp/////        Ignored State: filtered (65531) Seq Index: 262  IP ID Seq: Randomized     Host: 123.123.123.125 ()  Ports: 80/open/tcp//http?///, 443/open/tcp//https?///, 8083/closed/tcp//us-srv///, 8445/open/tcp//https///, 65001/closed/tcp/////        Ignored State: filtered (65531) Seq Index: 262  IP ID Seq: Randomized     Host: 123.123.123.126 ()  Ports: 1337/open/tcp//https?///, 8083/closed/tcp//us-srv///, 65001/closed/tcp/////        Ignored State: filtered (65531) Seq Index: 262  IP ID Seq: Randomized      The output for this file should be:               123.123.123.123 443     123.123.123.124 443     123.123.123.124 10443     123.123.123.125 443     123.123.123.125 8445     123.123.123.126 1337      What would be the awk solution for this?


title: List all GPG/PGP keys of a local SKS key server

text: We have set up a local SKS keyserver in my company. It seems it is only possible to search keys (either for a name, email or keyid). However, there are not so many users, so we would like to make the **key repository browseable** , that is being able to **list all keys**. How would that be possible?


title: Launching an external script with source command

text: I've been learning shell scripting, by reading good tutorials and reading scripts. I was reading this minecraft init script, and these first lines hit me:               if [ -L $0 ]     then         source `readlink -e $0 | sed "s:[^/]*$:config:"`     else         source `echo $0 | sed "s:[^/]*$:config:"`     fi      So, these lines launch the script named "config" (where all config values are stored) in the same shell. But why, instead of launching directly the file (with something like "source config", the author of that script reads the name of the original script (whether it is a link or not) and sends the result to `sed` to replace this name with "config"?


title: swapoff fails when overcommit_memory==2

text: I've disabled memory overcommitting by setting `overcommit_memory=2`. Now when I tried to `swapoff`, I get this error: > swapoff: /dev/sda5: swapoff failed: Cannot allocate memory But I in fact have `0 MiB` in swap and lots of free memory! I tried setting `overcommit_ratio` to 100, but it didn't change anything. If I temporarily set `overcommit_memory=0` as is by default, I cat successfully `swapoff`, then re-disable overcommitting. Why such strange behavior? Is it a bug? * * * **EDIT** as asked in comments:               $ grep -E '^Mem|Commit' /proc/meminfo     MemTotal:        2044420 kB     MemFree:          751836 kB     CommitLimit:     4122112 kB     Committed_AS:    2752544 kB


title: 'Git clone' times out with 443 error message

text: git clone -v https://github.com/me/myproj     Cloning into 'myproj'...     <minutes pass>     error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/me/myproj.git/info/refs     fatal: HTTP request failed      I believe there is a problem with SSL certificates and have tried most of the solutions here: http://stackoverflow.com/questions/3777075/ssl-certificate- rejected-trying-to-access-github-over-https-behind-firewall (well, the ones that involve putting certificates in /etc/pki/tls/certs) Is an SSL CA problem definitely the cause of this error? Any other solutions I can try? The server is RHEL 6.4. ### More information This is the result with GIT_CURL_VERBOSE=1, for a successful checkout from non-HTTPS github:               $ git clone http://github.com/stevage/tilemill-server     Cloning into 'tilemill-server'...     * Couldn't find host github.com in the .netrc file; using defaults     * About to connect() to proxy bproxy.xxx port 8080 (#0)     *   Trying 131.170.90.1... * Connected to bproxy.xxx (xxx) port 8080 (#0)     > GET http://github.com/stevage/tilemill-server/info/refs?service=git-upload-pack HTTP/1.1     User-Agent: git/1.7.11.3     Host: github.com     Accept: */*     Proxy-Connection: Keep-Alive     Pragma: no-cache          < HTTP/1.1 200 OK     < Server: GitHub.com     < Date: Mon, 09 Sep 2013 06:43:27 GMT     < Content-Type: application/x-git-upload-pack-advertisement     < Expires: Fri, 01 Jan 1980 00:00:00 GMT     < Pragma: no-cache     < Cache-Control: no-cache, max-age=0, must-revalidate     < Vary: Accept-Encoding     < Transfer-Encoding: chunked     < Proxy-Connection: Keep-Alive     < Connection: Keep-Alive     <      * Expire cleared     * Connection #0 to host bproxy.rmit.edu.au left intact     * Couldn't find host github.com in the .netrc file; using defaults     * About to connect() to proxy bproxy.xxx port 8080 (#0)     *   Trying xxx... * connected     * Connected to bproxy.xxx (xxx) port 8080 (#0)     > POST http://github.com/stevage/tilemill-server/git-upload-pack HTTP/1.1     User-Agent: git/1.7.11.3     Host: github.com     Accept-Encoding: deflate, gzip     Proxy-Connection: Keep-Alive     Content-Type: application/x-git-upload-pack-request     Accept: application/x-git-upload-pack-result     Content-Length: 174          < HTTP/1.1 200 OK     < Server: GitHub.com     < Date: Mon, 09 Sep 2013 06:43:28 GMT     < Content-Type: application/x-git-upload-pack-result     < Expires: Fri, 01 Jan 1980 00:00:00 GMT     < Pragma: no-cache     < Cache-Control: no-cache, max-age=0, must-revalidate     < Vary: Accept-Encoding     < Transfer-Encoding: chunked     < Proxy-Connection: Keep-Alive     < Connection: Keep-Alive     <      remote: Counting objects: 17, done.     remote: Compressing objects: 100% (13/13), done.     * Connection #0 to host bproxy.xxx left intact     remote: Total 17 (delta 3), reused 16 (delta 2)     Unpacking objects: 100% (17/17), done.     * Closing connection #0      Now, with HTTPS:               $ git clone https://github.com/stevage/tilemill-server     Cloning into 'tilemill-server'...     * Couldn't find host github.com in the .netrc file; using defaults     * About to connect() to proxy bproxy.xxx port 8080 (#0)     *   Trying xxx... * Connected to bproxy.xxx port 8080 (#0)     * Establish HTTP proxy tunnel to github.com:443     > CONNECT github.com:443 HTTP/1.1     Host: github.com:443     User-Agent: git/1.7.11.3     Proxy-Connection: Keep-Alive     Pragma: no-cache          < HTTP/1.1 200 Connection established     <      * Proxy replied OK to CONNECT request     * Initializing NSS with certpath: sql:/etc/pki/nssdb     *   CAfile: /etc/pki/tls/certs/ca-bundle.crt       CApath: none     * SSL connection using SSL_RSA_WITH_RC4_128_SHA     * Server certificate:     *   subject: CN=github.com,O="GitHub, Inc.",L=San Francisco,ST=California,C=US,postalCode=94107,STREET=548 4th Street,serialNumber=5157550,incorporationState=Delaware,incorporationCountry=US,businessCategory=Private Organization     *   start date: Jun 10 00:00:00 2013 GMT     *   expire date: Sep 02 12:00:00 2015 GMT     *   common name: github.com     *   issuer: CN=DigiCert High Assurance EV CA-1,OU=www.digicert.com,O=DigiCert Inc,C=US     * Connected to bproxy.xxx (xxx) port 8080 (#0)      (no more output) I have seen other people successfully connect on HTTPS through this proxy (it's a university-wide proxy - unlikely to be the problem).


title: How can I forward sound over VNC?

text: I use TightVNC and Remmina Remote Desktop to connect my Raspberry Pi to my Ubuntu laptop over VNC. It works great for the most part, except for the fact that there is no sound. I have googled all over the place, looking up forwarding sound over VNC, sound over VNC via SSH tunnel, sound forwarding via PulseAudio Network Transparency. I can't find how to do it. Does anyone know how to get sound over VNC?


title: how to calculate the average value of the column that have the row ID?

text: I want to calculate the average value of my data when they have the same ID (in my specific case, the same day but different time in a day). This is meant to calculate the daily average value of my data from the hourly/sub hourly data. My data looks like below.               Date        hour        value      06/21/1978  14:00:00    1     06/21/1978  15:00:00    2     06/21/1978  16:00:00    3     06/21/1978  17:00:00    4     06/21/1978  18:00:00    5     06/21/1978  19:00:00    6     06/21/1978  20:00:00    7     06/21/1978  21:00:00    7     06/21/1978  22:00:00    9     06/21/1978  23:00:00    10     06/22/1978  00:00:00    5     06/22/1978  01:00:00    5     06/22/1978  02:00:00    5     06/22/1978  03:00:00    7     06/22/1978  04:00:00    8     06/22/1978  05:00:00    9     06/22/1978  06:00:00    22     06/22/1978  07:00:00    56     06/22/1978  08:00:00    9     06/22/1978  09:00:00    12     06/22/1978  10:00:00    3     06/22/1978  11:00:00    5     06/22/1978  12:00:00    7      I want the output to be               Date        value     06/21/1978  5.4     06/22/1978  11.7692307692


title: Cannot get Realtek r8168 ethernet card up

text: I've working on Arch Linux and in 99% of time I connect to internet by WLAN but sometimes I need to use ethernet connection, so today I see something strange. My eth0 device is down, and I can't get it up. I tried               # ip link set eth0 up     # ifconfig eth0 up      But after any of above commands `ip link` shows:               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN mode DEFAULT          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000         link/ether 8c:a9:82:01:13:6e brd ff:ff:ff:ff:ff:ff     5: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000         link/ether 14:da:e9:0c:a9:d6 brd ff:ff:ff:ff:ff:ff      Output of `lspci -v`:               08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)             Subsystem: ASUSTeK Computer Inc. U6V/U31J laptop             Flags: bus master, fast devsel, latency 0, IRQ 48             I/O ports at 8000 [size=256]             Memory at d3804000 (64-bit, prefetchable) [size=4K]             Memory at d3800000 (64-bit, prefetchable) [size=16K]             Capabilities: <access denied>             Kernel driver in use: r8168      Output of `dmesg | grep r8168`:               [    7.642820] r8168 Gigabit Ethernet driver 8.032.00-NAPI loaded     [    7.642964] r8168 0000:08:00.0: irq 48 for MSI/MSI-X     [    7.798226] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.     [    7.798232] r8168  Copyright (C) 2012  Realtek NIC software team <nicfae@realtek.com>      [   19.263312] r8168: eth0: link down     [  404.826781] r8168 Gigabit Ethernet driver 8.032.00-NAPI loaded     [  404.827275] r8168 0000:08:00.0: irq 48 for MSI/MSI-X     [  404.981486] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.     [  404.981491] r8168  Copyright (C) 2012  Realtek NIC software team <nicfae@realtek.com>      [  405.011797] r8168: eth0: link down      Output of `dmesg | grep eth0`:               [    7.798230] eth0: Identified chip type is 'RTL8168E/8111E'.     [   19.263312] r8168: eth0: link down     [   19.263709] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready     [  404.981490] eth0: Identified chip type is 'RTL8168E/8111E'.     [  405.011797] r8168: eth0: link down     [  405.012293] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready


title: How can I set the position that terminal opens at?

text: I'd like Terminal to open near the bottom of my screen. Is there a way to set the default size and position? I'm using Linux Mint 13, Cinnamon.


title: How to get rows between lines?

text: I have a perl oneliner:               echo -e 'sla\ndfjAAAAk\nsaljdfla\nsjdfBBBBsadf\njasdf' | perl -E 'my $_ = do { local $/; <> }; say join qq!\n!, m!\QAAAA\E\K(.*?)(?=\QBBBB\E)!gs'     k     saljdfla     sjdf      it works, but I need this output:               dfjAAAAk     saljdfla     sjdfBBBBsadf      so I need the lines that contains "AAAA" and "BBBB" too - not just "from" and "to" them. How can I do this?


title: resolution of attached widescreen

text: I wanted to connect my TV (Sony Bravia) to my Laptop. My laptop has a displayport and the TV a HDMI. So with the adapters, I'm able to connect those two, and that part works. What doesn't work, is both screen are widescreen, but it does configure both of them automatically (Kubuntu 12.04) as 1048x768. With the gui tools of Kubuntu, it doesn't even give me the choice to change the resolution to a widescreen one. xrandr gives me the following output:                   xrandr --query         Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192         LVDS1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 287mm x 180mm            1440x900       60.0*+   59.9     50.0              1360x768       59.8     60.0              1152x864       60.0              1024x768       60.0              800x600        60.3     56.2              640x480        59.9           VGA1 disconnected (normal left inverted right x axis y axis)         HDMI1 connected 1024x768+0+0 (normal left inverted right x axis y axis)         1600mm x 900mm            1920x1080      60.0 +            1280x1024      60.0              1280x720       60.0              1024x768       60.0*             800x600        60.3              640x480        60.0        How can I fix this?


title: GPL Alternative to Nomachine that is not FreeNX

text: Anyone know something that is actively maintained? I'm currently using XRDP, but it is somewhat buggy, also I'd prefer to utilize non-corporate driven standards, even though RDP is an open spec.


title: SSH within SSH displays the wrong machine name in the xterm title bar

text: I am working on a distributed system connecting to several servers at once. Nothing is started manually in the program I am working on, but this is how to recreate the error manually. I start a xterm then I SSH to a machine like this: `ssh machine_1` In there I start another xterm in the first xterm like this: `xterm &` Then the title bar of the new xterm window is something like "username (on machine_1)" In this xterm I SSH to another machine like this: `ssh machine_2` But then the title bar remains like this: "username (on machine_1)" even though I am logged on to machine_2. I want it to say "username (on machine_2)". Completely removing the parenthesis would also be fine. I tried xtermset but that does not affect the parenthesis.


title: 256 colour prompt in Zsh

text: How can I set my prompt to be colourized in 256 colours? I am looking for an equivalent to the bash prompt:                 local DEFAULT="\[\033[0;39m\]"       local ROOK="\[\033[38;5;24m\]"       PS1="${ROOK}\$${DEFAULT} "


title: How to change the window manager on a Raspberry Pi?

text: I want to try out X11 on a Raspberry Pi (running as a server without display connected, OS Raspbian) and access it through VNC. I don't like LXDE very much, so I want to change to another window manager. I tried many things, but LXDE is always starting. Following packages are installed:               sudo aptitude install x-window-system xfce4 xfce4-themes x11vnc icewm fluxbox gnome tightvncserver      I am running the server with following command:               vncserver -geometry 800x600 :0      When I connect to the Raspberry Pi using RealVNC, I come to the LXDE desktop. What I have tried so far: I ran `sudo update-alternatives --config x-window-manager` and changed it from openbox to `xfwm4`               $ update-alternatives --config x-window-manager     Es gibt 5 Auswahlm¦glichkeiten f¦r die Alternative x-window-manager (welche /usr/bin/x-window-manager bereitstellen).            Auswahl      Pfad                   Priorit¦t  Status     ------------------------------------------------------------       0            /usr/bin/openbox        90        Auto-Modus       1            /usr/bin/icewm          50        manueller Modus       2            /usr/bin/metacity       60        manueller Modus       3            /usr/bin/openbox        90        manueller Modus       4            /usr/bin/startfluxbox   50        manueller Modus     * 5            /usr/bin/xfwm4          60        manueller Modus      I have edited `/etc/X11/default-display-manager` and changed it from `/usr/sbin/lightdm` to `/usr/bin/icewm`. After a system reboot, I ran the vncserver again, and again I come to LXDE. I am seeing openbox and lxsession in the process list:               $ ps aux | grep lx     daniel    3604  0.0  0.3  12904  1516 pts/0    Sl   01:39   0:00 /usr/bin/lxsession -s LXDE -e LXDE     daniel    3614  0.1  1.3  15268  6160 pts/0    S    01:39   0:00 openbox --config-file /rasdata/profiles/daniel/.config/openbox/lxde-rc.xml     daniel    3616  0.6  2.2 113392 10060 pts/0    S    01:39   0:02 lxpanel --profile LXDE     daniel    3632  0.0  1.0  26352  4680 pts/0    Sl   01:39   0:00 /usr/lib/arm-linux-gnueabihf/lxpolkit     daniel    3684  0.0  0.1   3836   816 pts/0    S+   01:46   0:00 grep lx      I am currently not sure which window manager I want to have. I will try all and find out the one which I like most. At the moment I am trying to find a way to change it somehow away from LXDE. I liked KDE very much, but it does not seem to be included in Raspbian. The package could not be found in aptitude.


title: Transfering content of block devices

text: For the purpose of backups, I'd like to transfer (several) whole disk partitions over an ssh link. So the source is a block special device, and the target should be a regular file. Common tools seem ill-suited for this, though:   * `scp` will complain `not a regular file`   * `tar` will try to recreate device inodes on the target side   * `rsync` says `skipping non-regular file` My best bet currently is `nc` over a port forwarding, or one `cat` invocation on the remote side per partition, which means one password entry per partition unless one sets up public keys. Is there a more elegant solution? Environment would be any reasonable Linux live system. Currently I happen to have a Debian wheezy lying around, but it should not be _too_ specific to that.


title: Create target directory when extracting tarball

text: Is it possible to create a target directory, similar in nature to the `mkdir -p` switch, where I can define a non-existent target directory within my tar command, and tar will create the directory for me? I know I can redirct the output to a directory using `tar -C /target/dir`, but this doesn't work if the target directory is non-existent.


title: What dev folder allows you tell the OS to cache something?

text: Someone told me that there is a sub folder off of dev that basically allows you to tell the OS to keep the contents of that folder cached in RAM. So if I put some files & directories in `/dev/somefolder` the OS would keep this folder's content cached. What folder is that? I'm on ubuntu 12.04, in case that matters.


title: connect() blocked for 3 seconds after a lot of success connect()

text: I am writing a client-side application which `connect()` to a server and close it in a for loop. The `connect()` is done in blocking-mode, and I found that some `connect()` call will block for about 3 seconds after thousands of successful `connect()`. I used tcpdump and found some strange result: after I called the `connect()`, SYN was not sent for about 3 seconds. What happened? PS. I am on 64-bit Ubuntu, kernel 3.0.0-13.


title: Log analysis software

text: In order to learn more about what is logged by my desktop machine, I'd like to set up something better than a casual `grep` command to see what's going on. A typical use case would be to send an email with a warning if more than _X_ SSH login attempts failed within _Y_ minutes for user _username_. To be clear, this is **not for web server logs** , which most *nix log analysis tools seem to be focusing on. Also, I would like this system to be _live_ , not just a `grep` in `cron`, in order to be able to catch events like `shutdown now` before the machine goes down. LogSurfer _might_ be the right thing for me, but I'd like to know of other, similar tools if there are any. Of course, I'm only interested in FLOSS.


title: XFCE focus snaps back to under cursor

text: Not sure how to explain this. In many apps but not all, When there's a drop- down and the mouse pointer is inside it, I cannot navigate the list using keyboard. The focus in the list keeps snapping back to under the mouse cursor. Also, (I think these are related) in some situations when there is a popup window with the input area, the input focus will jump back from popup back to where it was before the the popup. I think this started when I enabled "Focus stealing prevention", but I since disabled it. How do I get back to "normal" focus behaviour?


title: Wine size window is too small!

text: I've installed `Wine` on `Linux Mint 16` to run _setup.exe_ files from `Windows`, but when i run the _.exe_ file, a very small-sized window appears, the setup seems to work but i can't read anything. The same happens when i run wine configurations, and so i think the problem is on Wine application. This is what i get in my desktop. The window looks minimized, but it's not possible to maximize or resize it!


title: Harddrive remaining space does not compute

text: I have a server which has a handful of services (Apache, MySQL, DNS, Nagios), and have been having issues with the harddrive filling up. Upon further review, I noticed that the percentage used according to `df` doesn't make any sense. Used space plus available space does not equal total space. At the time I first became aware of this (thanks to a Nagios notification), the available space was less than 1 GB out of our 40 GB harddrive. According to `du` and `df` "Used" column, the actual used was 11GB. That's a difference of 28GB. At the moment it's fluctuating only a little, but sometimes it fluctuates at over 1000 bytes per second. See here:               $ df / && sleep 5 && df /     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/vzfs             41943040  11398324  29195724  29% /     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/vzfs             41943040  11398324  29173016  29% /      This is a VPS that I don't have physical access to. It's running XFS, so a normal reboot fsck isn't an option either. It doesn't do it constantly, and log files don't seem to indicate anything going on. `iotop` doesn't even show any activity at all. Twist, we have people actively using this machine so we can't just format. Output of `df -a`:               $ sudo df -a     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/vzfs             41943040  11398740  29064180  29% /     proc                         0         0         0   -  /proc     sysfs                        0         0         0   -  /sys     none                    524288         4    524284   1% /dev     none                         0         0         0   -  /dev/pts     none                   5242880        12   5242868   1% /var/tmpfs     none                         0         0         0   -  /proc/sys/fs/binfmt_misc     /etc/named            41943040  11398740  29064180  29% /var/named/chroot/etc/named     /var/named            41943040  11398740  29064180  29% /var/named/chroot/var/named     /etc/named.rfc1912.zones                           41943040  11398748  29064172  29% /var/named/chroot/etc/named.rfc1912.zones     /etc/rndc.key         41943040  11398748  29064172  29% /var/named/chroot/etc/rndc.key     /usr/lib64/bind       41943040  11398756  29064164  29% /var/named/chroot/usr/lib64/bind     /etc/named.iscdlv.key                           41943040  11398764  29064156  29% /var/named/chroot/etc/named.iscdlv.key     /etc/named.root.key   41943040  11398772  29064148  29% /var/named/chroot/etc/named.root.key


title: How do I fix this boot-up error (attempt to read or write outside of partition)?

text: I just installed a version of ubuntu linux that I got from here, http://www.bauer-power.net/2013/06/bauer-puntu-1304-is-alive-download-it.html using vmware workstation. I have installed it before without a problem. This time I chose the _full encryption option plus the home folder encrypt_ , could that be the reason why I am getting this error:               error: attempt to read or write outside of partition     error: you need to load the kernel first.      This picture is of the boot commands when I press e over the selected OS: ![enter image description here](http://i.stack.imgur.com/cJUEo.jpg) I apologize for the image background. Also Even though it looks split that is how it would look if you scrolled down. Does anyone have any suggestions on what I can do to get the kernel to load, or whatever I have to do to get the OS to boot?


title: Give user read/write access to only one directory

text: I'm running a server, and I need to give read/write access to a particular directory to a single user. I've tried the following:               sudo adduser abcd     sudo groupadd abcdefg     chown -R .abcdefg /var/www/allowfolder     chmod -R g+rw /var/www/allowfolder     usermod -a -G comments abcd      The above seems to work, however it gives the user read-only access to the rest of the server. How can I set up permissions so that the user can only read and write to a particular folder? The user should also be able to run programs like `mysql`.