title: How do I add a screenshot for my package?

text: I created a repository with `reprepro` and it is working fine, but I would like to add the "images" to the packages when they are displayed with some package manager such as synaptic. At first, i was having problems with change-logs too, but when asking for a change-log the following message is displayed `URI was: http://foo/pool/main/7/7zrecover/7zrecover_2.6_all.changelog` So I understood that I needed to create that URL in order to call the change- log. I did it and it worked. I wanted to use the same method to call the image of the package, but when the error is displayed the URL is not shown so I don't have any idea of what URL is being requested. I've also been doing Internet researches but I just get dumb stuff or packages! Open synaptic and select any package. Then you will see that in the package description there are two buttons "Get Screenshoot" and "Get Changelog". I would like to make work the "Get Screenshoot" button of my packages.


title: Server returning 'Not Found' for "www.host.com" but not "host.com"

text: My server is returning the correct paths for all of my domains as long as they are not prefixed with www. The following is one of my domains in it's simplest form:               <VirtualHost *:80>       ServerName kyle-o.info       ServerAlias www.kyle-o.info       DocumentRoot /home/kyle/www/kyle-o.info     </VirtualHost>      I can provide logs if needed. The server is running Ubuntu:                 Distributor ID:   Ubuntu       Description:   Ubuntu 12.10       Release: 12.10       Codename:   quantal


title: Difference between POSIX, Single UNIX Specification, and Open Group Base Specifications?

text: What are the differences between POSIX, the Single UNIX Specification, and the Open Group Base Specifications? I think their purpose is for determining if an OS is Unix?


title: Who's got the other end of this unix socketpair?

text: **I want to determine what process has the other end of a unix socket, that was created with`socketpair()`.** I have a program `parent` which creates a `socketpair(AF_UNIX, SOCK_STREAM, 0, fds)`, and `fork()`s. The parent process closes `fds[1]` and keeps `fds[0]` to communicate. The child does the opposite, `close(fds[0]); s=fds[1]`. Then the child `exec()`s another program, `child1`. The two can communicate back and forth via this socketpair. Now, let's say I know who `parent` is, but I want to figure out who `child1` is. How do I do this? There are several tools at my disposal, but none can tell me which process is on the other end of the socket. ### lsof `lsof -c progname` lists the open files for all processes named `progname`. When I execute `lsof -c parent -c child1` I see the following (unrelated entries removed):               jonathon@jrr-suse113:/proc/net> lsof -c server -c child     COMMAND   PID     USER   FD   TYPE     DEVICE SIZE/OFF   NODE NAME     server  12923 jonathon    0u   CHR      136,3      0t0      6 /dev/pts/3     server  12923 jonathon    1u   CHR      136,3      0t0      6 /dev/pts/3     server  12923 jonathon    2u   CHR      136,3      0t0      6 /dev/pts/3     server  12923 jonathon    3u  unix 0xf67b8440      0t0  32721 socket     child   12924 jonathon    0u   CHR      136,3      0t0      6 /dev/pts/3     child   12924 jonathon    1u   CHR      136,3      0t0      6 /dev/pts/3     child   12924 jonathon    2u   CHR      136,3      0t0      6 /dev/pts/3     child   12924 jonathon    3u  unix 0xf42ff4c0      0t0  32722 socket      So I see the file descriptors for stdin/out/err, as well as my socket (which has been `dup2`'d to #3 for the child as well). Additionally, we see the socket device numbers in hex, and node (inode). Yet there is nothing that tells me these two are connected (which they definitely are.) ### /proc/xxx/fd This simply shows me the open file descriptors and what they point to. No surprises here.               jonathon@jrr-suse113:/> ls -l /proc/`pidof server`/fd     total 0     lrwx------ 1 jonathon users 64 2011-07-08 17:58 0 -> /dev/pts/3     lrwx------ 1 jonathon users 64 2011-07-08 17:58 1 -> /dev/pts/3     lrwx------ 1 jonathon users 64 2011-07-08 17:58 2 -> /dev/pts/3     lrwx------ 1 jonathon users 64 2011-07-08 17:58 3 -> socket:[32721]      ### /proc/net/unix This also doesn't show me anything that `lsof` doesn't (probably because these are where it gets its information.)               Num       RefCount Protocol Flags    Type St Inode Path     f42ff4c0: 00000003 00000000 00000000 0001 03 32722     f67b8440: 00000003 00000000 00000000 0001 03 32721      So basically, I can see the two sockets, and everything about them, but cannot tell that they are connected. Before you ask why I want to see this, consider the case where there are 40 different children processes running. I am trying to then determine which FD in the parent is communicating with which child process.


title: What is the significance of single and double quotes in environment variables?

text: I defined some environment variables in my .profile like this:               MY_HOME="/home/my_user"      but the variable does not seem to evaluate unless I strip off the quotes and re-source the file. I believe the quotes are necessary if there will be spaces, and single quotes are used if escapes are not desired. Can someone clarify the significance of single and double quotes in variable definitions? How about front-ticks and back-ticks?


title: Why is my interface font larger with LibreOffice than with other GTK applications?

text: I installed LibreOffice and the libreoffice-gtk package. The GUI has the same appearance as other GTK applications, however, the fonts in the interface appear to be 1.5 to 2 times larger than those in other GTK applications.   * I had this problem with OpenOffice.org and after upgrading to LibreOffice.   * I set the font using the `xfce4-appearance-settings` application.   * The font size difference appears no matter what font or size is selected.   * Restarting the computer does not solve the problem. Debian 6 LibreOffice 3.5.4.2 XFce 4.6.2


title: What is a fragment size in an ext3 filesystem?

text: This is an output from dumpe2fs:               root: ~/# dumpe2fs -h /dev/sdb3 | grep -i 'fragment|block size'     dumpe2fs 1.39 (29-May-2006)     Block size:               4096     Fragment size:            4096     Fragments per group:      32768      Is this related to disk fragmentation?


title: Have you seen this cat?

text: I am of course referring to the 'screenmate' cat, Neko - looks like this: ![enter image description here](http://i.stack.imgur.com/lf1B0.gif) A few years ago, I remember Neko could follow my mouse cursor around, and was a helpful distraction from during long hours of work. I am reminded of this after finding this extension for XPenguins: ![enter image description here](http://i.stack.imgur.com/wyxtW.png) And in my short quest, I have found: http://users.frii.com/suzannem/neko/index.html#links http://sourceforge.net/projects/ungattino/?source=directory The first does work, but within a Window in Wine, as it is a exe: ![enter image description here](http://i.stack.imgur.com/vnUeh.png) The second seems to start and work after running it with `java -jar...`, but seems to crash or disapear sometimes. **So where can I get Neko from for my computer - so that it can run around the screen like it used to?** Ubuntu 12.04 & Fedora 19 * * * Here are screenshots from after it was solved: ![moggy 1](http://i.stack.imgur.com/SLZMy.png) ![moggy 2 + penguin](http://i.stack.imgur.com/vb3l1.png)


title: Getting branch from git

text: let's say I want to get this branch the same way I get the latest one, using `git clone git://github.com/raspberrypi/linux.git`. How do I do it?


title: Transfer X from monitor to remote machine

text: I want to remote login to another laptop to continue working on session left over. VNC is slow because it's bandwith hog. I know (or I think I know) that it's not latency, it's bandwith because the first update from the top of screen or the top of recently changed view occurs very fast, but the entire redraw takes time.   I believe that X doesn't send the pixelmap, but instructions on how to redraw screen. So I'd like to use X. Question: Is there a way for me to say, to all the applications, please now migrate to the X server available remotely? Or can I make my computer think that what it calls :0.0 is no longer attached to the monitor, but is now on a remote machine. (And can I reverse this process so that I can switch back to the other laptop whenever I want)?


title: Executing a shell script from remote server on local machine

text: Imagine a shell script on the remote server as               #!/bin/bash     rm /test.x      How can I (if possible) to execute this script from my local machine to delete `/test.x` file on my local machine. Obviously, the solution should be with something like `ssh` authorization, but without downloading the script file from the remote server. In fact, I want to use the remote script as a provider of shell commands to be run on the local machine.


title: Process IDs range

text: On GNU/Linux system I seen only positive PIDs, but when kernel panic occured I seen info about process with PID=0. What's it? On Minix 3 I seen processes with negative PIDs. Minix is POSIX-compatible system, but POSIX allows only positive PIDs. What's it? What variable type I should use in C for saving process ID?


title: untabify on save in Emacs 24 without make-local-hook

text: I'd like to untabify whenever I save a buffer. This worked fine until I upgraded to Emacs 24 which broke it, as there is no `make-local-hook` anymore. Have a look:               ;;; untabify on C-x C-s (except for GNUmakefiles that needs tabs)     ;;;   (note: `stringp` check to avoid bug (?) in HTML-mode)     (defun untab-all ()       (unless (and (stringp mode-name)                    (string= mode-name "GNUmakefile") )         (untabify (point-min) (point-max)) ))          ;; TODO: doesn't work anymore as no make-local-hook in Emacs 24 -      ;; it won't work with simply dropping that line,     ;; or doing that, and passing a 4th `t` argument in the second     ;; add-hook call (which is the LOCAL parameter)          ;; (add-hook 'emacs-lisp-mode-hook     ;;    '(lambda ()     ;;       (make-local-hook 'write-contents-hooks)     ;;       (add-hook 'write-contents-hooks 'untab-all) ))      **EDIT** Got it to work with the below help and this site. Ironic thing is, with my old solution (using `make-local-hook`), somehow I got this **globally** (which is why I had to add that check for GNU makefiles). Now, this seems to be a local thing: this is good as that check needn't be done at every save; only, you have to state for what modes untabify should be done. (I guess you could just add them one by one as you go along, every time you discover a tab, until you're done. Although it feels like you're using 5-6 modes, when you think about it, you use tons!) But, to confuse things even more, the HTML mode seems to do this, with no intervention! If you read the code above, you see that even for the old solution, HTML was the cat among the ermines... Anyway, this seems to work:               (defun untab-all ()       (untabify (point-min) (point-max))        nil ) ; did not write buffer to disk          (defun add-write-contents-hooks-hook ()       (add-hook        'write-contents-hooks        'untab-all          nil  ; APPEND  unrelated, explicit default nil as optional :)          t )) ; LOCAL   non-nil => make hook local          ;; more modes: http://www.emacswiki.org/CategoryModes     (add-hook 'emacs-lisp-mode-hook #'add-write-contents-hooks-hook)     (add-hook 'c-mode-common-hook   #'add-write-contents-hooks-hook)     (add-hook 'sh-mode-hook         #'add-write-contents-hooks-hook)     (add-hook 'text-mode-hook       #'add-write-contents-hooks-hook)     (add-hook 'sql-mode-hook        #'add-write-contents-hooks-hook)     (add-hook 'css-mode-hook        #'add-write-contents-hooks-hook)


title: Why would I want to create more partitions if RHEL will only recognize up to 16?

text: During some basic RHEL training, I came across this blurb: > Although it's possible to create more, RHEL will recognize only up to 16 > partitions on any individual SATA, SCSI, PATA, or virtual hard drive. That sentence seems to conflict with itself. If RHEL can't recognize more than 16 partitions, why would I ever want to create more than 16?


title: rails command getting removed from $PATH after resume from hibernet

text: i came across a very strange issue. i have installed rails through rvm & tested the installation. next day when i logged into system neither ruby nor rails command was found. I reinstalled everything again (rvm, ruby, rails) and tested last night. now this time i kept a terminal open and hibernated the system. but as I am trying to run rails on the new terminal instance it is giving error `"bash: rails: command not found"` though other commands ruby, rvm, and gem are working and its showing in rails in`"gem list"` however when i tried running it into the instance i kept open it works fine. what could be the issue? i have no clue really. :( `echo $PATH` (terminalA - rails not working)               terminalA: /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:                /usr/sbin:/sbin:/home/ankit/.rvm/bin:/home/ankit/bin:                /home/ankit/.rvm/bin          terminalB: /home/ankit/.rvm/gems/ruby-2.0.0-p353/bin:                /home/ankit/.rvm/gems/ruby-2.0.0-p353@global/bin:                /home/ankit/.rvm/rubies/ruby-2.0.0-p353/bin:                /home/ankit/.rvm/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:                /usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ankit/bin      **EDIT:** although i see that by updating the path it would work. but why is it showing 2 different values for the same system at the same time? is there anything know that cause such problem? **EDIT2: I noticed that, this command is getting removed from path everytime system wake up from hibernate. it works on terminal instance which i left open before hibernate. but on every new instance of terminal i get the command not found error.**


title: Autorun Tomcat in Linux Mandriva - java.io.IOException: invalid argument

text: Here's the autorun script, which i use -               #!/bin/sh              # description: Tomcat start/stop script         # chkconfig:              TOMCAT_PATH=/java/apache-tomcat-7.0.32/bin         TOMCAT_START=$TOMCAT_PATH/startup.sh         TOMCAT_STOP=$TOMCAT_PATH/shutdown.sh              start()         {         if [ -x ${TOMCAT_START} ]; then         echo "Starting tomcat server..."         ${TOMCAT_START} &         else         echo "Cannot start tomcat server"         fi         }              stop()         {         if [ -x ${TOMCAT_STOP} ]; then         echo "Stopping tomcat server"         ${TOMCAT_STOP} &         else         echo "Cannot stop tomcat server..."         fi         }              restart()         {         stop         sleep 10         start         }              case "$1" in         'start')         start         ;;         'stop')         stop         ;;         'restart')         restart         ;;         *)         echo "Please supply an argument [start|stop|restart]"         esac      I put it in -               /etc/rc.d/init.d/      I added it to the startup:               /sbin/chkconfig --add --level 345 tomcat      But when i reboot the system, watch the logs and see - **catalina.out** :               ...     INFO: Stopping service Catalina     jan 03, 2013 6:09:04 PM hudson.util.CharacterEncodingFilter destroy     INFO: CharacterEncodingFilter destroyed.     jan 03, 2013 6:09:04 PM javax.jmdns.impl.tasks.state.DNSStateTask run     WARNING: Canceler(www-...-ru.local.).run() exception      java.io.IOException: Invalid argument         at java.net.PlainDatagramSocketImpl.send(Native Method)         at java.net.DatagramSocket.send(DatagramSocket.java:676)         at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1537)         at javax.jmdns.impl.tasks.state.DNSStateTask.run(DNSStateTask.java:131)         at java.util.TimerThread.mainLoop(Timer.java:555)         at java.util.TimerThread.run(Timer.java:505)      The process does not start. But if i execute the command -               /etc/rc.d/init.d/tomcat start      The process starts well. Why does it not start automatically? Thanks!


title: security concern around adding cron user to web application group

text: I have a permissions issue on my CentOS 5.6 machine with regards to the cron user. On my test/staging environment my cron user (`picco-cron`) is a member of one group - `picco-cron`, as below:               [crmpicco@1872-stage1 downloads]$ id picco-cron     uid=601(picco-cron) gid=601(picco-cron) groups=601(picco-cron)      Whereas, my development environment the same user, is a member of the `dev` group.               [root@dev53 dev_crmpicco]# id picco-cron     uid=503(picco-cron) gid=503(picco-cron) groups=503(picco-cron),555(dev)      The problem I have is that my PHP web application directories have a group of `dev`, which is correct, so on my development environment I can write/read to and from these directories as expected. However, on the test/staging environment I cannot as `picco-cron` is not a member of the `dev` group. My question is - is there a security issue around letting the "cron" user have access to writing to 90% of the directories in my application? Is it as simple as to add `picco-cron` to the `dev` group or is there a security concern here?


title: Query about Quad Boot system

text: I have triple boot system with win7, ubuntu 13.10 and fedora 20 installed.How to quad boot with kali linux ? my hard disk is 750gb


title: Mounting a partition into a 'sandbox'

text: I'm wondering if this is possible. I want to set up a linux system that mounts `/` remote linux machine to `/` on the local machine. However, I want all changes on the local machine to be saved to ram so that it doesn't affect the remote machine. Ideally the changes would NEVER be written, so that when I reboot, it mounts the original `/` partition again disregarding all changes made during the previous session. Is something like that possible?


title: is there a audit tool to track package installs and kernel version

text: I'm currently diagnosing a problem that started about a week ago on my laptop (running Ubunutu). The exact issue is not relevant though. Because I was already running several locally built kernel versions and still accepting regular ubuntu package updates, it would have been useful to have a log to refer to of when each new deb package was installed and also the kernel version I was running on each boot up. This would have helped me figure out what change to the system caused the problem to start occuring. So my question is does such an auditing tool (for a linux distro) that is able to keep a log of all OS package installs/updates/removals and the kernel version thats used each time the machine boots? I does specifically need to be under an open-source license and reasonably straight forward to setup and run, for an experienced Linux user but one who is not a full-time sysadmin - this is on a developer laptop not a large server after all.


title: What does tail -f <directory name> do?

text: I mistakenly executed the following command in the terminal: `tail -f /logs/applications/logs*` I got the following output:               tail: file shrunk!     Error 0      I am not sure what exactly happened. I have not been keeping track on the number of files in the directory for quiet a while. Could someone please explain what exactly happened, and did I lose any files. Edit: I am not sure if it is coincidence or not, but after I executed the code, I counted the number of files in the directory, and it was 10! First time the number 10 got me paranoid...


title: fwui.log error while running this script

text: I run this bash script in order to put all the files with the following format dated today in the same folder. for example here I want `2012-12-17_083213` to be my folder and then inside it I have the `.log` and `.log_stats` and etc with this name inside it? But I am not able to get the script working. For example, if I try everything up until `dir=$(echo $i | awk '{split($1,a,"_"); print a[1]}');`   And then to test it, I did echo $dir, and that displays the following:   `fwui.log`   I searched and understood its about locks in the db but how to solve it? This is the script:               #!/bin/bash       tosend=""       for i in *.log; do              dir=$(echo $i | awk '{split($1,a,"_"); print a[1]}');           if [ ! -d $dir ]; then               mkdir $dir;           fi;           cp $i $dir;           tosend="$tosend\n$dir"       done       for i in $(echo -e $tosend | uniq);do           echo Compressing $i           tar -zcvf $i.tar.gz $i           scp $i.tar.gz user@server       done        and this is the file formats:               2012-12-17_083213_1.log       2012-12-17_083213_1.log_stats       2012-12-17_083213_1.logaccount_ptr         2012-12-17_083213_1.loginitial_ptr       2012-12-17_083213_1.logptr       2012-12-17_093049_2.log       2012-12-17_093049_2.log_stats       2012-12-17_093049_2.logaccount_ptr       2012-12-17_093049_2.loginitial_ptr       2012-12-17_093049_2.logptr


title: flar archive creation

text: I'm facing issue, I need to perform a patch of a solaris flar image and all the commands take quite some time to perform it. To avoid me being in front of it I prepared a script that almost works flawlessly. So, basically I have a existing flar archive that needs to be updated. Let's call it common.flar. The script unpacks the Recommneded patches, uncompresses the common.flar applies the patches and then it should compress back the archive. I'm falling at the following command:               find . |cpio -ocv|compress > ../flash/archive      If I do this outside the script it works without any problem, but if I do it inside a script, it processes the first 5 files of the archive and "aborts" with > ../flash/archive: -- file unchanged When this happens and I let the script finish, the new flar archive has the exact same size as the original, if I do it manually, the new flar is bigger. (In this particular case it is installing 72 patches) In the script I make sure that I am get into the proper directory to run the piped commands for the compress. I'm not redirecting the input, just the output to a file but still I am unable to understand why it fails. Another test I've done: Create a test script with only two lines: cd dir; find . |cpio -ocv|compress > ../flash/archive and this works fine. Feeling kinda lost


title: How to define similar bash function at once

text: I have these functions in `~/.bashrc`:               function guard() {         if [ -e 'Gemfile' ]; then         bundle exec guard "$@"         else         command guard "$@"         fi     }     function rspec() {         if [ -e 'Gemfile' ]; then         bundle exec rspec "$@"         else         command rspec "$@"         fi     }     function rake() {         if [ -e 'Gemfile' ]; then             bundle exec rake "$@"         else             command rake "$@"         fi     }      As you see these functions are very similar. I want to define these 3 functions at once. Is there a way to make it? _environment_               bash --version     GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)


title: Compare files and tell how similar they are

text: Is there a way to compare two file and give some kind of numeric indication of their similarity? For example, if I have two files that differ by just one character (say, a character was deleted or changed), the program ought to say something like "file X differs by 1 character." Or if two lines are different, say "file X differs by two lines." The best output would be something like "File X is 95% similar to file Y"


title: how to use patch and diff to merge two files

text: I have read about diff and patch but I can't figure out how to apply what I need. I guess its pretty simple, so to show my problem take these two files: a.xml               <resources>        <color name="same_in_b">#AAABBB</color>        <color name="not_in_b">#AAAAAA</color>        <color name="in_b_but_different_val">#AAAAAA</color>        <color name="not_in_b_too">#AAAAAA</color>     </resources>      b.xml               <resources>        <color name="same_in_b">#AAABBB</color>        <color name="in_b_but_different_val">#BBBBBB</color>        <color name="not_in_a">#AAAAAA</color>     </resources>      I want to have an output, which looks like this (order doesn't matter):               <resources>        <color name="same_in_b">#AAABBB</color>        <color name="not_in_b">#AAAAAA</color>        <color name="in_b_but_different_val">#BBBBBB</color>        <color name="not_in_b_too">#AAAAAA</color>        <color name="not_in_a">#AAAAAA</color>     </resources>      The merge should conatin all lines along this simple rules:   1. any line which is only in one of the files   2. if a line has the same name tag but a different value, take the value from the second I want to apply this task inside a bash script, so it must not nessesarily need to get done with diff and patch, if another programm is better at it.


title: How install xfce >= 4.10 from backports repository in debian

text: I am working in Debian 7 64bits with xfce 4.8 ![enter image description here](http://i.stack.imgur.com/bhaxG.jpg) But in backports repository I found xfce 4.10.1 ![enter image description here](http://i.stack.imgur.com/fgb4F.jpg) and I added this line in my sources.list:               deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free      but when I upgrade I do not see that can be updated. ![enter image description here](http://i.stack.imgur.com/NDPDH.jpg) Then, how I can upgrade xfce 4.8 to 4.10 cleanly with backports? without tricks like adding repo of debian 8 testing or others. Greetings.


title: Startx failing in FreeBSD

text: I've install gnome2, xorg, and xinit (should xorg have done that for me?), and startx yields: "xinit: unable to run server "/usr/local/bin/X": No such file or directory" I checked in the directory, and startx, xpath, and xinit are all there Am I still missing dependencies? If so, which ones? Both the gnome2 and x11 installations took a lifetime and a half so I thought they got everything...


title: Not able to install GRUB (grub legacy) on flash drive!

text: I'm following this tutorial of Dedoimedo to install GRUB on USB flash drive. Though this tutorial doesn't talk of installing in pen drive but I though it can be used here even.                      [ Minimal BASH-like line editing is supported.   For              the   first   word,  TAB  lists  possible  command              completions.  Anywhere else TAB lists the possible              completions of a device/filename. ]          grub> find /grub/stage1      (hd0,4)          grub> root (hd0,4)          grub> setup (hd1)      Checking if "/boot/grub/stage1" exists... no      Checking if "/grub/stage1" exists... yes      Checking if "/grub/stage2" exists... yes      Checking if "/grub/e2fs_stage1_5" exists... yes      Running "embed /grub/e2fs_stage1_5 (hd1)"...  21 sectors are embedded.     succeeded      Running "install /grub/stage1 d (hd1) (hd1)1+21 p (hd0,4)/grub/stage2 /grub/me     nu.lst"... succeeded     Done.          grub>       Still I don't see anything in the flash drive. Also when I rebooted my laptop setting USB flash drive to boot, it didn't boot from my USB. Please throw some light on this. [I have seen sites (pendrivelinux.com) http://www.pendrivelinux.com/install- grub2-on-usb-from-ubuntu-linux/ where it talks on installing on USB but I want to know why my method isn't working]


title: Can I execute a python statement from a terminal?

text: I'd like to simply execute a Python command without having to write a script or enter the interpreter. Is there a way that I could run something like:               python --execute "pow(12.31351,2)"      And have it simply print the result?


title: How can I redirect matching lines to a file, and non-matching lines to a different file?

text: Is there a script/program/utility already available for the following requirement in a optimised way?               someCommand |        tee >(grep "pattern" > LinesWhichMatch) |        grep -v "pattern" > LinesWhichDoesNotMatch


title: Corsair Vengeance K-95 Keyboard & Linux

text: I've been thinking that I want a mechanical keyboard, currently I'm using a logitech G510 which is perfect with it's 18 programmable keys (I'm using it with this) but I hear a lot of people drooling over mechanical keys, especially programmers, and I do certainly write a lot and on occasion I code too. Not to mention gaming of course. But one thing I really cannot think of losing is the 18(x3) programmables, I don't care about the rest of the features, but being able to open folders, switch workspaces and navigate through my browser with single buttons changes everything. Not to mention it is very efficient. Media keys are also always nice (Play/Pause, Volume wheel) The Corsair Vengeance K-95 was the first keyboard I found that seems to match my needs.   1. Does it work with Linux? (If so, how well?)   2. Can I map custom commands (like terminal commands) to the G keys?


title: Equivalent to "copies=2" feature of ZFS in Linux with LVM

text: I have a laptop with only one HDD and is impossible add other HDD. The feature "copies=2" of ZFS is the perfect solution for to add redundancy to my /home in the laptop. I would like emulate the copies=2 option of ZFS with LVM (or other software if you prefer), for example 2 copies of each block of my /home partition. In this HDD, I have other systems and I use habitually the laptop for testing a lot of new versions of OS, so I need continue using a standard MBR partition table and the changes must be in the partition level. I will not use ZFS or btrfs for this. If you have other ideas, all are welcome :) . http://blogs.oracle.com/relling/entry/zfs_copies_and_data_protection Update: Like Gilles said, my idea only give me protection from invalid sectors and similar failures for a very limited time. Not for human errors, software bugs or mechanical/electronic failures of my HDD. This is the idea.


title: How to install packages during live installation in Fedora?

text: I have Fedora 20 live USB and some packages with me. I want to install these packages during the live installation itself. Is there any script to do this?


title: Why did BASH print "bash: cd: write error: Success"?

text: I noticed this several times today. If I type `cd ../Directory` to change to another directory, it prints "bash: cd: write error: Success". I can't determine what other previous commands might be related to this.   * `typeset -f` prints nothing.   * `alias` prints nothing.    * `type -a cd` prints "cd is a shell builtin".   * `echo $CDPATH` prints an empty line.   * `$BASH_VERSION` prints "bash: 4.2.37(1)-release: command not found".   * I only noticed this 2-3 times. The initial directory and target directory were identical in both situations. I changed directories in this manner many other times, but did not encounter the error always. What could be causing this?


title: what are the compilation steps for Firefox in RHEL 6.3?

text: i have changed the code of Mozilla firefox in /usr/lib64/firefox/omni.ja now i want to compile the firefox so that the changes will get effect.


title: Emacs sync w/ Google Calendar and Contacts?

text: Is there a way to use Emacs to sync with Google Calendar and Google Contacts, ideally keeping a local copy so I can access them offline?


title: How do I recursively delete directories with wildcard?

text: I am working through SSH on a WD My Book World Edition. Basically I would like to start at a particular directory level, and recursively remove all sub- directories matching .Apple* - how would I go about that? I tried `rm -rf .Apple*` and `rm -fR .Apple*` both not deleting directories matching that name within sub-directories. Any help would be greatly appreciated. Thanks, Dany.


title: Configure guessnet to switch automatically between LAN and WLAN

text: I want to configure guessnet and wpa_supplicant such that if I plug in my LAN cable, it connect to the network via the cable and if I unplug it, it automatically switches to WLAN and vice versa. I managed to make it work, however if I unplug the cable, it takes 10 to 20 seconds to connect to the WLAN network, which is pretty slow. In contrast, if I plug in the cable, it takes just a second to disconnect from WLAN and connect to LAN. Is there any way to get a better configuration to make the switching to WLAN much faster? By the way, when I tried new settings I often hat to reboot which was very annoying, a simple `service networking restart` was not enough - perhaps this has to do something with my configuration. My system is ubuntu 13.10. Here are my config-files: `/etc/network/interfaces`               auto lo     iface lo inet loopback          #use guessnett     mapping eth0             script /usr/sbin/guessnet-ifupdown             #map timeout: 3             map default: unknown               iface home inet static           address 192.168.1.80           netmask 255.255.255.0           gateway 192.168.1.1           dns-nameservers 192.168.1.1           test1 peer address 192.168.1.1               iface no-net inet manual           test2  missing-cable          iface unknown inet dhcp          iface wlanWork inet dhcp          auto wlan0     iface wlan0 inet manual            wpa-roam  /etc/wpa_supplicant/wpa_supplicant.conf      And this is my `/etc/wpa/supplicant.conf`               ctrl_interface=/var/run/wpa_supplicant          eapol_version=1          ap_scan=1          network={         ssid="mywlan"         scan_ssid=1         psk="1234"         proto=RSN         key_mgmt=WPA-PSK         pairwise=CCMP         group=CCMP         id_str="home" ## specified in /etc/network/interfaces     }               network={         ssid="wlanWork"         scan_ssid=1         psk="1234"         proto=RSN         key_mgmt=WPA-PSK         pairwise=CCMP         group=CCMP         id_str="wlanWork" ## specified in /etc/network/interfaces     }      Finally this is `/etc/default/ifplugd` as generated by `dpkg-reconfigure ifplugd`               INTERFACES="eth0"     HOTPLUG_INTERFACES=""     ARGS="-q -f -u0 -d10 -w -I"     SUSPEND_ACTION="stop"      **Edit** I noticed some wired problems with this setup which I cannot reproduce. One time WLAN worked, but LAN didn't have the proper route/gateway. After setting the gateway manually via `route add default gw 192.168.1.1` and rebooting, it worked again. After a second reboot nothing worked despite the fact that I got the correct IP (even `ping 192.168.1.1` didn't work). Then I had to do `sudo dhclient` to get a working internet connection again...


title: What makes Ubuntu not totally Free Software?

text: I heard that Ubuntu is not completely free (as in Freedom). What are the specific parts of Ubuntu that are not Free?


title: Cannot create "Hello World" module (and NVIDIA, and VirtualBox)

text: First off, the details. **BEFORE:** kernel: 3.2.0-2-amd64, nvidia driver: 295.59 **AFTER:** kernel: 3.2.0-3-amd64, nvidia driver: 302.17-3 My Debian wheezy is kept recent at all times. Actually, doing daily `apt-get upgrade -s` got me in this trouble in the first place. Evidently, after an `apt-get upgrade`, something "broke" on my Debian -- something related to the build ecosystem and/or DKMS itself. The NVIDIA driver cannot get build by ANY method recommended in the official Wikis. Including the NVIDIA official binary (log snippet from that at one of the updates). Here's the output of `dpkg-reconfigure nvidia-kernel-dkms`:               # dpkg-reconfigure nvidia-kernel-dkms          ------------------------------     Deleting module version: 302.17     completely from the DKMS tree.     ------------------------------     Done.     Loading new nvidia-302.17 DKMS files...     Building only for 3.2.0-3-amd64     Building initial module for 3.2.0-3-amd64     Error!  Build of nvidia.ko failed for: 3.2.0-3-amd64 (x86_64)     Consult the make.log in the build directory     /var/lib/dkms/nvidia/302.17/build/ for more information.      A relevant snippet from `/var/lib/dkms/nvidia/302.17/build/make.log` follows. The problem is **not** in the compilation, I can guarantee that.                 LD [M]  /var/lib/dkms/nvidia/302.17/build/nvidia.o       Building modules, stage 2.       MODPOST 0 modules     make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-3-amd64'     make: Leaving directory `/var/lib/dkms/nvidia/302.17/build'      And that's it. No explanation of any kind in any other files in the same directory (at least as far as I checked). Before I ask my questions: I am using nouveau driver now (it's not like I got any choice anyway), but it doesn't work too well for me. I got 3 desktops, constantly playing movies on 1 of them, and being a very busy developer on the other 2. The nouveau driver fails a little bit there (the movies on the second screen get horizontal stripes all the time, the XFCE consoles lag a bit on the scrolling, etc.) **Questions:**   * Should I change my kernel version? Tried `3.2.0-2-amd64` and `3.2.0-3-amd64`, to no avail. Trying `3.2.0-3-rt-amd64` makes my machine freeze after few minutes of operation, thus I don't dare to install it again.   * Should I change a version of something in my build environment? (As pointed in the updates, it's not just NVIDIA problem, as it turns out).   * Should I assume that my linker is at fault (I am _not_ using `gold`, I am using `ld` from the `binutils` package) and if so, what could I do do make the DKMS method finally work? Since the problem does seem to manifest itself on the linkage phase (and MODPOST shows 0 modules). On a personal note, this disturbs me on a lot deeper level I care to usually admit. I had a **big respect to Debian** , which at the moment is shattered. C'mon, a simple `apt-get upgrade` breaks all open-source kernel drivers compilations / linkages? Extremely disappointing. **UPDATE #1:** I did in fact try to install the official 304.22 NVIDIA drivers, here's the log file. Looks like the linking does indeed fail, does it? Also, if I try to also enable DKMS integration, I get a message of the sorts that the script cannot determine the current kernel version (text in the 3rd update).               nvidia-installer log file '/var/log/nvidia-installer.log'     creation time: Sat Jul 21 22:59:30 2012     installer version: 304.22          PATH: /usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin          nvidia-installer command line:         ./nvidia-installer          Using: nvidia-installer ncurses user interface     -> License accepted.     -> Installing NVIDIA driver version 304.22.     -> There appears to already be a driver installed on your system (version: 304.22).  As part of installing this driver (version: 304.22), the existing driver will be uninstalled.  Are you sure you want to continue? ('no' will abort installation) (Answer: Yes)     -> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: No)     -> Performing CC sanity check with CC="gcc-4.6".     -> Performing CC version check with CC="gcc-4.6".     -> Kernel source path: '/lib/modules/3.2.0-3-amd64/source'     -> Kernel output path: '/lib/modules/3.2.0-3-amd64/build'     -> Performing rivafb check.     -> Performing nvidiafb check.     -> Performing Xen check.     -> Cleaning kernel module build directory.        executing: 'cd ./kernel; make clean'...     -> Building kernel module:        executing: 'cd ./kernel; make module SYSSRC=/lib/modules/3.2.0-3-amd64/source SYSOUT=/lib/modules/3.2.0-3-amd64/build'...        NVIDIA: calling KBUILD...        make -C /lib/modules/3.2.0-3-amd64/build \         KBUILD_SRC=/usr/src/linux-headers-3.2.0-3-common \         KBUILD_EXTMOD="/tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel" -f /usr/src/linux-headers-3.2.0-3-common/Makefile \         modules        test -e include/generated/autoconf.h -a -e include/config/auto.conf || (     \         echo;                               \         echo "  ERROR: Kernel configuration is invalid.";       \         echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\         echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \         echo;                               \         /bin/false)        mkdir -p /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/.tmp_versions ; rm -f /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/.tmp_versions/*        make -f /usr/src/linux-headers-3.2.0-3-common/scripts/Makefile.build obj=/tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel          gcc-4.6 -Wp,-MD,/tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/.nv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/include -I/usr/src/linux-headers-3.2.0-3-common/arch/x86/include -Iarch/x86/include/generated -Iinclude  -I/usr/src/linux-headers-3.2.0-3-common/include -include /usr/src/linux-headers-3.2.0-3-common/include/linux/kconfig.h   -I/tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel -Wall -MD -Wsign-compare -Wno-cast-        qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"304.22\" -Wno-unused-function -Wuninitialized -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/.tmp_nv.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv.c        In file included from /usr/src/linux-headers-3.2.0-3-common/include/linux/kernel.h:17:0,                         from /usr/src/linux-headers-3.2.0-3-common/include/linux/sched.h:55,                         from /usr/src/linux-headers-3.2.0-3-common/include/linux/utsname.h:35,                         from /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-linux.h:38,                         from /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv.c:13:        /usr/src/linux-headers-3.2.0-3-common/include/linux/bitops.h: In function ‘hweight_long’:        /usr/src/linux-headers-3.2.0-3-common/include/linux/bitops.h:49:41: warning: signed and unsigned type in conditional expression [-Wsign-compare]        In file included from /usr/src/linux-headers-3.2.0-3-common/arch/x86/include/asm/uaccess.h:575:0,                         from /usr/src/linux-headers-3.2.0-3-common/include/linux/poll.h:14,                         from /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-linux.h:97,                         from /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv.c:13:        /usr/src/linux-headers-3.2.0-3-common/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:        /usr/src/linux-headers-3.2.0-3-common/arch/x86/include/asm/uaccess_64.h:53:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]          ...snipped lots of compile output with the same warning...               ld -m elf_x86_64   -r -o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nvidia.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-kernel.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-acpi.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-chrdev.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-cray.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-gvi.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-i2c.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-mempool.o /tmp/selfgz10141/NVI        DIA-Linux-x86_64-304.22/kernel/nv-mlock.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-mmap.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-p2p.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-pat.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-procfs.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-usermap.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-vm.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nv-vtophys.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/os-agp.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/os-interface.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/os-mtrr.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/os-registry.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/os-smp.o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/os-usermap.o         (cat /dev/null;   echo kernel//tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/nvidia.ko;) > /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/modules.order        make -f /usr/src/linux-headers-3.2.0-3-common/scripts/Makefile.modpost          scripts/mod/modpost -m  -i /usr/src/linux-headers-3.2.0-3-amd64/Module.symvers -I /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/Module.symvers  -o /tmp/selfgz10141/NVIDIA-Linux-x86_64-304.22/kernel/Module.symvers -S -w  -s        NVIDIA: left KBUILD.        nvidia.ko failed to build!        make[1]: *** [module] Error 1        make: *** [module] Error 2     -> Error.     ERROR: Unable to build the NVIDIA kernel module.     ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.      **UPDATE #2:** As per the suggestion of _StarNamer_ , I did reinstall `linux- headers-3.2.0-3-amd64`. After that was done, DKMS kicked in and tried again to compile the NVIDIA driver. Here's the contents of the file `/var/lib/dkms/nvidia/304.22/build/make.log`:               DKMS make.log for nvidia-304.22 for kernel 3.2.0-3-amd64 (x86_64)     Sun Jul 22 14:50:58 EEST 2012     If you are using a Linux 2.4 kernel, please make sure     you either have configured kernel sources matching your     kernel or the correct set of kernel headers installed     on your system.          If you are using a Linux 2.6 kernel, please make sure     you have configured kernel sources matching your kernel     installed on your system. If you specified a separate     output directory using either the "KBUILD_OUTPUT" or     the "O" KBUILD parameter, make sure to specify this     directory with the SYSOUT environment variable or with     the equivalent nvidia-installer command line option.          Depending on where and how the kernel sources (or the     kernel headers) were installed, you may need to specify     their location with the SYSSRC environment variable or     the equivalent nvidia-installer command line option.          *** Unable to determine the target kernel version. ***          make: *** [select_makefile] Error 1      **UPDATE #3:** After days and days of googling, I started to wonder if that's NVIDIA's fault at all. Turns out, it's not. I tried to install Virtual Box 4.1 (from the `testing` repo), and I stumbled upon **this again** :               # cat /var/lib/dkms/virtualbox/4.1.18/build/make.log      DKMS make.log for virtualbox-4.1.18 for kernel 3.2.0-3-amd64 (x86_64)     Tue Jul 24 17:58:57 EEST 2012     make: Entering directory `/usr/src/linux-headers-3.2.0-3-amd64'       LD      /var/lib/dkms/virtualbox/4.1.18/build/built-in.o       LD      /var/lib/dkms/virtualbox/4.1.18/build/vboxdrv/built-in.o       CC [M]  /var/lib/dkms/virtualbox/4.1.18/build/vboxdrv/linux/SUPDrv-linux.o     ... snipped ...       CC [M]  /var/lib/dkms/virtualbox/4.1.18/build/vboxpci/SUPR0IdcClientComponent.o       CC [M]  /var/lib/dkms/virtualbox/4.1.18/build/vboxpci/linux/SUPR0IdcClient-linux.o       LD [M]  /var/lib/dkms/virtualbox/4.1.18/build/vboxpci/vboxpci.o       Building modules, stage 2.       MODPOST 0 modules     make: Leaving directory `/usr/src/linux-headers-3.2.0-3-amd64'      And of course, no more details (as already have been said, it does _seem_ like a linker problem, but I cannot be sure yet). So this must be more of a Debian / DKMS problem or misconfiguration of some kind. However, I swear I didn't touch anything. I was simply doing daily `apt-get upgrade`-s. Then _something_ went not so well, obviously. **UPDATE #4:** I did try create a small module as described here: http://stackoverflow.com/questions/4715259/linux-modpost-does-not-build- anything. Indeed I am still seeing `MODPOST 0 modules`. Here's the output when I put `V=1` in the Makefile:               # make     make -C /lib/modules/3.2.0-3-amd64/build M=/home/dimi/code/hello V=1 modules     make[1]: Entering directory `/usr/src/linux-headers-3.2.0-3-amd64'     make -C /usr/src/linux-headers-3.2.0-3-amd64 \         KBUILD_SRC=/usr/src/linux-headers-3.2.0-3-common \         KBUILD_EXTMOD="/home/dimi/code/hello" -f /usr/src/linux-headers-3.2.0-3-common/Makefile \         modules     test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \         echo;                               \         echo "  ERROR: Kernel configuration is invalid.";       \         echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\         echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \         echo;                               \         /bin/false)     mkdir -p /home/dimi/code/hello/.tmp_versions ; rm -f /home/dimi/code/hello/.tmp_versions/*     make -f /usr/src/linux-headers-3.2.0-3-common/scripts/Makefile.build obj=/home/dimi/code/hello        gcc-4.6 -Wp,-MD,/home/dimi/code/hello/.hello.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/include -I/usr/src/linux-headers-3.2.0-3-common/arch/x86/include -Iarch/x86/include/generated -Iinclude  -I/usr/src/linux-headers-3.2.0-3-common/include -include /usr/src/linux-headers-3.2.0-3-common/include/linux/kconfig.h   -I/home/dimi/code/hello -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hello)"  -D"KBUILD_MODNAME=KBUILD_STR(hello)" -c -o /home/dimi/code/hello/.tmp_hello.o /home/dimi/code/hello/hello.c     (cat /dev/null;   echo kernel//home/dimi/code/hello/hello.ko;) > /home/dimi/code/hello/modules.order     make -f /usr/src/linux-headers-3.2.0-3-common/scripts/Makefile.modpost       scripts/mod/modpost -m  -i /usr/src/linux-headers-3.2.0-3-amd64/Module.symvers -I /home/dimi/code/hello/Module.symvers  -o /home/dimi/code/hello/Module.symvers -S -w -c -s     make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-3-amd64'      And here is what I see when I remove `V=1`:               # make     make -C /lib/modules/3.2.0-3-amd64/build M=/home/dimi/code/hello modules     make[1]: Entering directory `/usr/src/linux-headers-3.2.0-3-amd64'       CC [M]  /home/dimi/code/hello/hello.o       Building modules, stage 2.       MODPOST 0 modules     make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-3-amd64'      Someone, please! I cannot be the only one who ever had this problem!


title: How to understand what's taking up space?

text: I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives. A program that works on console and doesn't require a UI is preferred .


title: Command line linux alternative for Windirstat/SpaceMonger?

text: > **Possible Duplicate:**   >  How to understand what's taking up space? What's a good command line utility/script to analyze a folder structure and find out what's taking up all the space? The granularity of `df` is way to large. Specifically I'd like something that can run with limited permissions (e.g. on shared hosting) I seem to be running on Redhat, if that matters.


title: Disk space disappearing

text: > **Possible Duplicate:**   >  How to understand what's taking up space? Hi, I am using Ubuntu 10.10.   I have 40G of disk space in my partition /home and have used up 10 G of it, so I should have 30G left. But somehow disk space disappeared almost completely. I don't know what ate up the disk space. I checked with `ps ax` and then `du` and couldn't find strange activities.   I would need to reboot the system to recover the free space! Any ideas?


title: Init script partially launches java app

text: I have a java application that I manage to execute by hand. The application normally opens several ports for local communications (7180 => 7183). Port 7182 serves as a web console and allows me to quickly check that everything went fine.               java -cp $ARCHIVES -Djava.security.policy=$POLICY -Dconfigfile=$CONFIG_FILE $CLASS      As soon as I put this in an init script, the ports are not open but the app somehow manages to start with the following message: 'Dead or echo port not responding'. Here is the start-stop-daemon line in my init script:               start-stop-daemon --start --chuid thomas --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \         $DAEMON_ARGS \      What difference between manual execution and scripted execution could explain that the app is half started? * * * As an additionnal information, the application is SIPS Office Server (payment solution).


title: Is there any way to deploy an virtual machine software via command line on centos3

text: I have a centos3 based legacy distribution with all the desktop environment removed. I have only access via command line. I am now asked to run a centos 6.1 distribution on a virtual machine on this system. From what I understand, the virtual machine software (qemu, vmplayer, virtual box) will have to create a window to show the guest operating system and will therefore need a desktop environment. Is there any way possible to run centos 6.1 via virtual machine without a desktop environment?


title: How can I see moved lines in a file comparison with vimdiff / diff?

text: Moved lines are frequently annotated as deletes and adds but they can be shown as moved-from and moved-to instead. Like in this screenshot of Notepad++. ![Notepad++ diff'ing moved lines](http://i.stack.imgur.com/jF26O.png)


title: How can I get distribution name and version number in a simple shell script?

text: I'm working on a simple bash script that should be able to run on Ubuntu and CentOS distributions (support for Debian and Fedora/RHEL would be a plus) and I need to know the name and version of the distribution the script is running (in order to trigger specific actions, for instance the creation of repositories). So far what I've got is this:               OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]')     ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')     VERSION=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./')          if [ -z "$OS" ]; then         OS=$(awk '{print $1}' /etc/*-release | tr '[:upper:]' '[:lower:]')     fi          if [ -z "$VERSION" ]; then         VERSION=$(awk '{print $3}' /etc/*-release)     fi          echo $OS     echo $ARCH     echo $VERSION      This _seems_ to work, returning `ubuntu` or `centos` (I haven't tried others) as the release name however, I have a feeling that there must be an easier, more reliable way of finding this out... No? It doesn't work for RedHat. /etc/redhat-release contains : Redhat Linux Entreprise release 5.5 So, the version is not the third word, you'd better use :               OS_MAJOR_VERSION=`sed -rn 's/.*([0-9])\.[0-9].*/\1/p' /etc/redhat-release`     OS_MINOR_VERSION=`sed -rn 's/.*[0-9].([0-9]).*/\1/p' /etc/redhat-release`     echo "RedHat/CentOS $OS_MAJOR_VERSION.$OS_MINOR_VERSION"


title: How to determine distribution from command line?

text: > **Possible Duplicate:**   >  Bash: Get Distribution Name and Version Number Given (root) access to a machine with Linux through the command line(over ssh), how can I determine which distribution is actually running on the system?


title: Reading Linux distribution name from filesystem or command

text: I need to collect some system info from linux machines and decide what to do based on some distribution/version -specific conditionals. To simplify my example, I concocted a fictitious `my_function_display_operating_system` function. It is a useless function but it frames the problem:   1. detect the general OS type (osx, linux, etc.)   2. detect some version information about the OS   3. detect the distribution _friendly name_ Point `3.` is what I most need help with, please. Is there a reliable way to read a string indicating the host linux distribution name? I am using `/etc/issue` in the example below as I know of no other way, or set of ways, to get to this information. I am happy with a _it depends_ answer, I can build a quite involved `case` `esac` switch statement if need be. I just need to know where to look, and I can't download/install VMs for all the distros I know of to "look around" and/or grep for the name.. * * *               # Displays operating system.          function my_function_display_operating_system() {       local operating_system       case $my_global_os_type in         OSX)           printf -v operating_system \                     'OS X v%s (build %s)' \                     $(sw_vers -productVersion) \                     $(sw_vers -buildVersion)           ;;         Linux)           local -r linux_kernel_version=$(uname -r)           printf -v operating_system \                     'GNU/Linux (kernel %s)' \                     "$linux_kernel_version"           if [[ -f /etc/issue ]]; then             local -r distribution=$(cat /etc/issue | sed 's/ \\n \\l//g')             operating_system+="\nDistribution: $distribution"           fi           ;;         *)           operating_system=Unknown           ;;       esac       printf "Operating system: $operating_system\n"     }      * * * Sample output: * * *               > my_function_display_system_information     Operating system   GNU/Linux (kernel 3.5.0-25-generic)     Distribution       Ubuntu 12.10     System memory      1 GB     Bash               v4.2.37(1)-release     Vim                VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 26 2012 16  45  54)     # ... etc ...      * * *


title: How do I identify which Linux distro is running?

text: We have some new hardware in our office which runs its own customized Linux OS. How do I go about figuring which distro it's based on?


title: Finding out what Linux I'm running

text: > **Possible Duplicate:**   >  Bash: Get Distribution Name and Version Number Is there any consistent way of determining the Linux Distribution / Release that a machine is running if you don't already know what it is? Assume that no GUI access is possible.


title: Figure out which distro I'm using with Zsh script

text: I'm making a script that installs some basic needs of mine on my newly installed Linux. However depending on the Linux distro the contents and commands would be different. In Arch Linux I would use `pacman -S ...`, in Ubuntu I would use `apt-get ...`. So my question is how I can differentiate all of these different distros? Of course it would go along with differentiating the kernel as well (if possible). Thanks for your help!


title: How can I identify the variant of Unix/Linux from a shell?

text: > **Possible Duplicate:**   >  How can I get distribution name and version number in a simple shell > script? Given a shell, how can I identify the variant of Unix/Linux that is running on a remote server?


title: find action not working for specific search

text: I'm trying to use the `find` command to list the size of a certain set of files but am getting no output. The command I use is:               find POD -type f -name *.mp3 -or -name *.ogg -ls      Which produces no output. While:               find POD -type f -name *.mp3 -or -name *.ogg      does produce output, I've also tried the actions:               -printf "%p %k KB\n"     -exec ls -ls '{}' \;     -print0      but all of these give no output. When I use any of these actions with a different expression e.g.:               find . -maxdepth 1 -type f -printf "%p %k KB\n"      I also get the expected output. Does anybody have any idea what the problem is? I'm running:               Linux irimi 3.10.37-1-MANJARO #1 SMP Mon Apr 14 20:56:29 UTC 2014 x86_64 GNU/Linux      aka an up to date Manjaro linux distribution. The shell I use is: `/bin/bash` version `4.3.8(1)-release`. The content of my `SHELLOPTS` environment variable is:               braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor      my `BASHOPTS` environment variable is:               cdspell:checkwinsize:cmdhist:complete_fullquote:dotglob:expand_aliases:extglob:extquote:force_fignore:histappend:hostcomplete:interactive_comments:nocaseglob:progcomp:promptvars:sourcepath      Again any help on trying to debug this would be very much appreciated.


title: Cannot access disk, partition table broken

text: I was so dumb, to turn of the power on my Readynas Ultra 4 when it was installing the disk (3TB WD Green), I had no time to wait for it as I was going to return it (It was to damn noisy) The disk installation was at 0% and stayed like that for 2minutes, so I decided to turn it off without really thinking about the consequences. Anyways, now it’s done, and I need to put it into my new NAS (Synology 413j), but that’s not going very good. The disk is recognized in BIOS, and I get it up as /dev/sdc when i run gparted live on USB. But it is not shown in Windows device manager or in ubuntu. When I run sudo gparted on a live ubuntu USB, I get Input/output error during read on /dev/sdc. I have tried more stuff in gparted live, but to sum it up, it is very similar to whats happening here: http://ubuntuforums.org/archive/index.php/t-1492414.html Up to the part where he runs badsectors, and get alot of errors, I ran badsectors -vs (I guess that is just read, and show output. I ran it for about 3000sectors, and for each block it counted the output was: (and so on)               1     2     3     4     5     6     7     8     9     10     11     12     13     140.00% done, 0:01 elapsed. (14/0/0 errors)     15     16     17     18     19     20     21     22     23     24     25     26     27     28     29     30     310.00% done, 0:02 elapsed. (31/0/0 errors)      In gparted(live) the /dev/sdc disk shows, but its all unallocated, and it shows an input/output read error when it scans all disks. When I try to create a new partition, I get an error with no partition table. I go to device - create partition table, and select gpt, I get about 5-6 errors with input/output read and also write on /dev/sdc. When I enter gdisk on gparted(live) I get:               Warning! Read error 5; strange behavior now likely!     Warning! Read error 5; strange behavior now likely!     Partition table scan:     MBR: not present     BSD: not present     APM: not present     GPT: not present          Creating new GPT entries.      When I run smartctl:               ubuntu@ubuntu:~$ sudo smartctl --all /dev/sdc     smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-29-generic] (local build)     Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net          === START OF INFORMATION SECTION ===     Device Model:     WDC WD30EZRX-00MMMB0     Serial Number:    WD-WCAWZ2205xxxxx     LU WWN Device Id: 5 0014ee 25c5f8480     Firmware Version: 80.00A80     User Capacity:    3,000,592,982,016 bytes [3.00 TB]     Sector Sizes:     512 bytes logical, 4096 bytes physical     Device is:        Not in smartctl database [for details use: -P showall]     ATA Version is:   8     ATA Standard is:  Exact ATA specification draft version not indicated     Local Time is:    Sat Sep 29 15:53:44 2012 UTC     SMART support is: Available - device has SMART capability.     SMART support is: Enabled          === START OF READ SMART DATA SECTION ===     SMART overall-health self-assessment test result: PASSED          General SMART Values:     Offline data collection status:  (0x84)    Offline data collection activity                         was suspended by an interrupting command from host.                         Auto Offline Data Collection: Enabled.     Self-test execution status:      (   0)    The previous self-test routine completed                         without error or no self-test has ever                         been run.     Total time to complete Offline     data collection:         (50700) seconds.     Offline data collection     capabilities:              (0x7b) SMART execute Offline immediate.                         Auto Offline data collection on/off support.                         Suspend Offline collection upon new                         command.                         Offline surface scan supported.                         Self-test supported.                         Conveyance Self-test supported.                         Selective Self-test supported.     SMART capabilities:            (0x0003)    Saves SMART data before entering                         power-saving mode.                         Supports SMART auto save timer.     Error logging capability:        (0x01)    Error logging supported.                         General Purpose Logging supported.     Short self-test routine     recommended polling time:      (   2) minutes.     Extended self-test routine     recommended polling time:      ( 255) minutes.     Conveyance self-test routine     recommended polling time:      (   5) minutes.     SCT capabilities:            (0x3035)    SCT Status supported.                         SCT Feature Control supported.                         SCT Data Table supported.          SMART Attributes Data Structure revision number: 16     Vendor Specific SMART Attributes with Thresholds:     ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE       1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0       3 Spin_Up_Time            0x0027   199   140   021    Pre-fail  Always       -       7050       4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       483       5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0       7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0       9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       572      10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0      11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0      12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       142     192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       31     193 Load_Cycle_Count        0x0032   198   198   000    Old_age   Always       -       8522     194 Temperature_Celsius     0x0022   114   095   000    Old_age   Always       -       38     196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0     197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1     198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0     199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0     200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0          SMART Error Log Version: 1     No Errors Logged          SMART Self-test log structure revision number 1     Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error     # 1  Short offline       Completed: read failure       90%       569         42084912     # 2  Short offline       Completed without error       00%       388         -          SMART Selective self-test log data structure revision number 1      SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS         1        0        0  Not_testing         2        0        0  Not_testing         3        0        0  Not_testing         4        0        0  Not_testing         5        0        0  Not_testing     Selective self-test flags (0x0):       After scanning selected spans, do NOT read-scan remainder of disk.     If Selective self-test is pending on power-up, resume after 0 minute delay.      My gdisk session under here: But the most usefull I got to in the end: Warning! Main partition table overlaps the first partition by 34 blocks! You will need to delete this partition or resize it in another utility.               user@debian:~$ sudo gdisk     GPT fdisk (gdisk) version 0.8.5          Type device filename, or press <Enter> to exit: /dev/sdc     Warning! Read error 5; strange behavior now likely!     Warning! Read error 5; strange behavior now likely!     Partition table scan:       MBR: not present       BSD: not present       APM: not present       GPT: not present          Creating new GPT entries.          Command (? for help): ?     b   back up GPT data to a file     c   change a partition's name     d   delete a partition     i   show detailed information on a partition     l   list known partition types     n   add a new partition     o   create a new empty GUID partition table (GPT)     p   print the partition table     q   quit without saving changes     r   recovery and transformation options (experts only)     s   sort partitions     t   change a partition's type code     v   verify disk     w   write table to disk and exit     x   extra functionality (experts only)     ?   print this menu          Command (? for help): n     Partition number (1-128, default 1): 1     First sector (34-5860533134, default = 2048) or {+-}size{KMGTP}: 2048     Last sector (2048-5860533134, default = 5860533134) or {+-}size{KMGTP}: 5860533134     Current type is 'Linux filesystem'     Hex code or GUID (L to show codes, Enter = 8300): l      0700 Microsoft basic data  0c01 Microsoft reserved    2700 Windows RE               4200 Windows LDM data      4201 Windows LDM metadata  7501 IBM GPFS                 7f00 ChromeOS kernel       7f01 ChromeOS root         7f02 ChromeOS reserved        8200 Linux swap            8300 Linux filesystem      8301 Linux reserved           8e00 Linux LVM             a500 FreeBSD disklabel     a501 FreeBSD boot             a502 FreeBSD swap          a503 FreeBSD UFS           a504 FreeBSD ZFS              a505 FreeBSD Vinum/RAID    a580 Midnight BSD data     a581 Midnight BSD boot        a582 Midnight BSD swap     a583 Midnight BSD UFS      a584 Midnight BSD ZFS         a585 Midnight BSD Vinum    a800 Apple UFS             a901 NetBSD swap              a902 NetBSD FFS            a903 NetBSD LFS            a904 NetBSD concatenated      a905 NetBSD encrypted      a906 NetBSD RAID           ab00 Apple boot               af00 Apple HFS/HFS+        af01 Apple RAID            af02 Apple RAID offline       af03 Apple label           af04 AppleTV recovery      af05 Apple Core Storage       be00 Solaris boot          bf00 Solaris root          bf01 Solaris /usr & Mac Z     bf02 Solaris swap          bf03 Solaris backup        bf04 Solaris /var             bf05 Solaris /home         bf06 Solaris alternate se  bf07 Solaris Reserved 1       bf08 Solaris Reserved 2    bf09 Solaris Reserved 3    bf0a Solaris Reserved 4       bf0b Solaris Reserved 5    c001 HP-UX data            c002 HP-UX service            ef00 EFI System            ef01 MBR partition scheme  ef02 BIOS boot partition      fd00 Linux RAID                 Hex code or GUID (L to show codes, Enter = 8300): ef01     Changed type of partition to 'MBR partition scheme'          Command (? for help): ?     b   back up GPT data to a file     c   change a partition's name     d   delete a partition     i   show detailed information on a partition     l   list known partition types     n   add a new partition     o   create a new empty GUID partition table (GPT)     p   print the partition table     q   quit without saving changes     r   recovery and transformation options (experts only)     s   sort partitions     t   change a partition's type code     v   verify disk     w   write table to disk and exit     x   extra functionality (experts only)     ?   print this menu          Command (? for help): w          Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING     PARTITIONS!!          Do you want to proceed? (Y/N): Y     OK; writing new GUID partition table (GPT) to /dev/sdc.     Unable to save backup partition table! Perhaps the 'e' option on the experts'     menu will resolve this problem.     Warning! An error was reported when writing the partition table! This error     MIGHT be harmless, or the disk might be damaged! Checking it is advisable.          Command (? for help): o        This option deletes all partitions and creates a new protective MBR.     Proceed? (Y/N): Y          Command (? for help): p     Disk /dev/sdc: 5860533168 sectors, 2.7 TiB     Logical sector size: 512 bytes     Disk identifier (GUID): 3995C753-D73D-4386-8818-3A9AF06E3B2C     Partition table holds up to 128 entries     First usable sector is 34, last usable sector is 5860533134     Partitions will be aligned on 2048-sector boundaries     Total free space is 5860533101 sectors (2.7 TiB)          Number  Start (sector)    End (sector)  Size       Code  Name          Command (? for help): o     This option deletes all partitions and creates a new protective MBR.     Proceed? (Y/N): Y          Command (? for help): w          Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING     PARTITIONS!!          Do you want to proceed? (Y/N): Y     OK; writing new GUID partition table (GPT) to /dev/sdc.     Unable to save backup partition table! Perhaps the 'e' option on the experts'     menu will resolve this problem.     Warning! An error was reported when writing the partition table! This error     MIGHT be harmless, or the disk might be damaged! Checking it is advisable.          Command (? for help): p     Disk /dev/sdc: 5860533168 sectors, 2.7 TiB     Logical sector size: 512 bytes     Disk identifier (GUID): F1AE4B7D-9CCE-4211-BE3D-88DFFCCD3696     Partition table holds up to 128 entries     First usable sector is 34, last usable sector is 5860533134     Partitions will be aligned on 2048-sector boundaries     Total free space is 5860533101 sectors (2.7 TiB)          Number  Start (sector)    End (sector)  Size       Code  Name          Command (? for help): o     This option deletes all partitions and creates a new protective MBR.     Proceed? (Y/N): n          Command (? for help): ?     b   back up GPT data to a file     c   change a partition's name     d   delete a partition     i   show detailed information on a partition     l   list known partition types     n   add a new partition     o   create a new empty GUID partition table (GPT)     p   print the partition table     q   quit without saving changes     r   recovery and transformation options (experts only)     s   sort partitions     t   change a partition's type code     v   verify disk     w   write table to disk and exit     x   extra functionality (experts only)     ?   print this menu          Command (? for help): d     No partitions          Command (? for help): i     No partitions          Command (? for help): r          Recovery/transformation command (? for help): ?     b   use backup GPT header (rebuilding main)     c   load backup partition table from disk (rebuilding main)     d   use main GPT header (rebuilding backup)     e   load main partition table from disk (rebuilding backup)     f   load MBR and build fresh GPT from it     g   convert GPT into MBR and exit     h   make hybrid MBR     i   show detailed information on a partition     l   load partition data from a backup file     m   return to main menu     o   print protective MBR data     p   print the partition table     q   quit without saving changes     t   transform BSD disklabel partition     v   verify disk     w   write table to disk and exit     x   extra functionality (experts only)     ?   print this menu          Recovery/transformation command (? for help): f     Warning! This will destroy the currently defined partitions! Proceed? (Y/N): Y     Problem loading MBR! GPT is untouched; regenerating protective MBR!          Recovery/transformation command (? for help): ?     b   use backup GPT header (rebuilding main)     c   load backup partition table from disk (rebuilding main)     d   use main GPT header (rebuilding backup)     e   load main partition table from disk (rebuilding backup)     f   load MBR and build fresh GPT from it     g   convert GPT into MBR and exit     h   make hybrid MBR     i   show detailed information on a partition     l   load partition data from a backup file     m   return to main menu     o   print protective MBR data     p   print the partition table     q   quit without saving changes     t   transform BSD disklabel partition     v   verify disk     w   write table to disk and exit     x   extra functionality (experts only)     ?   print this menu          Recovery/transformation command (? for help): v          No problems found. 5860533101 free sectors (2.7 TiB) available in 1     segments, the largest of which is 5860533101 (2.7 TiB) in size.          Recovery/transformation command (? for help): b          Recovery/transformation command (? for help): c     Warning! This will probably do weird things if you've converted an MBR to     GPT form and haven't yet saved the GPT! Proceed? (Y/N): Y     Warning! Read error 5! Misbehavior now likely!     Caution! After loading partitions, the CRC doesn't check out!          Recovery/transformation command (? for help): w     Warning! Main partition table overlaps the first partition by 34 blocks!     You will need to delete this partition or resize it in another utility.     Aborting write of new partition table.      No matter what I try to do, I seem to get the input/output error, I tried installing ubuntu on it, and it seems to create the partition table, but when I start the install..input/output error. Anyone have any idea on how I can fix this? I’m happy to post more logfiles or whatever, but I’m not experienced with linux, I just use it for this kind of stuff. The disk is very new, just some moths, so I doubt it’s any bad sectors. Thank you for all input!


title: Starting a new instance of GDM in Fedora 19

text: In Fedora 18, I could use `gdmflexiserver` to start up a new instance of X and GDM on a new VT. In Fedora 19, `gdmflexiserver` appears to have lost the ability to do this, and I'm looking for its replacement.


title: What do the flags in /proc/cpuinfo mean?

text: How can I tell whether my processor has a particular feature? (64-bit instruction set, hardware-assisted virtualization, cryptographic accelerators, etc.) I know that the file `/proc/cpuinfo` contains this information, in the `flags` line, but what do all these cryptic abbreviations mean? For example, given the following extract from `/proc/cpuinfo`, do I have a 64-bit CPU? Do I have hardware virtualization?               model name      : Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz     …     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority


title: 256 color in real console

text: I have in my .bashrc               export TERM=xterm-256color      but this cause blinking all colored text (ls --color, in vim etc.) in real console (CTRL + ALT + F1) . So is there any possibility to recognize in which console I am (real or virtual) so I can export TERM variable with valid value? [EDIT] I found alternative solution only: for vim user (in .vimrc)               set t_Co=256      or for xterm in .Xdefaults (after that xrdb -load .Xdefaults)               XTerm*termName:         xterm-256color      or for screen (.screenrc)               term screen-256color


title: How to force Thunar to remember sort order for different folders?

text: I want all the files in my Downloads folder to be sorted by modification date, but all other folders, and files in other partitions to be sorted by name. How can I make Thunar to remember the sort order for different folders?


title: Building an Arch Linux based live CD/USB

text: After bootstrapping my Arch live CD, I try to install the `archiso` package with:               pacman -Sy archiso      but I get:               error: failed to commit transaction (conflicting files)     archiso: /usr/lib/initcpio/archiso_shutdown exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso_loop_mnt exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso_pxe_common exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso_pxe_http exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso_pxe_nbd exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso_pxe_nfs exists in filesystem     archiso: /usr/lib/initcpio/hooks/archiso_shutdown exists in filesystem     archiso: /usr/lib/initcpio/install/archiso exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_kms exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_loop_mnt exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_pxe_common exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_pxe_http exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_pxe_nbd exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_pxe_nfs exists in filesystem     archiso: /usr/lib/initcpio/install/archiso_shutdown exists in filesystem     Errors occurred, no packages were upgraded.      I read pacman wiki. So I tried:               pacman -Qo  /usr/lib/initcpio/archiso_shutdown       and I get:               error: No package owns /usr/lib/initcpio/archiso_shutdown      As for: > If you had installed a program manually without using pacman or a frontend, > you have to remove it and all its files and reinstall properly using pacman. After bootstrapping the live CD, `pacman` is the first program run.


title: External ext4 drive unmounted after some time (Raspbian)

text: I am using BitTorrent Sync on my Raspberry Pi (Raspbian) which syncs files on the external hard drive (ext4). I wrote a small script that spins down the drive after 5 minutes of inactivity. As soon as I read something it starts to spin again, so that seems to work fine. Here is the spindown script which is executed every 5 minutes via cronjob:               # !/bin/sh          # Get new state from diskstats     NEWstate=$(cat /proc/diskstats | grep $1)     echo $NEWstate > /home/pi/bin/spindown/NEWstate.txt          # compare md5 sums     md5new=$(md5sum /home/pi/bin/spindown/NEWstate.txt | sed 's/ .*//')     md5old=$(md5sum /home/pi/bin/spindown/OLDstate.txt | sed 's/ .*//')          # if no changes, power down     if [ "$md5new" = "$md5old" ]; then             sdparm --flexible --command=stop /dev/$1 &>/dev/null     fi          # Write current state to file     echo $NEWstate > /home/pi/bin/spindown/OLDstate.txt      But after a few hours the hard drive is being unmounted and BT Sync can not work properly anymore. I want to use it as a private backup server so it should run all the time. It's mounted via the `/etc/fstab` file like this: `/dev/sda5 /media/External ext4 defaults,noatime 0 0 ` Is there a way that remounts the drive automatically as soon as it gets unmounted or (even better) prevents it from doing so?


title: Logrotate maually on FreeBSD 8

text: I am able to rotate any log file manually via logroatate like this:               logrotate -f /etc/logrotate.d/my-hourly-file      I want to know how to perform the same action on FreeBSD 8? My investigation shows that `newsyslog` can be used for this purpose. If so how can I download and install `newsyslog`? Update: I think `newsyslog` has been installed and modifying the `/etc/newsyslog.conf` file will be enough for automatic installation. But how can I trigger it manually? Update2: when I search all newsyslog words starting from /, I only found /etc/rc.d/newsyslog script. Inside the script I realized that newsyslog command is defined under /usr/sbin/newsyslog. But there is not newsyslog file under /usr/sbin/newsyslog. I am stuck that how I can install newsyslog package into FreBSD 8


title: grep on line before the match plus the match

text: zzzzzzzzz     aaaaaaaaa     bbbbbbbbb &     ccccccccc &     ddddddddd     hhhhhhhhh     eeeeeeeee     fffffffff &     ggggggggg &      in the above line, what i want is to `grep`/`sed`/`awk` (any method is fine) line that have `&` sign plus one line on top of them. so for example the desired output will look like :               aaaaaaaaa     bbbbbbbbb &     ccccccccc &     eeeeeeeee     fffffffff &     ggggggggg &      following is what i have tried with no luck.               egrep "&" | -b 1 file.txt


title: Use server name instead of IP address

text: Installed apache 2 in my Ubuntu server and I use many web application like osc, glpi. To browse these applications I have to write @ip/glpi in browser. my purpose is to use servername instead of ip address. What is the way to do this action System info: Ubuntu 11.10 PHP 5.3.6 Apache 2.2.20 MySQL 5.1.67


title: 'who --message' -> which message?

text: I found the following in `man who`: > `-T, -w, --mesg` add user's message status as +, - or ?   >  `\--message` same as -T   >  `\--writable`same as -T   > So looked up `info who` and found > `-w -T --mesg --message --writable` After each login name print a character > indicating the user's message status   >  `+` allowing 'write' messages   >  `-` disallowing 'write' messages   >  `?` 'cannot find terminal device' **Question** : What 'message', which kind of 'message' is meant?


title: Redirecting output in the shell, permissions

text: I have a question about permissions. Distro: Debian GNU/Linux 6.0.4 (squeeze) So I have a folder with a php script in it. Both folder and file are owned by User1 If I do this: `php script.php` I get a permission denied error. Fair enough; I'm User2, not User1. If I do `sudo php script.php` this works because my user account is setup for that. So I wrote this script to accept an optional argument to output some stuff, like a "debug" mode, so if I do this: `sudo php script.php debug` It outputs some stuff to CLI. So far so good. But sometimes the output from the script is too long and I can't scroll up to see the output from the beginning, so I want to be able to redirect the output to a file. **So I have tried the following:** _This gives me a permission denied error._ `sudo php script.php debug >> results.txt` _This works_               sudo touch results.txt     sudo chown User1 results.txt     sudo chmod 777 results.txt     sudo php script.php debug >> results.txt      _Alternatively, this works_               sudo su -     php script.php debug >> results.txt      So what I want to know is... why did the first one give me a permission denied error? I thought the point of the sudo prefix is that I run the command as root, which works for running the php script...but it seems to me that this doesn't extend to executing the redirect? Can someone explain why? _**EDIT:_** So I found something from another post on here that works: `sudo php script.php debug | sudo tee results.txt` The answer there confirms my suspicion about the redirect still being run under my user and not sudo, but it doesn't explain why...can anybody explain why?


title: Overflow /tmp mounted when there is free space on /

text: I recently faced an "overflow" issue on `/tmp`. I don't have a separate `/tmp` partition, and there is 17% free in `/` - then why did I get an overflow `tmp` filesystem? ![enter image description here](http://i.stack.imgur.com/Z9gr3.png) ![enter image description here](http://i.stack.imgur.com/PC4yr.png)               # /etc/fstab: static file system information.     #     # Use 'blkid -o value -s UUID' to print the universally unique identifier     # for a device; this may be used with UUID= as a more robust way to name     # devices that works even if disks are added and removed. See fstab(5).     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     /dev/mapper/safesquid-root /               ext4    errors=remount-ro 0       1     # /boot was on /dev/sda1 during installation     UUID=d029e04b-11e9-42e1-b1d3-9cde73cb3b67 /boot           ext2    defaults        0       2     /dev/mapper/safesquid-swap_1 none            swap    sw              0       0      `mount` output               /dev/mapper/safesquid-root on / type ext4 (rw,errors=remount-ro)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     none on /sys/fs/fuse/connections type fusectl (rw)     none on /sys/kernel/debug type debugfs (rw)     none on /sys/kernel/security type securityfs (rw)     udev on /dev type devtmpfs (rw,mode=0755)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)     tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)     none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)     none on /run/shm type tmpfs (rw,nosuid,nodev)     /dev/sda1 on /boot type ext2 (rw)     overflow on /tmp type tmpfs (rw,size=1048576,mode=1777)     rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)     nfsd on /proc/fs/nfsd type nfsd (rw)               root@safesquid:~# free -m                  total       used       free     shared    buffers     cached     Mem:          2009        182       1826          0          9         48     -/+ buffers/cache:        124       1885     Swap:          715        130        585     root@safesquid:~# uname -a          Linux safesquid 2.6.32-41-server #94-Ubuntu SMP Fri Jul 6 18:15:07 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux      I'm running Ubuntu 12.04.1 LTS. I also checked `df -i`, there are free inodes.


title: How to install parted?

text: root@host [/]# parted     -bash: parted: command not found      I am using CentOS. Looks like I simply have to yum it first or something. How would I do so?


title: How to enable libass on Linux?

text: I tried to enable libass for ffmpeg with this `\--enable-libass` in command but it didn't recognise the command. Does anyone know how to enable libass on Linux?


title: Set sudo password differently from login one

text: As a privileged user I am trying to set the `sudo` password to another then the one used at login. I have done some research but have not found an answer. Does `sudo` support that kind of configuration? _**Edit:_** The problem is that if you ever lose your password, you lose everything. Someone could log in and promote himself to `root` with the same password. `sudo` has an option to ask for `root` password instead of invoked user password, (`rootpw`), but sharing `root` password is definitely not an option, that is why we set up `sudo`. I did `config 2FA` in the past, it worked great, but also defeats the automation purpose. For example if you want to execute a privileged command across a dozen of servers with an `expect` script, adding `2FA` doesn't allow you to do that. The closest solution I have found is to only allow SSH private key and setup pass-phrase with a key which differs from the `sudo` (login) password. Still, it is not comfy, because in an emergency situation you can't login with a PC where it doesn't have that key.


title: Centos 6.3 on Oracle VirtualBox 4.3.6 GUI flickering after startup

text: My CentOS 6.3 installation in Oracle Virtual Box 4.3.6 was working fine until this morning when the UI would not startup properly and started flickering. ![image 1](http://s30.postimg.org/9f3z18jup/Cent_OS63.png) In the UI there is a white box (3x2 size) that flickers (was not able to capture it) continuously. I am able to login to the system using ssh using IP from another machine and I see all files are intact... not sure why the UI is not materializing properly. I even changed display memory in VirtualBox settings to 128MB but to no avail. Please help me to resolve this. I dont want to re-install the Centos again (setting up system again is quite a step). The below is the VirtualBox's log:               00:01:01.045427 AIOMgr: Endpoint for file 'E:\VirtualBox\VDI\CentOS63.vdi' (flags 000c0723) created successfully     00:01:01.079417 Changing the VM state from 'RESUMING' to 'RUNNING'.     00:01:02.559869 AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes     00:01:03.828410 Changing the VM state from 'RUNNING' to 'SUSPENDING'.     00:01:03.857120 PDMR3Suspend: after    28 ms, 1 loops: 1 async tasks - ahci/0     00:01:03.888235 AIOMgr: Endpoint for file 'E:\VirtualBox\VDI\CentOS63.vdi' (flags 000c0781) created successfully     00:01:03.979697 PDMR3Suspend: 151 237 774 ns run time     00:01:03.979715 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.     00:01:05.724688 Changing the VM state from 'SUSPENDED' to 'RESUMING'.     00:01:05.725398 AIOMgr: Endpoint for file 'E:\VirtualBox\VDI\CentOS63.vdi' (flags 000c0723) created successfully     00:01:05.760108 Changing the VM state from 'RESUMING' to 'RUNNING'.     00:01:09.391589 AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes     00:01:40.621357 Changing the VM state from 'RUNNING' to 'SUSPENDING'.     00:01:40.623377 AIOMgr: Endpoint for file 'E:\VirtualBox\VDI\CentOS63.vdi' (flags 000c0781) created successfully     00:01:40.664968 PDMR3Suspend: 43 513 184 ns run time     00:01:40.664986 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.     00:01:43.567279 Changing the VM state from 'SUSPENDED' to 'RESUMING'.     00:01:43.567908 AIOMgr: Endpoint for file 'E:\VirtualBox\VDI\CentOS63.vdi' (flags 000c0723) created successfully     00:01:43.601704 Changing the VM state from 'RESUMING' to 'RUNNING'.     00:01:44.142130 AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes      .. more...               00:46:49.034055 AIOMgr: Endpoint for file 'E:\VirtualBox\VDI\CentOS63.vdi' (flags 000c0723) created successfully     00:46:49.067998 Changing the VM state from 'RESUMING' to 'RUNNING'.     00:46:49.354161 AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes     00:48:27.339663 Guest Additions capability report: (0x4 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no     00:48:27.348469 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0, flags=0x1     00:48:41.643962 OHCI: USB Reset     00:48:41.774693 Entering S5 power state (power down)     00:48:41.774768 Changing the VM state from 'RUNNING' to 'POWERING_OFF'.


title: Loop in WildCard as Input of Script

text: I want to use my script on many files sometimes. I used this for the purpose:               for etminput in $1     do         #process     done      But this just gives the first input. How can I do the process on every wildcard matches?


title: How can I append multiple extensions to a string with sed?

text: I want to create a script that will let me download images from entire subreddits at once, but I'm currently stuck on just getting the links right (one problem at a time! ^^). Anyway, since I can't think of a way to determine what format the image in the link will be, I was hoping _sed_ could be used to specify multiple extensions during replacement (e.g. (jpg|png|gif)), but this does not seem to work.               grep -E "href=\"/r/bacon/*" bacon.htm | sed "s .*/r/bacon/\(.*\)\".* http://i.imgur.com/\1.\(\jpg\|\png\|\gif\) "      expected:               http://i.imgur.com/foo.jpg     http://i.imgur.com/foo.png     http://i.imgur.com/foo.gif      got:               http://i.imgur.com/foo.(jpg|png|gif)      Google also does not seem to have an answer to this, admittedly, weird problem or at least I am having trouble coming up with meaningful ways to describe it. Any ideas or should I try this from a different angle?


title: How to run a script by shortkey in elementaryOS?

text: I want to be able to run certain scripts by shortcut the way I do in ubuntu - for example some similar to this awesome script. (On that model I can search google the text selected in any text editor, or even translate it various languages, search it on different sites, etc). How to use this type of script in elementaryOS?