title: File permission issues with shared folders under Virtual Box (Ubuntu Guest, Windows Host)

text: I am using Ubuntu on Virtual Box and I have a folder which is shared between the host (Windows) and the VM (Ubuntu). When I open any file in the share folder in Ubuntu, I can not change it as its owner is set to root. How can I change the ownership to myself? Here is the output of `ls -l` :               -rwxrwxrwx 1 root root 0 2012-10-05 19:17 BuildNotes.txt      The output of `df` is:                m@m-Linux:~/Desktop/vbox_shared$ df      Filesystem           1K-blocks      Used Available Use% Mounted on      /dev/sda1             29640780  10209652  17925440  37% /      none                    509032       260    508772   1% /dev      none                    513252       168    513084   1% /dev/shm      none                    513252        88    513164   1% /var/run      none                    513252         0    513252   0% /var/lock      none                    513252         0    513252   0% /lib/init/rw      Ubuntu               214153212  31893804 182259408  15% /media/sf_Ubuntu      /dev/sr0                 53914     53914         0 100% /media/VBOXADDITIONS_4.2.0_80737      Ubuntu               214153212  31893804 182259408  15% /home/m/Desktop/vbox_shared      The options in VM is automount and the readoly is not checked. Tried to use `/media/sf_Ubuntu`, but getting permission error:               m@m-Linux:/media$ ls -l      total 10     drwxrwx--- 1 root vboxsf 4096 2012-10-23 15:35 sf_Ubuntu     drwxrwx--- 2 root vboxsf 4096 2012-10-21 23:41 sf_vbox_shared     dr-xr-xr-x 6 m    m      2048 2012-09-13 07:19 VBOXADDITIONS_4.2.0_80737     m@m-Linux:/media$ cd sf_Ubuntu/     bash: cd: sf_Ubuntu/: Permission denied     m@m-Linux:/media$ cd sf_vbox_shared/     bash: cd: sf_vbox_shared/: Permission denied      Please note that I am in the group `vboxsf`:               m@m-Linux:~$ id     uid=1000(m) gid=1000(m) groups=4(adm),20(dialout),24(cdrom),46(plugdev),105(lpadmin),119(admin),122(sambashare),1000(m),1001(vboxsf)


title: Cross-compile FreeBSD package as unprivileged user

text: My goal is to cross-compile binaries from an amd64 FreeBSD host to an armv6 RaspberryPi FreeBSD target. The problem I am running into is I am required to be root in order to `make install`, where my command would be `make PREFIX=/home/arm/install_dir NO_PKG_REGISTER=1 install`. Even better would be to use `make package` for easier transfer to the target. The issue is, while I _am_ the sole administrator of the system and _do_ have root capabilities, I would like to ensure I do not compromise the host system with an erroneous `make install` (such as one where I omit `PREFIX=` or `NO_PKG_REGISTER=1`). As a precautionary measure, I do all the building as a separate user `arm` to help prevent me from unwittingly installing arm binaries on my host. In addition, this user has its own copy of the FreeBSD source and ports tree located separate from `/usr/src` and `/usr/ports`. Is there a way for `make` to create a package without having root access? Or can I have confidence that `PREFIX` and `NO_PKG_REGISTER` or `make package` will prevent my host from being polluted with inappropriate binaries? EDIT: According to http://forums.freebsd.org/showpost.php?p=1518&postcount=7, the PREFIX approach is no good...hrm. Did I mean DESTDIR instead?


title: vsftpd on Ubuntu not obeying filesystem permissions

text: I'm trying to set an FTP upload to a web root on Ubuntu 12.04 using vsftp. The user has a local account, username_ftp. I changed their home to their web root in /etc/passwd.               username_ftp:x:1004:1004:Users FTP Account,,,:/var/www/html/username:/bin/false      I am able to log in to the FTP server as this user, but I am unable to write. The permissions on the directory are as follows:               ls -lha /var/www/html/username/     total 8.0K     drwxrwxr-x 2 username_ftp username_ftp 4.0K Jan  9 10:27 .     drwxr-xr-x 5 root       root       4.0K Jan  7 20:38 ..      Any ideas why I am unable to upload files when logged in as this user? I believe I have all the necessary configuration options to allow writing from local users as filesystem permissions should allow.               local_enable=YES     write_enable=YES     chroot_local_users=NO


title: Using NetBeans on ARM Linux?

text: Is it possible to run NetBeans on a ARM CPU with Linux as OS (maybe Debian) ? I want to be clear I don't need to compile for ARM (I will use NetBeans only for PHP coding). So the question is about **Java** and **ARM** and **Debian**. **Background idea:**   I was just thinking to use a cell phone as my first PC (now that they have 4 cores and 2Gb RAM) **Update**   A fast research on Google confirmed me that JRE is avariable for ARM. So because Java is a kind of interpreted language there should be any problem (except performance :) in order to run NetBeans on ARM. Am I right ?


title: wget - How to download recursively and only specific mime-types/extensions (i.e. text only)

text: How to download a full website, but ignoring all binary files. `wget` has this functionality using the `-r` flag but it downloads everything and some websites are just too much for a low-resources machine and it's not of a use for the specific reason I'm downloading the site. Here is the command line i use: `wget -P 20 -r -l 0 http://www.omardo.com/blog` (my own blog)


title: How to change font substitutions in kpdf?

text: I'm trying to read a pdf that was created with MSWord using Garamond and kpdf is substituting 'Deja Vu Sans'. But I've got Palladio! Where can I change it?


title: Any temporary fix for / being remounted as read-only?

text: My disk has a few bad sectors and has already failed the SMART tests. It obviously is going down. It gets remounted to read only and I have to fsck and reboot all over again. Is it safe for me to remove the `errors=remount-ro` part from the fstab file?


title: Undo everything in emacs

text: Is it possible to undo everything in an emacs buffer in just one step? I can do it step by step using `C-x u` but how can I do all steps just with one command?


title: How to enable Fn keys on Samsung 900X in Arch Linux?

text: The only one which works is `Fn`+`F5` (toggle touchpad), presumably because `xf86-input-synaptics` is installed. `Fn`+`F1` prints a literal plus/minus sign ("±"). Installing `samsung-tools` and rebooting did not help. A forum post indicates that it might have worked out of the box before, but not since 2011. Could it be related to UEFI?


title: How do I disable DVD drive auto-probing in SLES 11 SP2?

text: I'm preparing a SLES 11 SP2 VM for use in Azure. One of the steps they require is disabling auto-probing for DVD drives. How do I determine if auto-probing is on? In the SLES documentation (book_sle_deployment.pdf, Ch. 8.1), it says to use YaST to go to Hardware > Hardware Information, but in the VM that I'm using, there is no "Hardware Information."


title: Creating a file counter that includes hidden files

text: As part of a programming assignment I need to create a piece of code that will count the number of files and directories (including hidden) recursively. I'm not allowed to use the commands `-R`, `find` or `du`. I understand that I can use:               listAllFiles() {     local dir=$1     local file     directoryCounter=0     fileCounter=0     hiddenFileCounter=0     hiddenDirectoryCounter=0          for file in "$dir"/*; do         if [[ -d $file ]]; then             listAllFiles "$file"             directoryCounter+=1         else if [[ -f $file ]]             fileCounter+=1        else if [[hidden directory]]             hiddenDirectoryCounter+=1        else if [[hiddenfile]]             hiddenFileCounter+=1         fi     done}      Is there a way for me to include hidden files and directories in this else if statement.


title: Remote desktop (KDE) over SSH reverse tunnel

text: I have a reverse ssh tunnel through a middleman server set up and working. I'm running Kubuntu 12.04 here and on the remote machine. I want to open a remote desktop session. Until now I've been using Team Viewer to log in to the remote desktop. I'd like to achieve similar results without Team Viewer. I understand X over SSH will achieve this. If I need vnc, that's fine too. Here's my issue at the moment. When I am connected to the remote machine via the tunnel I get this error:               $ startkde &     $ $DISPLAY is not set or cannot connect to the X server.      I'm connecting with the -Y SSH option and using keys (not passwords). Everything related to SSH seems to be working fine. The only problem I see is with X. Here's another example:               $ xeyes &     $ Error: Can't open display:       And               $ echo $DISPLAY          $       (returns nothing) These answers seem relevant but I haven't been able to understand them in enough detail to work out a solution in my case: Can I launch a graphical program on another user's desktop as root? http://superuser.com/questions/190801/linux-wmctrl-cannot-open-display-when- session-initiated-via-sshscreen/190878#190878


title: Fedora 19 Eclipse/NetBeans do not recognize Samsung Galaxy Note phone

text: I cannot force Eclipse/Netbeans under Fedora 19 to recognize my Samsung Galaxy Note phone and therefore I cannot deploy app neither run it neither debug it. Can someone explain me what do I have to do so IDEs will recognize my phone? From terminal, if I use `lsusb` command, my phone is visible under USB tree.


title: What's the equivalent to && when writing a bash script?

text: I apologize in advance if this is a duplicate question. I did make an effort to search/check before asking here. I'm comfortable with writing one-liners like this:               foocommand && foocommand2 && foocommand3      The idea being that I only want subsequent commands to run if the previous one was "successful". I'm writing a somewhat lengthy script and this one-liner isn't feasible because it looks like a huge block of confusing code to everyone else. I want to space out the commands and write comments inbetween them in the script. How can I do this and still have the equivalent of && in there?


title: Rebooting fails randomly

text: That is, the following command fails at times:               $ sudo reboot      The last message on terminal, after which the machine gets stuck, requiring a power cycle:               Restarting system.      I tried the following `reboot=` boot parameters (source) without success:   * warm   * cold   * triple   * acpi   * force   * efi As advised on that page, I verified by running the following command to ensure the changes took effect:               $ cat /proc/cmdline      In case it might be helpful, here's a list of kernel modules:               $ lsmod      Module                  Size  Used by     ppp_generic            16680  0      slhc                    4055  1 ppp_generic     ath9k_htc              50685  0      mac80211              231186  1 ath9k_htc     ath9k_common            1720  1 ath9k_htc     ath9k_hw              338115  2 ath9k_htc,ath9k_common     ath                    13793  3 ath9k_htc,ath9k_common,ath9k_hw     cfg80211              158343  3 ath9k_htc,mac80211,ath     compat                 29364  5 ath9k_htc,mac80211,ath9k_common,ath9k_hw,cfg80211      This is on an ARM system, running a custom-built Linux **2.6.35**. Also, there is no X server installed, so no Desktop Environment.


title: Rotating a video (ubuntu 12.04)

text: I have a video, shot on my android phone, which I want to rotate 90 degrees clockwise for computer viewing. Here's what I expect should work:               ffmpeg -i infile.mp4 -vf "transpose=1" -an -vcodec mpeg4 outfile.mp4      except that it gives me:               Error while opening encoder for output stream #0.0 - maybe incorrect      parameters such as bit_rate, rate, width or height      The command `ffmpeg -codec` does produce a long list which includes `DEVSDT mpeg4 MPEG-4 part 2` Then I experimented with               ffmpeg -vf "transpose=1″ -qscale=2 -i infile.mp4 outfile.mp4      but this seems to be an unfinished command, as all I get is a ">" symbol in my terminal. I've also tried:               mencoder -fps 30000/1001 -ofps 30000/1001 -ovc lavc -vf rotate=1 -oac pcm     infile.mp4 -o outfile.mp4      which does work, but gives a very poor output - far worse than the input. I can certainly view the video in the correct orientation:               mplayer -vo xv -vf rotate=1 infile.mp4      but I have as yet not found a way to write the rotated video to a file. I have no experience at all with video coding, so any advice would be most welcome!


title: Install vlc 2.1.X on Linux Mint

text: I am trying to install new version of `vlc` on Linux Mint 16. I have tried tutorials on how to do it and no success. When I am trying to install it with `apt-get install vlc` I get the same version 2.0.8. How to solve this. Example in command line:               Command:              sudo add-apt-repository ppa:videolan/master-daily              Output:              You are about to add the following PPA to your system:          This PPA contains daily builds from the VLC development branch.          More info: https://launchpad.net/~videolan/+archive/ubuntu/master-daily         Press [ENTER] to continue or ctrl-c to cancel adding it              Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.DncfZniK1d --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 801DF724         gpg: requesting key 801DF724 from hkp server keyserver.ubuntu.com         gpg: key 801DF724: "Launchpad Daily Build of master branch" not changed         gpg: Total number processed: 1         gpg:              unchanged: 1          Command:          sudo apt-get update && sudo apt-get install vlc          Output:          Reading package lists... Done     Reading package lists... Done     Building dependency tree            Reading state information... Done     **vlc is already the newest version.**     The following package was automatically installed and is no longer required:       libsvga1     Use 'apt-get autoremove' to remove it.     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.      I have tried this links so far: http://linuxg.net/how-to-install-vlc-2-1-5-rincewind-on-ubuntu-14-04-linux- mint-17-pinguy-os-14-04-and-other-ubuntu-14-04-derivatives/ How to install the latest version of VLC (2.1.2) on Ubuntu 12.04? https://www.youtube.com/watch?v=PnAocwPiU_c


title: Background task finished notification syntax

text: Last night, before abandoning my computer for the evening, I started a bunch of compiler jobs so they'd be ready in the morning, using `make -f alpha.mak &>alpha.out &`. When I came back and hit return, I saw the following output:               [1]   Done                    make -f alpha.mak &>alpha.out     [2]-  Done                    make -f beta.mak &>beta.out     [3]+  Done                    make -f gamma.mak &>gamma.out      My question: What do the `+` and `-` symbols mean in that output? I'm using bash on RedHat 6.


title: How can I see the rate of my wireless card?

text: I am setting manually the bit-rate of my wireless card ! > sudo iwconfig wlan0 rate 54M Where can I see if it is applied, because the command does not give any feedback !!!


title: SuSE : ZYPP repositories

text: I'm currently using SuSE Enterprise Linux 10.3 , may I know where to find a list of valid repositories. I'm trying to upgrade the glibc in it.. I read it is not recommended.


title: Bash script in ( set -x ) mode does not display what "cat" command does. ( contents of it )

text: in this bash script.. it simply shows..                   +cat      as it runs.               #!/bin/bash     set -x     cat > /test << "EOF"     a     b     c     d     EOF      but i rather show everything that it does . including the               a     b     c     d      that it adds to a file.


title: Hidden directory in samba share

text: I'm using freenas and have a samba share that I'm accessing from a windows machine. When I browse to the share I can view all directories except one ("ProblemDirectory" below). I can navigate to this directory directly, but it only shows up in the folder list if I uncheck "hide protected operating system files" in Windows explorer. I don't understand what is different about this one directory. Permissions all look the same:               drwxrwxrwx    8 root  wheel          512 Sep 11 16:37 .     drwxrwxrwx    4 root  wheel          512 Apr  6  2010 ..     drwxrwxrwx    2 ftp   wheel         1024 Sep 27  2010 Directory1     drwxrwxrwx   12 ftp   wheel          512 Apr 18  2010 ProblemDirectory     drwxrwxrwx  827 root  wheel        19968 Aug 14  2010 Directory3      How can I "unhide" this directory?


title: Merging files by rows

text: Is it possible to copy the whole rows of `File1` in a new `File3` following the instruction given by `File2` by using a simple bash script using `sed` or `awk`?               File1: /*two or more columns*/     AC    456324     DC    689712     GH    123677     KL    236587          File2: /*one column*/     AC     DC          File3:      AC    456324     DC    689712      I'm actually performing this using Python dictionaries and I wondered if you knew a simple way out.


title: Running unsigned javaws code

text: For a KVM remote console I need to be able to run a `jnlp` file. When I run it I get:               net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application.      at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:797)     at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:555)     at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908)     Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.     at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:319)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:239)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:381)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:337)     at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:789)     ... 2 more      I understand why you do not want your browser to run arbitrary unsigned code. But in this situation I do not have a chance to neither change nor sign the code, as it comes from the KVM device.   * Can I tell Java that this one applet is OK to run unsigned?      * If not: Can I tell Java running all applets from that domain are OK to run unsigned?        * If not: Can I tell Java running all applets are OK to run unsigned?   * Are there better options, given that I cannot change the code? I am currently using Linux Mint and Chrome.


title: Repo source for firmware-linux-nonfree?

text: Which repository source do I need to add to my sources.list to access the package firmware-linux-nonfree? I am using Deb 6 testing 32 bit.


title: Help installing USB wifi drivers in Debian Wheezy

text: The Leoxsys Nano adapter that I bought recently does not work in my Debian wheezy, but works flawlessly in my Ubuntu. I tried installing using the `install.sh` script that came with the drivers, but still no luck. This is the output of `install.sh` (the timestamp errors are repeated for various different files. I have removed some of them because the posts was too long, you can see the entire output here:               rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/rtl8188eu_xmit.c     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/rtl8188eu_xmit.c: time stamp 2012-11-16 13:06:39 is 280134634.419668702 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_halinit.c     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_halinit.c: time stamp 2012-11-16 13:06:39 is 280134634.417253308 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_ops_linux.c     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_ops_linux.c: time stamp 2012-11-16 13:06:39 is 280134634.416732716 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/ifcfg-wlan0     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb: time stamp 2012-11-16 13:06:39 is 280134634.41663481 s in the future     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e: time stamp 2012-11-16 13:06:37 is 280134632.416591435 s in the future     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal: time stamp 2012-11-16 13:06:34 is 280134629.416553349 s in the future     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/ifcfg-wlan0: time stamp 2012-11-16 13:06:37 is 280134632.416436593 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/autoconf.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/autoconf.h: time stamp 2012-11-16 13:06:39 is 280134634.416238385 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/basic_types.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/basic_types.h: time stamp 2012-11-16 13:06:38 is 280134633.416090583 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/big_endian.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/big_endian.h: time stamp 2012-11-16 13:06:38 is 280134633.415909986 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/generic.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/generic.h: time stamp 2012-11-16 13:06:38 is 280134633.415770465 s in the future          [...]          rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/rtw_xmit.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/rtw_xmit.h: time stamp 2012-11-16 13:06:38 is 280134633.360691402 s in the future     Please select card type(1/2):     1) RTL8188eus     2) RTL8189es     #? 1     You have selected RTL8188eus     rtw_version.h has existed!     Authentication requested [root] for make clean:     rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~     rm -fr .tmp_versions     rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order     cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd hal/rtl8188e/usb ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd hal/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd hal/OUTSRC/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko      cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko      cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     Authentication requested [root] for make driver:     make ARCH=i386 CROSS_COMPILE= -C /lib/modules/3.2.0-4-686-pae/build M=/home/vivek/Linux/driver/rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116  modules     make: *** /lib/modules/3.2.0-4-686-pae/build: No such file or directory.  Stop.     make: *** [modules] Error 2     ##################################################     Compile make driver error: 2     Please check error Mesg     ##################################################     root@debian:/home/vivek/Linux#


title: The difference between deb versus deb-src in sources.list

text: I don't understand the difference between these two lines in my sources.list, please explain: `deb http://mirror.optus.net/debian/ testing main contrib non-free` versus `deb-src http://mirror.optus.net/debian/ testing main contrib non-free` System: Debian 6 testing, 32 bit.


title: Point folder on main HDD to newly mounted 2nd HDD

text: What is the best way to point a folder in one of my websites directory to a folder in a second HDD I just had installed? I see things about fstab and symlink but am lost at what is the best way to do it. My main HDD (sda) has almost filled up so I would like to move the uploads folder of one of my sites, which contains a few hundred GB of files, to the 2nd HDD (sdb). I want this folder to still be read and written to the same way it always has. Any ideas? Thanx


title: Easy way to paste command line output to paste bin services?

text: Are there any command line tools on Linux that allow you to post output from commands or text files directly to a sharing service such as pastebin.com?


title: install opencv-2.4-9 on centos 6.5 with cuda 5.5 support

text: I can't seem to install opencv 2.4.9 on centos 6.5 with cuda 5.5 support. This is my `cmake` output:               [root@cadejos-0 opencv]# cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/opt/opencv -D WITH_CUDA=ON /opt/opencv-2.4.9/opencv/         -- Detected version of GNU GCC: 44 (404)         -- Looking for linux/videodev.h         -- Looking for linux/videodev.h - found         -- Looking for linux/videodev2.h         -- Looking for linux/videodev2.h - found         -- Looking for sys/videoio.h         -- Looking for sys/videoio.h - not found         -- Looking for libavformat/avformat.h         -- Looking for libavformat/avformat.h - found         -- Looking for ffmpeg/avformat.h         -- Looking for ffmpeg/avformat.h - not found         Traceback (most recent call last):           File "<string>", line 1, in <module>         ImportError: No module named numpy.distutils         -- Found apache ant 1.7.1: /usr/bin/ant         --          -- General configuration for OpenCV 2.4.8.2 =====================================         --   Version control:               2.4.8.2-dirty         --          --   Platform:         --     Host:                        Linux 2.6.32-358.18.1.el6.x86_64 x86_64         --     CMake:                       2.6.4         --     CMake generator:             Unix Makefiles         --     CMake build tool:            /usr/bin/gmake         --     Configuration:               RELEASE         --          --   C/C++:         --     Built as dynamic libs?:      YES         --     C++ Compiler:                /usr/bin/c++  (ver 4.4.7)         --     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG         --     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG         --     C Compiler:                  /usr/bin/gcc         --     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG         --     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG         --     Linker flags (Release):         --     Linker flags (Debug):         --     Precompiled headers:         YES         --          --   OpenCV modules:         --     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab         --     Disabled:                    world         --     Disabled by dependency:      -         --     Unavailable:                 androidcamera dynamicuda java python         --          --   GUI:          --     QT:                          NO         --     GTK+ 2.x:                    YES (ver 2.20.1)         --     GThread :                    YES (ver 2.26.1)         --     GtkGlExt:                    NO         --     OpenGL support:              NO         --          --   Media I/O:          --     ZLib:                        /usr/lib64/libz.so (ver 1.2.3)         --     JPEG:                        /usr/lib64/libjpeg.so (ver )         --     PNG:                         /usr/lib64/libpng.so (ver 1.2.49)         --     TIFF:                        /usr/lib64/libtiff.so (ver 42 - 3.9.4)         --     JPEG 2000:                   /usr/lib64/libjasper.so (ver 1.900.1)         --     OpenEXR:                     build (ver 1.7.1)         --          --   Video I/O:         --     DC1394 1.x:                  NO         --     DC1394 2.x:                  YES (ver 2.1.2)         --     FFMPEG:                      YES         --       codec:                     YES (ver 52.72.2)         --       format:                    YES (ver 52.64.2)         --       util:                      YES (ver 50.15.1)         --       swscale:                   YES (ver 0.11.0)         --       gentoo-style:              YES         --     GStreamer:                            --       base:                      YES (ver 0.10.29)         --       app:                       YES (ver 0.10.29)         --       video:                     YES (ver 0.10.29)         --     OpenNI:                      NO         --     OpenNI PrimeSensor Modules:  NO         --     PvAPI:                       NO         --     GigEVisionSDK:               NO         --     UniCap:                      NO         --     UniCap ucil:                 NO         --     V4L/V4L2:                    Using libv4l (ver 0.6.3)         --     XIMEA:                       NO         --     Xine:                        NO         --          --   Other third-party libraries:         --     Use IPP:                     NO         --     Use Eigen:                   NO         --     Use TBB:                     NO         --     Use OpenMP:                  NO         --     Use GCD                      NO         --     Use Concurrency              NO         --     Use C=:                      NO         --     Use Cuda:                    NO         --     Use OpenCL:                  YES         --          --   OpenCL:         --     Version:                     dynamic         --     Include path:                /opt/opencv-2.4.9/opencv/3rdparty/include/opencl/1.2         --     Use AMD FFT:                 NO         --     Use AMD BLAS:                NO         --          --   Python:         --     Interpreter:                 /usr/bin/python2.6 (ver 2.6.6)         --          --   Java:         --     ant:                         /usr/bin/ant (ver 1.7.1)         --     JNI:                         /usr/lib/jvm/java/include /usr/lib/jvm/java/include/linux /usr/lib/jvm/java/include         --     Java tests:                  NO         --          --   Documentation:         --     Build Documentation:         NO         --     Sphinx:                      NO         --     PdfLaTeX compiler:           /usr/bin/pdflatex         --          --   Tests and samples:         --     Tests:                       YES         --     Performance tests:           YES         --     C/C++ Examples:              NO         --          --   Install path:                  /opt/opencv         --          --   cvconfig.h is in:              /opt/opencv-2.4.9/opencv         -- -----------------------------------------------------------------         --          WARNINGThe source directory is the same as binary directory. "make clean" may damage the source tree         -- Configuring done         -- Generating done         -- Build files have been written to: /opt/opencv-2.4.9/opencv      I have cuda working:               [root@cadejos-0 opencv]# /usr/local/cuda-5.5/NVIDIA_CUDA-5.5_Samples/1_Utilities/deviceQuery/deviceQuery     /usr/local/cuda-5.5/NVIDIA_CUDA-5.5_Samples/1_Utilities/deviceQuery/deviceQuery Starting...           CUDA Device Query (Runtime API) version (CUDART static linking)          Detected 2 CUDA Capable device(s)          Device 0: "Tesla M1060"       CUDA Driver Version / Runtime Version          5.5 / 5.5       CUDA Capability Major/Minor version number:    1.3       Total amount of global memory:                 4096 MBytes (4294770688 bytes)       (30) Multiprocessors, (  8) CUDA Cores/MP:     240 CUDA Cores       GPU Clock rate:                                1296 MHz (1.30 GHz)       Memory Clock rate:                             800 Mhz       Memory Bus Width:                              512-bit       Maximum Texture Dimension Size (x,y,z)         1D=(8192), 2D=(65536, 32768), 3D=(2048, 2048, 2048)       Maximum Layered 1D Texture Size, (num) layers  1D=(8192), 512 layers       Maximum Layered 2D Texture Size, (num) layers  2D=(8192, 8192), 512 layers       Total amount of constant memory:               65536 bytes       Total amount of shared memory per block:       16384 bytes       Total number of registers available per block: 16384       Warp size:                                     32       Maximum number of threads per multiprocessor:  1024       Maximum number of threads per block:           512       Max dimension size of a thread block (x,y,z): (512, 512, 64)       Max dimension size of a grid size    (x,y,z): (65535, 65535, 1)       Maximum memory pitch:                          2147483647 bytes       Texture alignment:                             256 bytes       Concurrent copy and kernel execution:          Yes with 1 copy engine(s)       Run time limit on kernels:                     No       Integrated GPU sharing Host Memory:            No       Support host page-locked memory mapping:       Yes       Alignment requirement for Surfaces:            Yes       Device has ECC support:                        Disabled       Device supports Unified Addressing (UVA):      No       Device PCI Bus ID / PCI location ID:           2 / 0       Compute Mode:          < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >          Device 1: "Tesla M1060"       CUDA Driver Version / Runtime Version          5.5 / 5.5       CUDA Capability Major/Minor version number:    1.3       Total amount of global memory:                 4096 MBytes (4294770688 bytes)       (30) Multiprocessors, (  8) CUDA Cores/MP:     240 CUDA Cores       GPU Clock rate:                                1296 MHz (1.30 GHz)       Memory Clock rate:                             800 Mhz       Memory Bus Width:                              512-bit       Maximum Texture Dimension Size (x,y,z)         1D=(8192), 2D=(65536, 32768), 3D=(2048, 2048, 2048)       Maximum Layered 1D Texture Size, (num) layers  1D=(8192), 512 layers       Maximum Layered 2D Texture Size, (num) layers  2D=(8192, 8192), 512 layers       Total amount of constant memory:               65536 bytes       Total amount of shared memory per block:       16384 bytes       Total number of registers available per block: 16384       Warp size:                                     32       Maximum number of threads per multiprocessor:  1024       Maximum number of threads per block:           512       Max dimension size of a thread block (x,y,z): (512, 512, 64)       Max dimension size of a grid size    (x,y,z): (65535, 65535, 1)       Maximum memory pitch:                          2147483647 bytes       Texture alignment:                             256 bytes       Concurrent copy and kernel execution:          Yes with 1 copy engine(s)       Run time limit on kernels:                     No       Integrated GPU sharing Host Memory:            No       Support host page-locked memory mapping:       Yes       Alignment requirement for Surfaces:            Yes       Device has ECC support:                        Disabled       Device supports Unified Addressing (UVA):      No       Device PCI Bus ID / PCI location ID:           3 / 0       Compute Mode:          < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >          deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 5.5, CUDA Runtime Version = 5.5, NumDevs = 2, Device0 = Tesla M1060, Device1 = Tesla M1060     Result = PASS     [root@cadejos-0 opencv]#      But somehow `cmake` doesn't find them. These are my variables:               [root@cadejos-0 opencv]# export     declare -x CVS_RSH="ssh"     declare -x G_BROKEN_FILENAMES="1"     declare -x HISTCONTROL="ignoredups"     declare -x HISTSIZE="1000"     declare -x HOME="/root"     declare -x HOSTNAME="cadejos-0"     declare -x LANG="en_US.UTF-8"     declare -x LD_LIBRARY_PATH="/usr/local/cuda-5.5/lib64:/usr/local/cuda-5.5/lib:/lib64:/lib:/usr/lib:/usr/lib64:"     declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"     declare -x LOADEDMODULES=""     declare -x LOGNAME="root"     declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:"     declare -x MAIL="/var/spool/mail/root"     declare -x MODULEPATH="/usr/share/Modules/modulefiles:/etc/modulefiles"     declare -x MODULESHOME="/usr/share/Modules"     declare -x OLDPWD="/opt"     declare -x PATH="/usr/local/cuda-5.5/bin:/opt/mothur/:/opt/usearch/:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"     declare -x PWD="/opt/opencv"     declare -x SHELL="/bin/bash"     declare -x SHLVL="1"     declare -x SSH_CLIENT="10.0.0.1 48436 22"     declare -x SSH_CONNECTION="10.0.0.1 48436 10.0.0.10 22"     declare -x SSH_TTY="/dev/pts/0"     declare -x TERM="xterm"     declare -x USER="root"      What am I doing wrong, and how can I solve this problem?


title: Do I need to halt in order to really turn power off?

text: I tried `shutdown -f now`, thinking it will do a full power off sequence. Instead, it ends with > *Checking battery state... and just hangs there. Should I add `-h` switch to fully take power off, or is there some other problem?


title: Card reader doesn't work on Linux

text: The system detect my SD card but I cant mount it. This is the lsblk:               my@my-N61Jq ~ $ lsblk          sdb                          8:16   1  29,3G  0 disk       and the lsu:               my@my-N61Jq ~ $ lsusb     Bus 001 Device 006: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader      Any solution? edit: blkid               my-N61Jq ~ # blkid     /dev/sda1: UUID="8cac68af-e4cf-4751-8137-43ebd72c7aee" TYPE="ext2"      /dev/sda5: UUID="FcpGUy-5H07-e5kx-qM0Z-dUyS-MTju-REjs9M" TYPE="LVM2_member"      /dev/mapper/mint--vg-root: UUID="dacda9a2-8b68-4ced-bd83-5f9e75c0e8fe" TYPE="ext4"      /dev/mapper/mint--vg-swap_1: UUID="d9ba0894-a487-45cd-a8e4-a0b5e41ca147" TYPE="swap"


title: Ubuntu boots immediately

text: After using Wubi for a few weeks, I thought it would be time to do a real install of Ubuntu. I downloaded the iso file from the official website and installed the iso on a usb (with Pen Drive Linux's USB Installer). Next, I boot my PC via the usb and installed ubuntu on a new partition and also created a swap partition. When I restart my PC it immediately boots up with Ubuntu without asking for the choice of Ubuntu/Windows7. The files saved under W7 are still available and also Windows is still on the ssd. In the print screen one can find the current partitions of my ssd. sda1 is the partition where W7 is installed, sda2 is the partitions where W7 saves images and documents, sda3 is the partitions for Ubuntu and sda4 is the swap partition for Ubuntu. I would like to have a choice to boot Ubuntu or W7. The difference with similar questions is that it will boot immediately Ubuntu and not Windows 7. Does anyone know how to solve this? ![Overview of partititions on SSD](http://i.stack.imgur.com/TUlXe.png) When I use the live boot of Ubuntu and then follow the steps described at https://help.ubuntu.com/community/Boot-Repair I get the following (see printscreen). ![boot-repair](http://i.stack.imgur.com/3MXqk.png) ![boot- repair2](http://i.stack.imgur.com/eAfYU.jpg)


title: Including .bash_profile over ssh

text: I am trying to write a script that will:   1. Copy files to a server (I already have a script `copy.sh` that does this task)   2. ssh to that server   3. cd to the directory where the files I just copied are   4. run `make`   5. copy the resulting binary from `make` to another location. My script looks like this:               #!/usr/bin/bash     BUILDSERV=me@server     BUILDDIR=/me/directory          #run my script that copies the files     ./copy.sh          #TARGET is also a var in copy.sh so I make sure it's set properly here     TARGET=root@final_dest:/usr/bin/my_bin          ssh $BUILDSERV "cd $BUILDDIR && make && scp ./my_bin $TARGET"      The issue is that a program I want to run as part of `make` is not in my `PATH`. My `.bash_profile` has a `export PATH=$PATH:/my/bin/` line, but it seems that `bash_profile` is not being read when I ssh in. Is there a way to change my ssh invocation or script in general to make it read my `.bash_profile`?


title: Is there a way to use/recompile libgio-2.0 on machine with libc-2.5?

text: I have a program (JavaFX 2, namely), and one of its binaries (libglass.so) requires `libgio-2.0.so.0`. The problem is, the system, on which I need to run the app, is quite old and mostly out of my control (thus I can't update it). I tired copying `libgio` from my machine there, but only to find that `libgio` requires `GLIBC_2.9` - and target machine only has libc-2.5. Is there a way to work around this behavior?


title: Not able to configure phpmyadmin in Ubuntu 12.04

text: I tried to configure LAMP on Ubuntu 12.04 following this guide (http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on- ubuntu-12.04-lts-lamp). But when I point to `localhost/phpmyadmin/index.php` in the browser, it just downloads the index.php file to my downloads folder. As mentioned in the guide, I made a info.php file and its working properly. How can I fix this error? My `/etc/apache2/apache2.conf` and `/etc/phpmyadmin/apache.conf` are as follows: **apache2.conf**               #     # Based upon the NCSA server configuration files originally by Rob McCool.     #     # This is the main Apache server configuration file.  It contains the     # configuration directives that give the server its instructions.     # See http://httpd.apache.org/docs/2.2/ for detailed information about     # the directives.     #     # Do NOT simply read the instructions in here without understanding     # what they do.  They're here only as hints or reminders.  If you are unsure     # consult the online docs. You have been warned.       #     # The configuration directives are grouped into three basic sections:     #  1. Directives that control the operation of the Apache server process as a     #     whole (the 'global environment').     #  2. Directives that define the parameters of the 'main' or 'default' server,     #     which responds to requests that aren't handled by a virtual host.     #     These directives also provide default values for the settings     #     of all virtual hosts.     #  3. Settings for virtual hosts, which allow Web requests to be sent to     #     different IP addresses or hostnames and have them handled by the     #     same Apache server process.     #     # Configuration and logfile names: If the filenames you specify for many     # of the server's control files begin with "/" (or "drive:/" for Win32), the     # server will use that explicit path.  If the filenames do *not* begin     # with "/", the value of ServerRoot is prepended -- so "foo.log"     # with ServerRoot set to "/etc/apache2" will be interpreted by the     # server as "/etc/apache2/foo.log".     #          ### Section 1: Global Environment     #     # The directives in this section affect the overall operation of Apache,     # such as the number of concurrent requests it can handle or where it     # can find its configuration files.     #          #     # ServerRoot: The top of the directory tree under which the server's     # configuration, error, and log files are kept.     #     # NOTE!  If you intend to place this on an NFS (or otherwise network)     # mounted filesystem then please read the LockFile documentation (available     # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);     # you will save yourself a lot of trouble.     #     # Do NOT add a slash at the end of the directory path.     #     #ServerRoot "/etc/apache2"          #     # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.     #     LockFile ${APACHE_LOCK_DIR}/accept.lock          #     # PidFile: The file in which the server should record its process     # identification number when it starts.     # This needs to be set in /etc/apache2/envvars     #     PidFile ${APACHE_PID_FILE}          #     # Timeout: The number of seconds before receives and sends time out.     #     Timeout 300          #     # KeepAlive: Whether or not to allow persistent connections (more than     # one request per connection). Set to "Off" to deactivate.     #     KeepAlive On          #     # MaxKeepAliveRequests: The maximum number of requests to allow     # during a persistent connection. Set to 0 to allow an unlimited amount.     # We recommend you leave this number high, for maximum performance.     #     MaxKeepAliveRequests 100          #     # KeepAliveTimeout: Number of seconds to wait for the next request from the     # same client on the same connection.     #     KeepAliveTimeout 5          ##     ## Server-Pool Size Regulation (MPM specific)     ##           # prefork MPM     # StartServers: number of server processes to start     # MinSpareServers: minimum number of server processes which are kept spare     # MaxSpareServers: maximum number of server processes which are kept spare     # MaxClients: maximum number of server processes allowed to start     # MaxRequestsPerChild: maximum number of requests a server process serves     <IfModule mpm_prefork_module>         StartServers          5         MinSpareServers       5         MaxSpareServers      10         MaxClients          150         MaxRequestsPerChild   0     </IfModule>          # worker MPM     # StartServers: initial number of server processes to start     # MinSpareThreads: minimum number of worker threads which are kept spare     # MaxSpareThreads: maximum number of worker threads which are kept spare     # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a     #              graceful restart. ThreadLimit can only be changed by stopping     #              and starting Apache.     # ThreadsPerChild: constant number of worker threads in each server process     # MaxClients: maximum number of simultaneous client connections     # MaxRequestsPerChild: maximum number of requests a server process serves     <IfModule mpm_worker_module>         StartServers          2         MinSpareThreads      25         MaxSpareThreads      75          ThreadLimit          64         ThreadsPerChild      25         MaxClients          150         MaxRequestsPerChild   0     </IfModule>          # event MPM     # StartServers: initial number of server processes to start     # MinSpareThreads: minimum number of worker threads which are kept spare     # MaxSpareThreads: maximum number of worker threads which are kept spare     # ThreadsPerChild: constant number of worker threads in each server process     # MaxClients: maximum number of simultaneous client connections     # MaxRequestsPerChild: maximum number of requests a server process serves     <IfModule mpm_event_module>         StartServers          2         MinSpareThreads      25         MaxSpareThreads      75          ThreadLimit          64         ThreadsPerChild      25         MaxClients          150         MaxRequestsPerChild   0     </IfModule>          # These need to be set in /etc/apache2/envvars     User ${APACHE_RUN_USER}     Group ${APACHE_RUN_GROUP}          #     # AccessFileName: The name of the file to look for in each directory     # for additional configuration directives.  See also the AllowOverride     # directive.     #          AccessFileName .htaccess          #     # The following lines prevent .htaccess and .htpasswd files from being      # viewed by Web clients.      #     <Files ~ "^\.ht">         Order allow,deny         Deny from all         Satisfy all     </Files>          #     # DefaultType is the default MIME type the server will use for a document     # if it cannot otherwise determine one, such as from filename extensions.     # If your server contains mostly text or HTML documents, "text/plain" is     # a good value.  If most of your content is binary, such as applications     # or images, you may want to use "application/octet-stream" instead to     # keep browsers from trying to display binary files as though they are     # text.     #     # It is also possible to omit any default MIME type and let the     # client's browser guess an appropriate action instead. Typically the     # browser will decide based on the file's extension then. In cases     # where no good assumption can be made, letting the default MIME type     # unset is suggested  instead of forcing the browser to accept     # incorrect  metadata.     #     DefaultType None               #     # HostnameLookups: Log the names of clients or just their IP addresses     # e.g., www.apache.org (on) or 204.62.129.132 (off).     # The default is off because it'd be overall better for the net if people     # had to knowingly turn this feature on, since enabling it means that     # each client request will result in AT LEAST one lookup request to the     # nameserver.     #     HostnameLookups Off          # ErrorLog: The location of the error log file.     # If you do not specify an ErrorLog directive within a <VirtualHost>     # container, error messages relating to that virtual host will be     # logged here.  If you *do* define an error logfile for a <VirtualHost>     # container, that host's errors will be logged there and not here.     #     ErrorLog ${APACHE_LOG_DIR}/error.log          #     # LogLevel: Control the number of messages logged to the error_log.     # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     #     LogLevel warn          # Include module configuration:     Include mods-enabled/*.load     Include mods-enabled/*.conf          # Include all the user configurations:     Include httpd.conf          # Include ports listing     Include ports.conf     #Include /etc/phphmyadmin/apache.conf     #     # The following directives define some format nicknames for use with     # a CustomLog directive (see below).     # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i     #     LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined     LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined     LogFormat "%h %l %u %t \"%r\" %>s %O" common     LogFormat "%{Referer}i -> %U" referer     LogFormat "%{User-agent}i" agent          # Include of directories ignores editors' and dpkg's backup files,     # see README.Debian for details.          # Include generic snippets of statements     #Include conf.d/     Include /etc/phpmyadmin/apache.conf     # Include the virtual host configurations:     Include sites-enabled/      **apache.conf**               # phpMyAdmin default Apache configuration          Alias /phpmyadmin /usr/share/phpmyadmin          <Directory /usr/share/phpmyadmin>         Options FollowSymLinks         DirectoryIndex index.php              <IfModule mod_php5.c>             AddType application/x-httpd-php .php                  php_flag magic_quotes_gpc Off             php_flag track_vars On             php_flag register_globals Off             php_admin_flag allow_url_fopen Off             php_value include_path .             php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp             php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/         </IfModule>          </Directory>          # Authorize for setup     <Directory /usr/share/phpmyadmin/setup>         <IfModule mod_authn_file.c>         AuthType Basic         AuthName "phpMyAdmin Setup"         AuthUserFile /etc/phpmyadmin/htpasswd.setup         </IfModule>         Require valid-user     </Directory>          # Disallow web access to directories that don't need it     <Directory /usr/share/phpmyadmin/libraries>         Order Deny,Allow         Deny from All     </Directory>     <Directory /usr/share/phpmyadmin/setup/lib>         Order Deny,Allow         Deny from All     </Directory>


title: Best rolling release distribution for MacBook Pro

text: I got a macbook pro 7.1 wich is running OSX, i'm looking for the most compatible distribution to dual boot. Here's my criteria :   * I don't want to reinstall my system every 6 month, so I'll prefer a rolling release   * I need fresh multimedia packets.   * I would like to have full functionality of my touchpad   * Sleep when lid close, as the default with OS X I know there is plenty distribution around, i know this kind of question can turn into a troll really fast, so please just explain how compatible it is, what's the feature included and why you prefer one or another! After a lot of investigations all around i decided to use **Arch Linux**.


title: ungrabbing keys

text: I have somehow managed to get my keyboard only to work and be able to select with the mouse cursor, only when the `Shift` and `Control` keys are held. How can I undo this? I have tried System -> Preferences -> Keyboard but nothing appears there to resolve this. * * * **Edit** : I can only enter text or select anything (even opening a new tab in web browser), only if the shift and control keys are held. once the selection is "active" then I can type normally, until the next time I need to type, etc.. Below as recommended:               KeyRelease event, serial 36, synthetic NO, window 0x5a00001,     root 0x1ad, subw 0x0, time 2238759, (-435,502), root:(312,552),     state 0x11, keycode 38 (keysym 0x41, A), same_screen YES,     XLookupString gives 1 bytes: (41) "A"     XFilterEvent returns: False      * * * **Edit** : Pressing (and holding) the `Alt` or `Windows` key has a similar action as to holding the `Shift` and `Control` keys (`Shift` and `Control` are held simultaneously).               shift       Shift_L (0x32),  Shift_R (0x3e)     lock        Caps_Lock (0x42)     control     Control_L (0x25),  Control_R (0x69)     mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)     mod2        Num_Lock (0x4d)     mod3           mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)     mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)


title: Can I make pacman aware of packages installed manually?

text: Due to my setup I cannot make use of pacman to actually install packages, however if I install a package from the Arch repositories manually by downloading and extracting it, eg:               wget http://mirrors.kernel.org/archlinux/core/os/x86_64/curl-7.26.0-1-x86_64.pkg.tar.xz     tar -Jxvf curl-7.26.0-1-x86_64.pkg.tar.xz -C /      ...is there a way to make pacman aware of it so that it can control future updates or un-installation?


title: Why is cp --reflink=auto not the default behaviour?

text: Why is `cp --reflink=auto` not the default behaviour? Could it cause any harm to enable it? Is it possible to enable it at compile time, so it is used all across the system, not just in interactive shells?


title: Random file accesses to server's ip

text: [Sat Jun 22 13:07:06 2013] [error] [client 208.80.194.26] File does not exist: /[removed]/2370604C4AB20069B35E9844BE72140307F553D33124FF9D0C91F136B307F81C1A998310533A1A8526DF06BBE8D5FEB5A0375FE33BFFDE5B237E4C8B95606331082E5E60D709B5DD318F4BDE3374      I'm seeing file requests like this every now and again in Apache's log, always with randomized filenames, and notice the odd hack attempt that's blocked by my security. Should I just block IPs myself, or is there an easier automated way? Cronjob of some sort perhaps? Or is there something else I should be doing? I can't seem to find anything about this through Google.


title: Steam Launch Segfault on Arch (steam.sh line 704)

text: Launching Steam on Arch Linux crashes with the error:               /home/matthew/.local/share/Steam/steam.sh: line 704: 4013 Segmentation fault (core dumped)      $STEAM_DEBUGGER "$STEAMROOT/$/PLATFORM$/STEAMEXE" "$@"      Started around when I switched from `xf86-video-ati` to `catalyst` and `lib32-catalyst-utils`


title: Scan and get the packages installed on Ubuntu along with the version

text: Is there any Python code to get the list of packages installed on Ubuntu along with the version of the package? I have seen Python code at Generating list of manually installed packages and querying individual packages. But that doesn't have the listing of version ID. Can anyone know how to get the version of the installed packages?


title: Short talk on Linux

text: I am a second year undergraduate computer science student and I have to give a 1 hour presentation (interactive session) about Linux in general and Ubuntu in specific for first year students of my department. The audience is unlikely to be aware of power of Linux and it will be more or less an alien concept for them. I myself started using Linux an year ago when one of our seniors gave a similar presentation about it to us and so I want it to be a good and educating experience for them as well. The focus will be on Linux and not Ubuntu itself. The following is my plan of the presentation. Please point out if I may have missed out anything important or worth mentioning. Plan PS: It might not be the right place to ask such a question but I am myself not an expert in the field and need guidance from others to make it a presentation that will encourage them to use Linux. I shifted the question from askubuntu.com to here on advice of a user.


title: PHP file recursive change array key on find

text: I used PHP array   > `$lang['module']['1'] = 'Title';`   >  `$lang['module']['2'] = 'Title2';`   >  `$lang['value'] = 'text123';`   > how i can use replace in terminal Key Value to CASE UPPER ? > `$lang['VALUE']`   >  `$lang['MODULE']['1']`   >  `$lang['MODULE']['2']`   >  etc `..` recursion `find /var/www/site.net/blog/ -iname '*.php' | xargs grep -E '\$lang\\[' -sl` finded only $lang[ ... Please help me.


title: How to find out common elements between two files?

text: For an example, I have 2 files having following info: File #1:               12     13     14     15      File #2:               12 1     13 2     14 2     15 6     16 7     17 8      Output File:               1     2     2     6      In the output file, I want only the second column values of file #2 which has matched with the first column of file #1. Is there any utility function for that in Linux? I'm new in shell scripting, can anyone help me out?


title: "internet connection checker one-liner"

text: With this I can check, that there is "internet connection". if there is no "internet connection" (succesfull pings to this 2 places), then it waits 600 sec, then it runs along:               ping -W 1 -c 4 www.google.com >& /dev/null && ping -W 1 -c 4 www.yahoo.com >& /dev/null || sleep 600      But: how could I rewrite this one line, so that it loops until there is internet connection?


title: Viewing a screencast encoded with camtasia

text: I have downloaded the screencast on this page, http://jaderholm.com/screencasts/org-mode/. I can watch in firefox but the viewer has limited controls. So I would rather watch it on a regular video application. The thing is I've tried everything and I get sound in all and video in none. "mediainfo" says it is using the "Shockwave" codec. It is obvious the video was made with Camstudio. I seem to remember that Camstudio uses it's own proprietary codec for recording. Is there an actual Shockwave codec? How can I view a video encoded with it on Linux? How an I view a video using the Camtasia codec on Linux. * * * PS. Technically I am not supposed to link directly to that video since the URL is subject to change. I am supposed to link to: http://jaderholm.com/screencasts.html


title: SSH slow at starting session

text: Starting an Interactive shell over SSH is slow to one of my servers. Everything leading up to it including negotiating encryption is fast, but then it hangs for 45 seconds. After that, it finishes and I have a shell. How do I identify what it's hanging on? I tried clearing the environment and disabling all forwarding in case that was slowing it down but it didn't help. Here's my test command:               env -i ssh -x -a -vvv server      and here's the output from SSH:               debug1: channel 0: new [client-session]     debug3: ssh_session2_open: channel_new: 0     debug2: channel 0: send open     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.     *(hangs for 45 seconds here)*     debug3: Wrote 128 bytes for a total of 3191     debug2: callback start     debug2: client_session2_setup: id 0     debug2: channel 0: request pty-req confirm 1     debug1: Sending environment.


title: Firefox and Thunderbird cannot resolve host names - anything else can

text: One night my firefox just started showing "Server not found" for all websites (i.e. "Firefox can't find the server at www.mozilla.com."). I noticed that it can find websites if make an entry in the /etc/hosts-file. I have already started firefox in safe mode, the problem persisted. I removed my ~/.mozilla folder entirely, didn't help either. At this point I noticed that thunderbird was having the same problem and assumed it must be a shared library. I'm running gentoo linux, where the packages are distributes as source code, if available, so I started rebuilding each and every package on my system ("emerge -av --emptytree world"), still the same error. I then tried installing the source-package of firefox (I was using the binary package "firefox-bin"), but that still didn't help. Does anyone have an idea what I might do next? **EDIT** (Thx, Gilles) Installed Konqueror and verified that it doesn't have this issue (running fluxbox.) I have manually set the proxy settings of firefox to "No Proxy", no change. I have disabled ipv6 in `about:config`, still the same.


title: GRML will not boot automatically

text: I install GRML on my USB disk with the `grml2usb` tool. But when I boot from the USB, it first boots to a blank screen with `boot:` text on it. I must type the boot options myself to boot the system. I want it to boot to the system automatically.   How can I do it? I am new to GRML, and I checked their wiki, but did not find the solution.


title: How can I check, if my cronjob is runnning on my server via PHP?

text: I would like to give out a warning If cron is not running or if a certain cronjob is not set in crontab on my server. Is this possible to check with php?


title: Insert newlines with vim

text: How to insert newlines in vim? For example in a file containing               test-classes; classes; xmlunit-1.3.jar      I am looking for the vim equivalent of sed command               sed -i 's/; /\n/g' classpath      to obtain               test-classes     classes     xmlunit-1.3.jar


title: Wrapping long cells in a tsv to keep them in same column

text: Formatting a TSV with long cells with `column` makes its readability very low. It simply breaks lines like this:               $ python3 -c 'for i in (1,2,3): print(((str(i)*50)+"\t")*3)' | column -s $'\t' -t          11111111111111111111111111111111111111111111111111  11111111111111111111111111111111111111111111111111  1111111111111111111     1111111111111111111111111111111     22222222222222222222222222222222222222222222222222  22222222222222222222222222222222222222222222222222  2222222222222222222     2222222222222222222222222222222     33333333333333333333333333333333333333333333333333  33333333333333333333333333333333333333333333333333  3333333333333333333     3333333333333333333333333333333      My question is, how do I format tsv (most likely csv as well) files, to make sure that when a _maximum cell length_ (that can be set with a parameter) is reached, it's not just a line break, but data will start in a new line with the same indentation. For above data, the result could be something like:               1111111111 1111111111 1111111111      1111111111 1111111111 1111111111      1111111111 1111111111 1111111111      1111111111 1111111111 1111111111      1111111111 1111111111 1111111111           2222222222 2222222222 2222222222      2222222222 2222222222 2222222222      2222222222 2222222222 2222222222      2222222222 2222222222 2222222222      2222222222 2222222222 2222222222           3333333333 3333333333 3333333333      3333333333 3333333333 3333333333      3333333333 3333333333 3333333333      3333333333 3333333333 3333333333      3333333333 3333333333 3333333333


title: Suppress desktop notifications in fullscreen VLC

text: How to prevent desktop notifications from showing up when VLC is in fullscreen mode? Some of my scripts display desktop notifications using `notify-send`. The best solution would be to configure that `critical` notifications still show up and `low` prioritised notifications are suppressed. This is how I create the notifications:               notify-send --urgency=low      'Foo' 'Bar'     notify-send --urgency=critical 'Foo' 'Bar'      **EDIT:** I am using Gnome version 3.4.2 and awesome WM v3.4.14 on Debian GNU/Linux sid. It does not make a difference if the Gnome `notification- daemon` is started or if awesome is in charge of displaying the notifications.


title: Ubuntu 12.10 Fan overspeeding

text: I have installed Ubuntu 12.10 leaving Win 7 licensed version. But again as usual I need to fix so many issues. This time fan is generating lots of noise. It looks it is running at max speed. My Laptop is becoming hotter than it usually was in the same period on Window. I was looking for the solution and found the below:               sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq </sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq      But I read that `cpufreq` is for cpu frequency. What to do now? I have already executed the command. What is the solution for the problem of fan sound in Ubuntu 12.10 ? In win 7, this is not the problem. My Laptop is Dell Studio 1555. Update: I have noticed that even after using Ubuntu for an hr or so due to which my Laptop became hot, when I switch to Win 7, fan sound has reduced to half. The sound in Win 7 felt normal.


title: How to do a "if not" in Bash without a test?

text: I would like to use the return value of a bash function in a 'if not' statement. The following is an example script:               #!/bin/bash          function myfunction () {      if [ $1 = "one" ]; then       return 1      elif [ $1 = "two" ]; then       return 2      else       return 0      fi     }          if myfunction "two"; then      # just using echo as an example here      echo yep $?     else      # just using echo as an example here      echo nope $?     fi      Is there a way to modify the part 'if myfunction "two"' in a way that this script echoes 'yep 2'? I can only figure out this ugly way. How can can I solve this a better way?


title: Crontab job start +1 min after @reboot

text: Need a script executed at each reboot in +1 minute. I placed a record `@reboot` but it is too early for my script. How to execute it sometime after reboot?


title: DEL accel reseted in every boot. (Debian Testing, Nautilus)

text: Yesterday I did an install of Debian Testing without desktop environment. After installation finished, I installed gnome-shell and gnome-core. I'm facing a problem with Nautilus and DEL for move to trash files. Now the default shortcut is CTRL+DEL but it can be changed (I have done it in all my distros) with dconf-editor in org->gnome->desktop->interface enabling the "can_change_accels" and then going to a Nautilus windows, select a file, go to edit menu, and hit two times DEL in the move to trash action. After this, disable again can_change_accels. The problem I'm having now is that every time I reboot, the configuration is set back to CTRL+DEL. I've never had such problem, not even when I used Debian Testing choosing desktop environment in the installation menu.


title: What happens when Redhat says: "no more RHEL clones!"

text: I mean that ex.: CentOS, and Scientific-Linux are the "exact copies" of Redhat Linux. If Redhat would say one day: "I don't allow Redhat clones from now on, I will modify the licence", then what would happen to all the Redhat based distros? I mean the ones that are really just "clones" of Redhat? How does this "Redhat clone" thing work? Redhat makes Redhat 6 downloadable freely? And then some people compile the Redhat 6 sources (with a few modifications), and presto, the "Redhat clone" is ready? Or how do they get the source codes of Redhat 6? There were precedents like: https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Rebuilds "Unusually, Red Hat took steps to obfuscate their changes to the Linux kernel for 6.0 by not publicly providing the patch files for their changes in the source tarball, and only releasing the finished product in source form." So the **Q** : If Redhat would change the licence of RHEL, all the Redhat clone distros would permanently die? (just in theory, hopefully something like this would never occur)


title: imagemagick globbing multiple extensions

text: I have a folder containing photos coming from different cameras. I use Imagemagick to convert to resized **and renamed** photos in another folder. Something like this:               convert "*.jpg" \         -resize 640 -scene 1 \         "${folder}/${prefix}_%02d.jpg"      The problem is some cameras save photos with "JPG" extension, others with "jpg". To solve this I used to rename extensions with this:               rename .JPG .jpg *.JPG 2> /dev/null      **This won't work on filesystems where I have only read access. How do I glob in IM both *.jpg and *.JPG files?** Thanks for your help


title: Moving average on a log file with awk or other unix utilities?

text: Scenario:   I have a log file that has a few number of entry "classes", like this:               R0 dx=0.00500 rb=0.00000 sn=1 3145.88 2.59 0.08 se=21315 id=16190       R0 dx=0.00300 rb=-1.00000 sn=1 3150.40 2.38 0.05 se=21316 id=16191       R1 dx=-0.00500 rb=1.00000 sn=-1 3155.14 2.54 0.05 se=21317 id=16192       R1 dx=-0.02000 rb=-1.00000 sn=-1 3157.73 2.48 0.10 se=21318 id=16193       R0 dx=-0.02000 rb=0.00000 sn=-1 3160.59 2.74 0.08 se=21319 id=16194        R1 dx=0.00500 rb=1.00000 sn=1 3165.18 2.43 0.10 se=21320 id=16195          R0 dx=0.00100 rb=-1.00000 sn=1 3167.84 2.53 0.05 se=21321 id=16196         R3 dx=0.00100 rb=1.00000 sn=1 3170.11 0.10 0.10 se=21322 id=16197           I am monitoring this logfile with a `tail -F` (Is there a way to make tail -F beep?) **My question is:** Is there a way to calculate the sliding (moving) ratio of "number of R1 lines to number of R0 lines" to give you an example? In addition to printing this ratio I need to be able to pass it to some other tool like gnuplot to plot it (although this is might be a bit of a stretch). Obviously this is a rather trivial thing to do in Python or MATLAB or Octave but I am very eager to learn to do it in the shell, I think the tricky part is to pass the values to a plotting utility to update a plot.


title: Concept of memory mapping in Unix like systems

text: Can some one explain in an easy to understand way the concept of memory mappings (achieved by mmap() system call) in Unix like systems ? When do we require this functionality ?


title: X11 Path Issues and Confusion for Installed Packages

text: I am using GMT (generic mapping tools) and SAC (Seismic Analysis Code), and each use X11 (or XQuartz on 10.9.4 Mavericks) to display graphics. When I want to display postscript using ghostview, I get the error: `$ gv map.ps gv: Unable to open the display.` When I want to display a basic plot in SAC, I get this error: `SAC> Funcgen Impulse SAC> Plot X11 Screen does not exist Segmentation fault: 11` The problem must be with setting up the environment, so that -bash knows to open XQuartz. My path is: `$ echo $PATH /sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/sac/bin` and in my ~/.bashrc file, I have written: `test -r /sw/bin/init.sh && . /sw/bin/init.sh . /sw/bin/init.sh export DISPLAY=:0 export SACHOME=/usr/local/sac . ${SACHOME}/bin/sacinit.sh' Lastly, in my ~/.profile, I have written: `test -r /sw/bin/init.sh && . /sw/bin/init.sh . /sw/bin/init.sh export PATH=/usr/X11R6/bin:$PATH source ~/.bashrc` Where could the problem be, or am I missing a line of code somewhere?


title: Consumer Level software RAID5 and LVM

text: Hi I am going to build a 6 drive consumer level RAID 5 (10TB) with Ubuntu10.10 and using EXT4 as filesystem, and OS on another drive. Question: Should you use LVM on top of the RAID5 or should just directly use EXT4 on top?


title: Should the usage message go to stderr or stdout?

text: Should the usage message which is printed with e.g.                command -?      of a Unix command go to stderr or stdout, and why? Should it go to the same place if the user makes a mistake with an option?


title: Should I let pacman replace glamor-egl with xorg-server?

text: This is the output of `pacman`. I installed nothing; just wanted to update...               :: Synchronizing package databases...      core is up to date      extra           1761.1 KiB  2.58M/s 00:01 [#######################################################################] 100%      community          2.3 MiB  2.25M/s 00:01 [#######################################################################] 100%      multilib         121.2 KiB  1236K/s 00:00 [#######################################################################] 100%     :: Starting full system upgrade...     :: Replace glamor-egl with extra/xorg-server? [Y/n]      What could cause this? What option should I select?


title: How to install apache mod_mono with a custom compiled version of mono in Ubuntu

text: Because the latest version of mono available through apt-get in ubuntu does not include support for specific libraries I need, I uninstalled it and compiled it from github. However, installing libapache mod_mono through apt- get will re-install the old version of mono. How can I install this without having the old version of mono re-installed again?


title: Answer password prompt programmatically via shell script

text: I would like to programmatically answer a password prompt using _only_ shell script when prompted. Is it possible to automate this task in this way? I want to avoid other tools entirely - so no `expect` or similar - I would like to achieve this simply using shell script.


title: .Xresources settings in effect

text: Is there some way to inspect which .Xresources settings are _in effect_ at the moment (unlike `xrdb -query`)? For example, I'm on a host which doesn't seem to respect `*reverseVideo: true`, but I don't know whether that is because I wrote it the wrong way (even `*florb: glorb` doesn't raise an error when running `xrdb -merge $HOME/.Xresources`), because the setting is not supported, or some other reason.


title: Swap usage too high?

text: I have a debian sid box, freshly installed about a month ago, with no desktop apps running at the moment. Any command I try to run (via ssh) makes the hard disk work very hard. The system worked flawlessly a few weeks ago while running ubuntu 8.04. Hardware should be ok, smart tools report no problem, nor do memory checks, etc. I suspect the problem is related to swapping:               $ free -h                  total       used       free     shared    buffers     cached     Mem:          998M       986M        12M         0B       464K       904M     -/+ buffers/cache:        81M       917M     Swap:         511M       511M         0B      Testing stuff, I see that I'm unable to disable swap without rebooting, even though most physical ram is used for caches:               # swapoff  -a     swapoff: /swapfile: swapoff failed: Cannot allocate memory      When running the script mentioned in this stackoverflow answer, the highest swap-using process was using barely 1.5megs, and the total count was:               "Overall swap used: 18376 kB"      ...which is far from the half gig that htop or free report. I tried changing the `swappiness` to `1` half a month ago, but there's no difference (same memory usage patterns). Any idea what could be the culprit? **Edit** : here's the `/proc/meminfo` contents (similar situation, but 702megs of cache instead of 904, and chromium still open):               MemTotal:        1022464 kB     MemFree:           14344 kB     Buffers:             192 kB     Cached:           719816 kB     SwapCached:         2212 kB     Active:           304304 kB     Inactive:         657344 kB     Active(anon):     294128 kB     Inactive(anon):   651264 kB     Active(file):      10176 kB     Inactive(file):     6080 kB     Unevictable:           0 kB     Mlocked:               0 kB     HighTotal:        127336 kB     HighFree:            316 kB     LowTotal:         895128 kB     LowFree:           14028 kB     SwapTotal:        524284 kB     SwapFree:              0 kB     Dirty:                 4 kB     Writeback:             0 kB     AnonPages:        239528 kB     Mapped:            11968 kB     Shmem:            703760 kB     Slab:              28924 kB     SReclaimable:      12116 kB     SUnreclaim:        16808 kB     KernelStack:        2200 kB     PageTables:         5812 kB     NFS_Unstable:          0 kB     Bounce:                0 kB     WritebackTmp:          0 kB     CommitLimit:     1035516 kB     Committed_AS:    2193368 kB     VmallocTotal:     122880 kB     VmallocUsed:       14092 kB     VmallocChunk:     105548 kB     HardwareCorrupted:     0 kB     AnonHugePages:         0 kB     HugePages_Total:       0     HugePages_Free:        0     HugePages_Rsvd:        0     HugePages_Surp:        0     Hugepagesize:       2048 kB     DirectMap4k:      911352 kB     DirectMap2M:           0 kB      And here's the `top -b -n 1` output:               top - 22:00:18 up 1 day,  2:34,  4 users,  load average: 1,97, 1,25, 0,88     Tasks: 137 total,   3 running, 134 sleeping,   0 stopped,   0 zombie     %Cpu(s):  4,9 us,  3,0 sy,  2,7 ni, 83,2 id,  6,1 wa,  0,0 hi,  0,0 si,  0,0 st     KiB Mem:   1022464 total,  1008788 used,    13676 free,      188 buffers     KiB Swap:   524284 total,   524284 used,        0 free,   719792 cached            PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM     TIME+ COMMAND      7861 stenyak   20   0  6336 1252  976 R  18,0  0,1   0:00.03 top      5194 isabel    30  10 44372 5344 1404 R  12,0  0,5   0:36.11 glmatrix     17940 root      20   0  103m 6844 2828 S   6,0  0,7  11:02.21 Xorg         1 root      20   0  2280   28    0 S   0,0  0,0   0:02.49 init         2 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kthreadd         3 root      20   0     0    0    0 S   0,0  0,0   0:15.25 ksoftirqd/0         5 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kworker/u:0         6 root      rt   0     0    0    0 S   0,0  0,0   0:00.93 migration/0         7 root      rt   0     0    0    0 S   0,0  0,0   0:00.46 watchdog/0         8 root      rt   0     0    0    0 S   0,0  0,0   0:00.73 migration/1        10 root      20   0     0    0    0 S   0,0  0,0   0:17.30 ksoftirqd/1        12 root      rt   0     0    0    0 S   0,0  0,0   0:00.43 watchdog/1        13 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 cpuset        14 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 khelper        15 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kdevtmpfs        16 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 netns        17 root      20   0     0    0    0 S   0,0  0,0   0:00.44 sync_supers        18 root      20   0     0    0    0 S   0,0  0,0   0:00.00 bdi-default        19 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 kintegrityd        20 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 kblockd        22 root      20   0     0    0    0 S   0,0  0,0   0:00.07 khungtaskd        23 root      20   0     0    0    0 D   0,0  0,0   2:50.47 kswapd0        24 root      25   5     0    0    0 S   0,0  0,0   0:00.00 ksmd        25 root      20   0     0    0    0 S   0,0  0,0   0:00.00 fsnotify_mark        26 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 crypto        99 root      20   0     0    0    0 S   0,0  0,0   0:00.00 khubd       115 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 ata_sff       116 root      20   0     0    0    0 S   0,0  0,0   0:00.00 scsi_eh_0       117 root      20   0     0    0    0 S   0,0  0,0   0:00.00 scsi_eh_1       118 root      20   0     0    0    0 S   0,0  0,0   0:01.66 kworker/u:1       152 root      20   0     0    0    0 S   0,0  0,0   0:02.12 jbd2/sda1-8       153 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 ext4-dio-unwrit       280 root      20   0  2944  352  128 S   0,0  0,0   0:00.30 udevd       423 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 hd-audio0      1286 root      20   0     0    0    0 S   0,0  0,0   0:07.06 jbd2/sda2-8      1287 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 ext4-dio-unwrit      1561 root      20   0     0    0    0 S   0,0  0,0   0:03.09 flush-8:0      1603 root      20   0  2376   48    0 S   0,0  0,0   0:00.33 rpcbind      1634 statd     20   0  2648   68   64 S   0,0  0,0   0:00.00 rpc.statd      1639 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 rpciod      1641 root       0 -20     0    0    0 S   0,0  0,0   0:00.00 nfsiod      1648 root      20   0  2576    0    0 S   0,0  0,0   0:00.00 rpc.idmapd      2019 root      20   0 29088  976    0 S   0,0  0,1   0:22.26 rsyslogd      2123 root      20   0  1876   84   24 S   0,0  0,0   0:00.23 acpid      2161 message+  20   0  3756  728    0 S   0,0  0,1   0:02.06 dbus-daemon      2213 daemon    20   0  2152   20    0 S   0,0  0,0   0:00.00 atd      2231 root      20   0  4488  220  128 S   0,0  0,0   0:00.00 bluetoothd      2242 root      10 -10     0    0    0 S   0,0  0,0   0:00.00 krfcommd      2259 avahi     20   0  3272  292  168 S   0,0  0,0   0:00.66 avahi-daemon      2262 avahi     20   0  3156   24    0 S   0,0  0,0   0:00.00 avahi-daemon      2265 root      20   0  5968  180  152 S   0,0  0,0   0:00.00 bitlbee      2271 root      20   0     0    0    0 S   0,0  0,0   0:11.69 kworker/0:2      2304 root      20   0 19056  700  220 S   0,0  0,1   0:00.75 NetworkManager      2334 root      20   0  5536  176  108 S   0,0  0,0   0:02.86 cron      2350 root      20   0  6700  492  152 S   0,0  0,0   0:00.01 sudo      2351 root      20   0 15304 5880 1428 R   0,0  0,6  61:42.79 iotop      2359 root      20   0 24256  600   56 S   0,0  0,1   0:01.12 polkitd      2390 root      20   0  6892  368  180 S   0,0  0,0   0:00.15 modem-manager      2392 root      20   0  7536   80    0 S   0,0  0,0   0:00.13 cupsd      2396 root      20   0 20964  516  296 S   0,0  0,1   0:00.15 gdm3      2712 root      20   0 10068  196   84 S   0,0  0,0   0:11.72 kerneloops      2714 root      20   0  6896 2108  372 S   0,0  0,2   0:05.69 ddclient - slee      2802 Debian-+  20   0  7424  100   40 S   0,0  0,0   0:00.05 exim4      2877 daemon    20   0  1868  236  172 S   0,0  0,0   0:01.22 uptimed      2881 root      20   0  6464  208  104 S   0,0  0,0   0:00.27 sshd      2913 root      20   0  1848   72    8 S   0,0  0,0   0:00.00 minissdpd      2936 root      20   0  4328   40   36 S   0,0  0,0   0:00.00 getty      2937 root      20   0  4328   40   36 S   0,0  0,0   0:00.00 getty      2938 root      20   0  4328   40   36 S   0,0  0,0   0:00.00 getty      2939 root      20   0  4328   40   36 S   0,0  0,0   0:00.00 getty      2940 root      20   0  4328   40   36 S   0,0  0,0   0:00.00 getty      2941 root      20   0  4328   40   36 S   0,0  0,0   0:00.00 getty      2961 root      20   0 23384  540  156 S   0,0  0,1   0:00.88 accounts-daemon      2965 root      20   0 29216  292   64 S   0,0  0,0   0:01.35 console-kit-dae      3050 root      20   0 27408  320    0 S   0,0  0,0   0:00.48 upowerd      3115 stenyak   20   0  6260  320   84 S   0,0  0,0   0:00.51 screen      3119 stenyak   20   0  6260  248   40 S   0,0  0,0   0:00.61 screen      3121 stenyak   20   0  6260  132   16 S   0,0  0,0   0:00.48 screen      3124 stenyak   20   0  6388 1004  572 S   0,0  0,1   1:33.81 p2p.sh      3125 stenyak   20   0 34176 5604 1764 S   0,0  0,5   1:57.10 quasselcore      3129 stenyak   20   0 55268 2972  652 S   0,0  0,3   3:00.32 bot.py      3280 rtkit     21   1 18980  180   64 S   0,0  0,0   0:01.23 rtkit-daemon      3367 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kauditd      3684 root      20   0  2940  340  112 S   0,0  0,0   0:00.00 udevd      3685 root      20   0  2940  208    0 S   0,0  0,0   0:00.00 udevd      5845 root      20   0  6444  904  592 S   0,0  0,1   0:00.00 cron      5876 stenyak   20   0  1932  428  368 S   0,0  0,0   0:00.00 sh      5878 stenyak   20   0  6048 1232 1080 S   0,0  0,1   0:00.00 memmon.sh      7857 stenyak   20   0  5060  508  448 S   0,0  0,0   0:00.00 sleep      9071 root      20   0  9816  860  200 S   0,0  0,1   0:00.10 sshd      9080 stenyak   20   0 10180 1112  136 S   0,0  0,1   0:06.93 sshd      9081 stenyak   20   0  9280 3232  148 S   0,0  0,3   0:00.62 bash      9436 root      20   0  7396 1188  684 S   0,0  0,1   0:07.05 bitlbee     10285 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kworker/1:0     12728 stenyak   20   0  7960 2960  648 S   0,0  0,3  23:35.01 htop     12950 root      20   0  9832   80   76 S   0,0  0,0   0:00.08 sshd     12955 stenyak   20   0  9832    0    0 S   0,0  0,0   0:00.04 sshd     12956 stenyak   20   0  9304   36   32 S   0,0  0,0   0:00.64 bash     17939 root      20   0 23284 1080  320 S   0,0  0,1   0:00.11 gdm-simple-slav     18062 root      20   0 29808  964  364 S   0,0  0,1   0:00.38 gdm-session-wor     20066 root      20   0     0    0    0 S   0,0  0,0   0:09.72 kworker/0:0     28369 isabel    20   0  1932  112  108 S   0,0  0,0   0:00.03 sh     28404 isabel    20   0  3868  260   68 S   0,0  0,0   0:00.20 ssh-agent     28407 isabel    20   0  3516    0    0 S   0,0  0,0   0:00.00 dbus-launch     28408 isabel    20   0  3420  304  116 S   0,0  0,0   0:00.24 dbus-daemon     28416 isabel    20   0  6344  744  548 S   0,0  0,1   0:00.29 xfconfd     28422 isabel    20   0  8336  496  248 S   0,0  0,0   0:01.46 xscreensaver     28424 isabel    20   0 21932  580  340 S   0,0  0,1   0:00.17 xfce4-session     28430 isabel    20   0 24392 2032 1160 S   0,0  0,2   0:16.32 xfwm4     28432 isabel    20   0  117m 2072  908 S   0,0  0,2   0:01.26 xfce4-panel     28434 isabel    20   0 22520  256  256 S   0,0  0,0   0:00.06 Thunar     28436 isabel    20   0 21016  688  460 S   0,0  0,1   0:00.06 xfsettingsd     28437 isabel    20   0  119m 3344 1312 S   0,0  0,3   0:03.50 xfdesktop     28441 isabel    20   0 21072  272  268 S   0,0  0,0   0:00.07 kerneloops-appl     28443 isabel    20   0 29816  540  228 S   0,0  0,1   0:00.10 polkit-gnome-au     28450 isabel    20   0  263m  544  276 S   0,0  0,1   0:00.30 xfce4-volumed     28452 isabel    20   0 63936  488    0 S   0,0  0,0   0:00.31 tracker-store     28457 isabel    20   0 23240  768  472 S   0,0  0,1   0:00.18 xfce4-settings-     28460 isabel     9 -11 99532  500  248 S   0,0  0,0   0:00.38 pulseaudio     28470 isabel    20   0 21936  612  312 S   0,0  0,1   0:00.20 panel-6-systray     28472 isabel    20   0  339m 1348  552 S   0,0  0,1   0:00.42 xfce4-mixer-plu     28473 isabel    20   0 22028 2292 1740 S   0,0  0,2   0:59.33 xfce4-oragecloc     28514 isabel    20   0  371m  21m 2428 S   0,0  2,1   3:46.22 chromium     28517 isabel    20   0  111m 3020  288 S   0,0  0,3   0:00.58 chromium     28518 isabel    20   0  1948   64    0 S   0,0  0,0   0:00.00 chromium-sandbo     28519 isabel    20   0  120m 3324  288 S   0,0  0,3   0:00.20 chromium     28522 isabel    20   0  128m 3252  204 S   0,0  0,3   0:00.01 chromium     28558 isabel    20   0  208m  52m  476 S   0,0  5,3   1:25.92 chromium     28573 isabel    20   0  271m 103m 1244 S   0,0 10,3   3:01.64 chromium     28693 isabel    20   0  120m 3836  628 S   0,0  0,4   0:43.86 chromium     28696 isabel    20   0 83088 6412  108 S   0,0  0,6   0:16.55 GoogleTalkPlugi     28706 isabel    20   0  159m 6896  972 S   0,0  0,7   9:00.72 chromium     32332 root      20   0     0    0    0 S   0,0  0,0   0:06.24 kworker/1:2     32351 stenyak    9 -11 99108 1032  192 S   0,0  0,1   0:00.51 pulseaudio     32455 root      20   0  9816  108   76 S   0,0  0,0   0:00.11 sshd     32460 stenyak   20   0  9992  264  144 S   0,0  0,0   0:07.43 sshd     32462 stenyak   20   0  9300 1976  108 S   0,0  0,2   0:01.31 bash


title: How portable are the works chmod and chown commands?

text: Lets suppose a file is being owned by a user named _mrxyz_ with UID and GID 1000, and has RW permissions for the file _(esp. in ext file-systems)_. Now if the file is brought to my system will my user _hash_ with UID 1000 inherit the permissions or will I have to make changes to fit my context? So basically, I want to know how changing ownership and permission with `chown` and `chmod` work from portability point of view? PS. It was a curiosity raised in this comment "...would there be issues with permissions/ownership if I plugged the disk into another box?" that I posted this Q. _(So, it would be great to have answers covering portability of files as well as filesystem.)_


title: Howto recursively create PDF thumnbails on linux command line

text: I am able to use ImageMagick to create a thumbnail of the first page of a PDF using:               convert -thumbnail x80 95.pdf[0] thumb_95.png      This works fine and generates a **thumb_95.png** file. I have tried several permutations of "find" using xargs but i cant get a combo working that will create the thumbnails in the folders along with the source PDFs. The PDFs are in folders named with UUIDs, e.g.:               /511017a7-67fc-4897-80c1-0d42ac100b68/415.pdf     /511015bc-e0a8-4ab7-ba29-0ce9ac100b68/122.pdf      My required result would be:               /511017a7-67fc-4897-80c1-0d42ac100b68/415.pdf     /511017a7-67fc-4897-80c1-0d42ac100b68/thumb_415.png     /511015bc-e0a8-4ab7-ba29-0ce9ac100b68/122.pdf     /511015bc-e0a8-4ab7-ba29-0ce9ac100b68/thumb_122.png      Any help on the best ways to get this conversion to happen for all *.pdf recursively would be much appreciated!


title: write pc uptime in a file in shutdown

text: I need to log PC uptime. How I can do this? I use `uptime` for this and I will when ubuntu is shutdown write this command output in a file.


title: Rename Debian package automatically pulled by apt-get upgrade

text: I have installed `package_a` with version 1.0. How to configure package control script for `package_b` (e.g version 1.1) to automatically replace package_a? tried (as described in 7.6.2):               Package: package_b     Version: 1.1      Conflicts: package_a     Provides: package_a     Replaces: package_a      with and without version (<< 1.1, on Replaces and Conflicts) but with no success. Package is in repository and `apt-get install package_b` works as expected. But package will not detected as an upgrade. P.S. also seen Method 2, but it seems only works on `dist-upgrade` (not tested).


title: Stitch two JPEGs together into a PDF

text: I need to take two 8.5in by 11in JPEG images and merge them together into two pages of a PDF. Is there a commandline or GUI tool to help me do this?


title: Thunderbird: new email sound notification not working

text: Thunderbird does not play the sound file when new message arrives, even though I have this set up correctly: ![enter image description here](http://i.stack.imgur.com/E1pzu.png) The sound file playes OK when I press the `Play` button, but when new message arrives nothing happens. The message preview text also is not displayed when new message arrives, even though I have this set up too. What could be the problem? How can I make the sound play?


title: what is oldroot?

text: When I shutdown my laptop there are some messages like               unmounting oldroot/*      They came after a kernel-update, just curious what this means and if I need "oldroot"


title: How to Resolve a .so Dependency

text: I have a package (.rpm) on CentOS 6.5 that requires a .so file, which I also have on my machine. When I attempt to install the package I get an error stating unresolved dependencies regarding the .so file. I have tried placing the .so file in the same directory, in /lib/, in /usr/lib/, and setting the path of LD_LIBRARY_PATH to /usr/lib/, but regardless the package does not resolve the dependency, how can I make the .so available to the package I am installing?


title: How was ntfs-3g created?

text: Since NTFS is a proprietary file system created by Microsoft, how did the ntfs-3g developers manage to create an open source version of the NTFS drivers without referring to the NTFS source code? Or is there some kind of agreement with Microsoft regarding this??


title: How to have the login screen through VNC in Oracle Linux?

text: I know this question has been asked here previously [ref1] [ref2] also here but so far I have been unsuccessful in my attempts. Can anyone provide a detailed guide on how to go about achieving this? Basically what I need is I shoud be able to view the login screen through VNC Viewer. Currently someone has to first obtain the console through OVM, login and only then is it possible to remote through VNC Viewer. Once a user logs out, it's not possible to obtain remote through VNC.   * OS: Oracle Linux 5    * VNC rpm : vnc-server-4.1.2-14.el5_6.6 ## UPDATE Ok so I followed everything listed here and here:   * Logged in to the server through PuTTY using root (because that's the acount I need to use for logging in through VNC).    * Ran vncpasswd and set the VNC login password.    * Saved the script given in the 1st link as `/etc/init.d/vncserver` after changing the following parameters:       * USER="root"     * DISPLAY="1"   * Did `chmod +x /etc/init.d/vncserver`.   * Did `chkconfig --level 2345 vncserver on`.   * Did `vi /root/.vnc/xstartup` and uncommented the lines:   `sh unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc ` and changed last line from `twm &` to `startx &` (since I'm using GNOME).   * Restarted the server.  What happens now is vnc server is listening on two ports 5900 (display 0) and 5901 (display 1) and I can successfully remote to the server through VNC Viewer without actually logging in to the server **(it bypasses the lock screen)**. However, **connections on display 0 do not prompt for password** which is a cause of concern.   After some research I figured out that securely logging in to the native X-Server on display 0 is a topic in itself.   @slm's answer below and this article highlight the process.   However few things are still unclear to me:   * The directory `/usr/lib/xorg/` doesn't exist. Without this the module `libvnc.so` is unavailable. Am I using the wrong rpm?    * If I follow this method do I have to undo everything I have done till now?


title: Thunderbird config for kernel patches - cannot find register key

text: I want to set up Thunderbird to be able to apply kernel patches. Kernel documentation (available here) says: > Enable "preformat" mode: Set "editor.quotesPreformatted" to "true". Unfortunately, under `Thunderbird 24.2.0` there isn't that key anymore. How to do that?


title: Is it possible for a OpenVZ container to interact with a MySQL database on the host?

text: Say every container and the host itself has its own dedicated, external IP. Is it possible to do this without any problems? And is this really a good plan? Instead of hosting a database per container, hosting a database per host, for all containers to share? This question is sort of related to this one: https://unix.stackexchange.com/questions/114786/giving-ovz-containers-their- own-ip