how is the file /proc/net/dev filled?

So, I'm writing a kernel module that needs stats about local network interfaces and I came up with the following code ... everything works fine except for the part where I try to read wireless device stats ... apparently the `wireless_handler` struct is not filled because the `CONFIG_WIRELESS_EXT` is not set ... my question? Where does `ifconfig` get its' wireless stats from?               struct net_device *dev;     struct net_device_stats *stats;                  struct iw_statistics *wi_stats;     dev = first_net_device(&init_net);     while (dev)     {         if (strncmp(dev->name , "wlan",4)==0 && (dev->flags & IFF_UP) == 1)                 {                  #ifndef CONFIG_WIRELESS_EXT             wi_stats = dev -> wireless_handlers -> get_wireless_stats(dev);             #endif                   }             else if (strncmp(dev->name , "eth",3)==0 || strncmp(dev->name , "lo",2)==0)                  {             stats = dev->netdev_ops->ndo_get_stats(dev);             printk(KERN_INFO "recive packets: [%li]\ntransmitted packets: [%li]\nrecive errors: [%li]\ntransmission errors: [%li]\nnumber of collisions: [%li]",                      stats->rx_packets , stats->tx_packets ,stats->rx_errors , stats->tx_errors, stats->collisions);                 }              dev = next_net_device(dev);     }//end while


i3 HDMI output sometimes shows black screen after startup

I have the `i3` window manager configured to use `HDMI-0` as its main output and `DVI-0` to use as a secondary screen. The dualscreen configuration is done via an `xrandr` entry in the `i3` config file. Sometimes, and I can't associate it with any system events (high load, running processes, etc.), after starting the `Xorg` server, the window manager fails to put a desktop on `HDMI-0` and it shows a black screen on it (I can still see the mouse pointer). `DVI-0` is working correctly every time. Note: it doesn't matter how I start the X server, the error occurs when using `kdm` and `startx` as well.


How can I get TLSv1.2 support in Apache on RHEL6/CentOS/SL6?

I'd like to have TLSv1.2 support in Apache on my Scientific Linux 6 (RHEL6 rebuild) server. Is there some semi-supported pathway to getting this working? Preferably with minimal custom rebuilding. Right now I'm using mod_ssl with open_ssl, as provided in the SL6 repositories. **Edit:** Once TLSv1.2 support is available, the Apache configuration is well- documented and not too difficult. The problem is that RHEL6 ships with OpenSSL 1.0.0, which only supports TLS through 1.0 or 1.1.


How do I determine the new size for resize2fs?

I want to shrink an ext4 filesystem to make room for a new partition and came across the `resize2fs` program. The command looks like this:               resize2fs -p /dev/mapper/ExistingExt4 $size      How should I determine `$size` if I want to substract exactly 15 GiB from the current ext4 filesystem? Can I use the output of `df` somehow?


Is "/etc/issue" Common file

I'm trying to Create OS detect portable function in bash script, So I just want to know, the file `"/etc/issue"` is common for all Linux Flavors ?


Why does a named pipe not get deleted after system restart?

As far as I understand, named pipes are not written to disk but are stored in memory. Here's how I created a named pipe -               $ mkfifo pipe21     $ grep "simple" SimpleDoc.txt > pipe21 &     [1] 2775     $ cat pipe21     Very simple doc that contains plaintext.      [1]+  Done                    grep --color=auto "simple" SimpleDoc.txt > pipe21      After this, I restarted my system. However, even after the restart, I see pipe21 in my current directory. Why is that?


iptables to allow teamviewer

I'm having some trouble to allow TeamViewer in a restrictive iptables configuration. I'm running Fedora 20. After some research I found out TeamViewer uses ports 80, 443 and I have created this script to set up rules to allow those ports to be open but it still doesn't work:               #!/bin/bash     #clear iptables     iptables -F     iptables -X          #accept everything no matter port on localhost     iptables -A INPUT -i lo -j ACCEPT          #allow established connections     iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT     iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT          #allow traffic going to specific outbound ports     iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT     iptables -A INPUT -p tcp --sport 80 -j ACCEPT          iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT     iptables -A INPUT -p tcp --sport 443 -j ACCEPT          iptables -A OUTPUT -p tcp --dport 5938 -j ACCEPT     iptables -A INPUT -p tcp --sport 5938 -j ACCEPT          iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT     iptables -A INPUT -p tcp --sport 53 -j ACCEPT          iptables -A OUTPUT -p udp --dport 53 -j ACCEPT     iptables -A INPUT -p udp --sport 53 -j ACCEPT          #drop anything that doesnt match the rules above     iptables -A INPUT -j DROP     iptables -A OUTPUT -j DROP     iptables -A FORWARD -j DROP      With these rules I can access other machines with TeamViewer but I cannot have others access my machine. Also, when the default (boot) iptables are in place, I can receive and initiate TeamViewer connection. What am I missing? **EDIT 1** I just ran a packet trace and I can see loads of traffic going on on port 5938 but the PC connecting just says Connecting... and is not prompted for the password. **EDIT 2** I enabled the default set of rules which works and ran another packet trace and now I see that after a connection and some traffic going on on port 5938, I see a HTTP connection (port 80) being established to a TeamViewer server and before that I see a couple of DNS (port 53) requests for TeamViewer host names. All these ports are open in my restrictive setup yet I don't see the DNS requests and the HTTP connection... :-/ Connection to other hosts and sites works just fine. Actually I'm posting this EDIT using the restrictive set of rules. **EDIT 3** Just for peace of mind I removed the last three DROP rules and like this it works.


ethernet not found- load module into linux kernel?

We got a new server at work and I installed harddrive from the old system. Ubuntu 8.04 boots up just fine. The only problem is:               $ifup eth0     device not found          $lspci     Ethernet Controller Intel Pro(100/1000)          $dmesg | grep eth     (nothing)      Should I add some sort of default ethernet module using `modprobe` or is there another way?               $cat /etc/network/interfaces     auto lo     iface lo inet loopback          auto eth0     iface eth0 inet static     address xxx          $lsmod<br/>     [gist](https://gist.github.com/1004662)


How to upgrade application to the latest version using yum in Fedora?

I have Fedora 15, and Gnome 3. But i would like to update to the latest version of Gnome 3 (where i have 3.0.1 always). For some error reason i must need to upgrade to Gnome 3.0.3 How do we update Fedora for a specific application or group applications to latest version? Thanks


Debian dhcpd "No subnet declaration for eth0"

I am trying to set up a pxe boot server on a Debian 6.0.3 Squeeze machine that gives images of PLoP Linux. I was following a tutorial from http://www.plop.at/en/ploplinux/networkboot-linux.html#pxel12 .   When I try to start dhcpd (from package dhcp3-server), I get the following:               No subnet declaration for eth0 (10.0.0.0).     **Ignoring requests on eth0. If this is not what       you want, please write a subnet delclaration       in your dhcpd.conf file for the network segment        to which interface eth0 is attached. **                    Not configured to listen on any interfaces!      My /etc/dhcpd.conf is identical to that in the tutorial save for a few changes:               host testpc {             hardware ethernet 00:0C:6E:A6:1A:E6;             fixed-address 10.0.0.250;     }      is instead               host tablet {             hardware ethernet 00:02:3F:FB:E2:6F;             fixed-address 10.0.0.249;     }      My /etc/network/interfaces is:               # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     allow-hotplug eth0     iface eth0 inet static             address 10.0.0.0             netmask 255.255.255.0      And this is my /etc/default/isc-dhcp-server:               # Defaults for dhcp initscript     # sourced by /etc/init.d/dhcp     # installed at /etc/default/isc-dhcp-server by the maintainer scripts          #     # This is a POSIX shell fragment     #          # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?     #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".     INTERFACES="eth0"      which I copied to /etc/default/dhcp3-server as well, unsure which it would check.      I also tried setting the ip in /etc/network/interfaces as 10.0.0.1 and 10.0.0.2, but it produced the same result.


HDD Testing En Masse

Does anyone have any ideas about how to set up automatic detection and conditional formatting of a LOT of HDDs? I tried posting this on TomsHardwareForums, but I don't think the responder read my question. Anyway, I would like to try to set up some kind of a linux system for testing these drives. If any grizzled HDD savvy linux admins here have experience with this, I would love a pointer or two. I'm currently running CentOS on some old hardware and using a USB interface to a hot swap bay for testing these, but it's not really an ideal solution. I'd like to assign each bay to a specific /dev location, and use modprobe to automatically detect the drives, check whether they pass the SMART test (and whether they have prefail values that indicate further testing), format them or DoD wipe them if they have data on them, then indicate this status somewhere for easy removal. I have this about half-way done, so far. I've heard good things about ldadm. P.S. The link to my post on tomshardwareforum follows : http://www.tomshardware.com/forum/336332-31-automatically-testing-formatting- multiple-hdds-masse


Problems with apt-get upgrade on Debian (404 Not Found)

I can't update my Debian Sid system. on running the apt-get upgrade I am getting:               maciej@wladyslawa:/etc/apt$ sudo apt-get upgrade     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages have been kept back:       gnome-keyring libglx-nvidia-alternatives     The following packages will be upgraded:       antlr apt-listchanges bluez ca-certificates-java cron dbus dbus-x11 debianutils       dictionaries-common grep grub-common grub-pc grub-pc-bin grub2-common gstreamer0.10-packagekit       icedtea-6-jre-cacao inkscape iso-codes libantlr-java libantlr-java-gcj libatlas3gf-base       libbluetooth3 libdbus-1-3 libdbus-1-dev libdbus-glib-1-2 libdbus-glib-1-dev libdjvulibre-text       libdjvulibre21 libgc1c2 libgck0 libgcr-3-0 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx       libglu1-mesa libglu1-mesa-dev libgnome-keyring0 libnm-glib-vpn1 libnm-glib2 libnm-util1       libogre-dev libogremain-1.7.1 libpackagekit-glib2-14 libpam-gnome-keyring libpipeline1 libsrtp0       mesa-common-dev module-init-tools network-manager network-manager-dev ogre-tools openjdk-6-jdk       openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib packagekit packagekit-backend-aptcc       python-glade2 python-gtk2 python-gtksourceview2 python-openssl python-packagekit rsyslog       x11proto-resource-dev xserver-common xserver-xephyr xserver-xorg-core xserver-xorg-dev     68 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.     Need to get 1,571 kB/121 MB of archives.     After this operation, 2,249 kB of additional disk space will be used.     Do you want to continue [Y/n]? y     Err http://debian.man.ac.uk/debian/ sid/main gstreamer0.10-packagekit i386 0.6.14-2       404  Not Found     Err http://debian.man.ac.uk/debian/ sid/main packagekit-backend-aptcc i386 0.6.14-2       404  Not Found     Err http://debian.man.ac.uk/debian/ sid/main packagekit i386 0.6.14-2       404  Not Found     Err http://debian.man.ac.uk/debian/ sid/main python-packagekit all 0.6.14-2       404  Not Found     Err http://debian.man.ac.uk/debian/ sid/main libpackagekit-glib2-14 i386 0.6.14-2       404  Not Found     Err http://debian.man.ac.uk/debian/ sid/main libsrtp0 i386 1.4.4+20100615~dfsg-1       404  Not Found     Failed to fetch http://debian.man.ac.uk/debian/pool/main/p/packagekit/gstreamer0.10-packagekit_0.6.14-2_i386.deb  404  Not Found     Failed to fetch http://debian.man.ac.uk/debian/pool/main/p/packagekit/packagekit-backend-aptcc_0.6.14-2_i386.deb  404  Not Found     Failed to fetch http://debian.man.ac.uk/debian/pool/main/p/packagekit/packagekit_0.6.14-2_i386.deb  404  Not Found     Failed to fetch http://debian.man.ac.uk/debian/pool/main/p/packagekit/python-packagekit_0.6.14-2_all.deb  404  Not Found     Failed to fetch http://debian.man.ac.uk/debian/pool/main/p/packagekit/libpackagekit-glib2-14_0.6.14-2_i386.deb  404  Not Found     Failed to fetch http://debian.man.ac.uk/debian/pool/main/s/srtp/libsrtp0_1.4.4+20100615~dfsg-1_i386.deb  404  Not Found     E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?      I did try both `apt-get update --fix-missing` and `apt-get install -f` but that didn't help much. Here is my source.list file:               deb http://debian.man.ac.uk/debian/ sid main contrib non-free      deb-src http://debian.man.ac.uk/debian/ sid main contrib non-free       Does anybody have any idea how can I sort it out?


is it possible to lock a user into a give directory tree in bash?

I want to lock a user into a given directory tree. That is he/she can cd deeper into the tree but no higher out of the tree. Everything else in the environment should be the exact same. Edit: How can I do this without chroot. I am launching a bash via objective-c can creating a terminal-like application. I need to user to be able to access /usr/include and all the other places on they system, I just need them to be locked into a directory structure. chroot seems to require root privileges to run. Running bash in restrictive mode is to restrictive.


zsh tab completion on empty line

I'd like a tcsh'ism that I haven't been able to find: On a blank line with no content, I want to press the tab key and see the equivalent of an ls. That is to say I want               $ <tab>      to do something other then giving me a \t. I've found fantastic resources for command completion, but not for this base case. Any help on this would be great! Thanks.


What do the bash-builtins 'set' and 'export' do?

I am at a bit of a loss as to the purpose of `set` and `export` in Bash (and I guess probably other shells too). I would think it is for setting environment variables, but that can be done just with `VARIABLE=VALUE`, right? Also typing `set` and `export` on their own show different values. So what is their purpose?


Copying files based on a condition

Here's the problem I'm attempting to solve:   * Let's say I have a directory "A", containing some files as well as some other directories.    * I want to copy all the files directly under directory A to directory B.   * I want to recursively copy all the folders inside folder A to folder C.  What is the shortest and less platform-specific way to accomplish this in UNIX/Linux?


"Home Directory / Not Ours" on boot

I get the line `Home Directory / Not Ours` repeated about 30 times when i boot Debian. This has recently started happening since i did an update where everything was stuffed up. eg. Gnome and gdm3 uninstalled and a whole lot of other things. is the best thing to do to reinstall Debian? Help Needed. PS. Would like not to reinstall.


Debian on macbook air not booting

I installed Debian on my macbook air a week ago after first going through the http://www.rodsbooks.com/refind/installing.html#osx installation guide. The installation of Debian worked fine and i ran it for a couple of days. However, the installation was a bit sloppy so i decided to do it more carefully using https://wiki.debian.org/InstallingDebianOn/Apple/MacBookAir/3-2 The partitioning and installation went fine but now Debian won't show up on boot. My choices on the boot-menu is OSX or some linux-symbol that when pressed on asks for a boot-device. So what went wrong and how can i fix this? Did the GRUB get all wrong?


iptables adding rules in OUTPUT chain

We can insert `iptables` rules based on IP/Network/Hostname:               iptables -t filter -A OUTPUT -p tcp -d www.google.com -j ACCEPT -m comment --comment "www.google.com"       It is not accepting:               iptables v1.4.7: host/network www.google.com not found     Try iptables -h' or 'iptables --help' for more information.


How to dock an application installed from terminal to the Launcher panel in Ubuntu

Installed Linux and wanted to set up sublime text. Extracted it in the /opt/ folder and can launch it with "./". I "Lock it to Launcher" but after that I'm not able to launch the program locked. Question: how do I lock so that I would be able to launch the program from the launcher?


How to (safely) move /tmp to a different volume?

Today the `/tmp` directory filled up on a machine at work. The problem was, it was on the root partition which wasn't very big. In order to fix this, a co- worker created a `/new/tmp` directory elsewhere, copied all the contents to the new directory, removed the original `/tmp` and made a symlink `/tmp -> /new/tmp`. When he copied the files (really, this was somebody else, not me!) he didn't use `-a` so the owner of every file under `/new/tmp` was `root`. Furthermore, he didn't set the permissions of the `/new/tmp` directory so it was the default 0755. This caused no end of trouble and even tweaking mode and ownership bits failed to restore the machine to an acceptably working state. I ended up having to nuke everything in `/tmp` and reboot. The `/tmp` directory contained various sockets and pipes and whatnot, since a bunch of people run Gnome through VNC, and I use `screen` which has its own pipes. Is there a _safe_ way to move a `/tmp` directory to a different volume on a running system? I'm not sure what I would have actually done to keep everything working. I'm particularly curious about what happens to pipes and sockets.


Unattended linux installation (Debian/Ubuntu)

I want to make an Debian or Ubuntu unattended ISO, for my FOG server - to boot up system installation via LAN. I've searched over the internet but I didn't found nothing, which will be adequate for me.


zle - I cannot find why Ctrl+R does not work for non-root

The `Ctrl+R` works for root (well toor) however I cannot find why it does not work for user. User `.zshrc`:               setopt AUTO_CD     setopt CORRECT_ALL     setopt EXTENDED_GLOB     # History     SAVEHIST=10000     HISTSIZE=10000     HISTFILE=~/.zsh/history     setopt APPEND_HISTORY     setopt EXTENDED_HISTORY     setopt INC_APPEND_HISTORY     setopt HIST_FIND_NO_DUPS     setopt HIST_IGNORE_ALL_DUPS     setopt HIST_IGNORE_SPACE     setopt NO_HIST_BEEP     setopt SHARE_HISTORY     # Keys     autoload zkbd     [[ ! -d ~/.zkbd ]] && mkdir ~/.zkbd     [[ ! -f ~/.zkbd/$TERM-${DISPLAY:-$VENDOR-$OSTYPE} ]] && zkbd     source  ~/.zkbd/$TERM-${DISPLAY:-$VENDOR-$OSTYPE}     [[ -n ${key[Home]}    ]]  && bindkey  "${key[Home]}"    beginning-of-line     [[ -n ${key[End]}     ]]  && bindkey  "${key[End]}"     end-of-line     [[ -n ${key[Insert]}  ]]  && bindkey  "${key[Insert]}"  overwrite-mode     [[ -n ${key[Delete]}  ]]  && bindkey  "${key[Delete]}"  delete-char     [[ -n ${key[Up]}      ]]  && bindkey  "${key[Up]}"      up-line-or-history     [[ -n ${key[Down]}    ]]  && bindkey  "${key[Down]}"    down-line-or-history     [[ -n ${key[Left]}    ]]  && bindkey  "${key[Left]}"    backward-char     [[ -n ${key[Right]}   ]]  && bindkey  "${key[Right]}"   forward-char     # Auto completion     autoload -U compinit promptinit     compinit     promptinit     prompt clint     zstyle ':completion::complete:*' use-cache 1     setopt HASH_LIST_ALL     # MIME     autoload -U zsh-mime-setup     zsh-mime-setup     # Calc     autoload -U zcalc     # Login     alias su="su - toor"      diff with root .zshrc:               --- -   2011-01-06 23:53:54.772440701 +0100     +++ .zshrc  2011-01-06 23:50:00.000000000 +0100     @@ -38,9 +38,5 @@      zsh-mime-setup      # Calc      autoload -U zcalc     -# Editor     -export EDITOR=vim     -# Paludis     -alias background="schedtool -B -e"     -alias lowprio="nice -n 20 ionice -c 3"     -alias blowprio="ionice -c 3 schedtool -B -e nice -n 20"     +# Login     +alias su="su - toor"      Any ideas? zsh version 2.3.11.


Compile the Ubuntu “Raring” Kernel with the Intel Compiler

Of course, the first question is: why I'm doing this. Just for fun! I'm learning more about Linux kernels and I have a virtual machine that I can replace in 15 minutes. Getting to business, I don't know how to do this, so I went to trying to edit the makefile (trying to learn). So I started with the makefile in the path `ubuntu-raring/Makefile`, which is the main make file; can be found under this link: http://pastebin.com/ms2WpQi7 And there I changed every `gcc` to `icc`, and every `g++` to `icpc`, and every `-O2` to `-O3`. The result is the following: http://pastebin.com/cSwTYJ9C I followed the instructions from this site, too: https://help.ubuntu.com/community/Kernel/Compile But eventually, I'm getting weird errors that seem to be caused by using `gcc`/`g++` rather than `icc`/`icpc`. For example, I got an error in the file `ubuntu-raring/include/linux/compiler-gcc.h` that some macros are already defined, while this file shouldn't be included in the first place! The macro that includes it is in the file `ubuntu-raring/include/linux/compiler.h`, and looks like:               #ifdef __GNUC__     #include <linux/compiler-gcc.h>     #endif          /* Intel compiler defines __GNUC__. So we will overwrite implementations      * coming from above header files here      */     #ifdef __INTEL_COMPILER     # include <linux/compiler-intel.h>     #endif      And while I don't understand the comment written above the Intel header (sounds weird... why would you define implementations then overwrite them? Never done that in C++!), removing the include of the `gcc` header manually solved the problem, but other problems came up, and I have no idea whether they're related. So now I'm confused! What did I do wrong? And should changing every `gcc` and `g++` in the Makefile be sufficient to use a different compiler? Or are there other things to be changed that I overlooked? Thank you for any efforts.


Zorin OS 6.3 installation hangs on "Preparing to Install"

I'm looking for help on installing Zorin OS 6.3 32bit. The program gets stuck on the "preparing to install" phase.    ![ss of error](http://i.stack.imgur.com/4722W.png) _original URL:http://imgur.com/PulGPMD_ I've tried loading it in both "Live System", and "Graphics Safe Mode". Both get stuck at the same screen. Alternatively, I've tried the "Load the Installer Directly", right after startup, but I only receive an error. It's being run side by side a no longer working version of Windows 7 x32bit. When I try to boot from my hard drive "Drive Read Error Press Ctrl+alt+delete to re- reload" appears. Not sure if that's relevant, but figured it might be.


convert single-page landscape pdf into rescaled double-page portrait pdf

I'm having trouble using `convert` to do the following: I have a bunch of single-page pdf files whose geometry corresponds to a landscape A4 sheet. The actual content is visually split in 2 pages. What I've been trying to do with each of these files, is basically: resize to A3, actually split vertically in the middle to get two pages (I've tried `convert`'s `crop` unsuccesfully), then re-assemble as a 2-page pdf file made of 2 A4 portrait-oriented pages. The final content should be the original content resized by a factor `sqrt(2)`               [  ] -> [    ]  ->  [ | ]             [    ]      [ | ]      A4       A3         2xA4     lands.   lands.     portrait      The whole purpose of this is to be able to print the resized content as 2 portrait A4 sheets instead of 1 landscape A4, but actually creating new pdf files would be better than printing directly, as they can then be reprinted anytime and shared with other people who'll then be able to print them directly as intended as well.


file, awk and iconv to automatically adapt tex-file encoding

I have a set of tex-files with mixed encodings, e.g. (subset of output of `file -i *.tex`)               f1.tex: text/plain; charset=utf-8     f2.tex: text/plain; charset=utf-8     f3.tex: text/x-tex; charset=us-ascii     f4.tex: text/plain; charset=iso-8859-1     f5.tex: text/plain; charset=us-ascii      I want to convert them all to `utf-8`, especially those encoded `iso-8859-1`. I can do this manually using (or similar)               iconv -f ISO-8859-1 -t UTF-8 f4.tex > tmp && mv tmp f4.tex      but I thought this would be nicely possible using a combination of `awk` with the above, i.e. running `file -i` parsing this for file/encoding combinations using `awk` and performing the encoding conversion accordingly using `iconv`. My knowledge of `awk` is rather limited. I got no further than this:               $ file -i *.tex | awk '{print $1, $3}'     f1.tex: charset=utf-8     f2.tex: charset=utf-8     f3.tex: charset=us-ascii     f4.tex: charset=iso-8859-1     f5.tex: charset=us-ascii      Any help appreciated! Especially, I don't know how I can strip the colon `:` and the `charset=` substrings off the columns.


How to create GUIs (such as menuconfig) with lxdialog

I try to generate a menuconfig by my own with the help of lxdialog (source: lxdialog). Unfortunately this is not so well documented as I wished for. Example: ![example menuconfig](http://i.stack.imgur.com/tW9MN.png) **So what I did** : I included these files (see source) into a new/empty project and did nothing else. As it seems that this is the _source_ of `lxdialog` I tried a quick shot by easily importing.I need to use a GUI, which is based on `.c`since I need the return values in a `C/C++` program - that's why I can't use the much more easier to develop `dialog`. I don't want to spent too much time on programming a new GUI that's why I think `lxdialog` fits my needs. **The error:** I get lots of errors with the message `Type XYZ could not be resolved`. I refreshed the Indexer a multiple times and I even excluded every `.c` from build, but without success. I already checked the whole library for the unresolved keywords but it seems that the places where these errors come from, is the place of the first occurrence of the keyword at all. Some of the messages:               [...]     Type 'chtype' could not be resolved dialog.h     Type 'WINDOW' could not be resolved dialog.h     [...]      **My question is** : obviousely I'm doing something wrong. Have I included to less files into my project or am I missing system wide libraries ? Does anyone know a tutorial to step into lxdialog or at least knows how to solve these erros? Thanks for your support Kind Regards


Limit Outgoing Bandwidth on an interface

I would like to know the easiest way to limit outgoing bandwidth for an interface. I want to cap the outgoing port speed so that file transfers between my servers don't fail during busy hours. What's the easiest solution? I know I could us `iptables` but I'm looking for a simple installation/configuration. Any suggestion would be great.


"mount -t TYPE /" - how to know that what could the "TYPE" be?

OS: ex.: Ubuntu 10.04 - how to know that what does the "mount -t TYPE" knows? I mean is there a command to list the supported filesystem types using with mount?? UPDATE: is the following cmd always good?:               cat /proc/filesystems | awk '{print $NF}' | sed '/^$/d'     sysfs     rootfs     bdev     proc     cgroup     cpuset     tmpfs     devtmpfs     debugfs     securityfs     sockfs     pipefs     anon_inodefs     inotifyfs     devpts     ext3     ext2     ext4     ramfs     hugetlbfs     ecryptfs     fuse     fuseblk     fusectl     mqueue     binfmt_misc     iso9660     vfat     udf     reiserfs     xfs     jfs     msdos     ntfs     minix     hfs     hfsplus     qnx4     ufs     btrfs


How to find which process is regularly writing to disk?

How can I find which process is constantly writing to disk? I like my workstation to be close to silent and I just build a new system (P8B75-M + Core i5 3450s -- the 's' because it has a lower max TDP) with quiet fans etc. and installed Debian Wheezy 64-bit on it. And something is getting on my nerve: I can hear some kind of pattern like if the hard disk was writing or seeking someting ( _tick...tick...tick...trrrrrr_ rinse and repeat every second or so). In the past I had a similar issue in the past (many, many years ago) and it turned out it was some CUPS log or something and I simply redirected that one (not important) logging to a (real) RAM disk. But here I'm not sure. I tried the following:               ls -lR /var/log > /tmp/a.tmp && sleep 5 && ls -lR /var/log > /tmp/b.tmp && diff /tmp/?.tmp      but nothing is changing there. Now the strange thing is that I also hear the pattern when the prompt asking me to enter my LVM decryption passphrase is showing. Could it be something in the kernel/system I just installed or do I have a faulty harddisk? `hdparm -tT /dev/sda` report a correct HD speed (130 GB/s non-cached, sata 6GB) and I've already installed and compiled from big sources (Emacs) without issue so I don't think the system is bad. (HD is a Seagate Barracude 500GB)


Is it possible to cache external binary in a shell script?

My question, might sounds a bit strange, but this morning I read this question:   Why is “echo” so much faster than “touch”?   I perfectly understand the concept of built-in function, but I wonder if you take the same example:               #!/bin/bash (or any other shell if it's possible in another)     for file in `find . -name "*.xml"`;     do         touch $file;      done      Is there any possibility of pre-loading `touch` so you don't need to fork it each time you use it and then become way quicker ?


500:Internal Server Error from CGI program

I am trying to write a CGI Program which is invoked from a HTML page . The CGI code snippet is as follows:                #!/bin/bash      echo "Content-type: text/html"      echo  ""      echo ""      echo "Hi"      echo ""      echo ""      But after executing the script I can see the `500:Internal Server Error` in browser page. . Following can be seen in error log file               [Wed Apr 09 18:36:59 2014] [error] [client 127.0.0.1] malformed header        from script. Bad header=: image.sh     [Wed Apr 09 18:37:14 2014] [error] [client 127.0.0.1] malformed header      from script. Bad header=: image.sh


locate with color

I used `locate` binary many time to search something on my 1TB HDD. Most of the time, I got many result and I have to read each line to get what exactly I'm looking for. It would be great if the `locate` can output the matched pattern with color ( just like grep --color) Is there any way to do so for `locate` command ?


Pipe doesn't read my forked script

I have a problem. I modified a script called 'packer' a AUR-helper for Arch Linux. The problem coming when I apply my pipe, with a progress bar, doesn't show all info as I need. This is my forked script from packer, the next line install a program from AUR               echo > /tmp/packer-url-tmp          packer-postinstallerf -S --noconfirm --noedit alchemy         tee /tmp/packer-url-tmp |        stdbuf -oL sed '/\.\.\.$/ s/^/#/p' |        zenity --progress --title="packer progress" --pulsate --width=450 --auto-close      The output without a pipe and progress bar: http://pastebin.com/m0srNWkJ The above line, work fine without AUR packages; but when I install a AUR program disappears the previous information (build process) to installation. I do not understand the pipe with the progress bar should show this information. Only show the pipe with               :: ¿Continuar con la instalación? [S/n]     (1/1) verificando llaves en el llavero             [######################] 100%     (1/1) verificando la integridad de los paquetes    [######################] 100%     (1/1) cargando los archivos del paquete...         [######################] 100%     (1/1) verificando conflictos entre archivos        [######################] 100%     (1/1) verificando el espacio disponible en disco   [######################] 100%     (1/1) instalando alchemy                           [######################] 100%     Dependencias opcionales para alchemy         jpen: for tablet support      Please if my question isn't clear, I updated my question. I do not know how to clarify my question more :/.


How can I get xrandr to detect both nvidia cards: 2 x GTX480, triple-head?

* I am running Linux Mint 16 (Petra)   * I am running the default driver nvidia-319 shipped with the distro   * I have 2x GTX480 cards   * I have 3 monitors   * Using the Nvidia driver, all monitors and GPUs are picked up by the proprietary utility. However, similarly to the report at https://devtalk.nvidia.com/default/topic/719768/linux/304-121-ubuntu-14-04-xrandr-1-4-multi- gpu-not-being-detected/ when I run xrandr --listproviders I am only shown a single provider -- the first card. I have xrandr 1.4, so should be able to see both. If I set up a separate X screen and then do xrandr --listproviders --screen 1, I can see the second card. However, I do not want multiple X screens; I want to be able to seamlessly flow between monitors. I do not want to run xinerama as it is a pain in the neck to setup and should be superseded by xrandr. Using the nouveau driver I can use all three screens exactly as I would like, but the performance is not good. So, I have a few questions: 1.) Is this behaviour by design or a bug? I note at http://uk.download.nvidia.com/XFree86/Linux-x86/319.12/README/randr14.html that the driver only supports the Source Output capability; would that stop me just seeing two different card providers in xrandr? 2.) If the former is true, is there a way that I can work around this? 3.) I've played around with various basemosaic options, to no avail The last configuration I tried was:               Section "ServerLayout"         Identifier     "Layout0"         Screen      0  "Screen0"     EndSection          Section "Monitor"              # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor1"         VendorName     "Unknown"         ModelName      "Ancor Communications Inc ASUS VS247"         HorizSync       24.0 - 83.0         VertRefresh     50.0 - 75.0         Option         "DPMS"     EndSection          Section "Monitor"              # HorizSync source: edid, VertRefresh source: edid         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "LG Electronics W2243"         HorizSync       30.0 - 83.0         VertRefresh     56.0 - 75.0         Option         "DPMS"     EndSection          Section "Monitor"              # HorizSync source: unknown, VertRefresh source: unknown         Identifier     "Monitor2"         VendorName     "Unknown"         ModelName      "AOC LM720/LM720A"         HorizSync       30.0 - 83.0         VertRefresh     55.0 - 75.0         Option         "DPMS"     EndSection          Section "Device"         Identifier     "Device1"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GTX 480"         BusID          "PCI:1:0:0"     EndSection          Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GTX 480"         BusID          "PCI:1:0:0"     EndSection          Section "Device"         Identifier     "Device2"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GTX 480"         BusID          "PCI:2:0:0"     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"                DefaultDepth    24         Option         "Stereo" "0"         Option         "BaseMosaic" "True"         Option         "MetaModes" "GPU-1.CRT-0: 1280x1024+0+0, GPU-0.CRT-0: 1920x1080+1280+0, GPU-0.DFP-2: 1920x1080+3200+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen1"         Device         "Device1"         Monitor        "Monitor1"                DefaultDepth    24         Option         "Stereo" "0"         Option         "BaseMosaic" "True"         Option         "MetaModes" "GPU-1.CRT-0: 1280x1024+0+0, GPU-0.CRT-0: 1920x1080+1280+0, GPU-0.DFP-2: 1920x1080+3200+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen2"         Device         "Device2"         Monitor        "Monitor2"                DefaultDepth    24         Option         "Stereo" "0"         Option         "BaseMosaic" "True"         Option         "MetaModes" "GPU-1.CRT-0: 1280x1024+0+0, GPU-0.CRT-0: 1920x1080+1280+0, GPU-0.DFP-2: 1920x1080+3200+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection      The X log when running with no config is:               [     6.896]      X.Org X Server 1.14.5     Release Date: 2013-12-12     [     6.896] X Protocol Version 11, Revision 0     [     6.896] Build Operating System: Linux 3.2.0-37-generic x86_64 Ubuntu     [     6.896] Current Operating System: Linux theoria 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64     [     6.896] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-12-generic root=UUID=3a6b3275-5e15-40c7-8de6-9eea1c63ebe1 ro quiet splash acpi_enforce_resources=lax     [     6.896] Build Date: 17 December 2013  10:06:15AM     [     6.896] xorg-server 2:1.14.5-1ubuntu2~saucy1 (For technical support please see http://www.ubuntu.com/support)      [     6.896] Current version of pixman: 0.30.2     [     6.896]    Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     [     6.896] Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [     6.896] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Apr  9 07:12:33 2014     [     6.897] (==) Using system config directory "/usr/share/X11/xorg.conf.d"     [     6.897] (==) No Layout section.  Using the first Screen section.     [     6.897] (==) No screen section available. Using defaults.     [     6.897] (**) |-->Screen "Default Screen Section" (0)     [     6.897] (**) |   |-->Monitor "<default monitor>"     [     6.898] (==) No monitor specified for screen "Default Screen Section".         Using a default monitor configuration.     [     6.899] (==) FontPath set to:         /usr/share/fonts/X11/misc,         /usr/share/fonts/X11/Type1,         built-ins     [     6.899] (==) ModulePath set to "/usr/lib/x86_64-linux-gnu/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"     [     6.899] (II) The server relies on udev to provide the list of input devices.         If no devices become available, reconfigure udev or disable AutoAddDevices.     [     6.899] (II) Loader magic: 0x7fe4b0739d20     [     6.899] (II) Module ABI versions:     [     6.899]    X.Org ANSI C Emulation: 0.4     [     6.899]    X.Org Video Driver: 14.1     [     6.899]    X.Org XInput driver : 19.1     [     6.899]    X.Org Server Extension : 7.0     [     6.900] (II) xfree86: Adding drm device (/dev/dri/card0)     [     6.900] (II) xfree86: Adding drm device (/dev/dri/card1)     [     6.901] (--) PCI:*(0:1:0:0) 10de:06c0:10de:075f rev 163, Mem @ 0xf4000000/33554432, 0xe0000000/134217728, 0xe8000000/67108864, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288     [     6.901] (--) PCI: (0:2:0:0) 10de:06c0:10de:075f rev 163, Mem @ 0xf0000000/33554432, 0xd0000000/134217728, 0xd8000000/67108864, I/O @ 0x0000d000/128, BIOS @ 0x????????/524288     [     6.901] (II) Open ACPI successful (/var/run/acpid.socket)     [     6.901] Initializing built-in extension Generic Event Extension     [     6.901] Initializing built-in extension SHAPE     [     6.901] Initializing built-in extension MIT-SHM     [     6.901] Initializing built-in extension XInputExtension     [     6.901] Initializing built-in extension XTEST     [     6.901] Initializing built-in extension BIG-REQUESTS     [     6.901] Initializing built-in extension SYNC     [     6.901] Initializing built-in extension XKEYBOARD     [     6.901] Initializing built-in extension XC-MISC     [     6.901] Initializing built-in extension SECURITY     [     6.901] Initializing built-in extension XINERAMA     [     6.901] Initializing built-in extension XFIXES     [     6.901] Initializing built-in extension RENDER     [     6.901] Initializing built-in extension RANDR     [     6.901] Initializing built-in extension COMPOSITE     [     6.901] Initializing built-in extension DAMAGE     [     6.901] Initializing built-in extension MIT-SCREEN-SAVER     [     6.901] Initializing built-in extension DOUBLE-BUFFER     [     6.901] Initializing built-in extension RECORD     [     6.901] Initializing built-in extension DPMS     [     6.901] Initializing built-in extension X-Resource     [     6.901] Initializing built-in extension XVideo     [     6.901] Initializing built-in extension XVideo-MotionCompensation     [     6.901] Initializing built-in extension SELinux     [     6.901] Initializing built-in extension XFree86-VidModeExtension     [     6.901] Initializing built-in extension XFree86-DGA     [     6.901] Initializing built-in extension XFree86-DRI     [     6.901] Initializing built-in extension DRI2     [     6.901] (II) "glx" will be loaded by default.     [     6.901] (WW) "xmir" is not to be loaded by default. Skipping.     [     6.901] (II) LoadModule: "dri2"     [     6.901] (II) Module "dri2" already built-in     [     6.901] (II) LoadModule: "glamoregl"     [     6.903] (II) Loading /usr/lib/xorg/modules/libglamoregl.so     [     6.964] (II) Module glamoregl: vendor="X.Org Foundation"     [     6.964]    compiled for 1.14.3, module version = 0.5.1     [     6.964]    ABI class: X.Org ANSI C Emulation, version 0.4     [     6.964] (II) LoadModule: "glx"     [     6.964] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/libglx.so     [     6.993] (II) Module glx: vendor="NVIDIA Corporation"     [     6.993]    compiled for 4.0.2, module version = 1.0.0     [     6.993]    Module class: X.Org Server Extension     [     6.993] (II) NVIDIA GLX Module  319.60  Wed Sep 25 14:24:11 PDT 2013     [     6.993] Loading extension GLX     [     6.993] (==) Matched nvidia as autoconfigured driver 0     [     6.993] (==) Matched nouveau as autoconfigured driver 1     [     6.993] (==) Matched nvidia as autoconfigured driver 2     [     6.993] (==) Matched nouveau as autoconfigured driver 3     [     6.993] (==) Matched nvidia as autoconfigured driver 4     [     6.993] (==) Matched nouveau as autoconfigured driver 5     [     6.993] (==) Matched vesa as autoconfigured driver 6     [     6.993] (==) Matched modesetting as autoconfigured driver 7     [     6.993] (==) Matched fbdev as autoconfigured driver 8     [     6.993] (==) Assigned the driver to the xf86ConfigLayout     [     6.993] (II) LoadModule: "nvidia"     [     6.994] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so     [     7.001] (II) Module nvidia: vendor="NVIDIA Corporation"     [     7.001]    compiled for 4.0.2, module version = 1.0.0     [     7.001]    Module class: X.Org Video Driver     [     7.002] (II) LoadModule: "nouveau"     [     7.002] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so     [     7.004] (II) Module nouveau: vendor="X.Org Foundation"     [     7.004]    compiled for 1.14.2.901, module version = 1.0.9     [     7.004]    Module class: X.Org Video Driver     [     7.004]    ABI class: X.Org Video Driver, version 14.1     [     7.004] (II) LoadModule: "vesa"     [     7.004] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so     [     7.005] (II) Module vesa: vendor="X.Org Foundation"     [     7.005]    compiled for 1.14.1, module version = 2.3.2     [     7.005]    Module class: X.Org Video Driver     [     7.005]    ABI class: X.Org Video Driver, version 14.1     [     7.005] (II) LoadModule: "modesetting"     [     7.005] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so     [     7.006] (II) Module modesetting: vendor="X.Org Foundation"     [     7.006]    compiled for 1.14.1, module version = 0.8.0     [     7.006]    Module class: X.Org Video Driver     [     7.006]    ABI class: X.Org Video Driver, version 14.1     [     7.006] (II) LoadModule: "fbdev"     [     7.006] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so     [     7.007] (II) Module fbdev: vendor="X.Org Foundation"     [     7.007]    compiled for 1.14.1, module version = 0.4.3     [     7.007]    Module class: X.Org Video Driver     [     7.007]    ABI class: X.Org Video Driver, version 14.1     [     7.007] (II) NVIDIA dlloader X Driver  319.60  Wed Sep 25 14:04:14 PDT 2013     [     7.007] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs     [     7.007] (II) NOUVEAU driver Date:   Wed Jul 31 10:51:03 2013 +1000     [     7.007] (II) NOUVEAU driver for NVIDIA chipset families :     [     7.007]    RIVA TNT        (NV04)     [     7.007]    RIVA TNT2       (NV05)     [     7.007]    GeForce 256     (NV10)     [     7.007]    GeForce 2       (NV11, NV15)     [     7.007]    GeForce 4MX     (NV17, NV18)     [     7.007]    GeForce 3       (NV20)     [     7.007]    GeForce 4Ti     (NV25, NV28)     [     7.007]    GeForce FX      (NV3x)     [     7.008]    GeForce 6       (NV4x)     [     7.008]    GeForce 7       (G7x)     [     7.008]    GeForce 8       (G8x)     [     7.008]    GeForce GTX 200 (NVA0)     [     7.008]    GeForce GTX 400 (NVC0)     [     7.008] (II) VESA: driver for VESA chipsets: vesa     [     7.008] (II) modesetting: Driver for Modesetting Kernel Drivers: kms     [     7.008] (II) FBDEV: driver for framebuffer: fbdev     [     7.008] (++) using VT number 7          [     7.021] (II) Loading sub module "fb"     [     7.021] (II) LoadModule: "fb"     [     7.021] (II) Loading /usr/lib/xorg/modules/libfb.so     [     7.022] (II) Module fb: vendor="X.Org Foundation"     [     7.022]    compiled for 1.14.5, module version = 1.0.0     [     7.022]    ABI class: X.Org ANSI C Emulation, version 0.4     [     7.022] (WW) Unresolved symbol: fbGetGCPrivateKey     [     7.022] (II) Loading sub module "wfb"     [     7.022] (II) LoadModule: "wfb"     [     7.022] (II) Loading /usr/lib/xorg/modules/libwfb.so     [     7.024] (II) Module wfb: vendor="X.Org Foundation"     [     7.024]    compiled for 1.14.5, module version = 1.0.0     [     7.024]    ABI class: X.Org ANSI C Emulation, version 0.4     [     7.024] (II) Loading sub module "shadow"     [     7.024] (II) LoadModule: "shadow"     [     7.024] (II) Loading /usr/lib/xorg/modules/libshadow.so     [     7.025] (II) Module shadow: vendor="X.Org Foundation"     [     7.025]    compiled for 1.14.5, module version = 1.1.0     [     7.025]    ABI class: X.Org ANSI C Emulation, version 0.4     [     7.025] (II) Loading sub module "ramdac"     [     7.025] (II) LoadModule: "ramdac"     [     7.025] (II) Module "ramdac" already built-in     [     7.026] (EE) [drm] KMS not enabled     [     7.026] (WW) Falling back to old probe method for vesa     [     7.026] (WW) Falling back to old probe method for modesetting     [     7.026] (WW) Falling back to old probe method for fbdev     [     7.026] (II) Loading sub module "fbdevhw"     [     7.026] (II) LoadModule: "fbdevhw"     [     7.026] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so     [     7.027] (II) Module fbdevhw: vendor="X.Org Foundation"     [     7.027]    compiled for 1.14.5, module version = 0.0.2     [     7.027]    ABI class: X.Org Video Driver, version 14.1     [     7.027] (EE) open /dev/fb0: No such file or directory     [     7.027] (II) NVIDIA(0): Creating default Display subsection in Screen section         "Default Screen Section" for depth/fbbpp 24/32     [     7.027] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32     [     7.027] (==) NVIDIA(0): RGB weight 888     [     7.027] (==) NVIDIA(0): Default visual is TrueColor     [     7.027] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)     [     7.027] (**) NVIDIA(0): Enabling 2D acceleration     [     7.627] (II) NVIDIA(GPU-0): Display (LG Electronics W2243 (CRT-0)) does not support NVIDIA     [     7.627] (II) NVIDIA(GPU-0):     3D Vision stereo.     [     7.656] (II) NVIDIA(GPU-0): Display (Ancor Communications Inc ASUS VS247 (DFP-2)) does not     [     7.656] (II) NVIDIA(GPU-0):     support NVIDIA 3D Vision stereo.     [     7.657] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 480 (GF100) at PCI:1:0:0 (GPU-0)     [     7.657] (--) NVIDIA(0): Memory: 1572864 kBytes     [     7.657] (--) NVIDIA(0): VideoBIOS: 70.00.21.00.02     [     7.657] (II) NVIDIA(0): Detected PCI Express Link width: 16X     [     7.659] (--) NVIDIA(0): Valid display device(s) on GeForce GTX 480 at PCI:1:0:0     [     7.659] (--) NVIDIA(0):     LG Electronics W2243 (CRT-0) (boot, connected)     [     7.659] (--) NVIDIA(0):     CRT-1     [     7.659] (--) NVIDIA(0):     DFP-0     [     7.659] (--) NVIDIA(0):     DFP-1     [     7.659] (--) NVIDIA(0):     Ancor Communications Inc ASUS VS247 (DFP-2) (connected)     [     7.659] (--) NVIDIA(0): LG Electronics W2243 (CRT-0): 400.0 MHz maximum pixel clock     [     7.659] (--) NVIDIA(0): CRT-1: 400.0 MHz maximum pixel clock     [     7.659] (--) NVIDIA(0): DFP-0: 330.0 MHz maximum pixel clock     [     7.659] (--) NVIDIA(0): DFP-0: Internal Single Link TMDS     [     7.659] (--) NVIDIA(0): DFP-1: 165.0 MHz maximum pixel clock     [     7.659] (--) NVIDIA(0): DFP-1: Internal Single Link TMDS     [     7.659] (--) NVIDIA(0): Ancor Communications Inc ASUS VS247 (DFP-2): 330.0 MHz maximum pixel clock     [     7.659] (--) NVIDIA(0): Ancor Communications Inc ASUS VS247 (DFP-2): Internal Dual Link TMDS     [     7.659] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [     7.659] (**) NVIDIA(0):     device LG Electronics W2243 (CRT-0) (Using EDID     [     7.659] (**) NVIDIA(0):     frequencies has been enabled on all display devices.)     [     7.659] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [     7.660] (**) NVIDIA(0):     device Ancor Communications Inc ASUS VS247 (DFP-2) (Using     [     7.660] (**) NVIDIA(0):     EDID frequencies has been enabled on all display     [     7.660] (**) NVIDIA(0):     devices.)     [     7.661] (==) NVIDIA(0):      [     7.661] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"     [     7.661] (==) NVIDIA(0):     will be used as the requested mode.     [     7.661] (==) NVIDIA(0):      [     7.661] (II) NVIDIA(0): Validated MetaModes:     [     7.661] (II) NVIDIA(0):     "CRT-0:nvidia-auto-select{},DFP-2:nvidia-auto-select{}"     [     7.661] (II) NVIDIA(0): Virtual screen size determined to be 3840 x 1080     [     7.681] (--) NVIDIA(0): DPI set to (101, 101); computed from "UseEdidDpi" X config     [     7.681] (--) NVIDIA(0):     option     [     7.681] (II) UnloadModule: "vesa"     [     7.681] (II) Unloading vesa     [     7.681] (II) UnloadModule: "fbdev"     [     7.681] (II) Unloading fbdev     [     7.681] (II) UnloadSubModule: "fbdevhw"     [     7.681] (II) Unloading fbdevhw     [     7.681] (--) Depth 24 pixmap format is 32 bpp     [     8.500] (II) NVIDIA(GPU-1): Found DRM driver nvidia-drm (20130102)     [     8.571] (II) NVIDIA(GPU-1): Display (AOC LM720/LM720A (CRT-0)) does not support NVIDIA 3D     [     8.571] (II) NVIDIA(GPU-1):     Vision stereo.     [     8.575] (II) NVIDIA(GPU-1): NVIDIA GPU GeForce GTX 480 (GF100) at PCI:2:0:0 (GPU-1)     [     8.575] (--) NVIDIA(GPU-1): Memory: 1572864 kBytes     [     8.575] (--) NVIDIA(GPU-1): VideoBIOS: 70.00.21.00.02     [     8.575] (II) NVIDIA(GPU-1): Detected PCI Express Link width: 16X     [     8.575] (--) NVIDIA(GPU-1): Valid display device(s) on GeForce GTX 480 at PCI:2:0:0     [     8.575] (--) NVIDIA(GPU-1):     AOC LM720/LM720A (CRT-0) (boot, connected)     [     8.575] (--) NVIDIA(GPU-1):     CRT-1     [     8.575] (--) NVIDIA(GPU-1):     DFP-0     [     8.575] (--) NVIDIA(GPU-1):     DFP-1     [     8.575] (--) NVIDIA(GPU-1):     DFP-2     [     8.575] (--) NVIDIA(GPU-1): AOC LM720/LM720A (CRT-0): 400.0 MHz maximum pixel clock     [     8.575] (--) NVIDIA(GPU-1): CRT-1: 400.0 MHz maximum pixel clock     [     8.575] (--) NVIDIA(GPU-1): DFP-0: 330.0 MHz maximum pixel clock     [     8.575] (--) NVIDIA(GPU-1): DFP-0: Internal Single Link TMDS     [     8.575] (--) NVIDIA(GPU-1): DFP-1: 165.0 MHz maximum pixel clock     [     8.575] (--) NVIDIA(GPU-1): DFP-1: Internal Single Link TMDS     [     8.575] (--) NVIDIA(GPU-1): DFP-2: 330.0 MHz maximum pixel clock     [     8.575] (--) NVIDIA(GPU-1): DFP-2: Internal Single Link TMDS     [     8.575] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory     [     8.575] (II) NVIDIA:     access.     [     8.579] (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select{},DFP-2:nvidia-auto-select{}"     [     8.662] Loading extension NV-GLX     [     8.755] (==) NVIDIA(0): Disabling shared memory pixmaps     [     8.755] (==) NVIDIA(0): Backing store disabled     [     8.755] (==) NVIDIA(0): Silken mouse enabled     [     8.755] (==) NVIDIA(0): DPMS enabled     [     8.756] Loading extension NV-CONTROL     [     8.756] Loading extension XINERAMA     [     8.756] (II) Loading sub module "dri2"     [     8.756] (II) LoadModule: "dri2"     [     8.756] (II) Module "dri2" already built-in     [     8.756] (II) NVIDIA(0): [DRI2] Setup complete     [     8.756] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia     [     8.756] (--) RandR disabled     [     8.759] (II) SELinux: Disabled on system     [     8.759] (II) Initializing extension GLX     [     8.771] (II) XKB: reuse xkmfile /var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm     [     8.776] (II) config/udev: Adding drm device (/dev/dri/card0)     [     8.776] (II) config/udev: Ignoring already known drm device (/dev/dri/card0)     [   666.012] (II) NVIDIA(GPU-0): Display (LG Electronics W2243 (CRT-0)) does not support NVIDIA     [   666.012] (II) NVIDIA(GPU-0):     3D Vision stereo.     [   666.012] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   666.012] (**) NVIDIA(0):     device LG Electronics W2243 (CRT-0) (Using EDID     [   666.012] (**) NVIDIA(0):     frequencies has been enabled on all display devices.)     [   666.043] (II) NVIDIA(GPU-0): Display (Ancor Communications Inc ASUS VS247 (DFP-2)) does not     [   666.043] (II) NVIDIA(GPU-0):     support NVIDIA 3D Vision stereo.     [   666.043] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   666.043] (**) NVIDIA(0):     device Ancor Communications Inc ASUS VS247 (DFP-2) (Using     [   666.043] (**) NVIDIA(0):     EDID frequencies has been enabled on all display     [   666.043] (**) NVIDIA(0):     devices.)     [   666.204] (II) NVIDIA(0): Setting mode "DVI-I-0: nvidia-auto-select @1920x1080 +1920+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DVI-I-3: nvidia-auto-select @1920x1080 +1920+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}"     [   666.236] (II) NVIDIA(0): Setting mode "DVI-I-0: nvidia-auto-select @1920x1080 +1920+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DVI-I-3: nvidia-auto-select @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}"     [   666.345] (II) NVIDIA(GPU-0): Display (LG Electronics W2243 (CRT-0)) does not support NVIDIA     [   666.345] (II) NVIDIA(GPU-0):     3D Vision stereo.     [   666.345] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   666.345] (**) NVIDIA(0):     device LG Electronics W2243 (CRT-0) (Using EDID     [   666.345] (**) NVIDIA(0):     frequencies has been enabled on all display devices.)     [   666.376] (II) NVIDIA(GPU-0): Display (Ancor Communications Inc ASUS VS247 (DFP-2)) does not     [   666.376] (II) NVIDIA(GPU-0):     support NVIDIA 3D Vision stereo.     [   666.376] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   666.376] (**) NVIDIA(0):     device Ancor Communications Inc ASUS VS247 (DFP-2) (Using     [   666.376] (**) NVIDIA(0):     EDID frequencies has been enabled on all display     [   666.376] (**) NVIDIA(0):     devices.)     [   667.413] (II) NVIDIA(GPU-0): Display (LG Electronics W2243 (CRT-0)) does not support NVIDIA     [   667.413] (II) NVIDIA(GPU-0):     3D Vision stereo.     [   667.413] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   667.413] (**) NVIDIA(0):     device LG Electronics W2243 (CRT-0) (Using EDID     [   667.413] (**) NVIDIA(0):     frequencies has been enabled on all display devices.)     [   667.444] (II) NVIDIA(GPU-0): Display (Ancor Communications Inc ASUS VS247 (DFP-2)) does not     [   667.444] (II) NVIDIA(GPU-0):     support NVIDIA 3D Vision stereo.     [   667.444] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   667.444] (**) NVIDIA(0):     device Ancor Communications Inc ASUS VS247 (DFP-2) (Using     [   667.444] (**) NVIDIA(0):     EDID frequencies has been enabled on all display     [   667.444] (**) NVIDIA(0):     devices.)     [   667.560] (II) XKB: reuse xkmfile /var/lib/xkb/server-7996F6726817F73651B9DE0FDA11E35FC4524568.xkm     [   667.568] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.724] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.727] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.730] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.733] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.736] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.739] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   668.742] (II) XKB: reuse xkmfile /var/lib/xkb/server-14B7503D830F6433941F279130885A2D664E08AA.xkm     [   687.505] (II) NVIDIA(GPU-0): Display (LG Electronics W2243 (CRT-0)) does not support NVIDIA     [   687.505] (II) NVIDIA(GPU-0):     3D Vision stereo.     [   687.505] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   687.505] (**) NVIDIA(0):     device LG Electronics W2243 (CRT-0) (Using EDID     [   687.505] (**) NVIDIA(0):     frequencies has been enabled on all display devices.)     [   687.536] (II) NVIDIA(GPU-0): Display (Ancor Communications Inc ASUS VS247 (DFP-2)) does not     [   687.536] (II) NVIDIA(GPU-0):     support NVIDIA 3D Vision stereo.     [   687.536] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display     [   687.536] (**) NVIDIA(0):     device Ancor Communications Inc ASUS VS247 (DFP-2) (Using     [   687.536] (**) NVIDIA(0):     EDID frequencies has been enabled on all display     [   687.536] (**) NVIDIA(0):     devices.)     [  1212.601] (II) evdev: Eee PC WMI hotkeys: Close     [  1212.601] (II) UnloadModule: "evdev"     [  1212.601] (II) evdev: USB USB Keykoard: Close     [  1212.601] (II) UnloadModule: "evdev"     [  1212.601] (II) evdev: USB USB Keykoard: Close     [  1212.601] (II) UnloadModule: "evdev"     [  1212.601] (II) evdev: Microsoft Microsoft 5-Button Mouse with IntelliEye(TM): Close     [  1212.601] (II) UnloadModule: "evdev"     [  1212.601] (II) evdev: Power Button: Close     [  1212.601] (II) UnloadModule: "evdev"     [  1212.601] (II) evdev: Power Button: Close     [  1212.601] (II) UnloadModule: "evdev"     [  1212.860] (EE) Server terminated successfully (0). Closing log file.      Any help would be very much appreciated.


CPU stuck at 99% for a few hours. Really need help figuring out logs

extract from `syslog`:               CRON[pid]: (user) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -     execdir fuser -s {} 2>/dev/null \; -delete) My CPU has been stuck at 99% for a few hours now, and I'm assuming it's because of this. Would anyone happen to know what this is, how it started and how to stop it? EDIT: I tried `top -n1` and I see this in return multiple times:               PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND       PID user      20   0     0    0    0 Z 99.9  0.0   0:00.00 fuser <defunct>      this line repeats about 8 times. EDIT2:               uname-a:          user SMP Tue Feb 14 13:27:41 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux`     lsb_release -a:     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 11.10     Release:    11.10     Codename:   code EDIT 3: After reboot, the system went back to the same `99% cpu usage` and the same `top -n1` result.


Is it possible to represent the +X symbolic permission with an octal value? The chmod(1) man page says: > execute/search only if the file is a directory or already has execute > permission for some user which means that `chmod -R g+X` will add the group execute permission only if there's already an execute bit set for user, group, or other. You could certainly do this the hard way with find:               find . -perm /ugo=x -exec chmod g+x {} \;      However, it's not obvious how one could do the same thing with an octal mode without using _find_ or _test_ to check the file permissions first. Is this possible, or are there some areas where symbolic and octal permissions just don't overlap?


Installing php5-mcrypt for phpmyadmin

I am trying to install phpmyadmin on a server. Unfortunately, I get the following error:               Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      phpmyadmin : Depends: php5-mcrypt but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      And here is the output when I try to install php5-mcrypt:               Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      php5-mcrypt : Depends: phpapi-20100525                    Depends: php5-common (= 5.4.17-5+debphp.org~precise+1) but 5.5.0-1ubuntu2~raring2~precise1 is to be installed     E: Unable to correct problems, you have held broken packages.      I tried (tentatively) following the directions on this site, but I really cannot break anything on this server. My question has a number of parts: First, what exactly does the `Depends:` information mean? When it say `= 5.4.17` etc, do I need exactly that version? Second, how do I ensure that if I mess something up, I can "rollback" to a previous state? How likely is that? I have the packages `php5` and `apache2` on `hold` just in case, but I think I should also save the config files. Is this the case? Are there specific config files I should back up? Finally, how do I actually fix this problem? What (safe) steps should I take to get phpmyadmin installed? UPDATES: I should note that I only have a command line available to me. The output of `apt-cache policy php5-common` is:               php5-common:       Installed: 5.5.0-1ubuntu2~raring2~precise1       Candidate: 5.5.0-1ubuntu2~raring2~precise1       Version table:      *** 5.5.0-1ubuntu2~raring2~precise1 0             500 http://ppa.launchpad.net/zanfur/php5.5/ubuntu/ precise/main amd64 Packages             100 /var/lib/dpkg/status          5.4.17-5+debphp.org~precise+1 0             500 http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/ precise/main amd64 Packages          5.3.10-1ubuntu3.7 0             500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages             500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages          5.3.10-1ubuntu3 0             500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages


Persistent script to check if my webserver work with low budget vps?

I have a low budget vps and they constantly change a lot and my webserver is often unable to reach. Is there a shell script that is persistent and can check my webserver is running and if not make it running and it survive a reboot?


How do I select files in a bash script that do not have an extension?

Let's say I have files xinitrc, alphabetsoup, ieat.pie in the current directory. Need a bash script to select only xinitrc and alphabetsoup.


I've just deleted my /usr/share/X11/xkb/symbols directory and restarted, how come I can still type?

I'm running Linux Mint and I'm trying to edit my symbol files but none of the changes stick - I've tried restarting X and restarting the computer. Eventually I got frustrated and tried deleting the symbols directory (well, moving it to the parent directory), and if that had made a difference I'd revert the change using a TTY. I restarted the computer but I can still type - why is that? More information: the only directories I have found relating to xkb (I used `locate xkb`), are those in `/usr/share/X11/xkb` and its subdirectories, and so these are the files I've been editing.


How to check drive temperature on Linux?

I have used of `hdparm -n` and `smartctl -A` but it always seem to be a "per drive" technique as a drive may answer for only one of these tools. So, is there a standard way to get the drive temperature on Linux (HDD or SSD)? If not, what (other) tools can I use to get this information?


what is the differences between Wayland and X?

I was woundering about how people says that X is old... And need a new display sever but how the differences lies? Like how they work.   * _Need to add tag display-sever_ but I don't have enough rep to do so.


How to remove unmet dependecies Debian 7 Wheezy

I'm trying to install different packages but it's showing unmet dependencies in most of them even after `sudo apt-get -f install`. Below is my `/etc/apt/sources.list` file:               #           # deb-src cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official Multi-architecture i386/amd64/source DVD #1 20130615-23:45]/ wheezy main     # deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official Multi-architecture i386/amd64/source DVD #1 20130615-23:45]/ wheezy main     #           #deb-src cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official Multi-architecture i386/amd64/source DVD #1 20130615-23:45]/ wheezy main          #deb cdrom:[Debian GNU/Linux 7.1.0 _Wheezy_ - Official Multi-architecture i386/amd64/source DVD #1 20130615-23:45]/ wheezy main     #deb http://ftp.debian.org/debian/ squeeze main contrib non-free     #deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free     ##################     ## Debian Stable  ##     ##################     # Stable     deb http://http.us.debian.org/debian/ squeeze main contrib non-free     # Stable Sources     deb-src http://http.us.debian.org/debian/ squeeze main contrib non-free          # Security Updates  http://www.debian.org/security/     deb http://security.debian.org/ squeeze/updates main contrib non-free          deb http://security.debian.org/ wheezy/updates main     deb-src http://security.debian.org/ wheezy/updates main          # wheezy-updates, previously known as 'volatile'     # A network mirror was not selected during install.  The following entries     # are provided as examples, but you should amend them as appropriate     # for your mirror of choice.     #     deb http://ftp.debian.org/debian/ wheezy-updates main     deb-src http://ftp.debian.org/debian/ wheezy-updates main


Interrupting very long output in tmux

In a (gnome) terminal, if I `cat` a file which turns out to be much too long, I can always press `Ctrl`-`c` to interrupt. However, in `tmux`, when the same happens, it takes long for the signal produced by the `Ctrl`-`c` keypress to reach the server, and until that happens, the server is busy with this output, and I'm unable to do anything but watching the flood (or using a different terminal). This is somewhat similar to the problem described here. I do not wish to restart the terminal, the server, or even the specific `tmux` window/pane; using `less` is a smart habit, but I'm asking here about how to solve problems that already occured, not how to be smart and avoiding them by thinking before acting... there will always be surprises! So, is there a way to let the terminal stop the floods, discard the sent data, etc.? Anything I can do to release myself from these annoying _minutes_ of watching characters on my screen?


How do I resolve samba share to IP address or host name

I have a list of hosts in the network providing shares via SAMBA. How can I determine either IP address or the host name of one particular host, e.g. the one with the name “SASAK02”. The output of `smbtree` is as follows               WORKGROUP         \\SASAK02                        \\SAURA-PC1                      \\PC-VAN-DAMME


Detecting whether a server is loaded

I have to start some performance test on a Rhel 6 box, but before starting the test, i have to make sure there are no other java processes running. The manual way of doing it would be to use `"ps -ef | grep java"` But, since this test is going to be automated, i need a way to programmatically detect it and kill all of them. Is there some way of doing it?


Need to grep file with specific letter and move to another folder linux

I need to select files which contain "Error" or "traffic" in their names, e.g.               abc_ERRor.csv     raError.csv     bsn_Error.csv     bbbctraffic.csv     ccc_traffic.csv     ...      and move them into corresponding directories like `Error_directory` and `traffic_directory` according to their names. I tried this but it didnt work               mv $(ls test_file | grep -l 'Error>' *) Error_directory      How can I do this with a `bash` command?               ls test_file | grep 'Error'


su-to-root fails when root user locked?

How might I use script `/usr/bin/su-to-root` after I have intentionally locked the root account? Running Debian GNU/Linux 6.0.5 "squeeze" and noticed menu item "System > Administration > Synaptic Package Manager" has default command:               su-to-root -X -c /usr/sbin/synaptic      which fails even though I provide the correct root password. I have locked the root account (via command `sudo passwd -l root`) after granting my normal user sudo access via file /etc/sudoers. Via the su-to-root man page, I tried modifying the command to use a specific user:               su-to-root -X -p "user" -c /usr/sbin/synaptic      but this did not seem to work. In both cases, after three failed authentications, I receive message: > "Starting without administrative privileges. You will not be able to apply > any changes. But you can still export the marked changes or create a > download script for Any ideas? Traces of the script:               k@bucket:/tmp$ bash -x /tmp/su-to-root -X -c /usr/sbin/synaptic     + test -r /etc/su-to-rootrc     + test -r /home/k/.su-to-rootrc     + PRIV=root     + COMMAND=     + NEEDS=text     ++ which gettext     + gettext=/usr/bin/gettext     + for i in '"$@"'     + case "$prev" in     + prev=-X     + for i in '"$@"'     + case "$prev" in     + NEEDS=X11     + prev=-c     + for i in '"$@"'     + case "$prev" in     + COMMAND=/usr/sbin/synaptic     + prev=/usr/sbin/synaptic     + '[' -z /usr/sbin/synaptic ']'     ++ id -u     + euid=1000     ++ id -u root     + privid=0     + test 1000 = 0     + case $NEEDS in     + test -z ''     + which gksu     + SU_TO_ROOT_X=gksu     + test X = Xtrue     + case $SU_TO_ROOT_X in     + gksu -u root /usr/sbin/synaptic     k@bucket:/tmp$       and               k@bucket:/tmp$ bash -x /tmp/su-to-root -X -p k -c /usr/sbin/synaptic     + test -r /etc/su-to-rootrc     + test -r /home/k/.su-to-rootrc     + PRIV=root     + COMMAND=     + NEEDS=text     ++ which gettext     + gettext=/usr/bin/gettext     + for i in '"$@"'     + case "$prev" in     + prev=-X     + for i in '"$@"'     + case "$prev" in     + NEEDS=X11     + prev=-p     + for i in '"$@"'     + case "$prev" in     + PRIV=k     + prev=k     + for i in '"$@"'     + case "$prev" in     + prev=-c     + for i in '"$@"'     + case "$prev" in     + COMMAND=/usr/sbin/synaptic     + prev=/usr/sbin/synaptic     + '[' -z /usr/sbin/synaptic ']'     ++ id -u     + euid=1000     ++ id -u k     + privid=1000     + test 1000 = 1000     + sh -c /usr/sbin/synaptic     k@bucket:/tmp$


Can I lock the root account during an install of Debian GNU/Linux 6 "squeeze"?

By default, Ubuntu locks account root; can I do the same, in Debian GNU/Linux 6 "squeeze", during install?


Arch Linux and optional dependencies

I installed XChat on an Arch Linux system. Every time I run it, I get the following error message:               Python interface loaded     Perl interface loaded     AutoLoad failed for: /usr/lib/xchat/plugins/tcl.so     libtcl8.5.so: cannot open shared object file: No such file or directory      So while the plugins for Python and Perl are loaded correctly, the Tcl plugin is not. In fact, `python2` and `perl` packages are installed on my system, while `tcl` package is not. Installing `tcl` fixes the problem. Before installing `tcl`, I get:               ldd /usr/lib/xchat/plugins/tcl.so | grep tcl         libtcl8.5.so => not found      After installing `tcl`, I get:               ldd /usr/lib/xchat/plugins/tcl.so | grep tcl         libtcl8.5.so => /usr/lib/libtcl8.5.so (0x00007fceba533000)      It seems that `tcl` is not a required dependency of `xchat`, but an optional one:               pacman -Qi xchat     ...     Optional Deps  : enchant: for spell checking support                      tcl: for tcl plugin                      python2: for python plugin     ...      Why is this the case? That is, why the `tcl` package is not installed along with `xchat` by default? Isn't `xchat` broken without `tcl`? I filed a bug more than two years ago, but I never really understood why things are this way in Arch Linux land. Please notice that while this bug is old, I'm only running this distribution on a daily basis since a couple of months, so I'm an Arch Linux newbie. I could have asked on Arch Linux forums or mailing lists, but I'm quite interested in knowing the point of view of other Linux distributions users. Arch Linux users are also welcome, of course. * * * EDIT.   1. The error message I get when running XChat without `tcl` installed is clearly visible in the GUI, in the same place where messages are displayed.   2. My question can also be reworded in the following way: why XChat, despite having clearly been built with `--enable-tcl` or equivalent passed to the `configure` script, can be installed without a mandatory dependency on the `tcl` package? If one don't want `tcl`, he should use `--disable-tcl`. * * * EDIT. I opened a thread on the Arch Linux forum, but I didn't get a satisfying answer. So I checked Debian and Gentoo, and it seems they don't have this problem.


What does "sudo chown -R hadoop:hadoop hadoop" do?

I saw the following script, posted online, that was used during the hadoop installation process.                 sudo tar xzf hadoop-0.20.2.tar.gz       sudo mv hadoop-0.20.2 hadoop       sudo chown -R hadoop:hadoop hadoop      I do not quite understand. What does the                   sudo chown -R hadoop:hadoop hadoop      do here? Thanks for the explanation.


partprobe displays 'msdos'

Why is `partprobe -s` displaying 'msdos', when I run it in Linux?


"Host key verification failed" even with removed ~/.ssh/known_hosts

When I try to `ssh` to my server from a linux computer with debian, I just get `Host key verification failed.` The only help I found online was deleting the key from `~/.ssh/known_hosts`... well I did not only that, I deleted the whole `~/.ssh` just to be sure, and it didn't help either, I still have `Host key verification failed.` error.


installing Scilab in OpenSUSE 11.3

I want to install Scilab on OpenSUSE 11.3. Which repository is it located in? I cannot find it listed in the package manager. I have tried to install the rpm manually, but I cannot resolve the dependencies.


How to copy a piped list of files contained spaces and apostrophes?

I have a list of files generated using `find` that I want to feed (pipe) to `cp`. My problem is that the files have spaces and apostrophes in them, leading `cp` to repeatedly complain that it "cannot stat". Is there an elegant solution to this problem?


No IBus choices in Input Method tab

![](http://i.stack.imgur.com/g7WPj.png) As you can see in the picture, I can't select any input method. I have installed ibus-m17n and my IBus input (ibus-bogo). I use Mint 16 with KDE 4.11.5


Cannot get status of "Adaptec AAC-RAID (Rocket) (rev 02)" HW RAID card

SERVER:~ # lspci | grep -i raid     0000:04:00.0 RAID bus controller: Adaptec AAC-RAID (Rocket) (rev 02)     SERVER:~ # arcconf getconfig 1 pd      and after the arcconf, the command just hangs.. the server seems OK. But the stucked arcconf struggles me, could there be a problem? How can I get the status of the mentioned RAID card, if the status command just timeouts? .. waited 10 minutes for it..


How to remove lines shorter than XY?

I found a question about, how to remove lines longer then 2048 chars: How to delete line if longer than XY? **Q:** But how can I remove lines shorter then 4 chars? So remove lines that has 1 or 2 or 3 length in a file. UPDATE: Thanks for the many GOOD answers, but I can only mark one as OK


Are there any alternatives to mutt?

I really like the idea of Mutt, reading mail in the terminal. I'm not really pleased with some inconsistencies and the imap handling. I set about trying to find some alternatives to mutt, but I can't seem to find any. What alternatives to the mutt e-mailclient for terminal exist for linux?


How to copy directory structure without removing symlinks?

I need to "install" a bunch of files to another directory keeping the directory structure of the source files intact. For example, if I have ./foo/bar/baz.txt going to /var/www/localhost/webroot/ I want the result to be /var/www/localhost/webroot/foo/bar/baz.txt. `rsync` has this capability in `--relative`, but when I did this I discovered it wasn't friendly to symlinks:               $ ls -ald /var/www/localhost/webroot/ | grep ^l     lrwxrwxrwx  1 www-data www-data     15 2014-01-03 13:45 media -> ../static/media     lrwxrwxrwx  1 root     root         13 2014-02-24 13:47 var -> ../static/var     $ rsync -qrR . /var/www/localhost/webroot/     $ ls -ald /var/www/localhost/webroot/ | grep var     drwxr-xr-x 3 root root 4096 2014-02-24 13:52 /var/www/localhost/webroot/var      So you see the symlink is no longer a symlink – the files were copied to the wrong place! `rsync` also has the `--no-implied-dirs` option, that superficially seems to do what I want, but it only works as I intend when _not_ doing a recursive rsync, so I have to:               find . -type f -print0 | xargs -0I{} rsync -R --no-implied-dirs {} /var/www/localhost/webroot/      Is there any more direct way to accomplish this mirroring of files without wiping out intermediate symlink directories (with or without rsync)?


Make file in linux readonly

Is there a way to make a file readonly permanently in linux. Or can I put a password to a file to make it readonly, then apply that password again to change its permission, or before they can alter it.


Gnome 3 desktop display gone rogue?

I am having trouble logging out and shutting down normally using the Gnome 3 desktop interface. This is what I was shown on random occasions when I turn on the computer: ![gnome3-snafu](http://i.stack.imgur.com/f0MhD.jpg) The arrows point to where things are not normal. Right clicking the dropdown arrow on the system top bar produces the half-hidden "spanner" instead of the user menu. As for the "cog", it is always visible on top. I have tried looking into `journalctl` for warnings, but there isn't any that I could find that is relevant to the desktop. Also, I didn't do any customization to my desktop. I know how to log out and shut down with linux terminal. I am looking for solutions to the graphical issue. Any ideas? **UPDATE:** I found I few lines which may be related to the display (drm is the display rendering manager). But I have seen this even when the display is normal. So, I am not very sure if it is useful:               kernel: fb: conflicting fb hw usage inteldrmfb vs EFI VGA - removing generic driver     kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).     kernel: [drm] Driver supports precise vblank timestamp query.     kernel: [drm] Wrong MCH_SSKPD value: 0x16040307     kernel: [drm] This can cause pipe underruns and display issues.     kernel: [drm] Please upgrade your BIOS to fix this.     kernel: fbcon: inteldrmfb (fb0) is primary device     kernel: i915 0000:00:02.0: fb0: inteldrmfb frame buffer device     kernel: [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0     kernel: [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off


Rsync keeps writing

I just recently updated my macbook pro to Mountain Lion. I use rsync to make backups of certain directories on my macbook pro my timecapsule wireless router with build-in harddisk.               rsync -avzm --delete --exclude-from '/some_dir/exclude_list.txt' \       /Volumes/Data/some_other_dir /Volumes/TimeCapsule/some_other_dir/ \       2>> ~/tmp/sync_error.txt      Before Mountain Lion everything worked fine. Rsync only copied new or changed files. Now, after the upgrade, rsync wants to copy all files every time, over and over again. Even if they did not change or were not deleted on the remote host (timecapsule). I don't know why (I do not encounter any errors during the rsync). Any ideas?


Issues mounting a NTFS share on Centos 6.3

We have a web server running on Centos 6.3 and we intend to mount a shared Windows drive (Windows 2008) so that we can do our daily backups on to the shared drive. This is how I am mounting the drive at the moment.               mount.cifs  //172.27.0.190/Moodle$ /srv/www/moodledata \       -o username=LHU/moodledata,password=<password> \       -o rw,dir_mode=0777,file_mode=0777,uid=root,gid=root      This allows me to mount the drive and I am able to create new directories and files. However I am unable to delete anything, move or replace any files or folders. This is problematic since we use a script to automatically backup our database and we have a weekly rotation schedule which at the moment cannot delete files, so the shared drive is filling up with database copies since the script cannot delete obsolete copies. Further more, we rsync the data from a folder on the server to a folder on the shared drive. This doesn't work either. E.g.               rm: cannot remove `weekly/mysql/weekly_mysql_2012-10-26_13h15m_43.sql.gz': Permission denied      The user info is correct and has full control on the folder in Windows 2008. I would be very grateful for any advice to fix this issue.


Linux Mint: LAN "Cable not connected", despite it is

I've just installed Linux Mint 13, 64 bit (from the CD of "c't kompakt Linux", if this matters), and came across a very unexpected problem, for which I've not found a solution with Google or searching this site: It claims that my LAN cable were not connected. This is surprising because both the live version of Linux Mint (from which I installed it) and the OpenSUSE running on the same computer (on which I'm currently typing this) are connecting quite fine over the very same network cable (which I didn't touch in the mean time). So what could have gone wrong? And more importantly, what can I do to fix it? **Update:** After switching off the computer and disconnecting it from power (due to a thunderstorm), after booting up again it now works. Anyway, if someone has an idea what it might have been (I've not touched the LAN cable at all!), I'd still appreciate to know (in case it happens again).


How to measure the time when a packet arrives?

When the packet arrives the NIC generates an interrupt and the kernel then takes over. I want to measure the time at which a packet of a particular TCP flow arrives. How do I do this in Linux? This what tools like tcpdump do.


Is there a way to really prioritize processes or make Linux respect their priorities?

I know there are process priorities like in other operating systems, going from -20 (most prio) to 19 (less prio) but Linux seems to ignore them. Right now I was building the kernel in the background (although `make` processes have priority 0) and since it took quite some time I decided to watch something. So I opened a pretty demanding H264 video (~30% of CPU time of a Core2 2.6GHz) in VLC only to find out there was tearing, frames lost, visual artifacts (resulting from the previous I presume), although audio seemed to be fine. So I decided to change the priority of VLC using `renice`, concretely seeing that PulseAudio had `-11` I decided to put it on par so I did `sudo renice -11 -p VLC_PROC_#`. Same thing kept happening, so I went on and set it to -20 but I still kept seeing visual artifacts. So I wonder, why Linux didn't actually prioritize a -20 process over some 0 processes and give it anything it needed? Is there any way to really prioritize processes in Linux? In case it matters, I'm running a 64-bit Arch here, XFCE as desktop environment. **EDIT:** The kernel compilation was performed in `/tmp` which I have as `tmpfs` so its sources and all were already in RAM. RAM usage didn't even reach 60% and there was no paging operations in place. The scenario detailed above is just a _test case_ , I'm more interested in why Linux performed how it did and if there's any way to get real priorities.


Dual-boot OS X and Fedora

I'm trying to install Fedora (dual-boot) on a brand-new MacBook Pro. The live/installer CD runs flawlessly on the machine, which was a nice surprise. But after the install is completed, I cannot actually boot into Fedora. Here is what I did:   1. OS X by default ships with an EFI partition (/dev/sda1) and an HFS+ partition (/dev/sda2). I used Boot Camp in OS X to resize the existing OS X partition and reboot to the live CD.   2. Once the Fedora live CD is booted, I used the disk utility to delete the "Windows" partition (/dev/sda3) that Boot Camp created. This leaves the original EFI and OS X partitions plus a chunk (40G) of empty space at the end of the disk.   3. Run the Fedora Installer, telling it to automatically partition and install using the free space on the disk. It creates a 500M boot partition (/dev/sda3) and an LVM partition (/dev/sda4).   4. When the installer gets to the part about the boot loader, I go with the defaults, which is to install GRUB to the boot sector of the Fedora boot partition (/dev/sda3). After the install is complete, I would expect to be able to hold down the Mac's "Option" key to choose which OS to boot since /dev/sda3 has a boot sector, but only the OS X disk shows up. (What does Boot Camp do, then, besides resizing the disk?) I read somewhere that a boot loader called rEFIt would help, so I tried that. I installed it using the instructions on the project's website and rebooted. An option to boot Linux shows up in the rEFIt boot screen, but when selecting it, I get a black screen with an error message along the lines of "no operating system found." Further research suggested that rEFIt had to "resync" in order to find GRUB, even though I installed rEFIt after Fedora. I did that by going into the rEFIt "menu" and answering in the affirmative when it told me that a resync was necessary. Now, when I select Linux in the rEFIt boot menu, it only shows a gray-out penguin and nothing else happens. The lack of output makes the problem difficult to troubleshoot exactly what's going wrong. Maybe if I knew more about EFI, I could play around in the EFI shell provided by rEFIt. Anyway, has anyone here had success dual-booting Fedora 14 on a newer Mac, and if so, what procedure did you use? I'd like to install Fedora to the whole disk, but I'm reluctant to try that until I can get a dual-boot scenario to work. I you could, please CC my email address in any responses since I'm subscribed to the digest version of the list. Thanks for your time.


Script to delete text files

I was trying to make a script that searches for all ASCII text files in the directory that you point out and after that writes the path of every file to a text file. After that it's supposed to show the head of each file one by one and ask if you want to delete the file. If you say yes it removes that file, if you say something else it just shows you the next file and etc. until you check every file. So I've ended up with:               #!/bin/bash     echo "Give directory to search for ASCII text files"     read direct     find $direct -type f -exec file {} + | grep ASCII > ztextz     sed "s/ .*//" ztextz > ztextz1     sed "s/://g" ztextz1 > ztextz2     #until here everything works fine     #it creates the file that contains paths of all ASCII text files in the directory given by you     #After that it is a mess..it needs to check the head of every file one by one     #and let me decide if I want to delete it or not     files=ztextz2     while IFS= read -r name;     do     head "$name";          echo "Do you want to delete this file?"     read want     case $want in     YES)     rm $name;;     Yes)     rm $name;;     yes)          rm $name;;     Y)     rm $name;;     y)     rm $name;;     esac     done < "$files"      So as the output I suppose to see 10 lines from first text file in my dir and question if I want to remove that file. After I respond with "Yes" it is supposed to remove that file and show me the 10 lines from next file and etc. The output that I get now is the first 10 lines from 2 files (I have 4 files in my dir) and the question "Do you want to delete this file?" and then the script breaks. Seems like its not working as expected. Could someone please explain me where my mistake is? * * * **OK since I don't have enough reputation to answer myself I put it here.** * * * Yeah so I've sticked with my old script where I got problem with putting two $$ together like $$numb and replaced them with ${!numb} it started to work...so now I can clean my directories from the text files that I don't need with that script=)                  #!/bin/bash     echo "Give directory to search for ASCII text files"     read direct     find $direct -type f -exec file {} + | grep ASCII > ztextz     sed "s/ .*//" ztextz > ztextz1     sed "s/://g" ztextz1 > ztextz2     set `less ztextz2`     numb=$#     rm ztextz*     while [ $numb -gt 0 ]     do head ${!numb}     echo "Do you want to delete ${!numb} file?"     read want     case $want in     yes)     rm ${!numb}     echo "File is removed"     sleep 1;;     Yes)     rm ${!numb}     echo "File is removed"     sleep 1;;     Y)     rm ${!numb}     echo "File is removed"     sleep 1;;     y)     rm ${!numb}     echo "File is removed"     sleep 1;;     YES)     rm ${!numb}     echo "File is removed"     sleep 1;;     esac     numb=$[$numb-1]     done      PS. to make it faster remove `sleep 1` =)


How can I get my sed command to make permanent changes to a file?

Is this possible? I read somewhere that the following command would do it: > sed -e [command] [file] but it appeared to do the same thing as just > sed [command] [file] (it did not save the changes). Is there any way to do this using sed?


How to append data of multiple files into single file?

For example: I have `01.txt` and `02.txt` files and need to append data of these files into new file `new.txt`. It should append data based on `01.txt` followed by `02.txt` files. Before this I have to delete only the first AND last line of the files( `01.txt` `02.txt` ) and then append them into the new file. How Do we accomplish this using UNIX?


How can I connect to a remote X server _without_ ssh?

I am very happy with _ssh -X_ when I'm connecting to my machine over internet. But at home, I want to connect with my notebook to my desktop machine without ssh. What's the best way of doing this? (Both machines run Linux, Xubuntu.)


Are there any difference using pipes?

Using Ubuntu 12.04. Using pipes (5 times):               $ time echo XYZ | sed 's/X/A/g' | sed 's/Y/B/g' | sed 's/Z/C/g'     ABC          real    0m0.005s     user    0m0.000s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g' | sed 's/Y/B/g' | sed 's/Z/C/g'     ABC          real    0m0.004s     user    0m0.000s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g' | sed 's/Y/B/g' | sed 's/Z/C/g'     ABC          real    0m0.004s     user    0m0.004s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g' | sed 's/Y/B/g' | sed 's/Z/C/g'     ABC          real    0m0.005s     user    0m0.000s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g' | sed 's/Y/B/g' | sed 's/Z/C/g'     ABC          real    0m0.005s     user    0m0.004s     sys 0m0.000s      not using pipes (5 times):               $ time echo XYZ | sed 's/X/A/g; s/Y/B/g; s/Z/C/g'     ABC          real    0m0.003s     user    0m0.000s     sys 0m0.004s     $ time echo XYZ | sed 's/X/A/g; s/Y/B/g; s/Z/C/g'     ABC          real    0m0.003s     user    0m0.000s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g; s/Y/B/g; s/Z/C/g'     ABC          real    0m0.003s     user    0m0.000s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g; s/Y/B/g; s/Z/C/g'     ABC          real    0m0.003s     user    0m0.004s     sys 0m0.000s     $ time echo XYZ | sed 's/X/A/g; s/Y/B/g; s/Z/C/g'     ABC          real    0m0.003s     user    0m0.000s     sys 0m0.000s     $       It's clear that NOT using pipes is faster. So it can be used to optimize a script:               $ echo ABC | sed 's/A/X/g; s/X/Y/g'     YBC     $       **My question:** Merging the sed's always produce the same output?


What stream does perf use?

What stream does the `perf` command use!? I've been trying to capture it with               (perf stat -x, -ecache-misses ./a.out>/dev/null) 2> results      following http://stackoverflow.com/q/13232889/50305, but to no avail. Why can I not capture the input... it's like letting some fish get away!!


How to change user agent on all http requests made from my machine with Squid intercepting proxy?

I'd like to change the user agent on _all_ HTTP requests made from this machine. It's easy enough to change the user agent in each browser, but other apps also make http requests. In particular, there's one app (Steam) that has no option to change the user agent. Thus, I want to run an intercepting proxy that changes the user agent on all http requests made from my computer. I wrote this `squid.conf`               # Squid normally listens to port 3128     http_port 3128     http_port 3127 intercept          # i don't care for caching. -Matt     cache deny all          request_header_access User-Agent deny ALL      It works when I point browsers at it. But how can I get Squid to intercept all http requests made by my machine? I don't understand how to make it capture stuff. Iptables? Firewalld?


Set up nginx to serve files from subdirectories

I am setting up a very simple file server system. I install nginx and set its root directory to `/home` to make it serve files from users' home directories. However, when I attempt to download files via `http://12.34.56.78/user1/testfile.bin` with my browser, it says "403 Forbidden". When I connect to `http://12.34.56.78/` with my browser, however, it displays default index page that I've put in `/home/`. How do I make nginx serve files from user directories? e.g. `/home/user1` `/home/user2` Additionaly, If I wanted to exclude root directory `/home` and system files `.bash_history` `.bash_profile` `.bashrc` (say, all files whose names start with a dot) from the files being served?


Dropping unnecesery TCP connections

I use Enigma based satbox as live stream source. I noticed that sometimes connection established from my server based streaming application to satbox is still keep as ESTABLISHED, even after stopping watching TV channel. After several hours and several changing of TV channel, there is more then 10 connection is ESTABLISHED state and satbox stop to respond to server. I think that my streaming application sometimes does not close unnecessary connections. Is it possible to drop such unnecessary connections after for example pre-defined inactivity period of time?


Fvwm Vector Buttons

I am trying to add windows buttons to my decor. (button numbers `1` `6` `4` `2`)               AddToDecor MyWDecor     + AddButtonStyle 1 Vector 7 70x15@0 30x55@1 50x55@0 40x85@1 80x45@0 60x45@1 70x15@0     + AddButtonStyle 2 Vector 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1     + AddButtonStyle 4 Vector 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1     + AddButtonStyle 6 Vector 10 40x55@1 40x80@0 15x80@0 15x55@1 40x55@1 30x55@1 30x30@1 70x30@1 70x70@1 45x70@1          Mouse 0 2       A       Menu MenuFvwmWindowOps2 Close     Mouse 0 4       A       FuncFvwmMaximize     Mouse 0 6       A       Iconify      But it doesn't draw buttons that I stated. It just draw a big square for 6 a little one for 2 and a dot for 6.


Perform calculation in hex with Qalculate

I'm trying to do hex calculations, `C - A`, and I already changed number base to hex, but Qalculate still doesn't work. ![enter image description here](http://i.stack.imgur.com/NXTZw.png)