title: Why does boot from SD card with my custom kernel result in "VFS: Cannot open root device"?

text: I'm using an embedded board ARM9 SAM9G25. I want to boot from SD card. When I build a linux kernel with a built-in rootfs (initramfs) then it boots. I want to separate the kernel from rootfs and I generated a rootfs.squashfs. The kernel command line is:               console=ttyAT0,115200 root=/dev/mmcblk0 ro rootfstype=squashfs      When I then boot my system the following kernel panic occurs: > VFS: Cannot open root device "mmcblk0" or unknown-block(0,0) Please append a > correct "root=" boot option; here are the available partitions: Kernel panic > - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ### Regression I believe that partitioning doesn't lead to the solution, since booting with the same settings but with an initramfs is possible. When booting with the initramfs image `$ ls /dev` doesn't list `mmcblk` or `sdb`.               $ dmesg     mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0     atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots      mmc_host mmc0: card is not present      mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0      atmel_mci atmel_mci.1: Atmel MCI controller at 0xf000c000 irq 26, 1 slots     mmc_host mmc1: card is not present      (Yes the card is in the slot ;) So what I think happens now is, that U-Boot can read the SD device but the kernel doesn't. Since an initramfs is bootable, a single kernel can be loaded too but the rootfs, opened from kernel, cannot be found. In `make linux menuconfig` I already enabled > Device Drivers > >   * <*> MMC/SD/SDIO card support > >   *     * <*> MMC block device driver >   *     * <*> MMC host test driver >   *     * <*> Atmel SD/MMC Driver (Atmel Multimedia Card Interface support) >   *     * [ * ] Atmel MCI DMA support (Exp.) >   *     * Secure Digital Host Controller Interface support > but still with this setting it seems that he's not able to use the SD device. I'm a bit clueless at this point, can someone give me a hint?


title: Equivalent of the Solaris "df -t" command on Linux?

text: The `df -t` command on Linux does not display the number of files like it does on Solaris. Is there any equivalent command on Linux? My script is like this               for i in /opt/aa /opt/aa/data /opt/aa/bb; do echo -n "$i "; df -t $i | awk ' { if ( NR==1) F=$(NF-1) ; if ( NR==2) print $(NF-1) - F }'; done      Output :               /opt/aa 397375     /opt/aa/data 24134317     /opt/aa/bb/oracle 529      I can see number of files in respective file systems I would need similar command for linux, this above command is working fine with solaris ?


title: print command not found

text: From the korn shell, I keep getting print command not found. When I run print from the shell, it says the same thing. How would I go about fixing this? printf works fine, but for some reason print is not. This is redhat 5.5 and the ksh is 3.2.25-release. Thanks


title: What's the difference between these two dd commands?

text: What's the difference between two `dd` commands that have different `bs` and `count` values, as long as they multiply to the same? For example:   1. `dd if=/dev/random of=aa bs=1G count=2`   2. `dd if=/dev/random of=aa bs=2G count=1`


title: How can I communicate with a Unix domain socket via the shell on Debian Squeeze?

text: I’m running a Debian Squeeze web server. I’ve installed memcached on it, and configured memcached to listen on a Unix domain socket (at `/tmp/memcached.sock`), as it only needs to receive messages from the website, which lives on the same server. It seems to be working fine, but I’d also like to communicate with memcached via the shell, to check that it’s doing what I think it’s doing. memcached accepts messages via a simple ASCII protocol (if I understand correctly). If it was listening on TCP/IP, I could send messages to it via e.g. `nc`:               $ echo "stats settings" | nc localhost 11211      But I can’t figure out how to send that text to the domain socket instead. On my laptop (which runs OS X Lion), both `nc` and `telnet` have options (`-U` and `-u` respectively) to use domain sockets. However, on my Debian Squeeze web server, these options aren’t present.


title: What are the main differences between Unix and Linux kernels today?

text: I know that many of the same programs run flawlessly on top of both kernels. I know that historically, the two kernels came from different origins. I know philosophically too that they stood for different things. My question is, today, in 2011, what makes a Unix kernel different from a Linux one, and vice versa?


title: GRUB splashimage

text: I am using leagcy GRUB (0.97) on a system running linux kernel 2.6.31. I am using a GRUB splash image from /boot/grub/menu.lst. I see that the splashimage goes away once the GRUB menu selection is made and the INIT process starts. Is there a way that I can continue to display this image when INIT begins to run? EDIT: I cant use fbsplash or plymouth since these dont compile with legacy kernels. Appreciate any help and thanks in advance


title: Sort images by aspect ratio

text: I am trying to select a few art images to fit some new frames. I would like to be able to sort these images by proximity to a particular aspect ratio and then view them in decreasing order of proximity through something like feh. Is there some glorious one-line Unix expression? Otherwise a few dozen lines of Python should clear this up.


title: Using a laptop as a bridge between Internet and LAN for SSH connections.

text: We have a lan and a server running HPUX that isn't connected to the Internet. I have a server and a laptop on the same network. When I plug in the laptop via ethernet cable, its Internet connection drops, despite already being connected via wifi to a network with Internet access. From the laptop, I can only SSH to the server using its internal IP address.( 192.168...) What I wonder is, can I connect to the server from somewhere else in the world via the laptop? How can I make the laptop act as a bridge between the Internet and the LAN? How would I then access the server?


title: MIT Shared Memory Extension or MIT-SHM over ssh

text: I successfully created a `privileged lxc archlinux container` on an archlinux host with lxc. I set up a static ip via dnsmasq and ssh into it and I use `xauth` to forward `X11`. I then call programs like `mupdf` or plot functions from programming languages such as `R` or `Matlab`. While this all works fine I constantly see error messages printed to the console when I open a `*.pdf` file with `mupdf`:                    ximage: disabling shared memory extension: BadAccess (attempt to access private resource denied)      Two short questions about this:   1. What exactly does this error message mean?   2. How can this error be solved (or is it safe to ignore)?


title: Collapse line vertically so that every word is on a new line

text: Given a string like: `"Hello World, how are you today?"` Is there a way in Vim to collapse this line vertically such that every word appears on a new line, i.e.:                   "Hello         World,         how         are         you         today?"      I had something similar in mind like executing `Ctrl`-`V` + `Ctrl`-`g``q` which wraps lines relative to a fixed width which can be set in `.vimrc`.


title: Is shebang always the same as the interpreter's installation directory?

text: Must the shebang header always match the interpreter's installation directory? If so, then why do both `#!/usr/bin/python` and `#!/usr/local/bin/python` work for me?


title: set umask (permissions) similarly as setgid on a directory

text: I know how to use `setgid` on directories, to enforce that whole directory structure has uniform `user:group` ownership. Is there a similar way to set the `umask` for a directory, so that the whole directory structure "inherits" specific permissions (i.e. `750/640`)?


title: Pausing rsync via bash script?

text: Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks from overheating or network throttling. I am currently using a Windows batch file to start a Linux bash script via cygwin to do this.


title: Difference between .tar.gz.asc, git.tar.bz2 and .tar.bz2

text: I have a Mac running OSX 10.9.1 and I want to install Gerris and its dependencies. In the last lines of the page I have to install ffmpeg. But there are lots of releases of ffmpeg. Which one I should choose?


title: How to find files that contain newline in filename?

text: I am trying to find files that have a newline in the filename. But I can't figure out what pattern to use. The following works, but is not very useful if I want to use it in indented code.               find . -name '*     *'      I tried these two and they only succeeded in finding filenames that contained the letter _n_ :               find . -name '*\n*'     find . -name "*\n*"      Then I found how to write backslash escape sequences and tried this:               find . -name "*$'\n'*"      But that doesn't find anything. How should I write the pattern?


title: ssh script asks for password

text: a little ssh issue here. I set up some keys in ssh between 2 machines and I can login via ssh without password in terminal. I am trying to write a shell script that sends commands to the remote server through ssh. When i run the script it always asks for the ssh password before performing the commands. How can I make it so the ssh login in the script is passwordless like it is through terminal? in the script it's like ssh user@remoteMachine 'do some stuff' the same command in terminal works perfectly fine. (edit) verbose flag differences script:               debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/remote/.ssh/id_rsa     debug1: Authentications that can continue: publickey,password     debug1: Trying private key: /home/remote/.ssh/id_dsa     debug1: Trying private key: /home/remote/.ssh/id_ecdsa     debug1: Next authentication method: password     user@192.168.1.4's password:       terminal               debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/remote/.ssh/id_rsa     debug1: Server accepts key: pkalg ssh-rsa blen 279     debug1: read PEM private key done: type RSA     debug1: Authentication succeeded (publickey).     Authenticated to 192.168.1.4 ([192.168.1.4]:22).     debug1: channel 0: new [client-session]     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.     debug1: Sending environment.     debug1: Sending env LANG = en_GB.UTF-8     Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic i686)      the script is just               #/usr/bin/bash          ssh user@192.168.1.4 'touch ~/test'      I am making the script executable and calling it with               ./script


title: not able to access raspberry pi webcam server from chrome and ie9

text: I am trying to use my raspberry pi as a webcam server(using motion library). After tweaking I found this tutorial and implemented the same. I am able to access the webcam data using firefox. from Chrome and IE I am not getting. Can anyone tell me how to do this?


title: Installing vpnc on CentOS

text: I'm currently attempting to establish a vpn connection, but I am unable to install a vpn client. I assumed installation would be as simple as `sudo yum install vpnc`, but CentOS is unable to find the vpnc package. I browsed some more, and discovered I needed to install and enable the rpmforge repository for yum to find the package. I downloaded the rpmforge- release-0.5.2-2.el6.rf.x86_64.rpm and installed successfully. However, when I run my original yum command, I am still unable to find the package. Is there a different repository I need to add in order to locate the vpnc packages for CentOS 6.3?


title: How to set unbuffered IO in `screen`?

text: I use `screen` as a `minicom` replacement, but the only problem is I don't get all output immediately, because of buffering. Is there a way to turn off buffering for `screen`?


title: Copying emacs content through terminal app's clipboard copies unexpected tabs for some spaces

text: I'm using terminal.app on OS X, and when typing in emacs I often want to copy the text and paste it into some other program. When I do, I find that copied text has some spaces unexpectedly replaced by tabs. I assume I'm copying the text that emacs has sent to the terminal which I suppose doesn't have to match the actual document, but what's the right way to do this?


title: Grep_color on mac

text: I am trying to get my regex highlighted on mac using terminal. I have put this is my `.profile`:               export GREP_COLOR='1;30;40'      Nothing changes, so I added the same to my `bash.profile` still nothing, restarted the machine nothing. When I am:               egrep --color=auto ".*\W blah blah "      then it lights up some yellow color but I wondered if I had done something wrong in my `.profile` or `bash_profile`. Any help would be good: snow leopard, with just plain old terminal :-)


title: A tool that helps me to be sensible on permissions?

text: Is there a tool or understandable source (manual, webpage, ...) in existence that helps a moderate* user to be more sensible about user permissions? In my ideal-dream-world I'd have a CLI tool that lets you scan your system or a directory to find security loopholes and gives you a sensible, readable feedback on how one could improve one's security. I mean " _security_ " in the online generation's way: how to keep my machine (which is running arch btw) from being infiltrated by a virus, a worm, ... I'm not bothered by "my little brother will ruin my system" and tangent problems. Does this kind of tool exist? _Jeesh: I sound like a windows user here: being paranoid about security and all. I just switched from mac - where I've never had any security problems - to linux. Although I know security is pretty baked in to unix with the concept permissions, I do feel a bit exposed because I'm not quite sure how much the safety my mac offered me was part of Mac in stead of unix. There must be some exploits a malicous party can use on the linux, no?_ *a moderate user is a person that knows how to use the CLI (in fact I prefer to use the CLI) etcetera, but isn't the typ of person to compile his own version linux.


title: Solaris 11: How to use ILB to create HA loadbalancer across two backend servers?

text: I'm attempting to use Solaris 11's ILB to create a loadbalancer across two backend DNS servers. Here's my requirements: Two external IPs: .XXX.YYY, .XXX.ZZZ - these are the DNS IP's that our clients hit Two ILB boxes in a HA configuration over those two external IPs Two backend DNS servers I'd like to have the two ILB boxes (ilb1 and ilb2) each load balance across the two DNS servers (ns1 and ns2) on two different incoming IPs. I'd like ilb1 to be primary on .XXX.YYY and secondary on .XXX.ZZZ, and ilb to be the inverse of this. This way, if either of the DNS servers or the ILB servers goes down, DNS requests should continue unimpacted. However, we can't go Full NAT on this due to our requirements that the backend servers have to be able to see the actual SRC_IP of the DNS request - going full NAT makes it look to the DNS servers that all requests are coming from the ILB boxes, not the clients themselves. Going HALF-NAT will correctly maintain the SRC_IP of the DNS request, however that means that the packet now has to be routed through the ILB box that it was requested from, so that the correct IP is on the packet when it gets to the client, otherwise the client will throw it out ("response from unexpected source" and the like). Here's the sticky issue - since there are two IPs, how do I reliably route the request back through the correct ILB box? /etc/defaultrouter on the DNS boxes only lets you use 1 IP, so roughly half of our responses would be trashed. Is this setup possible? Is my description clear as mud?


title: PHP exec expect script with SCP then SSH

text: I have a PHP page which runs the following expect script to upload a file to another server on my network:               #!/usr/bin/expect -f          set password [lindex $argv 0]          spawn /usr/bin/scp /home/Dave/bin/test root@192.168.1.1:/etc/test          expect {         -re ".*yes.*no.*" {             exp_send "yes\r"             exp_continue         }         -re ".*password.*" {             exp_send "$password\r"         }     }          expect eof      Before I do this however I need to backup the existing file on the server:               cp /etc/test /etc/test.bak      And after I upload the file I need to restart the service that reads the file:               /etc/init.d/testservice restart      It seems rather silly to SSH to the server three separate times. How can I do this all at once? Is there a PHP function that will take care of some or all of this for me? Edit: Prompting the user for a password is a requirement.


title: Switch between runlevel with init command in bash script … init 3 to init 5

text: I need your help with bash script that I’m trying to build. To keep things simple I will make it short: The script starts running once it’s gets to run level 5 so i copied the script to /etc/rc.d/rc5.d/S99fix And it should look like this:               init 3          # Do some stuff…          init 5          rm –rf /etc/rc.d/rc5.d/S99fix      The problem is that when I reboot the machine and it gets to runlevel 5 it starts the script by running the init 3 command but there it ends… I’m killing my own script before its time. the Do some stuff, init 5, rm -rf doesn't run. Is there a way I can do what I want to do and still switch between runlevels without killing my script while doing so? Just to add some details to this question...   * I'm using SLES 11.2   * i'm installing and configuring nvidia drivers so doing stuff in runlevel 3 is required.   * This research started as a way to do stuff to the X server while in runlevel 3 and bring it back to runlevel 5. I presume there is an option just to stop and start the xdm service. But now I've become interested to understand if switching between runlevel 3 and 5 is possible in bash script.


title: What does @ mean in the hostname part of a .rhosts file in Solaris?

text: What does               +@foo_hosts username      mean in a user's `.rhosts` file? I presume it is defining a group of hosts in some way, but I can't figure out where to look for the definition of `@foo_hosts`. I found the name `foo_hosts` mentioned in the output of `ypcat netgroup.byhost` but not in a way that seems to associate it with any list of hosts. `uname` reports `SunOS 5.8`


title: Udev rule- change group

text: I would like to change group of `/dev/nvidia0`. I was write udev rule: `KERNEL="nvidia[0-9]", GROUP="video", MODE="0666"` But it does't change group, after reboot file is in `root`group. How do this?


title: LXC migrate between hosts

text: I had setup a testsystem with LXC and installed a webserver etc. that all was not the problem. But now I want to swich to another host system also I compressed /var/lib/lxc/webserver and copied it to the other host. But there i got serval errors:               lxc-start: failed to attach 'vethO5HJ2b' to the bridge 'lxcbr0' : No such device     lxc-start: failed to create netdev     lxc-start: failed to create the network     lxc-start: failed to spawn 'webserver'      In the config i did found settings for network. Any Ideas to fix the network issue or exits a better way to migrate between hosts ? ifconfig -a Host1 (VM is working here)               eth0      Link encap:Ethernet  Hardware Adresse 00:25:90:d2:c2:d6                 inet Adresse:85.xxx.xxx.43  Bcast:85.xxx.xxx.43  Maske:255.255.255.255               inet6-Adresse: fe80::225:90ff:fed2:c2d6/64 Gültigkeitsbereich:Verbindung               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1               RX packets:186831047 errors:0 dropped:0 overruns:0 frame:0               TX packets:170397357 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:1000                RX-Bytes:14641876568 (14.6 GB)  TX-Bytes:32363758586 (32.3 GB)               Speicher:f7100000-f7180000           eth0:1    Link encap:Ethernet  Hardware Adresse 00:25:90:d2:c2:d6                 inet Adresse:81.xxx.xxx.247  Bcast:81.xxx.xxx.255  Maske:255.255.255.255               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1               Speicher:f7100000-f7180000           eth1      Link encap:Ethernet  Hardware Adresse 00:25:90:d2:c2:d7                 BROADCAST MULTICAST  MTU:1500  Metrik:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:1000                RX-Bytes:0 (0.0 B)  TX-Bytes:0 (0.0 B)               Interrupt:20 Speicher:f7200000-f7220000           lo        Link encap:Lokale Schleife                 inet Adresse:127.0.0.1  Maske:255.0.0.0               inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine               UP LOOPBACK RUNNING  MTU:65536  Metrik:1               RX packets:22574 errors:0 dropped:0 overruns:0 frame:0               TX packets:22574 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:0                RX-Bytes:4393152 (4.3 MB)  TX-Bytes:4393152 (4.3 MB)          lxcbr0    Link encap:Ethernet  Hardware Adresse ee:2c:00:bf:f0:a9                 inet Adresse:10.0.3.1  Bcast:10.0.3.255  Maske:255.255.255.0               inet6-Adresse: fe80::ec2c:ff:febf:f0a9/64 Gültigkeitsbereich:Verbindung               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:6 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:0                RX-Bytes:0 (0.0 B)  TX-Bytes:468 (468.0 B)          bridge name bridge id       STP enabled interfaces     lxcbr0      8000.000000000000   no            ls: Zugriff auf /var/log/upstart/lxc* nicht möglich: Datei oder Verzeichnis nicht gefunden (in English, not found)            $ brctl show     bridge name bridge id       STP enabled interfaces     lxcbr0      8000.000000000000   no           minecraft@h2210663:~$ ls -l /var/log/upstart/lxc*     ls: Zugriff auf /var/log/upstart/lxc* nicht möglich: Datei oder Verzeichnis nicht gefunden     minecraft@h2210663:~$ cat /etc/default/lxc     # MIRROR to be used by ubuntu template at container creation:     # Leaving it undefined is fine     #MIRROR="http://archive.ubuntu.com/ubuntu"     # or      #MIRROR="http://<host-ip-addr>:3142/archive.ubuntu.com/ubuntu"          # LXC_AUTO - whether or not to start containers symlinked under     # /etc/lxc/auto     LXC_AUTO="true"          # Leave USE_LXC_BRIDGE as "true" if you want to use lxcbr0 for your     # containers.  Set to "false" if you'll use virbr0 or another existing     # bridge, or mavlan to your host's NIC.     USE_LXC_BRIDGE="true"          # If you change the LXC_BRIDGE to something other than lxcbr0, then     # you will also need to update your /etc/lxc/default.conf as well as the     # configuration (/var/lib/lxc/<container>/config) for any containers     # already created using the default config to reflect the new bridge     # name.     # If you have the dnsmasq daemon installed, you'll also have to update     # /etc/dnsmasq.d/lxc and restart the system wide dnsmasq daemon.     LXC_BRIDGE="lxcbr0"     LXC_ADDR="10.0.3.1"     LXC_NETMASK="255.255.255.0"     LXC_NETWORK="10.0.3.0/24"     LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"     LXC_DHCP_MAX="253"          LXC_SHUTDOWN_TIMEOUT=120          $ cat /etc/init/lxc-net.conf     description "lxc network"     author "Serge Hallyn <serge.hallyn@canonical.com>"          start on starting lxc     stop on stopped lxc          env USE_LXC_BRIDGE="false"     env LXC_BRIDGE="lxcbr0"     env LXC_ADDR="10.0.3.1"     env LXC_NETMASK="255.255.255.0"     env LXC_NETWORK="10.0.3.0/24"     env LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"     env LXC_DHCP_MAX="253"     env varrun="/var/run/lxc"          pre-start script         [ -f /etc/default/lxc ] && . /etc/default/lxc              [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { stop; exit 0; }              cleanup() {             # dnsmasq failed to start, clean up the bridge             iptables -t nat -D POSTROUTING -s ${LXC_NETWORK} ! -d ${LXC_NETWORK} -j MASQUERADE || true             ifconfig ${LXC_BRIDGE} down || true             brctl delbr ${LXC_BRIDGE} || true         }              if [ -d /sys/class/net/${LXC_BRIDGE} ]; then             if [ ! -f ${varrun}/network_up ]; then                 # bridge exists, but we didn't start it                 stop;             fi             exit 0;         fi              # set up the lxc network         echo 1 > /proc/sys/net/ipv4/ip_forward         mkdir -p ${varrun}         brctl addbr ${LXC_BRIDGE}         ifconfig ${LXC_BRIDGE} ${LXC_ADDR} netmask ${LXC_NETMASK} up         iptables -t nat -A POSTROUTING -s ${LXC_NETWORK} ! -d ${LXC_NETWORK} -j MASQUERADE         dnsmasq -u lxc-dnsmasq --strict-order --bind-interfaces --pid-file=${varrun}/dnsmasq.pid --conf-file= --listen-address ${LXC_ADDR} --dhcp-range ${LXC_DHCP_RANGE} --dhcp-lease-max=${LXC_DHCP_MAX} --dhcp-no-override --except-interface=lo --interface=${LXC_BRIDGE} --dhcp-leasefile=/var/lib/misc/dnsmasq.${LXC_BRIDGE}.leases --dhcp-authoritative || cleanup         touch ${varrun}/network_up     end script          post-stop script         [ -f /etc/default/lxc ] && . /etc/default/lxc         [ -f "${varrun}/network_up" ] || exit 0;         # if $LXC_BRIDGE has attached interfaces, don't shut it down         ls /sys/class/net/${LXC_BRIDGE}/brif/* > /dev/null 2>&1 && exit 0;              if [ -d /sys/class/net/${LXC_BRIDGE} ]; then             ifconfig ${LXC_BRIDGE} down             iptables -t nat -D POSTROUTING -s ${LXC_NETWORK} ! -d ${LXC_NETWORK} -j MASQUERADE || true             pid=`cat ${varrun}/dnsmasq.pid 2>/dev/null` && kill -9 $pid || true             rm -f ${varrun}/dnsmasq.pid             brctl delbr ${LXC_BRIDGE}         fi         rm -f ${varrun}/network_up     end script      Host2 (destination)               eth0      Link encap:Ethernet  Hardware Adresse 00:25:90:ae:09:6a                 inet Adresse:2xx.xx4.xxx.217  Bcast:2xx.xx4.xxx.255  Maske:255.255.255.192               inet6-Adresse: fe80::225:90ff:feae:96a/64 Gültigkeitsbereich:Verbindung               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1               RX packets:2876153658 errors:0 dropped:48779 overruns:0 frame:0               TX packets:2680725017 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:1000                RX bytes:234344379020 (218.2 GiB)  TX bytes:710758489234 (661.9 GiB)               Interrupt:16 Speicher:df900000-df920000           eth0:1    Link encap:Ethernet  Hardware Adresse 00:25:90:ae:09:6a                 inet Adresse:2xx.xx4.xxx.252  Bcast:2xx.xx4.xxx.255  Maske:255.255.255.192               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1               Interrupt:16 Speicher:df900000-df920000           eth1      Link encap:Ethernet  Hardware Adresse 00:25:90:ae:09:6b                 BROADCAST MULTICAST  MTU:1500  Metrik:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:20 Speicher:dfa00000-dfa20000           lo        Link encap:Lokale Schleife                 inet Adresse:127.0.0.1  Maske:255.0.0.0               inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine               UP LOOPBACK RUNNING  MTU:16436  Metrik:1               RX packets:738956166 errors:0 dropped:0 overruns:0 frame:0               TX packets:738956166 errors:0 dropped:0 overruns:0 carrier:0               Kollisionen:0 Sendewarteschlangenlänge:0                RX bytes:65605834297 (61.1 GiB)  TX bytes:65605834297 (61.1 GiB)     $ brctl show     bridge name bridge id       STP enabled interfaces             $ ls: Zugriff auf /var/log/upstart/lxc* nicht möglich: Datei oder Verzeichnis nicht gefunden (in English, not found)           $ cat /etc/default/lxc     # /etc/default/lxc          LXC_AUTO="true"     LXC_DIRECTORY="/ssd/lib/lxc"          $ cat /etc/init/lxc-net.conf     cat: /etc/init/lxc-net.conf: Datei oder Verzeichnis nicht gefunden (in English, not found)


title: Is there a way to use ssh remotely without configure the firewall?

text: Is there an application that works like TeamViewer but only works for SSH? I'm configuring a server, and want to place it anywhere but still be able to access ith with putty. Is there a service or application I can use to access it? Much a like TeamViewer, but I don't want the desktop, only SSH


title: Stop su from asking for a password

text: I am trying to run the following command as `deploy` from Java (the JVM is running as the user `tomcat`):               sudo -u deploy /path/to/my/bash/script.sh PARAM1 PARAM2      My sudoers file has the following in it:               tomcat ALL=(deploy) NOPASSWD: /path/to/my/bash/script.sh *      But I get `sorry, you must have a tty to run sudo` in my Java application. Therefore, I changed my invocation to be:               su --session-command="/path/to/my/bash/script.sh PARAM1 PARAM2" deploy      But now I get `standard in must be a tty` in Java. I have checked, and by doing the following I can see that `sudo` doesn't prompt for a password but `su` does.               [root@mybox bin]# sudo su tomcat     [tomcat@mybox bin]$ sudo -u deploy /path/to/my/bash/script.sh PARAM1 PARAM2     output of script with PARAM1 PARAM2     [tomcat@mybox bin]$ su --session-command="/path/to/my/bash/script.sh PARAM1 PARAM2" deploy     Password:     su: incorrect password      Obviously `sudoers` is only for `sudo` (hence the name). Is there another way of running the command as `deploy` without a password prompt? I am developing this on centos 6.3 but it will eventually be running on RHEL5.


title: Can the "du" program be made less aggressive?

text: We have a regular job that does `du` summaries of a number of subdirectories, picking out worst offenders, and use the output to find if there are things that are rapidly rising to spot potential problems. We use `diff` against snapshots to compare them. There is a top level directory, with a number (few hundred) of subdirectories, each of which may contain 10's of thousands of files each (or more). A "`du -s`" in this context can be very IO aggressive, causing our server to bail its cache and then massive IO spikes which are a very unwelcome side affect. What strategy can be used to get the same data, without the unwanted side effects?


title: Connecting to wifi network through command line

text: I am trying to connect to my WEP network just using the command-line (Linux). I run:               sudo iwconfig wlan0 mode Managed essid 'my_network' key 'xx:xx:... hex key, 26 digits'      Then I try to obtain an IP with               sudo dhclient -v wlan0      or               sudo dhclient wlan0      without success (tried to ping google.com). I know that the keyword is right, and I also tried with the ASCII key using 's:key', and again, the same result. I get the message below when running dhclient:               Listening on LPF/wlan0/44:...     Sending on   LPF/wlan0/44:...     Sending on   Socket/fallback     DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3       I have no problem connecting with WICD or the standard Ubuntu tool.


title: How to measure on Linux the peak memory of an application after has ended

text: How do I measure the peak memory of an application running on Linux? I run this app in batch so I cannot use RSS since, it reports the current memory. I need the peak memory that the application has used to be reported at the end. The VmPeak is not a solution either, since it reports the allocated memory and also does not calculates from the real Ram but also from the Hard Disk.


title: What after exec() in ls command. Is the parent process printing the output to the console or the child?

text: I have a simple doubt on execution of the command `ls`. As per my understanding from the research I have done on the internet, I understood the below points.   1. When we type ls command shell interprets that command.   2. Then the shell process forks and creates the child process & the parent(shell) executes the `wait()` system call, effectively putting itself to sleep until the child exits.   3. Child process inherits all the open file descriptors and the environment.   4. Then The child process executes an `exec()` of the ls program. This reads the ls program from its program file on disk into the existing [child] process.   5. When the ls program runs to completion it calls `exit()` and it sends a signal to its parent indicating the child has terminated. My doubt starts from here onwards,as soon as ls finishes its tasks ,does it sends the result back to the parent process or it just itself displays the output to the screen?. If it sends the o/p back to parent, then is it using `pipe()` implicitly?


title: All commands that should be used to connect to wifi in command line

text: I would like to switch from gnome to awesome and I would like to connect my wifi network in command line (instead of using gnome tools). So, I searched on the internet and found approximatively the same methods :               ifconfig wlan0 up     iwconfig wlan0 essid "MyNetwork" key THEHEXAKEY     dhclient wlan0      When I run awesome alone and execute those commands, I'm tucked at the 3rd one. It looks like DHCP cannot be resolve (the command continue running endlessly). But when I run awesome in Xephyr and execute the same commands, `dhclient wlan0` works well. So I suppose Gnome do something that I don"t but I can't find what. Could someone help me ?


title: vim switches split afer entering/leaving a folder

text: I'm using `vim` as a browser/navigator (e.g., with `:e ./`). Now, when I enter/leave a folder (e.g. with `-`), `vim` switches to another split. This does not occur always, but often enough to irritate me significantly. Does anyone know how to disable this?


title: Shift-arrow not working in emacs within tmux

text: I recently started using tmux (was a screen user before) and I'm loving it, except for one small problem. I use emacs within my tmux session and I am used to using Shift-arrow keys to move between emacs windows (not tmux windows). When running within tmux, these bindings seem to stop working entirely (it's like they don't register to emacs at all). If I exit tmux and just run emacs in my shell, they work fine. I'm using iTerm2, ssh'd into a Linux box, running tmux/emacs there. I have the Shift-arrow key bindings set up as follows in my .emacs:               (global-set-key "\M-[1;2A" 'windmove-up)     (global-set-key "\M-[1;2B" 'windmove-down)     (global-set-key "\M-[1;2C" 'windmove-right)     (global-set-key "\M-[1;2D" 'windmove-left)      When not running in tmux, I can confirm those are the right character sequences for the shift-arrow key combinations by doing C-q in emacs and then pressing the key sequence. Within tmux, even that doesn't work because it doesn't seem to see any input from the shift-arrow keypress (it just sits at the C-q prompt). Looking at the key bindings for tmux, I don't think anything is bound to Shift-arrow keys and even if it was, they would only register after entering the prefix (which is bound to C-o in my case). Any idea on how to make the shift-arrow keys work again within tmux?


title: How do I upgrade to the newest Firefox via YaST in OpenSuSE 11.x?

text: I'm running OpenSuSE 11.2 and I would like to upgrade to the newest version of Firefox (v 8 I believe at the time of this question). I'm not interested in extracting a tarball, I would like to do it via RPM. Going to this website, http://en.opensuse.org/Firefox#Latest_version, it points me to the Firefox repositories here at http://download.opensuse.org/repositories/mozilla/. I added both the SLE 11 and OpenSuSE factory repositories via `YaST->Software->Software Repositories`. When I go to `Software Management` and search for firefox, I do not see version 8 but my current version. ![enter image description here](http://i.stack.imgur.com/ZMloq.jpg) If I browse the repositories in the browser, however, I plainly see version 8 in both repositories. Installing by clicking on the rpm doesn't work, however, as it cannot manage dependencies that way.


title: How can I change the behavior of hotkeys in xmonad if the program is running?

text: I'm using a few key mappings in my `xmonad.hs` configuration file:               ...         , modMask = mod4Mask     -- Rebind Mod to the Windows key     ...      [ ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")      , ((0, xK_Print), spawn "scrot")      , ((controlMask, xK_f), spawn "firefox")      ]      The third mapping runs `firefox` when pressing `ctrl+f`. I'd like to do something more complex:               if (firefox is running):       focus and maximize firefox window:     else:       run firefox      And I'd like to change `ctrl+f` to `win+f`. How can I do that?


title: How to put Network places and My computer icon on Fluxbox desktop

text: I'm getting used to Fluxbox and it is great... I configured everything (icons, keys...) but I have this problem... I can't manage to put my Netowork places and Computer icons on desktop because I don't know their location in folder hierarchy. I supposed they are handled by Nautilus (I use Fedora 15, gnome 3 env.) and I use this workaround by starting nautilus (without the --no-desktop flag) and I get these icons on desktop... but I was wondering is there a way to integrate these into fluxbox Idesk desktop?


title: Terminal autocomplete: cycle through suggestions

text: I had this on my Ubuntu setup and since I switched to Fedora I want to set it and I forgot how... The idea is simple : I don't want the terminal to show me suggestions when I double `tab`, instead I want it to cycle through every possible suggestion with each press on `tab`... this can be done in Vim also. So when I type `gedit a` and press `tab` it will show me every file with a first letter `a`.


title: Mandatory argument for script to run java program

text: My script is called: `report_startDate` It has the following line:               $JRE_ROOT/bin/java -cp /home/me/report/config/:/home/me/report/jar/reporting-1.0-SNAPSHOT.jar  com.me.project.report.Main $1      `$1` makes it possible to for me to run the script as: `./report_startDate 20140717`. But the script also runs without the date. I want to make it mandatory for whoever runs this script to supply the date. What could I replace `$1` with to make it mandatory to supply date?


title: Iteratively edit a single file

text: I have a single file with a statement that looks like this :               myName_tx_1 VARCHAR(255)     myName_in_1 VARCHAR(255)     myName_tx_2 VARCHAR(255)     myName_in_2 VARCHAR(255)     myName_tx_3 VARCHAR(255)     myName_in_3 VARCHAR(255)     myAddress_tx_1 VARCHAR(255)     myAddress_in_2 VARCHAR(255)     etc      I would like to change this to :               myName_tx_1 VARCHAR(255)     myName_in_1 VARCHAR(1)     myName_tx_2 VARCHAR(255)     myName_in_2 VARCHAR(1)     myName_tx_3 VARCHAR(255)     myName_in_3 VARCHAR(1)     myAddress_tx_1 VARCHAR(255)     myAddress_in_2 VARCHAR(1)     etc      Anyway, the further qualification to the problem is that I only want to change the entries where the name of the attribute ends in 'in$' where $ is a number (like myName_in_3 VARCHAR(255), as an example). As it happens, the '_in' (Indicator attributes) come in pairs, so doing the n~2 (or FNR%2==0) is quite smart, but I do wonder if it's better to identify the '_in$ VARCHAR(255)' as the pattern for change. How would I do this using easily understandable code ? The file is not big, so performance is not the main issue .... just trying to avoid a lot of manual vi editing.


title: XFCE make media keys work globally?

text: I'm running Gentoo with xfce. I also have a logitech keyboard that has media keys like play and pause. The keys work fin in most programs, like vlc, if the program has the focus. I want these keys to work globally whether the program has the focus or not so that if I press pause on the keyboard it will pause no matter if the program has the focus or not. Is there a setting or utility that can make this happen? I have found ways to bind the keys to specific programs, but I want it to work no matter what media program I am using, since I use a few.


title: Sabayon LXDE - SSL problems

text: I am new to linux. I have reinstated an old Pentium M 512mb RAM / 80GB HDD laptop using Sabayon LXDE Everything has been fully installed and updated now. However, while using chronium/firefox to browse the web, every single website using HTTPS protocol is prompting the browser with certificate issues. I can type "proceed" to ignore this, but it's becoming a pain. Is there something I need to do in order to fix this?


title: Useful Linux Podcasts

text: I'm always looking for podcasts that can help me keep up with operating systems and development. That said, I typically listen to the Linux Outlaws podcast, but was wondering if there are other Linux/Unix podcasts that many of you find helpful or informative, both with learning Linux or keeping up with the changes to it.


title: How can I make a configuration web page for a linux appliances? Any pre made solutions available?

text: I am putting together a bunch of embeded linux appliances that we will be installing at a few locations. Built the whole thing from scratch using Raspbian (debian based) and Raspberry Pis. There are a few things to configure inside it, a custom config file, freetds, network settings, and a bunch of other stuff... I know I can put apache on there and develop the whole thing DIY style but there has to be a customizable linux web based dashboard/config page project out there somewere... Its almost unthinkable that no one would have thought of that. I found a bunch of cpanel types of soltions and Webmin packages but they are really aimed at service providers for VPS services and websites or server administration. All I want is something simple to offer a web page like on home routers and be able to customize which options are configurable. It could even be real simple with only links that opens config files and allows editing them right on the web page. Thank you.


title: Why is bash standard on Linux?

text: Most recent Linux distributions include bash as default shell, although there are other, (arguably) better shells available. I'm trying to understand if this is some historical leftover that nobody wants to change, or are there some good reasons that make bash the first choice?


title: How do I install Samba on Red Hat Linux?

text: I have just downloaded the samba-3.6.1.tar.gz file from the Samba website and want to install Samba on my RedHat Linux machine, I have extracted the contents of the samba-3.6.1.tar.gz folder but havent a clue what to do now, is there an RPM file buried in there somewhere I can run? I am very new to Linux! Thanks for any help!


title: bash: Use a variable to store stderr|stdout redirection

text: Is there any way to redirect stdout and stderr via variable like adding command options in script? For example I have a script:               #!/bin/bash -x     TEST=">/dev/null 2>&1"     OPT='-p -v'     mkdir $OPT 123/123/123 $TEST      I can see that OPT is replaced with `-p` without any problems and bash interprets it as option. But redirection interprets as directories name.               $ ./test.sh      + TEST='>/dev/null 2>&1'     + OPT='-p -v'     + mkdir -p -v 123/123/123 '>/dev/null' '2>&1'     mkdir: created directory `123/123'     mkdir: created directory `123/123/123'     mkdir: created directory `>/dev'     mkdir: created directory `>/dev/null'     mkdir: created directory `2>&1'      Is there any way to say bash, that $VAR is redirection, not a dirs names. PS. May be I'm on wrong way, but I want to make optional verbose or non verbose output from my script. But I need some output even in non-verbose mode, therefore I can't just redirect whole stdout and stderr, only from some commands inside of my script.


title: How to ssh to remote server using a private key?

text: I have two servers. Both servers are in CentOS 5.6. I want to SSH from Server 1 to Server 2 using a private key I have (OpenSSH SSH-2 Private Key). I don't know how to do it over unix. But what I did on windows using Putty was to feed my OpenSSH private key to putty-gen and generate a private key in PPK format. However, I would be creating a bash script from server 1 that will execute some commands on server 2 via SSH. How do I SSH to Server 2 using my private key file from Server 1?


title: What is the syntax for passing the output of a command to xargs?

text: As an example I am using `xdotool` to obtain the list of windows on my desktop, which outputs a list of numbers, one on each line. An example command for that is: `xdotool search --name "a_program"`, which lists all the windows, which contain the string `a_program` in their title. An example output would be:               50853718     50853807     50859414      An example command for getting the window title from the number is `xdotool getwindowname 50854718`. How would I construct a command using `xargs` so that the output on every line would be translated to `xdotool getwindowname outputnumber`? The question is mainly about `xargs`, though any comments about `xdotool` would be welcome.


title: Match two words that is on the same line

text: The command that I have prints out two of the lines whenever **FW_6.0.0** is found, below is the code:               grep -oP 'FW_6.0.0, (.*)$' file      Below is the output, both has the same value of **FW_6.0.0**               FW_6.0.0, SUCCESS     FW_6.0.0, OK      I would like to match two words, that is **FW_6.0.0** and **SUCCESS** that can be found on the same line so that it prints this out: `FW_6.0.0, SUCCESS` and eliminates `FW_6.0.0, OK`


title: Is there a way to create a new file and insert text into this file all with bash?

text: I need to change and create several configuration files for some kiosks at work, is there a way to do this with a single bash script? I've heard about SED but the documentation is confusing, could someone give an example?


title: How can I record the sound from multible sources with gtk-recordMyDesktop?

text: I am having problems with sound when I am trying to capture a video. It captures my sound from my mic, but it dosent record the game sounds, skype sounds, vlc sounds, firefox sounds and everything else aswell. Im running Fedora 20 LXDE, with pulseaudio installed(and used? maybe?). And I dont want to change out pulseaudio.


title: What is meant by "Unknown instance" when restarting a service?

text: I am trying to get `vsftpd` file server running on Ubuntu 13.10, I'm unable to connect to the server from another network, although this other network is connected to the server's network and `ping` is working. Something is suspicious about `vsftpd` restarting, when configuring `vsftpd` I'm asked to restart it using:               service vsftpd restart      The output says: "Stop: unknown instance". I don't know what that means?


title: Delete files except n files with the "bigger" name?

text: I want to create a shell script that deletes old release files except last n files. In other words, only mantain last n releases when I deploy a new release. File names have this format:               appname_releasenumber_date.tar.gz      Maybe there's an easy soluction to do this, but I cannot figure out how to do this. I've found this solution Cleaner way to delete files on Linux which include a datestamp as part of file name but I need to generate some files first in order to keep the number of files I want to.


title: Cyrus create mail box gives error permissions denied

text: On freebsd91 64 bit i installed exim as mta and cyrus as imap server. I use               saslpasswd2 root     cyradmin -user root localhost     localhost> cm INBOX.Sent      It gives permissions denied error. In my `/etc/imapd.conf` I've `admins: root cyrus` Can some one please help me to get the imap server ok. I have so far consulted very specially http://www.shellbang.org/freebsd/imap.html and http://oreilly.com/catalog/mimap/chapter/ch09.html and lots other but no solution to permissions problem. Thanks.


title: Does `build_packages` download all libraries again in the case of a failed build?

text: I have been trying to set up and build an image of the Chromium OS from the instructions available here. My laptop was running the `build_packages` script for about 7-8 hours after which it failed on one package. Now, my question is:   * Does the build instruction download all the libraries again? I reran the build instruction today, and it kept reading the downloaded packages, marking them invalid, deleting them and then re-downloading.   * The build instruction is getting stuck after a few packages every time. Now, my connection is working correctly, and I synced with the repository yesterday, so why is it failing to download packages?    * How do I figure out the total progress of the build instruction since the text feedback seems to be fragmented and localised to the package being downloaded and built and not the overall build? * * * Here is the latest failed build log.


title: profile.d on headless server

text: Is it a bad idea to put variables needed by a daemon program running at boot on a headless system in `/etc/profile.d/`? From my understanding `profile.d` doesn't get executed until someone logs into the system via an interactive shell. So would my daemon process that will eventually need the system variables held in `profile.d` not have these variables set, until someone logs into the system, or will these be set after `rc.local` runs on an unattended system? (System is RHEL 6.5 running bash)


title: Change tab size of "cat" command

text: When I am in `vim` I can change the tab size with the following command:               :set ts=4      Is it possible to set tab size for `cat` command output too?


title: How can I view the list of packages that were "suggested" by apt?

text: When installing a package using `apt-get install package` a list of "Suggested packages" is displayed. What command can be used to print it again?


title: Can't switch to console using my own compiled kernel

text: In my Ubuntu, I can't switch to console through `Ctrl`+`Alt`+`Fx` using my own compiled kernel, and a black screen appears. I can switch back through `Ctrl`+`Alt`+`F7`. Using the default Ubuntu kernel, I can switch normally. `dmesg` has no message about this. How can I fix this?


title: How to have a secure Pidgin install?

text: I just installed Pidgin and read about how the passwords are stored in plain text. How do I go about securing stuff up so that my conversations are secure? I read that giving a 400 permission to the accounts.xml is sufficient, but is it really all that it takes to secure Pidgin? What else could be done?


title: Can anyone help me how to install printer in openSUSE 12.1?

text: My laptop was reformatted, from Windows to openSUSE 12.1. My problem is that I'm new to Linux and don't have much technical expertise of solving problems in installation of programs, printers etc... Can any one help me how to install the printer?


title: looking for name of a userspace tool for disk/network caching?

text: I remember seeing a blog post a month back that used a tool in the command which acted like a user space caching tool to buffer/cache reads and writes in RAM to overcome disk or network contention. I think it was a client<=>server type setup. So it allowed you to pipe the output of a command to this tool, which took various parameters, which would cache the data in memory before sending it over the network and i think it worked the same way on the receiving end so if the source and network was faster then the receiving end then it would cache the data in memory before being processing by the receiving end program. So it seemed like a userspace tool that you could put inline with existing arbitrary tools that maybe didn't have native caching abilities and it helped improve speed by exploiting free memory. It might have had some fancy features like dedupe or throttling of bandwidth etc.. but not 100% on that. Anyone recognise this and can point me at the tool name/site?


title: Fedora 17 doesn't detect some key-presses

text: About 1 week ago, I installed MATE desktop (Gnome2 fork) because I wanted to use XMonad in gnome. So I am pretty sure this problem has something to do with MATE. My keyboard is just a basic HP keyboard (US layout); it doesn't have any specialised media/audio keys. So I decided, that since I never use the `Alt_Gr`, `Super_L` and `Menu` keys (3 consecutive keys), I could get the desktop environment to use those effectively as 'media keys'. Until I switched to MATE, I had been using XFCE and this worked very nicely. However now that I try to reconfigure this in MATE, I found that these 3 keys specifically are not detected by the keyboard-shortcuts-setup-utility-thing. I suspected maybe XFCE was blocking them or something, but resetting XFCE's shortcuts to defaults didn't fix it. I even tried manually editing the shortcuts in mateconftool-2 (gconf), without success. I have not been able to detect these 3 keys in any way, and `dmesg` shows nothing of interest. The only way I _know_ they are working is that borders in programs jump, or do something, whenever I press one of these keys. Are there any other tests I can run, or other suggestions?


title: How to access u boot environment from linux?

text: How can I access and change the u-Boot env variables in linux. Using the u-boot/tools/env directory in u boot directory:               u-boot$ make env       Which created the executable file `fw_printenv`. I copied this to /usr/sbin and on target etc/fw_env.config file: * * *               # Configuration file for fw_(printenv/saveenv) utility.     # Up to two entries are valid, in this case the redundand     # environment sector is assumed present.     # MTD device name     Device offset    Env. size    Flash sector size     /dev/mtd0          0x00000                0x20000         0x20000      * * *               target#./fw_printenv     SEGV      What is causing this error? ### /proc/mtd               dev:    size   erasesize  name                                                       mtd0: 00020000 00020000 "flash_uboot_env"                                            mtd1: 002e0000 00020000 "flash_linux_image"                                          mtd2: 00900000 00020000 "flash_jffs2"                                                mtd3: 00900000 00020000 "flash_data"


title: fcsk died with status code 4

text: During boot my laptop says:               fsck died with status code 4      The man page tells me: > The exit code returned by fsck is the sum of the following conditions: > > [..] > > 4 - File system errors left uncorrected When I try to repair the errors as root, fsck says that my disk is clean:               $ fsck /dev/sda1     /dev/sda1, clean [and some things about available blocks]      How can I repair my disk?


title: Specify script to run with SSH upon login

text: I would like to know if there is a way to specify what script to run (on the remote machine) at login. I'm logging into a Debian box with key-pair authentiation (no password needed). The script needed to run will be different, so I don't want to put it into ~/.bashrc, I want to specify it on the command line when I login, something like: `ssh username@ip script_on_remote.sh`


title: How do I make a registered domain name resolve to a local/private IP address

text: I have a Debian Linux server running on my local network. I also have port forwarding set up on my router so that computers outside my network can use my domain name and get to my website/FTP/SSH Server. That works perfectly. When I enter the domain name (or even the public ip address) on the local network however, it times out. To make it work I use the private IP address of the server when at home. This works ok, but it makes things a bit messy. If it's possible I'd like that domain name to resolve to the private address when on the local network. I've done a fair bit of Google searching and I think I need to set up split DNS or maybe dnsspoof. I have no idea how to set up a split DNS and I haven't been able to find a good tutorial for it, but I did follow this tutorial on setting up dnsspoof and I couldn't get it to work. Currently I have bind9 running in a chrooted environment, but have not idea if I'm actually using it. Any suggestions?


title: Is it possible to execute a script as first at shutdown/reboot on Debian?

text: I am currently trying to register a script _(located in the /etc/init.d)_ in a way that makes this script being executed as the first script/programm at shutdown/reboot _(change to running level 0 or 6)_. I used `update-rc.d stop_servers stop 0 0 6 .` to register the script for these two runlevels. It is correctly registered there but has the name `K01stop_servers`. This makes the script not being executed as the first one.   I basically need everything still running. That's why I want it to be the first.   Namely I still need my apache, mysql and (s)ftp servers running and my java still fully functional. How do I achieve this? The script goes as follows:               #! /bin/bash          ### BEGIN INIT INFO     # Provides:          mc_server_safe_shutdown     # Required-Start:    $remote_fs $syslog     # Required-Stop:     $remote_fs $syslog     # Default-Start:     # Default-Stop:      0 6     # Description:       Shuts down all Minecraft serves softly     ### END INIT INFO          /root/.stop_servers          exit 0


I posted a question and noticed people weren't distinguishing correctly between many of these things: Windows Managers vs Login Managers Vs Display Managers Vs Desktop Environment. Can someone please clear this up, i.e. tell us the difference between them and how they are related perhaps? What category does Xorg fall under? What about Gdm/Kdm/Xdm? People also talk about X. What is X?


title: How to install wine on Slackware 14.0 using slackpkg

text: I am trying to install wine, using slackpkg, but it can't find it:               # slackpkg search wine          Looking for wine in package list. Please wait... DONE          No package name matches the pattern.      I can install from SlackBuild, but I would like to use precompiled binaries to save time. Does anybody have experience installing wine in Slack, using slackpkg. I updated the mirrors, but no luck.


title: Chromakey -video-editing in Unix?

text: My friends are recommending me to use OSx for video-editing but trying to use old good OSs such as Debian and Ubuntu. How can I do chromakey -video-editing in some Unix or Linux?


title: "PING" an AP to see if it's alive? (Before associate with it)

text: I would like to detect if a certain AP address is alive, i.e. by "PING" its SSID or MAC address (both known). What program can I use to achieve that? I'm making a simple script that run as root. (I hope I wouldn't be doing this by something like `iwlist scan | grep XX`)


title: Transmission client can't access mounted NFS share

text: I set up transmission-daemon on my Scientific Linux 6.3 machine to download files to a mounted NFS share (mounted during boot via /etc/fstab). The directory that the NFS share is mounted to was chown'ed to the transmission- daemon user and group. In the Transmission web interface, I add a test .torrent file, and got a permission denied error when Transmission tries to access the destination download directory (i.e the mounted NFS share). However, a regular user on the SL 6.3 system can read and write to that share fine. What should I do to resolve this issue? Thanks.


title: Connect to the same network using 2 wireless interfaces

text: I have two wireless interfaces on my raspberry Pi that I'd like to be connected to the same network using DHCP (so each interface has a different IP). What do I need to change in my interfaces file? /etc/network/interfaces               auto lo          iface lo inet loopback     iface eth0 inet dhcp          allow-hotplug wlan0     iface wlan0 inet manual     wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf     iface default inet dhcp      /etc/wpa_supplicant/wpa_supplicant.conf               ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev     update_config=1          network={         ssid="My-Network"         psk="fgted6yf4ty6"     }


title: Best practices for maintaining error logs (system, device driver & application)

text: I have many Pandaboards with Ubuntu armhf and one PC server networked with Wi- Fi. On each embedded board I have a real-time application running constantly. I don't know how to reasonably maintain the logs, because I need to monitor so many things:   1. System faults (filesystem & overheating & misc)   2. Device driver faults (wi-fi & usb)   3. Application shutdowns (crashes & intended ones) Ideas I have so far:   1. Find relevant system faults by filtering syslog, e.g. severity levels 0-3. **How to do this?**   2. Device driver problems should be found from syslog as well.   3. Currently I'm logging cout and cerr to separate files. This does not help if the app crashes. I would guess running in debug mode takes too much processing power and the system won't be real-time any more.   4. Instead of having daily log rotation, I would prefer having one syslog for each time computer is started up OR until the log is too big. Also, I would prefer to rotate the application logs each time the app starts.   5. All severe problems could be piped into one file that is easily readable from the server. Any ideas to efficiently maintain the error logging are welcome. Currently, I'm using Fabric python library for transferring diagnostics info and updates between the server PC and the Pandaboards.


title: Is my USB hard disk dead?

text: My USB hard disk started to make some beep type of sound and then stopped working. I have to replug the hard disk to make it work again. After some time same sound is heard and again it stops working. My USB Hard disk is Transcend StoreJet. Is my USB hard disk dying? I am not sure so I added the syslog output file below. Btw I am using Ubuntu 12.04 Beta 2. Is it because of the beta version of Ubuntu affecting?               Mar 31 22:25:48 talk kernel: [13337.448109] usb 2-3: new high-speed USB device number 8 using ehci_hcd     Mar 31 22:25:48 talk kernel: [13337.582406] usb-storage 2-3:1.0: Quirks match for vid 152d pid 2329: 8020     Mar 31 22:25:48 talk kernel: [13337.582473] scsi7 : usb-storage 2-3:1.0     Mar 31 22:25:48 talk mtp-probe: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-3"     Mar 31 22:25:48 talk mtp-probe: bus: 2, device: 8 was not an MTP device     Mar 31 22:25:49 talk kernel: [13338.622683] scsi 7:0:0:0: Direct-Access     StoreJet Transcend             PQ: 0 ANSI: 2 CCS     Mar 31 22:25:49 talk kernel: [13338.624995] sd 7:0:0:0: Attached scsi generic sg2 type 0     Mar 31 22:25:49 talk kernel: [13338.627119] sd 7:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)     Mar 31 22:25:49 talk kernel: [13338.629874] sd 7:0:0:0: [sdb] Write Protect is off     Mar 31 22:25:49 talk kernel: [13338.629885] sd 7:0:0:0: [sdb] Mode Sense: 28 00 00 00     Mar 31 22:25:49 talk kernel: [13338.630727] sd 7:0:0:0: [sdb] No Caching mode page present     Mar 31 22:25:49 talk kernel: [13338.630738] sd 7:0:0:0: [sdb] Assuming drive cache: write through     Mar 31 22:25:49 talk kernel: [13338.633992] sd 7:0:0:0: [sdb] No Caching mode page present     Mar 31 22:25:49 talk kernel: [13338.634002] sd 7:0:0:0: [sdb] Assuming drive cache: write through     Mar 31 22:25:49 talk kernel: [13338.656453]  sdb: sdb1 sdb2     Mar 31 22:25:49 talk kernel: [13338.659225] sd 7:0:0:0: [sdb] No Caching mode page present     Mar 31 22:25:49 talk kernel: [13338.659232] sd 7:0:0:0: [sdb] Assuming drive cache: write through     Mar 31 22:25:49 talk kernel: [13338.659238] sd 7:0:0:0: [sdb] Attached SCSI disk     Mar 31 22:26:06 talk kernel: [13354.935136] usb 2-3: USB disconnect, device number 8     Mar 31 22:26:06 talk kernel: [13354.939147] sd 7:0:0:0: [sdb] Unhandled error code     Mar 31 22:26:06 talk kernel: [13354.939153] sd 7:0:0:0: [sdb]  Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK     Mar 31 22:26:06 talk kernel: [13354.939160] sd 7:0:0:0: [sdb] CDB: Read(10): 28 00 1d 1d 4b 3d 00 00 6f 00     Mar 31 22:26:06 talk kernel: [13354.939177] end_request: I/O error, dev sdb, sector 488459069     Mar 31 22:26:06 talk kernel: [13354.939320] sd 7:0:0:0: [sdb] Unhandled error code     Mar 31 22:26:06 talk kernel: [13354.939324] sd 7:0:0:0: [sdb]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK     Mar 31 22:26:06 talk kernel: [13354.939329] sd 7:0:0:0: [sdb] CDB: Read(10): 28 00 1d 1d 4b ac 00 00 5f 00     Mar 31 22:26:06 talk kernel: [13354.939344] end_request: I/O error, dev sdb, sector 488459180     Mar 31 22:26:06 talk kernel: [13354.939470] FAT-fs (sdb2): FAT read failed (blocknr 72482)     Mar 31 22:26:59 talk kernel: [13408.240101] ieee80211 phy0: wlan0: No probe response from AP 00:0c:f6:ad:0d:e8 after 500ms, disconnecting.     Mar 31 22:26:59 talk wpa_supplicant[960]: CTRL-EVENT-DISCONNECTED bssid=00:0c:f6:ad:0d:e8 reason=4     Mar 31 22:26:59 talk kernel: [13408.300676] cfg80211: All devices are disconnected, going to restore regulatory settings     Mar 31 22:26:59 talk kernel: [13408.300687] cfg80211: Restoring regulatory settings     Mar 31 22:26:59 talk kernel: [13408.300698] cfg80211: Calling CRDA to update world regulatory domain     Mar 31 22:26:59 talk NetworkManager[860]: <info> (wlan0): supplicant interface state: completed -> disconnected     Mar 31 22:26:59 talk kernel: [13408.309382] cfg80211: Ignoring regulatory request Set by core since the driver uses its own custom regulatory domain     Mar 31 22:26:59 talk kernel: [13408.309390] cfg80211: World regulatory domain updated:     Mar 31 22:26:59 talk kernel: [13408.309393] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)     Mar 31 22:26:59 talk kernel: [13408.309399] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Mar 31 22:26:59 talk kernel: [13408.309403] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Mar 31 22:26:59 talk kernel: [13408.309407] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)     Mar 31 22:26:59 talk kernel: [13408.309411] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Mar 31 22:26:59 talk kernel: [13408.309416] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)     Mar 31 22:26:59 talk NetworkManager[860]: <info> (wlan0): supplicant interface state: disconnected -> scanning     Mar 31 22:27:00 talk wpa_supplicant[960]: Trying to authenticate with 00:0c:f6:ad:0d:e8 (SSID='SitecomAD0DE8' freq=2462 MHz)     Mar 31 22:27:00 talk kernel: [13409.598576] wlan0: authenticate with 00:0c:f6:ad:0d:e8 (try 1)     Mar 31 22:27:00 talk wpa_supplicant[960]: Trying to associate with 00:0c:f6:ad:0d:e8 (SSID='SitecomAD0DE8' freq=2462 MHz)     Mar 31 22:27:00 talk NetworkManager[860]: <info> (wlan0): supplicant interface state: scanning -> associating     Mar 31 22:27:00 talk kernel: [13409.600886] wlan0: authenticated     Mar 31 22:27:00 talk kernel: [13409.601164] wlan0: associate with 00:0c:f6:ad:0d:e8 (try 1)     Mar 31 22:27:00 talk kernel: [13409.605796] wlan0: RX ReassocResp from 00:0c:f6:ad:0d:e8 (capab=0x431 status=0 aid=1)     Mar 31 22:27:00 talk kernel: [13409.605803] wlan0: associated     Mar 31 22:27:00 talk wpa_supplicant[960]: Associated with 00:0c:f6:ad:0d:e8     Mar 31 22:27:00 talk NetworkManager[860]: <info> (wlan0): supplicant interface state: associating -> 4-way handshake     Mar 31 22:27:00 talk wpa_supplicant[960]: WPA: Key negotiation completed with 00:0c:f6:ad:0d:e8 [PTK=CCMP GTK=CCMP]     Mar 31 22:27:00 talk wpa_supplicant[960]: CTRL-EVENT-CONNECTED - Connection to 00:0c:f6:ad:0d:e8 completed (reauth) [id=0 id_str=]     Mar 31 22:27:00 talk NetworkManager[860]: <info> (wlan0): supplicant interface state: 4-way handshake -> completed     Mar 31 22:27:16 talk kernel: [13425.516140] usb 2-3: new high-speed USB device number 9 using ehci_hcd     Mar 31 22:27:16 talk kernel: [13425.667791] usb-storage 2-3:1.0: Quirks match for vid 152d pid 2329: 8020     Mar 31 22:27:16 talk kernel: [13425.667849] scsi8 : usb-storage 2-3:1.0     Mar 31 22:27:16 talk mtp-probe: checking bus 2, device 9: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-3"     Mar 31 22:27:16 talk mtp-probe: bus: 2, device: 9 was not an MTP device     Mar 31 22:27:17 talk kernel: [13426.710254] scsi 8:0:0:0: Direct-Access     StoreJet Transcend             PQ: 0 ANSI: 2 CCS     Mar 31 22:27:17 talk kernel: [13426.711635] sd 8:0:0:0: Attached scsi generic sg2 type 0     Mar 31 22:27:17 talk kernel: [13426.716360] sd 8:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)     Mar 31 22:27:17 talk kernel: [13426.717212] sd 8:0:0:0: [sdb] Write Protect is off     Mar 31 22:27:17 talk kernel: [13426.717219] sd 8:0:0:0: [sdb] Mode Sense: 28 00 00 00     Mar 31 22:27:17 talk kernel: [13426.717965] sd 8:0:0:0: [sdb] No Caching mode page present     Mar 31 22:27:17 talk kernel: [13426.717973] sd 8:0:0:0: [sdb] Assuming drive cache: write through     Mar 31 22:27:17 talk kernel: [13426.720716] sd 8:0:0:0: [sdb] No Caching mode page present     Mar 31 22:27:17 talk kernel: [13426.720723] sd 8:0:0:0: [sdb] Assuming drive cache: write through


title: Looking for a way turn multiples commands with same parameter into a one liner

text: I sometimes end up doing things like: **Example** : from `~/blah`               $ mkdir ~/test-tmp     $ cp * ~/test-tmp     $ cd ~/test-tmp      using the destination dir 3 times in a row. Isn't there a way to turn these into a one-liner command?


title: VM benchmark tools?

text: I would like to benchmark of few XEN-constallations:   * PV DomU   * HVM DomU with PV network and disk drivers   * HVM DomU with emulated IDE and PV network The base will be the same VM with the same disk/cpu/os/network setup based on the same original PV clone. I am especially interested in specific VM numbers:   * For CPU: Ability to switch process context (cs per second?)   * For Memory: Pure RAM-memory throughput read/write   * For Disk: latency of read/write operations   * For Network: Ability to handle many small packets at the same time Is there a good (free) linux tool to test these? Is there a specific benchmark covering virtual machines? I am NOT interested in   * CPU speed benchmark (calculations)   * Disk transfer rate   * Network bandwidth utilization


title: How to make a mirror of Linux Mint package repository with debmirror?

text: I'm using Linux Mint 12 Lisa and for some reason want to have local packages repository. I've done local copies before on Ubuntu and it was easy. But unlike Ubuntu's archive.ubuntu.com, packages.linuxmint.com is a webpage, not directory listing. So I'm stuck... What mirroring command should look like? Sample below.               debmirror -p -v --method=rsync --dist=lisa --root=??? -a=amd64 --nosource --host=packages.linuxmint.com --section=main,upstream,import ~/mirror/lisa


title: Move with possible rename

text: Is it possible to construct a command that will move the file to another directory and if the same file is already there, generate some random string that is not in the name of some file in the directory and rename the file to this random string? I know the `mv -i` command, so I do it manually and files that are contained rename to something else. thank you


title: What is the maximum allowed filename (and folder) size with eCryptfs?

text: I am a new eCryptfs user and I have a very basic question that I wasn't able to find anywhere. I am interested in using eCryptfs via my Synology NAS that uses Linux. While trying to encrypt my folder (EXT4) via Synology's encryption app (eCryptfs) I encounter errors that state that my filename length can not exceed 45 characters in length (so, no encryption). If the limit really is 45 characters, eCryptfs may not be a usable tool for most. What is the maximum allowed filename size when encrypting files and folders with eCryptfs? Is Linux 255 characters?


title: Why is my file system mounted as read-only?

text: I've put together a small system with busybox, a Linux kernel, and a small file system, putting stuff in as it seemed necessary -- I don't know if I've been learning much from this, but I started out pretty clueless, so it sure hasn't been a smooth ride. So I suspect I might be missing some stuff in my filesystem, but I'm really not sure what I might need to add next. I can boot into my system by typing in the following grub commands: ![set root=\(hd0,msdos1\) \\ linux /vmlinuz root=/dev/sda1 \\ boot](http://i.stack.imgur.com/gop8p.png) Once the boot messages stop, I'm left with this (I'm not sure if it's related but there's a line there that says: `VFS: Mounted root (ext3 filesystem) readonly on device 8:1`): ![boot message](http://i.stack.imgur.com/sLM3J.png) I can't modify the filesystem: ![ln: bin/mkdir Read-only file](http://i.stack.imgur.com/U9C1S.png) It's funny because I can manually mount /proc just fine: ![mounting /proc](http://i.stack.imgur.com/qBPiw.png) Why is my file system read-only? What would I need to set up to get it to work?


title: "Drag'n'Drop-Execute" functionality in KDE

text: In Windows you can drag and drop a file into an executable and the executable will be launched with the file as it's first argument. Is such functionality possible on Linux? I'm using OpenSUSE 12.1 with KDE and Konqueror as the file manager.


title: ssh to private-ip

text: I have a computer with CentOS (computer A) that configured as has an private ip 10.150.5.141 (with restricted firewall), can access internet and my ArchLinux VPS (computer B) with real ip w.x.y.z How can I make another pc (computer C) that could access computer B to connect to computer A, but computer C cannot connect to computer A directly (because it's on A's own private network)? I know that a tunnel can open local ports to another computer:port, but how to do the opposite? I want to access computer A using `ssh` through computer B but computer B cannot access computer A, because the network on computer A is restrictive (can go out, but can't go in, because I have no access to their router) I want something like this:               ssh -connect-to w.x.y.z:22 -open-port vvv -forward-to 10.150.5.141 -port 22      so that when I `ssh w.x.y.z:vvv` from computer C it will forwarded to private network `10.150.5.141:22`.


title: How to access a private network behind a router? Can't port forward

text: I have a video surveillance system (a bunch of ip cameras, with private IPs) behind a router in a distant location. The only ISP that's available at that location has provided me with a 3G/4G USB dongle (so basically mobile internet). Apparently this dongle (which connects to the router) does some routing/magic by itself (and is not configurable) so I can't use the router to do port forwarding (not in anyway that helps at least). This means that while the cameras have internet access (so can push information to me), I can't access them directly over the internet (so basically, no live feeds). I'm thinking of getting around this by putting a low power computer (software doesn't really matter much in this question, but I'll use Linux) in the same subnet as the IP cameras - let's call this computer A; I also have a VPS rented somewhere that is publicly accessible via the internet - let's call it B. I think that this setup should allow me to work around the issue with my live feeds. At least conceptually if I get A to open a tunnel to B then via B I should have access to A's network. Presuming the above works (I don't see why not, but .. that's why I'm asking) can you guys recommend a system that can accomplish the above with at little fuss as possible? I mean .. should I set-up a VPN with A as a VPN client and B as a VPN server; then anyone who wants to view the cameras simply connects to the VPN server installed on B? I think this should work, but maybe there's an easier way than setting up VPN on every computer from where I want to check the cameras. I'm not directly interested in the software (I'm sure that exists and I'll manage to configure it) but rather the networking concepts. The ideal situation would be that I'd connect to B on (for example) port 8080 and that traffic will automatically be routed from B through a tunnel to A, at which point a will feed data obtained from camera "1" through that connection; then 8081 from camera "2" and so on.


title: When would an initrd be necessary?

text: I've read that I can boot the kernel without initrd, and I've also read that additional modules are loaded during the initrd stage -- as I understand it, for necessary drivers that weren't included in the kernel. If I build the kernel with `make defconfig && make`, on what kind of hardware can I expect the kernel to boot in? A reasonably modern desktop? Virtualbox? When would I really need initrd/initramfs? I'm trying to put together a minimal system to tets out on Virtualbox, and if possible, I'd like to keep things simple and not use an initrd.


title: How to remove gnome-games package without removing other packages?

text: So I want to remove (more exactly `purge`) some packages like `gnome-games` from Debian 6. As already expected and know by research Aptitude also wants to remove in example the meta-package `gnome`, as without the `gnome-games` the `gnome` package is not fully installed. No problem with that. But now the difference comes: Aptitude also wants to remove a ton of other important packages! How can I just avoid that? I cannot understand what in example `network-manager` has to do with `gnome-games`. Unmarking `gnome-games` as manually installed does not make a difference. However, this is my console dump, if it helps:               root@testing:/home/branch# aptitude purge gnome-games     The following packages will be REMOVED:       gnome-games{p}      0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.     Need to get 0 B of archives. After unpacking 2,490 kB will be freed.     The following packages have unmet dependencies:     gnome: Depends: gnome-games (>= 1:2.30) but it is not going to be installed.     The following actions will resolve these dependencies:          Remove the following packages:     1)     gnome                                 Accept this solution? [Y/n/q/?] Y     The following packages will be REMOVED:     aptdaemon{u} binfmt-support{u} cli-common{u} dnsmasq-base{u} epiphany-extensions{u}     evolution-exchange{u} gdebi{u} gdebi-core{u} gedit-plugins{u} gnome{a}     gnome-codec-install{u} gnome-games{p} gnome-office{u} gnome-themes-extras{u}     gnome-themes-more{u} gtk2-engines-smooth{u} libart2.0-cil{u} libgconf2.0-cil{u}      libgee2{u} libgexiv2-0{u} libglade2.0-cil{u} libglib2.0-cil{u} libgmime2.4-cil{u}      libgnome-vfs2.0-cil{u} libgnome2.24-cil{u} libgnomepanel2.24-cil{u} libgpod-common{u}     libgpod4{u} libgtk2.0-cil{u} libmono-addins-gui0.2-cil{u} libmono-addins0.2-cil{u}     libmono-cairo2.0-cil{u} libmono-corlib2.0-cil{u} libmono-i18n-west2.0-cil{u}     libmono-posix2.0-cil{u} libmono-security2.0-cil{u} libmono-sharpzip2.84-cil{u}     libmono-system2.0-cil{u} libmtp8{u} libndesk-dbus-glib1.0-cil{u} libndesk-dbus1.0-cil{u}     libnm-glib-vpn1{u} libpcsclite1{u} liferea{u} liferea-data{u} media-player-info{u}     mobile-broadband-provider-info{u} modemmanager{u} mono-2.0-gac{u} mono-gac{u}     mono-runtime{u} network-manager{u} network-manager-gnome{u} ppp{u} python-aptdaemon{u}     python-aptdaemon-gtk{u} python-mako{u} python-markupsafe{u} python-vte{u}     python-webkit{u} rhythmbox{u} rhythmbox-plugin-cdrecorder{u} rhythmbox-plugins{u}     shotwell{u} simple-scan{u} software-center{u} tcl{u} tcl8.4{u} tomboy{u} totem-mozilla{u}     transmission-common{u} transmission-gtk{u} update-manager-core{u} update-manager-gnome{u}     update-notifier{u} update-notifier-common{u} usb-modeswitch{u} usb-modeswitch-data{u}     wpasupplicant{u}     0 packages upgraded, 0 newly installed, 79 to remove and 0 not upgraded.     Need to get 0 B of archives. After unpacking 143 MB will be freed.     Do you want to continue? [Y/n/?] n     Abort.      **Edit** : Aptitude wants to remove all the packages as it assumes they are unused after removing the `gnome` metapackage. But that definitely is not the case. How to tell aptitude that it simply keeps those packages? It does not give any other option.


title: Modifiying source code of an application

text: I'm doing a project where i need to change or add some functionality on an Debian based application. I've downloaded the source code but problem is they all have `.rpm` as extension. Anyone know what do I need to do to modify it and how do I do that?


title: Using mdam --examine to write mdadm.conf

text: I'm trying to script the RAID setup for a (growing) number of identical servers. The advice I've seen for using mdadm suggests that once the RAID array has been created you can run `mdadm --examine --scan >> /etc/mdadm.conf` so that the array is initialised on bootup. But that doesn't seem to work for me - in particular the array is presented as `/dev/md/<hostname>:pool`, where the `mdadm --examine` outputs `/dev/md/pool`. Am I doing something wrong? Is there something odd about my version of mdadm?               [root@positron /]# mdadm --create /dev/md0 --level=0 --name=pool --raid-devices=6 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf     [root@positron /]# mdadm --examine --scan     ARRAY /dev/md/pool metadata=1.2 UUID=567da122:fb8e445e:55b853e0:81bd0a3e name=positron:pool     [root@positron /]# ls /dev/md/*     /dev/md/md-device-map  /dev/md/positron:pool     [root@positron /]# cat /dev/md/md-device-map     md127 1.2 22a17d56:5e448efb:e053b855:3e0abd81 /dev/md/positron:pool     [root@positron /]# mdadm --version     mdadm - v3.1.3 - 6th August 2010


title: Some Ossec agents not able to communicate with OSSEC server

text: I have installed Ossec on one server and agents on some other servers running on Redhat. The issue is that some servers are able to communicate and send the logs to servers and others are in INACTIVE state even though I have imported the security keys.               2013/02/23 15:34:34 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.109.1'.     2013/02/23 15:38:30 ossec-agentd: INFO: Trying to connect to server (192.168.109.1:1514).     2013/02/23 15:38:30 ossec-agentd: INFO: Using IPv4 for: 192.168.109.1 .     2013/02/23 15:38:51 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.109.1'.     2013/02/23 15:43:05 ossec-agentd: INFO: Trying to connect to server (192.168.109.1:1514).     2013/02/23 15:43:05 ossec-agentd: INFO: Using IPv4 for: 192.168.109.1 .     2013/02/23 15:43:26 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.109.1'.     2013/02/23 15:47:58 ossec-agentd: INFO: Trying to connect to server (192.168.109.1:1514).     2013/02/23 15:47:58 ossec-agentd: INFO: Using IPv4 for: 192.168.109.1 .     2013/02/23 15:48:19 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.109.1'.     2013/02/23 15:53:09 ossec-agentd: INFO: Trying to connect to server (192.168.109.1:1514).     2013/02/23 15:53:09 ossec-agentd: INFO: Using IPv4 for: 192.168.109.1 .     2013/02/23 15:53:30 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.109.1'.     2013/02/23 15:58:38 ossec-agentd: INFO: Trying to connect to server (192.168.109.1:1514).     2013/02/23 15:58:38 ossec-agentd: INFO: Using IPv4 for: 192.168.109.1 .     2013/02/23 15:58:59 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: '192.168.109.1'      And I checked with Security team and they said that there is a firewall between Host and agents. And they have enabled port 514 UDP on server. But still agents not able to communicate with server # Netstat output               [emerg@Monit ~]$ netstat -panu     (No info could be read for "-p": geteuid()=1344 but you should be root.)     Active Internet connections (servers and established)     Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name        udp        0      0 0.0.0.0:32769               0.0.0.0:*                               -                        udp        0      0 0.0.0.0:514                 0.0.0.0:*                               -                        udp        0      0 0.0.0.0:10000               0.0.0.0:*                               -                        udp        0      0 0.0.0.0:657                 0.0.0.0:*                               -                        udp        0      0 0.0.0.0:660                 0.0.0.0:*                               -                        udp        0      0 0.0.0.0:5353                0.0.0.0:*                               -                        udp        0      0 0.0.0.0:1514                0.0.0.0:*                               -                        udp        0      0 0.0.0.0:111                 0.0.0.0:*                               -                        udp        0      0 0.0.0.0:631                 0.0.0.0:*                               -                        udp        0      0 10.1.1.109:123              0.0.0.0:*                               -                        udp        0      0 192.168.109.1:123           0.0.0.0:*                               -                        udp        0      0 127.0.0.1:123               0.0.0.0:*                               -                        udp        0      0 0.0.0.0:123                 0.0.0.0:*                               -                        udp        0      0 :::32771                    :::*                                    -                        udp        0      0 :::5353                     :::*                                    -                        udp        0      0 fe80::21e:c9ff:fee0:123     :::*                                    -                        udp        0      0 fe80::21e:c9ff:fee0:123     :::*                                    -                        udp        0      0 ::1:123                     :::*                                    -                        udp        0      0 :::123                      :::*        # Contents of Ossec.conf from Ossec HIDS Server               <ossec_config>       <global>         <email_notification>yes</email_notification>         <email_to>systems@advancedoperations.com</email_to>         <smtp_server>10.171.1.10</smtp_server>         <email_from>ossec.osl@advancedoperations.com</email_from>       </global>            <rules>         <include>rules_config.xml</include>         <include>pam_rules.xml</include>         <include>sshd_rules.xml</include>         <include>telnetd_rules.xml</include>         <include>syslog_rules.xml</include>         <include>arpwatch_rules.xml</include>         <include>symantec-av_rules.xml</include>         <include>symantec-ws_rules.xml</include>         <include>pix_rules.xml</include>         <include>named_rules.xml</include>         <include>smbd_rules.xml</include>         <include>vsftpd_rules.xml</include>         <include>pure-ftpd_rules.xml</include>         <include>proftpd_rules.xml</include>         <include>ms_ftpd_rules.xml</include>         <include>ftpd_rules.xml</include>         <include>hordeimp_rules.xml</include>         <include>roundcube_rules.xml</include>         <include>wordpress_rules.xml</include>         <include>vpopmail_rules.xml</include>         <include>vmpop3d_rules.xml</include>         <include>courier_rules.xml</include>         <include>web_rules.xml</include>         <include>apache_rules.xml</include>     "ossec.conf" 162L, 5585C      # Firewall rule                13M 3734M ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.9.1         multiport dports 123,514


title: Fail to tunnel between two Solaris 10

text: I running 2 Solaris 10 box and trying to tunnel them up through Internet. 1 at the hosting site while the other sitting in my office.               ifconfig ip.tun0 plumb     ifconfig ip.tun0 192.168.1.207 192.168.1.239 tsrc 175.139.xxx.xxx tdst 202.187.xxx.xxx     ifconfig: Failure: ip.tun0: Cannot assign requested address      I able to execute the command at the hosting box but fail to execute at the one in my office. Why?


title: the right way to synchronise sources on freebsd

text: **Update** : I'm happy to report @dartonw 's answer worked and I went and did a checkout and then buildworld and it built successfully in about 6 hours. * * * So I've been having some issues with jails in freebsd. I run **FreeBSD9.1 64 bit on EC2** as a small instance. I recently tried :               cd /usr/src;make buildworld      And after nine hours of compiling it gives me :               {standard input}:12044: Warning: end of file not at end of a line; newline inserted     {standard input}:12142: Error: invalid character '_' in mnemonic     c++: Internal error: Killed: 9 (program cc1plus)     Please submit a full bug report.     See <URL:http://gcc.gnu.org/bugs.html> for instructions.     *** [TransAutoreleasePool.o] Error code 1     Stop in /usr/src/lib/clang/libclangarcmigrate.     *** [all] Error code 1     Stop in /usr/src/lib/clang.     *** [all] Error code 1     Stop in /usr/src/lib.     *** [lib__L] Error code 1     Stop in /usr/src.     *** [libraries] Error code 1     Stop in /usr/src.     *** [_libraries] Error code 1     Stop in /usr/src.     *** [buildworld] Error code 1     Stop in /usr/src.      I came across this article which says :               Let's synchronise sources.                   # cd /usr/share/examples/cvsup/         # cp standard-supfile /etc/freebsd-supfile          The list CVSup mirror sites is here.      But, the link says: > Warning: cvsup has been deprecated by the project, and its use is not > recommended. Subversion should be used instead. What should I do then? Where can I find an updated article? Should I update my ports collection?


title: Does uClibc support using pthreads?

text: I recently attended an embedded Linux course that stated that uClibc does not support the use of `pthreads` and that it only supports `linuxthreads`. Furthermore, the course instructor implied that `linuxthreads` were next to useless. However, when reading a number of online articles, the implication is that they are in fact supported. Furthermore, when building a root file system and kernel image for a target embedded device using buildroot, I can see that I have `libpthread-0.9.33.2.so` and `libpthread.so.0` files in the `/lib` directory of my target root file system. I am really confused about the nature of the conflicting information I have received and would be very grateful if anyone could actually clarify the situation for me.


title: Make zkbd ignore $DISPLAY

text: Is it possible to make zkbd ignore `$DISPLAY` variable? I have set up when I log in to different X sessions and it is annoying if suddenly I need to reenter/copy configuration (and I have no idea why `$DISPLAY` could affect keyboard settings).


title: Installing Debian on USB

text: From my `Ubuntu`, I want to create a bootable `Debian` USB. I tried to install Debian with `debootstrap`. A brief list of commands is               mount /dev/sdb1 /mnt     debootstrap sid /mnt http://ftp.debian.org/debian     chroot /mnt     apt-get install linux-headers-3.2.0-4-686-pae linux-image-3.2.0-4-686-pae     apt-get install grub2     grub-install --recheck /dev/sdb      I have edited the `/mnt/etc/fstab` to include the `USB drive` with its `UUID`. But my problem is installing `grub` from within `chroot`, I get the following error               /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).      I do not want to touch the grub of my `ubuntu` machine, I want to install the grub on my USB to be bootable on other machines. What step/command I have missed?


title: cannot send signal to VGA using VGA-to-HDMI adapter

text: This is the output of `lspci -v`:               00:02.0 VGA compatible controller: Intel Corporation Mobile 945GSE Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])             Subsystem: Samsung Electronics Co Ltd Device c05d             Flags: bus master, fast devsel, latency 0, IRQ 16             Memory at f0000000 (32-bit, non-prefetchable) [size=512K]             I/O ports at 1800 [size=8]             Memory at d0000000 (32-bit, prefetchable) [size=256M]             Memory at f0200000 (32-bit, non-prefetchable) [size=256K]             Expansion ROM at <unassigned> [disabled]             Capabilities: <access denied>             Kernel driver in use: i915      This is the output of `xrandr`               Screen 0: minimum 320 x 200, current 1024 x 600, maximum 32767 x 32767     LVDS1 connected 1024x600+0+0 (normal left inverted right x axis y axis) 223mm x 125mm        1024x600       60.0*+        800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     VIRTUAL1 disconnected (normal left inverted right x axis y axis)      The problem is that I'm using an hdmi input via VGA adapter because my netbook only has a vga output. As you can see it seems the monitor is not connected but it is. I already tried using `xrandr` with `\--auto` and `\--addmode` with no positive outcome on both VGA1 and VIRTUAL1.


title: How does "rm" on a NTFS filesystem differs from Windows' own implementation?

text: I have an external USB disk with an NTFS filesystem on it. If I remove a file from Windows and I run one of the several "undelete" utilities (say, TestDisk) I can easily recover the file (because "it's still there but it's marked as deleted"). If I remove the file from Linux no utility (unless I use a deep-search signature-based one) can recover the file. Why? How is unlink implemented in Linux's NTFS file system code? It looks like it does not just "mark it as deleted" but it wipes away some on-disk structure, is this the case?


title: How can I dump the full system memory?

text: After starting VirtualBox, the computer became sluggish and then hung completely due to OOM. Usually, OOM should be starting killing processes in order to free up some space, but this did not happen (this was the second time that I experienced this). I had some unsaved important work in a text editor, so I was hoping to find it back in the system RAM after killing all processes in the current console using `SysRq` + `K`. The machine in question is a laptop with 8 GiB RAM running Linux x86_64 3.7.5 with a SSD as target disk. My first attempt was `dd if=/dev/mem of=memory`, but this failed after reading 1MiB of data. Next, I tried `dd if=/dev/fmem of=memory bs=1M`, but this stopped after reading 3010461696 bytes (exactly 2871 MiB). After looking at `/proc/mtrr` (shown below), I decided to try adding `skip=4096`. This ultimately slowed down, reading at a speed of only 3 MiB/sec, so I interrupted it (yielding a file of 5.8 GiB). (at least the last 100 MiB of the file contains `FF`s)               reg01: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back     reg02: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back     reg03: base=0x100000000 ( 4096MB), size= 4096MB, count=1: write-back     reg04: base=0x200000000 ( 8192MB), size= 1024MB, count=1: write-back     reg05: base=0x23c000000 ( 9152MB), size=   64MB, count=1: uncachable     reg06: base=0x0b4000000 ( 2880MB), size=   64MB, count=1: uncachable     reg07: base=0x0b8000000 ( 2944MB), size=  128MB, count=1: uncachable      I could not find the data I had open for some hours in the text editor, so I believe I have skipped some memory while doing a dump. So, given my goal (recovery of data from userspace programs), what is the most efficient method to dump the system memory to a file? What are some points that must be considered while doing such a dump?


title: How to read '\n' into variable with Bash's built-in command?

text: Somehow I'm not able to `read` the trailing `\n` sign into the `REPLY` variable. Under any circumstances I want to avoid a blank line that results from the `\n` being echoed by `read` but `echo` one in case of another character. Given:               declare -l REPLY     read >&2 -r -N 1 -p "Acknowledged? (y):" REPLY     if [[ "$REPLY" != $'\n' ]]; then       echo >&2     fi      For me a possible workaround is it to make `read` to suppress (`-s`) echoing the input. But ideally the user should see the single character he input after the prompt. Also `IFS= read -d''` doesn't get me the `\n` character into the variable. Any ideas?


title: pv for directory copy

text: I need to copy a very large directory (talking in terabytes here) and want to monitor the progress. I found that `pv` is a nice utility, but how can I use it for copying directories recursively? (`pv src > dst` doesn't work because they are directories) PS: Running on OS X Mountain Lion, `pv` was installed from Mac Ports