title: Benchmark ssd on linux: How to measure the same things as crystaldiskmark does in windows

text: I want to benchmark a ssd (possibly with encrypted filesystems) and compare it to benchmarks done by crystaldiskmark on windows. ![CrystalDiskMark on Windows](http://i.stack.imgur.com/4LPJQ.png) So how can I measure approximately the same things as crystaldiskmark does? For the first row (Seq) I think I could do something like               LC_ALL=C dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc          sudo su -c "echo 3 > /proc/sys/vm/drop_caches"     LC_ALL=C dd if=tempfile of=/dev/null bs=1M count=1024      But I am not sure about the `dd` parameters. For the random 512KB, 4KB, 4KB (Queue Depth=32) reads/writes speed-tests I don't have any idea how to reproduce the measurements in linux? So how can I do this? For testing reading speeds something like `sudo hdparm -Tt /dev/sda` doesn't seem to make sense for me since I want for example benchmark something like `encfs` mounts. **Edit** @Alko, @iain Perhaps I should write something about the motivation about this question: I am trying to benchmark my ssd and compare some encryption solutions. But that's another question (Best way to benchmark different encryption solutions on my system). While surfing in the web about ssd's and benchmarking I have often seen users posting their CrystelDiskMark results in forums. So this is the only motivation for the question. I just want to do the same on linux. For my particular benchmarking see my other question.


title: How to search for official RHEL packages

text: I'd like to know how to do this via the web, something similar to Debian's official package search page.


title: set variable options with dot

text: I'm trying to interface with a system not managed by me that is doing some Unix command scripts and command to easily execute a job. There is a variable substitution that doesn't work and I wonder if I can write a command to avoid the situation. There are many variables to set and I want the chance to enter an empty variable. The problem is that the system is not passing an empty variable and simply doesn't set the variable. I get > ${option.VARIABLE}: bad substitution I try to set something like that but isn't working. > if [ -z ${option.VARIABLE} ]; then option.VARIABLE=""; fi; Any idea?


title: How to set an xmodmap file for the session manager (or at least SLiM) because of a broken physical key

text: I've got my laptop set up to boot directly into SLiM as the X session manager. However, the "M" key on my laptop is broken. I've gotten around this when logged in by using xmodmap to remap my extraneous menu key to it.               keycode 135 = m      I put a call to xmodmap in my .xinitrc file as so:               xmodmap ~/.xmodmaprc      This works rather well once I'm logged in. However, my username contains an "m", so I can't type it in directly with the laptop keyboard. Adding a `default_user` line to my `/etc/slim.conf` works to allow me to login at least, but if I mistype my password, I have to plug in a USB keyboard or reboot the system entirely to get a second chance. I found this question here on Stack Exchange, so I copied my .xmodmaprc file to the path it specified (`/etc/X11/Xmodmap). However, that did not work. How can I get this to work system-wide? My distro is Arch, if that helps any.


title: Irfanview alternative

text: I'm looking for some very simple image viewer with the following functionality:   * fast start   * next/previous navigation (in directory)   * full-screen mode   * reasonable format support   * keyboard controllable   * image re-size to fit screen (with maintaining aspect ratio)


title: vim - but with scrolling, clickable text, and copy-paste

text: I like vim. I think touching mice is dirty. But sometimes when my hand is already on a mouse, it sure would be nice to be able to scroll the text or click a location in the text and have the cursor jump there. Also, I wish I could copy and paste with command-c, command-v. Is there any software out there that answers this desire? How about for the Mac?


title: Installing Git, Curl, and Expat from Source

text: I have a RHEL 6.4 VM provisioned by my companies internal KVM. We are having some trouble using yum (Cannot retrieve repository metadata, which Ive confirmed in this case is peculiar to my company's internal cloud), so I have to build Git from source. ### EDIT #1: Downloading the RPM file and issuing               sudo yum localinstall ....rpm      Gives me the same Cannot retrieve repository metadata error Issuing               sudo rpm -ivh ....rpm      Fails with an `error: Failed dependencies` and then lists all the packages I need to install. I assume I could find the download links for all of them, but I've tried this before and was unable to find the d/l links for the right versions for the right packages. ### EDIT #2: _The following code actually works, thanks to@slm's answer:_               wget ftp://fr2.rpmfind.net/linux/dag/redhat/el6/en/x86_64/extras/RPMS/perl-Git-1.7.9.6-1.el6.rfx.x86_64.rpm     wget http://pkgs.repoforge.org/git/git-1.7.9.6-1.el6.rfx.x86_64.rpm     rpm -ivh perl-Git-1.7.9.6-1.el6.rfx.x86_64.rpm git-1.7.9.6-1.el6.rfx.x86_64.rpm      If I just download the git code, untar it, and build it, like:               wget https://www.kernel.org/pub/software/scm/git/git-1.8.5.tar.gz     tar -xvf git-1.8.5.tar.gz     cd git-1.8.5     ./configure     make     make install      I receive the following error when cloning from the `http://` protocol:               fatal: Unable to find remote helper for 'http'      Googling told me that I needed curl-devel and expat. I can not use yum, so I went and built those as well:               cd ..     wget http://curl.haxx.se/download/curl-7.34.0.tar.gz     tar -xvf curl-7.34.0.tar.gz     cd curl-7.34.0     ./configure     make     make install          cd ..     wget http://downloads.sourceforge.net/expat/expat-2.1.0.tar.gz     tar expat-2.1.0.tar.gz     cd expat-2.1.0     ./configure     make     make install      However, upon rebuilding Git, I receive the same error. After Googling more I determined that I needed to pass the following parameters to Git's `./configure`:               cd git-1.8.5     ./configure --with-curl=<curl_install_path> --with-expat=<expat_install_path>       However, I couldn't determine where the curl and expat install paths were located. So what I did instead was build Git, curl, and expat using the `./configure --prefix=/path/to/desired/install/path`               mkdir curl     cd curl-7.34.0     ./configure --prefix=/home/downloads/curl     ...     mkdir expat     cd expat-2.1.0     ./configure --prefix=/home/downloads/expat     ...     mkdir git     cd git-1.8.5     ./configure --prefix=/home/downloads/git --with-curl=/home/downloads/curl --with-expat=/home/downloads/expat     ...      and from this I was able to clone with Git from the `http` protocol. However this violates the linux file structure. 2 Questions:   1. When building Git from source, you need to include the curl and expat install paths to `./configure`. Where are these install paths when installing curl and expact without the `prefix` argument?   2. I learned that I needed curl and expact's install paths when I got an error and searched for it. Are there any other programs I need to tell Git so I don't get errors in the future?


title: send email from my local domain example.com to external mail server using Sendmail

text: I'm using Sendmail as an MTA. I setup a local domain example.org, everything is running well, so now I want to use this local mail server to send email to my Gmail account or any external server. Just sending not receiving.


title: How to set firefox homepage from terminal?

text: I am trying to configure firefox from a script. I have already hit a wall establishing the deafault homepage. Found some old info what does not work anymore: `echo "user_pref("browser.startup.homepage", "https://www.google.com");" >> /etc/xul-ext/ubufox.js` Digging a little, I found the xulrunner directory is now /usr/lib64/xulrunner, but nor there nor in the firefox directory I can found a configuration file. Does anyone know where is it?


title: Nightly show as Firefox in Dash

text: I have created the following .desktop file in `~/.local/share/applications`, when I search "Nightly" Nightly appears in search results with the correct icon(earth at night), but when I opened it it shows as Firefox in Dash. How can I make it show as Nightly? I used Fedora 19 with Fedora Desktop.               [Desktop Entry]     Encoding=UTF-8     Version=1.0     Type=Application     NoDisplay=false     Exec=/home/yang/Apps/firefox/firefox %u     Name=Nightly     Comment=Custom definition for Nightly     Icon=/home/yang/Apps/firefox/browser/icons/mozicon128.png


title: gnome-settings-daemon not saving Settings after reboot; Mint 14 XFCE

text: I am running Linux Mint 14 with xfce on my Asus UX31A and switched to gnome- settings-daemon, because this way all the function keys work out of the box. Disabled XFCE Volume Daemon as advised here: http://askubuntu.com/questions/95969/using-gnome-settings-daemon-in-xfce Now my problem is that the settings get reset to default after rebooting. for example if I change scrolling to two finger scrolling it resets to edge scrolling after reboot, application autostart settings are reset, etc.


title: How to optimize wget download script

text: Site contents                              Sagar        Sagar Link1        Download this                  `link_source_file.txt` contains url for the above content               ## Below wget command     wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off -i link_source_file.txt      I want to download a specific type of file as mentioned by -A. Here it is `mp3`. The above wget command it will go till one depth of the link as per `-t1`. It follows the first link `http://www.sagar.com/` and downloads the `index.html` file. Then figures out that doesn't have any file type as `.mp3` then it removes `index.html` I want wget to follow only links which have a extension of `*.mp3` and not any other links. How can I tweak the command for this requirement?


title: Enable wifi monitor mode on Samsung Chromebook

text: I want to buy the Samsung Chromebook and use it with Ubuntu (12.10). I also want to play around with airmon-ng and thus want to use the wifi card in monitor mode. I didn't find any information if the samsung wifi card and the driver support monitor mode. Does anybody know if monitor mode on the Chromebook is possible? ### Technical Details The Laptop is called XE303C12-A01US (Samsung Website) Wifi Chip is an Atheros AR9382 802.11n Wi-Fi chip with XSPAN (Link to iFixit)


title: switch network on and off of a virtual remote server

text: I need to perform a testing panel which disconnects a network cable and connect it again on a specific virtual server via a php web page. I found that ip & ifconfig can disconnect a network, but I can't turn it back on, because I'm doing these operations via php with ssh like this:               exec('ssh -p 22 root@192.168.0.101 "ip link set dev eth0 down"',$output); //work     exec('ssh -p 22 root@192.168.0.101 "ip link set dev eth0 up"',$output); // doesn't work      I'm using virtual servers 'CentOS' on virtual box, is there an alternative way to do this ?


title: Google Chrome - no space on rootfs partition

text: I've managed to install `google-chrome` on _Debian Wheezy_. My `rootfs` is only _320MB_ because I didn't predict that some day I will install _Google Chrome_ which has more than _100MB_ and installs in `/opt` (`opt` is part of `rootfs`). I successfully installed `google-chrome` but I can't update it with `apt-get` since `rootfs` usage is **~99%**. What should I do if I don't want to resize `rootfs`? Is there any safe way to install `google-chrome` in non-standard place (e.g. in `/usr`)?


title: Are there tools to build a LiveCD based on OpenBSD in the Linux environment?

text: I'm currently on Ubuntu and I want to build an OpenBSD 5.3 LiveCD customized for my own needs. I found the perfect tool to build a Linux LiveCD - `live-build`. I'm looking for the same, but to create an OpenBSD LiveCD.


title: Averaging output of dstat

text: I need to average upload and download speed using `dstat -n`. How can I add all the received and sent data sizes that appear after `dstat -n`, so that I can add them and find average upload and download speed over some period of time ?


title: mtp-detect doesn't detect my Sony Ericsson phone

text: I used to have a Samsung Galaxy Fit that worked out of the box with Banshee. I recently bought a new Sony Ericsson Xperia Mini, I tried to sync it using Banshee, but it doesn't show up. It does mount when I switch to Mass Storage mode, and I can see it using `lsusb` but running `mtp-detect` outputs `No raw devices found.` I'm running Gnome 3 on Arch Linux.


title: ssh localhost without password doesn't work on Fedora 14

text: I performed:               $ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa      $ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys      then in `/etc/ssh/sshd_config` changed `StrictModes` to `no` and restarted sshd. And I have:               $ ssh localhost     Agent admitted failure to sign using the key.     dev@localhost's password:       What's wrong? How to make `ssh localhost` working without password? UPDATE:               $ ssh -v localhost     OpenSSH_5.5p1, OpenSSL 1.0.0e-fips 6 Sep 2011     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to localhost [127.0.0.1] port 22.     debug1: Connection established.     debug1: identity file /home/dev/.ssh/id_rsa type 1     debug1: identity file /home/dev/.ssh/id_rsa-cert type -1     debug1: identity file /home/dev/.ssh/id_dsa type 2     debug1: identity file /home/dev/.ssh/id_dsa-cert type -1     debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5     debug1: match: OpenSSH_5.5 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_5.5     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug1: kex: server->client aes128-ctr hmac-md5 none     debug1: kex: client->server aes128-ctr hmac-md5 none     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug1: Host 'localhost' is known and matches the RSA host key.     debug1: Found key in /home/dev/.ssh/known_hosts:16     debug1: ssh_rsa_verify: signature correct     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug1: Next authentication method: gssapi-keyex     debug1: No valid Key exchange context     debug1: Next authentication method: gssapi-with-mic     debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_500' not found          debug1: Unspecified GSS failure.  Minor code may provide more information     Credentials cache file '/tmp/krb5cc_500' not found          debug1: Unspecified GSS failure.  Minor code may provide more information               debug1: Next authentication method: publickey     debug1: Offering public key: /home/dev/.ssh/id_rsa     debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password     debug1: Offering public key: /home/dev/.ssh/id_dsa     debug1: Server accepts key: pkalg ssh-dss blen 434     Agent admitted failure to sign using the key.     debug1: Next authentication method: password


title: How can I set the keyboard right on X?

text: **Note:** forked of this per recommendation here. * * * I made a foolish typo for `UTF-8`, and expected that when I fixed it, the keyboard on X would work right. Since making this errant change, I was no longer getting a Bash login, `man`pages, or`locale` errors. But it didn't. Even if I do `loadkeys pt-latin9`, it never is able to fix the issue in X. `localectl` gives:               [jmcf125@jmcf125-Toshiba-Arch ~]$ localectl        System Locale: LANG=pt_PT.UFT-8            VC Keymap: pt-latin9           X11 Layout: pt      However, the real X keyboard layout **is not** `pt`, while it is so on the TTY. What's wrong here? Where can I set the layout right?


title: Make gdm/mdm prompt for an empty password on liveCD

text: By default Fedora liveCD is configured in a way that `liveuser` is logged in automatically since following lines added to `gdm`/`mdm` (a fork of `gdm` of GNOME2) configuration file               [daemon]     AutomaticLoginEnable=false     AutomaticLogin=liveuser      I'd like to turn off autologin and remove those lines. So after booting the liveCD I can see the user selection screen, but clicking `liveuser` forces immediate login without pausing for password prompt screen - so the user can't select language on liveCD if `liveuser` has an empty password. I'd like to keep `liveuser` passwordless but make `gdm`/`mdm` pause on the password screen to let user select language (and DE maybe). Is there a way to do this?


title: How to verify a CD against an ISO image?

text: I've got a physical burnt CD and the original ISO image of it. No reference checksum files were provided for the CD contents. How do I check the actual CD is correct (corresponds to the original image) and fully readable?


title: VSFTPD, 553 Could not create file. - permissions?

text: I've set up VSFTPD on Amazon EC2, with the Amazon Linux AMI. I created a user and can now succesfully connect via ftp. However, if I try to upload something I get the error message "553 Could not create file." I assume this has to do with permissions but I don't know enough about it to be able to fix it. So basically, what do I have to do to be able to upload files?


title: Modify .inputrc to fix Mac Terminal bug with vi mode

text: I currently have a bug in my Mac's Terminal (I actually use iTerm2 but it's still there), where once I press left arrow after typing, I can't go past the last character. Is there a way I can modify my `.inputrc` to insert an extra space, whenever I press the left arrow key when my cursor is at the end of the line?


title: How to query pdf page size from the command line?

text: For scripting I need to get the page dimensions of a PDF file (in mm). `pdfinfo` just prints it in 'pts', e.g.:               Page size:      624 x 312 pts      What should I use? Or what unit is 'pts' anyway - in case I want to convert them ...


title: Sudo Su automated login

text: I want to automate the login process with `sudo su`. I have seen lot of questions on these, but none of them are working for me. Automate login with sudo and su Here's my what I tried so far               echo "mypassword" | sudo -S su - user     echo "mypassword\n" | sudo -S su - user     echo mypassword | sudo -S su - user     echo "mypassword" | sudo -S su user     echo mypassword | sudo -S su user      I am just getting the below response               -bash: line 1: mypassword: command not found      My Bash version               GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)      Copyright (C) 2009 Free Software Foundation, Inc.      As a note, my password contains special character `@`               @ sudo     usage: sudo [-D level] -h | -K | -k | -V     usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid]     usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command]     usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]     usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ...


title: How to set multiple `core.excludesfile` in `.gitconfig`?

text: I'm syncing `~/.gitconfig` and `~/.gitignore` files in ubuntu and Mac by using dropbox and created symlink for it. And `excludesfile` is declared like this.               [core]             editor = /usr/bin/vim             excludesfile = /Users/username/.gitignore      The problem is home directory differs by os, therefore I need multiple setting for excludesfile. Is it possible to define multiple `core.excludesfile`?


title: local email storage syncing to imap - mutt-friendly

text: ## Summary **My problem** : I want to read email offline with my choice of client (`mutt`), but I want actions like moving emails, etc. to be kept in two-way snc with an imap server. **My question** : Is there a straightforward way to do this while still using standard tools like `fetchmail`, `procmail`, etc.? ## Details I have a gmail account. For various reasons - some institutional - I need to be able to read this mail from a mail client; I want my 'inbox' to be clean, much like I would keep it with a traditional local mail setup, and for anything I 'archive' to be searchable. If I move an email to a folder in the web client, I'd like my local inbox to take this into account. When possible, I want to be able to read this mail from `mutt`. Previously I used mutt's native imap functionality, but mutt has to make a connection to the server each time you run it; the connection often drops while I'm reading mail and mutt is open in the background; it only keeps a cache of message headers, and loading new messages requires a round-trip to the server; if I send a message, I have to wait for it to be acknowledged over STMP before I can look at any other messages. Is there some way around this? I don't consider fat clients like Thunderbird to be a solution: I require terminal access, I like to be able to grep my mail, I make good use of procmail's filtering capabilities, and I prefer decoupled systems. As mentioned above, `fetchmail`, `procmail` and `sendmail` get me _almost_ there - but not quite to being able to keep my activity in sync between clients. Am I missing something? I've looked at the FreeBSD handbook's section on email and a bunch of blog posts but nothing seems to bring it all together in this way. By the way, I run Arch Linux and Debian.


title: Linux 2.6.36.4, GCC 4.7.2, getting lots of "variable set but not used" warnings

text: I am trying to compile the Linux kernel 2.6.36.4 on Linux Mint 14 running a 3.5 kernel by default. Using gcc version 4.7.2. Tried googling it, but didn't quite work out. The warning is:               warning: variable ‘gfp’ set but not used [-Wunused-but-set-variable]      I have tons of these warnings all over the compilation. The compilation does NOT fail anywhere at all. And the worst part is the compiled kernel doesn't boot successfully either. Do I need to set any more gcc options? Or should I simply ignore it? Note: I am working on virtualbox. The stock kernel works just fine.


title: Scope of variables when calling function from find

text: In a bash script I define a function that is called from `find`. The problem is that the scope of variables does not extend to the function. How do I access variables from the function? Here is an example:               variable="Filename:"          myfunction() {         echo $variable $1     }          export -f myfunction          find . -type f -exec bash -c 'myfunction "{}"' \;      This will output filenames but without the string "Filename:". Is there perhaps a better way to invoke a function from `find` such that it is called for every file that `find` finds, and variables are still defined?


title: Why "man CMD" shows nothing?

text: After I ran `man ls`, it shows: > Man: find all matching manual pages   >  * ls (1)   >  ls (1p)   >  Man: What manual page do you want?   >  Man: After I entered "1", it shows nothing but " _Manual page ls(1) line ?/? (END)_ " on the status bar. I guess that I haven't installed manual page for `ls`, so I ran `manpath` and get output below: > /usr/share/man:/usr/local/man:/usr/local/share/man Right under directory `/usr/share/man/man1/` I found gzip file `ls.1.gz`, which I think is the manual information of `ls`. So why `man ls` shows nothing here?


title: How to assign value of variable with regex (bash)?

text: I want to use regex in bash at line of variable assignment e.g.               oldip="14\.130\.31\.172"     oldip_a="14.130.31.172" << How to use regex to del all '\'? and assign to oldip_a      Do you have any idea?


title: Linux Mint Stops Network File Transfers to Load Data into RAM

text: I've never seen or heard anything like this before, and I can't find anything else online that is at all similar. I've upgraded my network to gigabit and have been transferring large files lately (this one in question is a bunch of DVD images totaling over 200GB). Whenever I try to copy a set of files a few gigs and larger, I've noticed this odd behavior where Mint will load a chunk of the data into RAM-- usually about 1.2 GB or smaller-- sometimes only a few hundred megs-- and then start transferring. When it gets done transferring that, it will literally halt the transfer, spit out the old hunk of data, and wait to continue transferring until the next chunk of data is loaded into the RAM. Then it will resume transferring across the network. Then it repeats. And repeats. And repeats. Until the data is all done. Here is a screenshot of the System Monitor during one of these weird moments. ![Screenshot Here](http://i.stack.imgur.com/IzDuv.png). You can see the death of the transfer at the precise moment the RAM dumps the data, and then you see the RAM level out at the same moment that the transfer resumes again. What's also funny is that I actually have six gigs of RAM, not 3.2 as Sys. Monitor would have you believe-- this is the second time Mint hasn't reported it all of the sudden. But that's a question for another day. It's not the worst thing in the world, but it is a little annoying when every other OS I've used simultaneously loads data in and out of the RAM while it's transferring across the network. It doesn't have to pause to think about it. It would save me time while I'm moving these large sets of data if I could remedy this. Are there any suggestions, remedies, diagnoses, or theories?


title: Safely convert unicode strings to printable characters

text: I have many HTML files containing mixed unicode strings like `\303\243` and printable characters like `%s`. What I'd like to do is converting the unicode strings into printable characters in a safe way. I found that printf from GNU coreutils converts them automatically, but I also learned the hard way some time ago that printf is not trustworthy if you don't know what is going to be printed:               $ env printf "$(cat filename.htm)"     printf: %20M: invalid conversion specification      I also know that bash can do conversions like this, but I'd have to loop through the file with a regex, which is not safe at all:               $ echo $'\303\243'     ã      Is there such a command-line tool that can process these files in a clean and safe way?


title: SED Errors when building asciidoc

text: I get the following two warnings/errors when building asciidoc:               $./configure --prefix=/home/my_installations/     ./configure: line 1233: AC_PROG_SED: command not found     checking whether ln -s works... yes     checking for a BSD-compatible install... /usr/bin/install -c     configure: creating ./config.status     config.status: creating Makefile      and then also with make:               $ make     Fixing CONF_DIR in asciidoc.py     /bin/sh: line 2: @SED@: command not found     Fixing CONF_DIR in a2x.py     /bin/sh: line 2: @SED@: command not found      This is with the latest stable versions of automake and autoconf on the moment of this writing:   * automake 1.13   * autoconf 2.69 Any thoughts on what this means?


title: jpg to pdf without data loss

text: Trying to make such things: 1st step:               convert img.jpg img.pdf      2nd step:               pdfimages -j img.pdf img1      Comparing source and extracted images in HEX shows difference. How to make such conversion without data loss?


title: Which software to use?

text: I am familiar with Unix and am trying to move my home away from Microsoft completely. I wannna build a NAS/website(local and webwide) server. My primary OS is OS X Mavericks and secondly Ubuntu. The solution should be able to independently host on the NAS/Server and be managed from OS X Mavericks Server. What would it take to host a couple OS's too?


title: How do I search the linux kernel mailing list archives?

text: I want to research why a Linux kernel feature appears to be missing from my Linux install by searching the Linux kernel mailing list for recent discussions on the subject. The only site that I've found that offers a search of the mailing list archives is gmane. However, searching for terms with quotes (e.g., "/usr/firmware") on gmane does not restrict results to include only the quoted phrase. Is there a more advanced search of the Linux kernel mailing list available?


title: RHEL boot partition size during auto-installation

text: We are installing some servers with same RHEL image. During the installation, all but one, have got no problem and had boot partition in size of 250M. The one server, after the installation has received boot partition in size of 65M. All the installation is automatic from the network and based on the install server which serves as DHCP & TFTP server. (This small 65M partition causes the full installation to fall as there is some kernel patch which should be installed). Where / how to identify where is the problem? BR.


title: Application becomes non-responsive to requests on Raspberry Pi

text: I have written a Python application (using Flask, if it matters) that serves a simple website that I can use to start playback of streaming video on my Raspberry Pi (microcomputer). Essentially, the application allows be to use my phone or tablet as a remote control. I tested the application on Mac OS, and it works fine. After deploying it to the Raspberry Pi (with the Raspbian variant of Debian installed), it serves the website just fine, and starting playback also works as expected. But, once playback is started, the application becomes non-responsive: it will not serve me the website unless I manually stop the playback process (via SSH). In summary, what happens is this:   1. I request the index website   2. Application serves me the website   3. I select a stream to watch (GET request to application)   4. Application receives the requests an starts playback (via Python `subprocess.Popen`)   5. Application redirects me to a page telling me it has started the playback   6. After a while, the subprocess has gathered all the info and starts playback After (6), the application will not respond anymore (so as soon as the stream is actually being downloaded and displayed). I check for processes that take up too many CPU, but the load is only about 20% or so during playback. This makes me think that somehow the stream being downloaded blocks the website requests (although I didn't have this problem on the Mac). My networking knowledge is a bit limited, so I don't really know how to debug this issue any further than this. How can I figure out why my application is not receiving the web requests, and/or how can I ensure the responsiveness of the application during heavy network load?


title: Improving TCP performance over a gigabit network

text: I have two machines both network cards speed is 10Gbps.   * The inbound bandwidth between the two machines is 10Gbps, the outbound bandwidth **internet bandwidth** is 500Mpbs.   * Both machines are using public IP addresses in the public and private network.   * Both machines transfer and connecti on Nginx's port 80, and machine B is used for streaming media, like Youtube streamed videos. I checked the transfer speed using `iperf` utility From **machine A** to **machine B** :               # iperf -c 0.0.0.2 -p 8777     ------------------------------------------------------------     Client connecting to 0.0.0.2, TCP port 8777     TCP window size: 85.3 KByte (default)     ------------------------------------------------------------     [  3] local 0.0.0.1 port 38895 connected with 0.0.0.2 port 8777     [ ID] Interval       Transfer     Bandwidth     [  3]  0.0-10.8 sec    528 KBytes    399 Kbits/sec      My Current Connections in machine B:               # netstat -an|grep ":8777"|awk '/tcp/ {print $6}'|sort -nr| uniq -c        2072 TIME_WAIT          28 SYN_RECV           1 LISTEN         189 LAST_ACK         139 FIN_WAIT2         373 FIN_WAIT1        3381 ESTABLISHED          34 CLOSING      **machine A** Network Card Information:               Settings for eth0:             Supported ports: [ TP ]             Supported link modes:   100baseT/Full                                     1000baseT/Full                                     10000baseT/Full             Supported pause frame use: No             Supports auto-negotiation: Yes             Advertised link modes:  10000baseT/Full             Advertised pause frame use: No             Advertised auto-negotiation: Yes             Speed: 10000Mb/s             Duplex: Full             Port: Twisted Pair             PHYAD: 0             Transceiver: external             Auto-negotiation: on             MDI-X: Unknown             Supports Wake-on: d             Wake-on: d             Current message level: 0x00000007 (7)                                    drv probe link             Link detected: yes      **machine B** Network Card Information:               Settings for eth2:             Supported ports: [ FIBRE ]             Supported link modes:   10000baseT/Full             Supported pause frame use: No             Supports auto-negotiation: No             Advertised link modes:  10000baseT/Full             Advertised pause frame use: No             Advertised auto-negotiation: No             Speed: 10000Mb/s             Duplex: Full             Port: Direct Attach Copper             PHYAD: 0             Transceiver: external             Auto-negotiation: off             Supports Wake-on: d             Wake-on: d             Current message level: 0x00000007 (7)                                    drv probe link             Link detected: yes      `ifconfig` **machine A** :               eth0      Link encap:Ethernet  HWaddr 00:25:90:ED:9E:AA               inet addr:0.0.0.1  Bcast:0.0.0.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:1202795665 errors:0 dropped:64334 overruns:0 frame:0               TX packets:2313161968 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:893413096188 (832.0 GiB)  TX bytes:3360949570454 (3.0 TiB)          lo        Link encap:Local Loopback               inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:2207544 errors:0 dropped:0 overruns:0 frame:0               TX packets:2207544 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:247769175 (236.2 MiB)  TX bytes:247769175 (236.2 MiB)      `ifconfig` **machine B** :               eth2      Link encap:Ethernet  HWaddr 00:25:90:82:C4:FE               inet addr:0.0.0.2  Bcast:0.0.0.2  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:39973046980 errors:0 dropped:1828387600 overruns:0 frame:0               TX packets:69618752480 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000               RX bytes:3013976063688 (2.7 TiB)  TX bytes:102250230803933 (92.9 TiB)          lo        Link encap:Local Loopback               inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:1049495 errors:0 dropped:0 overruns:0 frame:0               TX packets:1049495 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:129012422 (123.0 MiB)  TX bytes:129012422 (123.0 MiB)      ### The problem As you can see from `iperf` utility, the transfer speed from machine A to machine B slow. When I restart network service on machine B the transfer to machine A is at full speed, after 2 minutes, it's getting slow. How could I troubleshoot the slow speed issue and fix it on machine B? Notice: if there are any other commands I should execute on either machine for more information, so it might help resolve the problem, please let me know in comments.


title: How to convert text or character to hex in korn shell

text: Does the unix korn shell provide a function to convert text or character to hex eg. hex 31 32 37 33 34 35 35 36 36 37 value of characters 1273455667 Here i have written the code to display but i don't know how to store the result in a variable               str=1273455667          for (( i=0; i < ${#str}; i++ ))     do     c=${str:$i:1}     if [[ $c == ' ' ]]     then     printf "[%s] %X\n" " " \'\ \'     else     printf "[%s] %X\n" "$c" \'$c\'     fi     done


title: Ubuntu - Booting black screen with purple border

text: After the installation of Ubuntu, when I try to boot a black screen with a purple box appears without let me see the GRUB menu. Then the screen becomes black and Ubuntu starts booting. Ubuntu is the only OS installed, but it's quite annoying as I can't see the bootloader options. What could be wrong?


title: PPTP VPN error: LCP terminated by peer

text: I cannot connect to my PPTP VPN server, even though the CHAP authentication succeeds. This is from /var/log/syslog:               Jun 11 07:27:22 aspire pppd[32221]: CHAP authentication succeeded     Jun 11 07:27:22 aspire pppd[32221]: LCP terminated by peer (MPPE required but cannot negotiate MPPE key length)     Jun 11 07:27:22 aspire pptp[32232]: nm-pptp-service-32219 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed


title: local package cache for arch linux

text: I am running an arch linux system and want to host a few arch linux VMs. For installing and updating the VMs they need access to the arch package repository which is usually achieved by a direct network connection to the official arch servers. In my situation this would result in downloading the same packages again and again for my host and all the VMs. Is there a good way to cache those packages locally to avoid downloading them again?


title: Shell script and adding large values in a delimited file problem

text: I have a script that reads through a delimited file and adds up the 3rd element in the file for each record. For a majority of the data files, this works fine except for one. I have one data file were there are 193 records in the data file. I am expecting to get 2028219.43 back from the script. Instead, I get an exponental number back which appears to have been rounded up. At first I thought that by using printf I will get the number but if the number has already been rounded, then it's not going to give me back what I am expecting. This is the code that I am using to read the delimited datafile. The data in each record is delimited by an *.:               export clm_total=$( awk -F* '{f1+=$3} END {print f1}' datafile.dat)     export new_clm_total=$(printf "%.2f" $clm_total)      This is what shows up in the log when I run the script:               + export clm_total=2.02822e+06     + printf %.2f 2.02822e+06     + export new_clm_total=2028220.00     + echo 2028220.00      This is a sample of the data file. There are more records, I didn't didn't think it was necessare to display all 193 records:               CLM*123456789*4820.9***13:A:1**A*Y*Y     CLM*123698547*3642.05***13:A:7**A*Y*Y     CLM*147852369*579.25***13:A:1**A*Y*Y     CLM*789654123*929.8***13:A:1**A*Y*Y      What I am expecting back is 2028219.43 What I am getting back is 2.02822e+06 Which then gets formatted as 2028220.00


title: Is it possible to copy whole userland into other machine in FreeBSD?

text: AFAIK, FreeBSD has strict separation between base system and userland. IMO, theoretically, it seems possible to transfer whole userland to other machine by simple copying. If the base systems are equal (version) Can I actually copy the userland by simple copying? If it's possible what directories should I copy? If it is not, what's the major reason which prevent copying userland configurations? **Update** The term _userland_ seems to be wrong in the text. My intention was **stuffs of full OS except base system** , and I don't know correct wording for this.


title: Compiling OpenSSH client or Dropbear for Android

text: I have an interesting problem. I'd like to use a private SSH key with my Android Terminal Emulator (`jackpal.androidterm`). I'd like to install the private key in a fairly- secure location and be able to access the key in a fairly straightforward way. I'd like to do this:               ssh theotherserver      With a `~/.ssh/config` file looking like this:               Host theotherserver         User mycustomuser      And the private key being read from `~/.ssh/id_rsa`. The problem is that Dropbear by default looks in `/data/.ssh` (at least here on CyanogenMod 11) and this folder is meant to be owned by `root`. I've done a `chown` and `chmod` on the directory and its children to be able to use it with the "app user" which is `u0_a100`, and that works, but these permissions are wiped on reboot: so no go. What I'd really like to do is to simply tell Dropbear via a configuration file that its home lives in `/data/data/jackpal.androidterm/app_HOME/.ssh`, as this directory will be 'for sure' owned by the "app user" and I won't run into any permissions issues. An added benefit is that other users won't be able to read this directory as it is private to the application. (dir permissions is `drwxrwx--x`) Is there a way to configure Dropbear with a configuration file to change the location of its default `.ssh` directory? It would be awesome if it just used `$HOME`, but it's obviously not. If that is impossible, how can I compile OpenSSH client or Dropbear for Android in a way that would enable me to achieve my (seeming simple) goal?


title: Unstable wireless connection on Debian 7.5 with a AR9382 chipset

text: I recently reformatted my primary drive (I have a custom built machine based on a Clevo P150 chassis), and decided to opt for Debian (7.5 / Wheezy) after some years using Ubuntu. My issue - which I believe I also had in my Ubuntu days - is that my wireless connection is unstable and tends to stall every 30-60 minutes or so; there is no error or notice of disconnection, web pages simply won't load and IRC doesn't seem to respond (until it disconnects). After a five minutes or so or after reconnecting to my network, the connection returns. My wireless card is a Bigfoot Killer Wireless-N 1102 which sports a AR9382 chipset, which ath9k is meant to support (and indeed mostly seems to do). Other than checking the drivers I have no idea how to begin diagnosing this issue, so any and all ideas will be appreciated.


title: SCSI Tape drive on ubuntu and centos

text: On ubuntu 12.10 I have those SCSI drives:               [1:0:0:0]    cd/dvd  TSSTcorp CDDVDW TS-H653N  0208  /dev/sr0      [2:0:0:0]    disk    Generic  USB SD Reader    1.00  /dev/sdb      [2:0:0:1]    disk    Generic  USB CF Reader    1.01  /dev/sdc      [2:0:0:2]    disk    Generic  USB SM Reader    1.02  /dev/sdd      [2:0:0:3]    disk    Generic  USB MS Reader    1.03  /dev/sde      [3:0:0:0]    mediumx HP       C7200            162D  /dev/sch0     [3:0:1:0]    tape    HP       Ultrium 1-SCSI   E24V  /dev/st0       On centOS 5.9 I have those SCSI drives:               [0:0:0:0]    disk    ATA      Hitachi HDT72503 V54O  /dev/sda     [1:0:0:0]    cd/dvd  TSSTcorp CDDVDW TS-H653N  0208  /dev/sr0     [2:0:0:0]    disk    Generic  USB SD Reader    1.00  /dev/sdb     [2:0:0:1]    disk    Generic  USB CF Reader    1.01  /dev/sdc     [2:0:0:2]    disk    Generic  USB SM Reader    1.02  /dev/sdd     [2:0:0:3]    disk    Generic  USB MS Reader    1.03  /dev/sde      Loaded kernel modules on ubuntu.   Loaded kernel modules on centos.   This is the same machine, with same adapter, but with different operating systems. In both situations `st` kernel module is loaded, but in centos I don't have my tape library in lsscsi and in /dev/st0. What might be the cause that this won't work on centOS ?


title: Trying to compare a variable that is multiline in a if comparison

text: Here is the current file I am running:               #!/bin/ksh -x          export BIN_DIR="../../env"     . $BIN_DIR/vdenv.ksh          success="DROP     CREATE TABLE     GRANT"          $worker_dir/runsql.ksh ddl X X > chnl_avt_v1.log     result=$(sed -e '/DROP/,/GRANT/!d' chnl_avt_v1.log)          if [ "$result" -eq "success" ]; then            echo "hi"     else             echo "NOO"     fi      Below is the error I receive even though I know that both $success and $result are the same. I am a newbie UNIX user.               result=DROP     CREATE TABLE     GRANT     + [ DROP     CREATE TABLE     GRANT -eq success ]     master_list_ddl.ksh[13]: DROP ^JCREATE TABLE^JGRANT: syntax error     + echo NOO     NOO


title: How do I watch protected flash videos (such as on nbcolympics.com) using Linux?

text: For people from the US with certain cable TV subscriptions, NBC offers footage of the 2014 winter Olympics from a website, nbcolympics.com. However, I find I am unable to view any of the video content from my Linux machine. I have tried from Chrome and Firefox. **Chrome** : When clicking on a video, I am taken to the webpage of the video and all of the non-video content (e.g. the twitter stream, the summary of the video) loads. However, the page is covered in a dark transparent overlay and a "waiting" spinner continuously spins. I cannot click on anything from the web page. **Firefox** : When clicking on a video, I am taken to the webpage of the video and all of the non-video content loads. The page is also covered with a dark, transparent overlay, but this time with a window in the middle to choose my cable provider. When I select my cable provider, xfinity, the page re-loads and the same screen appears again, with the same transparent overlay and the same dialog asking for my cable provider. Here is a screenshot of the Firefox window: ![Firefox showing dialog to select cable company](http://i.stack.imgur.com/kIJft.png) I am using Fedora 19 and do not generally have problems viewing other flash content. Is there any method to watching the videos on nbcolympics.com from a Linux computer?


title: Arch CPU temperature much higher than on Debian

text: I switched to Arch Linux from Debian/Crunchbang and noticed much higher temperature. It's almost the same configuration: openbox, etc and Arch runs with 57-70 °C but Debian works with 43°C - 50°C I really like Arch, but I can't fix it, my touchpad gets really hot. It's something with software, because wheezy was cold enough for comfortable work.


title: If statements into Array

text: I'd like to ask if below code (multiple if statements) can be converted into array? Here:               if [ "$(egrep -l 'NU.PRODUCT' $LINE)" ]; then         VALUE='PRODUCT'     elif [ "$(egrep -il 'NU.SERVICE' $LINE)" ]; then         VALUE='SERVICE'     elif [ "$(egrep -il 'NU.COMMERCE' $LINE)" ]; then         VALUE='COMMERCE'     elif [ "$(egrep -il 'NU.EDUCATION' $LINE)" ]; then         VALUE='EDUCATION'     else         VALUE='OTHERS'     fi


title: Linux as router with multiple internet providers

text: Linux as router: I have 3 Internet providers, each with its own modem. **Provider1** , which is gateway address 192.168.1.1   Connected to linux router **eth1** /192.168.1.2 **Provider2** , gateway address 192.168.2.1   Connected to linux router **eth2** /192.168.2.2 **Provider3** , gateway address 192.168.3.1   Connected to linux router **eth3** /192.168.3.2                                                                                ________                                                        +------------+         /                                                        |            |        |                                 +----------------------+ Provider 1 +--------|             __                  |192.168.1.2           |192.168.1.1 |       /         ___/  \_         +------+-------+              +------------+      |       _/        \__      |    eth1      |              +------------+      /      /             \ eth0|              |192.168.2.2   |            |      |     |Client network -----+  ROUTER  eth2|--------------+ Provider 2 +------|     Internet      \10.0.0.0/24 __/    |              |              |192.168.2.1 |      |        \__     __/       |    eth3      |              +------------+      \           \___/          +------+-------+              +------------+       |                                 |192.168.3.2           |            |       \                                 +----------------------+ Provider 3 +-------|                                                        |192.168.3.1 |       |                                                        +------------+       \________      I would like to route the clients in network 10.0.0.0/24 by source IP to different gateways.   The interface to the client network is **eth0** /10.0.0.1, which is the default gateway for all clients. For example:   10.0.0.11 should be routed to Provider1 @ eth1   10.0.0.12 should be routed to Provider2 @ eth2   ...and so on... I think I need to use `ip route` and `iptables` for SNAT, but I have not figured out exactly how.   Here is the script I have so far.   ipv4 forwarding is enabled.               #!/bin/bash     # flush tables     ip route flush table connection1     ip route flush table connection2     ip route flush table connection3          # add the default gateways for each table     ip route add table connection1 default via 192.168.1.1     ip route add table connection2 default via 192.168.2.1     ip route add table connection3 default via 192.168.3.1          # add some IP addresses for marking     iptables -t mangle -A PREROUTING -s 10.0.0.11 -j MARK --set-mark 1     iptables -t mangle -A PREROUTING -s 10.0.0.12 -j MARK --set-mark 2     iptables -t mangle -A PREROUTING -s 10.0.0.13 -j MARK --set-mark 3          # add the source nat rules for each outgoing interface     iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 192.168.1.2     iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to-source 192.168.2.2     iptables -t nat -A POSTROUTING -o eth3 -j SNAT --to-source 192.168.3.2          # link routing tables to connections (?)     ip rule add fwmark 1 table connection1     ip rule add fwmark 2 table connection2     ip rule add fwmark 3 table connection3          #default route for anything not configured above should be eth2


title: Why does `at` warn me that commands will be executed using /bin/sh? What if I want a different shell?

text: I tried to use `at` from within a script of mine and it prints: > warning: commands will be executed using /bin/sh How would I use different shell if I wanted?


title: How do I access a login through ssh when there is no password set?

text: I would like to be able to access my home machine's account over ssh from a remote desktop. It allows me to connect when I say ssh uname@ip_addr, but it then prompts for a password. This account has no password set up. Is there some way to simply connect with no password? (Usually when the need arises to do this I'm on Mac OSX or FreeBSD, occasionally Fedora.) Any help would be appreciated. (A reference to a line on a man page or equiv. would be an acceptable answer.)


title: Gentoo 3.8.13 x86_64 Update problem

text: I am trying to perform full system update for my Gentoo 3.8.13 x86_64               emerge --update --deep --with-bdeps=y --newuse world      But I am getting the following error               !!! Problem resolving dependencies for media-video/vlc from @selected     ... done!          !!! The ebuild selected to satisfy "media-video/vlc" has unmet requirements.          - media-video/vlc-2.0.7::gentoo USE="a52 aac alsa avcodec avformat cdda dbus dts dvbpsi dvd encode ffmpeg flac gcrypt gnome libnotify mmx mp3 mpeg ncurses ogg opengl png postproc pulseaudio qt4 samba sdl sse svg swscale truetype udev vorbis x264 xcb xml xv -X -aalib (-altivec) -atmo (-audioqueue) -avahi -bidi -bluray -cddb -dc1394 -debug -dirac (-direct2d) -directfb (-directx) (-dshow) -dvb (-dxva2) -egl -fbosd -fluidsynth -fontconfig -gme -gnutls -growl -httpd -ieee1394 (-ios-vout) -jack -kate -kde -libass -libcaca -libproxy -libsamplerate -libtar -libtiger -linsys -lirc -live -lua (-macosx) (-macosx-audio) (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-macosx-vout) -matroska (-media-library) -modplug -mtp -musepack (-neon) -omxil -optimisememory -opus -oss -portaudio -projectm -pvr -rtsp -run-as-root -schroedinger -sdl-image -shine -shout -sid -skins -speex -sqlite -switcher -taglib -theora -twolame -upnp -v4l -vaapi -vcdx -vlm (-waveout) (-wingdi) -wma-fixed -xosd -zvbi"          The following REQUIRED_USE flag constraints are unsatisfied:          qt4? ( X ) sdl? ( X )          The above constraints are a subset of the following complete expression:          aalib? ( X ) bidi? ( truetype ) cddb? ( cdda ) dvb? ( dvbpsi ) dxva2? ( avcodec ) egl? ( X ) ffmpeg? ( avcodec avformat swscale postproc ) fontconfig? ( truetype ) gnutls? ( gcrypt ) httpd? ( lua ) libcaca? ( X ) libtar? ( skins ) libtiger? ( kate ) media-library? ( sqlite ) qt4? ( X ) sdl? ( X ) skins? ( truetype qt4 X ) switcher? ( avcodec ) vaapi? ( avcodec X ) vlm? ( encode ) xosd? ( X ) xv? ( xcb )          (dependency required by "@selected" [set])          (dependency required by "@world" [argument])      Can anyone suggest me, how can I perform a full update * * * Thanks to every one, It works when I add the X use flag in make.conf. but Now I got some message from the update,               * Messages for package x11-drivers/ati-drivers-13.4:          *   CONFIG_DRM must be disabled or compiled as a module and not loaded for direct     *   rendering to work.     * Please check to make sure these options are set correctly.     * Failure to do so may cause unexpected problems.     *      * Please note that this driver only supports graphic cards based on     * Evergreen chipset and newer.     * This includes the AMD Radeon HD 5400+ series at this moment.     *      * If your card is older then use x11-drivers/xf86-video-ati     * For migration informations please refer to:     * http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml     * To switch to AMD OpenGL, run "eselect opengl set ati"     * To change your xorg.conf you can use the bundled "aticonfig"     *      * If you experience unexplained segmentation faults and kernel crashes     * with this driver and multi-threaded applications such as wine,     * set UseFastTLS in xorg.conf to either 0 or 1, but not 2.     *      * Fully rebooting the system after an ati-drivers update is recommended     * Stopping Xorg, reloading fglrx kernel module and restart Xorg     * might not work     *      * Some cards need acpid running to handle events     * Please add it to boot runlevel with rc-update add acpid boot      I have the following AGP card               VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Park [Mobility Radeon HD 5430/5450/5470]     Audio device: Advanced Micro Devices [AMD] nee ATI Cedar HDMI Audio [Radeon HD 5400/6300 Series]      do I need to worry about this message or I should leave this message unattended? any suggestion


title: Looping through commands' results, KSH script

text: I'd like to put two strings in two different variables. Let's take a small example. after a simple grep, I got this :               $ grep nl.*acc.*bas :     ABAS01=...     ABAS02=...      I'd like to have two variables, one containing ABAS01, and the other containing ABAS02. How can I do this ? I guess a loop can be used to go through all the results from my query, then I could do a `cut -d= -f1` to retrieve the name of the variables. How can I do this ?


title: Error mounting drive with fstab

text: I have an small server in my house with an external usb 2TB hard drive: `/dev/sdb1: LABEL="Data" UUID="eedc3098-221d-4800-b8b4-efa4fef23f5f" TYPE="ext4"` I have the next line in `/etc/fstab`: `UUID=eedc3098-221d-4800-b8b4-efa4fef23f5f /home/data ext4 defaults 0 2` When I boot the system I get the next error: `Unable to resolve 'UUID=eedc3098-221d-4800-b8b4-efa4fef23f5f' fsck died with exit status 8` Then, the system ask me about root password for maintenance. If I log in like root and type: `fsck.ext4 'UUID=eedc3098-221d-4800-b8b4-efa4fef23f5f'` I get: `Data: clean 99709/122101760 files, 232470354/488378368 blocks` If I say to fsck to not ckeck the filesystem on startup (changing last 2 into a 0) the system starts properly (with the warning: `special drive UUID=eedc3098-221d-4800-b8b4-efa4fef23f5f doesn't exist`) and my partition doesn't mount. But the uuid exists in `/dev/disks/by-uuid` How can I mount my drive properly? I thoght that maybe it can be a problem related with USB


title: startx from mac osx to RHEL6

text: I am trying to get a GUI over ssh -X. My RHEL6 server did not have X Window System and a graphical desktop environment. So I installed using `yum groupinstall "X Window System" Desktop`. It installed completely. I also enabled `X11 Forwarding`. Now I am trying to get the GUI from ssh from my Mac. I do `ssh -X devserver`. Then I type `sudo startx`, but it gives me this error.               Initializing built-in extension Generic Event Extension     Initializing built-in extension SHAPE     Initializing built-in extension MIT-SHM     Initializing built-in extension XInputExtension     Initializing built-in extension XTEST     Initializing built-in extension BIG-REQUESTS     Initializing built-in extension SYNC     Initializing built-in extension XKEYBOARD     Initializing built-in extension XC-MISC     Initializing built-in extension XINERAMA     Initializing built-in extension XFIXES     Initializing built-in extension RENDER     Initializing built-in extension RANDR     Initializing built-in extension COMPOSITE     Initializing built-in extension DAMAGE     Initializing built-in extension MIT-SCREEN-SAVER     Initializing built-in extension DOUBLE-BUFFER     Initializing built-in extension RECORD     Initializing built-in extension DPMS     Initializing built-in extension X-Resource     Initializing built-in extension XVideo     Initializing built-in extension XVideo-MotionCompensation     Initializing built-in extension SELinux     Initializing built-in extension XFree86-VidModeExtension     Initializing built-in extension XFree86-DGA     Initializing built-in extension XFree86-DRI     Initializing built-in extension DRI2     Loading extension GLX     GNOME_KEYRING_SOCKET=/tmp/keyring-2T42OF/socket     SSH_AUTH_SOCK=/tmp/keyring-2T42OF/socket.ssh     GNOME_KEYRING_PID=14059          ** (gnome-panel:14074): CRITICAL **: panel_key_file_load_from_uri: assertion `uri != NULL' failed          ** (gnome-panel:14074): CRITICAL **: panel_key_file_load_from_uri: assertion `uri != NULL' failed          ** (gnome-panel:14074): WARNING **: panel-applet-frame.c:1288: failed to load applet OAFIID:GnoteApplet:     (null)      **Is this the right way. If not how do I properly get a GUI of RHEL on mac?**


title: No font in emacs on CentOS

text: When I open emacs over an SSH connection I get this error               Warning: Cannot convert string "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct     Warning: Cannot convert string "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1" to type FontStruct      and the font is replaced with empty squares. Does anyone know what could be wrong? ![enter image description here](http://i.stack.imgur.com/wlK8u.png)


title: Extracting text string from file, assigning them to variables then writing them to another file?

text: Basically, its a game server (minecraft) and I have a situation where I am attempting to automate new world generation. Basically, I have a file that gets generated happily which has this snippet in it. file1.txt               keepSpawnInMemory: 'true'     spawnLocation:       ==: MVSpawnLocation       yaw: 0.0       pitch: 0.0       z: 256.5       y: 62.0       x: -223.5     autoLoad: 'true'     bedRespawn: 'true'      This works fine, but I need to extract the z: 256.5, y:62.0 and x: -223.5 respectively and then write a file called file2.txt with the following lines.                world: mine      x: -223.5      y: 62.0      z: 256.5      yaw: 0.0      pitch: 0.0      name: mine      I assume I'll be using something like awk to extract the initial numbers, assigning them to variables then writing the file? I have never used awk before, and I am insanely confused. Appreciate any help in this guys. Im using Ubuntu linux, bash scripts. Can I extract text like that and make them into variables using awk and bash? EDIT: I did forget to mention that the file 1 has multiple instances of x,y and z. It can be accessed here: http://pastebin.com/TqaLcWzV Is there a way to start at a certain line? For example, z, y and x will always be on lines 183, 184 and 185 respectively.


title: SSH tunnelling explained in layman's terms

text: I've just used this guide to create a SSH tunnel to bypass my corporate proxy. I didn't use the usual "Putty", but in "MobaXterm" (a program similar to putty that also offers unix tools) I wrote, to create the tunnel:               ssh -D 7070 -p 22 user@yourserver.com sleep 9999      Then I went to my browser (Firefox) and I told it to use _SOCKS_ on the _localhost_ port **7070**. All is good and it's working, but I have no clue on how the underling technology actually works. I mean, on a general level I know how the process works, but I would like to go a little deeper than that. What I mean is, currently we can compare my knowledge to the one I have of cars: I know there is an engine, 4 wheels, etc, but I have no clue how the engine actually uses gasoline to move the car. The 2 answers I received so far only explain to me what I already know. I have a CCNP, work in a datacenter as network engineer, know how to program, know fair enough of the Linux environment. What I would like to have from you is a thorough (but less than a 20-pages-long-RFC) answer. The answer should include:   1. A description of the main options tunnel-wise. A good example is the image in this answer: Understanding SSH tunnels   2. Which type of tunnel is used when and for what (normal tunnels, reverse tunnels)   3. A wireshark capture of the before/after the tunnel   4. An image explaining the process (I am a visual guy after all) I promise that **I will give 100 points** as soon as I can put a bounty on the question. I really need a good answer on this. (In case I forget about the bounty, please email me: ilcon7e[at]gmail[dot]com **_EDIT_** Improved the question.


title: How to retrieve environment variable from string name in KSH

text: I've the following variable :               x="envVar"      and 'envVar' is the one of my environment variable's name containing a path (of a folder by instance). So I'd like to do               cd $x       but it doesn't work. How can I do to use x's value as the environment variable ? I wasn't able to make it work with "eval".


title: apostrophe appearing whenever type letters with soft signs

text: I use a Latvian keyboard layout (apostrophe variant) and whenever I type letters with a soft sign it prints an actual apostrophe before each letter. For example, instead of `āēģņļ`, I get `'ā'ē'ģ'ņ'ļ`. How can I fix this?


title: Convert text to image in centos from bash

text: I want to create an image [jpg, png, doesn't matter] from shell but I don't have convert command. The image is very simple - white background with a medium-size black text in the middle. Is it possible?


title: ls with find :: report total size

text: I am trying to get the total size of files satisfying a `find`, e.g.:               ls  $(find -maxdepth 2 -type f)      However, this kind of invocation of `ls` does not produce the total size as well.


title: show part of wraped lines in vim instead of hiding it with the @ character

text: I use `vim` not only for coding but also for text writing. In this context I use the wrap and linebreak options to wrap my text. Since lines - forming paragraphs in text writing - can be very long a wraped line easily does not fit in the lower part of the screen so `vim` hides all the wrapped line replacing the visible part of it with the @ symbol. Is there any chance to avoid this so that `vim` just shows the part of the wraped line that still fits at the bottom of the screen?


title: How does createrepo work. How does yum understand parse its files. A conceptual explanation

text: I am **not** looking for a how-to on creating a repo (createrepo) or using yum. I want to understand how they work together.   I want to know what files yum looks at and why, what those files contain.   I want to understand the structure of the repo and its files. I want to understand how it all works together.   I have read many how-to's, I am looking for a more conceptual understanding. I working with Centos 6 32bit.


title: Use "grep" to match text in multiple files

text: I have data in multiple files. I want to find some text that matches in all files. Can I use the `grep` command for that? If yes then how?


title: Waiting until SSH tunnel (ssh -w) is set up before running command

text: When using SSH VPN tunnelling (-w option), is there a way to know when the tunnel is actually up? I want to use this in a script that automatically sets up the tunnel by running ssh -w then running ifup [1]. The -f option doesn't help because it returns after connecting to the server but before the tunnel is up. Sleeping for a few seconds does work, but it just feels too hacky. The LocalCommand option seems to work, for example:               ssh -w 0:1 "-oLocalCommand=ifup tun0" "-oPermitLocalCommand=yes" myserver.example.org true      However, the man page says: "The command is run synchronously and does not have access to the session of the ssh(1) that spawned it." Is the above invocation guaranteed to work or was it just luck that LocalCommand was executed after the tunnel is set up? More importantly, is there a standard way for using ssh -w in scripts? [1] I'm on Fedora, ifup works because I've set up `/etc/sysconfig/network- scripts/ifcfg-tun0` and `/etc/sysconfig/network-scripts/route-tun0`


title: How to specifying different ports for multiple host in cssh?

text: I am using `cssh` to telnet into multiple hosts at the same time. I have changed the `ssh=/usr/bin/telnet` to point to the telnet program. The problem I am facing is that each host uses different port for telnet. I tried the following format but it did not work               cssh host1:100 host2:200 host3:300      How do I specify different port numbers for the different host?


title: stat meanings of computing nodes

text: I submitted a job to a Linux cluster which uses SGE job scheduler. The job stat is qw for a long time, so I inspected the stats of computing nodes using "qstat -f". I found that many nodes were labelled with stats "d", "adu" and "E". I wonder what these stats mean. The Grid Engine Man pages listed these stats for filtering queue instances ( `-qs {a|c|d|o|s|u|A|C|D|E|S}` ), but no further explanation on the meaning of these stats. What do the states mean?


title: How do I install the latest gcc on FreeBSD?

text: How do I install the latest `gcc` on FreeBSD ind set up the system so that this latest version would be used to compile further programs? At the moment of this writing the latest release of `gcc` is version 4.9.0. I use FreeBSD 10.0. I actually need `g++`, the C++ compiler, but I need to install something like `gcc49` package for it, right?


title: I cannot use yum command and ssh after mount drive.(CentOS)

text: As the title above, I cannot use yum command after I mount like below.               mount /dev/xvdb3 /usr          Filesystem                         Size  Used Avail Use% Mounted on     /dev/xvda                          9.9G  1.9G  7.6G  20% /     none                               3.7G     0  3.7G   0% /dev/shm     /dev/xvdb1                        1012M   34M  927M   4% /tmp     /dev/xvdb2                          20G  250M   19G   2% /var     /dev/xvdb3                          15G  1.5G   13G  11% /usr     /dev/mapper/instancevg-instancelv  792G  197M  751G   1% /home          [root@ip-10-0-0-10 ~]# yum     -bash: yum: command not found      I can use yum after I umount /dev/xvdb3.   ssh cannot connect remotely after disconnected from the server.   I MUST REBOOT server to connect by ssh.   What should I do?


title: Xenomai and Ubuntu

text: I have installed xenomai 2.4.8 in Ubuntu 11.04 with this command:               apt-get install libxenomai-dev      Now I want test a simple vxWorks program, but when I compile my program, I receive this message: > Xenomai: vxworksskin or CONFIG_XENO_OPT_PERVASIVE disabled   >  (modprobe xeno_vxworks?) ...and the output of `modprobe xeno_vxworks` is: > FATAL: Module xeno_vxworks not found My question is, how can I eanble the xeno_vxworks module? I am new to Xenomai so please forgive me if my question is silly.


title: Why isn't the Iptables persistent service saving my changes?

text: I followed this tutorial to set up IP rules on ubuntu 12.04. Everything worked fine on setup -- but now I've made changes to the firewall that do not persist upon reboot. I do not understand why that is. Here is a demonstration of how I am using iptables-persistent. What am I doing wrong?               $ sudo service iptables-persistent start      * Loading iptables rules...                                                                                *  IPv4...                                                                                *  IPv6...             $ sudo iptables -L   //shows a certain rule     $ iptables -D INPUT ... //command successfully drops the rule     $ sudo iptables -L   //shows rule has been deleted           $ sudo service iptables-persistent restart      * Loading iptables rules...                                                                                *  IPv4...                                                                                *  IPv6...                                                                                [ OK ]       $ sudo iptables -L  //rule is back


title: No hibernate option in power manager on Mint 16 MATE

text: In my fresh install of Linux Mint 16 with MATE, I have no hibernate option in the Power Manager; only suspend and shutdown. In the Quit menu I have hibernate as an option. Also `sudo pm-hibernate` works from the command line. Any suggestions of how to enable hibernate in the Power Manager? I want to hibernate when the laptop lid closes. I have just enough swap space for hibernation to work:               $ free -h                  total       used       free     shared    buffers     cached     Mem:          3.5G       1.6G       1.8G         0B        18M       406M     -/+ buffers/cache:       1.2G       2.3G     Swap:         3.6G        16M       3.6G


title: Unable to boot to windows

text: Context: Recently I've bought an SSD. Before that I had 2 HDDs; one being a 500GB drive with a W7 installation, and another 320GB Drive containing two partitions, one of which for storage (NTFS) and another to hold a linux mint installation (Which I'm currently on). When the SSD arrived I set up another W7 installation. Once this was fully set-up, I wanted to format the 500GB drive to use it for storage. I've done this today, and as a result wiped the windows loader from my system. Ideally, what I would like is for the windows boot manager to be on the SSD, and a grub installation on the 320GB drive. Then I'd like the system to boot to the 320GB drive, and give options to load the Windows boot manager, or boot to linux. Since the windows drive cannot be booted to, when running a W7 disc and using CLI I get the error "element not found" when attempting to use "recboot /fixboot". using /scanos does find my W7 installation however. I've also set the W7 partition as active and rebooted, but had the same results. I've also attempted using boot-repair, however my system still cannot boot to windows. My current boot summary is here. My current grub boot menu just lists the mint installations. How can I fix this to include a windows boot loader? @terdon:               Generating grub.cfg ...     Found linux image: /boot/vmlinuz-3.11.0-15-generic     Found initrd image: /boot/initrd.img-3.11.0-15-generic     Found linux image: /boot/vmlinuz-3.11.0-12-generic     Found initrd image: /boot/initrd.img-3.11.0-12-generic       No volume groups found     done


title: Linksys wusb600n support on Debian-6

text: I'm on my way from Windows 7 to Debian 6. The only problem... I'm not sure about my network adapter. Its Linksys wusb600n and without it - no internet access for me.   * Does Debian 6 support it?   * Will it be supported without additional drivers (or what they are called)?


title: Print the system clipboard content in bash

text: There is a way to put some command output to system clipboard via `xclip`.               some-command | xclip -selection clipboard      I'd like to perform a reverse task - Print system clipboard to terminal. How it can be done?


title: awk with if statements

text: I am trying to print from a file using awk, but my output is empty. Here is my code so far               accountNum=$1     while read -r LINE || [[ -n $LINE ]] ; do                 awk -F',' '{ if($1==accountNum) { print $3.$2 } }' Accounts     done < Accounts      I have also tried this:               accountNum=$1     while read -r LINE || [[ -n $LINE ]] ; do                 echo $LINE  | awk -F',' '{ if($1==accountNum) { print $3.$2 } }'      done < Accounts      The input file is :               1,Doe,John     2,Rooney,Wayne     3,Smith,Will     4,Crow,Russel     5,Cruise,Tom      The expected output when I run the file is               $./file.sh 3     Will Smith      But I get the following               $./file.sh 3     $      That is nothing is being printed out. I know the solution with cut, but I want to use awk.


title: Copy files without encryption (ssh) in local network

text: `scp` works well in all cases, but the Raspberry Pi is to weak to copy files efficiently in a secure environment (lan). The theoretically possible 6,75 MB/s via 54 Mbit wireless lan shrink down to about 1.1 MB/s. Is there a way to copy files remotely without encryption? It should be a cli command with no dependencies to extra services (ftp, samba) or at least with a minimum of configuration. I mean, a standard tool that works quite well out-of-the-box with standard programms/services (like scp/ssh).


title: Can subsequent nameservers defined in /etc/resolv.conf be used if the previous nameservers can not be resolved?

text: I don't know much about networking...but I've been spending a lot of time reading about it. In my `/etc/resolv.conf` I have listed 3 `nameservers`. I understand that the second name namer is used only if the first one has a failure, or times out. Is there a way for me to get it to use the second one when the first one cannot be resolved? This is on my Centos workstation. I'm not running a nameserver.


title: Extracting a file attachment from an email message and saving it to a file?

text:
I have an email stored in plaintext (yes, headers, messages, attachments, everything in one plaintext file) and I'd like to extract a PDF document from it. I've copied the base64-encoded text, then ran it through `base64 -d` and `cat`ted it to a file. I then tried opening it up, which didn't work, and it doesn't appear like a PDF file. Is there something I'm doing wrong here? I'm fairly certain that it is, indeed, encoded in base64 and that it's a PDF file. Here is the email:               ---------- MESSAGE FOLLOWS ----------     Date: Tue, 6 Mar 2012 12:24:24 -0800 (PST)     From: "Outer, Inc." <admin@outer.com>     To: Mike Young <inner@outer.org>     Message-ID: <169371530.01331065464959.JavaMail.admin@outer.com>     Subject: Your results are in, Mike!     MIME-Version: 1.0     Content-Type: multipart/mixed;          boundary="----=_Part_0_1998493940.1331065464916"     X-Peer: 127.0.0.1          ------=_Part_0_1998493940.1331065464916     Content-Type: multipart/alternative;          boundary="----=_Part_1_1254200493.1331065464936"          ------=_Part_1_1254200493.1331065464936     Content-Type: text/plain; charset=us-ascii     Content-Transfer-Encoding: 7bit          Great job, Mike on your baby!     ------=_Part_1_1254200493.1331065464936     Content-Type: text/html; charset=us-ascii     Content-Transfer-Encoding: 7bit
Great job, Mike on your baby!
                   ------=_Part_1_1254200493.1331065464936--          ------=_Part_0_1998493940.1331065464916     Content-Type: application/pdf; name="Baby Results.pdf"     Content-Transfer-Encoding: base64     Content-Disposition: attachment; filename="Baby Results.pdf"          JVBERi0xLjQKJeLjz9MKMyAwIG9iaiA8PC9UeXBlL1hPYmplY3QvQ29sb3JTcGFjZS9EZXZpY2VH     cmF5L1N1YnR5cGUvSW1hZ2UvQml0c1BlckNvbXBvbmVudCA4L1dpZHRoIDI1My9MZW5ndGggMTYx     ...     HR5P9F0eg4+P8tWzo2bPl6eGcNwyLqqW+chQi7Fo/CTWPUI7Kud1ZYgpcnSg7do4SKpTy10jyggP     1dVbvqS63pYxNl1JGGcvD1P+VFdN2b7O3YBqXTuiRteun3nmUdcoObmr5qduv09


title: How to follow symlinks in NFS?

text: I have different disks with pictures               /media/drive1/pictures/     /media/drive2/pictures/     /media/drive3/pictures/     /media/drive4/pictures/     # ...      I have a folder called **share** which has symlinks for _every_ subfolder of each _pictures_ directory of each drive. I merge every subfolder with a script like this:               # I do this for every drive     for item in "/media/drive1/pictures/"*     do         target=/media/share/pictures/`basename "$item"`         if [ ! -d "$target" ]; then             ln -s "$item" "$target"             chown -h lsc:lsc "$target"         fi     done      I've been sharing this successfully with Samba for a whlle now.               [global]     # ...     follow symlinks = yes      Since this is a pure private network and the share is READONLY, security isn't a big deal.               ### /etc/exports     /media/share *(ro,async)      When I mount my share `mount 1.2.3.4:/ foo` the symlinks try to follow on the local host. **My question:** How can I share a folder that follows symlinks _on_ the host that's sharing the mount? **NOTE:** The `bind bind` solution in `/etc/fstab` won't work here, since every subfolder of `/media/share/` points to different locations/disks.


title: How can I update to a newer version of Git using apt-get?

text: I've just set up a new machine with Ubuntu Oneiric 11.10 and then run               apt-get update     apt-get upgrade     apt-get install git      Now if I run `git --version` it tells me I have `git version 1.7.5.4` but on my local machine I have the much newer `git version 1.7.9.2` I know I can install from source to get the newest version, but I thought that it was a good idea to use the package manager as much as possible to keep everything standardized. So is it possible to use `apt-get` to get a newer version of `git`, and what is the right way to do it?


title: How to automatically install packages?

text: I want to install packages automatically by running a script I can write `yum install php`, but I want it to install another package once installation of the php package is completed. Is there any solution to make it automatic? I have around 20 packages which are to be downloaded from remi repository.


title: How Can I Reset Graphics Drivers and Restore Defaults?

text: I tried to install AMD graphics without reading. My CrunchBang crashed and now every time I try to login, my keyboard inputs don't go into the login screen. I can reset X with `Ctrl`+`PrtScn`+`K` and it resets but same issue appears. How can I fix that and any other driver issues that may have evolved from my ignorance?


title: fix ctrl-O in xterm?

text: I'm trying to investigate the vt100 alternate graphics character-set with xterm. And somehow my setup doesn't allow the examples to work correctly. The sequence "`Esc`(B" sets the G0 character set to US ASCII. "`Esc`)0" sets the G1 character set to the alternate graphics character set. "`Ctrl`+`N`" (ascii Shift-Out) switches to the G1 set. But "`Ctrl`+`O`" (ascii Shift-In) to shift back to G0 is not taking effect (investigating with `cat`). It seems to be hijacked by the pty or something. `stty -a` shows               $ stty -a     speed 38400 baud; rows 60; columns 97; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = ^Z;     start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;     min = 1; time = 0;     -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts     -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany     imaxbel     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke      Now, I can call "stty flush `ctrl-V``ctrl-E`" (just to pick something seemingly innocuous), and the read-out from `stty -a` changes. But still `ctrl-O` doesn't shift me back to the G0 set. What else can I do to fix this? I'm using Cygwin32 xterm on Windows 8.


title: Using nvidia-settings over ssh

text: Now the new nvidia-driver has implemented CoolBits for the newer graphics cards I'm attempting to control fan/clock speed over ssh. When attempting to run anything with nvidia-settings via ssh I get errors like the following:               user@system:~$ nvidia-settings -a [gpu:0]/GPUOverclockingState=1     ERROR: The control display is undefined; please run `nvidia-settings --help`            for usage information.     user@system:~$ nvidia-settings -q GPU3DClockFreqs     ERROR: The control display is undefined; please run `nvidia-settings --help`            for usage information.      Is this due to the Xorg server not starting up (No monitor plugged in) and nvidia can't hook into the Xorg's current graphics card? Is there a way to specify the GPU nvidia-settings uses?               user@system:~$ nvidia-settings -v     nvidia-settings:  version 337.19  (buildmeister@swio-display-x86-rhel47-04)     Tue Apr 29 20:12:23 PDT 2014       The NVIDIA X Server Settings tool.            This program is used to configure the NVIDIA Linux graphics driver.       For more detail, please see the nvidia-settings(1) man page.            Copyright (C) 2004 - 2010 NVIDIA Corporation.          user@system:~$ uname -a     Linux system 3.2.0-64-generic-pae #97-Ubuntu SMP Wed Jun 4 22:22:15 UTC 2014 i686 i686 >i386 GNU/Linux


title: rsync mkstemp failed: Invalid argument (22) with USB flash drive

text: I use "Back In Time" which is nothing more than a front end GUI to rsync version 3.0.9 protocol version 30. I'm running ubuntu 12.04. My backup device is a locally mounted USB flash stick/drive formatted as ext2. It gives me numerous errors similar to the following... > [E] Error: rsync: mkstemp > "/media/apb/0543d632-d24b-4b4e-8ca8-56d22c19e62f/backintime/myhost.mydomain.com/root/4/new_snapshot/backup/home/apb/Documents/7uzyrwsy.default-20131026-1639/Mail/pop- > server.bak.rr-8.com/.Sent.msf.RZMdLy" failed: Invalid argument (22) The command line that Back in Time uses to call rsync:               [I] rsync -rtDH --links --no-p --no-g --no-o  --delete --delete-excluded  -v       --chmod=Du+wx  --exclude="/media/apb/0543d632-d24b-4b4e-8ca8-56d22c19e62f"      --exclude="/root/.local/share/backintime" --exclude="/tmp/backintime"      --include="/home/apb/asterisk/" --include="/home/apb/" --include="/home/"      --include="/home/apb/Documents/" --include="/home/apb/Linux-Centos/"      --exclude=".gvfs" --exclude=".cache*" --exclude="[Cc]ache*"      --exclude=".thumbnails*" --exclude="[Tt]rash*" --exclude="*.backup*"      --exclude="*~" --exclude="/root/Ubuntu One" --exclude=".dropbox*"      --exclude="/proc/*" --exclude="/sys/*" --exclude="/dev/*" --exclude="/run/*"      --include="/home/apb/asterisk/**" --include="/home/apb/Documents/**"      --include="/home/apb/Linux-Centos/**" --exclude="*" / "/media/apb/0543d632-d24b-4b4e-8ca8-56d22c19e62f/backintime/myhost.mydomain.com/root/4/new_snapshot/backup/"      Any ideas as to what's causing the failure, and better yet... how to fix it?


title: Apache 2.2, PHP 5.3 and MySQLl 5.5 on Linux Mint 17?

text: Our stack consists of Apache 2.2, PHP 5.3 and MySQL 5.5. I've installed Linux Mint 17 Giana. If I install `apache2` via `apt`, it will install Apache 2.4 which is not required for me. Is there any way to install Apache 2.2 and PHP 5.3 via `apt` by changing canonical repository?


title: What is a canonical way to find the actual maximum argument list length?

text: Following ARG_MAX, maximum length of arguments for a new process it seems like `ARG_MAX` is wrongly (or at least ambiguously) defined on my Mac Mini 3,1 running Ubuntu 12.04:               $ getconf ARG_MAX # arguments      2097152     $ locate limits.h | xargs grep -ho 'ARG_MAX[ \t]\+[0-9]\+' | uniq | cut -d ' ' -f 8     131072      The actual limit seems to be somewhere between these:               $ cd "$(mktemp -d)"     $ touch $(seq 1 131072) && find . -mindepth 1 -printf x | wc -c && rm *     131072     $ touch $(seq 1 131073) && find . -mindepth 1 -printf x | wc -c && rm *     131073     $ touch $(seq 1 $(getconf ARG_MAX)) && find . -mindepth 1 -printf x | wc -c && rm *     bash: /usr/bin/touch: Argument list too long      I did a small search:               cd "$(mktemp -d)"     min=131072     max=2097152     while true     do         search=$((min + (max - min) / 2))         if touch $(seq 1 $search) 2>/dev/null         then             min=$search         else             max=$search         fi         [[ $((max - min)) -le 1 ]] && echo "ARG_MAX = $min" && break     done      Eventually this resulted in `ARG_MAX = 314290`, which doesn't seem to have any relation to either of the `ARG_MAX` values found before. Is this normal? Is there a simpler way to find the actual `ARG_MAX`? Did I misunderstand the definition of ARG_MAX? It seems it's actually the byte (or possibly character) length of the arguments with or without (?) the separating spaces. If it's really the byte length, are there also other restrictions?


title: Avoiding duplicate entries in ~/.ssh/known_hosts

text: I have my DNS search path set to ".intranet", ie, `/etc/resolv.conf` contains:               search intranet      When I SSH to a host using a FQDN, like "mailserver.intranet", it adds an entry for "mailserver.intranet" to `~/.ssh/known_hosts`. If I later SSH to this same host but using the simple "mailserver" name, SSH adds another entry to known_hosts for "mailserver". Is it possible to make SSH always use FQDN in known_hosts to avoid this duplicity?


title: how can one program an operating system from scratch?

text: My programming skills are still rudimentary but I'm curious to know how can one program an operating system from scratch . I know that one must understand how the hardware of the computer work and how it connects to each other and the computer software . But Is it possible to design an OS using predesigned modules that are concerned with the hardware part (like The class libraries in C++) .And can one design an operating system using C++ running on a windows framework ? Thanks in advance.


title: How to change SMTP outgoing port on Centos 6.3

text: I have a dedicated server running Centos 6.3. My customer wants to use Microsoft Outlook to send and receive e-mails. He can connect and receive his mails but when he tries to send e-mail he can't because in Turkey SMTP outgoing port 25 is blocked. I need to change the SMTP outgoing port to 587. How can I change it on my server allow mail to be sent?


title: Local area network without using the IP protocol in Linux

text: I've read a little about Internet protocols and deduced that on local area network, there is no need to use the IP protocol, though it's normally used. Is there a possibility to turn off the IP protocol in Linux and use only MAC (ethernet) addresses for frame delivering? How would you do it? I guess there will be a problem with `TCP`. I'm not sure if it can work on top of `LLC layer`. The IP protocol overhead is so small that it's being used on LANs (with hubs) too?


title: Logic behind Postgres binary installation path on Debian

text: It appears that the Postgresql installation is split into three folder locations on Debian: > Configuration: /etc/postgresql > > Binaries: /usr/lib/postgresql > > Data: /var/lib/postgresql I understand the benefits of splitting up the configuration files and the data, however, the binaries location is confusing to me -- why wouldn't it simply be in /usr/bin? More to the point, why would some binaries go into /usr/bin and others into /usr/lib?


title: Change screen "hardstatus" color dynamically

text: I show the hard-disk free space in `hardstatus` screen. But also I want change the color of this value when it's less than a value to alert me.   I have done a script that it checks this and it returns a string if it's true or nothing if it's false.   But the problem is change the color in `hardstatus` screen. This is the line:               hardstatus alwayslastline "%?%27`%{+B r}%?Velocidad"      The hardstatus works but I won't show the output of script check (%27), only change the color. But `%?` needs a not empty string to do this. How can I do this?


title: Retrieve the window name and role

text: I'm running Eclipse and I detached some of the windows. Now I have 4 windows linked to Eclipse. What I need is to be able to identify each individual window and be able to control it. If I run tools like: `xprop`, `xwininfo`, or `wmctrl -l` I can retrieve the `WM_CLASS` and `WM_NAME` for the main window but I can't get them for the other 3 child windows. How can I retrieve the `WM_NAME` and `WM_ROLE` for all 4 windows?


title: Can not connect wirelessly to internet in CrunchBang 10

text: I am trying to install Crunch Bang 10 on a clients computers. The problem is, wireless internet is not working. Internet on the computer has worked before when it had Lubuntu on it. I have wired works. The computer could temporaily be connected with a wire to do the fix, but it can not be permanent. Also, if it helps, the output from `lspci` (I saw at http://www.cyberciti.biz/faq/linux-find-wireless-driver-chipset/ it told you some wireless info.)               00:00.0 Host bridge: Intel Corporation 82845 845 [Brookdale] Chipset Host Bridge (rev 04)     00:01.0 PCI bridge: Intel Corporation 82845 845 [Brookdale] Chipset AGP Bridge (rev 04)     00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 02)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)     00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)     00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 02)     00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 02)     00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02)     01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]     02:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78)     02:01.0 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller     02:01.1 CardBus bridge: Texas Instruments PCI1420 PC card Cardbus Controller     02:03.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 01)


title: Debian Wheezy rebooting instead of powering off

text: I'm having a weird issue with my Debian Wheezy desktop. When I try to shutdown the system (either from Gnome or from the command line with `shutdown -h now`) the computer automatically reboots. The weirdest thing is that the last message before rebooting is "Will now halt"... and a few seconds later, the computer restarts. After waiting for the system to start, if I issue `shutdown -h now` from the console (before starting GNOME), the computer shutdowns cleanly, and _stays_ off. Although I know that I could leave the computer on indefenitely (after all, this is not a Windows box), I prefer to shut it down properly. Is there some configuration file and/or option I should look at to solve this issue? **_Background info_**   * Debian 7.5 "Wheezy" 64 bit   * Processor: Intel Core i7   * Motherboard: ASUSTeK P8B75-M


title: No elevated permissions when using GUI applications on i3 wm

text: I'm running Lubuntu 13.10 with the i3 window manager. Tasks that need elevated permissions, like installing applications from the lubuntu software center or using the gnome-disks, complain about not having sufficient permissions and never prompt for a password. Sudo through the command line works so it seems to be just an issue with GUI applications. Everything works as normal when running vanilla lubuntu.


title: Contiguous copy – How do I copy files contiguously?

text: I want to copy a number of files onto a flash drive such that each individual file is contiguous. They do not need to be contiguous with each other, and can be in any order. The files will be very large – hundreds of megabytes, to gigabytes. No other files on the drive should be defragmented; doing so would waste time and cause unnecessary wear on the flash media. I want to be able to do this for at least FAT32, but methods for `*nix` filesystems will also be appreciated. Essentially, there are 2 approaches to this:   * Copy then defragment the files.   * Defrag enough contiguous free space for each file, then copy each file into its place. The 2nd option would generally be far quicker than the 1st, and would avoid causing unnecessary wear on the flash media, so the 2nd option would be very much preferable. I don't mind solutions that work offline, but obviously online is preferable.


title: How can I `man print`?

text: Where can I find more information about the command(?) `print` since I don't receive a result when I input `man print`? For example, in the `zsh` I can do the following:               $ print "Hello, world\!"     Hello, world!      I've seen `print -P foo` and `print -n bar` used among other flags and have no idea what they mean nor do I know where to look for further information. So we have two questions really:   1. Where does `print` come from and where can I find documentation for it?   2. Where does one find documentation for similar items that are not to be found in the `man` pages? NOTE: For clarification, I'm not trying to print a sheet of paper. I am also aware of `printf`, which allows for formatted output and has a man page.


title: Make OpenGL GLX work with Steam client on Debian jessie

text: I'm trying to install Steam Client on Debian 8 (Jessie) 64-bit because the instructions ask me to (and because I've tried without them and it fails... read on!). In following the instruction I've basically done the following:               deb http://http.debian.net/debian/ jessie main contrib non-free     dpkg --add-architecture i386     aptitude update     aptitude install steam     aptitude install libgl1-fglrx-glx:i386      That last one was in an attempt to install the 32-bit drivers for my ATI Radeon HD 7800. These are needed because steam is apparently 32-bit and requires 32-bit drivers. The output when I run that command is:               user@home:~$ sudo apt-get install libgl1-fglrx-glx:i386     Reading package lists... Done     Building dependency tree            Reading state information... Done     Package libgl1-fglrx-glx:i386 is not available, but is referred to by another package.     This may mean that the package is missing, has been obsoleted, or     is only available from another source     E: Package 'libgl1-fglrx-glx:i386' has no installation candidate      When I now run steam I get the following message: > OpenGL GLX context is not using direct rendering, which may cause > performance problems. > > For more information visit > https://support.steampowered.com/kb_article.php?ref=9938-EYZB-7457. That link takes me to a page basically asking me to install the 32-bit drivers. > >     user@home:~$ glxinfo | grep rendering >     direct rendering: Yes >   Well that's good, I think. But when I try to run, for example, `Counterstrike: Source` I get this: > Could not find required OpenGL entry point 'glGetError`! Either your video > card is unsupported, or your OpenGL driver needs to be updated. I'm guessing this is because I didn't install that driver? To confirm I have the right sources, here is my `/etc/apt/sources.list` file:               user@home:~$ cat /etc/apt/sources.list                                     deb http://http.us.debian.org/debian/ jessie contrib main     deb http://http.debian.net/debian/ jessie main contrib non-free     deb-src http://http.debian.net/debian/ jessie main contrib non-free     deb http://repository.spotify.com stable non-free     deb-src http://repository.spotify.com stable non-free      Unfortunately the suggested solution to the following (very similar) question was included in my steps and didn't help in my case: Debian Stable libgl1-nvidia-glx:i386 not found (trying to install Steam) I'm assuming those instructions are there because they work, and they say specifically that they're for `debian jessie`. What am I doing wrong here? **EDIT:** As Braiam points out the problem might have more to do with a steam problem that my setup. I have tried to follow one of the suggested fixes by doing this: > mv ~/.steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux- > gnu/libgcc_s.so.1{,.disable} However, unlike the reports of others this didn't seem to help me much (same outcome as before).