Cross-compiling OpenSSH for Android

I'm working on compiling OpenSSH for Android based on this answer at Stack Overflow. Here's what I've done so far:   * Building on Ubuntu 14.04 amd64.   * `apt-get install build-essential gcc-arm-linux-androideabi` Download zlib, then do:               cd zlib-1.2.8     ./configure --prefix=/vagrant/build     make CC=arm-linux-androideabi-gcc     make install      This fails at the `make` step:               gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.8 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc     /usr/bin/ld: crc32.lo: Relocations in generic ELF (EM: 40)     crc32.lo: error adding symbols: File in wrong format     collect2: error: ld returned 1 exit status     make: *** [libz.so.1.2.8] Error 1      What am I missing here? Is there something else it needs to know about to be able to build zlib? Next in the process is to build OpenSSL:               cd openssl-1.0.1h/     ./Configure dist --prefix=/vagrant/build/     make CC="arm-linux-androideabi-gcc" AR="arm-linux-androideabi-ar r" RANLIB="arm-linux-androideabi-ranlib"     make install      This again fails at the `make` step:               make[2]: Entering directory `/vagrant/openssl-1.0.1h/apps'     ( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto }"; LDCMD="${LDCMD:-cc}"; LDFLAGS="${LDFLAGS:--O}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )     /usr/bin/ld: openssl.o: Relocations in generic ELF (EM: 40)     /usr/bin/ld: openssl.o: Relocations in generic ELF (EM: 40)     openssl.o: error adding symbols: File in wrong format     collect2: error: ld returned 1 exit status     make[2]: *** [link_app.] Error 1     make[2]: Leaving directory `/vagrant/openssl-1.0.1h/apps'     make[1]: *** [openssl] Error 2     make[1]: Leaving directory `/vagrant/openssl-1.0.1h/apps'     make: *** [build_apps] Error 1      Again it seems to be having the same problem, not being able to read a file that it wrote. I haven't made it to the final step of compiling OpenSSH yet, but this is how I assume that I'd do it:               cd openssh-6.6p1     ./configure --host=arm-linux --with-libs --with-zlib=$HOME/zlibArm --with-ssl-dir=$HOME/opensslArm --disable-etc-default-login CC=gcc-arm-linux-gnueabi-gcc AR=gcc-arm-linux-gnueabi-ar     make      Why is my compilation above failing for Zlib and OpenSSL when compiling for `arm-linux-androideabi`? How can I compile OpenSSH (specifically the client and the agent) for Android on ARM?


In u-boot why spi flash is probed twice?

This is a section of the log from u-boot running on Avnet Microzed board -ARM CORTEX A9:               [Thu Jun 26 17:40:53.656 2014]          [Thu Jun 26 17:40:53.656 2014]          [Thu Jun 26 17:40:53.656 2014] U-Boot 2013.07 (Jun 26 2014 - 17:34:41)          [Thu Jun 26 17:40:53.656 2014]          [Thu Jun 26 17:40:53.656 2014] 1 GiB          [Thu Jun 26 17:40:53.671 2014] SF: Detected S25FL129P_64K/S25FL128S_64K with page size 64 KiB, total 16 MiB          [Thu Jun 26 17:40:53.703 2014] *** Warning - bad CRC, using default environment          [Thu Jun 26 17:40:53.703 2014]          [Thu Jun 26 17:40:53.703 2014] In:    serial          [Thu Jun 26 17:40:53.703 2014] Out:   serial          [Thu Jun 26 17:40:53.703 2014] Err:   serial          [Thu Jun 26 17:40:53.703 2014] U-BOOT for ab          [Thu Jun 26 17:40:53.703 2014]          [Thu Jun 26 17:40:53.703 2014]          [Thu Jun 26 17:40:53.703 2014] SF: Detected S25FL129P_64K/S25FL128S_64K with page size 64 KiB, total 16 MiB          [Thu Jun 26 17:40:54.453 2014] SF: 5242880 bytes @ 0x520000 Read: OK          [Thu Jun 26 17:40:54.453 2014]      Description:  PetaLinux Kernel          [Thu Jun 26 17:40:54.453 2014] 0x010000f0          [Thu Jun 26 17:40:54.453 2014] 4620145 Bytes = 4.4 MiB          [Thu Jun 26 17:40:54.453 2014]      Description:  Flattened Device Tree blob          [Thu Jun 26 17:40:54.453 2014] 0x01468114          [Thu Jun 26 17:40:54.453 2014] 9766 Bytes = 9.5 KiB          [Thu Jun 26 17:40:54.453 2014]      Hash algo:    crc32          [Thu Jun 26 17:40:54.453 2014]      Hash value:   9a94aca8          [Thu Jun 26 17:40:54.453 2014]      Hash algo:    sha1          [Thu Jun 26 17:40:54.453 2014]      Hash value:     97b81e3014decb706ff19e61e1227dace97d4232          [Thu Jun 26 17:40:54.453 2014] crc32+ sha1+  Uncompressing Kernel Image ... OK          .     .     .      I noticed that the following lines are coming twice: SF: Detected S25FL129P_64K/S25FL128S_64K with page size 64 KiB, total 16 MiB This corresponds to the function spi_flash_probe from drivers/mtd/spi/spi_flash.c I need to know: 1- Why it is probed twice? 2- The name and location of the file from where this function is called (twice). 3- The second time it is being probed it is considerably slow, why it is so? These are my u-boot environmental variable;               U-Boot-PetaLinux> printenv     autoload=no     baudrate=115200     bootdelay=4     bootenvsize=0x00020000     bootenvstart=0x00500000     bootfile=image.ub     bootsize=0x00500000     bootstart=0x00000000     clobstart=0x1000000     console=console=ttyPS0,115200     cp_dtb2ram=sf probe 0; sf read ${clobstart} ${dtbstart} ${dtbsize}     dtbboot=sf probe 0; sf read ${netstart} ${kernstart} ${kernsize}; sf read ${dtbnetstart} ${dtbstart} ${dtbsize}; bootm ${netstart} - ${dtbnetstart}     dtbnetboot=tftp ${netstart} image.ub; tftp ${dtbnetstart} system.dtb; bootm ${netstart} - ${dtbnetstart}     dtbnetstart=0x1500000     eraseconf=sf probe 0; sf erase ${confstart} ${confsize}     eraseenv=sf probe 0; sf erase ${bootenvstart} ${bootenvsize}     ethact=Gem.e000b000     ethaddr=00:0a:35:00:07:c0     fault=echo $img image size is greater than allocated place - $img is NOT UPDATED     get_dtb=run cp_dtb2ram; fdt addr ${clobstart}     hostname="Peta_MicroZed"     install_dtb=sf probe 0; sf erase ${dtbstart} ${dtbsize};sf write ${clobstart} ${dtbstart} ${filesize}     install_jffs2=sf probe 0; sf erase ${jffs2start} ${jffs2size};sf write ${clobstart} ${jffs2start} ${filesize}     install_kernel=sf probe 0; sf erase ${kernstart} ${kernsize};sf write ${fileaddr} ${kernstart} ${filesize}     install_uboot=sf probe 0; sf erase ${bootstart} ${bootsize};sf write ${clobstart} ${bootstart} ${filesize}     kernsize=0x00500000     kernstart=0x00520000     load_boot=tftp ${clobstart} BOOT.BIN     load_dtb=tftp ${clobstart} system.dtb     load_jffs2=tftp ${clobstart} rootfs.jffs2     load_kernel=tftp ${clobstart} image.ub     loadaddr=0x1000000     mtdids=nor0=0     mtdparts=mtdparts=0:5M(boot),128K(bootenv),851968(image)     nc=setenv stdout nc;setenv stdin nc;     ncip=192.168.1.11     netboot=tftp ${netstart} image.ub && bootm     netstart=0x1000000     psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0     sd_update_boot=echo Updating BOOT from SD;mmcinfo && fatload mmc 0:1 ${clobstart} BOOT.BIN && run install_uboot     sd_update_kernel=echo Updating Kernel from SD;mmcinfo && fatload mmc 0:1 ${clobstart} ${bootfile}&& set fileaddr ${clobstart}&&run install_kernel     sdboot=echo boot Petalinux; mmcinfo && fatload mmc 0 ${netstart} ${bootfile}&& bootm     serial=setenv stdout serial;setenv stdin serial     serverip=192.168.1.11     sfboot=sf probe 0; sf read ${netstart} ${kernstart} ${kernsize}; bootm ${netstart}     silent=1     silent-kinux=yes     silent_linux=yes     test_crc=if imi ${clobstart}; then run test_img; else echo $img Bad CRC - $img is NOT UPDATED; fi     test_img=setenv var "if test ${filesize} -gt ${psize}; then run fault; else run ${installcmd}; fi"; run var; setenv var     update_boot=setenv img BOOT.BIN; setenv psize ${bootsize}; setenv installcmd install_uboot; run load_boot test_img; setenv img; setenv psize; setenv installcmd     update_dtb=setenv img DTB; setenv psize ${dtbsize}; setenv installcmd install_dtb; run load_dtb test_img; setenv img     update_jffs2=setenv img JFFS2; setenv psize ${jffs2size}; setenv installcmd install_jffs2; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd     update_kernel=setenv img KERNEL; setenv psize ${kernsize}; setenv installcmd "install_kernel"; run load_kernel test_crc; setenv img; setenv psize; setenv installcmd     varify=n          Environment size: 3214/131068 bytes


RAID Lag-Behind Burst Write

I would like to setup RAID1 so that a ramdisk in the RAID configuration has occasional synchronisation with a physical disk (that is very battery intensive to run, so I hope to let it spinout). Is there a way I can set the commission frequency on the RAID config such that it will only burst-write to the HDD every, let's say, 5 minutes?


Upgrading debian squeeze to sid

Atm I am trying to upgrade my debian squeeze to sid. I followed this tutorial: www(.)digitalocean.com/community/articles/upgrading-debian-to-unstable Everything seems to work well until Step 3. While upgrading it doesn't ask me questions. It seems to install everything.. it durates about 15 minutes. My sources.list:               deb http://ftp.de.debian(.)org/debian sid main          deb http://ftp.de.debian(.)org/debian squeeze main          deb http:/ftp.de.debian(.)org/debian sid main contrib non-free          # ofc without (.)      When I try to use dist-upgrade it says:               root@xyz:/home/myname# apt-get dist-upgrade     Paketlisten werden gelesen... Fertig     Abhängigkeitsbaum wird aufgebaut            Statusinformationen werden eingelesen... Fertig     Paketaktualisierung (Upgrade) wird berechnet... Fertig     Die folgenden Pakete werden ENTFERNT (removed):       console-terminus defoma fuse-utils gcj-4.4-base gcj-4.4-jre gcj-4.4 jre-headless (...) xserver-xorg-video-nv     Die folgenden NEUEN Pakete werden installiert:     acl akonadi-backend-mysql ant ant-optional aptitude-common (...) xserver xorg-input-vmmouse xulrunner-17.0     Die folgenden Pakete werden aktualisiert (Upgrade):       acpi acpi-support-base acpid adduser (...) xterm xz-utils zip zlib1g     979 aktualisiert, 555 neu installiert, 58 zu entfernen und 0 nicht aktualisiert.     E: Konnte Sperre /var/cache/apt/archives/lock nicht bekommen - open (11: Die Ressource ist zur Zeit nicht verfügbar)     E: Das Verzeichnis /var/cache/apt/archives/ kann nicht gesperrt werden      (german -> english)               E: Couldn't get lock /var/cache/apt/archives/lock - open (11: The ressource isn't available)          E: The directory /var/cache/apt/archives/ can't get locked


What is freezing my desktop every second (like clockwork)?

Recently, after using my desktop machine for a day or so, the oddest thing will start happening: Every second, the desktop will briefly freeze, then continue, like a heartbeat. The interval is one second exactly —I measured with a stopwatch— though every six or seven seconds, it will skip a beat. Any audio will continue normally, as will the mouse-pointer. The rest freezes, which is particularly noticeable with running video and text-editing. But it's only within X; the `tty1` terminal doesn't suffer from this. And restarting X will temporarily fix the problem. The regularity of this occurrence, as well as the fact that I always have plenty of free memory and idle cores left, makes me suspect that some process is running on a timer, co-opting the video-card. But I can't figure out what it is. I can't find anything useful in the dmesg or X logs. Here is some info that might be useful (let me know if I should add more):   * **Distro** : Gentoo Linux (kernel: linux-3.7.1-gentoo)   * **Desktop** : Gnome3   * **CPU** : Intel Core i7 (quadcore)   * **VGA** : GeForce 9500 GT (driver: Nouveau 1.0.8) It's probably overpowered for the general multitasking I use it for. I know my kernel is somewhat out-of-date, but I think I'd actually be a bit frustrated if a kernel update fixed the problem, because then I'll never know what caused it. :-) Any ideas?


Is there a way to listen to process?

I want to know if there is a way to listen to a process in linux & unix - when it ends and what's the exit code of the process(script). I dont want to write a script that will run `X` seconds and check by `ps -ef | grep PID` if the process is still alive. I want to know if there is a way that the process will notify me when it ended and what was its exit code.


virt-install and /dev/hda vs. /dev/sda

It appears that my virt-install xml file (i.e. created when defining a VM) specifies targets "hda", "hdb", and so on as the devices for disks, however, the VM, once created, lists `/dev/sda`, `/dev/sdb`, etc... for its devices. Is the target device name not guaranteed to be honored when creating new Linux VM's in `virt-install`? If so, how can we determine what a device name will be before the VM is created? I also recall similar issues in AWS with externally mounted disks, so maybe there is some missing piece to the puzzle of the guarantees provided when devices are named and mounted which I am not aware of.


shifted screen with AMD card both drivers

Running OS 12.3 i've encountered the problem of a ragged and/or shifted screen using an AMD HD 7670M and FGLRX and/or radeon drivers. A full account can be found on: SuSE Hardware Forum Short story: no matter what I do - the screen is either shifted to the right & wrapped (varying from 1/4 to 3/4 of monitor) or it appears in weird shifted stripes (varying in width between reboots). Only thing that works is failsafe mode. Any help would be much appreciated! This is what I get when running get-edid:               ./get-edid: get-edid version 2.0.0          Performing real mode VBE call     Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0     Function unsupported     Call failed          VBE version 0     VBE string at 0x0 "O"          VBE/DDC service about to be called     Report DDC capabilities          Performing real mode VBE call     Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0     Function unsupported     Call failed          Reading next EDID block          VBE/DDC service about to be called     Read EDID          Performing real mode VBE call     Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0     Function unsupported     Call failed          The EDID data should not be trusted as the VBE call failed     Error: output block unchanged      This is the force-converted output by parse-edid:               ./parse-edid: parse-edid version 2.0.0     ./parse-edid: EDID checksum failed - data is corrupt. Continuing anyway.     ./parse-edid: first bytes don't match EDID version 1 header     ./parse-edid: do not trust output (if any).              # EDID version 105 revision 100     Section "Monitor"         Identifier "ZKD:3a20"         VendorName "ZKD"         ModelName "ZKD:3a20"         # DPMS capabilities: Active off:yes  Suspend:yes  Standby:no              Mode    "1381x578"  # vfreq 134.753Hz, hfreq 87.185kHz             DotClock    257.110000             HTimings    1381 1496 1593 2949             VTimings    578 632 644 647         EndMode         Mode    "1909x1824" # vfreq 24.545Hz, hfreq 96.217kHz             DotClock    292.980000             HTimings    1909 1958 2006 3045             VTimings    1824 1826 1842 3920         EndMode         Mode    "1824x1853" # vfreq 7.869Hz, hfreq 31.073kHz             DotClock    123.360000         HTimings    1824 1872 1920 3970             VTimings    1853 1891 1894 3949         EndMode     Mode    "1902x1641" # vfreq 18.599Hz, hfreq 99.246kHz             DotClock    300.220000             HTimings    1902 1950 2067 3025             VTimings    1641 1647 1709 5336         EndMode     EndSection      Output of xrandr --prop w. fglrx nomodeset:                   Screen 0: minimum 320 x 200, current 1366 x 768, maximum 1600 x 1600     LVDS connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x  193mm         SignalFormat:   DisplayPort         ConnectorType:  Panel        1366x768       60.0*+        1360x768       60.0          1280x768       60.0          1280x720       60.0          1024x768       60.0          1024x600       60.0          800x600        60.0          800x480        60.0          640x480        60.0       DFP1 disconnected (normal left inverted right x axis y axis)     SignalFormat:   TMDS     ConnectorType:  HDMI     CRT1 disconnected (normal left inverted right x axis y axis)     SignalFormat:   VGA     ConnectorType:  VGA


no stderr output when using stdbuf -o 0 |& tee log

I want to log the standard output and error info from running my program, using the following command:                 stdbuf -o 0 ./myprogram|& tee mylog      it works fine in one computer, I can see both standard output and stderr output on screen and in `mylog`. but in another computer, I can only see the standard output in screen and `mylog`. They are both Fedora OS and x86_64.


which distributions to test for successful compilation?

I've got a package written in C++ using boost libraries and a bunch of helper scripts, and I want to make sure it's easy to compile for _most_ Linux x86_64 distributions. It uses `cmake` and downloads the appropriate version of boost if there isn't one found in the system. I need to decide which ones based on which ones are most used and cover the widest versions of libraries. I have chosen the following ones so far:   * Ubuntu 12.04.02 LTS   * CentOS 6.4 The following ones I am not sure if I should include or not:   * CentOS 5.x -- for older system configurations out there. Worth adding?   * RHEL v.3 -- is this going to be any different than CentOS 6.x?   * Fedora -- is this going to be any different than CentOS 6.x?   * openSUSE -- is this worth adding? I know this question is a bit subjective depending on people's opinion and what they might have seen out there, but considering there is a `distribution- choice` tag, I thought I would ask. Also, whatever people say, it's still better than my naive knowledge of people using mostly:   1. Ubuntu/Mint for desktops/laptops   2. some brew of either Debian or a RedHat based one on supercomputing grids (CentOS/Fedora/RHEL)


Configure vsftpd allow access to mounted ISO file

I am having problems to allow anonymous FTP access to a directory that mounted a ISO file.   * No change to `/etc/vsftpd/vsftpd.conf`   * RHEL 6.5 DVD ISO file saved to `/var/ftp/pub/ISO/rhel6_5.iso`   * Anonymous user can see this ISO file   * Created a directory `/var/ftp/pub/rhel`   * Mounted iso file, `mount -o loop,ro /var/ftp/pub/ISO/rhel6_5.iso /var/ftp/pub/rhel` But anonymous ftp users can't see `rhel` directory for some reason, any ideas ? I followed this instructions vsftpd symbolic link, but it did not work for me. `/var/ftp/pub/rhel` directory will disappear from anonymous FTP user, if I mount the ISO file. Here is `ls -lZ` output. I also noticed that SELinux context will change once I mount the ISO file.               [root@citest pub]# ls -lZ     drwxr-xr-x. root root unconfined_u:object_r:public_content_t:s0 ISO     drwxr-xr-x. root root unconfined_u:object_r:public_content_t:s0 rhel


Setup GMX email with SSMTP

I setup the simplest outgoing email server possible with `ssmtp`. It is giving me the error `Authorization failed (535 Authentication credentials invalid)`. Here is my configuration without comments:               # /etc/ssmtp/ssmtp.conf     root=myemail@gmx.com     mailhub=mail.gmx.com:465     rewriteDomain=gmx.com     hostname=HP-Q101     rewriteDomain=gmx.com     FromLineOverride=YES     AuthUser=myemail@gmx.com     AuthPass=my@super&secret*pa$$word     UseTLS=YES      Running output:               ~$ ssmtp -vvv webmaster@example.com < msg     [<-] 220 gmx.com (mrgmxus001) Nemesis ESMTP Service ready     [->] EHLO ASUS-N53SM     [<-] 250 AUTH LOGIN PLAIN     [->] AUTH LOGIN     [<-] 334 VXNlcm5hbWU6     [->] c3VwZXZvMZExZGdteZ3jb33=     [<-] 334 ZZFzc3dvcmZ3     [<-] 535 Authentication credentials invalid     ssmtp: Authorization failed (535 Authentication credentials invalid)      I understand that this implies a wrong username or password, but I have confirmed the password by copying it directly from my password manager. I also tried setting my user name to only `myemail`.   * Anyone have luck setting up a GMX account?   * If the problem isn't username/password, what could it possibly be?


What does it mean when the output of $ls -lasrt includes '.' and '..'

I input the command:                    $ ls -lasrt      And the output includes (there are more results, these are the ones that confuse me):                  4 drwxr-xr-x 5 tuc40953 stdchem  4096 Jul  3 17:48 ..        4 drwxr-xr-x 2 tuc40953 stdchem  4096 Jul  5 10:03 .      Could this mean that the last things that were written are in the previous directory?


reading from serial from linux command line

I have a serial port device that I would like to test using linux command line. I am able to use stty and echo for sending commands to serial port, but when device responds I have no way of reading what is coming from serial port. I am using `stty -F /dev/ttyS0 speed 9600 cs8 -cstopb -parenb && echo -n ^R^B > /dev/ttyS0` to send a command to the device. Device operates and sends a response back in 300 ms's and but I don't know how I can print that response to the console using command line, if someone can show me a way to do this, I'd be grateful.


Find a file in lots of zip files (like find command for directories)

> **Possible Duplicate:**   >  Find recursively all archive files of diverse archive formats and search > them for file name patterns I need to search for a file in all zip files in a directory. Is there a tool like `find` that be able to search in ZIP files? I tried this:               find /path/ -iname '*.zip' -print -exec unzip -l {} \; |grep -i '<filename>'      But this only prints path of file in zip file and not the zip file name itself! Thanks


Moving a Xen DomU to a new block device

I am busy replacing the (SAN attached) storage configured for this XEN host. Is there some way to "move" the domU from one block device to another on the same host, possibly something similar to live migration, but on a single host and going to new storage? My current process is:   1. Shut down the VM.    2. Delete the VM    3. Change it's XML config file to refer to the new LUN device.    4. Copy (at raw level) the data from the old to the new LUN    5. Re-create the VM using the updated XML config file    6. Start the VM back up. This works... but it takes time - some of the LUNs are huge. It would be great if I could either minimize the downtime to a few minutes, or ideal if I could eliminate it entirely. FWIW this old host is still Running Xen 3.0. About the current disk setup - it is realy simple. Each DomU have a single whole disk device assigned to it, eg phy:/dev/emcpowerx As evident by the above, the device is a pseudo device managed by EMC powerpath. The objective is to move the domU from /dev/emcpowerx to /dev/emcpowerz.


Cannot create L2TP/IPSec VPN connection on Gentoo

My system is Gentoo 64bit, DE is KDE 4, and I have just updated my system. I set up a L2TP/IPSec VPN but it cannot initiate the connection. Whenever I try to connect I got below error in my system log.               Jul 03 11:13:47 dell NetworkManager[291]: <warn> connection /org/freedesktop/NetworkManager/Settings/3 failed to activate: (2) The VPN service 'org.freedesktop.NetworkManager.l2tp' was not installed.      What package am I missing? `emerge --info`:               Portage 2.2.10 (default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.8.3, glibc-2.19-r1, 3.14.4-gentoo x86_64)          System uname: Linux-3.14.4-gentoo-x86_64-Intel-R-_Core-TM-_i5-3210M_CPU_@_2.50GHz-with-gentoo-2.2     KiB Mem:     8035260 total,    772960 free     KiB Swap:          0 total,         0 free     Timestamp of tree: Thu, 03 Jul 2014 02:30:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 ccache version 3.1.9 [enabled]          app-shells/bash:          4.2_p47     dev-java/java-config:     2.2.0     dev-lang/python:          2.7.7, 3.2.5-r3, 3.3.5, 3.4.1     dev-util/ccache:          3.1.9-r3     dev-util/cmake:           2.8.12.2-r1     dev-util/pkgconfig:       0.28-r1     sys-apps/baselayout:      2.2     sys-apps/openrc:          0.12.4     sys-apps/sandbox:         2.6-r1     sys-devel/autoconf:       2.69     sys-devel/automake:       1.11.6, 1.14.1     sys-devel/binutils:       2.24-r3     sys-devel/gcc:            4.8.3     sys-devel/gcc-config:     1.8     sys-devel/libtool:        2.4.2-r1     sys-devel/make:           4.0-r1     sys-kernel/linux-headers: 3.15 (virtual/os-headers)     sys-libs/glibc:           2.19-r1     Repositories: gentoo x-portage     ACCEPT_KEYWORDS="amd64 ~amd64"     ACCEPT_LICENSE="*-@EULA AdobeFlash-11.x Intel-SDP"     CBUILD="x86_64-pc-linux-gnu"     CFLAGS="-O2 -pipe"     CHOST="x86_64-pc-linux-gnu"     CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"     CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"     CXXFLAGS="-O2 -pipe"     DISTDIR="/usr/portage/distfiles"     FCFLAGS="-O2 -pipe"     FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"     FFLAGS="-O2 -pipe"     GENTOO_MIRRORS="http://mirrors.sohu.com/gentoo/ http://mirrors.163.com/gentoo/" LANG="en_US.UTF-8"     LDFLAGS="-Wl,-O1-Wl,--as-needed"     MAKEOPTS="-j5"     PKGDIR="/usr/portage/packages"     PORTAGE_CONFIGROOT="/"     PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"     PORTAGE_TMPDIR="/var/tmp"     PORTDIR="/usr/portage"     PORTDIR_OVERLAY="/usr/local/portage"     USE="X a52 aac acl acpi alsa amd64 avx bash-completion berkdb bluetooth branding bzip2 cairo cdda cjk cli cracklib crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif iconv icu jpeg kde kipi lcms libnotify lm_sensors mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio python qt3support qt4 readline sdl semantic-desktop session spell sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb v4l vim-syntax vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib"     ABI_X86="64"     ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"     APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"     CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"     CAMERAS="ptp2"     COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc"     GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx"     GRUB_PLATFORMS="pc"     INPUT_DEVICES="evdev synaptics"     KERNEL="linux"     LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"     LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"     OFFICE_IMPLEMENTATION="libreoffice"     PHP_TARGETS="php5-5"     PYTHON_SINGLE_TARGET="python2_7"     PYTHON_TARGETS="python2_7 python3_3"     RUBY_TARGETS="ruby19 ruby20"     USERLAND="GNU"     VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"     Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON


How to create a daemon which would be listening to dbus and fire script on message

I want to create a daemon, which would fire up a shell script in the background every time I unlock the screen on my ubuntu. I managed to create such script according to answer to related question: run-script-on-screen- lock-unlock. And it works well in terminal window. But now I want to create a daemon from that and I didn't get any luck yet.   Any suggestions?


awk can't print array element

Lets sat my file1 is:               A   S        B   Q      file2 is:               B   2      I want to match $1 from file2 with $1 file1 and print file1 $2 && file2 $2, for the output like this:               Q   2          My `awk` solution is:               awk 'NR==FNR {a[$1]=$1$2;next} $1 in a {print $2, a[$2]}' file2 file1       And it gives me only `Q` - it doesn't print array's second element.   How can I print array's element? **Edit** I updated my question as the answer that works for dummy example doesn't work with my actual data.               f1      chr2    47558199    ENSG00000236824.1      chr2    47558199    ENSG00000236824.1      chr2    47558199    ENSG00000236824.1           f2     ENSG00000236824.1   AAAAAAA      I want to match `f2 $1` with `f1 $3` and print `f1 $0` plus `f2 $2` I tried this answer `awk 'NR==FNR {a[$1]=$2;next} $3 in a {print $0, a[$1]}' f2 f1`,   but still not getting the output I want. `awk` code above gets me only this:               chr2    47558199    ENSG00000236824.1      chr2    47558199    ENSG00000236824.1      chr2    47558199    ENSG00000236824.1


Tightvnc server on debian closes the connection when I open a program

I installed TightVNC server on my Debian Wheezy machine. I'm using KDE. I'm able to connect to the server, but as soon as I click on any icon on the desktop of the server, the client loses the connection, and if I try to reconnect the server refuses the connection. What could be wrong?


How do I encrypt git on my server?

Heres the closest I've gotten: I installed gitolite in the `/Private` folder using `ecryptfs-utils` (`sudo apt-get install ecryptfs-utils` `adduser git` `ecryptfs-setup-private` then the rest was configuring gitolite using a root install). It worked just fine as long as someone was logged in as the user `git` using a password (`su git` using root does not work). Since the private folder activates through logging in with a password and gitolite uses RSA keys (required) the private folder is hidden thus error occurs. Is there a way I can log into my server after a reboot, type in the password and have the git user private folder available until next time the machine restarts? Or maybe theres an easy way to encrypt a folder for git repositories?


Will there be third party compositing with Gnome 3, or will it be limited?

Will we still be able to use Compiz?


Where can I find the source code of "GFileInfo" functions like "g_file_info_get_content_type"?

I want to read the source code of a GFileInfo function: g_file_info_get_content_type ( GFileInfo *info ); Could somebody tell me where to find the source code file? I search the glibc code by didn't found the functions. These function are introduced in this link: http://library.gnome.org/devel//gio/2.26/GFileInfo.html


Where can I find the source code of libgio?

I want to study how its GFileInfo components works.


update failure in CentOS

I am using CentOS 6.4 .while I am doing package updating i am getting these errors. please help me to resolve those issues.                 file /usr/lib/libpostproc.so.52 conflicts between attempted installs of ffmpeg-libs-0.10.7-1.el6.i686 and ffmpeg-libs_1.1-1.1.5-2.el6.i686       file /usr/lib/libswresample.so.0 conflicts between attempted installs of ffmpeg-libs-0.10.7-1.el6.i686 and ffmpeg-libs_1.1-1.1.5-2.el6.i686       file /usr/lib/libswscale.so.2 conflicts between attempted installs of ffmpeg-libs-0.10.7-1.el6.i686 and ffmpeg-libs_1.1-1.1.5-2.el6.i686


Why doesn't my loop over the output of ls work?

I am trying to feed Directory names into a for loop. My code is as follows:               td='/Test/TopDir/'     cd "$td"      for x in $(ls -d */ | cut -f1 -d'/'); do       echo x=$x     done      The top directory I run this on looks like this when running an ls command:               ls -l     drwxrwxrwx    4 Jason    users         4096 May  6 06:36 2014-02-02 - Jebby (     drwxrwxrwx    3 Jason    users         4096 May  6 06:09 2014-02-04 - Jebby (     drwxrwxrwx    2 root     root          4096 May  6 06:09 @eaDir     -rw-r--r--    1 Jason    users      3956225 Jan 26 10:17 DSC01062.JPG     -rw-r--r--    1 Jason    users      3927603 Jan 26 10:18 DSC01063.JPG      The results of my for loop is as follows:               x=2014-02-02     x=-     x=Jebby     x=(     x=2014-02-04     x=-     x=Jebby     x=(     x=@eaDir      As you can see the for loop is breaking the directory names into sub-pieces after each space. In this example I only want the For Loop to execute three time with the three directories:   1. 2014-02-02 - Jebby (   2. 2014-02-04 - Jebby (    3. @eaDir What am I doing wrong?


Are there any apps that will post to multiple social networking accounts at once?

I currently use Ping.fm to post to multiple social networks at once, but it's been irritating me for a while and I'm thinking of writing a tool to replace it for myself. But I figure it's possible that someone has already done that. To be a suitable replacement it needs to handle twitter, and facebook; myspace, linkedin, and google buzz are a bonus, of course everything else is frosting. In addition to allowing _me_ to send messages it must also be able to read multiple rss feeds and aggregate them to the networks I set up. If 2 or more tools, in conjunction can be made to do this that is also acceptable, e.g. `feedreader | cleanupforstream | post2stream`. If it doesn't exist I think I'll just write some Perl to do it for me, and put it on CPAN.


Denying "/opt/" access for SFTP Users other than particular dir

This is my first (newbie) post here in unix stackexchange. I want to use my WebServer (Debian) as SFTPServer giving access to particular employees. The dir structure is as follows under root: `/FTPUSERS/UserName_1`, ... `/FTPUSERS/UserName_N`. My website is under as usually `/opt/lampp/htdocs/SiteName`. I want my employees to only access the dir `/FTPUSERS` and not others, by any means of using via console-SSH/ GUI-FTPClients. Is the `chroot`ing right way to block them for not **navigating** to other dirs? Or is there any other way for blocking them? Please let me know. One more small doubt has arisen regarding file and folder permissions regarding the `LAMPP`. At present the user and group under /opt/lampp/htdocs/ are all `root and root`. In this link php.net its mentioned that directories must run under `nobody and nobody`. Is this the right way of permission setting ? Kindly clarify my points. Thank you... **EDIT** : My OS is Debian Lenny 3. The daemon running at present is the `openssh- sftpserver`. We've blocked the port-21 for ftp access. But sftp is running still under port-22. Employee can login via `sftp and ssh` on Terminal. We want to block the Console mode operating for particular users, only webmaster and root accounts must have all the access. We also want to block users from navigating outside of the `/FTPUSERS` dir using any GUI FTP Clients such as WinSCP.


How to make local system CA certificates known to Firefox?

Recently, the CAcert root certificates have been removed from Debian (more precisely, from the `ca-certificates` package). Since I want to keep them, I backed up the directory               /usr/share/ca-certificates/cacert.org/      containing two `.crt` files before the upgrade and copied it to               /usr/local/share/ca-certificates/cacert.org/      afterwards. Then I ran `update-ca-certificates`:               # update-ca-certificates      Updating certificates in /etc/ssl/certs... 2 added, 0 removed; done.     Running hooks in /etc/ca-certificates/update.d....     Adding debian:cacert.org_class3.pem     Adding debian:cacert.org_root.pem     done.     done.      It looks like all went well. However, Firefox (Iceweasel) still refuses certificates signed by CAcert as untrusted. Is there anything I missed? Do I have to do something special to make Firefox actually re-read the system certificates?


grep --byte-offset doesn't give me the bytes offset?

I run               grep -b --byte-offset 'EXTH' Agent_of_Change.mobi      but I only get "Binary file Agent_of_Change.mobi matches". How can I get the bytes offset instead?


Not able to view server-status

My application is deployed on ROOT folder in tomcat and it is connected to apache using proxy. Ex:-               ProxyPass / ajp://192.168.0.xx:8011/     ProxyPassReverse / ajp://192.168.0.xx:8011/      When I fire http://test.com/server-status it gives blank page and I receive below error in access.log               MY IP - - [03/Apr/2014:17:09:48 +0530] "GET /server-status HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36"      But if I deploy my application on Other directory say Test in tomcat and using below proxy setting in apache               ProxyPass /Test ajp://192.168.0.xxx:8011/Test     ProxyPassReverse /Test ajp://192.168.0.xxx:8011/Test/      And now if i hit the url: http://test.com/server-status then it shows me the server page with status of server. Below is my server-status configuration               <Location /server-status>         SetHandler server-status         Order deny,allow         Satisfy any         Allow from all     </Location>      Please let me know how to use server-status with deploying application as ROOT in tomcat.


What is yum equivalent of 'apt-get update'?

Debian's `apt-get update` fetches and updates the package index. Because I'm used to this way of doing things, I was surprised to find that `yum update` does all that **and** upgrades the system. This made me curious of how to update the package index without installing anything.


How come I don't have package updates in Fedora?

I last updated my Fedora 14 install weeks ago, so I expected a slew of new packages waiting for me, but after I run `yum update`, I instead get:               ...     Setting up Update Process     No Packages marked for Update      **update** : `rpm -qi sudo` gives version **1.7.4p4** `yum -v repolist` gives:               Loading "langpacks" plugin     Loading "presto" plugin     Loading "refresh-packagekit" plugin     Adding en_US to language list     Config time: 0.074     Yum Version: 3.2.28     Setting up Package Sacks     pkgsack time: 0.174     Repo-id      : fedora     Repo-name    : Fedora 14 - i386     Repo-revision: 1287926872     Repo-tags    : binary-i386     Repo-distro-tags: [cpe:/o:fedoraproject:fedora:14]: rawhide     Repo-updated : Sun Oct 24 15:44:32 2010     Repo-pkgs    : 17,883     Repo-size    : 20 G     Repo-metalink: https://mirrors.fedoraproject.org/metalink?repo=fedora-14&arch=i386       Updated    : Sun Oct 24 15:44:32 2010     Repo-expire  : 604,800 second(s) (last: Thu Jan 13 20:00:21 2011)          Repo-id      : updates     Repo-name    : Fedora 14 - i386 - Updates     Repo-revision: 1295548217     Repo-tags    : binary-i386     Repo-updated : Thu Jan 20 21:32:10 2011     Repo-pkgs    : 4,500     Repo-size    : 7.2 G     Repo-metalink: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f14&arch=i386       Updated    : Thu Jan 20 21:32:10 2011     Repo-expire  : 21,600 second(s) (last: Thu Jan 13 20:00:49 2011)          repolist: 22,383


How to access network without NetworkManager?

If I don't have NetworkManager installed on Debian, I edit " **/etc/network/interfaces** " and then run `ifup eth0`. I see that things are different in Fedora 14 (the directory and the command aren't available). How do I do it?


lpr ignores options specified by -o

When submitting a text file to a printer (HP Color LaserJet 4650) from a Debian 8/`openbox` system, the `-p` or `-o prettyprint` option is ignored. Printing the same file from a MacOS X system produces a document with proper `-p` formatting. I am trying to identify the source of the problem on the linux system. A question posted elsewhere noted that placement of the characters `/*` at the beginning of the file could resolve problems with the `-p` option, but this had no effect in my situation. I doubt, but do not exclude, the possibility of a bug in the edition of `CUPS` packaged with Debian 8. Alternatively, the source could be an absent or incorrect printer driver. How can the failure to use the `-p` option be explained? What firmware, software, configuration files, etc should be checked? **Edit 1:** I should note that in addition Unix-style newline characters (`\n`) are ignored by the printer and must be replaced by Windows-style newline characters (`\r\n`) by, e.g., `awk 'sub("$", "\r")'`. This suggests that the underlying issue may relate to the printer driver, since the printer apparently expects `\r\n` whereas `lpr` sends documents with `n` alone. **Edit 2:** The problem seems more general than originally indicated. Several other options (`-o landscape`, `-o scaling=100`) are also ignored for text or postscript files. While I haven't exhaustively tried all `lpr` options, it seems safe to conclude that the entire set of available options is being ignored.


Send an email any time an SSH key is used

I have about 30 nearly-identical CentOS 6 servers that I need to be able to push out updated config files automatically using an rsa key to log in as root. Usually this will just be rsync, but sometimes might have to run commands on the servers, so it needs ssh too. Since this will be run as a script to update all 30 servers, I don't want to have a passphrase on the key. I have that part all working fine. I created the rsa key, added it to authorized_keys for root, so I can ssh or rsync to the servers without needing to type a password. I have authorized_keys set to only accept the key from a single hostname, which should make this setup relatively secure. However, I'm still not totally comfortable with it, so would like to set it up to send an email to our shared tech mailbox every time this key is used. There's lots of times that I'll be logging into these servers as myself, and su'ing to give myself root. This is fine, and don't want to spam the tech mailbox every time one of us logs in. I only want to get the emails when the SSH key is used. Here's what I have so far, on server1[through 30].example.com:               cat /root/.ssh/authorized_keys     from="pusher.example.com",environment="SSHKEY=1" ssh-rsa AAAAB3NzaIwAAAxetcetc== root@pusher          tail -n 3 /root/.bash_profile     if [[ "${SSHKEY}" == "1" ]] ; then     echo 'Either we are getting hacked, or somebody used the SSH key on pusher to push something out to ' `hostname` ' at ' `date` | mail -s "WARNING - ROOT SSH KEY USED ON `hostname`!" techs@example.com     fi      This works perfectly for SSH - If I putty in as myself and run su to get root, I don't get the email, but if I log into pusher, and run:               ssh -i /root/.ssh/server1.pri server1.example.com      I get an email. The problem is pushing files. If I run either of:               scp -i /root/.ssh/server1.pri /tmp/file.txt server1.example.com:/tmp/     rsync -e 'ssh -i /root/.ssh/server1.pri' /tmp/test.txt server1.example.com:/tmp/      I still don't get the email. Is there a way, rather than relying on bash_profile, to set this up to send an email any time the key is used, for anything? (Or alternatively, only if it's used for scp or rsync, and I'll restrict the key to only run those?)


How to prevent arp-scan from writing to syslog?

I am using arp-scan in a bash script to verify that a host is reachable. I have the script setup as a cron job that runs every minute and /var/log/syslog is filling up with the arp-scan output. I have tried -q and --quiet and I don't see that it has any effect on the command line output or the syslog messages. Is this flag broken on arp-scan 1.6? Is there another way to prevent the syslog messages? I realize it isn't the end of the world (it's only two lines every minute), but I would rather not see it in there, if possible. The following lines appear in /var/log/syslog and /var/log/messages:               Jul 16 08:28:01 debian arp-scan[9428]: Starting: arp-scan 192.168.1.1 -I eth0     Jul 16 08:28:01 debian arp-scan[9428]: Ending: 1 hosts scanned in 0.150 seconds (6.67 hosts/sec). 1 responded     Jul 16 08:28:01 debian arp-scan[9440]: Starting: arp-scan 192.168.1.6 -I eth0     Jul 16 08:28:02 debian arp-scan[9440]: Ending: 1 hosts scanned in 0.165 seconds (6.06 hosts/sec). 1 responded      Here is the cron line for my script:               * *    * * *   root    /root/monitor      ## Update I tried both appending both > /dev/null and 2>&1 /dev/null and neither stopped the arp-scan output. ## Solution Placed the following filter in /etc/rsyslog.conf:               #     # Don't log arp-scan output     #     :programname, isequal, "arp-scan" ~


Validate Password for user account from shell script

Application is for a multiple server standardization script Looking for a way in a shell script to check if the password for an OS account (AIX) matches a standardized plain text password. The catch is that there is no `root` access, no `c` compiler or `python` , and I cannot install any additional software including `expect`. So far I have not been able to find a solution...any ideas?


How to hide files from Bash?

On the Git Bash shell on Windows, I'm stuck looking at crap left by Windows in my home directory:               NTUSER.DAT     NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf     NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms     NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms      Is there any way of hiding the files from the shell? Any way to make Bash ignore certain files or files that match a certain regex (without having to create kludgey aliases for `ls`, `grep`, and every other command that lists files in some way/shape/fashion)? They are already hidden from Windows Explorer, so I'm doubtful that anything done on the Windows side of things will have any effect.


Why VMware DHCP persists getting offline?

I am trying to set up a SSH server in my remote machine which is running Windows 7 on it currently. So first I set up a Oracle VirtualBox but it did not work for me properly. Then I decided to go with VMware instead of dealing with the problems of the VirtualBox. I installed VMware, installed an Ubuntu Virtual Machine inside. It is now working like a charm. But I have a problem. It gets disconnected after a while. As you can see below, it is disconnected. And it can get started to work properly again only if I switch manually to Vmnet8 and back to vmnet0 again. In the end (after performing the switching process) It takes a random Subnet address everytime it gets connected. My problem is I need to have always the same Subnet address everytime I get connected and set the system so that it never gets disconnected. So that I connect to the machine via SSH using putty without getting into settings and port forwarding processes and everything at everytime that I need to connect. ![Problem Screnshot](http://i.stack.imgur.com/RAIxc.png)


leds-pwm driver in linux 3.8

I am using custom board based on beaglebone black. I am trying to enable leds- pwm driver in Linux 3.8 version. But Kconfig says the driver `depends on HAVE_PWM` config, I am not able to see that configuration anywhere. After spending some time i think linux3.8(or atleast linux3.8 from TI) doesn't support led-pwm driver. has any one tried to enabled leds-pwm driver in Linux3.8 ? how to enable it ? Any suggestions ? I am trying to enable driver config in following path in menuconfig   "Device Drivers -> LED Supports -> PWM driven LED Support".   Any pointers/suggestions will help. Thank you in advance!


Building Snapwm on FreeBSD (Problem of gcc and clang)?

According to FreeBSD, from version 10 they use Clang/LLVM instead of gcc. on the surface of it all things should perform as been before even better. but I have faced this reality more than I want to. Some codes can't be compiled this way.   For example I tried to compile Snapwm. First native FreeBSD `make` is actually `pmake` and that is out of the question. So `gmake` is our choice. but issuing `gmake` on the code will produce this error:               gcc -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c -o snapwm.o snapwm.c gmake: gcc: Command not found gmake: *** [snapwm.o] Error 127      So the question becomes how to compile the code that suffers from these set backs.


Best way to do full disk encryption?

I have got a bit lost and am not sure which technology to choose for full disk encryption. It is hard to tell if the information out there is still up to date. Is there a current best practice solution for this?


Weekly cron job to save list of installed packages

I am having trouble figuring out how to set up my first cron job. I simply want to run this command once every week:               dpkg -l > ~/Dropbox/installed_packages      My `/etc/crontab` file contains the line               7 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )      So I need to place my command somewhere in the directory /etc/cron.weekly - but in which file? `/etc/cron.weekly` currently contains the following files:               apt-xapian-index  man-db  0anacron  cvs


How do I repair malformed Banshee database?

My laptop ended up getting unplugged and powered off while Banshee was importing media files. When I turned it back on and logged into my linux mint 15 I tried to open banshee but got a fatal error. I completely removed banshee using package manager then rebooted. I then used software manager to reinstall Banshee but when i tried to open it I got the same fatal error. > Fatal Error Details: > > An unhandled exception was thrown: Sqlite error 11: database disk image is > malformed (SQL: SELECT COUNT(*) FROM CoreTracks)


How do I pass a variable from my local server to a remote server?

I am trying to pass a variable from my local server (location1) to a remote server (location2). The purpose of the code is to copy a file from the remote server from a predefined location. In simpler terms, I want to copy files from location2 to location1 using a predefined path where location1 is on the local server and location2 is a remote server. See the code segment:               $location1=somewhere/on/local_server     $location2=somewhere/on/remote_server          sshpass -p "password" \       ssh username@74.11.11.11 'su -lc "cp -r $location2 $location1";'      The error I get is that both $location1 and $location2 are undefined. Also, I DON'T want to manually type the location paths because they could change at any time and it would be a pain to change them in the code if done manually.


Why can't I run this C program?

I'm trying to run my first "process" program, but I get the following error :               ./fork.c: line 4: syntax error near unexpected token `('     ./fork.c: line 4: `int main()'      I'm pretty sure that the code is correct:                #include <sys/types.h>      #include <stdio.h>      int main() {          pid_t pid;          printf("Hello fork()\n");          switch(pid=fork())  {              case -1: printf("Error by fork().....\n"); exit(0);              case 0: printf("I'm the child process \n"); break;              default: printf("I'm the dad \n"); break;          }       exit(0);     }      What is wrong?


What are the effects of increasing hard and soft limits for ldap user

I've been having some instability issues with my LDAP server. I have ~2000 machines connecting to it. Using `netstat -pant | grep slapd`, I can typically see 1500+ connections from the clients to the server at any given moment. But every so often, the connection count drops to zero. At that point the clients start having problems with jobs that rely on LDAP. I have to restart slapd on the LDAP server to get it to start accepting connections again. Sometime I have to restart the ldap daemon on the clients too. I've been told by a vendor that I need to increase the hard and soft nofile limits for the LDAP user so that it can accept more connections. Current settings:               ldap@myldapserver:~> ulimit -Hn     8192     ldap@myldapserver:~> ulimit -Sn     4500      The vendor suggests 65000 hard and 16000 soft.               ldap    soft    nofile  16000     ldap    hard    nofile  65000      This seems like a pretty dramatic increase and I can't help but wonder if this will have any adverse effects on the server. The LDAP server is a single purpose server. Should I be worried?


Should I change SSD?

Demsg shows this               EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3503, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3503 with max blocks 1 with error -5          This should not happen!!  Data will be lost     EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3509, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3509 with max blocks 2 with error -5          This should not happen!!  Data will be lost     EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3513, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3513 with max blocks 1 with error -5          This should not happen!!  Data will be lost     EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3519, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3519 with max blocks 1 with error -5          This should not happen!!  Data will be lost     EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3525, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3525 with max blocks 1 with error -5          This should not happen!!  Data will be lost     EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3528, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3528 with max blocks 1 with error -5          This should not happen!!  Data will be lost     possible SYN flooding on port 80. Sending cookies.     EXT4-fs error (device sda1): ext4_ext_get_blocks: inode #7743113: (comm     flush-8:0) bad extent address iblock: 3529, depth: 1 pblock 0     EXT4-fs (sda1): delayed block allocation failed for inode 7743113 at logical     offset 3529 with max blocks 3 with error -5          This should not happen!!  Data will be lost      Also I can't do a lot with the disk. Simple commands like fails               root@host [/home1]# rm -rf cprestore     rm: cannot remove     `cprestore/home4/site/public_html/hello/cache/site.com/http%3A%2F%2Fsite.com%2Fh%2F20019%2Fszh%2F%25E6%25B1%2589%25E5%258F%25A3%25E4%25B8%25AD%25E5%258D%258E%25E5%2585%25A8%25E5%259B%25BD%25E6%2580%25BB%25E5%25B7%25A5%25E4%25BC%259A%25E6%2597%25A7%25E5%259D%2580':     Input/output error     rm: cannot remove     `cprestore/home4/site/public_html/hello/cache/site.com/http%3A%2F%2Fsite.com%2Ft%2Ffoo%2Fszh%2F%25D7%25A7%25D7%2598%25D7%2592%25D7%2595%25D7%25A8%25D7%2599%25D7%2594%3A%25D7%2590%25D7%2595%25D7%25A0%25D7%2599%25D7%2595%25D7%25AA_%25D7%259E%25D7%25A2%25D7%25A4%25D7%2599%25D7%259C%25D7%2599%25D':     Input/output error     rm: cannot remove     `cprestore/home4/site/public_html/hello/cache/site.com/http%3A%2F%2Fsite.com%2Fp%2F%25E9%259F%25A9%25E6%2588%2590%25E7%258F%25A0%25E4%25B8%258D%25E9%259B%2585%25E8%25A7%2586%25E9%25A2%2591%25E5%25AE%258C%25E6%2595%25B4%25E7%2589%2588%2Fszh%2F1':     Input/output error      My fstab is like this:               #     # /etc/fstab     # Created by anaconda on Wed Nov  1 00:29:46 2000     #     # Accessible filesystems, by reference, are maintained under '/dev/disk'     # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info     #     UUID=9fac7ae7-9948-4612-88dc-e652fc4ceb73 /                       ext4    defaults        1 1     UUID=1daa52c7-a5da-464d-a4c7-2ee19ef017af /boot                   ext3    defaults        1 2     UUID=12649fb1-fd53-4558-8a2a-79692ada8b19 swap                    swap    defaults        0 0     tmpfs                   /dev/shm                tmpfs   defaults        0 0     devpts                  /dev/pts                devpts  gid=5,mode=620  0 0     sysfs                   /sys                    sysfs   defaults        0 0     proc                    /proc                   proc    defaults        0 0     /usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0     /dev/sda1               /home1                  auto    auto,noatime,defaults        0 2     /dev/sdb1               /home2                  auto    auto,noatime,defaults        0 2     /dev/sdc1               /home3                  auto    auto,noatime,defaults        0 2      As you see I check every reboot My provider said he did some fchk and now it's running again. However, it's been happening several time. Each time it happens it costs me a lot. I wonder if this is hardware or sotware?


Use DD-WRT to auto WOL when traffic is on same subnet

So i've seen the WOL scripts and they seem like they could work well when i'm trying to connect from a computer that is outside my router. Script i'm using: http://www.dd- wrt.com/wiki/index.php/Useful_Scripts#Web_Server_Wake-up Now the problem that i see is that when ever i'm home the WOL script will be useless because the initiating computer and the server are on the same subnet so the router will not log the request. Is there a way to have the router log the requests that are sent between two computers inside its network? I'm not very knowledgeable when it comes to network structure but i don't know if this is possible. Do i need to somehow proxy all my traffic through my router? For explanation here is what i'm trying to do: I have my home server that serves up SMB, AFP, HTTP(s), and a few other web applications. I would like the server to be sleeping when its not being accessed period. So if something outside the network requests HTTP access i want the server to wake up. If a computer on the local subnet requests a SMB share i want the server to wake up. Can anyone help a noob out? Things to note: I have an Ubuntu server. All machines that are on the local network are directly connected to the router. I have one hub that some machines are connected to but all traffic should be going through the router. EDIT: Just had a thought. What if i put the server in question on a separate VLAN and allowed for communication between the VLAN through the router. Then the traffic would have to go through the firewall and i could log the traffic there. Would anyone know how to set up such a system?


A messagebox keeping popping up in my centos VNC server asking to change proxy settings?

I have included a screenshot of what it looks like. It keeps appearing and in the morning you to close it 50 times. Could you please help me identify where the problem lies? **NOTE:** It's CentOs 6 with tigervnc.     ![The prompt](http://i.stack.imgur.com/Dp8rw.png) ### EDIT Here is the `ps -eaf` is at the bottom. This is the detail pane:            ![Details](http://i.stack.imgur.com/bsELs.png)               UID        PID  PPID  C STIME TTY          TIME CMD     root         1     0  0 15:05 ?        00:00:00 /sbin/init     root         2     0  0 15:05 ?        00:00:00 [kthreadd]     root         3     2  0 15:05 ?        00:00:00 [migration/0]     root         4     2  0 15:05 ?        00:00:00 [ksoftirqd/0]     root         5     2  0 15:05 ?        00:00:00 [migration/0]     root         6     2  0 15:05 ?        00:00:00 [watchdog/0]     root         7     2  0 15:05 ?        00:00:00 [migration/1]     root         8     2  0 15:05 ?        00:00:00 [migration/1]     root         9     2  0 15:05 ?        00:00:00 [ksoftirqd/1]     root        10     2  0 15:05 ?        00:00:00 [watchdog/1]     root        11     2  0 15:05 ?        00:00:00 [migration/2]     root        12     2  0 15:05 ?        00:00:00 [migration/2]     root        13     2  0 15:05 ?        00:00:00 [ksoftirqd/2]     root        14     2  0 15:05 ?        00:00:00 [watchdog/2]     root        15     2  0 15:05 ?        00:00:00 [migration/3]     root        16     2  0 15:05 ?        00:00:00 [migration/3]     root        17     2  0 15:05 ?        00:00:00 [ksoftirqd/3]     root        18     2  0 15:05 ?        00:00:00 [watchdog/3]     root        19     2  0 15:05 ?        00:00:00 [migration/4]     root        20     2  0 15:05 ?        00:00:00 [migration/4]     root        21     2  0 15:05 ?        00:00:00 [ksoftirqd/4]     root        22     2  0 15:05 ?        00:00:00 [watchdog/4]     root        23     2  0 15:05 ?        00:00:00 [migration/5]     root        24     2  0 15:05 ?        00:00:00 [migration/5]     root        25     2  0 15:05 ?        00:00:00 [ksoftirqd/5]     root        26     2  0 15:05 ?        00:00:00 [watchdog/5]     root        27     2  0 15:05 ?        00:00:00 [migration/6]     root        28     2  0 15:05 ?        00:00:00 [migration/6]     root        29     2  0 15:05 ?        00:00:00 [ksoftirqd/6]     root        30     2  0 15:05 ?        00:00:00 [watchdog/6]     root        31     2  0 15:05 ?        00:00:00 [migration/7]     root        32     2  0 15:05 ?        00:00:00 [migration/7]     root        33     2  0 15:05 ?        00:00:00 [ksoftirqd/7]     root        34     2  0 15:05 ?        00:00:00 [watchdog/7]     root        35     2  0 15:05 ?        00:00:00 [events/0]     root        36     2  0 15:05 ?        00:00:00 [events/1]     root        37     2  0 15:05 ?        00:00:00 [events/2]     root        38     2  0 15:05 ?        00:00:00 [events/3]     root        39     2  0 15:05 ?        00:00:00 [events/4]     root        40     2  0 15:05 ?        00:00:00 [events/5]     root        41     2  0 15:05 ?        00:00:00 [events/6]     root        42     2  0 15:05 ?        00:00:00 [events/7]     root        43     2  0 15:05 ?        00:00:00 [cpuset]     root        44     2  0 15:05 ?        00:00:00 [khelper]     root        45     2  0 15:05 ?        00:00:00 [netns]     root        46     2  0 15:05 ?        00:00:00 [async/mgr]     root        47     2  0 15:05 ?        00:00:00 [pm]     root        48     2  0 15:05 ?        00:00:00 [xenwatch]     root        49     2  0 15:05 ?        00:00:00 [xenbus]     root        50     2  0 15:05 ?        00:00:00 [sync_supers]     root        51     2  0 15:05 ?        00:00:00 [bdi-default]     root        52     2  0 15:05 ?        00:00:00 [kintegrityd/0]     root        53     2  0 15:05 ?        00:00:00 [kintegrityd/1]     root        54     2  0 15:05 ?        00:00:00 [kintegrityd/2]     root        55     2  0 15:05 ?        00:00:00 [kintegrityd/3]     root        56     2  0 15:05 ?        00:00:00 [kintegrityd/4]     root        57     2  0 15:05 ?        00:00:00 [kintegrityd/5]     root        58     2  0 15:05 ?        00:00:00 [kintegrityd/6]     root        59     2  0 15:05 ?        00:00:00 [kintegrityd/7]     root        60     2  0 15:05 ?        00:00:00 [kblockd/0]     root        61     2  0 15:05 ?        00:00:00 [kblockd/1]     root        62     2  0 15:05 ?        00:00:00 [kblockd/2]     root        63     2  0 15:05 ?        00:00:00 [kblockd/3]     root        64     2  0 15:05 ?        00:00:00 [kblockd/4]     root        65     2  0 15:05 ?        00:00:00 [kblockd/5]     root        66     2  0 15:05 ?        00:00:00 [kblockd/6]     root        67     2  0 15:05 ?        00:00:00 [kblockd/7]     root        68     2  0 15:05 ?        00:00:00 [ata/0]     root        69     2  0 15:05 ?        00:00:00 [ata/1]     root        70     2  0 15:05 ?        00:00:00 [ata/2]     root        71     2  0 15:05 ?        00:00:00 [ata/3]     root        72     2  0 15:05 ?        00:00:00 [ata/4]     root        73     2  0 15:05 ?        00:00:00 [ata/5]     root        74     2  0 15:05 ?        00:00:00 [ata/6]     root        75     2  0 15:05 ?        00:00:00 [ata/7]     root        76     2  0 15:05 ?        00:00:00 [ata_aux]     root        77     2  0 15:05 ?        00:00:00 [ksuspend_usbd]     root        78     2  0 15:05 ?        00:00:00 [khubd]     root        79     2  0 15:05 ?        00:00:00 [kseriod]     root        80     2  0 15:05 ?        00:00:00 [md/0]     root        81     2  0 15:05 ?        00:00:00 [md/1]     root        82     2  0 15:05 ?        00:00:00 [md/2]     root        83     2  0 15:05 ?        00:00:00 [md/3]     root        84     2  0 15:05 ?        00:00:00 [md/4]     root        85     2  0 15:05 ?        00:00:00 [md/5]     root        86     2  0 15:05 ?        00:00:00 [md/6]     root        87     2  0 15:05 ?        00:00:00 [md/7]     root        88     2  0 15:05 ?        00:00:00 [md_misc/0]     root        89     2  0 15:05 ?        00:00:00 [md_misc/1]     root        90     2  0 15:05 ?        00:00:00 [md_misc/2]     root        91     2  0 15:05 ?        00:00:00 [md_misc/3]     root        92     2  0 15:05 ?        00:00:00 [md_misc/4]     root        93     2  0 15:05 ?        00:00:00 [md_misc/5]     root        94     2  0 15:05 ?        00:00:00 [md_misc/6]     root        95     2  0 15:05 ?        00:00:00 [md_misc/7]     root        96     2  0 15:05 ?        00:00:00 [khungtaskd]     root        97     2  0 15:05 ?        00:00:00 [kswapd0]     root        98     2  0 15:05 ?        00:00:00 [ksmd]     root        99     2  0 15:05 ?        00:00:00 [aio/0]     root       100     2  0 15:05 ?        00:00:00 [aio/1]     root       101     2  0 15:05 ?        00:00:00 [aio/2]     root       102     2  0 15:05 ?        00:00:00 [aio/3]     root       103     2  0 15:05 ?        00:00:00 [aio/4]     root       104     2  0 15:05 ?        00:00:00 [aio/5]     root       105     2  0 15:05 ?        00:00:00 [aio/6]     root       106     2  0 15:05 ?        00:00:00 [aio/7]     root       107     2  0 15:05 ?        00:00:00 [crypto/0]     root       108     2  0 15:05 ?        00:00:00 [crypto/1]     root       109     2  0 15:05 ?        00:00:00 [crypto/2]     root       110     2  0 15:05 ?        00:00:00 [crypto/3]     root       111     2  0 15:05 ?        00:00:00 [crypto/4]     root       112     2  0 15:05 ?        00:00:00 [crypto/5]     root       113     2  0 15:05 ?        00:00:00 [crypto/6]     root       114     2  0 15:05 ?        00:00:00 [crypto/7]     root       119     2  0 15:05 ?        00:00:00 [kthrotld/0]     root       120     2  0 15:05 ?        00:00:00 [kthrotld/1]     root       121     2  0 15:05 ?        00:00:00 [kthrotld/2]     root       122     2  0 15:05 ?        00:00:00 [kthrotld/3]     root       123     2  0 15:05 ?        00:00:00 [kthrotld/4]     root       124     2  0 15:05 ?        00:00:00 [kthrotld/5]     root       125     2  0 15:05 ?        00:00:00 [kthrotld/6]     root       126     2  0 15:05 ?        00:00:00 [kthrotld/7]     root       128     2  0 15:05 ?        00:00:00 [khvcd]     root       129     2  0 15:05 ?        00:00:00 [kpsmoused]     root       130     2  0 15:05 ?        00:00:00 [usbhid_resumer]     root       191     1  0 15:05 ?        00:00:00 /bin/plymouthd --attach-to-sessi     root       267     2  0 15:05 ?        00:00:00 [kjournald]     root       339     1  0 15:05 ?        00:00:00 /sbin/udevd -d     root       648   339  0 15:05 ?        00:00:00 /sbin/udevd -d     root       651     2  0 15:05 ?        00:00:00 [kstriped]     root       694     2  0 15:05 ?        00:00:00 [flush-202:1]     root       716     2  0 15:05 ?        00:00:00 [kauditd]     root       717     1  0 15:05 ?        00:00:00 /bin/bash /etc/rc.d/rc 3     root       863     1  0 15:05 ?        00:00:00 auditd     root       888     1  0 15:05 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslo     root       902     1  0 15:05 ?        00:00:00 mdadm --monitor --scan -f --pid-     dbus       911     1  0 15:05 ?        00:00:00 dbus-daemon --system     root       921     1  0 15:05 ?        00:00:00 NetworkManager --pid-file=/var/r     root       925     1  0 15:05 ?        00:00:00 /usr/sbin/modem-manager     root       934     1  0 15:05 ?        00:00:00 cupsd -C /etc/cups/cupsd.conf     68         992     1  0 15:05 ?        00:00:00 hald     root       993   992  0 15:05 ?        00:00:00 hald-runner     root       995     1  0 15:05 ?        00:00:00 /usr/sbin/wpa_supplicant -c /etc     root      1040   993  0 15:05 ?        00:00:00 hald-addon-input: Listening on /     root      1058     1  0 15:05 ?        00:00:00 /usr/sbin/sshd     root      1069     1  0 15:05 ?        00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsf     root      1080     1  0 15:05 ?        00:00:00 guacd -p /var/run/guacd.pid     root      1156     1  0 15:05 ?        00:00:00 /usr/libexec/postfix/master     postfix   1176  1156  0 15:05 ?        00:00:00 pickup -l -t fifo -u     postfix   1177  1156  0 15:05 ?        00:00:00 qmgr -l -t fifo -u     tomcat    1224     1  0 15:05 ?        00:00:02 /usr/lib/jvm/jre/bin/java -Djava     root      1242     1  0 15:05 ?        00:00:00 crond     wesley    1276     1  0 15:05 ?        00:00:01 /usr/bin/Xvnc :1 -desktop vnc.le     wesley    1286     1  0 15:06 ?        00:00:00 /usr/bin/ck-xinit-session /usr/b     wesley    1290  1286  0 15:06 ?        00:00:00 vncconfig -iconic     mark      1313     1  0 15:06 ?        00:00:02 /usr/bin/Xvnc :2 -desktop vnc.le     wesley    1320     1  0 15:06 ?        00:00:00 dbus-launch --sh-syntax --exit-w     wesley    1321     1  0 15:06 ?        00:00:00 /bin/dbus-daemon --fork --print-     root      1327     1  0 15:06 ?        00:00:00 /usr/sbin/console-kit-daemon --n     wesley    1395  1286  0 15:06 ?        00:00:00 /usr/bin/gnome-session     wesley    1397  1395  0 15:06 ?        00:00:00 /usr/bin/ssh-agent /etc/X11/xini     root      1411     1  0 15:06 ?        00:00:00 /usr/libexec/devkit-power-daemon     wesley    1416     1  0 15:06 ?        00:00:00 /usr/libexec/gconfd-2     mark      1434     1  0 15:06 ?        00:00:00 /usr/bin/ck-xinit-session /usr/b     mark      1435  1434  0 15:06 ?        00:00:00 vncconfig -iconic     mark      1450     1  0 15:06 ?        00:00:00 dbus-launch --sh-syntax --exit-w     mark      1454     1  0 15:06 ?        00:00:00 /bin/dbus-daemon --fork --print-     sylvia    1472     1  0 15:06 ?        00:00:01 /usr/bin/Xvnc :3 -desktop vnc.le     mark      1477  1434  0 15:06 ?        00:00:00 /usr/bin/gnome-session     mark      1478  1477  0 15:06 ?        00:00:00 /usr/bin/ssh-agent /etc/X11/xini     mark      1489     1  0 15:06 ?        00:00:00 /usr/libexec/gconfd-2     wesley    1491     1  0 15:06 ?        00:00:00 gnome-keyring-daemon --start     wesley    1494     1  0 15:06 ?        00:00:00 /usr/libexec/gnome-settings-daem     mark      1500     1  0 15:06 ?        00:00:00 gnome-keyring-daemon --start     mark      1503     1  0 15:06 ?        00:00:00 /usr/libexec/gnome-settings-daem     mark      1511     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd     wesley    1513     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd     mark      1530  1477  0 15:06 ?        00:00:00 metacity     wesley    1531  1395  0 15:06 ?        00:00:00 metacity     sylvia    1535     1  0 15:06 ?        00:00:00 /usr/bin/ck-xinit-session /usr/b     sylvia    1536  1535  0 15:06 ?        00:00:00 vncconfig -iconic     sylvia    1552     1  0 15:06 ?        00:00:00 dbus-launch --sh-syntax --exit-w     sylvia    1555     1  0 15:06 ?        00:00:00 /bin/dbus-daemon --fork --print-     sylvia    1569  1535  0 15:06 ?        00:00:00 /usr/bin/gnome-session     sylvia    1570  1569  0 15:06 ?        00:00:00 /usr/bin/ssh-agent /etc/X11/xini     naomi     1583     1  0 15:06 ?        00:00:01 /usr/bin/Xvnc :4 -desktop vnc.le     sylvia    1585     1  0 15:06 ?        00:00:00 /usr/libexec/gconfd-2     sylvia    1594     1  0 15:06 ?        00:00:00 gnome-keyring-daemon --start     sylvia    1597     1  0 15:06 ?        00:00:00 /usr/libexec/gnome-settings-daem     mark      1600  1477  0 15:06 ?        00:00:00 gnome-panel     wesley    1601  1395  0 15:06 ?        00:00:00 gnome-panel     sylvia    1604     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd     wesley    1612     1  0 15:06 ?        00:00:00 /usr/bin/pulseaudio --start --lo     mark      1613     1  0 15:06 ?        00:00:00 /usr/bin/pulseaudio --start --lo     rtkit     1615     1  0 15:06 ?        00:00:00 /usr/libexec/rtkit-daemon     sylvia    1616  1569  0 15:06 ?        00:00:00 metacity     root      1621     1  0 15:06 ?        00:00:00 /usr/libexec/polkit-1/polkitd     sylvia    1622  1569  0 15:06 ?        00:00:00 gnome-panel     sylvia    1625     1  0 15:06 ?        00:00:00 /usr/bin/pulseaudio --start --lo     wesley    1626  1612  0 15:06 ?        00:00:00 /usr/libexec/pulse/gconf-helper     mark      1627  1613  0 15:06 ?        00:00:00 /usr/libexec/pulse/gconf-helper     sylvia    1628  1625  0 15:06 ?        00:00:00 /usr/libexec/pulse/gconf-helper     mark      1631  1477  0 15:06 ?        00:00:00 nautilus     mark      1633     1  0 15:06 ?        00:00:00 /usr/libexec/bonobo-activation-s     wesley    1634  1395  0 15:06 ?        00:00:00 nautilus     wesley    1636     1  0 15:06 ?        00:00:00 /usr/libexec/bonobo-activation-s     sylvia    1640  1569  0 15:06 ?        00:00:01 nautilus     sylvia    1642     1  0 15:06 ?        00:00:00 /usr/libexec/bonobo-activation-s     mark      1655     1  0 15:06 ?        00:00:00 /usr/libexec/wnck-applet --oaf-a     sylvia    1658     1  0 15:06 ?        00:00:00 /usr/libexec/wnck-applet --oaf-a     sylvia    1661     1  0 15:06 ?        00:00:00 /usr/libexec/trashapplet --oaf-a     wesley    1662     1  0 15:06 ?        00:00:00 /usr/libexec/wnck-applet --oaf-a     sylvia    1666     1  0 15:06 ?        00:00:00 /usr/libexec/gvfs-gdu-volume-mon     wesley    1667     1  0 15:06 ?        00:00:00 /usr/libexec/gvfs-gdu-volume-mon     wesley    1668     1  0 15:06 ?        00:00:00 /usr/libexec/trashapplet --oaf-a     mark      1669     1  0 15:06 ?        00:00:00 /usr/libexec/trashapplet --oaf-a     mark      1671     1  0 15:06 ?        00:00:00 /usr/libexec/gvfs-gdu-volume-mon     root      1673     1  0 15:06 ?        00:00:00 /usr/libexec/udisks-daemon     mark      1684     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-trash --spawn     wesley    1686     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-trash --spawn     sylvia    1688     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-trash --spawn     root      1689  1673  0 15:06 ?        00:00:00 udisks-daemon: not polling any d     sylvia    1693  1569  0 15:06 ?        00:00:00 gpk-update-icon     mark      1694  1477  0 15:06 ?        00:00:00 gpk-update-icon     wesley    1695  1395  0 15:06 ?        00:00:00 gpk-update-icon     mark      1705  1477  0 15:06 ?        00:00:00 /usr/libexec/polkit-gnome-authen     sylvia    1706  1569  0 15:06 ?        00:00:00 /usr/libexec/polkit-gnome-authen     wesley    1707  1395  0 15:06 ?        00:00:00 /usr/libexec/polkit-gnome-authen     wesley    1714  1395  0 15:06 ?        00:00:00 xdg-user-dirs-gtk-update     wesley    1717  1395  0 15:06 ?        00:00:00 gnome-power-manager     sylvia    1720  1569  0 15:06 ?        00:00:00 xdg-user-dirs-gtk-update     sylvia    1721  1569  0 15:06 ?        00:00:00 gnome-power-manager     mark      1725  1477  0 15:06 ?        00:00:00 gnome-power-manager     wesley    1734  1395  0 15:06 ?        00:00:00 gnome-volume-control-applet     sylvia    1735  1569  0 15:06 ?        00:00:00 gnome-volume-control-applet     mark      1737  1477  0 15:06 ?        00:00:00 gnome-volume-control-applet     sylvia    1768     1  0 15:06 ?        00:00:00 gnome-screensaver     wesley    1769     1  0 15:06 ?        00:00:00 gnome-screensaver     naomi     1773     1  0 15:06 ?        00:00:00 /usr/bin/ck-xinit-session /usr/b     naomi     1775  1773  0 15:06 ?        00:00:00 vncconfig -iconic     naomi     1787     1  0 15:06 ?        00:00:00 dbus-launch --sh-syntax --exit-w     naomi     1792     1  0 15:06 ?        00:00:00 /bin/dbus-daemon --fork --print-     mark      1804     1  0 15:06 ?        00:00:00 gnome-screensaver     naomi     1807  1773  0 15:06 ?        00:00:00 /usr/bin/gnome-session     naomi     1808  1807  0 15:06 ?        00:00:00 /usr/bin/ssh-agent /etc/X11/xini     root      1814     1  0 15:06 ?        00:00:00 /usr/sbin/atd     root      1819   717  0 15:06 ?        00:00:00 /bin/bash /etc/rc3.d/S99firstboo     naomi     1823     1  0 15:06 ?        00:00:00 /usr/libexec/gconfd-2     root      1827  1819  0 15:06 ?        00:00:00 /usr/bin/python2 /usr/sbin/first     mark      1831     1  0 15:06 ?        00:00:00 /usr/libexec/gdm-user-switch-app     mark      1833     1  0 15:06 ?        00:00:00 /usr/libexec/clock-applet --oaf-     mark      1835     1  0 15:06 ?        00:00:00 /usr/libexec/notification-area-a     sylvia    1841     1  0 15:06 ?        00:00:00 /usr/libexec/gdm-user-switch-app     sylvia    1843     1  0 15:06 ?        00:00:00 /usr/libexec/notification-area-a     sylvia    1846     1  0 15:06 ?        00:00:00 /usr/libexec/clock-applet --oaf-     wesley    1850     1  0 15:06 ?        00:00:00 /usr/libexec/gdm-user-switch-app     wesley    1852     1  0 15:06 ?        00:00:00 /usr/libexec/clock-applet --oaf-     wesley    1854     1  0 15:06 ?        00:00:00 /usr/libexec/notification-area-a     naomi     1864     1  0 15:06 ?        00:00:00 gnome-keyring-daemon --start     naomi     1867     1  0 15:06 ?        00:00:00 /usr/libexec/gnome-settings-daem     naomi     1873     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd     naomi     1879  1807  0 15:06 ?        00:00:00 metacity     naomi     1881  1807  0 15:06 ?        00:00:00 gnome-panel     naomi     1896     1  0 15:06 ?        00:00:00 /usr/bin/pulseaudio --start --lo     naomi     1901  1807  0 15:06 ?        00:00:00 nautilus     naomi     1904     1  0 15:06 ?        00:00:00 /usr/libexec/bonobo-activation-s     naomi     1907  1807  0 15:06 ?        00:00:00 gpk-update-icon     naomi     1910  1807  0 15:06 ?        00:00:00 /usr/libexec/polkit-gnome-authen     naomi     1917     1  0 15:06 ?        00:00:00 /usr/libexec/wnck-applet --oaf-a     naomi     1920     1  0 15:06 ?        00:00:00 /usr/libexec/trashapplet --oaf-a     naomi     1921  1807  0 15:06 ?        00:00:00 xdg-user-dirs-gtk-update     naomi     1922  1807  0 15:06 ?        00:00:00 gnome-power-manager     naomi     1927  1807  0 15:06 ?        00:00:00 gnome-volume-control-applet     naomi     1933     1  0 15:06 ?        00:00:00 /usr/libexec/gvfs-gdu-volume-mon     naomi     1934  1896  0 15:06 ?        00:00:00 /usr/libexec/pulse/gconf-helper     naomi     1945     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-trash --spawn     naomi     1952     1  0 15:06 ?        00:00:00 gnome-screensaver     naomi     1958     1  0 15:06 ?        00:00:00 /usr/libexec/clock-applet --oaf-     naomi     1959     1  0 15:06 ?        00:00:00 /usr/libexec/gdm-user-switch-app     naomi     1961     1  0 15:06 ?        00:00:00 /usr/libexec/notification-area-a     mark      1972     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-metadata     wesley    1983     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-metadata     sylvia    1993     1  0 15:06 ?        00:00:00 /usr/libexec/gvfsd-metadata     root      2003  1827  0 15:06 ?        00:00:00 setup     root      2040  1706  0 15:20 ?        00:00:00 /usr/libexec/polkit-1/polkit-age     root      2041  1910  0 15:20 ?        00:00:00 /usr/libexec/polkit-1/polkit-age     root      2044  1705  0 15:20 ?        00:00:00 /usr/libexec/polkit-1/polkit-age     root      2062  1058  0 15:37 ?        00:00:00 sshd: root@pts/0     root      2068  2062  0 15:37 pts/0    00:00:00 -bash     root      2086  2068  0 15:39 pts/0    00:00:00 ps -eaf


Changing group and retaining environment variables

On campus, everyone's primary group is `user` and each person is additionally associated to groups depending on the courses he or she is taking, lab he or she works at, etc. My coworker and I are members of group `foo`, so we use `newgrp foo` and `umask 7` to ensure our files are accessible to the two of us without granting _everyone_ permission. Neither of us minded this. However, we now need our `PATH` environment variable to first point to our lab's `bin` folder before the rest in the `PATH`. We thought a simple script would work, but it doesn't as the `PATH`'s contents don't persist after executing `newgrp`:               #!/bin/tcsh     setenv PATH "/path/to/lab/bin:$PATH"     newgrp foo      The default shell is `tcsh`. Does anyone have any suggestions? Thanks!


how to determine the max user process value?

Which value is correct?(or they are all correct, but which one will take effect?)               $ cat /proc/sys/kernel/pid_max      32768     $ ulimit -a |grep processes     max user processes              (-u) 77301     $ cat /proc/1/limits |grep processes     Max processes             77301                77301                p


Linux mail client that can trigger a PHP script to parse email received

Is there any simple text-based mail client that I could use that could trigger a PHP script to parse mails received from the users? I have a PHP application that sends email out to users and it would be nice if the application can parse the reply from users and store them into the database. I'm using Centos 6 with Postfix and PHP sends email out using PHPMailer. No X Window System installed.


Create app that launches a local app in Joli OS

Recently (I mean, for the last 30 minutes) I have been playing with Joli OS. I spent quite a bit of time trying to figure out how local apps are launched within the web browser. After figuring out that it uses websockets and finding the JS function (`jolios.system.apps.launch("command-goes-here")`), I tried to create an "app" (using the button in the app store) that launches Nautilus. Entering the URL `javascript:jolios.system.apps.launch("nautilus ~")` doesn't work. Is there another way to do this?


How do I run a command on multiple files

This is pretty basic, I have a folder with several subfolders of JS files and i want to run Google's Clojure compiler on all of the files in those folders. The command to process a single file is as follows:               java -jar compiler.jar --js filename.js --js_output_file newfilename.js      How do I modify this to run on every JS file in my directory structure?


My process was killed but I cannot understand the kernel notice

I have a custom application running on an embedded x86 setup (built using buildroot and uClibc). The application has been running fine but this morning when I returned to work I discovered my process had been killed and the following output on my terminal               SAK: killed process 1008 (CX_SC3): fd#4 opened to the tty     SAK: killed process 1009 (CX_SC3): fd#4 opened to the tty     SAK: killed process 1011 (CX_SC3): fd#4 opened to the tty     SAK: killed process 1012 (CX_SC3): fd#4 opened to the tty      Now `CX_SC3` is my process - it has multiple threads, one of which opens `/dev/ttyS0` to send messages over a radio modem. The fd number is 4 for the serial port. What I don't understand is   1. What the SAK means   2. The PID listed above must refer to a process that was killed by my application as there is only ever one instance of my application running at a time. Is it possible that these PIDs are actually my thread IDs (as my application does run 4 threads always).   3. If my application killed other processes, why was my application also killed?   4. What does the `opened to the tty` part mean? From some research this suggests that this has something to do with a interrupt character sent to the tty that I used to start the program.  I am sure that the above is pretty obvious when you are a linux guru but I am struggling - can anyone suggest what events could have lead to the following output? My embedded setup is very small, uses `busybox` and runs `vsftpd` and very little else other than my custom application. It is vital that my application is robust so if anyone can suggest/guess as to what sequence of events could have caused the above I will be very grateful. **EDIT:** In response to the comment below, if this is due to a SAK being detected, is there anything that can accidentally trigger this? Is it possible that anything being read on the serial port has triggered this? Also, how can I find the SAK combination for my system - I do not have a `rc.sysinit` or `rc.local` file anywhere in my root file system. **UPDATE:** I have managed to pin this event down to the point at which my host machine shuts down. I have a serial cable between my host machine and my target device which I use to send serial data to the embedded target. When I leave the target running, but shutdown the host, my application is killed as described above. When I disconnect the serial cable prior to shutting down my host machine then my application does not get killed and runs as normal. This behaviour happens even after I have performed               echo 0 > /proc/sys/kernel/sysrq      as advised.


Could Autorun Virus, affect my PC via Wine?

I have installed wine and I am afraid that viruses will affect my PC now. I will not open any other .exe file other than mine one (which I use everyday)


alternatives to wine

Is there some alternative to **Wine** ( the windows "emulator" ) which is more stable and more likely to work with my Windows games?


How to setup a "data" partition shared by multiple Linux OS'es?

Currently I have a NTFS partition that contains shared data. My rationale is, NTFS doesn't have any idea about file permissions, so I won't have any trouble using them in a multi-boot system (currently I have Gentoo and Ubuntu, and the data partition is auto-mounted on both). Now I want to get rid of the NTFS thing, if possible. So the question is, how can I use something like `ext4` and setup the same thing? **Update** : Sorry I should have made it clear that I only have Linux distributions, so no problem with `ext4`. I just want to have a partition that contains world-readable files and is automounted at boot.


How do I find where a port is?

If I want to find out which directory under /usr/ports contains a port like "gnome-terminal", how can I do that? Is there an easy command? At the moment I use things like > echo */gnome-terminal but is there a website or guide which tells you this without having to use a trick?


Convert a tab-delimited file to use newlines

input.txt (around 30K lines)               RT|367079254|bn|ERTS01065811.1| 38 1 503     RT|367079251|bn|ERTS01065814.1| 56 3 502     RT|367079248|bn|ERTS01065817.1| 52 2 502      output.txt               RT|367079254|bn|ERTS01065811.1|     38     1     503     RT|367079251|bn|ERTS01065814.1|     56     3     502     RT|367079248|bn|ERTS01065817.1|     52     2     502


mutt: how to display selected new messages diferently in index

I have my own colors defined for `mutt`. When I start `mutt`, the cursor (i.e. indicator) is on the first message (i.e. the first message on the top is selected). I have defined colors for the selected message, and I have colors defined for new messages as well:               ...     color indicator color233 color67      color index color75 color232 ~N     ....      Unfortunately, The selected message looks the same, regardless whether the message is new or not. Is there a way to have a different color for selected new messages, so that I can immediately recognize that the selected message is new? Otherwise I have to move the cursor down, to see that the message is new. I have tried the obvious solution:               color indicator color233 color67 ~N      but that does not work. Mutt complains:               Error in .muttrc, line 15: too many arguments


How to tell "cat" command to not hang on when there is no path provided?

I am simply trying to get a bash script   to return the content of a text file.               #!/bin/bash     cat $1      the problem is.. when the path to a file is not fed to this bash script... how will it even close itself. because via regular command line... if there is no file path being fed to the cat command.. it does not hang up. almost as if it is waiting for something..


Batch copy to multiple directories

I have about 9000 files in a directory and I want to mv them into 90 files in 100 directories by filename order, ignoring any remainder. In Copy multiple files from filename X to filename Y?, Caleb wrote in a comment: > If the object is just to batch them, there is a MUCH easier way! `ls | xargs > -iX -n20 cp X target_folder/` would run cp on files in batches of 20 until > they were all done. So based off of using xargs, how could I switch the target_folder to create a new folder and loop the command 100 times?


Debian: program in boot

I just configured my new VPS with Apache, PHP, MySQL and ProFTPd. I wanted to install a smtp server, but I was advised to do a apt-get upgrade first. I did this, and I got up a blue screen where I could choose between two alternatives. It said something about GRUB 2 installer. I chose the alternative that was already selected, the topmost. I chose not to update the GRUB2, and use the old one that was installed. Now, ProFTPd doesn't start in boot anymore. I have to /etc/init.d/proftpd start every time. How do I fix this? Should I have chosen to update GRUB2? Should I do apt-get upgrade again and try to do the same GRUB2 installer again?


Changing IP address of Apache server using PHP statically

I want to statically assign the IP address of my Arch linux using php. I want to change the IP by using netmask,interface,broadcast,address & gateway. The user puts up the values into a html page. The html page posts the data to the PHP page. I want to change the ip using this data. ho to do this?? please help me on this. Can Files be used? I was thinking of writing directly into the rc.conf using files!!...will this work and how??.. I have my arch linux up with apache & php..any of the help is appreciate.


copying multiple files to multiple directories

I've a problem copying many files in different directories. Let me explain better: Let's say I have the following in a dir:               $ ls     file1 file2 file3 file4 file5 dir1 dir2 dir3      and I want to copy every file* in every dir* with a single command. I've tried with:                echo dir{1..3} | xargs cp file{1..5} '{}' \;      My intent was to tell xargs to process every single dir* from echo and copy all the files in the input processed but this and similar didn't work. I would like to avoid the use of a script because it's a task I have to repeat for about 20 directories and the names of the files are slightly different so I'd prefer modifying a command rather than a script.


Block physical console access

I'd like to block physical console access to my linux. I'd like to find, which module is responsible for keyboard input (ps/2, usb, ...) and vga output (only physical), so I can remove them from my kernel (recompile) and then only have access through serial or through ssh.


Bash CD up until in certain folder

I do a lot of work in Magento, and so do a lot of the people I work with, and it gets annoying to have to type: cd ../../../../../../ To only find you're still a few directories from your root 'httpdocs' folder, so I'm trying to make a script that follows this pseudo-code:               while lowest level directory != httpdocs         cd ../     end while;      Seems pretty simple, I'm assuming I would have to do some form of grep on checking if the last part of the current working directory is httpdocs, if not just keep going up a level until it's true. I've been looking at learning bash for this, though it seems like there has to be something out there already that's similar, and the syntax puzzles me to no end.


postfix default alias used even when I have other aliases

I tried adding a rule to /etc/aliases which would send a message to /dev/null if it was sent to a particular alias:               fooname: /dev/null      I have postfix set up with a default address for a particular domain in my /etc/postfix/virtual file:               @mydomain.com  realuser      I have multiple domains mapped to this server. I've found that if I send a message to "fooname@mydomain.com, realuser@mydomain.com, fooname@otherdomain.com, realuser@otherdomain.com" I will receive the first, second, and fourth messages, but I won't receive the third. The upshot is that entries in /etc/aliases don't seem to short circuit the email sending. How do I send messages for particular aliases to /dev/null while still keeping the default alias?


Moving tmux window to pane

How do I move an existing window into a pane in another window in **tmux** when I have multiple windows, and vice versa? I'm coming from **screen** , where I can switch to the pane and then switch windows until I get to the one I want; **tmux** does not seem to allow this.


Which Grub to use for a custom portable boot image?

I would like to make a bootable USB/Floopy/LiveCD with linux kernel and Grub. After booting to that USB/Floopy/LiveCD using VirtualBox or directly, it will show my own customized Grub screen and then it will execute my C or Pascal application. I was trying to download grub but I am not sure which one I should use. Is there any issue to download the correct version of Grub such as for 32-Bit or 64-Bit downloads are different? Which Grub should I download to get started with my own customized bootable image?


Multiline pattern match using sed, awk or grep

Is it possible to do a multiline pattern match using `sed`, `awk` or `grep`? Take for example, I would like to get all the lines between `{` and `}` So it should be able to match                1. {}      2. {.....}      3. {.....                 .....} Initially the question used `<p>` as an example. Edited the question to use `{` and`}`.


Setting up server to share music with tv

Can someone please point me in the right direction? Hopefully first by letting me know if this is possible... I recently purchased a home theater system which you plug via hdmi into the tv. It has its own nice gui with netflix, and youtube, and blah blah blah. One of the options was to "browse your computer." When you click on it it tries to connect to a server to find music/videos. Can I use my Ubuntu installed laptop to host a server to put music on and play it wirelessly essentially? I believe this is possible and should be pretty straight forward. How would I go about creating a server on the same laptop I would be interacting with it...I could then secure copy or sftp the files back and forth. Is there like special settings to keep in mind? Any words of wisdom would be appreciated. Tx C


Scripting htdigest -c /path/to/file/$user $user $password in Bash

I want to be able to script with a password in variable $password.               htdigest -c /etc/apache2/pw/$user $user $password      At the moment it asks me to manually enter a password, this is not going to be possible since it will be an automated setup by a PHP script. Could someone please show me how to script this? Or an equivalent scriptable function?


Switching between split buffers in vim

recently starting trying to use VIM as my full-time text editor since I spent a lot of time SSH'ed anyways. Recently installed NERDTree so I can quickly swap between files in a project. Easy question that I can't seem to find on Google (perhaps not using the right terminology) - how do I easily switch focus between the two buffers when using NERDTree? Meaning how can I go from browsing the directory on the left to browsing the file on the right easily? Thanks.


Unmanaged VPS bought today. Sendmail not functioning correctly

I purchased an unmanaged VPS today. I moved my website on over, and when I try to send an email. It returns a blank page. Not to mention I had to install PHP myself. Apache was there, for some reason, but PHP was installed using, "`yum install php` - so...I don't know if I'm missing a package or what. I used, `yum install sendmail*` - but that didn't affect anything. Here is a pastebin of my code: Index.php http://pastebin.com/xxNdhUmC - Page with the form, stripped of unnecessary material. Send.php http://pastebin.com/NjP0xZn9 - Supposed to send the mail, but get's stuck and returns blank page. URL: www.jakeandersen.me