Failing to block brute force ssh with iptables

I'm trying to block (slow down) brute force attacks on my sshd server. I'm following this guide http://www.rackaid.com/resources/how-to-block-ssh-brute- force-attacks/ which basically says I need to just enter the 2 commands below.               sudo iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set     sudo iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent  --update --seconds 60 --hitcount 4 -j DROP      My sshd port is 6622, so I changed the entries from "22" to "6622", and put those commands in. Then I attempted to simply test the new iptables. I went to another pc and purposefully put in the wrong login password several times. Unfortunately, the new rules don't seem to be stopping me from trying as much as I want. Listed below are my current rules. What am I doing wrong?               # iptables --list          Chain INPUT (policy ACCEPT)     target     prot opt source               destination              DROP       tcp  --  anywhere             anywhere             tcp dpt:6622 state NEW recent: UPDATE seconds: 60 hit_count: 4 name: DEFAULT side: source                tcp  --  anywhere             anywhere             tcp dpt:6622 state NEW recent: SET name: DEFAULT side: source          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination                   Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination                   Chain LOGDROP (0 references)     target     prot opt source               destination              LOG        all  --  anywhere             anywhere             LOG level warning     DROP       all  --  anywhere             anywhere


crashplan desktop alternative?

Is there a good alternative (free software) for Crashplan for UNIX desktops? There is a plethora of backup systems out there, but there doesn't seem to be one that rivals with Crashplan. The specifications are:   * continuous, seemless backup   * intuitive desktop user interface   * backups to remote servers (aka "the cloud"), local hard drives, friends   * incremental backups   * encryption for remotes   * optionally: "go back in time" Similar questions:   * Open alternative to crashplan friends - focuses exclusively on the "friends" functionality   * Easy incremental backups to an external drive - no desktop interface, no remote server   * easy rsync solution with file manager (thunar or nautilus or…) - simply a workaround   * Comparison of backup tools - on askubuntu.com


Problem with sed on a array containing strings containing spaces

I have a array looking like this:               array=("(1 2 3) (123)" "2 31 (231)" "4 5 1 (451)" "(te)xt (1234)")      This array is a example. It does not look like this but its structure is the same _(the strings have the same structure)_.   If I want to use the single strings in a `select` loop I can do it like this:               select string in "${array[@]}"     do        # do something     done      But the string in the parentheses is not for display. So I used sed to remove them:               echo "${array[@]}" | sed -r 's/ \([0-9]+\)$//g'      This did not work. Only the last parentheses were removed and the strings have been merged together. But how can I achieve the desired result which would be the same as the following example:               array2=("(1 2 3)" "2 31" "4 5 1" "(te)xt")          select string in "${array2[@]}"     do        # do something     done


Wifi works in local, no internet connection. Debain 7

I installed debain on an old PC, the KDE version. I have internet over wired. I can connect to my router, I and can ping it over wifi - ping 192.168.1.1 is successful. I can ssh into other machines, connected to the same network. I cannot access external web sites via wifi though, cannot ping successfully any ip, too i.e ping 8.8.8.8 results in a timeout. Here are               root@debian:/home/deckoff# ifconfig          eth0  Link encap:Ethernet  HWaddr 00:0a:e4:2d:4a:a0             inet addr:192.168.1.124  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::20a:e4ff:fe2d:4aa0/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:1419 errors:0 dropped:0 overruns:0 frame:0           TX packets:759 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:563318 (550.1 KiB)  TX bytes:179940 (175.7 KiB)          eth1  Link encap:Ethernet  HWaddr 00:0e:35:b4:04:64             inet addr:192.168.1.123  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::20e:35ff:feb4:464/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:944 errors:1 dropped:1 overruns:0 frame:0           TX packets:52 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:137654 (134.4 KiB)  TX bytes:8203 (8.0 KiB)           Interrupt:21 Base address:0x8000 Memory:d0220000-d0220fff           lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:16436  Metric:1           RX packets:120 errors:0 dropped:0 overruns:0 frame:0           TX packets:120 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:9264 (9.0 KiB)  TX bytes:9264 (9.0 KiB)      etc/network/interfaces               # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).          # The loopback network interface     auto lo     iface lo inet loopback      root@debian:/home/deckoff# route -n               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1     192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1      root@debian:/home/deckoff# traceroute 8.8.8.8               traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets      1  192.168.1.1 (192.168.1.1)  5.144 ms  8.733 ms  10.349 ms      2  * * *      3  * * *          27  * * *     28  * * *     29  * * *     30  * * *      The adapter is eth1. It uses the ipw2200-bss.fw firmware, which I installed during system installation ,if this info is of any help for solving my problem. Yes, the name of the interface is eth1, an it's been that way on every linux distro I installed on this PC?!?!?


Limit program execution to a list of arguments

I would like that my Unix users can only run a specific command `insecurecommand` with a controlled list of arguments stored in a file. The only solution I have found at this time is to :   1. Create a new security group called `cmdxg`   2. Limit the execution of the command to this group:              chown root:cmdxg /.../insecurecommand     chmod 750 /.../insecurecommand        3. Create a setgid wrapper, which executes the command:              ls -al /.../mywrapper     -rwxr-sr-x 1 root cmdxg /.../mywrapper      The only problem is that `insecurecommand` is executed with `gid=cmdxd` and not with the users real gid. However, I'd like to avoid running the `insecurecommand` command setgid. If in the wrapper code, I go back to real gid with seteuid(), it can't run the `insecurecommand` anymore because the process lost the `cmdxg` right. Is it a way to run a command that needs privileged gid rights, but with the real gid ? Maybe I need to decompose the program execution ? -> first load the binary with the privileged effective gid -> go back to the real gid -> run the program But how can I do this ? Any ideas ?


How do I set mouse double click speed in Lubuntu

I'm using Lubuntu 11.10. The only problem I have that the mouse double click speed is a bit high (it seems to me that it is around 100-200ms) and I would like it to set it to around 500ms. Is there a way to do it? I tried using Openbox Configuration Manager but that only changes the double click speed for window headers. But in PCManFM for example it is still around 200ms.


archive.ubuntu.com missing raring-updates

My Linux Mint 15 install on VirtualBox was working great up until about two days ago, when the updater started throwing a ton of errors and refuses to progress with any `apt-get update`, `apt-get install`, or `apt-get upgrade`. They are 404 errors on the `archive.ubuntu.com` site, under the `/ubuntu/dists/raring-updates` folder. I looked at it, it doesn't exist. Here's a direct link, which shows there is no raring-updates. Where has `raring-updates` gone and what can I do to fix this?


Run script when specific users logout

I need to run my application in screen when specific users are logged out and kill the screen when someone from my user list logged in. So I am thinking about bash script, which will be called periodically from cron and:   1. Checks if specific users are logged in.   2. If nobody is logged in - spawn screen and save pid to file or do nothing if pid file already exists   3. If someone is logged in - read pid from file and kill screen I am looking for more sophisticated alternatives, which will eliminate periodically running script from cron.


Chat application for monitoring with scripts

I am looking for a chat application, which would have the ability to interact with a shell script. I need this for a home project. An example of the usage would be: A client sends a chat message to a server. It analyzes the incoming message and takes an action in the form of executing a (`bash`) script. Initially the idea came from this wonderful article. My case is similar, but I will be not using a modem, rather `gnokii` or `Gammu`/`Wammu` with a mobile phone. For the server I am using Debian Wheezy. The clients should be able to use Windows, Linux (Debian in most cases) and Android. Therefore ideally this system would use Skype - both for the chatting and for voice calls. However, Microsoft has decided to drop the support on Skype APIs and that would make the job harder. I am also not very experienced with `Delphi` and `Python`, as there seem to be some APIs and libraries for those languages. I have some background in `C`, `bash` and `Perl`. So, I considered using a bot in Skype like `sevabot`, but have not tried that yet. In addition, it is not very sure for how long Skype will have the existing APIs. Another very nice option seems to be `LinPhone` with all the above features available. I would need to figure out a bit deeper the interaction with `linphonec` and `linphonecsh`, but this software seems to be quite nice. Other ideas that came are using `Pidgin` or any other chat client that could fulfill the above requirements. Another option would be if I could get this idea realized in the form of a webpage. I have an apache webserver on the Debian machine, which is running a small Wordpress site. But I think such a setup will be harder to do and not so efficient. And finally, maybe one of the easiest options would be to use E-mail for such a communication. However, this would be not so streamlined and efficient. I would appreciate all the ideas you may have. Which is the most efficient, fast and long-lasting manner to accomplish this goal?


why would curl and wget result in a 403 forbidden?

I try to download a file with `wget` and `curl` and it is rejected with a 403 error (forbidden). I can view the file using the web browser on the same machine. I try again with my browser's user agent, obtained by http://www.whatsmyuseragent.com. I do this:               wget -U 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' http://...      and               curl -A 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' http://...      but it is still forbidden. What other reasons might there be for the 403, and what ways can I alter the `wget` and `curl` commands to overcome them? (this is not about being able to get the file - I know I can just save it from my browser; it's about understanding why the command-line tools work differently) **update** Thanks to all the excellent answers given to this question. The specific problem I had encountered was that the server was checking the referrer. By adding this to the command-line I could get the file using `curl` and `wget`. The server that checked the referrer bounced through a 302 to another location that performed no checks at all, so a `curl` or `wget` of that site worked cleanly. If anyone is interested, this came about because I was reading this page to learn about embedded CSS and was trying to look at the site's css for an example. The actual URL I was getting trouble with was this and the `curl` I ended up with is               curl -L -H 'Referer: http://css-tricks.com/forums/topic/font-face-in-base64-is-cross-browser-compatible/' http://cloud.typography.com/610186/691184/css/fonts.css      and the wget is                wget --referer='http://css-tricks.com/forums/topic/font-face-in-base64-is-cross-browser-compatible/' http://cloud.typography.com/610186/691184/css/fonts.css      Very interesting.


bash/shell pathname expansion for mkdir, touch etc?

So doing something like this in `bash` and most other shells won't work to create multiple subdirectories or files within subdirectories...               mkdir */test     touch */hello.txt      There are of course many ways of actually doing this, my preferred one is to use `find` when possible rather than using a `for` loop, for readability mainly. But my question is, why do the above not work?   From what I understand it's because the full destination file/path does not exist but surely that's a good thing if I'm trying to `mkdir` or `touch`. I've always just moved on and never really questioned it.   But does anyone have a decent explanation for this that will help me understand once and for all?


How do I set the user of php-fpm to be php-user instead of www-data?

I am using php-fpm on debian with nginx for php5 support. I would like to have php-fpm to be under the user&group php-user instead of www-data. I thought the init.d script would have the user mentioned or uses a file which has www-data written in it. Yet I don't see it. How do I spawn this process to be under user php-user:php-user? Here is the php5-fpm init.d script on my server. I tried looking at start-stop-daemon man pages but didn't see it. I'm sure this is simple but I don't know how to do it.               #!/bin/sh     ### BEGIN INIT INFO     # Provides:          php-fpm php5-fpm     # Required-Start:    $remote_fs $network     # Required-Stop:     $remote_fs $network     # Default-Start:     2 3 4 5     # Default-Stop:      0 1 6     # Short-Description: starts php5-fpm     # Description:       Starts PHP5 FastCGI Process Manager Daemon     ### END INIT INFO          # Author: Ondrej Sury <ondrej@debian.org>          PATH=/sbin:/usr/sbin:/bin:/usr/bin     DESC="PHP5 FastCGI Process Manager"     NAME=php5-fpm     DAEMON=/usr/sbin/$NAME     DAEMON_ARGS="--fpm-config /etc/php5/fpm/php-fpm.conf"     PIDFILE=/var/run/php5-fpm.pid     TIMEOUT=30     SCRIPTNAME=/etc/init.d/$NAME          # Exit if the package is not installed     [ -x "$DAEMON" ] || exit 0          # Read configuration variable file if it is present     [ -r /etc/default/$NAME ] && . /etc/default/$NAME          # Load the VERBOSE setting and other rcS variables     . /lib/init/vars.sh          # Define LSB log_* functions.     # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.     . /lib/lsb/init-functions          #     # Function to check the correctness of the config file     #     do_check()     {         [ "$1" != "no" ] && $DAEMON $DAEMON_ARGS -t 2>&1 | grep -v "\[ERROR\]"         FPM_ERROR=$($DAEMON $DAEMON_ARGS -t 2>&1 | grep "\[ERROR\]")              if [ -n "${FPM_ERROR}" ]; then         echo "Please fix your configuration file..."         $DAEMON $DAEMON_ARGS -t 2>&1 | grep "\[ERROR\]"         return 1         fi         return 0     }          #     # Function that starts the daemon/service     #     do_start()     {         # Return         #   0 if daemon has been started         #   1 if daemon was already running         #   2 if daemon could not be started         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \             || return 1         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \             $DAEMON_ARGS 2>/dev/null \             || return 2         # Add code here, if necessary, that waits for the process to be ready         # to handle requests from services started subsequently which depend         # on this one.  As a last resort, sleep for some time.     }          #     # Function that stops the daemon/service     #     do_stop()     {         # Return         #   0 if daemon has been stopped         #   1 if daemon was already stopped         #   2 if daemon could not be stopped         #   other if a failure occurred         start-stop-daemon --stop --quiet --retry=TERM/$TIMEOUT/KILL/5 --pidfile $PIDFILE --name $NAME         RETVAL="$?"         [ "$RETVAL" = 2 ] && return 2         # Wait for children to finish too if this is a daemon that forks         # and if the daemon is only ever run from this initscript.         # If the above conditions are not satisfied then add some other code         # that waits for the process to drop all resources that could be         # needed by services started subsequently.  A last resort is to         # sleep for some time.         start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON         [ "$?" = 2 ] && return 2         # Many daemons don't delete their pidfiles when they exit.         rm -f $PIDFILE         return "$RETVAL"     }          #     # Function that sends a SIGHUP to the daemon/service     #     do_reload() {         #         # If the daemon can reload its configuration without         # restarting (for example, when it is sent a SIGHUP),         # then implement that here.         #         start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME         return 0     }          case "$1" in         start)         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"         do_check $VERBOSE         case "$?" in             0)             do_start             case "$?" in                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;             esac             ;;             1) [ "$VERBOSE" != no ] && log_end_msg 1 ;;         esac         ;;         stop)         [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"         do_stop         case "$?" in             0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;             2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;         esac         ;;         status)             status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?             ;;         check)             do_check yes         ;;         reload|force-reload)         log_daemon_msg "Reloading $DESC" "$NAME"         do_reload         log_end_msg $?         ;;         restart)         log_daemon_msg "Restarting $DESC" "$NAME"         do_stop         case "$?" in           0|1)             do_start             case "$?" in                 0) log_end_msg 0 ;;                 1) log_end_msg 1 ;; # Old process is still running                 *) log_end_msg 1 ;; # Failed to start             esac             ;;           *)             # Failed to stop             log_end_msg 1             ;;         esac         ;;         *)         echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2         exit 1         ;;     esac          :


Why would we su without -?

When we do `su John` I switch as user John.   When we do `su - John` I switch as user John having user John's environment.   As far as I can see the first option is useless. What is the use of switching to another user and not have that user's environment?   Am I wrong? What is the difference in use cases between these 2 options?


pure-ftpd permission denied on external usb drive

I have a sheevaplug PC (Debian installed) that I'm trying to setup my personal FTP server with. So far I was able to set up auto mounting and installed pure- ftpd. I currently have autofs setup to mount the external USB drive to the home dir of a user called "xt" (/home/xt/usb1) Here's the mounting options I used:               usb1 -fstype=auto,umask=000,uid=1000,gid=1000,rw,nosuid,nodev,user :/dev/sda1      And the `pure-ftpd` cmd:               pure-ftpd -S 400 -c 30 -B -j -E      With the way it is now, I'm able to browse all dirs fine, I can even upload, rename and delete files outside of the usb drive. However inside the usb drive, I can browse files only (denied access to downloads, uploads, delete, etc...). I did an `ls -l /home/xt/usb1` and all dirs are listed as: `drwxrwxrwx` on the permissions colum so on paper, I should be able to do anything to the drive.


CentOS 6.5 applications won't minimize on lower panel

I believe this question is related to something that happened earlier today. Right now, when I press minimize on any Gnome application, it dissappears, is still running, but I cannot get to it to restore it. Should I reset my Gnome desktop, and how do I do that?


A window asking me to enter my ssh passphrase is popping up randomly. Why?

I'm on Ubuntu 14.04. For a few weeks now a small window keeps popping up randomly, grabbing my keyboard and asking me to enter the passphrase for my ssh key. The Window's title says "OpenSSH", and it states the path of the private key file it wants to unlock. Of course, I don't do it, because I don't know where this request is coming from. Sometimes, after I hit cancel, a warning window pops up, saying that something might be eavesdropping on my session, because the keyboard could not be grabbed. This sounds very suspicious to me. I can't remember doing anything with ssh that might cause this behavior. How would I go about finding out where these ssh key requests are coming from and how to stop them?


What does size of a directory mean in output of 'ls -l' command?

What does size of a directory mean in output of `ls -l` command?


What's the size of a folder entry?

> **Possible Duplicate:**   >  What does size of a directory mean in output of 'ls -l' command?               user@~ > ll /tmp/foo     drwxr-xr-x 2 user user 4,0K  1 oct.  15:15 bar      What are those 4,0K ? Is there somewhere an article about them ?


ls -ld /dir, Solaris

Always when I run `ls -ld /dir` the output give me the size = 512 even if there are files in it or not. but when I run `du -sh` the output give me the actual size of the directory including its content.


Can't use my old my.cnf from MySQL 5.5.38 in newer 5.6.19

Ok so I have been trying to upgrade MySQL 5.5 to 5.6. I have been given this set my.cnf file (see below). I was able to uninstall the MySQL 5.5 rpms and install the 5.6. When I reload the back up my.cnf file the mysql server does not want to start. Is there something wrong with this file? I have ran `mysql_install_db`. However, I cannot get the server to start up with my `my.cnf` file. I have looked in the error log, but it hasn't been copying anything recent to it. The `my.cnf` works when it is blank. This is what my `my.cnf` file from MySQL 5.5 looks like (see below). I need this my.cnf file to work on the 5.6 version. Anyone have any incite?               # You can copy this to one of:     # - "/etc/mysql/my.cnf" to set global options,     # - "~/.my.cnf" to set user-specific options.     #     # One can use all long options that the program supports.     # Run program with --help to get a list of available options and with     # --print-defaults to see which it would actually understand and use.     #     # For explanations see     # http://dev.mysql.com/doc/mysql/en/server-system-variables.html     # This will be passed to all mysql clients     # It has been reported that passwords should be enclosed with ticks/quotes     # escpecially if they contain "#" chars...     # Remember to edit /etc/mysql/debian.cnf when changing the socket location.     [client]     port            = 3306     socket          = /u02/mysqldata1/mysqld_3306.sock     #     #     [mysqld_safe]     socket          = /u02/mysqldata1/mysqld_3306.sock     nice            = 0     #     #     [mysqld]     #performance_schema=1     user            = mysql     socket          = /u02/mysqldata1/mysqld_3306.sock     port            = 3306     basedir         = /usr     datadir         = /u02/mysqldata1/data/3306     tmpdir          = /u02/mysqldata/tmp     skip-external-locking     character_set_server    = utf8     lower_case_table_names  = 1     #     # Instead of skip-networking the default is now to listen only on     # localhost which is more compatible and is not less secure.     # bind-address            = 0.0.0.0     max_allowed_packet              = 64M     max_connections                 = 500     max_connect_errors              = 100     max_heap_table_size             = 256M     tmp_table_size                  = 256M     net_buffer_length               = 8K     sort_buffer_size                = 4M     read_buffer_size                = 1M     read-rnd-buffer-size    = 2M     table_cache                     = 1024     table-definition-cache  = 512     thread_stack                    = 256K     thread_cache_size               = 256     sql-mode                        = NO_AUTO_CREATE_USER     query_cache_size                = 64M     query_cache_limit               = 4M     #     # MyISAM Configuration     #     key_buffer_size                 = 512M     myisam_sort_buffer_size         = 128M     ft_min_word_len                 = 3     myisam_recover_options          = BACKUP,FORCE     myisam_repair_threads           = 6     myisam_use_mmap                 = 1     #     # General Logging     #     log_error                       = /u02/mysqldata/mysqllog/3306/err/error.log     long_query_time                 = 1     slow_query_log                  = 1     slow_query_log_file             = /u02/mysqldata/mysqllog/3306/slow/mysql_slow.log     general_log                     = 0     general_log_file                = /u02/mysqldata/mysqllog/3306/general/mysql_general.log     #     # Binary Log and Replication Configuration     #     log_bin                        = /u02/mysqldata/mysqllog/3306/bin/mysql-bin.log     log-bin-index         = /u02/mysqldata/mysqllog/3306/bin/mysql_bin.index     binlog-cache-size     = 256K     binlog_format         = ROW     #binlog_do_db           = include_database_name     #binlog_ignore_db       = include_database_name     relay-log               = /u02/mysqldata/mysqllog/3306/relay/mysql_bin.log     relay-log-index         = /u02/mysqldata/mysqllog/3306/relay/mysql_bin.index     expire-logs-days        = 7     max_binlog_size         = 100M     sync_binlog             = 0     #     # Replication     #     server-id=129206     #log-slave-updates     #replicate-ignore-db = mysql     #replicate-ignore-table=     slave_transaction_retries = 20     #slave-skip-errors = 1062     #auto_increment_increment = 3     #auto_increment_offset = 3               #     # InnoDB Configuration     #          innodb_file_format                      = Barracuda     innodb_file_format_max                  = Barracuda          innodb_data_home_dir                    = /u02/mysqldata1/innodb/3306/data     innodb_log_group_home_dir               = /u02/mysqldata1/innodb/3306/log     innodb_file_per_table     innodb_data_file_path                   = ibdata1:10M:autoextend          transaction-isolation                   = READ-COMMITTED          innodb_flush_log_at_trx_commit          = 0     innodb_log_buffer_size                  = 8M     innodb_log_file_size                    = 512M          innodb_buffer_pool_size                 = 500M     innodb_additional_mem_pool_size         = 128M          innodb_flush_method                     = O_DSYNC     innodb_thread_concurrency               = 0     innodb_lock_wait_timeout                = 60     innodb-open-files                       = 500     innodb-support-xa                       = 0               #     #     # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".     #     # ssl-ca=/etc/mysql/cacert.pem     # ssl-cert=/etc/mysql/server-cert.pem     # ssl-key=/etc/mysql/server-key.pem          [mysqldump]     quick     quote-names     max_allowed_packet      = 128M          [mysql]     #no-auto-rehash # faster start of mysql but no tab completition          [isamchk]     key_buffer              = 1G


Fedora 18 : install input method

I'm using Fedora 18. I choose ibus in input method selector. In ibus, I choose preference to change input method. But I just see english-english method. I cannot choose input method for another language.(there is a dropbox, but all language is blur, but english). So, I don't know how to choose another language. (in my case is japanese and vietnamese). I have tried a command when I google:               yum install scim-lang-japanese      but my terminal notice that this package does not exist. Please teach me, how to add another input method for my language in ibus. thanks :)


Why are man pages blank for non-root users?

. . . And how can I fix that? :-) I'm running RHEL 5 and when I try to view man pages as a regular user, they are blank. I've tried `man man > manman.txt; cat manman.txt` and there is no output, i.e., the file has no length. I try `sudo man man` and I see beautiful man page output. I've looked at the permissions under /usr/share/man and they look okay. The directories are all o+rwx and the files are o+r. I've tried . . .               [me@host01 ~]$ sudo man -w man     /usr/share/man/en/man1/man.1.gz     [me@host01 ~]$ man /usr/share/man/en/man1/man.1.gz      . . . and that's blank also.


Why does the command shuf file > file leave an empty file?

I know this is sort of a duplicate of another question (Why this sort command gives me an empty file?) but I wanted to expand on the question in response to the answers given. The command `shuf example.txt > example.txt` Returns a blank file, because the shell truncates the file before shuffling it, leaving only a blank file to shuffle. However, `cat example.txt | shuf > example.txt` will produce a shuffled file as expected. Why does the pipeline method work when the simple redirection doesn't? If the file is truncated before the commands are run, shouldn't the second method also leave an empty file?


How to mount an encrypted TrueCrypt partition always in the same point?

I just formatted my external HD and divided it in two partitions: an ext4 where important information will be, and a ntfs for "compatibility" things (i.e. movies, music, etc). I encrypted the ext4 partition with TrueCrypt but now I'm facing a problem I hadn't before: instead of mounting in `/media/DATA/` it is mounting in `/media/truecryptX`, where X is the number of virtual device selected in TrueCrypt. I know that if I always mount the partition as device 1, the mount point will be always `/media/truecrypt1/`, but I would like to have some other point more "meaningful" like `/media/DATA/`. For example the ntfs partition is always mounted as `/media/DATANTFS/` because it isn't encrypted.


Installing linux-3.14.8 un Arch Linux while 3.15 is already in testing

I'm currently running kernel 3.14.6 on Arch Linux from Core repo. I would like to install 3.14.8 (which is the latest of 3.14 series) because it contains a fix that is suitable for me. However linux package in Arch Linux core repo is still at 3.14.6 and it has been marked as out-of-date as in testing we already have 3.15. So this tells me that 3.14.8 will never land in arch linux repo... is there a way to get pre compiled 3.14.8 (64 bit) to install in Arch Linux without having to build it from source? Thanks


git archive fatal: Operation not supported by protocol

I can do `git clone` like so ...                git clone https://github.com/stackforge/puppet-heat.git      ... with no problems. But I want to exclude all the git meta stuff that comes with the cloning, so I figured I would use `git clone` but I get this error:               $ git archive --remote=https://github.com/stackforge/puppet-heat.git      fatal: Operation not supported by protocol.      Anyone know why or what I am doing wrong?


What's the difference between pkill and killall?

I know that `pkill` has more filtering rules than `killall`. My question is, what is the difference between:               pkill [signal] name      and               killall [signal] name      I've read that `killall` is more effective and kill all processes and subprocesses (and recursively) that match with `name` program. `pkill` doesn't do this too?


SSH proxy laptop

I run a simple ssh proxy and I am always on the move with my laptop. Having to restart it every time I open the lid and connect to the internet.               sshpass -p password ssh -D 9999 root@myvpsip      Is it possible to have it start when my internet does then stop when the internet connection is terminated?               Network Manger     Cinnamon DE     Arch Linux x64


Native linux installation on another drive, alongside Windows 7

I have Windows 7 on my `C:` (primary) drive. Can I install another hard drive, and put Linux on it to ensure that there will be no conflicts?


Edit tree to output in custom format?

I'd like to get a custom output from the `tree` command, but unlike this question, I don't have a fixed format. I'd like to be able to give the command the format in an argument (for instance perhaps `-f=y`, `-f=yaml`,`-f=xml`,`-f=~/myformat.fmt`). Obviously this is a huge undertaking, but I feel it would be a good way to get to explore how some of the linux commands work under the hood, along with stretching my programming skills. Where should I start if I want to edit (and I presume compile etc) 'native' Linux commands? Are they baked in?


Bash globbing and argument passing

I have the following simplified bash script               #!/bin/bash          files=("$@")          if [ "X$files" = "X" ]; then       files=$HOME/print/*.pdf;     fi          for file in "${files[@]}"; do       ls "$file";     done      If I pass arguments (file names) as parameters this script will print the proper file names. On the other hand, if I don't pass arguments, it will print               /home/user/print/*.pdf: No such file or directory      Why are the file names not expanded in this case, and how do I fix it? Note that I use the `files=("$@")` and `"${files[@]}"` constructs because I read that it is to be preferred over the usual "files=$*".


Count number of sessions and email as a body

I want to create a script to achieve followings : 1.login to Essbase MaxL               essmsh -l admin password on localhost;      2.Count the number of lines in the output of command display session all;               display session all; | wc -l  < /filepath/filename.ext       3.Email the the counted number of lines to a set of recipients as email-body like below : **Total number of Sessions = bla-number**               display session all; | wc -l   > file.tmp     mailx -s "Subject" emailaddresses < file.tmp     rm file.tmp      how we can get all 3 through a single script ? **EDIT** Based on Casey's answer, the single script now I have :               #!/bin/bash          #Maxl zone starts.....     essmsh -l admin password -s localhost -i << EOF          spool on to 'output.txt';     display session all;     spool off;          EOF     #Maxl zone ends.....          wc -l output.txt  > file.tmp           mailx -s "Subject" emailaddresses < file.tmp     rm file.tmp


Limiting write rate of a device

How does one go about limiting the write/read rate of a device, E.G., USB drive, SD card? Motivation behind this question is covered here (superuser.com).


How to make system startup to not wait on particular systemd service start

I have few virtual machines running under libvirt, and they are stared on the host system startup. This is controlled by libvirtd.service systemd configuration. This delays the availability of the host system tty until all the virtual guests are started. How should I configure systemd to not wait on successful start of libvirtd, and leave it to start in the background?


Set alias which doesn't send specified text?

**EDIT** I set a alias task in `~/.bashrc`. The following:               alias join="clear; screen -ls; screen -rx [<ID_OF_THE_RUNNING_SCREEN> quit]"      If i the task `join` is executed, the following has to pre-fill my commandline: `screen -rx` I will add `[<ID_OF_THE_RUNNING_SCREEN>] quit`. -- How does I have to edit the alias, that this will be my result? --


Send Fax with GSM modem on hylafax?

I have a couple of questions related to using a GSM modem for faxing.   1. I wanted to know if it's possible to send faxes with the hylafax-server from a GSM modem?   2. If possible can you please explain how one would go about setting this up and demonstrating how it would work?   3. Does this work well? Is it robust or does it work sporadically?


Divide a variable by a number?

Basically I need to convert centimetres to inches which I am trying to do by diving the area in centimetres by 2.54. But I just cannot get this to work.               echo "please enter width and then height"          read width     read height          area=$(($width * $height))     inchesarea=$((area / 2.54))          echo $area     echo $inchesarea      Should I be using `bc` for this?


IPTables 1.4.7 dropped allowed packet

When looking in the `/var/log/messages` file I found this line: > May 23 10:56:02 localhost kernel: IP4T Invalid TCP flags IN=eth0 OUT= > MAC=70:5a:b6:ec:95:6b:00:23:48:ad:b0:a4:08:00 SRC=A.B.C.D DST=192.168.1.27 > LEN=40 TOS=0x00 PREC=0x00 TTL=116 ID=27653 DF PROTO=TCP SPT=443 DPT=58520 > WINDOW=0 RES=0x00 ACK RST URGP=0 I have these `iptables` rules in the `filter` table:               Chain INPUT (policy DROP 0 packets, 0 bytes)     num      pkts      bytes target     prot opt in     out     source               destination     1           0        0 TCPFlagsCheck  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0     2           0        0 ACCEPT     tcp  --  eth0   *       0.0.0.0/0            192.168.1.27        tcp spt:80 state ESTABLISHED     3           0        0 ACCEPT     tcp  --  eth0   *       0.0.0.0/0            192.168.1.27        tcp spt:443 state ESTABLISHED     4           0        0 ACCEPT     udp  --  eth0   *       192.168.1.1          192.168.1.27        udp spt:53     5           0        0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4          Chain FORWARD (policy DROP 0 packets, 0 bytes)     num      pkts      bytes target     prot opt in     out     source               destination          Chain OUTPUT (policy DROP 0 packets, 0 bytes)     num      pkts      bytes target     prot opt in     out     source               destination     1           0        0 TCPFlagsCheck  tcp  --  *      *       0.0.0.0/0            0.0.0.0/0     2           0        0 ACCEPT     tcp  --  *      eth0    192.168.1.27         0.0.0.0/0           tcp dpt:80 state NEW,ESTABLISHED     3           0        0 ACCEPT     tcp  --  *      eth0    192.168.1.27         0.0.0.0/0           tcp dpt:443 state NEW,ESTABLISHED     4           0        0 ACCEPT     udp  --  *      eth0    192.168.1.27         192.168.1.1         udp dpt:53     5           0        0 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4          Chain TCPFlagsCheck (2 references)     num      pkts      bytes target     prot opt in     out     source               destination     1           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x10 /* R ACK */     2           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x18 /* R ACK PSH */     3           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x12 /* R SYN ACK */     4           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x02 /* R SYN */     5           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x04 /* R RST */     6           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x11 /* R ACK FIN */     7           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x19 /* R ACK PSH FIN */     8           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x14 /* R ACK RST */     9           0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x01 /* R FIN */     10          0        0 LOG        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4 prefix `IP4T Invalid TCP flags '     11          0        0 DROP       tcp  --  *      *       0.0.0.0/0            0.0.0.0/0      I had doubts so I wrote the same command to check if the rule is correct:               $ iptables -A TCPFlagsCheck -j RETURN -p tcp --tcp-flags ALL ACK,RST \         -m comment --comment "R ACK RST"      and this creates:               12          0        0 RETURN     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x3F/0x14 /* R ACK RST */      Why was this packet dropped?


What -A INPUT -j REJECT --reject-with icmp-host-prohibited Iptables line does exactly?

What do the following lines do? I have been reading redhat iptables documentation but can't figure it out. ... -j REJECT **--reject-with icmp-host-prohibited**   ... -j REJECT **--reject-with icmp-host-prohibited**


How to restore a system?

I have a disk image from Acronis True Image 2011. My original disk, of 40 GBs, had 2 partitions, 1 for FS and 1 for swap, but it started to fail. I've tried to make a backup, which finished with some read errors. Then, I've tried to restore it in a 160 GB disk, selecting the 2 partitions, and MBR and track 0. The thing is that it is not booting, I only see a `_` in the screen and nothing happens. The question is if it is possible to re-install Debian, and then copy ALL the `/*` files, to get my programs and data back, or is more difficult than that.


Linux Mint 15 does not Hibernate

I just did an install of Linux Mint 15 Olivia with Cinnamon, and it's been running fine so far. However, I just tried to hibernate the system by doing Menu -> Quit -> Hibernate, and it just brings me to the lock screen. When I log back in however, I think I can tell it's trying to hibernate as it disconnects from my wireless. Has anyone else had/solved this issue? Edit: It's a Lenovo X201t, and `uname -r` gives `3.8.0-19-generic`. Edit2: Using integrated graphics, Intel HD 3000. 6GB of RAM and SWAP.


sed first n occurrences result set between 2 tags / patterns

I have a big XML file and I get all occurrences between 2 tags: Here is what I do:               sed -n '/<tag>/,/<\/tag>/p' file.xml      And I need to filter to get only first N occurrences. I've tried with l param but it was not enough :( So any one knows how to get N matched occurrences from all resultset? For Example. Here the xml file content :               <?xml version="1.0" encoding="UTF-8"?>     <root>     <tag>      <t1>john</t1>      <t2>john</t2>      <t3>john</t3>     </tag>     <tag>      <t1>john</t1>      <t2>john</t2>      <t3>john</t3>     </tag>     <tag>      <t1>john</t1>      <t2>john</t2>      <t3>john</t3>     </tag>     <tag>      <t1>john</t1>      <t2>john</t2>      <t3>john</t3>     </tag>     </root>           sed -n '/<tag>/,/<\/tag>/p' file.xml       returns all elements. So the goal is to filter to get the First n matched patterns ( Elements are multi-line) If n = 2 then result =:               <tag>      <t1>john</t1>      <t2>john</t2>      <t3>john</t3>     </tag>     <tag>      <t1>john</t1>      <t2>john</t2>      <t3>john</t3>     </tag>


A layman's explanation for "Everything is a file" — what differs from Windows?

I know that "Everything is a file" means that even devices have their filename and path in Unix and Unix-like systems, and that this allows for common tools to be used on a variety of resources regardless of their nature. But I can't contrast that to Windows, the only other OS I have worked with. I have read some articles about the concept, but I think they are somewhat uneasy to grasp for non-developers. A layman's explanation is what people need! For example, when I want to copy a file to CF card that is attached to a card reader, I will use something like               zcat name_of_file > /dev/sdb      In Windows, I think the card reader will appear as a driver, and we will do something similar, I think. So, how does the "Everything is a file" philosophy make a difference here?


LAMP Hardening, Transparent Proxy with iptables

I'm running a LAMP server with FTP(S) and several users. The users have only access to uploading PHP files and other web content. Some are running Drupal and Wordpress, but also a few home made stuff. I already disabled all shell access attempts from php. But in order to fully protect myself, my server and my users from downtime, script kiddies and other nasty things I want to disallow RFI. Actually I don't want to allow any traffic (TCP & UDP) going out from my server that I don't allow to. For this task I want to make a transparent proxy that retrieves all packages before they are sent, making decisions if the packages should be allowed or not. I want to use Python for the task of making the decisions as it is easy to fetch allowed URL's from the local database. Like I want to allow certain API's / OAuth sources. How do I configure iptables to send all data (including destination ip and port), to my python application? Or is there any better way of doing this? My thought was just that if I can disable shell access and unauthorized network traffic I can sleep at night. Then no one can use my server as a bot in a botnet. And they can't email spam. What do you think? I don't want to rely upon Suhosin, since I'm using PHP 5.4 and later.


Where is the bash feature to open a command in $EDITOR documented?

I have recently discovered that if we press `Ctrl`+`X` `Ctrl`+`E`, bash opens the current command in an editor (set in `$VISUAL` or `$EDITOR`) and executes it when the editor is closed. But it doesen't seem to be documented in the `man` pages.


What does “magic tests” mean for the file command?

I was reading about the `file` command and I came across something I don't quite understand: > file is designed to determine the kind of file being queried.... file > accomplishes this by performing **three** sets of tests on the file in > question: > >   * filesystem tests, >   * **magic** tests, >   * language tests > What are **magic** tests?


How to change the default version of Python in Debian 7.5?

I'm using Debian 7.5, and I've installed Python 3.3 and 3.2. How do I make 3.3 the default for when someone types `python` in the command line?


How to change what Alt+F2 calls in GNOME?

I saw something that made me salivate and I want it to be the program that is run when I do `Alt`-`F2`.


Tell autoconf to use different version of gcc

OpenBSD installs newer version of gcc as egcc. I am trying to compile some software that requires gcc 4.4+ and can't seem to convince autoconf to use the newer versions of gcc... I have tried:               # export CC=egcc     # $CC --version     #   egcc (GCC) 4.7.2     #   ...      and               # export CC=/usr/local/bin/egcc     # $CC --version     #   egcc (GCC) 4.7.2     #   ...      I even tried making symlinks to ~/bin and adding that to my PATH:               # cc --version     #   egcc (GCC) 4.7.2     #   ...          # gcc --version     #   egcc (GCC) 4.7.2     #   ...      and also:               # ./configure CC=egcc     # ./configure CC=/usr/local/bin/egcc     # CC=egcc ./configure     # CC=/usr/local/bin/egcc ./configure      But no matter what I still get:               configure: error: Only GCC 4.4 or newer supported      Will someone please show me the error of my ways!


sed with auto escape character

CommentAppend() {         # Comment line and append line below commented line          local comment="$1"      # search this line and comment it          local append="$2"       # Append this line below commented line          local InputFile="$3"                  sed -i "s/${comment}/#${comment}/g ; s/#${comment}/& \n${append}/" $InputFile     }      This function working fine for non escape character but when escape character available then it fail.. So We can build function, for escap character ?


Could not commit to disk during OS Installation

I've tried several times to load Fedora 20 onto an Acer 5750z laptop, but during the installation I get an error message of "Could not commit to disk", switched the OS disk to Ubuntu 14.04 and received man error message that says "Input/ output error during read on /dev/sda". Is this telling me that the hard drive is bad?


DirectX installed on Wine althought it doesn't work in games

I have installed DirectX on Wine used winetricks to have better graphics in my games. Althought it doesn't work! When I want to run GTA: San Andreas it shows I have to download and install DirectX. In other game happens exactly nothing. I do not what's the matter. There is log from `dxdiag`:               System Information     ------------------     Time of this report: 7/25/2014, 14:37:07            Machine name: localhost        Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 3                Language: English (Regional Setting: Polish)     System Manufacturer: The Wine Project            System Model: Wine                    BIOS: Default System BIOS               Processor: Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz (4 CPUs), ~3.1GHz                  Memory: 3880MB RAM               Page File: 1144MB used, 10758MB available             Windows Dir: C:\windows         DirectX Version: DirectX 9.0c (4.09.0000.0904)     DX Setup Parameters: Not found          DxDiag Version: 5.03.0001.0904 32bit Unicode          ------------     DxDiag Notes     ------------       DirectX Files Tab: Several files (dxapi.sys, d3d8thk.dll, d3dim700.dll, etc.) are missing! The file qedit.dll is an old version, which could cause problems. You should reinstall DirectX to get the latest version.           Display Tab 1: The file  is not digitally signed, which means that it has not been tested by Microsoft's Windows Hardware Quality Labs (WHQL).  You may be able to get a WHQL logo'd driver from the hardware manufacturer. Problems were found in the system registry.  Details are available in the saved text file. You should reinstall DirectX to get the latest version.             Sound Tab 1: The file winemm.vxd is not digitally signed, which means that it has not been tested by Microsoft's Windows Hardware Quality Labs (WHQL).  You may be able to get a WHQL logo'd driver from the hardware manufacturer.             Sound Tab 2: The file winemm.vxd is not digitally signed, which means that it has not been tested by Microsoft's Windows Hardware Quality Labs (WHQL).  You may be able to get a WHQL logo'd driver from the hardware manufacturer.             Sound Tab 3: The file winemm.vxd is not digitally signed, which means that it has not been tested by Microsoft's Windows Hardware Quality Labs (WHQL).  You may be able to get a WHQL logo'd driver from the hardware manufacturer.             Sound Tab 4: No problems found.             Sound Tab 5: The file winemm.vxd is not digitally signed, which means that it has not been tested by Microsoft's Windows Hardware Quality Labs (WHQL).  You may be able to get a WHQL logo'd driver from the hardware manufacturer.               Music Tab: The specified General MIDI DLS file was not found.               Input Tab: Problems were found in the system registry.  Details are available in the saved text file.             Network Tab: No problems found.          --------------------     DirectX Debug Levels     --------------------     Direct3D:    0/4 (n/a)     DirectDraw:  0/4 (retail)     DirectInput: 0/5 (n/a)     DirectMusic: 0/5 (n/a)     DirectPlay:  0/9 (retail)     DirectSound: 0/5 (retail)     DirectShow:  0/6 (retail)          ---------------     Display Devices     ---------------             Card name: X11 Windowing System          Manufacturer:              Chip type:               DAC type:             Device Key: Enum\PCI\VEN_0000&DEV_0000        Display Memory: 132.0 MB          Current Mode: 1366 x 768 (32 bit)               Monitor: X11 Windowing System       Monitor Max Res:            Driver Name:         Driver Version:  ()           DDI Version: 9 (or higher)     Driver Attributes: Final Retail      Driver Date/Size: , 0 bytes           WHQL Logo'd: No       WHQL Date Stamp: None                   VDD: n/d              Mini VDD:          Mini VDD Date: n/a, 0 bytes     Device Identifier: {AEB2CDD4-6E41-43EA-941C-8361CC760781}             Vendor ID: 0x10DE             Device ID: 0x0302             SubSys ID: 0x00000000           Revision ID: 0x0000           Revision ID: 0x0000           Video Accel:       Deinterlace Caps: n/a          Registry Errors Found:     Key 'HKCR\CLSID\{4516EC43-8F20-11d0-9B6D-0000C0781BC3}\InprocServer32', Value '', should be 'd3dxof.dll'     Key 'HKCR\DirectXFile\CLSID' is missing.     Key 'HKCR\DirectXFile' is missing.     Key 'HKCR\CLSID\{4516EC41-8F20-11d0-9B6D-0000C0781BC3}\InprocServer32' is missing.     Key 'HKCR\CLSID\{4516EC41-8F20-11d0-9B6D-0000C0781BC3}\InprocServer32' is missing.     Key 'HKCR\CLSID\{4516EC41-8F20-11d0-9B6D-0000C0781BC3}' is missing.     Key 'HKCR\Direct3DRM\CLSID' is missing.     Key 'HKCR\Direct3DRM' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\DX6TextureEnumInclusionList\8 bit Luminance' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\DX6TextureEnumInclusionList\24 bit BumpLum DuDv' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\DX6TextureEnumInclusionList\16 bit Luminance Alpha' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\DX6TextureEnumInclusionList\16 bit BumpLum DuDv' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\DX6TextureEnumInclusionList\16 bit Bump DuDv' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\RGB Emulation' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\RGB Emulation' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\Ramp Emulation' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\Ramp Emulation' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\Ramp Emulation' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\Direct3D HAL' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\Direct3D HAL' is missing.     Key 'HKLM\Software\Microsoft\Direct3D\Drivers\Direct3D HAL' is missing.     Key 'HKCR\DirectDrawClipper\CLSID' is missing.     Key 'HKCR\DirectDrawClipper' is missing.     Key 'HKCR\DirectDraw\CLSID' is missing.     Key 'HKCR\DirectDraw' is missing.               DDraw Status: Enabled            D3D Status: Enabled            AGP Status: Not Available     DDraw Test Result: Not run      D3D7 Test Result: Not run      D3D8 Test Result: Not run      D3D9 Test Result: Not run          -------------     Sound Devices     -------------                 Description: Out: default      Default Sound Playback: Yes      Default Voice Playback: Yes                 Hardware ID:              Manufacturer ID:                   Product ID:                         Type: VXD                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail                 WHQL Logo'd: No               Date and Size: , 0 bytes                 Other Files:              Driver Provider:               HW Accel Level: Unknown                   Cap Flags: 0xF1F         Min/Max Sample Rate: 100, 200000     Static/Strm HW Mix Bufs: 1, 0      Static/Strm HW 3D Bufs: 0, 0                   HW Memory: 0            Voice Management: No      EAX(tm) 2.0 Listen/Src: No, No        I3DL2(tm) Listen/Src: No, No     Sensaura(tm) ZoomFX(tm): No                    Registry: OK           Sound Test Result: Not run                      Description: Out: HDA Intel HDMI - HDMI 2      Default Sound Playback: No      Default Voice Playback: No                 Hardware ID:              Manufacturer ID:                   Product ID:                         Type: VXD                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail                 WHQL Logo'd: No               Date and Size: , 0 bytes                 Other Files:              Driver Provider:               HW Accel Level: Unknown                   Cap Flags: 0xF1F         Min/Max Sample Rate: 100, 200000     Static/Strm HW Mix Bufs: 1, 0      Static/Strm HW 3D Bufs: 0, 0                   HW Memory: 0            Voice Management: No      EAX(tm) 2.0 Listen/Src: No, No        I3DL2(tm) Listen/Src: No, No     Sensaura(tm) ZoomFX(tm): No                    Registry: OK           Sound Test Result: Not run                      Description: Out: HDA Intel HDMI - HDMI 0      Default Sound Playback: No      Default Voice Playback: No                 Hardware ID:              Manufacturer ID:                   Product ID:                         Type: VXD                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail                 WHQL Logo'd: No               Date and Size: , 0 bytes                 Other Files:              Driver Provider:               HW Accel Level: Unknown                   Cap Flags: 0xF1F         Min/Max Sample Rate: 100, 200000     Static/Strm HW Mix Bufs: 1, 0      Static/Strm HW 3D Bufs: 0, 0                   HW Memory: 0            Voice Management: No      EAX(tm) 2.0 Listen/Src: No, No        I3DL2(tm) Listen/Src: No, No     Sensaura(tm) ZoomFX(tm): No                    Registry: OK           Sound Test Result: Not run                      Description: Out: HDA Intel PCH - CX20757 Analog      Default Sound Playback: No      Default Voice Playback: No                 Hardware ID:              Manufacturer ID:                   Product ID:                         Type: VXD                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail                 WHQL Logo'd: n/a               Date and Size: , 0 bytes                 Other Files:              Driver Provider:               HW Accel Level: Unknown                   Cap Flags: 0x0         Min/Max Sample Rate: 0, 0     Static/Strm HW Mix Bufs: 0, 0      Static/Strm HW 3D Bufs: 0, 0                   HW Memory: 0            Voice Management: No      EAX(tm) 2.0 Listen/Src: No, No        I3DL2(tm) Listen/Src: No, No     Sensaura(tm) ZoomFX(tm): No                    Registry: OK           Sound Test Result: Not run                      Description: Out: HDA Intel HDMI - HDMI 1      Default Sound Playback: No      Default Voice Playback: No                 Hardware ID:              Manufacturer ID:                   Product ID:                         Type: VXD                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail                 WHQL Logo'd: No               Date and Size: , 0 bytes                 Other Files:              Driver Provider:               HW Accel Level: Unknown                   Cap Flags: 0xF1F         Min/Max Sample Rate: 100, 200000     Static/Strm HW Mix Bufs: 1, 0      Static/Strm HW 3D Bufs: 0, 0                   HW Memory: 0            Voice Management: No      EAX(tm) 2.0 Listen/Src: No, No        I3DL2(tm) Listen/Src: No, No     Sensaura(tm) ZoomFX(tm): No                    Registry: OK           Sound Test Result: Not run          ---------------------     Sound Capture Devices     ---------------------                 Description: In: default       Default Sound Capture: Yes       Default Voice Capture: Yes                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail               Date and Size: , 0 bytes                   Cap Flags: 0x0                Format Flags: 0xFFFFF                      Description: In: HDA Intel PCH - CX20757 Analog       Default Sound Capture: No       Default Voice Capture: No                 Driver Name: winemm.vxd              Driver Version:  ()           Driver Attributes: Final Retail               Date and Size: , 0 bytes                   Cap Flags: 0x0                Format Flags: 0xFFFFF          -----------     DirectMusic     -----------             DLS Path: C:\windows\system32\drivers\gm.dls          DLS Version:          Acceleration: n/a                Ports: Microsoft Synthesizer, Software (Not Kernel Mode), Output, DLS, Internal, Default Port                       Wine midi mapper [Emulowany], Hardware (Not Kernel Mode), Output, No DLS, Internal                       Midi Through Port-0 [Emulowany], Hardware (Not Kernel Mode), Output, No DLS, External                       Midi Through Port-0 [Emulowany], Hardware (Not Kernel Mode), Input, No DLS, External             Registry: OK          Test Result: Not run          -------------------     DirectInput Devices     -------------------           Device Name: Mouse              Attached: 1         Controller ID: n/a     Vendor/Product ID: n/a             FF Driver: n/a                Device Name: Keyboard              Attached: 1         Controller ID: n/a     Vendor/Product ID: n/a             FF Driver: n/a          Poll w/ Interrupt: No              Registry: Errors found     Key 'HKCR\CLSID\{9F34AF20-6095-11D3-8FB2-00C04F8EC627}\InProcServer32' is missing.     Key 'HKCR\CLSID\{9F34AF20-6095-11D3-8FB2-00C04F8EC627}\InProcServer32' is missing.               -----------     USB Devices     -----------          ----------------     Gameport Devices     ----------------          ------------     PS/2 Devices     ------------          ----------------------------     DirectPlay Service Providers     ----------------------------     DirectPlay8 Modem Service Provider - Registry: OK, File: dpnet.dll (5.03.0000.0900)     DirectPlay8 Serial Service Provider - Registry: OK, File: dpnet.dll (5.03.0000.0900)     DirectPlay8 IPX Service Provider - Registry: OK, File: dpnet.dll (5.03.0000.0900)     DirectPlay8 TCP/IP Service Provider - Registry: OK, File: dpnet.dll (5.03.0000.0900)          DirectPlay Voice Wizard Tests: Full Duplex: Not run, Half Duplex: Not run, Mic: Not run     DirectPlay Test Result: Not run     Registry: OK          -------------------     DirectPlay Adapters     -------------------     DirectPlay8 Serial Service Provider: COM1     DirectPlay8 Serial Service Provider: COM2     DirectPlay8 Serial Service Provider: COM3     DirectPlay8 Serial Service Provider: COM4          -----------------------     DirectPlay Voice Codecs     -----------------------          -------------------------     DirectPlay Lobbyable Apps     -------------------------          ------------------------     Disk & DVD/CD-ROM Drives     ------------------------           Drive: C:      Free Space: 861.3 GB     Total Space: 78.4 GB     File System: NTFS           Model: n/a                Drive: D:           Model: Wine CD-ROM ATA Device          ------------------     DirectX Components     ------------------        ddraw.dll: 5.03.0001.0904 English Final Retail 7/2/2014 14:49:32 3236 bytes      ddrawex.dll:                 Final Retail 7/2/2014 14:49:32 1924 bytes        dxapi.sys: missing!         d3d8.dll: 5.03.0001.0904 English Final Retail 7/2/2014 14:49:32 2456 bytes      d3d8thk.dll: missing!         d3d9.dll: 5.03.0001.0904 English Final Retail 7/2/2014 14:49:32 2456 bytes        d3dim.dll: 5.03.2180.0014 English Final Retail 7/2/2014 14:49:32 2516 bytes     d3dim700.dll: missing!        d3drm.dll: 5.00.2134.0014 English Final Retail 7/2/2014 14:49:32 2512 bytes       d3dxof.dll: 5.00.2135.0001 English Final Retail 12/12/2002 01:14:32 49424 bytes     d3dpmesh.dll: missing!        dplay.dll: 5.03.0000.0900 English Final Retail 7/2/2014 14:49:32 2492 bytes       dplayx.dll: 5.03.0001.0904 English Final Retail 7/9/2004 04:27:28 230400 bytes     dpmodemx.dll: missing!     dpwsockx.dll: 5.03.0001.0904 Chinese (Traditional) Final Retail 7/9/2004 04:27:28 79360 bytes     dplaysvr.exe: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 28160 bytes       dpnsvr.exe: missing!        dpnet.dll: 5.03.0000.0900 Chinese (Traditional) Final Retail 12/12/2002 01:14:32 723968 bytes     dpnlobby.dll: 5.03.2600.2180 English Final Retail 7/2/2014 14:49:32 2488 bytes      dpnaddr.dll: 5.03.2600.2180 English Final Retail 7/2/2014 14:49:32 2484 bytes      dpvoice.dll: missing!     dpvsetup.exe: missing!       dpvvox.dll: missing!       dpvacm.dll: missing!     dpnhpast.dll: 5.03.0000.0901 English Final Retail 3/24/2003 10:00:02 32768 bytes     dpnhupnp.dll: missing!       dinput.dll: 5.01.2600.0881 English Final Retail 7/2/2014 14:49:32 30384 bytes      dinput8.dll: 5.01.2600.0881 Chinese (Traditional) Final Retail 10/30/2001 09:10:00 664576 bytes        dimap.dll: missing!     diactfrm.dll: missing!          joy.cpl: 10.00.0000.0000 English Final Retail 7/2/2014 14:49:32 75136 bytes        gcdef.dll: missing!       dsound.dll: 5.03.0001.0904 Chinese (Traditional) Final Retail 7/9/2004 04:27:28 381952 bytes     dsound3d.dll: missing!       dswave.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 18432 bytes        dsdmo.dll: missing!     dsdmoprp.dll: missing!       dmusic.dll: 5.03.0001.0904 Chinese (Traditional) Final Retail 7/9/2004 04:27:28 122880 bytes       dmband.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 27136 bytes     dmcompos.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 58368 bytes        dmime.dll: 5.03.0001.0904 English Final Retail 7/9/2004 04:27:28 181248 bytes     dmloader.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 33280 bytes      dmstyle.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 98816 bytes      dmsynth.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 100864 bytes     dmscript.dll: 5.03.0000.0900 English Final Retail 12/12/2002 01:14:32 76800 bytes        dx7vb.dll: missing!        dx8vb.dll: missing!      dxdiagn.dll: 5.03.0001.0904 Chinese (Traditional) Final Retail 7/9/2004 04:27:28 1769472 bytes      wsock32.dll: 4.00.0000.0000 English Final Retail 7/2/2014 14:49:32 2444 bytes     amstream.dll: 6.05.0001.0900 English Final Retail 7/2/2014 14:49:32 3344 bytes      devenum.dll: 6.05.0001.0902 Chinese (Traditional) Final Retail 5/30/2003 09:00:02 132608 bytes     mciqtz32.dll: 6.05.0001.0900 English Final Retail 7/2/2014 14:49:32 13396 bytes        msdmo.dll: 6.05.0001.0900 English Final Retail 7/2/2014 14:49:32 2440 bytes       encapi.dll: missing!         qasf.dll: missing!         qcap.dll: 6.05.0001.0900 English Final Retail 7/2/2014 14:49:32 2444 bytes          qdv.dll: missing!         qdvd.dll: missing!        qedit.dll:                 Final Retail 7/2/2014 14:49:32 2096 bytes (problem)     qedwipes.dll: missing!       quartz.dll: 6.05.0001.0902 Chinese (Traditional) Final Retail 5/30/2003 09:00:02 1962496 bytes          ------------------     DirectShow Filters     ------------------          DirectShow Filters:     Full Screen Renderer,0x00200000,1,0,quartz.dll,6.05.0001.0902     Color Space Converter,0x00400001,1,1,quartz.dll,6.05.0001.0902     AVI Splitter,0x00600000,1,1,quartz.dll,6.05.0001.0902     VGA 16 Color Ditherer,0x00400000,1,1,quartz.dll,6.05.0001.0902     GStreamer YUV filter,0x00400000,1,1,winegstreamer.dll,0.00.0001.0000     MJPEG Decompressor,0x00600000,1,1,quartz.dll,6.05.0001.0902     GStreamer AudioConvert filter,0x00400000,1,1,winegstreamer.dll,0.00.0001.0000     MPEG-I Stream Splitter,0x00600000,1,2,quartz.dll,6.05.0001.0902     SAMI (CC) Parser,0x00400000,1,1,quartz.dll,6.05.0001.0902     Internal Script Command Renderer,0x00800001,1,0,quartz.dll,6.05.0001.0902     MPEG Audio Decoder,0x03680001,1,1,quartz.dll,6.05.0001.0902     Video Mixing Renderer 9,0x00200000,1,0,quartz.dll,6.05.0001.0902     ACM Wrapper,0x00600000,1,1,quartz.dll,6.05.0001.0902     Video Renderer,0x00800001,1,0,quartz.dll,6.05.0001.0902     Video Port Manager,0x00600000,2,1,quartz.dll,6.05.0001.0902     Video Renderer,0x00400000,1,0,quartz.dll,6.05.0001.0902     GStreamer Mp3 filter,0x00600000,1,1,winegstreamer.dll,0.00.0001.0000     Audio Renderer,0x00800000,1,0,quartz.dll,6.05.0001.0902     AVI Draw,0x00600064,9,1,quartz.dll,6.05.0001.0902     Null Renderer,0x00200000,1,0,quartz.dll,6.05.0001.0902     AVI Decompressor,0x00600000,1,1,quartz.dll,6.05.0001.0902     AVI/WAV File Source,0x00400000,0,2,quartz.dll,6.05.0001.0902     QuickTime Movie Parser,0x00600000,1,1,quartz.dll,6.05.0001.0902     Wave Parser,0x00400000,1,1,quartz.dll,6.05.0001.0902     MIDI Parser,0x00400000,1,1,quartz.dll,6.05.0001.0902     Multi-file Parser,0x00400000,1,1,quartz.dll,6.05.0001.0902     File stream renderer,0x00400000,1,1,quartz.dll,6.05.0001.0902     Audio Renderer,0x00800000,1,0,quartz.dll,6.05.0001.0902     Line 21 Decoder 2,0x00600002,1,1,quartz.dll,6.05.0001.0902     File Source (Async.),0x00400000,0,1,quartz.dll,6.05.0001.0902     File Source (URL),0x00400000,0,1,quartz.dll,6.05.0001.0902     GStreamer splitter filter,0x00800000,1,2,winegstreamer.dll,0.00.0001.0000     QT Decompressor,0x00600000,1,1,quartz.dll,6.05.0001.0902     MPEG Video Decoder,0x40000001,1,1,quartz.dll,6.05.0001.0902          Video Compressors:     MJPEG Compressor,0x00200000,0,0,quartz.dll,6.05.0001.0902     Kodek Cinepak Video,0x00200000,1,1,qcap.dll,6.05.0001.0900     Kodek wideo Wine MS-RLE,0x00200000,1,1,qcap.dll,6.05.0001.0900     Kodek Wine Video 1,0x00200000,1,1,qcap.dll,6.05.0001.0900          Audio Compressors:     IMA ADPCM,0x00200000,1,1,quartz.dll,6.05.0001.0902     PCM,0x00200000,1,1,quartz.dll,6.05.0001.0902     Microsoft ADPCM,0x00200000,1,1,quartz.dll,6.05.0001.0902     GSM 6.10,0x00200000,1,1,quartz.dll,6.05.0001.0902     A-Law,0x00200000,1,1,quartz.dll,6.05.0001.0902     U-Law,0x00200000,1,1,quartz.dll,6.05.0001.0902     MPeg,0x00200000,1,1,quartz.dll,6.05.0001.0902     MPeg3,0x00200000,1,1,quartz.dll,6.05.0001.0902          Audio Capture Sources:     In: default,0x00200000,0,0,qcap.dll,6.05.0001.0900     In: HDA Intel PCH - CX20757 Ana,0x00200000,0,0,qcap.dll,6.05.0001.0900          Midi Renderers:     Default MidiOut Device,0x00800000,1,0,quartz.dll,6.05.0001.0902     Midi Through Port-0,0x00200000,1,0,quartz.dll,6.05.0001.0902          Video Capture Sources:     Lenovo EasyCamera,0x00200000,0,0,qcap.dll,6.05.0001.0900          Audio Renderers:     Out: default,0x00200000,1,0,quartz.dll,6.05.0001.0902     Default DirectSound Device,0x00800000,1,0,quartz.dll,6.05.0001.0902     Default WaveOut Device,0x00200000,1,0,quartz.dll,6.05.0001.0902     DirectSound: Out: default,0x00200000,1,0,quartz.dll,6.05.0001.0902     DirectSound: Out: HDA Intel HDMI - HDMI 0,0x00200000,1,0,quartz.dll,6.05.0001.0902     DirectSound: Out: HDA Intel HDMI - HDMI 1,0x00200000,1,0,quartz.dll,6.05.0001.0902     DirectSound: Out: HDA Intel HDMI - HDMI 2,0x00200000,1,0,quartz.dll,6.05.0001.0902     DirectSound: Out: HDA Intel PCH - CX20757 Analog,0x00200000,1,0,quartz.dll,6.05.0001.0902     Out: HDA Intel HDMI - HDMI 0,0x00200000,1,0,quartz.dll,6.05.0001.0902     Out: HDA Intel HDMI - HDMI 1,0x00200000,1,0,quartz.dll,6.05.0001.0902     Out: HDA Intel HDMI - HDMI 2,0x00200000,1,0,quartz.dll,6.05.0001.0902     Out: HDA Intel PCH - CX20757 An,0x00200000,1,0,quartz.dll,6.05.0001.0902      I have added all neccesarry libraries to winecfg. `glxgears` works propely. Please help me in my case. My OS is Debian Jessie, Wine version - 1.6.2.


Colored text set up with PS1 and colored output from commands mess each other up

I have `PS1` that ends with an opening color sequence (like `\\[\e[0;32m\\]`) to have all text in the terminal colored (green in this case). However, when I use a command such as `ls` (which is aliased to `ls --color=auto` in my `.bashrc`) the colors in the output are a little messed up: green up to the first "colored" word, and the following uncolored text is white instead of green. Is there a way to have clean output in all cases? I'm okay with white as "default" text color when the output has colors, but I'd like it to be consistent. Of course, I'd most like a solution that would automatically apply to all commands and that wouldn't require me to change the way I invoke them. Personally, I don't have any ideas. Maybe something can be done to search for escape sequences in the output "on the fly" and perform some substitutions? I don't know how to implement this, though, especially so that it's done "behind the scenes".


Permission in shmget Linux

I've been searching about 0666 permission in shmget(). I know that **0666** permission will grant read & write permission on the shared memory segment. But, how do I prove it have permission if I change the value to be 0111? It should not be write or read, right? So, I try to create simple client-server program with it and try 0111 value. However, I can still write on that shared memory. How to prove its permission? How the right way to access it?


Getting correct perf version

I'm trying to run perf on my Ubuntu Precise box, which I recently upgraded to kernel 3.11.10-03111002 (manual install). The problem is that perf and kernel versions must match, and the requested version is not available in the repositories (linux-tools-VERSION package). I can only install up to v3.8.0. What can I do? Kernel upgrade/downgrade is an option, but I'd rather get the correct perf version.


How should one change the width of scrollbar?

I started using Linux Mint 13 Mate a few days ago and I can't find anyway to change the width of my scrollbar, no matter it is firefox, chrome or File Manager. I tried to search google with "Linux Mint 13 scrollbar size" or "Linux scrollbar size" as keywords but the result isn't useful. I looked up all the option in Control Center and found nothing so I doubt they have a option in Linux Mint 13. Actually it is quite a failure although they claim Linux Mint is user friendly. If anyone knows which linux distro has this option please tell me. Thanks.


diff --git unknown option

when I try to run               diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c      I get unknown option (I have installed git via `apt-get install git`)


Can I use logrotate to compress daily (date named) logs?

I have logs in the following format: YYYYMMDD I want to compress old logs (older then current day) and maybe move them to a different directory afterwards. Can I do this in logrotate, or do I have to use a custom script in cron?


Install gcc 4.7.2 on Debian squeeze 64x

I want to use gcc 4.7.2 on my Debian squeeze 64x I followed instructions in this thread: Get newest gcc for debian?, but I'm getting an error, I tried several apt-get install commands I will settle with 4.7.1, as long as i can use the new c++ 11 features. Below are my updated sources list and preferences file. After i updated these files i used apt-get update from a root terminal. **/etc/apt/sources.list**               #          # deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official amd64 NETINST Binary-1 20120512-20:40]/ squeeze main          #deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official amd64 NETINST Binary-1 20120512-20:40]/ squeeze main          deb http://ftp.belnet.be/debian/ squeeze main     deb-src http://ftp.belnet.be/debian/ squeeze main          deb http://ftp.belnet.be/debian/ wheezy main          deb http://security.debian.org/ squeeze/updates main     deb-src http://security.debian.org/ squeeze/updates main          # squeeze-updates, previously known as 'volatile'     deb http://ftp.belnet.be/debian/ squeeze-updates main     deb-src http://ftp.belnet.be/debian/ squeeze-updates main          deb http://apt.jenslody.de/stable stable main     deb-src http://apt.jenslody.de/stable stable main     deb http://apt.wxwidgets.org/ squeeze-wx main      **/etc/apt/preferences**               Package: *     Pin: release n=squeeze     Pin-Priority: 900          Package: *     Pin: release n=wheezy     Pin-Priority: 200      It seems that this helped but now apt-get is complaining about unmet dependencies               root@debianWillem:/home/willem# apt-get install gcc-4.7/testing     Reading package lists... Done     Building dependency tree            Reading state information... Done     Selected version '4.7.1-7' (Debian:testing [amd64]) for 'gcc-4.7'     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      gcc-4.7 : Depends: cpp-4.7 (= 4.7.1-7) but it is not going to be installed                Depends: binutils (>= 2.21.1) but 2.20.1-16 is to be installed                Depends: libgcc1 (>= 1:4.7.1-7) but 1:4.4.5-8 is to be installed                Depends: libgomp1 (>= 4.7.1-7) but 4.4.5-8 is to be installed                Depends: libmpfr4 (>= 3.1.0) but 3.0.0-2 is to be installed                Recommends: libc6-dev (>= 2.13-5) but 2.11.3-3 is to be installed     E: Broken packages          root@debianWillem:/home/willem# apt-get --target-release testing install gcc-4.7     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:      initscripts : Breaks: console-setup (< 1.74) but 1.68+squeeze2 is to be installed                    Breaks: nfs-common (< 1:1.2.5-3) but 1:1.2.2-4squeeze2 is to be installed      libglib2.0-0 : Breaks: eog (< 3.2.2-3) but 2.30.2-1 is to be installed      libgnome-keyring0 : Breaks: gnome-keyring (< 3.0) but 2.30.3-5 is to be installed      network-manager : Recommends: crda but it is not going to be installed                        Breaks: network-manager-gnome (< 0.9) but 0.8.1-2 is to be installed     E: Broken packages      How do i resolve these unmet dependencies ?


ALSA: how to turn off "link note to velocity" feature

I use a USB MIDI keyboard to play with fluidsynth and ALSA on debian. It works fine but I wonder if there is the possibility to turn off the "link note to velocity" feature (= the volume of the played note depends on how fast I'll hit the key). edit: I assume it could be done on the software side because on most Digital Audio Workstation's (DAW) there is a specific setting for that. 2nd edit: Alright I found out that the setting can be done on the keyboard itself too. But if someone still does know how to do it software side, feel free to answer ;)


Connect to LAN resource via ssh tunnel

I have the following problem. From machine `A` I connect to machine `B` over the internet via ssh and port forwarding. Machine `B` is part of my local network and has connection to machine `C` which acts as a server inside the `LAN`.               A --------- | ---- B ---- C       INTERNET GW        LAN            Now I want to start a program on `A` that needs access to `C` without using a vpn connection. I tried ssh tunneling:               #user@A: ssh -N user@B -L 9999:B:9999      But when I start the program on `A` it cant connect to `C`. I guess it has something to do with `A` not having a route to `C` because it has only a local address (192.168.something) . How can I find out whats going wrong?


Linux Mint: How to enble cryptswap with custom password?

When you want to use hibernation and you care for security, you'd like to have the swap encrypted. But not with the random password, chosen for you at startup, but with a fixed one, supplied by you at the boot time, so the hibernated state would be available for resuming upon next boot. There was a cool way to do this, that worked up until Mint 15: How to: get the whole system encrypted This doesn't work anymore on Petra. Can anyone help me with working it out? The main culprit, the `/usr/share/initramfs-tools/scripts/local-top` script didn't change, so I guess it has something to do with the kernel. It looks like the recent kernel just ignores all the scirpt, or at least the part that asks for a password for swap. Oh, and I was able to get the password prompt, when I accidentally booted the Mint 16 with the kernel from Mint 15. See also a related question: How to ask for a password to mount crypted swap at boot time on Linux Mint 16 with initramfs-tools? * * * ## Some debug info After opening the swap device with `sudo cryptsetup luksOpen /dev/sda5 cryptswap`: **`sudo lsblk -o name,uuid`**               NAME                  UUID     sda                        ├─sda1                F251-38C0     ├─sda2                c66b8e51-dd1b-4d92-8605-a3ba7df6af83     ├─sda3                77af32db-038d-4c10-b302-039634cf943a     ├─sda4                7a3cde35-ab80-4618-ad76-7aa064d55f56     ├─sda5                fc068dd2-759c-4779-b521-c73cc5499e86     │ └─cryptswap (dm-1)  964eafeb-c88b-49c8-8b5e-6f8395e040b4     ├─sda6                926fa7cc-6f97-4672-85a7-a1ed8f5bd842     ├─sda7                804b9c88-907b-43d9-b23f-964c32ecc2ac     └─sda8                ce2cd926-133f-4e20-86f8-45bc4844271c       └─adama-docs (dm-0) 61a32b98-3b65-4af6-81ff-da090cae039f     sr0                    **`cat /etc/crypttab`**               #cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256     swap UUID=fc068dd2-759c-4779-b521-c73cc5499e86  none luks      **`cat /etc/fstab`**               UUID=926fa7cc-6f97-4672-85a7-a1ed8f5bd842   /   btrfs   defaults,subvol=@,compress,autodefrag   0   1     # /boot was on /dev/sda2 during installation     UUID=c66b8e51-dd1b-4d92-8605-a3ba7df6af83   /boot   ext3    defaults    0   2     # /boot/efi was on /dev/sda1 during installation     UUID=F251-38C0  /boot/efi   vfat    defaults    0   1     # /home was on /dev/sda6 during installation     UUID=926fa7cc-6f97-4672-85a7-a1ed8f5bd842   /home   btrfs   defaults,subvol=@home   0   2     # /mnt/ext4 was on /dev/sda7 during installation     UUID=804b9c88-907b-43d9-b23f-964c32ecc2ac   /mnt/ext4   ext4    defaults    0   0     # swap was on /dev/sda5 during installation     UUID=964eafeb-c88b-49c8-8b5e-6f8395e040b4 none            swap    sw              0       0      **`/etc/initramfs-tools/conf.d/resume`**               RESUME=/dev/disk/by-uuid/964eafeb-c88b-49c8-8b5e-6f8395e040b4      * * * ## update: When I setup everything like above, the system does display the familiar password prompt. It doesn't do that every time, and if it does, it is a fraction of second before the login screen (Linux Mint uses mdm for login). I guess there is racing condition; the mounting of swap is done parallel with the system booting; I expect the system to wait booting until the swap is mounted, and do it as early as possible. Otherwise how could it resume the hibernated state? There is a similar question for Ubuntu: http://askubuntu.com/questions/396136/encrypted-home-partition-encrypted-swap- working-hibernate It seems, that it worked for someone if he encrypted the root as well.


Modifying installation directories for Python versions

I am groping towards having a documented and ideal environment for me to develop in Python. I am going to utilize virtualenv to do so. I know that I can pass the python version as an argument to virtualenv. What I don't understand is twofold: 1) Why do different versions of some programs (i.e., Python) get installed in different directories? For example, Python 3.3 is installed in /usr/lib/ while 2.7 is installed in usr/bin. Then of course there's the local versions too, but that's not an issue for me since I'm the sole user on my machine. It just seems like a mess and I've never found a satisfactory answer as to why it is this way. 2) If I am going to pass the version as an argument to virtualenv, I would like all of my Pythons to be in a consistent directory so I don't have to remember this stuff. I have read about how when installing from source one can pass an argument to configure to set the installation location, but I've also read that's a good way to really make a mess of things. I don't propose to do it as a habit, though; it's only for my Pythons. So wouldn't that limited use case be ok? Thanks for any light that anyone can shed on this subject.


Why is a drive mounted already at /mnt ? Is this ok?

One of my drives is mounted directly as /mnt               $ df -h     Filesystem            Size  Used Avail Use% Mounted on     /dev/xvda1            7.9G  6.9G  597M  93% /     udev                  829M  4.0K  829M   1% /dev     tmpfs                 334M  160K  334M   1% /run     none                  5.0M     0  5.0M   0% /run/lock     none                  834M     0  834M   0% /run/shm     /dev/xvda2            147G  188M  140G   1% /mnt           <--- This one      I thought /mnt is only the "parent mount points", and that devices are usually mounted as `/mnt/something` and not as `/mnt` itself. /mnt seems to be working ... I can write to it. Is this situation ok? (This is an Amazon EC2 ubuntu image)


Change colors in console/virtual terminal

Is there a way to alter all the available colors in console / virtual terminal?   By console, I mean what you get after pressing CTRL + ALT + F1 and not anything like xterm or urxvt. So, I guess that would mean alter I can change 8 of the colors using escape sequences like so:               echo -en "\e]PY######"      where Y is the numerical id of the color (0 to 7) and ###### is the hex color value. My ultimate goal is to port the solarized color scheme to the console, because I want to look vim all the same regardless of whether i'm in console or X. Any suggestions on this? htop in xterm:   htop in xterm, solarized colors htop in console, after applying the 8 colors:   htop in console, after applying the 8 colors i could


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

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


Gifsicle on CentOS? x86_64

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


How to load a module in Gentoo?

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


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

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


Automatically disable Linux extensions for Samba mounts

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


Column mismatch and substituting

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


feh: maintain zoom setting

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


How can I get mod_perl running in Arch Linux?

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


Installing Debian without GUI for a web server

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


pacman and powerpill not working

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


Questions regarding mounting CD-ROM on linux

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


Python error after installing libboost-all-dev on debian

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


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

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


How to check if Samba is installed

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