title: USB hard drive not recognized

text: My computer runs Cruncbang Linux (debian based). When I try to connect my friends external USB hard drive, it's not recognized. `sudo fdisk -l` doesn't show any new devices when I plug the USB drive in. `lsusb` does show the device. If I save the output of `ls -la /dev` to a file before and after plugging the device in. Then diff I get this `sg3`. This is the file: `crw------- 1 root root 21, 3 Sep 23 20:39 sg3` The first letter in the line is `c` which means character special file. When I tail `/var/log/syslog` and plug the USB drive in I get this output:               Sep 23 20:20:54 crunchbang kernel: [  642.116178] usb 2-4: new high-speed USB device number 7 using ehci_hcd     Sep 23 20:20:54 crunchbang kernel: [  642.250196] usb 2-4: New USB device found, idVendor=1058, idProduct=0740     Sep 23 20:20:54 crunchbang kernel: [  642.250206] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=5     Sep 23 20:20:54 crunchbang kernel: [  642.250213] usb 2-4: Product: My Passport 0740     Sep 23 20:20:54 crunchbang kernel: [  642.250219] usb 2-4: Manufacturer: Western Digital     Sep 23 20:20:54 crunchbang kernel: [  642.250225] usb 2-4: SerialNumber: 575834314136314838333937     Sep 23 20:20:54 crunchbang kernel: [  642.251082] scsi4 : usb-storage 2-4:1.0     Sep 23 20:20:54 crunchbang mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:06.1/usb2/2-4"     Sep 23 20:20:54 crunchbang mtp-probe: bus: 2, device: 7 was not an MTP device     Sep 23 20:20:54 crunchbang dbus[2208]: [system] Activating service name='org.freedesktop.UDisks' (using servicehelper)     Sep 23 20:20:54 crunchbang dbus[2208]: [system] Successfully activated service 'org.freedesktop.UDisks'     Sep 23 20:20:55 crunchbang kernel: [  643.250209] scsi 4:0:0:0: Direct-Access     WD       My Passport 0740 1003 PQ: 0 ANSI: 6     Sep 23 20:20:55 crunchbang kernel: [  643.250691] scsi 4:0:0:1: Enclosure         WD       SES Device       1003 PQ: 0 ANSI: 6     Sep 23 20:20:55 crunchbang kernel: [  643.255046] sd 4:0:0:0: Attached scsi generic sg3 type 0     Sep 23 20:20:55 crunchbang kernel: [  643.256741] scsi 4:0:0:1: Attached scsi generic sg4 type 13     Sep 23 20:21:56 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:21:57 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:21:58 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:21:59 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:22:00 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:22:01 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:22:01 crunchbang kernel: [  643.263011] sd 4:0:0:0: [sdc] Spinning up disk.............................................................not responding...     Sep 23 20:22:02 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]      A similar question suggests to comment out MTP catch all rules. I don't know much about MTP but the link that that question points to https://bbs.archlinux.org/viewtopic.php?id=119676 suggests it has something to do with `/etc/udev/rules.d/libmtp.rules`. I don't have this file on my computer. But I do have these three:               /etc/udev/rules.d/10-vboxdrv.rules     /etc/udev/rules.d/70-persistent-cd.rules     /etc/udev/rules.d/70-persistent-net.rules      Does anyone know what the problem is here and how I might go about mounting this drive.


title: Extensible filesystems. AIDE vs tripwire

text: In my /etc directory there is something I do with files. Let us say that I am looking at /etc/passwd. What I do when it will be modified is to copy it over, in the following sense. I have a heirarchy of files: passwd, passwd_1,passwd_2,passwd_3 ... passwd_n. Before passwd is modified, I "rotate" the files ( similar to logrotate). passwd_n goes to passwd_n+1, passwd_n-1 goes to passwd_n, ... passwd_1 goes to passwd_2, passwd copies to passwd_1. Then I modify passwd. What I would like to do vis a vis a checksum program like tripwire or AIDE is to "let them know I've rotated and allow them to update the checksums but also check that the rotation has gone smoothly. Do either of there programs provide a way for specifying something like this?


title: Sparc Solaris - install optimised GCC 4.9, 32/64 bit?

text: We have a new (to us) solaris 10 box running on T4 cpus. Our software stack is Perl/Oracle based. We now have to install GCC 4.9. I wish to optimise this for the T4 CPU. I think the following configure will work:               configure --prefix=/app/org/sfw --enable-languages=c,c++ --with-cpu=niagara4      Is there anything else I need to do to get an optimised build for gcc 4.9? Any pitfalls I need to be made aware of?


title: Suspend-to-ram fails on Gentoo with i915

text: I am struggling with suspend-to-ram on my Acer Aspire V3 772G with Gentoo. My configuration:   * Gentoo 3.12.5 kernel (.config)   * /etc/portage/make.conf   * Portage world file 1) It works in Windows 7 and Linux LiveCD (Ubuntu 13.10). Therefore hardware is fine and it's not a general Linux issue, the cause must be in my Gentoo installation 2) On Gentoo it fails both in console and X (black screen after resume). In order to debug I tried the following:               dmesg > dmesg_before.ker; echo mem > /sys/power/state; dmesg > dmesg_after.ker      The results: dmesg_before.ker / dmesg_after.ker Since dmesg_after.ker was created, I can suspect BIOS resume works fine, but the graphics driver (i915) is the issue. 3) I wondered if it would work without i915 driver. Since it was built into kernel, I recompiled the kernel with the driver built as a module (new .config) and:               dmesg > dmesg_before.mod; echo mem > /sys/power/state; dmesg > dmesg_after.mod      Suprisingly, the suspend failed stopping at "Suspending console(s)" message. It was both with i915 module loaded and unloaded. Here's dmesg_before.mod. 4) I also tried other kernel versions (3.10.17, 3.12.0) and newest unstable xf86-video-intel package, but no luck, same results. I feel this is something trivial, like some kernel parameter or a package missing, but I don't know how to debug it further. Any hints? _EDIT_ : I was actually able to type `touch TEST; reboot` blindly after resume. It means that the resume is in fact successful, the only issue is that the screen remains off.


title: Intel wireless 7260 card is slow; eventually hangs and is unable to reconnect

text: I have fresh install of Debian Jessie. My WiFi controller is `Intel Corporation Wireless 7260 (rev 73)`. My WiFi works really slowly and after 5-10 minutes it just hangs. It fails to reconnect for some time. `wicd` shows the following error:               ERROR:dbus.connection:Exception in handler for D-Bus signal:     Traceback (most recent call last):       File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 230, in maybe_handle_message     self._handler(*args, **kwargs)       File "/usr/share/wicd/gtk/gui.py", line 253, in handle_connection_results     error(self.window, language[results], block=False)     KeyError: dbus.String(u'bad_pass')      I've tried `11n_disable=1` but it didn't worked


title: How can I launch gnome-terminal with unique titles for multiple tabs?

text: I've seen various posts about launching gnome-terminal with multiple tabs and the script below is working for me. That is to say, this script will launch gnome-terminal with various working directories or profiles. . .               #!/bin/sh     gnome-terminal \     --tab --working-directory=$HOME/notes  \     --tab --working-directory=$HOME/puppet \     --tab --profile=root-beamish           \     --tab --profile=odyssey                \     --tab --profile=root      ... but I'd like to set a unique title for each tab. In the case where a tab has its own profile I can change the title from within gnome-terminal with `Edit | Profiles | (NAME) | Edit | Title and Command` and then change "Initial Title" to what I want and "When terminal commands set their own titles" from "Replace initial title" to "Keep initial title". However, I'd rather not create a unique profile for every tab. I'd like a generic solution. I've tried adding `\--title='MyTitle'` but it doesn't seem to help. I'm using GNOME 2.28.2 on CentOS 6.


title: Why does adding a colon break this grep pattern?

text: I executed a search with `grep`, but it doesn't work like I expected it to. I have the following lines in a file:               blacklists/redirector/domains:needyoutube.com     lacklists/redirector/domains:openyoutube.com     blacklists/redirector/domains:proxy-youtube.com     blacklists/redirector/domains:proxytoyoutube.com     blacklists/redirector/domains:streamyoutube.com     blacklists/redirector/domains:unblockyoutube.com      When I run:               grep ':youtube.com'      I get no results. The following works:               grep 'youtube.com'      How can I escape the colon (`:`)? Backslash (grep '\:youtube.com') doesn't work. I use RHEL 5, grep (GNU grep) 2.5.1. Update: I forgot the entries I wanted to grep, these exist also:               ./blacklists/movies/domains:youtube.com     ./blacklists/movies/domains:youtube.com.br      I want to just get the fields that contain the exact domain name. So I want to get the blacklists linked to youtube.com, so I use ":youtube.com". From the list above (youtube.com, youtube.com.br), I only should get youtube.com, but I don't get anything. I wasn't clear enough, sorry.


title: Automounting USB sticks on Debian

text: I'm running Debian Squeeze on a plug computer (so SSH only, no GUI) and what I'm trying to do is get it so that when a USB stick is plugged in, it gets automatically mounted. What I've done is install `autofs` which from what I gather handles the automounting providing it knows where the device is in `/dev`. The problem is that the USB stick isn't always on the same device name. Sometime's it's `/dev/sdc1`, sometimes `/dev/sdd1`, etc. I gather that to remedy this, I need to use `udev` to ensure that the USB stick is always given the same name. I got the following info out of `udevadm`:               Udevadm info starts with the device specified by the devpath and then     walks up the chain of parent devices. It prints for every device     found, all possible attributes in the udev rules key format.     A rule to match, can be composed by the attributes of the device     and the attributes from one single parent device.            looking at device '/block/sdd/sdd1':         KERNEL=="sdd1"         SUBSYSTEM=="block"         DRIVER==""         ATTR{partition}=="1"         ATTR{start}=="63"         ATTR{size}=="129339"         ATTR{ro}=="0"         ATTR{alignment_offset}=="0"         ATTR{discard_alignment}=="0"         ATTR{stat}=="      31      244      275      190        0        0        0        0        0      190      190"         ATTR{inflight}=="       0        0"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0/8:0:0:0/block/sdd':         KERNELS=="sdd"         SUBSYSTEMS=="block"         DRIVERS==""         ATTRS{range}=="16"         ATTRS{ext_range}=="256"         ATTRS{removable}=="1"         ATTRS{ro}=="0"         ATTRS{size}=="129439"         ATTRS{alignment_offset}=="0"         ATTRS{discard_alignment}=="0"         ATTRS{capability}=="51"         ATTRS{stat}=="      56      727      783      520        0        0        0        0        0      520      520"         ATTRS{inflight}=="       0        0"         ATTRS{events}=="media_change"         ATTRS{events_async}==""         ATTRS{events_poll_msecs}=="-1"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0/8:0:0:0':         KERNELS=="8:0:0:0"         SUBSYSTEMS=="scsi"         DRIVERS=="sd"         ATTRS{device_blocked}=="0"         ATTRS{type}=="0"         ATTRS{scsi_level}=="3"         ATTRS{vendor}=="        "         ATTRS{model}=="Flash Disk      "         ATTRS{rev}=="2.00"         ATTRS{state}=="running"         ATTRS{timeout}=="30"         ATTRS{iocounterbits}=="32"         ATTRS{iorequest_cnt}=="0x90"         ATTRS{iodone_cnt}=="0x90"         ATTRS{ioerr_cnt}=="0x0"         ATTRS{modalias}=="scsi:t-0x00"         ATTRS{evt_media_change}=="0"         ATTRS{queue_depth}=="1"         ATTRS{queue_type}=="none"         ATTRS{max_sectors}=="240"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0':         KERNELS=="target8:0:0"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8':         KERNELS=="host8"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0':         KERNELS=="1-1.2:1.0"         SUBSYSTEMS=="usb"         DRIVERS=="usb-storage"         ATTRS{bInterfaceNumber}=="00"         ATTRS{bAlternateSetting}==" 0"         ATTRS{bNumEndpoints}=="02"         ATTRS{bInterfaceClass}=="08"         ATTRS{bInterfaceSubClass}=="06"         ATTRS{bInterfaceProtocol}=="50"         ATTRS{modalias}=="usb:v1976p6025d0100dc00dsc00dp00ic08isc06ip50"         ATTRS{supports_autosuspend}=="1"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2':         KERNELS=="1-1.2"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="80"         ATTRS{bMaxPower}=="100mA"         ATTRS{urbnum}=="383"         ATTRS{idVendor}=="1976"         ATTRS{idProduct}=="6025"         ATTRS{bcdDevice}=="0100"         ATTRS{bDeviceClass}=="00"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="00"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="12"         ATTRS{busnum}=="1"         ATTRS{devnum}=="11"         ATTRS{devpath}=="1.2"         ATTRS{version}==" 1.10"         ATTRS{maxchild}=="0"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1':         KERNELS=="1-1"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="e0"         ATTRS{bMaxPower}=="100mA"         ATTRS{urbnum}=="197"         ATTRS{idVendor}=="1a40"         ATTRS{idProduct}=="0101"         ATTRS{bcdDevice}=="0111"         ATTRS{bDeviceClass}=="09"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="01"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="480"         ATTRS{busnum}=="1"         ATTRS{devnum}=="2"         ATTRS{devpath}=="1"         ATTRS{version}==" 2.00"         ATTRS{maxchild}=="4"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"         ATTRS{product}=="USB 2.0 Hub"            looking at parent device '/devices/platform/orion-ehci.0/usb1':         KERNELS=="usb1"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="e0"         ATTRS{bMaxPower}=="  0mA"         ATTRS{urbnum}=="24"         ATTRS{idVendor}=="1d6b"         ATTRS{idProduct}=="0002"         ATTRS{bcdDevice}=="0206"         ATTRS{bDeviceClass}=="09"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="01"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="480"         ATTRS{busnum}=="1"         ATTRS{devnum}=="1"         ATTRS{devpath}=="0"         ATTRS{version}==" 2.00"         ATTRS{maxchild}=="1"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"         ATTRS{manufacturer}=="Linux 2.6.38.8 ehci_hcd"         ATTRS{product}=="Marvell Orion EHCI"         ATTRS{serial}=="orion-ehci.0"         ATTRS{authorized_default}=="1"            looking at parent device '/devices/platform/orion-ehci.0':         KERNELS=="orion-ehci.0"         SUBSYSTEMS=="platform"         DRIVERS=="orion-ehci"         ATTRS{modalias}=="platform:orion-ehci"            looking at parent device '/devices/platform':         KERNELS=="platform"         SUBSYSTEMS==""         DRIVERS==""      I've been trying to write `udev` rules to force the USB stick to take the name `/dev/usbstick` but so far I haven't been successful. Can someone help out with what rule I need to specify in my rules file to get this USB stick to always get the same name? -- Or, is there much easier way to automount the USB stick that I'm missing entirely? **UPDATE** OK so I have made some progress. I added the following rule: `SUBSYSTEMS=="scsi", ATTRS{model}=="Flash Disk ", DRIVERS=="sd", NAME="usbstick-%k" RUN+="mkdir /mnt/usbstick-%k; mount /dev/usbstick-%k /mnt/usbstick-%k"` I know this still needs some work in terms of handling add/remove, but it's just a basic test for now. The effect of this is that I now manage to get three new device nodes in `/dev`, namely `/dev/usbstick-sdc`, `/dev/usbstick-sdc1` and `usbstick-sg2`. However, what I've found is that the code in the `RUN` section only executes once and just makes a directory `mnt/usbstick-sdc`. I've also found that the directory is always empty, so something is clearly still going wrong! (although I'm making progress).


title: Debian Wheezy, VirtualBox, HP DV6-7099EL problem with AltGr

text: I just bought a HP DV6-7099EL laptop (Italian keyboard). I'm going to install Debian in a week or two, I just want to test the computer without touching the partitions (just in case I need support/assistance for hardware problems in the first period). But Debian it's my main system and I need it for work, so I installed it in VirtualBox. And the problem is this: before launching X11, my `AltGr` works in the right way (i.e. it allows me to enter `@` `#` `[` `]` `{` `}`), but in X (I tried XFCE, FluxBox, KDE) it stops working, it simply does nothing:   * `AltGr` + `ò` = `ò` (instead of `@`)   * `AltGr` + `à` = `à` (instead of `#`) Using `xev` I found that the code of `AltGr` is 108, so I tried to modify the keymapping creating `~/.Xmodmap` but `AltGr` behaviour was even weirder:   * `AltGr` + `ò` = nothing   * `AltGr` + `à` = `#` and carriage return   * `AltGr` + `è` = nothing (instead of `[`)   * `AltGr` + `+` = sometimes gives `]` (which is right), sometimes nothing. BTW, under Windows the key behaves perfectly as expected. **Edit:** Following the advice of trying and experimenting with a Debian live, I managed to have my AltGr working (even in virtualbox) with these commands:               clear mod1     clear mod3     clear mod5     keycode 108 = Alt_R     keysym Alt_R = ISO_Level3_Shift     add mod3 = ISO_Level3Shift      Perhaps the three clear are too many, but at the moment it seems working, and the output of `$ xmodmap -pm` shows that `ISO_Level3_Shift` has only the `mod3` modifier. On the net almost everyone says that `AltGr` is recognized by Xorg as `Mode_switch`, but here I found out that the right name is `ISO_Level3_Shift` (or so it seems, empirically). Now I'm too much tired, I go to bed. Thank you again jasonwryan and terdon :-)


title: Converting Linux into a Router- Traffic from eth0:0 to eth0

text: So I have been trying to convert my linux box which is running Mint into an router. eth0 has a public address that has 71.xx.xx.xx for an IP addr. I created an eth0:0 and set it an IP address , 10.0.0.100. I started a DHCP server that is on eth0 ( because it wont use eth0:0) and that's giving out addresses between 10.0.0.101 and 10.0.0.200. I can ping between eth0 and eth0:0 on the same machine. I have a another laptop connected to the linux via a switch and its able to receive an ip addr via the DHCP server. Problem is how do I route traffic from and to eth0:0 to eth0 and vice versa so that computers on the private network that is 10.0.0.x can access internet via the static IP on eth0. Need help..


title: Using startx on Fedora 17, a non-root user cannot join new wireless networks -- how to fix?

text: I have Fedora 17 installed on a Lenovo X230, and if I leave it configured to boot into Gnome using systemd's runlevel5.target (or graphical.target), which is the default, networking seems to work just fine -- a local user can join a new wireless network, authenticating and saving a network password as needed. So far, so good. However, this laptop's owner prefers to boot into a non-graphical display (systemd's runlevel3.target or multi-user.target); when desired, he runs `startx` to get Gnome started. When Gnome is started this way, the user cannot join any new wireless network; you can select the desired SSID from the drop- down list, but no prompt for network password appears, and no connection is made. I don't see anything relevant logged in /var/log/messages. What can be done, so that a non-privileged user who has started Gnome using `startx` can be allowed to join new wireless networks? _**Notes:_** If root logs in, starts Gnome, and joins the new wireless network, then appropriate new files are created under /etc/sysconfig/network-scripts for the network and key information. Once this is done, the non-root user can use the wireless network when he logs in. This workaround is horribly inconvenient. The user is already a member of group 'wheel' and has full sudo access without password. SELinux is disabled on this machine. As a test, I added the user to group 'root', and made /etc/sysconfig/network- scripts group-writable. This didn't help or change anything.


title: Optimus laptop Xrandr - No HDMI option

text: I have been trying to fix HDMI for several days, but I have no idea how to fix it. Arch does not even register HDMI, I tried Xubuntu and Fedora and it works there. My setup: i7 3630QM Nvidia GT635M XFCE lshw I have installed:               xf86-video-intel intel-dri     nvidia nvidia nvidia-utils     bumblebee bbswitch primus      xrandr -q               Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767     LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm        1920x1080      60.0*+        1400x1050      60.0          1280x1024      60.0          1280x960       60.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)      xorg.conf               Section "Device"         Identifier "Device0"         Driver "intel"         BusID "PCI:00:02:0"     EndSection               Section "Device"         Identifier "Device1"         Driver "nvidia"         BusID "PCI:01:00:0"         Option "NoLogo" "true"         Option "UseEDID" "true"         Option "ConnectedMonitor" "DFP"     EndSection


title: How to send stderr to stdout with a pipe to another command?

text: I'm trying to capture all of the output of a build operation, and send it to `myprogram`. I seem to only be able to capture part of it. This is what I'm trying:               make clean && make DISABLE_ID3TAG=1 CFLAGS="-O2 -DNDEBUG -W64" | myprogram &2 > 1      I also tried:               make clean && make DISABLE_ID3TAG=1 CFLAGS="-O2 -DNDEBUG -W64" &2 > 1 | myprogram      Basically I want to send everything to `stdout` and then do something with that. Currently I'm only capturing part of the output, and the other part is going to the screen. How can I pipe everything to another program?


title: Can't install graphics driver on Wheezy - Using Inspiron 3537

text: I've recently installed Debian Wheezy 7.5 and dual booted it with Ubuntu 14.04.   I've installed all of the drivers except the graphics driver which I've been trying to install for a couple of days.   When I first booted Wheezy I got an error message that said "GNOME 3 Failed to Load" . The GUI was loading fine but pretty basic, so I knew that this is a graphics driver issue.   I ran `lspci | grep VGA` and got this:      `00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)`      I then ran `lspci | grep Display` and got this: `03:00.0 Display controller: Advanced Micro Devices [AMD] nee ATI Device 6660`      I tried installing the `linux-firmware-nonfree` package but it didn't configure my graphics driver.   My Ubuntu loads the graphics driver fine.   Is there any recommendations for the package I could install, and if I need to do any modifications to xorg.conf so I can load GNOME 3?   Could I copy the graphcis driver configurations from Ubuntu to Debian Wheezy?      My laptop is Dell Inspiron 15 3537 - Core i5 processor


title: send html using mailx

text: I'd like to send a html file from a host using mailx but instead of interpreting it as html it would send it out as text (html codes). Is there a way to send it as html?               (cat <<EOCAT     Subject: TEST email     MIME-Version: 1.0     Content-Type: text/html     Content-Disposition: inline     EOCAT     header     cat $MSGFILE     footer     ) | mailx -r localhost@host.com myemail@website.com


title: Using "&&" is not effective for cURL submit form (don't execute second line if first line fails)

text: I'm submitting to my website using cURL. I make cURL post it in timely fashion. In below code; first line is curl submit; second line is for queuing:               curl -b cookies.txt \         -d title="$(sed '1,/sblmtitle/d;/slpstitle/,$d' sedut.html)" \         -d taxonomy%5Btags%5D%5B1%5D="$(             sed '1,/sblmkategori/d;/slpskategori/,$d' sedut.html         )" \         -d teaser_include=1 \         -d body="$(sed '1,/sblmkonten/d;/slpskonten/,$d' sedut.html)" \         -d field_source%5B0%5D%5Burl%5D="$(             sed '1,/sblmurl/d;/slpsurl/,$d' sedut.html         )" \         -d changed= \         -d form_build_id=form-424f851ad50bd4781c8c25ab7efd5c4c \         -d form_token=0e7cc7437faf816f1ecd96087286bda9 \         -d form_id=post_node_form \         -d op=Save http://www.web.org/submit/post &&     for file in $(ls *.html | sort -r | tail -1); do         mv $file sedut.html     done      If cURL fails to submit, it will print out `sedut.html` contents. If cURL success submitting, it will print nothing. In my case, sometime cURL fails to submit. What I want is don't execute second line if first line fails. But using `&&` as above codes is just not works. I've tested it, cURL submit fails and print out `sedut.html` contents, but second line still executed.


title: How can I administer a server if USB disabled?

text: I'm looking to disable USB via the kernel for a high-performance server. How can I effectively administer the server, if problems occurs if USB isn't enabled? Without USB, keyboards and mice devices won't be able to function. I could do it through ILO through the network but I have the possibility of the NIC failing on me or the IP address changing via DHCP. Are there best practices on this?


title: How can I make udisks-glue run at startup and mount drives as particular user?

text: I'm trying to make udisks-glue work on my Raspbian Raspberry Pi. This works fine if I manually start `udisks-glue` via ssh. However, I wish to start it automatically on startup. Hence, a script at `/etc/init.d/udisks-glue` launches the daemon for me (as per instructions here). This works fine, but disks are mounted with root permissions (`drwx------`). Is it possible to make this script start the daemon as user `pi`, not `root`? ## What I've tried 1) Modifying the script above, replacing               DAEMON="/usr/bin/udisks-glue"       with               DAEMON="exec su - pi -c /usr/bin/udisks-glue"      This failed to execute. 2) Replacing this line with a reference to a custom script, which then calls `exec su - pi -c /usr/bin/udisks-glue`. When I connect hard drives, they aren't mounted. However, there is the appearance of correctly running processes. Looking at `ps aux | grep [u]disks`, I can see `udisks-glue` running as `pi` (and two `udisks-daemon`s running as root); I get the same `ps` output if I manually start `udisks-glue`, as above. 3) I tried editing `/etc/rc.local`, adding the line               su pi -c "/usr/bin/udisks-glue &"      This had the same result as in (2), with `udisks-glue` running as `pi`, but not functional. 4) As per this page, running udisks-glue as root, but giving permissions of mounts to all. This works for FAT filesystems, but fails to even mount ext4. (I'd prefer mounts to be owned by user `pi` anyway.)


title: Can an eCryptfs Home Directory Be Backed Up Remotely

text: The main idea I want to have is a backup script run rsync to copy my /home/.Private/user directory off to another server. This would allow the backup script to have no knowledge of the data, but mean the remote backups would be secure. That way I don't need to worry about what happens to them. I can hopefully restore the machine by recreating a user with the same UID on a new build of a machine then copying the data back over. I'm just wondering if there are some hidden things required... or am I being naive with it's simplicity!


title: Specifying a dependency of a version greater than N and less than M

text: Is it possible to specify the dependency of another library that is within a specific range of versions? Like:               Depends: Lib (<= 4) -- dependency of a library that has version less or equal to 4           Depends: Lib (>= 2) -- dependency of a library that has version more or equal to 2      But could we combine them? So that the overall constraint expressed `the version is more or equal to 2 and less or equal to 4`? PS: this is just an academic question, out of curiosity (since I couldn't find it in debian http://www.debian.org/doc/debian-policy/ch-relationships.html)


title: How to remotely control a CentOS 5.4 install

text: I need to support a legacy system that's running CentOS 5.4. There are errors coming up during the install and walking through the admin on the other end is quite tedious and inefficient. Does anyone know if there's a way where I can take over the install session remotely somehow with vnc/teamviewer or ssh? The method chosen will need to support some sort of authentication as well. I don't mind doing the installation in text mode either.


title: How do you fix apt-get update "Hash Sum mismatch"

text: I have an Ubuntu 12.04 virtual box vm that I instantiate using Vagrant.               git clone https://github.com/spuder/puppet-gitlab     vagrant up      As soon as the vagrant box runs `apt-get update`, I get the following error.               ...     W: Failed to fetch gzip:/var/lib/apt/lists/partial/apt.puppetlabs.com_dists_precise_main_binary-amd64_Packages  Hash Sum mismatch     W: Failed to fetch gzip:/var/lib/apt/lists/partial/apt.puppetlabs.com_dists_precise_main_binary-i386_Packages  Hash Sum mismatch     W: Failed to fetch gzip:/var/lib/apt/lists/partial/apt.puppetlabs.com_dists_precise_dependencies_binary-i386_Packages  Hash Sum mismatch     W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages  404  Not Found      Things I've tried to work around this error.   * Used 3 different ubuntu 12.04 boxes from 'http://www.vagrantbox.es'   * solution suggested here:  sudo rm -rf /var/lib/apt/lists/*   sudo apt-get update   sudo apt-get clean   * Removed and readded the puppet labs packages I've also tried similar suggestions that I've found in the first few pages of google. I've even tried multiple computers, and multiple internet connections. The fact that this has affected multiple ubuntu vm's on multiple internet connections makes me think there is something wrong with the ubuntu repo. How else can I try to fix this issue? **Update** I tried cleaning out '/var/lib/apt/lists/partial' and running apt-get clean then replaced the sources in /etc/sources/list by using the amazon mirrors suggested here: I still get a similar error               Fetched 18.9 MB in 10s (1,865 kB/s)                                                                                W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages  Hash Sum mismatch     W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_universe_binary-amd64_Packages  Hash Sum mismatch     W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_multiverse_binary-amd64_Packages  Hash Sum mismatch     W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages  Hash Sum mismatch     E: Some index files failed to download. They have been ignored, or old ones used instead.      **Update2** I have 2 internet connections at home, both of them gave the same error. As soon as I took my laptop to my work internet connection, the problem went away. I'm still curious to understand why my internet connection would make any difference. **Update3** See my answer below for an explanation. My internet filter was corrupting the download. I'll rephrase the question since there are no answers yet. **Is there a way to override Hash Sum mismatches in apt-get?**


title: Help with getting wifi up and running in Arch Linux on Mac Mini 3,1

text: I am dual booting arch linux on my mac mini 3,1. Am trying to get the WiFi to work and have hit a block. Am a Linux noob so have a couple of questions which I will put in bold. Following these instructions. I have identified my card as BCM4321, which from the tables I read I can use the b43 driver/module ( **is a driver really just a module?** ) which is already in the kernel. I ran `lsmod` and sure enough can see that b43 is loaded. Checked `iwconfig` and can see wlan0 IEE 802 ect. If I run `ip link set wlan0 up` ( **which i'm guessing turns on the card/wifi?** ) I'm notified about the need for some firmware. Ok so reading the instructions from the above website I need to get this firmware which I am pretty sure would solve the aforementioned issue, but my main problem is **how do I get the firmware without physically connecting the mac to router** via ethernet. I have a laptop that I'm currently using with W7 and F16 on and a pendrive which currently has the arch installation media on it, I am hoping i can **stick the firmware on a pendrive and load from there if so how?** Whilst writing this I have thought that I should just be able to wget the tarballs from here, put those on the pendrive and then try loading transferring them into arch, will still ask this question in case of failure :-)


title: Vim global search in a project

text: I started using vim two weeks ago switching from sublime and I am a ruby developer I know for a fact that Ack and Ag work very good on a Mac while they're not optimized for my Ubuntu machine. These are the steps I usually follow when I want to search for words in my project folder (methods, variables, whatever) using "git grep" to search in all of the files in my project folder that contains those words, but it feels a very slow to me to: 1) _Copy the words I want to search, from one file opened in vim_   2) Ctrl + Z _to send vim in background and use the console_   3) git grep 'what I want to search' **_to actually perform the global search_**   4) _Copy the file path from the list of results_   5) fg to resume _vim from background_   6) :e filepath _in vim_   What do you use in your environments?   And what is your opinion about this topic?


title: Reduce fan speed of ATI GPU with radeon open source driver

text: I have a Radeon HD 6950 connected to two screens on a machine running archlinux. Recently I changed from the proprietary to the open source driver due to dropped catalyst support. Unfortunately by default the fans are very noisy by default - apparently the power saving mechanisms do not work properly. I set `/sys/class/drm/card0/device/power_method` to `profile` and `/sys/class/drm/card0/device/power_profile` to `low`. This seems to work               # cat /sys/kernel/debug/dri/0/radeon_pm_info     default engine clock: 800000 kHz     current engine clock: 249990 kHz     default memory clock: 1250000 kHz     current memory clock: 1250000 kHz     voltage: 900 mV     PCIE lanes: 16      Unfortunately it does only help a little with the fan noise. I also tried `dynpm` which doesn't really seem to have an effect (possibly due to the dual head setup). Previously, with the catalyst drivers, I had issues with fan noise after suspend, but I was able to use the "ATI Overclocking Utility" to reduce both shader and memory frequency which muted the fans. Also I have dual boot windows running and there is no issue with fan noise in idle on Windows. Kernel Version: `Linux desktux 3.10.7-1-ARCH #1 SMP PREEMPT Thu Aug 15 11:55:34 CEST 2013 x86_64 GNU/Linux` Update: I tried the mainline 3.11 kernel since it is supposed to improve power management. Unfortunately Xorg won't utilize radeon in that case but rather VESA. VESA is actually perfectly fine regarding the fan speed, but does not support dual monitor. Update: With Kernel 3.15, the radeon.dpm=1 option seems to work regarding the reduction of power consumption. I had to explicitly enable it though even though I thought it was used by default. However, even though the system uses less power than under windows (both idle), the **fans are still more noisy**. I also measured that the the dual monitor setup uses 50 W more power than a single monitor (idle, similar numbers for Windows/Linux/BIOS).


title: SELinux policy to authorize some users to start / stop certain services

text: How can I give certain users authorization to start and stop certain services? I am asking specifically about Fedora 19 systems with SELinux installed. The utility to call for services administration is in this case `systemctl`. What type of SELinux security policy do I have to write? Where? How? Any references?


title: Installer packages: .bin, -rpm.bin, tar, tar.z

text: Is it correct that most of Unix&Linux software supports x-copy deployment? If I download the installation package and uncompress the files into a particular directory - would that be enough to start using that software?


title: Ambient Light Sensor Samsung Series 9

text: Have Fedora 19 running on my Samsung series 9. Got everything working with the exception of the ambient light sensor controlling keyboard backlight and screen brightness. Forums around the net show users having success on Ubuntu, so I'm wondering if there are any pointers on how this is implemented? Is it a hardware only control or do I need specific kernel drivers etc. Apologies for the vague question, but I can't find much out via Google and `/sys` and friends don't contain anything light related I can script as far as I can see.


title: Is it posssible to save text in nano with one keypress

text: I use nano as my favorite text editor. I was able to save my documents by pressing `F3` + `Enter`. But is there a way to save the document directly by pressing some key, if I'm sure I would like to save the document to the same name as before?


title: VMware VIX 1.13 on Ubuntu 12.04 not working

text: I'm running Ubuntu 12.04 and VMware VIX 1.13 (http://www.vmware.com/support/developer/vix-api/) I'm had VMware VIX running on a machine and connecting just fine to our ESXi server, but we migrated machines and now I can't get it to work again. Here's what I get when I try to run it in terminal (IP and PWD removed)               root@dev:/lib# vmrun -T esx -h xxx.xxx.xxx.xxx:443 -u root -p PASSWORD list     SSLLoadSharedLibraries: Failed to load OpenSSL libraries. libdir is /usr/lib/vmware          VMware Workstation Error:     VMware Workstation unrecoverable error: (vthread-3)     SSLLoadSharedLibraries: Failed to load OpenSSL libraries. libdir is /usr/lib/vmware     You can request support.          To collect data to submit to VMware support, choose "Collect Support Data" from the Help menu.     You can also run the "vm-support" script in the Workstation folder directly.     We will respond on the basis of your support entitlement.      Any ideas? **EDIT -- I fixed it** Simple mistake here, I didn't notice it until now. Last week I upgraded to VMware VIX 1.13; I just downgraded back to 1.12 and it's fixed. tl;dr VMware VIX 1.13 is **not compatible** with ESXi 5.1; you must use 1.12.


title: So the design of client-server separation is not the bottleneck of X Window?

text: In the answer of this, it mentioned: > People also hear that X uses the "network" and think this is going to be a > performance bottleneck. "Network" here means local UNIX domain socket, which > has negligible overhead on modern Linux. Things that would bottleneck on the > network, there are X extensions to make fast (shared memory pixmaps, DRI, > etc.). Threads in-process wouldn't necessarily be faster than the X socket, > because the bottlenecks have more to do with the inherent problem of > coordinating multiple threads or processes accessing the same hardware, than > with the minimal overhead of local sockets. But I always think that multiple threads communicate by shared variables should be faster than multiple processes communicate by Unix domain socket. So...am I wrong? Is that coordinating multiple threads such a time consuming job? And the order of how processes get scheduled does not affect the performance of the Unix domain socket at all? Any idea?


title: Automatically reboot, if no wifi connection for a certain time

text: It seems that my Raspberry Pi server loses wifi connection after a random time and is somehow not able to recover automatically. Usually a reboot done by hand resolves the problem. I would like to make it reboot automatically if there is no wifi after about 30 minutes. How can I do that?


title: Redirecting an active port

text: **Environment:** Web server that requests pages on a specific port from an application server. **Problem:** If a page request comes into the application server during the restart of a certain web application running on the application server, the start up gets corrupted. **Question:** Is it possible to include some kind of block on the specific port (or redirect) in the beginning of the shell script that starts the web application? This would have to work "on the fly" and of course be reversed at the end of the shell script so that once the application was up and running, the requests would flow normally.


title: CentOS returning 403 for all https URLs

text: We've found that all https URLs on a CentOS 6 VPS are returning a 403, across multiple vhosts. Is there a config setting somewhere that I should be looking for to check what's going on? Or a log to help debug?


title: Is my system compromised or vulnerable to attacks

text: I ran `netstat -lntup` with the network connected. Recently one of my friends exploited my linux system using backtrack so I had to format it. Now I want to know whether I'm still being exploited or exposed and how to prevent being hacked and how to close open ports![netstat -lntup](http://i.stack.imgur.com/b1fk3.png)


title: How to realign a disk on logical volume with minimum to zero down time

text: A system running un-align disk partition that needs to be aligned without loss of data on all the partition including mbr with the minimum to no down time.


title: How can I shred a git repository, reasonably fast?

text: I'm interested in accurately removing a git repository in a reasonable time. But it takes quite a while to do so. Here, I have a small test repo where the `.git` folder is < 5MiB.               $ du -ac ~/tmp/.git | tail -1     4772    total     $ find ~/tmp/.git -type f | wc -l     991      Using `shred`'s default options, this takes quite long. In the next command I use `\--force` to change permissions and `\--zero` to overwrite with zeros after shredding. The default shredding method is to overwrite with random data three times (`-n3`). I also want to remove the files afterwards. According to `man shred`, `\--remove=wipesync` (the default, when `\--remove` is used) only operates on directories, but this seems to slow me down even when I operate only on files. Compare (each time I reinitialized the git repo):               $ time find ~/tmp/.git -type f | xargs shred --force --zero --remove=wipesync     real    8m18.626s     user    0m0.097s     sys     0m1.113s          $ time find ~/tmp/.git -type f | xargs shred --force --zero --remove=wipe     real    0m45.224s     user    0m0.057s     sys     0m0.473s               $ time find ~/tmp/.git -type f | xargs shred --force --zero -n1 --remove=wipe     real    0m33.605s     user    0m0.030s     sys     0m0.110s      Is there a better way to do it? * * * _EDIT:_ Yes, encryption is the key. I'm now just adding two more benchmarks using `-n0`.               time find ~/tmp/.git -type f | xargs shred --force --zero -n0 --remove=wipe         real 0m32.907s     user 0m0.020s     sys     0m0.333s      Using 64 parallel `shreds`:               time find ~/tmp/.git -type f | parallel -j64 shred --force --zero -n0 --remove=wipe     real    0m3.257s     user    0m1.067s     sys     0m1.043s


title: delete first line of file only if blank using sed

text: I have a solution for this in `awk`:               awk '{if (NR==1 && NF==0) next};1' somefile      but was unable to find one that worked in `sed`. E.g.,               sed -i.bak '/^$/{1,1d;}' somefile      ended up deleting the first blank line it found (I'm not a `sed` expert, so I was just trying out things). The advantage to `sed` in this case is that I would be able to do this w/o temporary files. ie in place.


title: reposync exclude subdirs from mirror

text: Is there a way to make the reposync command ignore a subdir of a public repo when mirroring it ? It seems to only want to sync on the url that has the /repodata/ & /repoview/ dirs, but i'm wanting to avoid that because the repo i'm trying to mirror has 17MB of stuff i want in one subdir under the dir that has repodata in it, and 9GB of stuff I don't in another dir.


title: performance wise: running photoshop cs6 on wine is same as on windows?

text: I got bored of windows, the viruses, slowdown of system over time. I would like to switch to ubuntu, wanted to by emulating photoshop on wine, is the performance of photoshop is as fast of windows? any lags?


title: Creating a user who cannot get an interactive shell

text: What are interactive and non-interactive shell? Questions: Create a user john who should not get an interactive shell. How can we do this?


title: Is PAE worth it when I have 4GB RAM?

text: I have 4GB RAM installed on my machine, and I'm considering using all of it (IE, installing PAE-enabled kernel). I heard there's a performance penalty for this, so I wanted to know about other's experiences. Should I proceed, or should I remain content with 3GB? [ **note** ] I will be running **Linux 2.6.32**.


title: Presentation Tools Back In The Day

text: Which tools were around »back in the day« to aid presentation Unix/Linux environments? I just wondered how somebody would accomplish something like slides in a e.g. text-based environment or low-end graphics environment. Research has been a little difficult since websites tend to remove outdated / abandoned tools. For instance, my search brought up TPP, the Text Presentation Program, but it is as recent as 2004. It supports > any text terminal that is supported by ncurses – ranging from an old VT100 > to the Linux framebuffer to an xterm. This includes... ![VT100 Terminal](http://i.stack.imgur.com/6JV8w.jpg) Which raises the additional question how exactly a computer aided presentation would be held if there are relatively small screens available. After giving TPP a short try, without specifying headlines normal slide content is rendered in default terminal font size which can be as small as 12 point. I really appreciated comparatively long and exhaustive answers that may consist out of your own experiences.


title: Sanitize Apache access log files?

text: We have this code in a shell script that pipes output for Apache to log.               declare -a values=( $taintRequestVals )          for item in ${!values[@]}     do         cat $apacheLog | sed "s/${values[$item]}=[^&\t\n]*/${values[$item]}=***/g" | /bin/grep ${values[$item]}=     done      However it's extremely inefficient. Within seconds, the `access.log` quadrupled exponentially to the point where the server's root slice filled up. Looking for a better way obfuscate sensitive data such as passwords while Apache is writing to `access.log`.


title: bash script, printing multiple lines that matching to a specific patern

text: I have a log file and I'm making a script to do some actions. An action is to print a specific area of the log. Every block at the log starts with a specific time stamp and inside the block may have other dates etc. I want to get the block that inside it there is the word exception. Tried with sed but as I know process line by line, also tried with awk and FS \n but again nothing.... A part of the log file,               06:14:27.9 starting web server     06:14:33.3 Initializing Spring framework Logs     Oct 18, 2013 6:14:33 AM org.apache.catalina.startup.Embedded start     INFO: Starting tomcat server     Oct 18, 2013 6:14:34 AM org.apache.catalina.core.StandardEngine start     INFO: Starting Servlet Engine: Apache Tomcat/6.0.32     Oct 18, 2013 6:14:35 AM org.apache.catalina.startup.ContextConfig DefaultWebConfig     INFO: No default web.xml     Oct 18, 2013 6:14:38 AM org.apache.catalina.session.StandardManager doLoad     SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: ads.doc.backoffice.StoreInfos     java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: ads.doc.backoffice.StoreInfos         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1354)         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)     ......     ......     ......     ......         at ads.tools.AppServerMain.main(AppServerMain.java:83)     Caused by: java.io.NotSerializableException: ads.doc.backoffice.StoreInfos     INFO: Jk running ID=0 time=0/105  config=null     06:14:48.6 Starting exporter server     06:14:48.6 starting cron server      another part of a log               03:19:13.4 Begin summary update for ads.doc.inventory.InventoryItemSummary     03:19:33.9 CronServer:: DailyJob ads.tools.UpdateSummaries@17c5d6cf failed with exception ads.util.AppError: Cannot create UnitName from keys: Each     ads.util.AppError: Cannot create UnitName from keys: Each     at ads.db.DBObjectDefault.createFromKeys(DBObjectDefault.java:42)     at ads.db.DBTable.createFromKeys(DBTable.java:227)     at ads.db.DBValue.getValue(DBValue.java:621)     at ads.dbmanager.DBObjectsManager.initObjects(DBObjectsManager.java:400)     at ads.dbmanager.DBObjectsManager.reload(DBObjectsManager.java:447)     at ads.dbmanager.DBObjectsManager.loadFromStore(DBObjectsManager.java:497)     at ads.doc.inventory.InventoryItemSummary.refreshSince(InventoryItemSummary.java:173)     at ads.db.DBSummaryTable.refreshAll(DBSummaryTable.java:67)     at ads.tools.CronServer$DailyThread.run(CronServer.java:271)     [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused]     at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:354)     at org.apache.soap.rpc.Call.invoke(Call.java:248)     at ads.support.SupportCall.call(SupportCall.java:56)     at ads.tools.SupportThread.run(SupportThread.java:101)     03:46:42.5 Periodic support request failed: ads.support.SupportException: Error opening socket: java.net.ConnectException: Connection refused     06:31:36.1 Upload failed: java.io.FileNotFoundException: c:/tmp/cygwin1.dll (No such file or directory)     08:01:08.0 connect from /172.22.3.28      I want to print from the first till the second last (06:14:33.3 till 06:14:48.6). And inside the log there are multiple blocks as this. Tried this: `awk '/^[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]\\.[0-9].*[e|E]xception.*[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]\\.[0-9]/ {print}' FS="\n" RS="" log.txt` and also this:               sed '/^[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]\.[0-9].*[e|E]xception.*/,/^[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]\.[0-9]/!d' log.txt      but I can't get the result I want.


title: GConf-WARNING **: Client failed to connect to the D-BUS daemon: Unable to autolaunch when setuid

text: I am encountering a strange error whenever I run certain commands, for example, `sudo apt-get install ______` and I receive the following error: > (process:28847): GConf-WARNING **: Client failed to connect to the D-BUS > daemon: Unable to autolaunch when setuid > > (process:28847): Gtk-WARNING **: This process is currently running setuid or > setgid. This is not a supported use of GTK+. You must create a helper > program instead. For further details, see: >   >   >     http://www.gtk.org/setuid.html >   > > Refusing to initialize GTK+. Which is odd, because I can still go ahead and enter my password and everything proceeds, I'm just wondering why I am receiving this message. I am using linux-mint xfce 15 Olivia


title: Adding access to PPP

text: I have a PPP connection over USB (dev ppp0), and an eth0 connection. My Linux box has IP 192.168.1.1, I have a second Windows PC with an IP of 192.168.1.3. The ppp conection is 192.168.1.2 - which is a correctly configured embedded system. I would like traffic to be able to flow between the ppp0 connection, and 192.168.1.3. When I try and ping 192.168.1.2 from 192.168.1.3 I find that the destination is unreachable - I actually get that specific message. I can ping 192.168.2 from 192.168.1.1. I can also ping 192.168.1.3 from 192.168.1.1 and visa verse. I have turned on IP Forwarding. I have also executed the following commands.               route add -net 192.168.1.2 netmask 255.255.255.255 gw 192.168.1.1     route add -net 192.168.1.2 netmask 255.255.255.255 dev ppp0      I would like network traffic destined for 192.168.1.2 to be routed to/from whatever other host is on the same 192.168.1.* network. How do I do this.


title: How to limit ext4 filenames to only those filenames legal in FAT?

text: The ext4 filesystem allows some characters that FAT does not allow, such as `:`. This has caused me much grief in the past when trying to move files, especially as KDE will delete such files instead of failing the move. Is there any way to configure ext4 to disallow such characters? Right now I am using an up-to-date Kubuntu, but I would like to know the solution in the general sense, for any Linux-based OS. Thanks.


title: Linux freezes under high memory usage

text: When I start memory-intense processes (such as git gc in a repository with huge files), Linux starts becoming unresponsive after some time, at first the UI lags a little, then the mouse stops moving and then the keyboard stops working too. The interesting thing about it that it apparantly also disables the SysRQ keys for some reason, I can't use SysRQ-Kill or SysRQ-Reboot anymore in that state. What can I do in order to prevent this situation from happening, maybe like letting Linux kill processes that use too much memory.


title: A bash function that takes argument like other languages?

text: I have a bash function to set the `$PATH` like this --               assign-path()     {         str=$1         # if the $PATH is empty, assign it directly.         if [ -z $PATH ]; then             PATH=$str;         # if the $PATH does not contain the substring, append it with ':'.         elif [[ $PATH != *$str* ]]; then             PATH=$PATH:$str;         fi     }      But the problem is, I have to write different function for different variables (for example, another function for `$CLASSPATH` like `assign-classpath()` etc.). I could not find a way to pass argument to the bash function so that I can access it by reference. It would be better if I had something like --               assign( bigstr, substr )     {         if [ -z bigstr ]; then             bigstr=substr;         elif [[ bigstr != *str* ]]; then             bigstr=bigstr:substr;         fi     }      Any idea, how to achieve something like above in bash?


title: Attempting to Abbreviate kSAR's PDF output

text: I'm currently writing a cronjob around `kSar`'s command line (non-GUI) options in order generate PDF's. I'm just going to email a PDF of the previous day's activity to a different webmaster (basically just a power user) every day after midnight. This is the command I'm trying to use:               java -jar /usr/local/ksar/kSar.jar -cpuFixedAxis \            -input /var/log/sa/sa$(date +"%d" -d yesterday) \           -outputPDF /tmp/SAR-$(date +"%d-%m-%Y" -d yesterday).pdf      The above properly generates a PDF document and I can email it to whomever I want. Problem is that there's _a lot_ more information on there than I really think he needs and I really see him getting confused and either asking me to help him understand it or just disregarding the email and pinging me personally whenever he has a question about load or performance (which will be a lot). I'm seeing that kSar has a `-graph` option for generating only a certain subset of graphs, but I have no idea how to use it, and it's not online anywhere. `-help` says to feed it a list of the graphs I want to generate but there's no indication of how I'm supposed to figure out what each graph is technically called. I thought `-showOnlygraphName` was my savior, but that just popped up the regular non-PDF GUI for the relevant SAR and it looks identical to if I had left `-showOnlygraphName` to begin with. At this point I'm grasping at straws so any help would be appreciated. **EDIT:** Just so you you can see the syntax I'm using when I say in the comments that I've tried the graph names @derobert suggested:               $ java -jar kSar.jar -graph SWAP -input sar31 -outputPDF out.pdf     time to parse: 695ms number of line: 4073 line/msec: 5.0     jadavis@XXX-R9ZN2ZV /cygdrive/c/Documents and Settings/JADAVIS/Documents/kSar-5.0.6     $ echo $?     0     jadavis@XXX-R9ZN2ZV /cygdrive/c/Documents and Settings/JADAVIS/Documents/kSar-5.0.6     $ ls out.pdf     ls: cannot access out.pdf: No such file or directory     $ java -jar kSar.jar -graph LOAD -input sar31 -outputPDF out.pdf ; ls out.pdf     time to parse: 681ms number of line: 4073 line/msec: 5.0     ls: cannot access out.pdf: No such file or directory      What's directly above is being done in `cygwin`, but the syntax works (i.e generates PDF output) if I just don't try to restrict which graphs to generate. I've also tried a variety of casings and quotation styles. **EDIT #2:** Partial success in this area. I found this page and following its instructions I was able to generate a PDF that _only_ had CPU activity in it:               jadavis@XXX-R9ZN2ZV /cygdrive/c/Documents and Settings/JADAVIS/Documents/kSa                            r-5.0.6     $ java -jar kSar.jar -input sar31 -outputPDF out.pdf -graph all-cpu; ls -l out.pdf                          time to parse: 712ms number of line: 4073 line/msec: 5.0     -rwx------+ 1 jadavis mkpasswd 112772 Apr  3 18:51 out.pdf


title: Using syncing files only comparing file name and not extension

text: I'm trying to sync 2 folders containing audio files of multiple types (WMA, MP3, M4V,...). I want to sync these folders but the sync process should only take into account the file names, not the extensions. So, if folder A contains "the suburbs.mp3" and folder B contains "the suburbs.m4v", the sync program should consider these 2 files the same (and not sync them). I was looking into the documentation of rsync but I can't seem find a way to do this. Does anyone have a suggestion, or maybe suggestions for other software that can do this? thanks, Thomas


title: Maintaining `/etc/hosts` for hosts on DHCP

text: On my local DHCP network I have different PC's that I need to access remotely. Problem is that their IP's change. Sometimes I plug my laptop and netbook into other people's DHCP networks. My current solution is to upate the `/etc/hosts` file everytime the target IP's change. My `/etc/hosts` file looks like this:               # <ip-address>   <hostname.domain.org>    <hostname>     127.0.0.1        localhost.localdomain    localhost laptop         192.168.1.14     desktop.localdomain      desktop     192.168.1.12     netbook.localdomain      netbook      Is there a way to bypass all that admin? :) For example, could my computers broadcast their IPs on the LAN? or something like that. Windows does something like that, which allows you to refference a computer on the network with "\\COMPUTER_NAME"


title: ZONE_NORMAL and it's association with Kernel/User-pages?

text: ![Diagram](http://i.stack.imgur.com/bjDpe.jpg) Above is presented a case where I have only 512 MB of physical memory. What I have read up so far, is that ZONE_NORMAL is mapped to the kernel virtual address space as shown. Essentially I have a 512 MB physical memory, out of which 496 MB worth of ZONE_NORMAL is mapped to the kernel virtual space. Based on this understanding, following are my question:   * Does, ZONE_NORMAL consists of **only** kernel space pages ?   * If ZONE_NORMAL consists only of kernel pages and is mapped **completely** to the kernel space virtual address range, where do the user space pages get located ?? There does not seem to be any room for user space pages in physical memory. I am totally mixed up of the case where the physical memory is less than 4GB as shown in this case that I have put forth. Would really appreciate if someone can throw light on this.


title: Loading 3rd-Party Drivers before Fedora 14 Installation

text: My server is equipped with a megaraid controller that cannot be identified by most linux installer. I have to load it's driver before installation can proceed. I know how to do it with CentOS that simply type "linux dd" when prompt "boot:", and I will be able to load drivers from a usb flashdisk. But when it comes to Fedora 14, it seem there is no way for me to have any opportunity to load drivers before installation, so can't it find the harddisk :( Anyone here has some advises?


Could not connect to host 127.0.0.1: Connection refused. - I am getting this error message on ktorrent on slackware 13.1 and the torrents cannot start. I tried to reconfigure the ktorrent prefernces, i flushed the iptables but still no success. The trick is when i log in via root and start ktorrent, then the torrents start and no error message is displayed, but when i am logged in as a regular user then the torrents don't work. Can you help me and give me at least some basic ideas about what the problem might be ? Thank you in advance.


title: How do I emulate the "Replaces:" function of a Debian package in an RPM?

text: I need to use NSCD, the Name Service Caching Daemon, to decrease load on our LDAP server, on my SLES10 systems. In my experience, the default nscd, supplied as part of GNU LibC, is garbage, and will break horribly every few hours. As a result, using a replacement, such as unscd or gnscd is mandatory. There aren't packages for either of these in SLES10, so compiling up a package is required. However, there's a problem with AppArmor - in SLE10, every single app has had its AppArmor profile merged together into one big "apparmor- profiles" package, rather than letting each package provide its own profile - and unscd/gnscd don't work with the profiles in apparmor-profiles. When making a Debian package, it's possible to specify a relationship called Replaces:, which says "I know I include the same file as this other package, but I can overwrite their file as long as their version matches this check". As a result, I could say something like "Replaces: apparmor-profiles (<= 2.0.1-20.20.16)" in my spec file, and I could cleanly replace any file from the apparmor-profiles package. How would I do the same with RPM, short of recompiling my own apparmor- profiles package with the file removed, or forcing the package through the rpm command (which is asking for problems in the future)?


title: How do you create a user with no password?

text: In os X it's possible to have users without passwords. If you inspect them with `dscl` their password show up as `*`. This is used for system users such as users for databases like `mysql`, `pgsql` etc. What's nice about this is that these users doesn't show up at the login screen and you can't login as them without `sudo` etc. After deleting such a user trying some things out I wanted to recreate it, but couldn't. I could manage to get a user with a blank password and I could set the password to `*`. But none had the same effect as above, as the user showed up on my login screen. How do you create such a user?


title: Keyboard layout isn't changed in Chromium under Debian

text: I have a problem with switching layouts in Chromium. If I switch keyboard layout it changes successfully, but I can't still type Cyrillic (or other) symbols in Chromium. I found out that actually keyboard layout is changed in Chromium, because symbols like `?`, ` and ` are on the different places (they are in placesion which they should be in the current layout), but I can't type letters from the current layout. So for example I'm in English layout - I can type any letters etc. without any problems. Then I switch my layout to Russian (for example), after that I can't type any Cyrillic letters at all, I still can type only Latin letters.


title: How to destroy existing disk partitions

text: I added some disks to my system, which were in use before. I tried to create them:               $ gpart create -s GPT ada0     gpart: geom 'ada0': Operation not permitted     $ gpart show ada0     gpart: No such geom: ada0.      Is there a way to find out, why this happening? Update: It's probably a broken disk. I this with other disks and everything work as expected.


title: What does exit 99 means?

text: I'm new to Unix. Just want to know what is exit 99 and why would one use it and what are the significance uses of it. For example, I'm using `exit 99`.


title: Some info pages missing

text: On my computer (ubuntu 12.04), some **`info`** pages are missing, like for `tar`.   When I enter `info tar`, it opens the **tar manpage** instead of the **tar info manual.** So how can I install these pages on my system?


title: Optimal rootflags for rootfs for ext4 file system running on USB thumdrive

text: I have made myself a bootable USB Debian 7 thumbdrive, using debootstrap. It boots nicely - but occasionally freezes for a bit. I can see the load average is much higher than the running tasks should indicate. I wonder if maybe the default ext4 mounting paramaters don't work well in this scenario. Are there things I can change (even at the risk of data loss?) to make it run faster. I am assuming I could add something to rootflags in the kernel boot params in GRUB2. What flags could I use?


title: How to prevent fork bomb?

text: To prevent fork bomb I followed this http://www.linuxhowtos.org/Tips%20and%20Tricks/ulimit.htm `ulimit -a` reflects the new settings but when I run (as `root` in `bash`) `:(){ :|:&};:` the VM still goes on max CPU+RAM and system will freeze. How to ensure users will not be bring down the system by using fork bombs or running a buggy application? OS: RHEL 6.4


title: How to find file/directory names that are the same, but with different capitalization/case?

text: How can I list the file/directory names in a directory recursively that are the same, but with different capitalization/case? ex.: INPUT (not the `ls` command, the directories):               [user@localhost ~/a] ls -R     .:     b          ./b:     ize  Ize          ./b/ize:          ./b/Ize:     [user@localhost ~/a]       OUTPUT:               /b/ize


title: Intercept incoming TCP/IP packets on Linux and perform NAT

text: I want to make a decision of what computer is behind the firewall sending the packet. Imagine I have 2 PCs behind the firewall and I want to, based on (my algorithm), make a decision at the firewall level, before doing the NAT. Basically intercept the packet, then make the decision, how can I do that? What tool should I use to write my custom C code to perform that operation.


title: tcpdump syntax error when specifying portrange as documented

text: I am using tcpdump on OpenBSD and trying to learn it from a primer on it. I want to capture a range of ports, but it seems how this is done has changed. I can't even find portrange as a keyword in the manual page which also suggests this.               # tcpdump portrange 100-65535      tcpdump: syntax error      Not a thing:               # man tcpdump | grep portrange     #       I assume that this has changed, or it is different on OpenBSD. If anyone could tell me what to do for this, since my first lessons we're going to be with something practical it would be great. It would be even better if someone told me about an updated primer on tcpdump. OpenBSD comes with its own tcpdump which might be a fork, I'm not really sure.


title: Occasionally kernel panics during boot since 3.3.x with Sandy Bridge

text: Since kernel 3.3.x there are frequent kernel panics during the boot process. It seems to be a kernel problem since I downgraded to 3.0 and the problems are gone. The kernel panics happen almost at every boot attempt. After 4 or 5 restarts the system boots normally. It also seems to affect only Sandy Bridge systems, and maybe Ivy Bridge too. Last kernel I checked was 3.4.9 with the same results.


title: Correct owner, group and permissions when mounting an image file

text: Suppose I have an image `home.img` of a home partition of another linux machine (B). On that machine there is a users `userB` and there is a special group, `groupB`. Consider for example a file `fileB` in the `home` partition of machine B. Suppose it is owned by `userB` and `groupA`. Now if I mount (via `mount home.img /mnt/homeB -o ro`) the `img` file on another linux machine A (logged in as `userA`), `fileB` is now owned by `userA`. Is it possible to modify the mount options such that the owner, groups and permissions are shown on machine A, as it would be shown directly on machine B (for example that `fileB` is owned by `userB` and not by `userA`)? Do I have to create a dummy `userB` and `groupB` on machine A?


title: How can wine get windows files to be recognised by machines running linux?

text: How is wine actually doing to the .dll files to have them working on linux machines? Does anyone know How it works?


title: How to umount a USB drive?

text: I want to know how to `umount` my USB drive via command line. I am using Ubuntu 12.04 LTS 32-bit.


title: override hardcoded paths in executables

text: I'd like to override some hardcoded paths stored in pre-compiled executables like "/usr/share/nmap/" and redirect them to another dir. My ideal solution should not require root priviledges, so creating a symlink is not ok. (Also recompiling it's not an option)


title: Is there a Bash file that will be always sourced in interactive mode no matter if it is login or non-login?

text: As far as I know the interactive shells may be login or not login and the start up files for them are different.   * If interactive + login shell → /etc/profile then the first readable of ~/.bash_profile, ~/.bash_login, and ~/.profile    * If interactive + non-login shell → /etc/bash.bashrc then ~/.bashrc I want to set some variables everytime I use an interactive shell regardless if it is a login shell or not.


title: Print size of directory content with tree command in tree 1.5?

text: I like `tree` it's a nice way to display my files and the size of folders/directories. But the -h option only shows the size of the directory, _not_ it's contents.               /media/     ├── [ 16K]  64D9-E862     │   ├── [8.0K]  downloads      I know for a fact that my external drive has more that 16kB in it. How can I fix that with tree 1.5? Better yet how do I upgrade to 1.6?


title: Extract multiple line string from HTML file using specific tags

text:
I need to extract the string which are starting with the tag `<span class="style530">` and ending with `</span>` tag. I used sed command but didn't get desired result. Below is sample code:                    -          AA -      This     is my     First     Heading
               *Some     text,*          *text*,      *text*          *text*:
               - This      is my     Second Heading
               *Some     text,*          *text*,      *Here     is some     text.*     *text*:      *Here is      some     text*.

          -          - This is     my Third     Heading
      Output should be like:                AA - This is my First Heading      - This is my Second Heading      - This is my Third Heading      Thanks!


title: Specifying numeric ranges in zsh history

text: According to the docs I can tell the zsh history to print lines in a range. The docs say "history [first [last]]" I've tried "history a b" but that gives a too many arguments error. I've also tried hundreds of other things same results. Can someone post an example of a working history with range?


title: Busy box Read file line by line

text: There is no read applet comming with busy box. Is there any way to read a txt file line by line using busybox? What I have now is               while read line     do          echo $line     done < "$InputFile"


title: Differences between volume, partition and drive

text: What do these terms mean exactly?   1. partition   2. volume   3. drive On Windows, one may say drive C: or partition C:. On Linux I'm not sure what should be used for partitions because they don't have a name.


title: Can I migrate a LUKS partition from a passphrase to a keyfile?

text: The title says it all. Let's say I have a LUKS-formatted partition, and it's secured using the passphrase "test123". Can I migrate this partition to a key- based mechanism, without loss of data?


title: Troubles with unresolved dependencies on Debian 6 Sqeeze

text: I'm working with a VirtualBox 4.2.14 VM and Debian 6 Sqeeze as guest system and trying to (re-)install Nginx, but it's not working:               root@devmv:~# apt-get install nginx     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      nginx : Depends: nginx-full but it is not going to be installed or                       nginx-light but it is not going to be installed     E: Broken packages      Or in the same in Synaptic Package Manager: ![enter image description here](http://i.stack.imgur.com/g0B1x.png) `aptitude` provides more information about the missing dependencies:               root@devmv:~# aptitude install nginx     The following NEW packages will be installed:       nginx nginx-common{a} nginx-full{ab}      0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.     Need to get 580 kB/645 kB of archives. After unpacking 1,391 kB will be used.     The following packages have unmet dependencies:       nginx-full: Depends: libgeoip1 (>= 1.4.8+dfsg) but 1.4.7~beta6+dfsg-1 is installed.                   Depends: libpcre3 (>= 8.10) but 8.02-1.1 is installed.                   Depends: libssl1.0.0 (>= 1.0.1) which is a virtual package.     The following actions will resolve these dependencies:               Keep the following packages at their current version:     1)     nginx [Not Installed]                                   2)     nginx-full [Not Installed]                                             Accept this solution? [Y/n/q/?]      Usually `apt-get` should install not only the package, but also recursively its dependencies, right? What's goning wrong here? * * * EDIT: **/etc/apt/sources.list**               #           # deb cdrom:[Debian GNU/Linux 6.0.6 _Squeeze_ - Official amd64 NETINST Binary-1 20120930-15:53]/ squeeze main          #deb cdrom:[Debian GNU/Linux 6.0.6 _Squeeze_ - Official amd64 NETINST Binary-1 20120930-15:53]/ squeeze main          deb http://ftp.de.debian.org/debian/ squeeze main     deb-src http://ftp.de.debian.org/debian/ squeeze main          deb http://security.debian.org/ squeeze/updates main     deb-src http://security.debian.org/ squeeze/updates main          # squeeze-updates, previously known as 'volatile'     deb http://ftp.de.debian.org/debian/ squeeze-updates main     deb-src http://ftp.de.debian.org/debian/ squeeze-updates main          # For Nginx & PHP     deb http://packages.dotdeb.org stable all     deb http://packages.dotdeb.org squeeze-php54 all     deb-src http://packages.dotdeb.org squeeze-php54 all          # psmisc 22.16     deb http://ftp.at.debian.org/debian-backports/ squeeze-backports main      **/etc/apt/sources.list.d** is empty.


title: Why doesn't Ruby's configure script detect my executables and header files?

text: I'm trying to compile Ruby and really understanding what's going on while doing so. I've used and written `Makefiles` before, but not `autoconf`'s `configure.in` files, so maybe the result I'm getting is by design:               $ git clone https://github.com/ruby/ruby.git     ...     $ cd ruby     $ git clean -fdx     $ autoconf      $ ./configure     ...     checking for dot... no     checking for doxygen... no     checking for pkg-config... no     ...     checking direct.h usability... no     checking direct.h presence... no     checking for direct.h... no     ...     checking for daemon... (cached) no      However, all of these are at least installed:               $ dot -V     dot - graphviz version 2.26.3 (20100126.1600)     $ doxygen --version     1.7.4     $ pkg-config --version     0.26     $ sudo updatedb     $ locate /direct.h     /usr/src/linux-headers-3.0.0-16-generic/include/config/pci/direct.h     /usr/src/linux-headers-3.0.0-17-generic/include/config/pci/direct.h     $ daemon --version     daemon-0.6.4      I realize there might be different causes for each of these, but **why aren't they detected by the`configure` script?** I'm running Ubuntu 11.10 with the latest patches.               $ uname -a     Linux username 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux      Tried on another host. From `config.log`:               configure:6408: checking for dot     configure:6424: found /usr/bin/dot     configure:6438: result: no     configure:6445: checking for doxygen     configure:6461: found /usr/bin/doxygen     configure:6475: result: no     configure:6483: checking for pkg-config     configure:6504: found /usr/bin/pkg-config     configure:6530: result: no      What? They were found, but still no go?               configure:11880: checking direct.h usability     configure:11880: gcc -c  -O3 -ggdb    conftest.c >&5     conftest.c:135:20: fatal error: direct.h: No such file or directory     compilation terminated.     configure:11880: $? = 1     configure: failed program was:     | /* confdefs.h */     | #define PACKAGE_NAME ""     ...     | #endif     | #include <direct.h>     configure:11880: result: no     configure:11880: checking direct.h presence     configure:11880: gcc -E  conftest.c     conftest.c:102:20: fatal error: direct.h: No such file or directory     compilation terminated.     configure:11880: $? = 1     configure: failed program was:     | /* confdefs.h */     | #define PACKAGE_NAME ""     | /* end confdefs.h.  */     | #include <direct.h>     configure:11880: result: no     configure:11880: checking for direct.h     configure:11880: result: no      Funky test script - Maybe it needs to be in a default path of some sort?               configure:15175: checking for daemon     configure:15175: result: no      Turns out this is not checking for an executable, but for a C function using AC_CHECK_FUNCS.


title: dig returns different IP address when dropping the "www." from domain name

text: I have performed a dig on my domain name used on my site and I seem to be getting different results when I drop the "www." from the lookup. I am concerned this is causing me issues within my application, however i'm not sure if it's a red herring or not. When I do this:                dig @8.8.8.8 www.php53.staging-crm.com      I get:               ;; ANSWER SECTION:     www.php53.staging-crm.com. 14400 IN A    165.160.xx.xx     www.php53.staging-crm.com. 14400 IN A    165.160.xx.xx      Similarly, when I drop the "www.":                dig @8.8.8.8 php53.staging-crm.com      I get:               ;; ANSWER SECTION:     php53.staging-crm.com. 14400 IN  A       80.75.xx.xx      (full IP addresses have been removed). What would cause these to return different IP addresses?


title: SSH server timing out localhost and reassigning breaks X11 output

text: I'm running a python script on a remote server via SSH, however at the end I require it to save a graph using pyplot, which requires the X server to be active. As this runs for a long time I have been using the "screen" command and leaving it then resuming when I come back. The problem with this is that the resumed screen attempts to output to whatever X display SSH was using the first time I connected (e.g. localhost:15.0) however often by the time I return either the local machine or the server has assigned me a different one (e.g. localhost:22.0) and so the code breaks as it can't find anywhere to output. Is there any way I can stop this timing out or set which display I wish to use from within the SSH session? I have tried connecting using -X and -Y and there is no change? Thanks!


title: How to select a line of text in the archaic terminal browser - Links

text: I poured over this http://links.twibright.com/user_en.html#subsubch- html_options But so far does not seem like there is an key to select a line in the browser running in text mode. I would like to select a line and copy it. The cool thing about doing this is that I can stay in a terminal environment and if I need to search something on the net like a github repo I can use Links to copy paste the repo url.


title: syntax_highlight <source_file> | lpr

text: Does anyone know of a simple way to produce the PostScript corresponding to a syntax-highlighted version of a source file that can be piped directly to a PostScript printer? As the wording of the question above probably suggests, I'm looking for something that I can run from the command line. I'm thinking of an interaction like:               % syntax_highlight <SOURCE_FILE> | lp      ...with command-line switches as needed, etc. The best I've found so far is a Unix utility called `highlight`, but it has problems. The most serious of it is that it doesn't have an option to output PostScript directly. (Since `highlight` does support LaTeX output, I tried to patch together a script that would automate the process of generating the PostScript file via *.tex => *.dvi => *.ps, but the visual appearance of the final result is awful, much worse than it is for the HTML file that `highlight` generates for the same source code input.) Thanks!


title: pipe curl colored output

text: this is the script color               #!/bin/bash           ESC_SEQ="\x1b["     COL_RESET=$ESC_SEQ"39;49;00m"       case $1 in         red )    COL_START=$ESC_SEQ"31;01m"       ;;         green)   COL_START=$ESC_SEQ"32;01m"       ;;         yellow ) COL_START=$ESC_SEQ"33;01m"       ;;         blue )   COL_START=$ESC_SEQ"34;01m"       ;;         mage )   COL_START=$ESC_SEQ"35;01m"       ;;         cyan )   COL_START=$ESC_SEQ"36;01m"       ;;       esac            echo -ne $COL_START       while read text;       do       echo  $text       done       echo -ne $COL_RESET      when i do               curl localhost:8080/      it responds with the usual curl outputm HOOOOORAY! when i do               curl localhost:8080/ | color red      it does not color the output how I expect it to ...... `CRY' I don`t think I am calling read correctly for the situation.


title: Run ssh as a command of another ssh command

text: I want to run a program on a machine that I have ssh access to from a gateway machine that I can access with ssh too. When I want to run an mpi program on the target machine `T`, I access to the gateway `G` from my local machine the usual way :               ssh user@Gateway      Once on the `G` machine, I start my program on the target machine like this :               ssh Target 'eval $(ssh-agent -s);ssh-add my_key;mpirun --hostfile .hosts program'      This way everything works correctly (notice that I need `ssh-agent` and `ssh- add` to run before `mpirun`, refer to this question for details.) I want to pass the second ssh command directly to the ssh command on my local machine when I access the Gateway, something like this               ssh user@Gateway "ssh Target 'eval $(ssh-agent -s);ssh-add my_key;mpirun --hostfile .hosts program'"      But this doesn't work, because of the `"` I think. PS: I cannot use ssh-agent-forwarding.


title: Can I install Paint.Net on linux using mono?

text: I tried downloading and running the Paint.NET installer under mono and got: > Cannot open assembly 'Paint.NET.3.5.8.Install.exe':   >  File does not contain a valid CIL image. Can this be installed using mono? If it matters, I'm running Ubuntu.


title: Removing zombie process from the process table

text: Can somebody please explain when parent process receives the exit status of a dead child process via `wait`, who actually reallocates the memory of the child process and removes it from the process table?


title: Disable Address space layout randomization (ASLR) for my processes

text: I want to run some programs in Linux where I want to disable Address Space Layout Randomization (ASLR). I know to disable it at system level, which is by setting `/proc/sys/kernel/randomize_va_space` to 0. However, I don't have access to change the value of `/proc/sys/kernel/randomize_va_space` as I don't have the administrator rights and the administrator would also not accept my request to do so. So I want to only disable it for my own processes. Is it possible?


title: names that occur the largest number of times in a data set

text: users     directory     ----------------------     hjsyeh    hellodir ;     awgshd    newdir;     hjsyeh    hidir;     jkdhjk    welcomedir      the above given are set of users and the directories they created .How can I get the sum of the users with more number of directories created in unix shell script ? my output should be               hjsyeh -2 directories


title: What is the purpose of multiple swap files

text: During installation of most (if not all) distro's of linux, the hard drive is partitioned to include a swap partition by default. It is possible to change this behavior with `swapon -p priority` According to the man pages, the priority is:               PRIORITY     Each swap area has a priority, either high or low. The default priority is      low. Within the low-priority areas, newer areas are even lower priority      than older areas.     All priorities set with swapflags are high-priority, higher than default.      They may have any non-negative value chosen by the caller. Higher numbers      mean higher priority.          Swap pages are allocated from areas in priority order, highest priority      first. For areas with different priorities, a higher-priority area is      exhausted before using a lower-priority area. If two or more areas have the      same priority, and it is the highest priority available, pages are      allocated on a round-robin basis between them.          As of Linux 1.3.6, the kernel usually follows these rules, but there are      exceptions      Why would you ever need more than one swap file?   Is it common practice for system administrators to configure more than one swap?


title: numfsbufs and mount/remount of File Systems

text: What is the right the procedure to set the numfsbufs parameter? The current value of the parameter is 196               App_Server:>ioo -o numfsbufs      numfsbufs = 196      The details of the server (prtconf command) are at http://dpaste.com/1317430/ We want to change the value of numfsbufs parameter to 512 This is based on the analysis of increasing value of I/O blocked                          52534 pending disk I/Os blocked with no pbuf                     0 paging space I/Os blocked with no psbuf                  2228 filesystem I/Os blocked with no fsbuf                     0 client filesystem I/Os blocked with no fsbuf                313699 external pager filesystem I/Os blocked with no fsbuf      The command to do this is `ioo -p -o numfsbufs=512` What I am not sure about is how to handle the mount/unmount of Volume Groups Do i need to mount and unmount each and every file system? Or can i just restart the server after setting this variable and it will take care of itself The link at http://dpaste.com/1317412/ shows the various volume groups. Please guide as I am confused what the procedure should be. The system administrators are asking a detailed set of instruction and hence I am trying to work out a document detailing the various steps.


title: How to setup weechat to connect with facebook google talk and skype?

text: I'm looking for solution to tight all my communication channels I'm currently using: FB, GTalk and Skype into the terminal based chat client like weechat. It looks like FB and GTalk use XMPP, but it's really hard to setup suggested weechat plugin jabber.py http://www.weechat.org/scripts/stable/tag/xmpp/ Please advise how to deal with weechat + XMPP problem. And how to setup skype chat.


title: What's eating my disk space?

text: I'm running Linux Mint 14 Nadia. The Linux partition has 10G. When the system starts, `du` reports 80% usage. Then the usage slowly grows until it reaches 100% and the system becomes unusable. (It can happen on the order of days or weeks). After the reboot the usage resets to 80%. The strangest thing of all is that `du` shows no change. Here's output of those commands (Windows and external drive partitions are elided):               # --- Just after reboot ---          $ df -h          Filesystem      Size  Used Avail Use% Mounted on     /dev/sda1       9.8G  7.3G  2.0G  80% /     none            4.0K     0  4.0K   0% /sys/fs/cgroup     udev            428M  292K  428M   1% /dev     tmpfs            88M  1.3M   87M   2% /run     none            5.0M     0  5.0M   0% /run/lock     none            437M  288K  437M   1% /run/shm     none            100M   12K  100M   1% /run/user          $ sudo du -x   -d1 -h /     186M    /opt     512M    /var     11M /sbin     556K    /root     1.3G    /home     613M    /lib     8.0K    /media     4.6G    /usr     16K /lost+found     111M    /boot     39M /etc     4.0K    /mnt     60K /tmp     9.1M    /bin     4.0K    /srv     7.3G    /            # <-- note this               # --- After some time ---          $ df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/sda1       9.8G  9.1G  199M  98% /     none            4.0K     0  4.0K   0% /sys/fs/cgroup     udev            428M  292K  428M   1% /dev     tmpfs            88M  1.3M   87M   2% /run     none            5.0M     0  5.0M   0% /run/lock     none            437M   27M  411M   7% /run/shm     none            100M   28K  100M   1% /run/user          $  sudo du -x   -d1 -h /     186M    /opt     511M    /var     11M /sbin     556K    /root     1.4G    /home     613M    /lib     8.0K    /media     4.6G    /usr     16K /lost+found     111M    /boot     39M /etc     4.0K    /mnt     520K    /tmp     9.1M    /bin     4.0K    /srv     7.3G    /              # <-- note this      (Note: I use hibernation. After the hibernation, the usage stays the same, and after reboot, it resets to 80%.) How do I track what eats the space? I've read this question. I'm still in the dark. How do I find out which program is responsible for this behavior? **After edit** : found it. The space is claimed by the kernel log, which is seen by `dmesg`. It fills up because my machine generates errors at the rate 5 a second. (It's related to this bug.) Let the future readers with a similar problem - slowly-filling disk space unseen by `du` - not forget to try `dmesg` in searching for the cause.


title: less '+>' /path/to/file

text: So Gilles mentioned in the chat room that:               less '+>' /path/to/file      can be used with `less` in order to view a file in reverse. I've never seen it before. I'm curious - what's going on with the `+>` operator in the title? Is this `less` specific syntax? Can it be used otherwise? Are there similar operators I should probably know about?


title: Is a SuperServer 6017R-72RFTP Debian-compatible?

text: Can I install Debian on Supermicro SuperServer 6017R-72RFTP? I was investigating Supermicro webpage and at some point it got confusing because I was not sure do I and for I have all necessary drivers, e.g. Ubuntu 12.04 Server ...


title: File viewer (not manager) with dual pane

text: I have multiple papers, in multiple directories. let us call the papers A, B, C, D... and I have to write reports often, where I have to answer questions like Q1, Q2, Q3, Q4... Now, what often happens is, I notice that the answer to Q1 is in, say paper A, G, and K. The answer to Q2 is in B, E, the answer to Q3 is in A, C, D, E and so on. So I want a software like this: It has to panels, and a bottom pannel to display additional information. In the two panels, the user can add a symbol/link, which will point to a particular file - can also drag/drop a file on it, and it will capture the files path. Clicking on it will lauch the file, and the user should be able to move the symbols (with the path to file in it) between two panes, but it will not change the location of the file in the HDD. Does such software exists?


title: Is there a way to get the filename (or title) of a completed print job?

text: The `lpq -a` lists, among other things, the name of each file printed.               Rank    Owner    Job     File(s)                         Total Size     active  myuser   2       version.txt                     1024 bytes     1st     myuser   8       691227_1399095378.raw           3072 bytes      It appears that the jobs listed correspond to those shown by `lpstat -Wnot- completed`. But is there a way to get `lpq` (or any other CUPS program) to show the filenames of jobs that are completed?


title: Kdevelop project setup with symlinked files not seeing custom include paths

text: So I have a crazy project setup (well, it's only 1 file that needs this crazyness). First, I'll explain the setup. So I have a file on my dropbox. I want to include that file in a Kdevelop project, but the rest of the project source code is located on a virtual machine, as well as the Kdevelop environment itself where I'm working. So what I've done is in the project directory tree for the kdevelop project, I've put a symlink to the file in my dropbox. To summarize.               host:~$ ls Dropbox/       Dropbox/pxaregsmodule.c                    vm:~$ mount       Dropbox on /home/user/Dropbox/ type vboxsf (uid=1000,gid=1000,rw)                    vm:~$ ls Dropbox/       Dropbox/pxaregsmodule.c                    vm:~/projectroot/modules$ ls -la     puremodule.c     pwdmodule.c     pxaregsmodule.c -> /home/dknapp/Dropbox/pxaregsmodule.c                    vm:~/projectroot/modules$ cat ../.kdev_include_paths     /home/user/projectroot/Include      So as you can see. I have a symlink in a subdirectory of kdevelop that's linked outside of the project tree. And I have an include directory at the project root for my include files. Now the _problem_ is that when I open pxaregsmodule.c in the kdevelop editor, it doesn't recognize the custom include arguments because it thinks it's opening in /home/user/Dropbox. Of course this only affects the editor, where it can't code complete and it thinks it's missing include files. But doesn't have to do with the makefile and compilation. But is there any way to make kdevelop not dereference symbolic links and think the file is opening in `projectroot/modules` so it can see the include path? I can't use a hardlink because the file is on my shared partition, which crosses partition boundaries. Any solutions? Was that clear?