LXC migrate between hosts

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)


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

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


Stop su from asking for a password

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.


Can the "du" program be made less aggressive?

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?


Connecting to wifi network through command line

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.


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

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.


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

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?


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

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 ?


vim switches split afer entering/leaving a folder

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?


Shift-arrow not working in emacs within tmux

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?


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

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.


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

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?


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

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?


Terminal autocomplete: cycle through suggestions

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`.


Mandatory argument for script to run java program

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?


Iteratively edit a single file

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.


XFCE make media keys work globally?

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.


Sabayon LXDE - SSL problems

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?


Useful Linux Podcasts

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.


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

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.


Why is bash standard on Linux?

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?


How do I install Samba on Red Hat Linux?

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!


bash: Use a variable to store stderr|stdout redirection

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.


How to ssh to remote server using a private key?

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?


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

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.


Match two words that is on the same line

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`


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

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?


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

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.


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

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?


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

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.


Cyrus create mail box gives error permissions denied

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.


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

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.


profile.d on headless server

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)


Change tab size of "cat" command

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?


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

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?


Can't switch to console using my own compiled kernel

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?


How to have a secure Pidgin install?

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?


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

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?


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

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?


Fedora 17 doesn't detect some key-presses

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?


How to access u boot environment from linux?

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"


fcsk died with status code 4

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?


Specify script to run with SSH upon login

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`


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

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?


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

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?


How to install wine on Slackware 14.0 using slackpkg

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.


Chromakey -video-editing in Unix?

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?


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

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`)


Transmission client can't access mounted NFS share

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.


Connect to the same network using 2 wireless interfaces

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"     }


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

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.


Is my USB hard disk dead?

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


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

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?


VM benchmark tools?

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


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

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


Move with possible rename

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


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

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?


Why is my file system mounted as read-only?

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?


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

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.


ssh to private-ip

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`.


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

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.


When would an initrd be necessary?

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.


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

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.


Modifiying source code of an application

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?


Using mdam --examine to write mdadm.conf

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


Some Ossec agents not able to communicate with OSSEC server

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


Fail to tunnel between two Solaris 10

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?


the right way to synchronise sources on freebsd

**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?


Does uClibc support using pthreads?

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.


Make zkbd ignore $DISPLAY

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).


Installing Debian on USB

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?


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

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.


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

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?


How can I dump the full system memory?

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?


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

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?


pv for directory copy

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


Weird mouse behaviour. Mouse too fast

When I move my mouse slowly over the desktop the pointer jumps often a few pixels (one or two) in the opposite direction of which I move my mouse. Horribly when trying to set the cursor around some semicolons in eclipse. I guess this is the result of a wrong set resolution. I suppose this is because the mouse was set initially really fast and even if I do `xset m 1/2 3`, the mouse is just to fast and unprecise for me. It aready tried to configure the xorg.conf like this:               Section "InputDevice"         Identifier  "Configured Mouse"         Driver      "mouse"         Option      "Device"    "/dev/mouse"         Option      "Protocol"  "Auto"         Option      "Name" "Logitech G3"         Option      "Resolution" "2000"     EndSection      But with no effect. **EDIT** But one new thing I recognized is that, in the mouse settings, I can slide the slider to max or to min. Mouse behaviour (sensitivity) does not change. I found somthing curoious too in /var/log/Xorg.0.log:               [   257.409] (II) config/udev: Adding input device Logitech USB Gaming Mouse (/dev/input/event1)     [   257.409] (**) Logitech USB Gaming Mouse: Applying InputClass "evdev pointer catchall"     [   257.409] (II) Using input driver 'evdev' for 'Logitech USB Gaming Mouse'     [   257.409] (**) Logitech USB Gaming Mouse: always reports core events     [   257.409] (**) evdev: Logitech USB Gaming Mouse: Device: "/dev/input/event1"     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Vendor 0x46d Product 0xc042     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found 20 mouse buttons     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found scroll wheel(s)     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found relative axes     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found x and y relative axes     [   257.409] (II) evdev: Logitech USB Gaming Mouse: Configuring as mouse     [   257.409] (II) evdev: Logitech USB Gaming Mouse: Adding scrollwheel support     [   257.409] (**) evdev: Logitech USB Gaming Mouse: YAxisMapping: buttons 4 and 5     [   257.409] (**) evdev: Logitech USB Gaming Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [   257.409] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.1/usb3/3-1/3-1:1.0/input/input1/event1"     [   257.409] (II) XINPUT: Adding extended input device "Logitech USB Gaming Mouse" (type: MOUSE, id 8)     [   257.409] (II) evdev: Logitech USB Gaming Mouse: initialized for relative axes.     [   257.409] (**) Logitech USB Gaming Mouse: (accel) keeping acceleration scheme 1     [   257.409] (**) Logitech USB Gaming Mouse: (accel) acceleration profile 0     [   257.409] (**) Logitech USB Gaming Mouse: (accel) acceleration factor: 2.000     [   257.409] (**) Logitech USB Gaming Mouse: (accel) acceleration threshold: 4     [   257.409] (II) config/udev: Adding input device Logitech USB Gaming Mouse (/dev/input/mouse0)     [   257.409] (II) No input driver specified, ignoring this device.     [   257.409] (II) This device may have been added with another device file.      Still my question is: **How do I setup my mouse correctly in Debian wheezy?**


Port 110 visible to the outside world - necessary or a bad idea?

I just did [a test][1] that told me my gateway's (debian squeeze) port 110 is visible from outside. It's a box with two network cards, eth0 is for my internal network (192.168.1.0/24) and eth1 goes to "the internet" (as ppp0). Is an open port 110 on the outside connection a necessity when I run postfix, use the box to collect mail using fetchmail, and have the mail collected by internal boxes using pop3 (popa3d)? Is everything o.k. as long as my postfix has a main.cf with lines like these?               mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24     inet_interfaces = 192.168.1.1, 127.0.0.1      where 192.168.1.0/24 is my home network and 192.168.1.1 is eth0? Or was I stupid and opened a port I should rather have closed or invisible to the outside network?


How to tell if a SCSI device is removable?

In DMESG I see: `[sdb] Attached SCSI removable disk`   1. How does Linux decide what is removable and not removable?   2. Is there a way I can look up if a device is "removable" or not other than the log, for example somehwere in /sys or /proc?


Keyboard shortcut to launch Nemo

In Windows you can type `Super`+`e` to launch the file explorer. I find this really useful, particularly because almost every action I take starts with search for a file or folder. Is there an equivalent keyboard shortcut to launch Nemo in Linux Mint? (In an ideal world, there'd also be a way to run a file/folder search from the keyboard)


Why are my drives referred to as '(hda0,msdos5)' etc in grub instead of (hda0,5), (hda0,sda5) etc that you usually see?

I'm fiddling about trying to get a multiboot system (win7, ubuntu, lion) on one drive working with grub 2, but was wondering what the msdos part meant on my system. I don't see it like that on any of the examples online.


Install key 3G Huawei E1752 in Debian

I have a PC without a CD ROM drive. I have a connection with Orange 3G, using a Huawei E1752 device. I want to install Debian on my hard drive from a 15BG USB Disk. I tried with Debian Live but that does not give you an option to install Debian on your hard disk. So is it possible to install Debian with a desktop environment (GNOME or KDE) on my drive that would work like this?   * create a bootalbe USB containing Debian NetInstall   * start this USB Debian NetInstall   * install the 3G Huawei E1752 Orange with the command line   * connect to the Internet   * install and update GNOME or KDE from the Internet.


HDCP Software Implementation

How to do software implementation of HDCP for Linux ?


huge .sujournal file on FreeBSD

I am running out of space and when I checked, I found that I have               # pwd     /usr     # ls -l .sujournal     -r--------  1 root  wheel  33554432 Dec 31  1969 .sujournal      I wanted to ask should/can I remove it? Any implications of that?


How to get gnome-music playing music

I've updated my Suse system to the latest version of gnome -3.12 and the latest version of Suse 13.1. I've installed the new gnome music application, but whenever I've tried to get a song to play, I'm greeted with this weird red x balloon error: ![Red X Balloon Error](http://i.stack.imgur.com/BCSLT.png) Music works fine in `banshee` and when I run as root in terminal, I get this message:                    gnome-music     Traceback (most recent call last):       File "/usr/bin/gnome-music", line 38, in <module>         from gnomemusic.application import Application       File "/usr/lib/python3.3/site-packages/gnomemusic/application.py", line 36, in <module>         from gnomemusic.window import Window       File "/usr/lib/python3.3/site-packages/gnomemusic/window.py", line 38, in <module>         from gnomemusic.query import Query       File "/usr/lib/python3.3/site-packages/gnomemusic/query.py", line 32, in <module>         class Query():       File "/usr/lib/python3.3/site-packages/gnomemusic/query.py", line 35, in Query         GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC)     TypeError: Argument 0 does not allow None as a value      Why do the above errors appear?


Fail to start graphic interface

I'm using Linux Mint 14 and have faced the following problem recently: after removing and installing some of the software (torchat and LibreOffice to be exact) and rebooting I found myself not being able to log into my system. first thing I noticed was simply a console line offering to enter my login and password, after that it greeted me with               bash: /usr/lib/git-core/git-sh-prompt: No such file or directory      all my attempts to run **startx** resulted in nothing but a black screen with an active mouse arrow briefly serfing the net I've found that installing mdm could be a possible solution, however, after I did that, I've started logging into this very black screen immediately, skipping any time in console, so had to remove it. None of any other methods found on the internet seem to work. here's the log file for startx: _first lots of built-in extensions are being initialized_               loading extension GLX     The XKEYBOARD keymap compiler (xkbcomp) reports:     Warning: Compat map for group 2 redefined     Using new definition     Warning: Compat map for group 3 redefined     Using new definition     Warning: Compat map for group 4 redefined     Using new definition     Errors from xkbcomp are not fatal to the X server      this report repeats 3 times and in the end I get:               xinit: connection to X server lost     waiting for X server to shut down Server terminated successfully (0). Closing log file.     xinit: unexpected signal 1      I'd appreciate any suggestions about working this mess out. Thanks in advance **update** _output for ~/.xsession-errors_               Xsession: X session started for root at Wed May 7 17:35:27 MSK 2014     localuser: root being added to access control list     Setting IM through im-switch for locale=all_ALL     Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default     Failed to connect to the VirtualBox kernel service     Failed to connect to the VirtualBox kernel service     Failed to connect to the VirtualBox kernel service     Failed to connect to the VirtualBox kernel service


Play sound when suspending and resuming

I'm trying to get my sound theme all working how I want it. Reading the sound naming spec by freedesktop, it has an entry "suspend-start" and "suspend-end", which is supposed to fire when the machine is "about to suspend", and then when "the machine has returned from a suspended state" as well as the "system-ready" and "system-shutdown" entries. I've got most of the sounds working in the theme, except for these. I am running arch Linux with `systemd` controlling my power stuff. I'm also running gnome3. I have another script at `/usr/lib/systemd/system-sleep/`, which turns off and on my USB ports, when the system goes into suspend and hibernate mode and back on when the system thaws or resumes. So I figured that I could just call `canberra` in a similar fashion. I created another script just like the one for my USB for the sounds:               #!/bin/sh     # File: /usr/lib/systemd/system-sleep/sound.sleep          case $1/$2 in             pre/*)                     # Play suspend-start                     exec canberra-gtk-play -i "suspend-start"             ;;             post/*)                     # Play suspend-resume                     exec canberra-gtk-play -i "suspend-resume"             ;;     esac      While I can see in the journal that it is run, it doesn't put out any sound. I'm not sure about why, but I have a feeling that the audio system has already gone down by the time this is called. (Don't quote me on that, I have nothing more than, "it doesn't work, but it should" to base it on.) This isn't super important, but just something I would kind of like to figure out more for fun. If anyone has any suggestions or ways to actually get it working, that would be fantastic. If you need anything more, just comment. Extra System information:   * Arch linux   * 3.15.3-1-ARCH   * GNOME Shell 3.12.2   * pulseaudio 5.0   * alsactl 1.0.28 (Basically, I also have alsa sound)


share host folder with Vritual machine guest problem (centos 6.5)

I have centos 6.5 installed kvm. Then I created a virtual machine and tried to share the host folder (e.g. /mnt) with virtual machine using 9p_virtio. (follow this guide: http://www.linux-kvm.org/page/9p_virtio) However, in virt-manager. It shows the "Filesystem" menu is gray with this error "not supported for this hypervisor/libvirt combination". I did some search online and some people said "the "Filesystem Passthrough" feature is still so new that it is not yet available for CentOS-6." I am wondering if this is still a bug for centos 6.5 and if there is a way to alternatively solve this problem. ![enter image description here](http://i.stack.imgur.com/LJnx1.png)


Git / Jenkins permission problem

OS: Ubuntu server 10.04 LTS I have a strange issue going on with permissions and can't seem to track down what is causing it. The setup is as follows: Git Repository folders (and files in them) are owned by root, and the group we use for the projects has rws rights, for example:                  ll /path/to/project        drwxrwsr-x 7 root project                4096 2013-03-14 19:19 project      Our jenkins user is member of the all the groups we create for the projects, including the one in the example. The jenkins application is started by the jenkins user to make sure it has full access to the project folders. If i remove the read and execute rights for "others" on these git folders our builds fail, stating:                fatal: '/path/to/project' does not appear to be a git repository      ps: no SELinux in play


apache mod_security and performance

I have a list of bots to block, so I was thinking that fail2ban could be a solution until I realized that mod_security would be more efficient in this kind of tasks. The number of bots is huge, so the file of configuration will contain a long list. My question is about performance (memory, processor, disk ..etc): Is having a huge list of bots to block will affect the performance of apache in a site with huge traffic ?


USB-HDD connected to router "disconnects" automatically

I have a USB-HDD, formatted as ext3 connected to my router, so I can use it as a home-network storage. It works quite well, however, when sending a lot of files to the harddrive (I tried to do a backup/syncing of my complete home- folder with unison), it silently cannot be accessed at some random time. That means - I can neither read nor write to the drive, restarting the router is the only thing that works. By restarting I mean to unplug the eletricity- cable. When I reset the router with the reset-function, it won't connect to the internet again. When I restart the HDD (it has a power switch), it is still not accessible. The drive stops working also when I copy a lot of files with nautilus. It works fine if I only copy some files. I've mounted it as an Samba device, as this is was my router is a capable of. I also tried an FTP-drive, but the same thing occurs. Is this an router security issue (a lot of files at the same time--I'll block that device!)? Or an GNOME/gvfs/nautilus issue (I access the drive via /run/user/1000/gvfs/smb-share....)? Or something else I didn't think about?


HDD unique identifier

I would like to automount some hdd on logon, how can I check if connected HDD (via USB) is exactly that HDD which I am thinking of, and that there were no partition changes on it. Above information I would use to identify my encrypted HDD, or maybe some other values I should use... ?


Washed out colours with screencast software but not screenshot on Ubuntu (all versions)

I have experimented with screencast software on Ubuntu over a number of LTS versions and using pretty much every software I can get my hands on. I have used VLC, RecordMyDesktop and some others the names of which escape me. I tried this when Ubuntu shipped with GNome and now with Unity as well. The problem is the same. The colours are always washed out regardless of the software I use or the version of Ubuntu I am running. The answer seems to be to open a video editor and mess about with contrast, saturation and brightness to get something a bit more acceptable. The capture is generally rendered after capture as an OGG file and the image is all there just hidden under messed up settings. I am yet to get my video to look the same as my screen shots even though when I take a static screen shot the colours and contrast and brightness are all exactly right (ie the same as what I see on the screen). So what I need to know is what I need to change to get the contrast and brightness settings back under control so they are right to start with. I have Googled the living daylights out of this problem but have yet to find much help beyond the fact that the contrast and brightness are wrong by default. I just want to record a screencast and then watch it in VLC or whatever and see what I saw when I made the cast. There is probably a lot I do not know about Ubuntu/Linux even though I have been using it for years now so I am happy to be educated. That said I would appreciate being told if and how any backups should be made before trying something in case it does not work happily (not to mention how to recover from said fails). If there is no known answer on the subject of why the contrast and brightness are wrong and how to fix it then at least something I put into practice to get close to screen colour as possible in the screencast.


Calendar.vim E492: Not an editor command: Calendar

I am trying to install the calendar.vim plugin on mac osx snow leopard running gvim. I have pathogen.vim installed, so I followed the instructions on github to install calendar.vim from the terminal:               cd ~/.vim/bundle     git clone git://github.com/mattn/calendar-vim      I've got it, and everything appears to be where it is supposed to be, as far as I can tell, but it isn't working. I type `:Calendar` a get the error:               E492: Not an editor command: Calendar      I've tried `:calendar` also, I have restarted vim and no luck. What am I missing?


Locating the /dev entry to make partitions on an SD card

I am trying to create partition of SD card, for this I am following this tutorial. When I type the command               ll /dev/mmcblk*      I got this               ls: cannot access /dev/mmcblk*: No such file or directory      So, I check the list of items in /dev by typing this command               ls /dev/      I got a big list of items but there is nothing like `mmcblk0` or `mmcblk1`. The list I am getting is this               autofs           dvdrw     loop4               psaux  ram6    sdb       tty10  tty24  tty38  tty51  tty8       ttyS2   ttyS5    vcs6     block            ecryptfs  loop5               ptmx   ram7    sdb1      tty11  tty25  tty39  tty52  tty9       ttyS20  ttyS6    vcs7     bsg              fb0       loop6               pts    ram8    sg0       tty12  tty26  tty4   tty53  ttyprintk  ttyS21  ttyS7    vcsa     btrfs-control    fd        loop7               ram0   ram9    sg1       tty13  tty27  tty40  tty54  ttyS0      ttyS22  ttyS8    vcsa1     bus              full      loop-control        ram1   random  sg2       tty14  tty28  tty41  tty55  ttyS1      ttyS23  ttyS9    vcsa2     cdrom            fuse      mapper              ram10  rfkill  shm       tty15  tty29  tty42  tty56  ttyS10     ttyS24  uhid     vcsa3     cdrw             hidraw0   mcelog              ram11  rtc     snapshot  tty16  tty3   tty43  tty57  ttyS11     ttyS25  uinput   vcsa4     char             hpet      mei                 ram12  rtc0    snd       tty17  tty30  tty44  tty58  ttyS12     ttyS26  urandom  vcsa5     console          input     mem                 ram13  sda     sr0       tty18  tty31  tty45  tty59  ttyS13     ttyS27  v4l      vcsa6     core             kmsg      net                 ram14  sda1    stderr    tty19  tty32  tty46  tty6   ttyS14     ttyS28  vcs      vcsa7     cpu              log       network_latency     ram15  sda2    stdin     tty2   tty33  tty47  tty60  ttyS15     ttyS29  vcs1     vga_arbiter     cpu_dma_latency  loop0     network_throughput  ram2   sda3    stdout    tty20  tty34  tty48  tty61  ttyS16     ttyS3   vcs2     vhost-net     disk             loop1     null                ram3   sda4    tty       tty21  tty35  tty49  tty62  ttyS17     ttyS30  vcs3     video0     dri              loop2     port                ram4   sda5    tty0      tty22  tty36  tty5   tty63  ttyS18     ttyS31  vcs4     zero     dvd              loop3     ppp                 ram5   sda6    tty1      tty23  tty37  tty50  tty7   ttyS19     ttyS4   vcs5      I have followed this tutorial before but I do not any idea what's wrong this time. So,please tell how to get mmcblk list.


Disable iptables service on CentOS

I don't want the service to start after reboot. my code does this:               service iptables stop     service iptables save     chkconfig --level 123456 iptables off     service iptables status     iptables: Firewall is not running.      but after reboot:               [root@cteraportal ~]# service iptables status     Table: filter     Chain INPUT (policy ACCEPT)     num  target     prot opt source               destination          Chain FORWARD (policy ACCEPT)     num  target     prot opt source               destination          Chain OUTPUT (policy ACCEPT)     num  target     prot opt source               destination      why is it starting at boot even after the chckonfig off?