title: "Cannot determine operating system" error

text: I have a OSX 10.6.8 and installed a LINUX version of Mathematica in my mac. When I try to open it with X11 or Terminal, it claims that "mathematica cannot determine operating system". I cannot figure out how to tell it what the OS is (I'm expecting it to be something like `linux32 mathematica`). I've looked everywhere for help, but nothing; I'm sure it's easy, also. How do I run Mathematica?


title: How do I get losetup -a to behave?

text: # losetup /dev/loop0 /tmp/tmpuUwgbn     # losetup -a     # losetup -f     /dev/loop1     # losetup /dev/loop0     /dev/loop0: [0806]:33654 (/tmp/tmpuUwgbn)     # ls -la /tmp/tmpuUwgbn     -rw------- 1 root root 0 2011-08-24 15:49 /tmp/tmpuUwgbn     # losetup -a     #      Why doesn't `losetup -a` list `/dev/loop0` when it clearly knows about it? The `man` page doesn't give any hints, and google doesn't help. **Note:** I found the answer by trial and error while writing this question, but I'm posting it anyway in the hopes it might help someone. See my answer below.


title: Why are capital letters included in a range of lower-case letters in an awk regex?

text: $ echo ABC | awk '$0 ~ /^[a-b]/'     ABC     $ echo ABC | awk '$0 ~ /^[a-a]/'     $ echo ABC | awk '$0 ~ /^a/'     $       You see. `/[a-b]/` captures `A`, but `/[a-a]/` or `/a/` doesn't. Why?


title: What is the "caller" command?

text: I'm running Ubuntu 10.10 with openbox running on top. I noticed today a command called `caller`, however there is no man page, it does not respond to any input (or --help) and whereis doesn't find it. Any idea what it is?


title: Best way to sync files - copy only EXISTING files and only if NEWER than target

text: I'm doing this sync locally on Ubuntu 12.04. The files are generally small text files (code). I want to copy (preserving mtime stamp) from `source` directory to `target` but I only want to copy if the file in `target` **already exists** and is **older** than the one in `source`. So I am only copying files that are newer in `source`, but they must exist in `target` or they won't be copied. (`source` will have many more files than `target`.) I will actually be copying from `source` to multiple `target` directories. I mention this in case it impacts the choice of solution. However, I can easily run my command multiple times, specifying the new `target` each time, if that's what is required.


title: What is the Command to check the history of the command executed which should based on the user who accessed it

text: I am looking for the command or script to meet the following requirement. I wanted a history of all the users who connected to my machine and what commands they execute in there session and at which time they executed it. If we dont have any command or script. Please share me the way to monitor it. INFO: Linux distro - RPM (Fedora -18 or above , Centos6 or above)


title: Install tar.bz2 archive?

text: I cannot seem to find out how to install a tar.bz2 file. I've Googled it and I've came across two commands, these did not work. I've changed my directory to my downloads folder `cd ~downloads` after that I've tried these two               tar -xjvf Sublime Text 2.0.2 x64.tar.bz2           tar -zxvf Sublime Text 2.0.2 x64.tar.bz2      and they both gave me the error of               tar (child): Sublime: Cannot open: No such file or directory     tar (child): Error is not recoverable: exiting now     tar: Child returned status 2     tar: Error is not recoverable: exiting now      I couldn't have spelled it wrong, as I copied the name directly from the archive. I'm very new to Linux, so can someone tell me what I'm doing wrong?


title: Error 404 Munin page not Found

text: I installed Munin and munin-node on Server and httpd was already installed. But after installed when i run the munin-node the Browser gives me this error.               Not Found          The requested URL /munin was not found on this server.          Apache/2.2.3 (Red Hat) Server at 192.168.5.1 Port 80      I checked the /etc/munin.conf file and the path to Html directory is correct.               # Example configuration file for Munin, generated by 'make build'          # The next three variables specifies where the location of the RRD     # databases, the HTML output, and the logs, severally.  They all     # must be writable by the user running munin-cron.     dbdir   /var/lib/munin     htmldir /var/www/munin     logdir  /var/log/munin     rundir  /var/run/munin      And the Permission for /var/www/munin/ are set for munin:munin # /etc/httpd/conf.d/munin.conf               # For SSL-servers     ScriptAlias /munin/cgi/ /var/www/munin/cgi/     #<Directory /var/www/munin/cgi/>     #   Options ExecCGI     #   SSLRequireSSL     #   order deny,allow     #   deny from all     #   AuthType Basic     #   AuthUserFile /site/cfg/passwd     #   AuthGroupFile /site/cfg/group     #   AuthName "munin"     #   require group munin     #   Satisfy Any     #</Directory>     #     Alias /munin/ /var/www/munin/     #<Directory /var/www/munin/>     #   Options None     #   SSLRequireSSL     #   order deny,allow     #   deny from all     #   AuthType Basic     #   AuthUserFile /site/cfg/passwd     #   AuthGroupFile /site/cfg/group     #   AuthName "munin"     #   require group munin     #   Satisfy Any     #</Directory>      # Apache Logs               [Sun Sep 01 04:03:12 2013] [notice] Digest: generating secret for digest authentication ...     [Sun Sep 01 04:03:12 2013] [notice] Digest: done     [Sun Sep 01 04:03:12 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations     [Sun Sep 01 11:34:47 2013] [notice] caught SIGTERM, shutting down     [Sun Sep 01 14:50:15 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)     [Sun Sep 01 14:50:15 2013] [notice] Digest: generating secret for digest authentication ...     [Sun Sep 01 14:50:15 2013] [notice] Digest: done     [Sun Sep 01 14:50:16 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations     [Sun Sep 01 14:50:18 2013] [notice] caught SIGTERM, shutting down     [Sun Sep 01 14:50:18 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)     [Sun Sep 01 14:50:18 2013] [notice] Digest: generating secret for digest authentication ...     [Sun Sep 01 14:50:18 2013] [notice] Digest: done     [Sun Sep 01 14:50:18 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations     [Sun Sep 01 14:50:41 2013] [error] [client 10.20.20.147] File does not exist: /var/www/html/munin     [Sun Sep 01 14:50:41 2013] [error] [client 10.20.20.147] File does not exist: /var/www/html/favicon.ico      # After un-commenting some files in /etc/httpd/conf.d/munin.conf               # For SSL-servers     ScriptAlias /munin/cgi/ /var/www/munin/cgi/     <Directory /var/www/munin/cgi/>        Options ExecCGI        #SSLRequireSSL        order deny,allow     #   deny from all        #deny from none        allow from all        AuthType Basic        AuthUserFile /site/cfg/passwd        AuthGroupFile /site/cfg/group        AuthName "munin"        require group munin        Satisfy Any     </Directory>     #     Alias /munin/ /var/www/munin/     <Directory /var/www/munin/>        Options None        #SSLRequireSSL        order deny,allow     #   deny from all        #deny from none        allow from all        AuthType Basic        AuthUserFile /site/cfg/passwd        AuthGroupFile /site/cfg/group        AuthName "munin"        require group munin        Satisfy Any     </Directory>


title: Cannot Remove (Unmount) Server Share (NFS) from Mount List

text: **Note on Duplicate** - This has been marked as a duplicate quite a few times, so can someone link me to a solution which works for me? Because _everything_ I've tried in all the other posts I've found, just hang forever. Thanks. * * * We have a server which has a mounted NFS share to a server which no longer exists, so this is a line from the `mount` command on server "t01": `192.168.1.2:/test on /t02 type nfs (rw,vers=4,addr=192.168.1.2,clientaddr=192.168.1.12)` The t02 server no longer exists, it has been completely turned off and removed forever. I want to unmount it but can't seem to get it to work. I've tried the usual things suggested in posts but it's being stubborn! If I do `umount -f -l /t02` it just hangs forever.. So I tried doing an strace on that command: `strace umount -f -l /t02` and I get the following:               close(4)                                = 0     umask(022)                              = 022     getuid()                                = 0     geteuid()                               = 0     readlink("/t02", 0x7fff65ec9fb0, 4096) = -1 EINVAL (Invalid argument)     stat("/t02",      Is there anything else I can do to force this to unmount? It's currently stopping me do a `df -kh` (just hangs if I try it).


title: Set up password-less SSH tunneling from home computer behind NAT to inside computer behind gateway

text: My home computer is behind an ISP-level NAT (and firewall). The target computer is work computer behind gateway. You have to log to gateway computer first via SSH (as it is the only one visible and with access from Internet). The SSH daemon on this gateway is configured to allow only 'keyboard-interactive' logins (i.e. no password-less public-key logging). Then you log to target computer using public-key based logging (only). How to set up SSH tunnels (I would probably need two of them: forward and reverse), so that after setting those up I can login from my home computer directly to host computer, and vice-versa, both without providing password. I'd like to be able to, for example, synchronize my private git repositories (pushing from home to target, and fetching from target to home). * * * Note that this is more involved setup that the one described in question How can I forward traffic from my publicly available server to a computer that is not publicly available?


title: Gifsicle on CentOS? x86_64

text: I am trying to install Gifsicle on my server which is CentOS x86_64. I do not know which package to use or how to install it. Can someone with experience help me out? http://www.lcdf.org/gifsicle/


title: arguments with pure command line

text: I don't know if this is possible with terminal command line rather than a script. I want to type a command which takes variables $0, $1 and enter the variables separately either at the start/end of the same line or on terminal prompt ie               $ cd /var/$0/$1


title: Need help decoding bash script

text: Have following line in bash script, parsing input arguments:               ((10#$2 > 0)) 2>/dev/null && shift 2 || shift      Basically it helps handling parameters with optional integer subparameter. Like:               -x 100 -y          -x -y      Could you explain how it works.


title: Is there a way to find out how many instances of the root user are logged into a Linux machine?

text: We have a handful of users that login to our Linux virtual machine as `root` either through the vSphere client or through SSH and I want to see if there is a way to tell if multiple `root` users are logged in at the same time.


title: Can SSH proxy requests from the remote system through my local system to the internet?

text: I have SSH access to a *nix system over a VPN. I need to install some packages from the distro's repos to that system but that system does not have general access to the internet to reach the repos. Using only SSH, can I set up reverse forwarding or proxying from the remote system through my local system and out to the internet?


title: How to load a module in Gentoo?

text: I am using Gentoo, with kernel 2.6.30, and I tried to load a module with `modprobe usbcore`, but it fails with `modprobe: module 'usbcore' not found`. However, I can find a directory with that name in the directory `/sys/module/`. What is wrong here?


title: How does Linux Mint 13 GUI (Cinnamon) know which users have administrator privileges?

text: Recently Cinnamon crashed. And I can no longer:   * Change settings of network manager   * Mount any external disks (except by sudo mount ... on command line)   * Shutdown (only can log out)   * Click "unlock" on any system setting for admin options I renamed my home folder, deleted myself, created a new user, moved my data from my backup home directory(except dotfolders and dotfiles like .config, .dmrc, .pulse, .gconf, .gnome2 ...) and re logged in. This way, I got my privileges back. After a while, Cinnamon crashed again and I have the same problem. And the following does not work:   * Login from text terminal.   * $ rm -rf .config/ .dbus/ .gconf/ .gnome2 .gnome2_private/ .linuxmint/ .local/ .pki/   * reboot And I still do not have my privileges. How are the GUI side of privileges handled and how can I get them back? Probably some configuration file is missing or has the wrong permissions.


title: disabling ctrl-alt-del and /etc/init

text: My OS is RHEL 6.2 I disable `Ctrl`+`Alt`+`Del` by changing in `/etc/init/control-alt-del.conf` the line               exec /sbin/shutdown -r now "Control-alt-del pressed"      by               exec /bin/true      I'll be testing it next Sunday. My questions:   1. are there any daemons to restart?   2. I keep a copy on original `/etc/init/control-alt-del.conf` in /etc/init, is it safe?   I mean won't the shutdown part of exec be fired?   3. more official way to disable `Ctrl`+`Alt`+`Del`? * * * **edit:** tested on vmware player 6.0.3 (for what it is worth, this is not a virtualization issue)   1. editing file, no exec line, no restart, user logged on gui, send `Ctrl`+`Alt`+`Del` : **shutdown prompt**   2. after restart, no exec line, user logged on gui, send `Ctrl`+`Alt`+`Del` : **shutdown prompt**   3. after restart, exec /bin/true, user logged on gui, send `Ctrl`+`Alt`+`Del` : **shutdown prompt**   4. after restart, exec /bin/true, **no** user logged on gui, send `Ctrl`+`Alt`+`Del` : **no shutdown prompt**


title: remove tc filter (Traffic Shaping)

text: How can I remove a single filter?               tc filter show dev peth1      shows               filter parent 1: protocol ip pref 16 u32     filter parent 1: protocol ip pref 16 u32 fh 800: ht divisor 1     filter parent 1: protocol ip pref 16 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2 match 5bd6aaf9/ffffffff at 12      Why does that not work?:               tc filter del dev peth1 pref 1 protocol ip handle 800:800 u32


title: Binary search for a failing line

text: `git` has `bisect run` to figure out which revision an error was introduced. I have a big file (100GB) and at least one of the lines is bad, but the program I have to check it with will not tell me which line. The lines are records, so I can write a binary search using `head` and `tail` and `/2` (passing the first half to the program, and if no errors, the second half), and based on that splitting the one half again. But does an automated tool already exist that can do this without my intervention (similar to `git bisect run`)?


title: how can we know which pts in /dev/pts mapping to which ip address?

text: Can anyone explain , how can we detect which `ssh session` belong to which ip address using `/dev/pts` directory ?


title: Automatically disable Linux extensions for Samba mounts

text: Samba enables Linux Extensions by default, which can be checked via /proc/fs/cifs/LinuxExtensionsEnabled On Mac OS X (10.8.5 or older) as well as older CIFS shares, mount.cifs will fail with a generic error message:                CIFS VFS: Send error in QFSUnixInfo = -95      CIFS VFS: cifs_read_super: get root inode failed      The workaround is to manually disable Linux extensions               $ sudo echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled      Is there an option that I can pass along to disable Linux extensions, such as               $ mount -t cifs -o linuxextensions=n .....      Or can I disable it on boot automatically?


title: unable to remount filesystem back to read-only after package upgrade

text: On my Debian system, I have my `/` on separate partition and mounted `read- only`. Only `/home/`, `/var/` and `/tmp/` are writable. I have also created a `Pre-Invoke` and `Post-Invoke` `apt hook`, so that `apt` can automatically remount the system for write, when packages are installed or upgraded, and remount it back to `read-only` when finished:               DPkg::Pre-Invoke  {"mount -o remount,rw / ;};     DPkg::Post-Invoke {"mount -o remount    / ;};      This whole setup works well with one exception. Sometimes during the installation/upgrade process some services need to be restarted or new files opened during the short window when my `/` is mounted `read-write`, these files are opened with `write` permissions. After the installation/upgrade is complete, my `Post-Invoke` hook returns error because it cannot remount `/` back to `read-only`. Is there some way to solve this problem? This is very annoying, because in this situation I usually must restart the server, which is impractical. # EDIT Below is a log of my latest package upgrade, which resulted in the described error:               root@alpha# apt-get upgrade      Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages will be upgraded:       base-files curl libc-bin libc6 libcurl3 libcurl3-gnutls libmysqlclient18 libssl1.0.0 locales multiarch-support mysql-client mysql-client-5.5 mysql-common       nscd openssl tzdata wget whois     18 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.     Need to get 18.7 MB of archives.     After this operation, 264 kB of additional disk space will be used.     Do you want to continue [Y/n]?      Fetched 18.7 MB in 0s (33.2 MB/s)      Preconfiguring packages ...     (Reading database ... 20532 files and directories currently installed.)     Preparing to replace base-files 7.1wheezy3 (using .../base-files_7.1wheezy4_amd64.deb) ...     Unpacking replacement base-files ...     Processing triggers for man-db ...     Processing triggers for install-info ...     Setting up base-files (7.1wheezy4) ...     Installing new version of config file /etc/debian_version ...     (Reading database ... 20532 files and directories currently installed.)     Preparing to replace libc-bin 2.13-38 (using .../libc-bin_2.13-38+deb7u1_amd64.deb) ...     Unpacking replacement libc-bin ...     Processing triggers for man-db ...     Setting up libc-bin (2.13-38+deb7u1) ...     (Reading database ... 20532 files and directories currently installed.)     Preparing to replace libc6:amd64 2.13-38 (using .../libc6_2.13-38+deb7u1_amd64.deb) ...     Unpacking replacement libc6:amd64 ...     Setting up libc6:amd64 (2.13-38+deb7u1) ...     (Reading database ... 20532 files and directories currently installed.)     Preparing to replace libssl1.0.0:amd64 1.0.1e-2+deb7u1 (using .../libssl1.0.0_1.0.1e-2+deb7u4_amd64.deb) ...     Unpacking replacement libssl1.0.0:amd64 ...     Preparing to replace curl 7.26.0-1+wheezy7 (using .../curl_7.26.0-1+wheezy8_amd64.deb) ...     Unpacking replacement curl ...     Preparing to replace libcurl3:amd64 7.26.0-1+wheezy7 (using .../libcurl3_7.26.0-1+wheezy8_amd64.deb) ...     Unpacking replacement libcurl3:amd64 ...     Preparing to replace libcurl3-gnutls:amd64 7.26.0-1+wheezy7 (using .../libcurl3-gnutls_7.26.0-1+wheezy8_amd64.deb) ...     Unpacking replacement libcurl3-gnutls:amd64 ...     Preparing to replace mysql-common 5.5.33+dfsg-0+wheezy1 (using .../mysql-common_5.5.35+dfsg-0+wheezy1_all.deb) ...     Unpacking replacement mysql-common ...     Preparing to replace libmysqlclient18:amd64 5.5.33+dfsg-0+wheezy1 (using .../libmysqlclient18_5.5.35+dfsg-0+wheezy1_amd64.deb) ...     Unpacking replacement libmysqlclient18:amd64 ...     Preparing to replace multiarch-support 2.13-38 (using .../multiarch-support_2.13-38+deb7u1_amd64.deb) ...     Unpacking replacement multiarch-support ...     Processing triggers for man-db ...     Setting up multiarch-support (2.13-38+deb7u1) ...     (Reading database ... 20532 files and directories currently installed.)     Preparing to replace tzdata 2013h-0wheezy1 (using .../tzdata_2013i-0wheezy1_all.deb) ...     Unpacking replacement tzdata ...     Setting up tzdata (2013i-0wheezy1) ...          Current default time zone: 'Europe/London'     Local time is now:      Sat Feb 15 11:35:41 CET 2014.     Universal Time is now:  Sat Feb 15 11:35:41 UTC 2014.     Run 'dpkg-reconfigure tzdata' if you wish to change it.          (Reading database ... 20511 files and directories currently installed.)     Preparing to replace wget 1.13.4-3 (using .../wget_1.13.4-3+deb7u1_amd64.deb) ...     Unpacking replacement wget ...     Preparing to replace locales 2.13-38 (using .../locales_2.13-38+deb7u1_all.deb) ...     Unpacking replacement locales ...     Preparing to replace whois 5.0.23 (using .../whois_5.1.1~deb7u1_amd64.deb) ...     Unpacking replacement whois ...     Preparing to replace mysql-client 5.5.33+dfsg-0+wheezy1 (using .../mysql-client_5.5.35+dfsg-0+wheezy1_all.deb) ...     Unpacking replacement mysql-client ...     Preparing to replace mysql-client-5.5 5.5.33+dfsg-0+wheezy1 (using .../mysql-client-5.5_5.5.35+dfsg-0+wheezy1_amd64.deb) ...     Unpacking replacement mysql-client-5.5 ...     Preparing to replace nscd 2.13-38 (using .../nscd_2.13-38+deb7u1_amd64.deb) ...     [ ok ] Stopping Name Service Cache Daemon: nscd.     Unpacking replacement nscd ...     Preparing to replace openssl 1.0.1e-2+deb7u1 (using .../openssl_1.0.1e-2+deb7u4_amd64.deb) ...     Unpacking replacement openssl ...     Processing triggers for install-info ...     Processing triggers for man-db ...     Setting up libssl1.0.0:amd64 (1.0.1e-2+deb7u4) ...     Setting up libcurl3:amd64 (7.26.0-1+wheezy8) ...     Setting up curl (7.26.0-1+wheezy8) ...     Setting up libcurl3-gnutls:amd64 (7.26.0-1+wheezy8) ...     Setting up mysql-common (5.5.35+dfsg-0+wheezy1) ...     Setting up libmysqlclient18:amd64 (5.5.35+dfsg-0+wheezy1) ...     Setting up wget (1.13.4-3+deb7u1) ...     Setting up locales (2.13-38+deb7u1) ...     Generating locales (this might take a while)...       en_DK.UTF-8... done       en_US.UTF-8... done     Generation complete.     Setting up whois (5.1.1~deb7u1) ...     Setting up mysql-client-5.5 (5.5.35+dfsg-0+wheezy1) ...     Setting up mysql-client (5.5.35+dfsg-0+wheezy1) ...     Setting up nscd (2.13-38+deb7u1) ...     [ ok ] Starting Name Service Cache Daemon: nscd.     Setting up openssl (1.0.1e-2+deb7u4) ...     mount: / is busy      The last line (`mount: / is busy`) is the error returned by apt, when trying to remount `/` back to `read-only`. # UPDATE: the command suggested by `Graeme` does not show any files:               # lsof / | awk 'NR==1 || $4~/[0-9][uw]/'     COMMAND     PID       USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME


title: Do I need a support contract to test my web application on solaris 10

text: I need to install Solaris 10 and I'm wondering if I need a support contract, on the download page it says that you need a support contract for production use, but I'm not too sure what production use mean, I want to test out a website I'm developing on that platform, does that count as production use? I really wouldn't consider it to be production use, but I'm not sure.


title: No Space left on device - Debian

text: when Im new to linux and try to run this below code               apt-get -f install      getting below error: ![enter image description here](http://i.stack.imgur.com/GiaGw.jpg) Checking the available space               df      Tho output ![enter image description here](http://i.stack.imgur.com/C75P7.jpg) How to increase the available space in /usr path?


title: Netstat shows programs running on different ports then they should

text: I have some code I'm testing. Program A listens on a predefined socket for program B to connect to and for my testing I'm running 32 instances of the programs A and B. I've written my script to tell program A to listen to port 9001-9032 and put in the configuration files for each instance of program B the corrosponding port to connect to. When I run the script which starts up program A and B and run Netstat -tnap I find that of all the ports 9001-9032 the only port actually used is 9001 which is used by another program (my bad lol). When I grep for program A I find each instance is listening on a semingly completely random ports that have no relationship to the ports 90** they should be listening on. However, my program B, which should be connecting to ports 9001-9032, is able to find and connect to each instance of program A despite A aparntly not listening on the ports it's B should be trying to connect to. I'm rather confused as to how that's possible. If that isn't confusing enough my 32 program and _only_ the 32 one (listening on 9032) dies at startup with an error that the address was refused when it tries to bind to the port. I tried changing the programs to listen on ports 15001-15032 just to see what would happen and I still got the exact same behavior; all programs seem to be listening on random ports and the 32 program can't establish a connection. Can anyone explain why my ports are behaving the way the are? Am I misunderstanding some part of netstat or linux ports?


title: Why am I gettting errors about unpackaged files while trying to build an rpm?

text: Trying to package up wget-1.13.tar.gz into a rpm (I am re-learning this process) and I'm running into these errors when I do a dry run.               error: Installed (but unpackaged) file(s) found:     /etc/wgetrc     /usr/bin/wget     /usr/share/info/dir     /usr/share/info/wget.info.gz     /usr/share/locale/be/LC_MESSAGES/wget.mo     RPM build errors:     Installed (but unpackaged) file(s) found:     /etc/wgetrc     /usr/bin/wget     /usr/share/info/dir     /usr/share/info/wget.info.gz     /usr/share/locale/be/LC_MESSAGES/wget.mo     /usr/share/locale/bg/LC_MESSAGES/wget.mo     /usr/share/locale/ca/LC_MESSAGES/wget.mo      There are more paths it complains about so this just a snippet but you should get the idea. My Spec file is as follows:               Name:       wget     Version:    1.13         Release:    1%{?dist}     Summary:    wget to get wget things          Group:      System Environment/Base     License:    GPL     #URL:            Source0:    %{name}-%{version}.tar.gz     BuildRoot:  /tmp/%{name}-%{version}-%{release}-root           #BuildRequires:      #Requires:            %description     Wget is a free software package for retrieving files using HTTP, HTTPS ... GNU   Wget        has many features to make retrieving large files          %prep     %setup -q               %build     %configure     make %{?_smp_mflags}               %install     rm -rf $RPM_BUILD_ROOT     make install DESTDIR=$RPM_BUILD_ROOT               %clean     rm -rf $RPM_BUILD_ROOT               %files     %defattr(-,root,root,-)     %doc                    %changelog      So a basic spec file, where am I going wrong? Also, the file structure my RPMS is $HOME/rpms/{BUILD,RPMS,SOURCES,SPECS,SRPMS} Thanks


title: Column mismatch and substituting

text: ### input.txt (tab-delimted)               TTTTOTTT00000000008  RTTTT899      5.00E-28     TTTTOTTT00000000046  RTTTWRR       3.00E-31     TTTTOTTT00000000051  2.00E-11     TTTTOTTT00000000051  7.00E-12     TTTTOTTT00000000054  5.00E-22     TTTTOTTT00000000061  YTRYR         1.00E-11     TTTTOTTT00000000078  ETNRR8        6.00E-17     TTTTOTTT00000000174  TYTYT         1.00E-11     TTTTOTTT00000000203  UUUE          9.00E-20      I have file with column mixed up. In this file (input.txt). Column 3 has blank space, column should fill with column2 rows and column 2 rows should be substituted as none ### output.txt (tab-delimted)               TTTTOTTT00000000008  RTTTT899      5.00E-28     TTTTOTTT00000000046  RTTTWRR       3.00E-31     TTTTOTTT00000000051  none          2.00E-11     TTTTOTTT00000000051  none          7.00E-12     TTTTOTTT00000000054  none          5.00E-22     TTTTOTTT00000000061  YTRYR         1.00E-11     TTTTOTTT00000000078  ETNRR8        6.00E-17     TTTTOTTT00000000174  TYTYT         1.00E-11     TTTTOTTT00000000203  UUUE          9.00E-20


title: Permissions with writing NTFS partition from Windows

text: I mounted my NTFS external hard disk to my Pi this afternoon, my /etc/fstab currently looks like this (I encourage any recommendations or queries made on the properties made, especially the umask - I'm fairly new):               pi@CodaAmok ~ $ sudo nano /etc/fstab     GNU nano 2.2.6              File: /etc/fstab     proc            /proc           proc    defaults          0       0      /dev/mmcblk0p1  /boot           vfat    defaults          0       2     /dev/mmcblk0p2  /               ext4    defaults,noatime  0       1     UUID=01CE2B23B81B9C30   /mnt/disk1      ntfs   defaults,auto,umask=002,uid=1000,gid=1000       0       0     # a swapfile is not a swap partition, so no using swapon|off from here on, use $      I'm unable to write to the attached drive from Windows. It's complaining I do not have sufficient permissions. What am I missing here? I try mapping the drive in Windows and logging in as the user "pi", however it doesn't allow me to. It does, however, allow me to access the drive (obviously read-only) without logging in as Pi. So therefore I'm accessing the system as a different user, thus a different UID and GUID. If I find out what group my Windows machines falls under in a Samba share and add that to the /etc/fstab file, that should will do the trick. Question: How do I find out my GUID/UID of my Windows machine within my Pi? I assume it has got a default value for samba-accesing users? Here is my Samba config (it's huge o.o):               #     # Sample configuration file for the Samba suite for Debian GNU/Linux.     #     #     # This is the main Samba configuration file. You should read the     # smb.conf(5) manual page in order to understand the options listed     # here. Samba has a huge number of configurable options most of which      # are not shown in this example     #     # Some options that are often worth tuning have been included as     # commented-out examples in this file.     #  - When such options are commented with ";", the proposed setting     #    differs from the default Samba behaviour     #  - When commented with "#", the proposed setting is the default     #    behaviour of Samba but the option is considered important     #    enough to be mentioned here     #     # NOTE: Whenever you modify this file you should run the command     # "testparm" to check that you have not made any basic syntactic      # errors.      # A well-established practice is to name the original file     # "smb.conf.master" and create the "real" config file with     # testparm -s smb.conf.master >smb.conf     # This minimizes the size of the really used smb.conf file     # which, according to the Samba Team, impacts performance     # However, use this with caution if your smb.conf file contains nested     # "include" statements. See Debian bug #483187 for a case     # where using a master file is not a good idea.     #          #======================= Global Settings =======================          [global]          ## Browsing/Identification ###          # Change this to the workgroup/NT-domain name your Samba server will part of        workgroup = WORKGROUP          # server string is the equivalent of the NT Description field        server string = %h server          # Windows Internet Name Serving Support Section:     # WINS Support - Tells the NMBD component of Samba to enable its WINS Server     #   wins support = no          # WINS Server - Tells the NMBD components of Samba to be a WINS Client     # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both     ;   wins server = w.x.y.z          # This will prevent nmbd to search for NetBIOS names through DNS.        dns proxy = no          # What naming service and in what order should we use to resolve host names     # to IP addresses     ;   name resolve order = lmhosts host wins bcast          #### Networking ####          # The specific set of interfaces / networks to bind to     # This can be either the interface name or an IP address/netmask;     # interface names are normally preferred     ;   interfaces = 127.0.0.0/8 eth0          # Only bind to the named interfaces and/or networks; you must use the     # 'interfaces' option above to use this.     # It is recommended that you enable this feature if your Samba machine is     # not protected by a firewall or is a firewall itself.  However, this     # option cannot handle dynamic or non-broadcast interfaces correctly.     ;   bind interfaces only = yes                    #### Debugging/Accounting ####          # This tells Samba to use a separate log file for each machine     # that connects        log file = /var/log/samba/log.%m          # Cap the size of the individual log files (in KiB).        max log size = 1000          # If you want Samba to only log through syslog then set the following     # parameter to 'yes'.     #   syslog only = no          # We want Samba to log a minimum amount of information to syslog. Everything     # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log     # through syslog you should set the following parameter to something higher.        syslog = 0          # Do something sensible when Samba crashes: mail the admin a backtrace        panic action = /usr/share/samba/panic-action %d               ####### Authentication #######          # "security = user" is always a good idea. This will require a Unix account     # in this server for every user accessing the server. See     # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html     # in the samba-doc package for details.        security = user          # You may wish to use password encryption.  See the section on     # 'encrypt passwords' in the smb.conf(5) manpage before enabling.        encrypt passwords = true          # If you are using encrypted passwords, Samba will need to know what     # password database type you are using.          passdb backend = tdbsam             obey pam restrictions = yes          # This boolean parameter controls whether Samba attempts to sync the Unix     # password with the SMB password when the encrypted SMB password in the     # passdb is changed.        unix password sync = yes          # For Unix password sync to work on a Debian GNU/Linux system, the following     # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for     # sending the correct chat script for the passwd program in Debian Sarge).        passwd program = /usr/bin/passwd %u        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .          # This boolean controls whether PAM will be used for password changes     # when requested by an SMB client instead of the program listed in     # 'passwd program'. The default is 'no'.        pam password change = yes          # This option controls how unsuccessful authentication attempts are mapped     # to anonymous connections        map to guest = bad user          ########## Domains ###########          # Is this machine able to authenticate users. Both PDC and BDC     # must have this setting enabled. If you are the BDC you must     # change the 'domain master' setting to no     #     ;   domain logons = yes     #     # The following setting only takes effect if 'domain logons' is set     # It specifies the location of the user's profile directory     # from the client point of view)     # The following required a [profiles] share to be setup on the     # samba server (see below)     ;   logon path = \\%N\profiles\%U     # Another common choice is storing the profile in the user's home directory     # (this is Samba's default)     #   logon path = \\%N\%U\profile          # The following setting only takes effect if 'domain logons' is set     # It specifies the location of a user's home directory (from the client     # point of view)     ;   logon drive = H:     #   logon home = \\%N\%U          # The following setting only takes effect if 'domain logons' is set     # It specifies the script to run during logon. The script must be stored     # in the [netlogon] share     # NOTE: Must be store in 'DOS' file format convention     ;   logon script = logon.cmd          # This allows Unix users to be created on the domain controller via the SAMR     # RPC pipe.  The example command creates a user account with a disabled Unix     # password; please adapt to your needs     ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u          # This allows machine accounts to be created on the domain controller via the      # SAMR RPC pipe.       # The following assumes a "machines" group exists on the system     ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u          # This allows Unix groups to be created on the domain controller via the SAMR     # RPC pipe.       ; add group script = /usr/sbin/addgroup --force-badname %g          ########## Printing ##########          # If you want to automatically load your printer list rather     # than setting them up individually then you'll need this     #   load printers = yes          # lpr(ng) printing. You may wish to override the location of the     # printcap file     ;   printing = bsd     ;   printcap name = /etc/printcap          # CUPS printing.  See also the cupsaddsmb(8) manpage in the     # cupsys-client package.     ;   printing = cups     ;   printcap name = cups          ############ Misc ############          # Using the following line enables you to customise your configuration     # on a per machine basis. The %m gets replaced with the netbios name     # of the machine that is connecting     ;   include = /home/samba/etc/smb.conf.%m          # Most people will find that this option gives better performance.     # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html     # for details     # You may want to add the following on a Linux system:     #         SO_RCVBUF=8192 SO_SNDBUF=8192     #   socket options = TCP_NODELAY          # The following parameter is useful only if you have the linpopup package     # installed. The samba maintainer and the linpopup maintainer are     # working to ease installation and configuration of linpopup and samba.     ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &          # Domain Master specifies Samba to be the Domain Master Browser. If this     # machine will be configured as a BDC (a secondary logon server), you     # must set this to 'no'; otherwise, the default behavior is recommended.     #   domain master = auto          # Some defaults for winbind (make sure you're not using the ranges     # for something else.)     ;   idmap uid = 10000-20000     ;   idmap gid = 10000-20000     ;   template shell = /bin/bash          # The following was the default behaviour in sarge,     # but samba upstream reverted the default because it might induce     # performance issues in large organizations.     # See Debian bug #368251 for some of the consequences of *not*     # having this setting and smb.conf(5) for details.     ;   winbind enum groups = yes     ;   winbind enum users = yes          # Setup usershare options to enable non-root users to share folders     # with the net usershare command.          # Maximum number of usershare. 0 (default) means that usershare is disabled.     ;   usershare max shares = 100          # Allow users who've been granted usershare privileges to create     # public shares, not just authenticated ones        usershare allow guests = yes          #======================= Share Definitions =======================          [homes]        comment = Home Directories        browseable = no          # By default, the home directories are exported read-only. Change the     # next parameter to 'no' if you want to be able to write to them.        read only = no          # File creation mask is set to 0700 for security reasons. If you want to     # create files with group=rw permissions, set next parameter to 0775.        create mask = 0700          # Directory creation mask is set to 0700 for security reasons. If you want to     # create dirs. with group=rw permissions, set next parameter to 0775.        directory mask = 0700          # By default, \\server\username shares can be connected to by anyone     # with access to the samba server.     # The following parameter makes sure that only "username" can connect     # to \\server\username     # This might need tweaking when using external authentication schemes        valid users = %S          # Un-comment the following and create the netlogon directory for Domain Logons     # (you need to configure Samba to act as a domain controller too.)     [netlogon]        comment = Network Logon Service        path = /home/samba/netlogon        guest ok = yes        read only = no          # Un-comment the following and create the profiles directory to store     # users profiles (see the "logon path" option above)     # (you need to configure Samba to act as a domain controller too.)     # The path below should be writable by all users so that their     # profile directory may be created the first time they log on     [profiles]        comment = Users profiles        path = /home/samba/profiles        guest ok = no        browseable = no        create mask = 0600        directory mask = 0700          [printers]        comment = All Printers        browseable = no        path = /var/spool/samba        printable = yes        guest ok = no        read only = yes        create mask = 0700          # Windows clients look for this share name as a source of downloadable     # printer drivers     [print$]        comment = Printer Drivers        path = /var/lib/samba/printers        browseable = yes        read only = yes        guest ok = no     # Uncomment to allow remote administration of Windows print drivers.     # You may need to replace 'lpadmin' with the name of the group your     # admin users are members of.     # Please note that you also need to set appropriate Unix permissions     # to the drivers directory for these users to have write rights in it     ;   write list = root, @lpadmin          # A sample share for sharing your CD-ROM with others.     ;[cdrom]     ;   comment = Samba server's CD-ROM     ;   read only = yes     ;   locking = no     ;   path = /cdrom     ;   guest ok = yes          # The next two parameters show how to auto-mount a CD-ROM when the     #   cdrom share is accesed. For this to work /etc/fstab must contain     #   an entry like this:     #     #       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0     #     # The CD-ROM gets unmounted automatically after the connection to the     #     # If you don't want to use auto-mounting/unmounting make sure the CD     #   is mounted on /cdrom     #     ;   preexec = /bin/mount /cdrom     ;   postexec = /bin/umount /cdrom          [Backup]     comment = USB Share     path = /mnt/disk1     writeable = Yes     only guest = Yes     create mask = 0777     directory mask = 0777     browseable = Yes     public = Yes      Here is a screenshot image of what feedback I receive once I try and drop a file within that drive (from Windows); ![enter image description here](http://i.stack.imgur.com/xxfUz.png) If I were to hazard a guess at solving this, would it be something to do with these configurations (I would play around and see, but the octal numbering doesn't apply here(or does it?)):               # File creation mask is set to 0700 for security reasons. If you want to     # create files with group=rw permissions, set next parameter to 0775.        create mask = 0700          # Directory creation mask is set to 0700 for security reasons. If you want to     # create dirs. with group=rw permissions, set next parameter to 0775.        directory mask = 0700      I appreciate I may be on different tracks here, and not be theoretically correct so any correction of my knowledge would be great, too. Thanks for reading!


title: Merge several files with maximum 1 line difference

text: Suppose I have the following files: file0.c:               int b=NULL;     int a=NULL;      file1.c:               int b;     int a=NULL;      file2.c:               int b;     int a=NULL;      I am looking to merge the files file1 and file2 to generate the following result.c:               int b;     int a;      I can use : `diff input0 input1` and `diff input0 input2` to get the line+column combinations, however I don't know what to do next in order to achieve the above results.


title: SELinux httpd write access to a directory

text: I am new to SELinux. came from debian. I want to give `httpd` access to a directory. **SELinux Alert Browser** suggests:               # grep httpd /var/log/audit/audit.log | audit2allow -M mypol     # semodule -i mypol.pp       I couldn't understand how does this command work. I don't specify a directory path anywhere. how does it know which directory to allow for httpd ? Previously I've used grep to extract text from output or file. But here grep is being used on a process. That I didn't get. Also what is the actual solution. If I want to give httpd write access to a directory ?


title: How to optimize this oneliner? (if second column empty, put the line in another file)

text: I have a little "oneliner":               while read ONELINE; do       if [[ -n "`echo $ONELINE | awk '{print $2}'`" ]]; then         echo "$ONELINE" >> LIST-ok.txt       else         echo "$ONELINE" >> LIST-notok.txt       fi     done < ORIGINALLIST.txt      but it's extremely slow.. How can I optimize it to do the same thing but much- much faster? If the second column is empty then put the given line in another file.


title: How come lvextend allocates less than the specified amount of space?

text: I am trying to extend a volume, let's call it `/dev/vol1`. I see the initial volume size is 500MB when I call: `df --block-size=M /dev/vol1` then to extend it 100MB more I call:               lvextend -L+100M /dev/vol1     resize2fs /dev/vol1      but when I check the size again with `df --block-size=M /dev/vol1` I get back 595, indicating only 95 MB were gained. What accounts for this discrepancy? I think it has to do with a MB being 1024 vs 1000 KB, but I'm not sure how where the problem is.


title: Using VI keys to edit shell commands in UNIX

text: I used to have a co-worker who was really good at UNIX. He showed me how to use Vi key bindings to edit my shell commands. He placed the command in a file that ran every time I logged in. Since then, I've moved to a different project. Unfortunately I don't remember how to set this up. Is there anyone here who knows how to use Vi key bindings to edit commands in the terminal? How can I make that setting permanent?


title: Shell script running two Perl scripts based on input

text: I am new to shell script. I have two Perl scripts for text processing based on two different input files. I would like to have one shell script that runs based on conditions. If (input file) matches word `/extraction_reversed/` run `perlscript1.pl` otherwise run `perlscript2.pl`. Shell script to compile in terminal:               sh run.sh inputfile > outputfile


title: File sharing with Windows

text: I have a small home network consisting of two computers. One is running Windows 7 and the other Ubuntu 10.04. Neither computer is permanently on. I am trying to set up file sharing between the two. Ideally the Windows files will be mounted whenever the Windows machine is on, and unmounted when it is not. Currently I have added an entry to /etc/fstab to mount the share. This appears to vaguely work. However, I have noticed that it takes considerably longer to login to the Ubuntu computer if the Windows computer is not turned on. It exhibits bizarre behaviours if the Windows machine is not turned on, including not being able to interact with the desktop. Is there a way to remove this delay, or should I set up the share in a different way?


title: Go up one level from a nonexistent path

text: I have some code like this in a script (bash) file:               if [ ! -d $dir ]; then         cd $dir/..         git clone http://...     fi      Of course as written this doesn't work since `$dir` does not exist. Is there a good way to strip out the top-level directory here?


title: Private VLAN's under Linux?

text: http://blog.ine.com/2008/07/14/private-vlans-revisited/ Has anyone tried private vlan's under Linux? Any experiences with them? My real question is does anybody have howtos regarding this?


title: how to convert ^I character

text: I have a text file like this:               info  Some info here      In which when I use cat -A display this:               info^I Some info here      How do I edit this so I'll get something like this instead:               info<space>-<space>Some info here


title: feh: maintain zoom setting

text: When browsing through the images in a directory with `feh`, the magnification can be changed by use of the up/down arrow keys, but the setting is lost as soon as the next image in the series is loaded. Is there a way to apply the magnification setting selected for image i to image i+1? If not, is this possible in another lightweight image viewer?


title: How to switch PulseAudio inputs and outputs from command line?

text: At work I use to use an USB headset which gets detected as separate audio output and input (for the mic) devices. At home I use conventional analogue headset which is plugged into my laptop built-in sound system with headphone/mic jacks. Every time I want to switch between the USB headset and my laptop built-in sound system I have to open PulseAudio control panel and select the device. Can't I just make a couple of command line shortcuts to do the switch? UPDATE: I've just came to even more interesting idea than using CLI-based shortcuts manually - I think It is possible to trigger their launching on the USB headset attachment/detachment detection.


title: Can I set my local machine's terminal colors to use those of the machine I ssh into?

text: I have a color scheme that I like for when I'm in a terminal, but I ssh into the machine I work on from multiple sources (locally, PuTTY, my netbook, etc.) and I want to maintain the same color scheme throughout. Is this possible? I especially want it in PuTTY; it's difficult to change PuTTY colors.


title: How can I get mod_perl running in Arch Linux?

text: I've installed mod_perl, and even tried enabling it, unfortunately it seems to be preventing apache from starting.               LoadModule perl_module modules/mod_perl.so      here's the error.               /usr/sbin/apachectl: line 84: 25312 Segmentation fault      $HTTPD -k $ARGV      I switched httpd to run httpd.itk instead of worker.


title: Installing Debian without GUI for a web server

text: I'm unfamiliar with Debian (obviously), so I downloaded the live ISO thinking it might help me out. From the live GUI, I doubled click on the install icon on the desktop and proceeded - it gave me a install with GNOME and a bunch of other software that has no business being on a web server. Generally, I'm a Linux noob, but I'm more familiar with Ubuntu and since this server is more for learning, Ubuntu is basically a variation of Debian and Debian is now the most popular OS for web servers, I figured I'd use it. So the first part of my question is,can I install the base/non-GUI version from the Live disc? If so, how? If not, can someone point me to the correct download for the amd64 bit version? A side question - is going with Debian over Ubuntu really going to yield that much of a performance increase? I'd like to warm up to Debian because there is a strong likelihood that I'll encounter it professionally, so it will be a good learning experience. If there isn't much difference between it and Ubuntu's server edition, I may just go with that because I know that distro better. Since this is a learning exercise for me, would anyone have any additional or other suggestions or considerations for me? I basically want what would be the Debian equivalent to Ubuntu Server - a simple, bare-bones, non-GUI OS. I'd prefer to install my http server as well - I'm not yet sure if I'll be going with Apache or Nginx or handling http requests my self in node.js...


title: Ubuntu networking: can't connect to LAN

text: I have a server with Zentyal 3.03 (Ubuntu 12.04) LTS. It has 3 network devices:   * eth0 - dhcp fast internet (I pay for it)   * eth1 - static slow internet (it's free for the school)   * eth2 - LAN I can reach the server with SSH, but I can't reach a LAN server from outside. I have set up portforwarding for port 80, it made no sense. I used:               sudo iptables -A FORWARD -p tcp -i eth1 --sport 8888 -o eth2 -d 192.168.1.90 -dport 8888 -j ALLOW I don't know what can help, please ask what to show you. Please help me and do not send me to an another stackexchange website. (this wolud be the 4th time)


title: For what purpose would perl* be excluded in yum.conf?

text: I am **not** an Unix/Linux admin. I was attempting to install git on our server, and after much googling and trial and error, I discovered that perl* is excluded in our yum.conf file, preventing perl-Git from installing, which is a dependency of git-core. I understand what this does, but I'm not sure _why_ it has been done. There are a lot of things excluded in this file, and I just want to understand the reasons one might want to exclude something, whether it's a security issue, or what. Our original server administrator was killed in a boating accident. We are using CentOS 5.4, and I am using yum for my attempts at installing git.


title: pacman and powerpill not working

text: Both pacman and powerpill don't seem to be working on my Arch installation. I'm sure my Internet connection is working. The download just starts in powerpill but speed remains zero. In pacman, there's an error saying 'No file address found'.


title: How to fix my llvm installation?

text: So I am a new linux user and new to programming, and I wanted to learn some of the C style languages. One of the online courses that I'm taking provides me a vm environment with clang istalled and configured to help students such as myself. Since I already have a Linux Mint 17 installation I thought I'd go ahead and install the llvm infrastructure myself using apt. **So I followed the instructions here** http://llvm.org/apt/ I added these lines to /etc/apt/sources.list               deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main     deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main     # 3.4     deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main     deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main      The I opened a terminal and executed these commands to install the 3.4 stable channel packages:               wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -     apt-get install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples llvm-3.4-runtime clang-modernize-3.4 clang-format-3.4 python-clang-3.4 lldb-3.4-dev       Immediately after these I got alerted by "update manager" that some of my packages need to be updated. I did this and my packages were upgraded to the development branch (3.5 release). The development branch gets upgraded every few hours, and I probably don't need something this "cutting edge", what with my crappy internet and low datacap. **So my questions are** :   1. Have I done the installation correctly and are there any steps that I missed/messed up?   2. How can I revert back to the stable branch of llvm, and not have the 3.5 release packages show up every time I call "sudo apt-get update"? Any help will be appreciated. Edit: Thanks for your response @Faheem. I installed the packages a few hours ago, so I dont have the terminal copy, but here is upgrade entry from /var/log/apt/history.log:               Start-Date: 2014-07-18  16:10:20     Commandline: apt-get upgrade     Upgrade: libllvm3.5-dbg:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), lldb-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-3.5-doc:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang1-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libllvm3.4:amd64 (3.4-1ubuntu3, 3.4.2+svn209031-1~exp1), libllvm3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang1-3.5-dbg:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), lldb-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-modernize-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang-common-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-examples:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), python-clang-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-format-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libllvm-3.5-ocaml-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-doc:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-runtime:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1)      End-Date: 2014-07-18 16:11:00


I installed Ubuntu 10.04 (LTS) to a VPS server I'm renting and get this critical error when booting:               Filesystem type is ext2fs, partition type 0x83      This prevents the rest of the boot process to continue. When "Googling", I found no answers besides "re-install". I already tried that 3 times, and am still experiencing the same problem.


title: No usb 3 Arch linux 3.15.1

text: Up until my last reboot, I had the ability to use my usb 3 port. I just got the system installed not that long ago, so up until then I'd been configuring and installing drivers, but that was the session that I had actually been doing work in. I did install the xf86-input-synaptics driver, but I just removed it and booted again to see if that was messing it up, since it didn't come back, it didn't. Now I'm stuck. I have seen on many forums that people are having problems with it, but the port usually shows up in lsusb, dmesg, or lspci. lsusb:               Bus 002 Device 005: ID 047b:0011 Silitek Corp. SK-1688U Keyboard     Bus 002 Device 004: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical     Bus 002 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 004: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller     Bus 001 Device 003: ID 13d3:5134 IMC Networks      Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      lspci | grep -i usb               00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)     00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)      dmesg | grep -i usb               [    1.278138] ACPI: bus type USB registered     [    1.278159] usbcore: registered new interface driver usbfs     [    1.278167] usbcore: registered new interface driver hub     [    1.278268] usbcore: registered new device driver usb     [    1.278630] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver     [    1.278904] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1     [    1.291224] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00     [    1.291408] hub 1-0:1.0: USB hub found     [    1.291716] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 2     [    1.304530] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00     [    1.304982] hub 2-0:1.0: USB hub found     [    1.597732] usb 1-1: new high-speed USB device number 2 using ehci-pci     [    1.721971] hub 1-1:1.0: USB hub found     [    1.830738] usb 2-1: new high-speed USB device number 2 using ehci-pci     [    1.955115] hub 2-1:1.0: USB hub found     [    2.037276] usb 1-1.2: new high-speed USB device number 3 using ehci-pci     [    2.240377] usb 1-1.4: new high-speed USB device number 4 using ehci-pci     [    2.390210] usb 2-1.2: new high-speed USB device number 3 using ehci-pci     [    2.476044] hub 2-1.2:1.0: USB hub found     [    2.743395] usb 2-1.2.3: new low-speed USB device number 4 using ehci-pci     [    2.899768] usb 2-1.2.4: new low-speed USB device number 5 using ehci-pci     [    6.531535] scsi6 : SCSI emulation for RTS5139 USB card reader     [    6.531790] usbcore: registered new interface driver rts5139     [    6.632207] uvcvideo: Found UVC 1.00 device USB2.0 UVC 1M WebCam (13d3:5134)     [    6.636268] input: USB2.0 UVC 1M WebCam as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input15     [    6.636452] usbcore: registered new interface driver uvcvideo     [    6.636456] USB Video Class driver (1.1.1)     [    7.114946] usbcore: registered new interface driver usbhid     [    7.114954] usbhid: USB HID core driver     [    7.125179] input: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.3/2-1.2.3:1.0/0003:045E:0040.0001/input/input18     [    7.125756    ] hid-generic 0003:045E:0040.0001: input,hidraw0: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:1d.0-1.2.3/input0     [    7.126179] input: Silitek Standard USB Keyboard  as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2.4/2-1.2.4:1.0/0003:047B:0011.0002/input/input19     [    7.126612] hid-generic 0003:047B:0011.0002: input,hidraw1: USB HID v1.00 Keyboard [Silitek Standard USB Keyboard ] on usb-0000:00:1d.0-1.2.4/input0      lshw -short -class bus               H/W path           Device  Class          Description     =====================================================     /0                         bus            G74Sx     /0/100/1a                  bus            6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2     /0/100/1a/1        usb1    bus            EHCI Host Controller     /0/100/1a/1/1              bus            Integrated Rate Matching Hub     /0/100/1d                  bus            6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1     /0/100/1d/1        usb2    bus            EHCI Host Controller     /0/100/1d/1/1              bus            Integrated Rate Matching Hub     /0/100/1d/1/1/2            bus            USB2.0 Hub     /0/100/1f.3                bus            6 Series/C200 Series Chipset Family SMBus Controller      Up until now, I've simply been told the device is broken, since it doesn't show up on any of these. Now that I've seen it work, I know that it isn't and that it is just a configuration issue. When it was working the ouput of lsusb included a fesco driver (I think). I don't see fesco anywere when using grep. The computer is an Asus G74sx laptop. Any and all information is appreciated. Thank you. Edit:   Okay, so I don't know how much this helps, but I have another machine (running linux) with a working usb3 port. I started checking for differences between the two in xhci_hcd and ehci_hcd (just in case) and found that in /sys/bus/pci/drivers/ the working system has a folder "xhci_hcd", whereas the non-working system does not. At first I thought to myself, "hey, maybe I can copy it over from the one system to the other. Even as root, I can't even copy those files. So clearly something somewhere else in the system is going haywire. Don't know if this helps or obfuscates, but it is a detail. Edit 2: The error message   The issue seems to be related to putting the system into suspend mode. I'm booting from a live-disk so I can quickly erase any changes. When I pt the machine into suspend mode it usually goes down without an issue. When it comes back up the usb 3 works fine. Sometimes, rather out of the blue, there is an error. Once the error occurs, I have to pull the plug on the machine and reset my live disk to get the port back. The message doesn't last very long, only a few milliseconds but I got it on my camera. The error message:               xhci_hcd 0000:04:00.0: PCI post-resume error -110!     xhci_hcd 0000:04:00.0: HC died; cleaning up     xhci_hcd 0000:04:00.0: HC died; cleaning up     dpm_run_callback(): pci_pm_resume+0x0/0xb0 returns -110     PM: Device 0000:04:00.0 failed to resume async: error -110     dpm_run_callback(): usb_dev_resume+0x0/0x20 [usbcore] returns -5     PM: Device 4-1.4 failed to resume async: error -5      Edit 3: Possible answer? (needs testing) Reading this, I found that if I manually unbind the usb3 then call `systemctl suspend`, then when I wake it up and manually bind the usb3 device, it works. I ran this 150 times, which if you consider that it will usually fail between 2 and 10 times, that is enough standard deviations from the mean, so I'm going to assume that it works. I put the bind and unbind into into "/etc/pm/sleep.d/20_custom-xhci_hcd". Then checked to make sure that it was executable.               #!/bin/sh     #File: "/etc/pm/sleep.d/20_custom-xhci_hcd"          case "${1}" in         hibernate|sleep)             #unbind             echo "Unbinding xhci device"             echo -n "0000:04:00.0" > /sys/bus/pci/drivers/xhci_hcd/unbind         ;;         resume|thaw)             # bind             echo "Binding xhci device"             ehco -n "0000:04:00.0" > /sys/bus/pci/drivers/xhci_hcd/bind         ;;     esac      I don't think this file ever gets called because I never saw the echo outputs. And thinking about it, it makes sense since this machine doesn't have pm- utils, and uses systemd instead. So I moved it to /usr/lib/systemd/system- sleep/ as per this site and adjusted it to:               #!/bin/sh     #File: "/usr/lib/systemd/system-sleep/xhci_hcd.sleep"          case $1/$2 in         pre/*)             #unbind             echo "Unbinding xhci device"             echo -n "0000:04:00.0" > /sys/bus/pci/drivers/xhci_hcd/unbind         ;;         post/*)             # bind             echo "Binding xhci device"             ehco -n "0000:04:00.0" > /sys/bus/pci/drivers/xhci_hcd/bind         ;;     esac      as stated in the same site. Then set it to executable. I'm going to test this but I think I'm feeling the love. If it works I'll post this to the answers part.


title: Questions regarding mounting CD-ROM on linux

text: I am trying to mount the dvd+rw drives in my Debian 7 PC. There are two drives and I can see that these exist in `/dev`:               $ ls -la /dev/dvd*     lrwxrwxrwx 1 root root 3 Oct 26 07:47 dvd -> sr1     lrwxrwxrwx 1 root root 3 Oct 26 12:41 dvd1 -> sr0     lrwxrwxrwx 1 root root 3 Oct 26 07:47 dvdrw -> sr1     lrwxrwxrwx 1 root root 3 Oct 26 12:41 dvdrw1 -> sr0      The following lines exist in my `/etc/fstab` file and were not put there by me:               /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0     /dev/sr1 /media/cdrom1 udf,iso9660 user,noauto 0 0      Nobody else has used this PC - I only recently installed debian7 and so, I assume that the installation process created these mount-points automatically. If I run `sudo mount -a` the drives do not mount, though:               $ mount | grep cd     # no results returned     $ df | grep cd     # no results returned      I tried changing `/etc/fsab` to:               /dev/sr0 /media/cdrom0 defaults 0 0     /dev/sr1 /media/cdrom1 defaults 0 0      But there were still no results from `mount` or `df`. As suggested by jordanm, i have tried to mount one of the drives manually:               $ sudo mount -t iso9660 -o defaults /dev/sr0 /media/cdrom0     mount: block device /dev/sr0 is write-protected, mounting read-only     mount: wrong fs type, bad option, bad superblock on /dev/sr0,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so


title: How to list groups with gid in redhat?

text: I first listed the groups using :               groups       I added group using               groupadd -g 300 oinstall     groupadd –g 500 dba      and then when I do               groups      root bin daemon sys adm disk wheel sfcb      I am unable to find groups I added. How to list groups with group id? Also, if I try to add it again it says groups is already present.


title: Finding a char device in /sys using a Bash script?

text: I have one of these and I am trying to write a Bash script for finding the device path in `/sys`. My approach goes something like this:   * start in `/sys/modules/usbled` since this is the name of the kernel module loaded when the device is plugged in   * `cd` to `drivers/usb:usbled`, which appears to be the bus and name of the driver for the device (according to usbled.c:229)   * ??? I get stuck on the last step since the directory contains:               $ ls     1-1.2:1.0  bind  module  new_id  remove_id  uevent  unbind      Now, I happen to know in this case that the `1-1.2:1.0` directory contains the char devices necessary to control the LEDs. However, how does my script know this? Is there any particular naming convention behind the directory? What if there are multiple devices of the same type plugged in?


title: Python error after installing libboost-all-dev on debian

text: A friend of mine wanted the libboost libraries installed on our shared computer so after installing libboost-all-dev 1.49.0.1 (a Debian wheezy machine), I get this error when using the "pydoc modules" command on the commandline. It spits out the following error --               root@debian:/usr/include/c++/4.7# pydoc modules          Please wait a moment while I gather a list of all available modules...          **[debian:49065] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ../../../../../../orte/mca/ess/singleton/ess_singleton_module.c at line 357     [debian:49065] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ../../../../../../orte/mca/ess/singleton/ess_singleton_module.c at line 230     [debian:49065] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ../../../orte/runtime/orte_init.c at line 132     --------------------------------------------------------------------------     It looks like orte_init failed for some reason; your parallel process is     likely to abort.  There are many reasons that a parallel process can     fail during orte_init; some of which are due to configuration or     environment problems.  This failure appears to be an internal failure;     here's some additional information (which may only be relevant to an     Open MPI developer):       orte_ess_set_name failed       --> Returned value A system-required executable either could not be found or was not executable by this user (-127) instead of ORTE_SUCCESS     --------------------------------------------------------------------------     --------------------------------------------------------------------------     It looks like MPI_INIT failed for some reason; your parallel process is     likely to abort.  There are many reasons that a parallel process can     fail during MPI_INIT; some of which are due to configuration or environment     problems.  This failure appears to be an internal failure; here's some     additional information (which may only be relevant to an Open MPI     developer):       ompi_mpi_init: orte_init failed       --> Returned "A system-required executable either could not be found or was not executable by this user" (-127) instead of "Success" (0)     --------------------------------------------------------------------------     *** The MPI_Init() function was called before MPI_INIT was invoked.     *** This is disallowed by the MPI standard.     *** Your MPI job will now abort.     [debian:49065] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!**     root@debian:/usr/include/c++/4.7#       I tried looking into the problem and ended up uninstalling the following to get it to work again.               openmpi common all 1.4.5-1     libibverbs-dev amd64 1.1.6-1                                        libopenmpi-dev amd64 1.4.5-1                                        mpi-default-dev amd64 1.0.1     libboost-mpi-python1.49.0      Although pydoc works again, I'm assuming the packages I removed are going to hurt something else down the track? As you guessed I'm not a C/C++ programmer. So I guess my question is, will this hurt something later? Is there a way to install those packages without hurting Python?


title: C++ compile in Arch Linux with no g++ package in repositories

text: I wanna compile a C++ program in Arch Linux, but there's no "g++" package as there is in Ubuntu repositories for example. Using `-x` too won't work. like this:               gcc -x c++ -o myprog myprog.cpp


title: How can I delete the first dot before the first number?

text: How to remove the first dot before the first number? For example I have the following file                 more file                 Version …………2.465.76.8.332      I want to get only the version number - 2.465768.332


title: How to detect global key presses

text: I have an Asus laptop that has a special key that can be configured to launch any software (at least on Windows). > ![](http://i.stack.imgur.com/bDzMA.png) The general question is: how can I detect any key press (globally)? Then, how can I detect when the user press this key?


title: How to fix boot into initramfs prompt and "mount: can't read '/etc/fstab': No such file or directory" and "No init found"?

text: Installing a new system using a **GPT** partitioned disk dedicated to a single partition, **ext4** formatted, **extlinux** (version 4.05) as bootloader, Ubuntu Core version 13.10 amd64 as rootfs, and Ubuntu linux- image-3.11.0-18-generic as kernel, and extlinux-update to generate bootloader configuration. The result after reboot (still inside a KVM based virtual machine) is an (initramfs) prompt and these messages:               mount: can't read '/etc/fstab': No such file or directory     mount: mounting /dev on /root/dev failed: No such file or directory     mount: mounting /sys on /root/sys failed: No such file or directory     mount: mounting /proc on /root/proc failed: No such file or directory     The filesystem doesn't have requested /sbin/init.     No init found. Try passing init= bootarg.      BusyBox is v1.20.2. Regression:   * the file system has been checked with `fsck.ext4` ### Check for root existence               (initramfs) ls -l /dev/[hs]da*     ls: /dev/[hs]da*: No such file or directory      ### Root boot argument               (initramfs) cat /proc/cmdline     initrd=/boot/initrd.img-3.11.0-18-generic ro quiet BOOT_IMAGE=/boot/vmlinuz-3.11.0-18-generic      ### Check loaded modules               (initramfs) cat /proc/modules     e1000 145368 0 - Live 0xffffffffa0000000      ### /boot folder content               $ sudo ls -l boot     -rw------- 1 root root 3296162 Feb 18 22:37 System.map-3.11.0-18-generic     -rw-r--r-- 1 root root 1007681 Feb 18 22:37 abi-3.11.0-18-generic     -rw-r--r-- 1 root root  163258 Feb 18 22:37 config-3.11.0-18-generic     drwxr-xr-x 2 root root    4096 Mar 17 20:13 extlinux     -rw-r--r-- 1 root root 4995000 Mar 16 23:35 initrd.img-3.11.0-18-generic     -rw------- 1 root root 5634192 Feb 18 22:37 vmlinuz-3.11.0-18-generic      How to make this system boot to the expected default bash prompt?


title: why have programs like su access to /etc/shadow

text: Normally only root can access `/etc/shadow`. But programs like `su` and `sudo` can check passwords without running as root. So the question is: Why can these programs access `/etc/shadow` without privileges? I tried to access it without privileges via python with the `spwd` module, but I didn't get access (like expected). Which mechanism do these programs use?


title: Error While Booting GRML

text: I'm dropped the 32-bit GRML ISO onto a 1GB thumb drive with the usual command:               dd if=grml_2010.12.iso of=/dev/USB_STICK      (of course, with the correct device). But, when I try to boot from it, it produces this error:               0AAD Loading ...bad magic error     ...bad magic      And then proceeds to restart. What would cause that?


title: 2 distros/1 PC: can I suspend one of them, then boot into the second one?

text: There are 2 linux distros on my pc: an ubuntu 10.04 and a fedora 14. If I suspend e.g.: the ubuntu are there any chances that I can boot into Fedora? Or that's impossible because the suspend uses the memory? What about hibernation?


title: md5sum check fails for git-man-pages.tar.gz package

text: When I try to verify the integrity of git-man-pages package I downloaded from "http://code.google.com/p/git-core/downloads/detail?name=git- manpages-1.8.4.tar.gz&can=2&q=" it fails with error. **Command which i ran:** `md5sum -c git-manpages-1.8.4.tar.gz` **Error displayed:**               md5sum: git-manpages-1.8.4.tar.gz: no properly formatted MD5 checksum lines found      I also tried entering the checksum value of git-manpages that i found in site in a file called checksum in the following format               8c67a7bc442d6191bc17633c7f2846c71bda71cf  git-manpages-1.8.4.tar.gz      and then running the **Command:** `md5sum -c checksum` **Error displayed:**               md5sum: checksum: no properly formatted MD5 checksum lines found


title: Apticron notifying about uninstalled packages

text: I'm using apticron to notify myself about available updates. However, I've got an installation on a VPN that seems to notify about packages I DON'T have installed. For example, it keeps (daily) suggesting that I upgrade sysvinit - I have upstart installed, not sysvinit. I used to have it for a number of other packages (basic libraries that weren't installed in my original Debian- wheezy image), so I've shut up those warnings just by installing the libraries. However, I don't really want to ditch upstart for sysvinit just to make apticron play more nicely. Any ideas how to make it stop?


title: How do I find the inode of any directory?

text: There is literally nothing on google that I can find that will help me answer this question. I presume it is passing some other parameter to `ls -i`?


title: Steam-OS installation asks for DVD media change halfway through installation

text: I'm trying to install the latest Steam OS. I've downloaded the ISO March 25th: SteamOSDVD.iso 25-Mar-2014 12:07 Installation works great up to the point when in "Select and Install software" after already having installed 200 or so packages, a screen pops up saying: "/cdrom/:Please insert the disc labeled: 'SteamOS GNU/Linux-1.0_Alchemist_- Unofficial Multi-architecture/i386/amd64 DVD #1 20140325-19:06' in the drive '/cdrom/' and press enter". However, that disk is already in the DVD drive! Pressing continue does nothing. There is no box to cancel the installation either, so all that's left to do here is Press ctrl+alt+del. The system is an i7-based Notebook with an AMD graphics chip and it is connected to the internet by means of an ethernet cable during installation.


title: How to check if Samba is installed

text: I don't know if Samba is pre-installed in my Linux system. I have the `/etc/samba/` directory, with `smb.conf` file. But if I try one of these commands               sudo service smb start     sudo service samba start     sudo service smbd start      the answer is always `unrecognized service`. In `/etc/init.d` there is no file like `smb`, `samba` or `smbd`. How could I check anymore? Thank you anyway!


title: Installing a light table(editor) in debian

text: I want to install lighttable programming editor in kali Linux(debian).I have downloaded the `tar.gz` version from here. But I am unable to install the light table .Please help in regarding this.   `./ltbin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./ltbin) ./ltbin: /lib/x86_64-linux-gnu/libc.so.6: version`GLIBC_2.15' not found (required by ./ltbin)`


title: Acer c7 Chromeos problem: the bootloader was replaced

text: My model is `Acer c710-2487`. Son changed the bootloader to `grub 2` but it can't find the o/s (if he put one there) on `ahci0` (No known filesystem detected). How do I resolve? I would like to put back to state it started (`chromeos bootloader, etc`).


title: Dual monitors on dual video cards on Ubuntu

text: I have been trying this to no avail. I am new to Linux, so a step by step explanation would be greatly appreciated. I have two NVIDIA GeForce 8600 GT video cards. I want a monitor to run on each card, so Twinview cannot be used because my understanding that is only for single video cards. I went to the system monitors tab and my second display is detected but disabled. So I enabled it by clicking configure. It says switch to XScreen (requires restart of x server) and I set up my settings so that the new monitor is to the left of the main one. I apply the changes by updating the xorg.conf file which is what it says to do after you click apply. When I reboot I cant even login to the desktop. The GUI is all messed up and goes to the command line. It has to do apparently with the new changes made to the xorg.conf file so I have a back up and just put the old one back and then I can get back to the GUI. I have done this several times with several different variations of setting up the monitor and I run into the same problem. I even tried to restart gdm without rebooting and it actually does nothing or resets all the monitor configurations that I made. Please help. I would like to use dual monitors in Ubuntu.


title: Why bash time is more precise then GNU time?

text: The buitin bash command `time` gives milisecond precision of execution and GNU `time` (usually /usr/bin/time) gives centisecond precision. The `times(2)` syscall gives times in clocks, and 100 clocks = 1 second (usually), so the precision is like GNU `time`. So the question is what is bash `time` using so that it's more precise?


title: What causes swap files to be created?

text: As part of the program I wrote, I constantly read and write data from files. I noticed that as part of doing so, I am inadvertently creating swap `.swp` files. What do you think is going on? What would cause swap files to appear if you had to reproduce the problem?


title: Prompt user on Linux security denial

text: Is it possible to make a Linux security module (eg. AppArmor, SELinux etc.) prompt the user, when an application wants to access classified files or folders (digital signatures, SSH keys, credit card information and other sensitive stuff) instead of just denying the application's action, which could be desired (eg. an email client wanting to sign an email on the user's request). It will be beneficial to set up strict default security policies for vulnerable applications (especially web browsers and email clients) and let the user decide, whether a given action is desired or not, so vulnerability of the system can be avoided without worsening the user-friendliness.


title: Ubuntu Could not purge package

text: I've tried to install **oracle-java7-installer** package from custom repository onto Ubuntu 12. It was failed during executing some post- installation script. So. I want just to rollback it and proceed with another solutions (to install java 7 jdk). I've tried to make UPDATED with **set -x**                >  sudo aptitude remove oracle-java7-installer     The following packages will be REMOVED:       oracle-java7-installer     0 packages upgraded, 0 newly installed, 1 to remove and 47 not upgraded.     Need to get 0 B of archives. After unpacking 82.9 kB will be freed.     (Reading database ... 61748 files and directories currently installed.)     Removing oracle-java7-installer ...     + uname -m     + arch=amd64     + dld=x64     + J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle     + [ remove = remove ]     + [ -d /usr/lib/jvm/java-7-oracle/man/man1 ]     + basename /usr/lib/jvm/java-7-oracle/bin/*     + name=*     + [ ! -f /usr/bin/* -o -L /usr/bin/* ]     + update-alternatives --remove bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc raid root run sbin selinux srv sys tmp usr var vmlinuz /usr/lib/jvm/java-7-oracle/bin/*     update-alternatives: error: unknown argument `dev'     dpkg: error processing oracle-java7-installer (--remove):      subprocess installed pre-removal script returned error exit status 2     No apport report written because MaxReports is reached already                                                                   Downloading...     --2012-10-24 17:53:33--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz     Resolving download.oracle.com (download.oracle.com)... 80.239.148.219, 80.239.148.216     Connecting to download.oracle.com (download.oracle.com)|80.239.148.219|:80... connected.     HTTP request sent, awaiting response... 302 Moved Temporarily     Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz [following]     --2012-10-24 17:53:33--  https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz     Resolving edelivery.oracle.com (edelivery.oracle.com)... 2.22.42.174     Connecting to edelivery.oracle.com (edelivery.oracle.com)|2.22.42.174|:443... connected.     HTTP request sent, awaiting response... 302 Moved Temporarily     Location: http://download.oracle.com/errors/download-fail-1505220.html [following]     --2012-10-24 17:53:33--  http://download.oracle.com/errors/download-fail-1505220.html     Connecting to download.oracle.com (download.oracle.com)|80.239.148.219|:80... connected.     HTTP request sent, awaiting response... 200 OK     Length: 5307 (5.2K) [text/html]     Saving to: `./jdk-7u3-linux-x64.tar.gz'               0K .....                                                 100%  466M=0s          2012-10-24 17:53:33 (466 MB/s) - `./jdk-7u3-linux-x64.tar.gz' saved [5307/5307]          Download done.     sha256sum mismatch jdk-7u3-linux-x64.tar.gz     Oracle JDK 7 is NOT installed.     dpkg: error while cleaning up:      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      oracle-java7-installer     E: Sub-process /usr/bin/dpkg returned an error code (1)     A package failed to install.  Trying to recover:                    > sudo aptitude search oracle-java7-installer        Cd  oracle-java7-installer                                                 - Sun Java(TM) Development Kit (JDK) 7      What I can do with that? Is it possible to rollback to the previous state without trying to deinstall broken package?? So. I understand from output that scripts inside package are wrong. they failed to download tar.gz from Oracle site and failed to install due to that. Also it does not handle properly **remove** commande and trying to install it again when I want to remove package. The basic question - is it possible to just rollback that package without running scripts? F.e. like in windows "System restore"? Or I should do this manually? P.S. > lsb_release -a   >  No LSB modules are available.   >  Distributor ID: Ubuntu   >  Description: Ubuntu 12.04.1 LTS   >  Release: 12.04   >  Codename: precise P.P.S > sh -x /var/lib/dpkg/info/oracle-java7-installer.prerm   >  + set -e   >  + uname -m   >  + arch=amd64   >  + dld=x64   >  + J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle   >  + [ = remove ]   >  + [ = deconfigure ]   >  + exit 0


title: Is it possible to configure ctrl-w (delete word)?

text: Normally, `Ctrl-w` deletes back to the last whitespace. Is it possible to configure it to use additional characters, such as `/`? Edit: To be more clear: I don't want to configure the key for it, I want to have the deletion stop on `/` aswell. Example:               vim /foo/bar^W     vim /foo/


title: GRUB installed with every OS. Which one is actually in use?

text: When you have multiple Linux OS's on the same computer, each installation has its own installation of GRUB, and the most recent installation is usually the one that is used when booting up. The issue comes up when I can no longer remember which is the most recent installation and I want to make modifications to the GRUB menu. How do I figure out which one is in use short of checking each installation individually? Is there a cleaner setup which avoids the problem in the first place by only having one installation of GRUB?


title: VMware mouse occasionally held down (cannot "unclick", left mouse stops working, grab ungrab)

text: I have Debian 6.0.6 on vmware player. I notice once in a while the mouse just selects everything - like starting from some point to wherever my mouse is currently at. I can't unselect or press any buttons, except right click. And then I still can't select anything, but if I right click the context menu goes away. I know this is really localized, but if someone has seen this issue and can point out where it's from I can make the title more general. After a while the selection goes away and I can click again. I can send signals via VMware but it doesn't seem to help (just got to wait). Any idea what's causing this? * * * Finally, I noticed that the this was applying to any click when my mouse was held down over the scrollbar and I couldn't click anything else.


title: How to let rsync additionally store an differential changelog in another directory?

text: I'm using `rsync --link-dir` to obtain daily snapshots with little space usage due to the hardlinking. It would however be nice to also have a directory that, while mirroring the original structure, only contains (hardlinks to the full backup of) the files that have actually changed. As an example, here's the directory structure before:               source/        <- contains the original data     backup/current <- symlink to the most recent snapshot     backup/12102?  <- recent daily snapshots (irrelevant)      and here the desired structure after:               source/     backup/current <- symlink to the _updated_ snapshot     backup/previous<- symlink to the snapshot that was was "current" before     backup/12102?  <- ...     backup/current.changes  <- (symlink to) directory containing _only_ the files that                                have changed between "current" and "previous"


title: Upgrade zsh on red hat 5 x86_64

text: My machine is running RHEL 5 x86_64 I'm facing a problem with `oh-my-zsh` The `zsh` version on my machine is               zsh --version     zsh 4.2.6 (x86_64-redhat-linux-gnu)      There are no upgrades available via `yum`. How can I install a newer version of `zsh`? I've tried to look for `rpms` on the internet but they're for fedora or other distros.               ➜  src  sudo rpm -ivh zsh-5.0.2-1.fc18.x86_64.rpm       warning: zsh-5.0.2-1.fc18.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID de7f38bd     error: Failed dependencies:         libc.so.6(GLIBC_2.11)(64bit) is needed by zsh-5.0.2-1.fc18.x86_64         libc.so.6(GLIBC_2.14)(64bit) is needed by zsh-5.0.2-1.fc18.x86_64         libc.so.6(GLIBC_2.15)(64bit) is needed by zsh-5.0.2-1.fc18.x86_64         libc.so.6(GLIBC_2.7)(64bit) is needed by zsh-5.0.2-1.fc18.x86_64         libtinfo.so.5()(64bit) is needed by zsh-5.0.2-1.fc18.x86_64         rpmlib(FileDigests) <= 4.6.0-1 is needed by zsh-5.0.2-1.fc18.x86_64         rpmlib(PayloadIsXz) <= 5.2-1 is needed by zsh-5.0.2-1.fc18.x86_64     ➜  src  sudo rpm -ivh zsh-4.3.17-1.fu2012.x86_64.rpm      warning: zsh-4.3.17-1.fu2012.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 42d68235     error: Failed dependencies:         libc.so.6(GLIBC_2.11)(64bit) is needed by zsh-4.3.17-1.fu2012.x86_64         libc.so.6(GLIBC_2.14)(64bit) is needed by zsh-4.3.17-1.fu2012.x86_64         libc.so.6(GLIBC_2.15)(64bit) is needed by zsh-4.3.17-1.fu2012.x86_64         libc.so.6(GLIBC_2.7)(64bit) is needed by zsh-4.3.17-1.fu2012.x86_64         libgdbm.so.3()(64bit) is needed by zsh-4.3.17-1.fu2012.x86_64         libtinfo.so.5()(64bit) is needed by zsh-4.3.17-1.fu2012.x86_64         rpmlib(FileDigests) <= 4.6.0-1 is needed by zsh-4.3.17-1.fu2012.x86_64         rpmlib(PayloadIsXz) <= 5.2-1 is needed by zsh-4.3.17-1.fu2012.x86_64      It appears that I can't install the latest version of glibc either :|


title: NICE a process and set it to RT

text: I have a Fedora system with sopcast running two streams. When I watch the stream locally it looks perfectly. But after being processed through my Fedora-box its a bit choppy. I want to set the streams to realtime and prioritize it over everything. As you can see below I've tried setting it to NICE -20 and the other consuming processes to something higher. It seems like it got worse after. How do I make it realtime? Could it be better after setting it for RT? The user running my streams is operate. And everything running on my init 5 + root should be prioritized lowest.               top - 02:09:54 up  1:25,  3 users,  load average: 0.11, 0.10, 0.09     Tasks: 185 total,   2 running, 183 sleeping,   0 stopped,   0 zombie     Cpu(s):  0.3%us,  0.9%sy,  1.2%ni, 96.7%id,  0.4%wa,  0.2%hi,  0.2%si,  0.0%st     Mem:   5914932k total,  2456904k used,  3458028k free,    68296k buffers     Swap:  8028156k total,        0k used,  8028156k free,  1557048k cached            PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                  3775 deluge    39  19  572m  42m  10m S  3.0  0.7   0:50.89 deluged                  1826 root      20   0  148m  20m 8544 S  1.0  0.4   0:21.69 Xorg                     2436 administ  25   5  225m 2520 1764 S  1.0  0.0   0:07.44 synergyc                 1716 operate    0 -20 19596 8244 1884 S  0.7  0.1   0:40.56 sp-so-auth               2367 administ  25   5  572m  15m 9.8m S  0.7  0.3   0:04.47 gnome-terminal             24 root      RT   0     0    0    0 S  0.3  0.0   0:00.24 migration/3               824 deluge    39  19  245m  30m 4236 S  0.3  0.5   0:16.45 deluge            Any other sugestions for getting the stream better? Doesn't seem like the processor is struggling processing it, but still. Deluge seems like it takes quite a lot. That one should be NICED positive? Edit: As a sidenote. My internet-connection is not maxing out. I'm running a BW monitor on the router (DD-WRT). And it shows a upload average of 2Mbit out of 10 Mbit and an average of 0,4 download out of 100Mbit. But the graph itself is behaving really strange. See attached picture. I've been wondering what this could be. Also talked with my provider about MTU and such, but they told everything looked good. As you can see, it's acting strange kind of falling down every other second. Almost as if it hits an maximum window-sizing somewhere. The streams are RTP / HTTP based and is in total 350Kbits + 20Kbits sound. ![Bandwidth monitor graph](http://i.stack.imgur.com/cri3u.png)


title: How to allow access to only one NTFS folder of already mounted partition for specific user?

text: I have two users: userA and userB. I have also NTFS formatted parition. Whole parition is only accessible to userA thanks to this in /etc/fstab:               /dev/sda3 /home/userA/data ntfs-3g defaults,rw,nouser,uid=userA,umask=077,exec 0 0      . I want to allow ONE folder (for example /home/userA/data/movies) to be accessible for userB, but not whole drive. How can I do this? If I allow all users in fstab, both users have access to whole drive, regardless if it is mounted in /home/userA/ folder. userB can simply do               ls /home/userA/data      even if he can't do               ls /home/userA      If I leave fstab as I have it set now and I use symlink, symlink respects permissions to folder it's linked to and userB won't be allowed to use this symlink. I also tried to use remount option, but only thing it can change is ro/rw option, it can't change uid, guid or similar for ntfs partitions. I guess policy below (from man mount) applies to ntfs too: > The -o remount may not be able to change mount parameters (all ext2fs- > specific parameters, except sb, are changeable with a remount, for example, > but you can't change gid or umask for the fatfs).


title: How to set & retrieve a cookie via an executable bash script that is on the web

text: A simple bash script that can set a cookie when executed via web :               #!/bin/bash     echo "Set-Cookie: eee=1"     echo "Content-type: text/html"     echo ""     echo "test"      I replaced the entire codes above with the following:               #!/usr/bin/env python     import os          print 'Set-Cookie: eee=1'     print 'Content-Type: text\n'          print ''          a = os.environ.get('HTTP_COOKIE')     print a          print ''      this one can now both set and retrieve a cookie. but it is no longer a bash script. it is a python script. the question is.. how to retrieve the cookie via bash script itself.. ?


title: How to change terminal character encoding

text: Today I uninstalled the GUI packages on my home CentOS installation. Now, when the machine starts, I get the login prompt. It acts finicky. Sometimes pressing enter just once after answering each prompt works. Other times, no. When I manage to get logged in, I can only enter commands in `bash` by entering one character at a time -- that is:               l, enter     o, enter     c, enter     a, enter     l, enter     e, enter     enter      Does anyone have some insight for this? UPDATE: This is the result of `stty -a`:               speed 38400 baud; rows 64; columns 160; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;     eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;     werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;     -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts cdtrdsr     -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff     -iuclc -ixany -imaxbel iutf8     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt     echoctl echoke      None of the settings that differ from `stty sane` make a difference, though.