Procmail standard base path for directory delivery

I had trouble with procmail not wanting to deliver my mail to a specific folder. I had:               DEFAULT=/home/vmail/${ER_DOMAIN}/${ER_USER}/          :0     * ^To:.*my-email     * ^Subject:.*some-filter     .the-dir/      But got errors like:               procmail: Unable to treat as directory ".the-dir"      I changed the last line of the procmail rule to:               /home/vmail/$ER_DOMAIN/$ER_USER/.the-dir/      To give procmail the whole path, and that works. Is there a way I can give procmail a base path, so that I don't have to put the full path in every rule? Is there a standard procmail-way to do this?


Difference between curl -d `data` and curl -d @file

I would like to convert my configuration files for ElasticSearch from JSON to YML. I am using curl for all REST related opertions overhanding the file via               $ curl -X PUT http://localhost:9200/newindex -d @file.yml      While this is working for JSON files it is not working for YML configuration files. In the first moment I thought it is because of `Content-Type: application/x-www-form-urlencoded` implied by -d. But surprisingly the following statement works:               $ curl -X PUT http://localhost:9200/newindex -d '$(cat file.yml)'      So, what do I miss?


Are there any GPG checks in OpenBSD when installing an application?

Like under an average Linux distribution - are there any checkings that the downloaded packages are really the packages that are on the mirror server?


Create .tar.gz from a directory omitting some subdirectories and add only new or changed files

I need to create a script, maybe `bash`, maybe just a `.sh` that checks for files changes on a root directory and sub-directories of the root, and adds to a new file. The tar.gz file name should have the creation date at the end (e.g. `monitor-17.06.2013.tar.gz`). I made this:               tar -zcvf /home/monitor.tar.gz /var/www/html/monitor --exclude /var/www/html/monitor/cache /var/www/html/monitor/log      and it works, but the directory `/var/www/html/monitor/log` isn't omitted, the file name doesn't contain the date, and this is missing the part that adds only new or changed files because I don't know how to do it. **EDIT: clarify a bit my needs** Ok, due to some comments by users here I'll try to leave exactly what I'm looking for.               Day1: 2013-06-15     Directory: /var/www/html/monitor     Backup File Created: monitor-2013-06-15.tar.gz (contains all the content of /monitor folder)          Day2: 2013-06-16     Directory: /var/www/html/monitor     Files Changed:        /var/www/html/monitor/file1.php       /var/www/html/monitor/log/file2.php       /var/www/html/monitor/web/file3.php          Files Added:        /var/www/html/monitor/index.php     Backup File Created: monitor-2013-06-16.tar.gz (contains **only** the files index.php, file1.php, file2.php and file3.php)          Day3: 2013-06-17     Directory: /var/www/html/monitor     Files Changed:        /var/www/html/monitor/index.php     Backup File Created: monitor-2013-06-17.tar.gz (contains **only** the file index.php)      The first backup always will have all the content but the rest should only have the modified files and the newest files, nothing else.


Linux Operating system recovery after abnormal termination

How does the operating system (Linux) while rebooting checks whether abnormal termination happened during last shutdown and then does the file system consistent checks etc if required ?


Prevent SSH client passing TERM environment variable to server?

I'm currently using Fedora 18 gnome-terminal, then started `tmux` multiplexer in it. After I connected to a CentOS 5 server via `ssh` command, I find:   * `ls` result has no color   * `tmux`, `screen`, `hexedit`, `htop` all failed to start with error message like:  > open terminal failed: missing or unsuitable terminal: screen-256color It seems that `ssh` passes the $TERM environment variable to the server, but I can't find it in `/etc/ssh/ssh_config` file of Fedora 18. Although I can manually change the $TERM variable on the server, each time I connect, it happens again. So how to prevent it?


How to add Puppy Linux to grub menu installed by Ubuntu?

I've been using Puppy Linux off a USB flash drive drive for a while, but that was really wearing it out. I decided to do a full install to the hard drive, so I cleared out some space, created an ext4 partition, and installed. Unfortunately, I can't figure out how to add it to the Grub menu that Ubuntu installed. I looked around the documentation for a while, then decided that, rather than risk screwing something up, I'd just ask for help. The output of `fdisk -l` is:               # fdisk -l          Disk /dev/sda: 160.0 GB, 160000000000 bytes     255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0xf475f475             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *          63   196527491    98263714+   7  HPFS/NTFS/exFAT     /dev/sda2       196528126   312498175    57985025    5  Extended     /dev/sda5       308310016   312498175     2094080   82  Linux swap     /dev/sda6       196528128   295727103    49599488   83  Linux     /dev/sda7       295729152   308307967     6289408   83  Linux          Partition table entries are not in disk order          Disk /dev/sdb: 4004 MB, 4004511744 bytes     255 heads, 32 sectors/track, 958 cylinders, total 7821312 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *          32     7817279     3908624    b  W95 FAT32     # I have a Windows XP installation on `sda1`, an Ubuntu installation on `sda6`, and I've installed Puppy Linux on `sda7`. (Currently, I'm running Puppy Linux off of `sdb1`.) I'm not sure where Grub is, but I think it's either on `sda6`, with Ubuntu, or hiding somewhere in `sda`'s MBR. Not sure though. Basically, I need to find out how to add an entry to the Grub boot screen, with these options:               title Puppy Linux 5.4     root (hd0,6)     kernel /boot/vmlinuz root=/dev/sda7 pmedia=atahd I've already tried to puzzle it out, but I couldn't manage to pull it off. I just need step-by-step instructions. I will provide any other config files or Terminal outputs requested.


Adjusting the width of the grip for an Openbox theme

I'm trying to recreate the Blackbox Gray theme for Openbox. However, the size of the grips is smaller in Openbox compared to Blackbox. Is there a setting somewhere that controls the size of the grips? Openbox: ![enter image description here](http://i.stack.imgur.com/TSUmy.png) Blackbox: ![enter image description here](http://i.stack.imgur.com/6iQr7.png)


How to log incoming icmp traffic?

I am watching my ip6table and observing an icmp packet arriving and getting dropped at the rate of 1 per second. I am trying to find out what that message is about. I tried using tcpdump (it is definitely not an echo since I explicitly allowed that):               tcpdump 'icmp[icmptype] != icmp-echo'          0 packets captured     0 packets received by filter     0 packets dropped by kernel      As can be seen, I am seeing nothing. I have also tried logging it with iptables without any success. Any ideas?


I'm looking for a free database package for Ubuntu

I need to operate a database for personal use. Now I'm using Ubuntu 14.04 LTS, as opposed to Windows operating system, I'm wondering if there's a dBase, Lotus123 or Access equivalent for Linux? Something simple like MS Works data base would be ideal. Can someone point me to a suitable package?


Upgrading CentOS web server

Have just taken over control of a CentOS 6.4 web server with Apache. My question is, to update the server software, is it a case of just using `yum update` and then `yum upgrade`? Server has been neglected until now so need to install new security patches etc, but I don't (obviously) want to risk losing clients' documents / sites. Brand new to CentOS so please excuse the 'noob' questions!


How can I trigger a script when a certain port becomes available for requests?

I want to trigger a script when port 3000 is opened by a process. The process is a Rails development server, and I just want to be notified when it finishes spinning up and port 3000 starts accepting requests.


Shell script- syntax error: unexpected end of file

I'm practicing some scripts from a book and I keep getting an unexpected end- of-file syntax error. The images below show the error message and the script that uses basic commands to create a system-information html file. The second set of images show my attempt to comment out the problematic lines and run it. In the top part I have three functions that use here-documents to generate html tags, I'm using the '<<-' switch to allow me to indent the tags for readability. My issue is that the error I mentioned keeps popping up. If I change it to 'echo' commands it works just fine, the weird part is I have a here-document at the bottom of the script, outside of a function and that works just fine if I comment out the three functions. What I am I doing wrong? ![dual terminal view: error message and script file](http://i.stack.imgur.com/UdBmJ.png) ![working shoot of script with commented out functions](http://i.stack.imgur.com/LMJLt.png)


System often freezes without warning

The system often just freezes up without any warning, it doesn't gradually start getting slower or something like that, and every time I look the avarage system load is below 20% (usually not even 10%).   When looking at `dmesg`, there's one thing that always seems to come back though. The message `composite sync not supported`. These freezes are getiing **indredibly annoying** as I always lose all my work I haven't saved yet, and the last time it froze up happened **while** I was saving something (I don't think I need to tell you that that file was gone).   Can annyone give me any pointers (and hopefully solutions as well), to where this problem lies? If you've found something that might be the cause, but you don't know how to fix it, just put it in the comments, please. That way I can do a bit of research myself maybe. * * * Dmesg: http://pastebin.com/ZeiULvSK   ... And I thought there was a `kernel.log` file in `/var/log`, but apparently I was wrong. * * * More recent `dmesg`: http://pastebin.com/CXETguti   This is the output taken right after closing VVVVVV (a game).   I found out 2 things today that both point to the same thing... The `dmesg` is full of **Nouveau** errors, and games lag like hell, and some don't start at all. The conclusion is that **it refuses to use the NVidia drivers**.   Help on getting them to work would be nice as well. More info on that: http://askubuntu.com/a/83995/18953 * * * When adding `nomodeset` to my kernel line in GRUB I'm stuck with a small screen resolution, limited amount of colours (gradients look like crap), the screen becomes laggy, but the errors don't crop up anymore in `dmesg`. I've experienced no freezes with this parameter added, but I haven't worked longer than 10 minutes with `nomodeset` because making mindmaps on a small resolution is annoying.   My graphic card is an NVidia Quadro NVS 110M.               robin@robin-Latitude-D620:~$ lspci | grep -i vga     01:00.0 VGA compatible controller: nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)     robin@robin-Latitude-D620:~$ sudo lshw -class display     [sudo] password for robin:        *-display                           description: VGA compatible controller            product: G72M [Quadro NVS 110M/GeForce Go 7300]            vendor: nVidia Corporation            physical id: 0            bus info: pci@0000:01:00.0            version: a1            width: 64 bits            clock: 33MHz            capabilities: pm msi pciexpress vga_controller bus_master cap_list rom            configuration: driver=nouveau latency=0            resources: irq:16 memory:ed000000-edffffff memory:d0000000-dfffffff memory:ee000000-eeffffff memory:ef000000-ef01ffff      * * * **What I did to install the NVidia drivers**   Installed `nvidia-current` with Jockey, removed it again (had to try 2 times, first time failed), added a PPA for a newer version, installed `nvidia- current` again (this time with the terminal), rebooted.


How to run a command while logging output to a file?

I have a console application that needs to be run as part of the deployment of a new application version on my server. This console application is designed to output to the console, and cannot be changed. I'd like to run it as normal, but have stdout and stderr logged to a file at the same time they're output to the console. How can I do that on Linux?


ip function exit code

I use use `ip` by `system("ip link set eth0 up")` in a C program. I know that `system` returns `-1` if it fails and returns what the called function returns(exit). E.g., if eth0 is not exist on the system, it returns `256`. **Where can I find what these numerical values defined for`ip`?** For example `ifconfig`'s Return Codes:               Return Code Description     0    The command completed successfully.     4    The command completed successfully, but a warning condition was detected.     8    The command was not specified correctly.     12    An error was encountered.     16    An unexpected condition was encountered.


Variable name from command output

I have some string, and want to split on colon ":" assigning on variable with name from left part and value from right part. For example: `echo "Title: Some title" | sed 's/:.*//'` gives me wanted variable name "Title", and: `echo "Title: Some title" | sed 's/.*: //'` gives me the value "Some title". My problem is how to assign variable named "Title" by the output of above command. I can assign the value like `$(echo "Title: Some title" | sed 's/.*: //)` but can't find how to assign the name


Updating a driver quirk in kernel

Os : Debian 6 Kernel Version : 2.6.32 I have been recently working with Linux application and now we have some little hard-disk issues where my motherboard doesn't support AHCI through bios. On various Google searches i found that i can force Linux kernel force load driver to AHCI mode. i have just now started my kernel walk through and i am very new for handling issues. THS IS THE QUIRK WHICH I FOUND WILL WORK : http://tartarus.org/~ds/quirk-ich- force-ahci.patch I download the kernel and its respective headers and did a complete kernel build.since its Debian updated it in the client machine and found it was working as expected                 linux-image-2.6.32_2.6.32-2_i386.deb -- 26MB       linux-firmware-image_2.6.32-2_all.deb -- 5k      but now i need to apply the patch in all my client machines which i located n remote locations where 26 mb in the network is very high Is there a way where only this quirk can be updated in client in a reduce size like some KO file update. Is this the only way way to update the driver?? need some guidelines on the same. i also saw : http://www.cyberciti.biz/faq/add-remove-list-linux-kernel- modules/ in my case can someone guide me with some pointers how this has to be done Please guide


Custom X application RCNG startup script woes

I am attempting to build a FreeBSD + XBMC based media box. Everything is all working fine except for one point. I need to boot XBMC as an RCNG startup script, which is all fine, except: If the command to start X and XBMC is run in the foreground all works fine. If it is pushed to the background (with &) it starts to work then is kicked out (I think) by getty starting. Is there some way of stopping getty from killing X, or am I barking up completely the wrong tree? * * * # rcng script:               #!/bin/sh     #     # $FreeBSD$     #     # PROVIDE: xbmc     # REQUIRE: sshd     # KEYWORD: shutdown     #     # Add the following line to /etc/rc.conf to enable xbmc:     #     # xbmc_enable="YES"     #     # You will also need to fill in the xbmc_flags="" variable to suit your configuration.     #          xbmc_enable=${xbmc_enable:-"NO"}     xbmc_flags=${xbmc_flags:-""}          . /etc/rc.subr          name=xbmc     rcvar=`set_rcvar`     #required_files="/usr/local/etc/xbmc.conf"          xbmc_start() {             PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin             HOME=/root             /usr/local/bin/xinit /usr/local/bin/xbmc       # adding & makes it all fail     }          start_cmd=xbmc_start          #command=/usr/local/bin/xbmcboot          load_rc_config $name     run_rc_command "$1"      * * * One more note - when it does kick it out the screen is screwed. It shows me the first bit of the X.Org startup messages and that's all. No login, no control over it, no ability to start X again even remotely. * * * I have now turned off ttyv2 and upwards in the /etc/ttys - it has stopped the screen from locking up when it kicks out Xorg (gives me a normal getty prompt), but it still kicks it out. So it's deffinately getty / init related. * * * Ok, I am 100% convinced it's to do with getty starting up. If I put the commands to start the x session in a script with a _sleep 5_ in it so the X session doesn't actually start until after getty has started running it all works fine. While I can live with this for now, it would be nice to understand why it behaves like this and maybe get it to start up more friendly.


What aspects of Plan 9 have made their way into Unix?

Plan 9 was developed by Bell Labs as a successor to Unix. Although for various reasons it never quite materialized as such, a fair amount of development still went into Plan 9. My question is, what - if anything - from Plan 9 has made its way into modern Unix?


How do I configure PulseAudio for 7.1 Surround Sound over HDMI?

I have my machine connected over HDMI to a receiver. But when I try to use more than two channels with PulseAudio, I only get two. `pacmd list cards` shows the card, but does not show an HDMI profile with more than two channels. I have confirmed that 7.1 sound works via ALSA:               pasuspender -- speaker-test -D hdmi -c 8 -m FL,FC,FR,RR,RRC,RLC,RL,LFE      Produces static that goes around the room.


Running du command reports infinity as disk usage

I'm trying to get the total size of what's stored in my home directory. To my surprise, it reports infinity after a few seconds:               /home/user $ du -sh .     Infinity      Huh? I'm pretty sure there are no recursive symlinks, but `du` should not follow symlinks anyways per default. I've also tried `du -shx .` so it won't cross device boundaries - with the same result. I'm pretty sure I don't have infinite disk space or disk usage. ;-) The target filesystem is a btrfs subvolume with no snapshots. `rsync` syncs this directory to an external disk just fine every night, it has no problem with this "infinity." However, `du` reports the same there. **Answers to comments:** There are no mount points within my home directory:               $ mount|grep home     /dev/sda3 on /home type btrfs (rw,relatime,compress=lzo,space_cache,autodefrag)      Using the full path instead of `.` as parameter shows the same behavior. There are no files bigger than 200GB:               $ sudo find -size +$((200*1024*1024)) | wc -l     0


Change directory for Kate syntax highlighting files

I'm running Standard Debian Wheezy with KDE 4.8.4 and Kate 3.8.4. The Kate text editor's syntax highlighting files are located in:               /usr/share/apps/katepart/syntax      If I run               kde4-config --prefix      this gives               /usr      and _$KDEDIR_ is empty. This results in that only XML files in the upper direcory are used for highlighting. In several other forums, I saw that it should work to create a folder "syntax" in               ~/.kde/share/apps/katepart/      If I put syntax-highlighting files there on my system, they appear to be ignored. How can someone change/set the directory for the syntax-highlighting files used by _Kate_ to an arbitrary directory?


Launching a sudo gui from desktop

Environment: CentOS 5.10 on 32 Bit. `test.sh`:               #!/bin/bash     cd /dump     sudo /opt/java/jre1.7.0_60/bin/java -jar mytest.jar      `mytest.jar` will pop a GUI app in the desktop, username is in sudoers with NOPASSWD. Created a launcher in desktop, on double click it doesn't launch the GUI. If I run `test.sh` in terminal, it works without issue.


Problem with bash script executed from website

I have just begun writing scripts in bash and I am putting some of them on my web server (whihc is located on my virtual Debian 6.0.4 machine). I have installed lighttpd on this machine.and when I execute for instance this command :               TOP=`top -n 1`;     PS=`ps aux`;          echo "that's top\n" $TOP;     echo "ps\n" $PS;      Nothing is printed as `$TOP` and for `$PS` the text is written without separation for lines (all is written in a single line). How can I change this ?


Running Commands on Remote Linux Server Using SSH

I am writing a Bash Script wherein I need to run some set of commands on a remote Linux server from my local computer using SSH. I want the results to be displayed on the terminal screen or dump the results in a file on my local system. How can achieve this? Is the following syntax correct?               \#!/bin/bash     .     .     .     .          ssh <user>@<remote_host> 'COMMAND >> /path/to/file ; scp /path/to/file <user>@<local_host>:<location>; exit'     .     .      Thanks in advance.


Alias for finding a file not working in bash

The following alias for finding a file works in tcsh but not in bash.               alias ff "find . -name '*\!{*}*' -ls"      When I put the above line in .bashrc and then source it I get :               bash-3.2$ source .bashrc     bash: alias: ff: not found     bash: alias: find . -name '*\!{*}*' -ls: not found      Now if I define the alias but putting an equals sign just after the alias name the above error goes away but it doesn't work as expected.                alias ff="find . -name '*\!{*}*' -ls"       Now if I source the file the previous error goes away but the `find` command doesn't work as expected.                bash-3.2$ source .bashrc      bash-3.2$ ff somefile      find: paths must precede expression      Usage: find [-H] [-L] [-P] [path...] [expression]


volcopy for Linux?

Reading one of the editions of the Nemeth's book (Nemeth et al), have read about `volcopy` -- an utility that copies a filesystem from one device to another, making "a literal copy" (here's a man page, though not _too_ helpful). The Book said the utility exists for Linux, but quick googlin' didn't show many results. So the question is -- is it used on Linux, and if not, what is the default alternative to mirror-copy a filesystem ? `dump` and `restore` ? **Edit.** I was thinking that such an utility could be useful in the case of e.g. hard disk replacement -- currently I am using `dd` to replicate the root partition etc, this is fast but obviously preserves the size of the partition. So I thought `volcopy` could be a quick alternative that allows to copy to a bigger partition. `dump` | `restore` allow to to that, if I am not mistaken. Sorry for being too unspecific initially.


Recording and charting boot process information in Linux

I need to write a command line tool that records the boot process information in Linux, and then renders it in a chart format (a textual chart would do). How do I **_programmatically_** obtain the this boot process information? Languages that I am allowed to use are C and C++. Thanks in advance. :-)


Raid 5 rebuild with wrong stripe size & no failed disks - is data lost?

I'm curious if there are hidden complexities to RAID5 and RAID5 rebuilds. My understanding is that (in a 3 disk array) a rebuild would just directly compute the parity of disks 1 & 2 and write that parity to disk 3 (or whatever disk was replaced). If it is really this simple, is there any way for a rebuild to cause data loss if no disks were actually replaced? For example... "hypothetically", if I configured my raid array with all disks & original data still there, but set the wrong symmetry, wrong stripe size, disks in the wrong order, etc, and then for some reason I resynced or reconstructed the array, could data be lost (or even changed at all)?


How to make dns resolve faster

I changed name server of one domain. Then I flush dns               root@host [~]# /etc/init.d/named restart     Stopping named:                                            [  OK  ]     Starting named:                                            [  OK  ]     root@host [~]# ping wallpaperx.org     PING wallpaperx.org (76.73.5.22) 56(84) bytes of data.     64 bytes from 76.73.5.22: icmp_seq=1 ttl=53 time=36.0 ms     64 bytes from 76.73.5.22: icmp_seq=2 ttl=53 time=36.7 ms     64 bytes from 76.73.5.22: icmp_seq=3 ttl=53 time=35.9 ms     64 bytes from 76.73.5.22: icmp_seq=4 ttl=53 time=35.9 ms      Well, ping still points to the old server. Why?


What does SWAP mean in top?

It says                  p: SWAP  --  Swapped size (kb)       The non-resident portion of a task's address space.             q: RES  --  Resident size (kb)       The non-swapped physical memory a task has used.            RES = CODE + DATA.      Okay, what does "non-resident portion" mean? Does SWAP mean that hard disk is used as additional memory?


Search a pattern and print preceding lines starting with another pattern

I need to grep for a pattern and once I find it, I need to look for another pattern preceding that and print all those lines in between those. Better example:               1 a     2 a     3 a     4 a     5 a     6 b     7 c     8 d     9 xyz     10 xyz     11 a     12 a      Grep for `xyz` and then grep for first `a` preceding `xyz` line and print all the lines. Output (first preceding occurrence of `a`, I don;t care about other `a`'s in the file):               5 a      6 b     7 c     8 d     9  xyz     10 xyz


Run Apache2 as root

I am teaching a security class and I would like to show them how it is very stupid to run apache as root (that means I don't need to be preached to about how stupid it is; I agree with you) I'm having problems with setting the CFLAG when compiling to have apache stop holding my hand. Could you give me a step by step. Thanks.


Generating/validating checksums in a single line?

When I generate checksums for my files, I have to do a bit of extra work to get them formatted properly:               CHECKSUM="$(shasum "$file" | cut -b 1-40)"     echo -n "$CHECKSUM" > "$file.sha"      This is to ensure that in the file, I only have the checksum itself (hence `cut`) and that at the end of the file, there's no newline (hence `echo -n`). Validating the checksums also requires a bit extra work:               CHECKSUM="$(shasum "$file" | cut -b 1-40)"     echo -n "$CHECKSUM" | diff - "$file.sha"      Is there an easier, more compact way of creating and validating checksums without storing the path? I prefer not to store the path in the checksum along with the file as it makes the files less portable IMO.


Continue for loop by keyboard

I have user account on a linux machine which I do not know its exact IP address. But I know a range which it is ran on one of them. I want to check which server is my desired server. There are some Microsoft servers, some Linux servers and some servers that are down as well. I have a shell script to check each server:               #!/bin/sh     for i in $(seq 1 127)     do         echo "192.168.1.$i:"         ssh 192.168.1.$i -l user_name     done      This code goes to each IP. If it ran ssh, it prompts for password, if ssh did not run, it tries the next ip and if server is down, it waits for a long time. Also if the server has ssh and prompts for a password, I can not escape from it by keyboard from such a server. How can I escape from these two types by keyboard and go to the next IP without terminating the program? For example `CTRL` + `C` terminates the program.


How to make GTK application use the theme options configured in the GNOME Tweak Tool (and not the KDE's GTK configuration) when I'm under GNOME?

I'm using **openSUSE 13.1** initially installed as a **KDE4** Desktop environment (it's the default corporate install at my work). Now I would like to use the GNOME desktop. So, I installed **GNOME 3.10** with the standard openSUSE gnome desktop pattern through zypper (`patterns-openSUSE-gnome`). Now, my problem is that under the GNOME desktop, the GNOME Tweak Tool configuration is completely ignored for pure GTK apps (it is ok for full GNOME apps like `gedit` or `yast-gnome`). GTK applications actually use the settings found under `KDE System Settings` > `Application` > `GTK`. I have an older openSUSE desktop (12.3 / KDE4 / Gnome 3.6.2) that works correctly :   * Under KDE : GTK apps are themed using `KDE System Settings` > `Application` > `GTK` settings.   * Under GNOME : GTK apps are themed using `GNOME Tweak Tool`. It seems that under GNOME, KDE-GTK configuration is being used in favor of GNOME Tweak Tool configuration. **How to make GTK application use the theme options configured in the GNOME Tweak Tool (and not the KDE's GTK configuration) when I'm under GNOME ?** **EDIT:** To make sure the problem didn't came from the corporate pre-install I did the following test in a VM :   1. Install a fresh openSUSE 13.1 with GNOME Desktop only (choose GNOME in the install dialog) and log in using GNOME :     * All apps display well (yast, gedit, firefox)   2. Install the KDE4 openSUSE pattern, then log in using KDE4, then logout and log back using GNOME :     * **Icons in yast (gnome yast) get changed by KDE4 icons** , besides that, it has the GNOME/GTK look     * Gedit still display well (default GNOME/GTK look)     * **Firefox and Meld have the KDE4 oxygen look** So it seems that the problem comes from this version of KDE4 (the one that comes with openSUSE 13.1) that takes over GTK whether or not the desktop is KDE4... In the past, KDE4 was more gentle ...


How to silence spam or unwanted email from email-lists with Procmail?

I joined an email-list. I found it low-quality and I don't have time to follow their discussions. Then I informed the head to remove my email but they haven't done it. How can I can silence their emails with Procmail? It is some sort of email-list `Envelope-to:personal@something.com`. They send it from `tiedotus@edistyspuolue.fi`. How can I silence them, i.e. not to get their emails to fill my mailbox, not to bother me with their emails?               :0:     * ^FROM:.*@edistyspuolue.fi     * ^TO:personal@something.com     /dev/null


mutt: save message to specific folder

I have several folders defined in Mutt:               mailboxes           "~/Mail/inbox"     mailboxes           "~/Mail/sent"     mailboxes           "~/Mail/archive"      I can save (move) a message to archive, by pressing `s` and then `?` to see a list of folders, and then I can choose `archive` from the list. Since I always want only to save to `archive` I would like to have a macro, so that pressing `s` automatically saves selected message to `archive`, without asking me. Can somebody please help? **EDIT:** I now have following macro, to save messages to my "archive" folder:               macro index,pager S "<tag-prefix><save-message>=archive<enter>\       :set delete=yes<enter><sync-mailbox>:set delete=no<enter>"      the problem is, the messages stay in index marked as deleted. They are not "synced" immediately. Second, the `<enter>` at the end acts as `<display- message>`, so that when I press `S`, I end up in the pager of the current message. In a similar way, I am trying to implement the `trash` folder in mutt. The following is taken from the Mutt MacroSamples               set maildir_trash=yes     set wait_key=no     folder-hook . 'bind index q quit'     folder-hook inbox 'macro index q ":unset maildir_trash;push \"T~D\\n<tag-prefix-cond>m=trash\\n<end-cond><quit>\"\n"'      but this does not work either. Insted mutt asks me:               Append messages to etmaildir_trash;push"T~D\n<tag-prefix-cond>m=trash\n<end-cond><quit>"/maildir_trash;push"T~D\n<tag-prefix-cond>m=trash\n<end-co ([yes]/no):      what ever I press, nothing happens (the folders trash/{cur,new,tmp} do exist)


'xorg.conf' and hybrid graphics

Is there any sane way to be able to configure X server and have working hybrid graphics at the same time? Whenever I add "xorg.conf" X server stops loading driver for second (discrete) GPU. Configuration file I've tried:               Section "Device"         Identifier  "Card0"         Driver      "intel"         BusID       "PCI:0:2:0"         Option      "AccelMethod"       "sna"         Option      "TearFree"      "true"         Option      "SwapbuffersWait"   "false"     EndSection          Section "Device"         Identifier  "Card1"         Driver      "radeon"         BusID       "PCI:1:0:0"     EndSection          Section "Screen"         Identifier  "screen1"         Device      "Card0"     EndSection      With this X server simply skips loading "radeon" driver, no GPU PRIME support then.


Expanding root partition in SUSE Linux

I have a server where the space distribution among partitions is as follows:               GSSJMB02:~ # df -kh     Filesystem            Size  Used Avail Use% Mounted on     /dev/cciss/c0d0p5      25G  5.9G   18G  25% /     udev                  3.9G  144K  3.9G   1% /dev     /dev/cciss/c0d0p9      64G  129M   61G   1% /apps     /dev/cciss/c0d0p1     244M   12M  219M   6% /boot     /dev/cciss/c0d0p10     16G  129M   15G   1% /home     /dev/cciss/c0d0p7     5.0G  618M  4.1G  13% /opt     /dev/cciss/c0d0p8     9.9G  228M  9.2G   3% /var     GSSJMB02:/gsn/sw       25G  5.9G   18G  25% /mnt/nfs/gsn/sw     GSSJMB02:/gsn/nodes    25G  5.9G   18G  25% /mnt/nfs/gsn/nodes      Here the filesystem `/dev/cciss/c0d0p5` has less space than I require. And filesystem `/dev/cciss/c0d0p9` has a lot of unusable space. Can I increase the space of `/dev/cciss/c0d0p5` by taking out some from `/dev/cciss/c0d0p9`?


How can my HDD swap without a swap partition?

I have no swap partition on my disk because I prefer having the OOM reaper kill anything it wants **quickly** rather than having to wait 10 minutes for my swap partition to get filled + 5 other minutes to launch the OOM reaper + crash. Basically, my problem is:   1. launch "eat_all_my_memory";   2. wait 10 minutes with an unresponsive system (HHD LED always on);   3. in the meantime, try to switch to a TTY;   4. wait a couple of minutes to actually switch;   5. enter the user name and the password;   6. wait a couple of minutes;   7. log in;   8. log off because of the OOM reaper;   9. repeat from 5 until it works;   10. use top and see that a kworker is "working";   11. get killed again;   12. get a message from the reaper saying that "eat_all_my_memory" was killed;   13. Memory is freed. It took 12 minutes last time. My attempts to log in in a TTY seem to have no effect on the whole cycle time. I have a couple of question then:   1. Why does my system even write anything on the disk? There is no swap!!!   2. Where does it write to?   3. There is still no way to tell the OOM killer to kill the biggest user process or the one eating most of the memory in a minimum time. Til then, is there some way to get the OOM killer just do its job without trying to do anything with the disk? I've had the problem with Debian, Ubuntu and now Archlinux so this does not seem to be distro specific. **EDIT: excerpts of the log file** I launched the offending command around 15:28. It seems that the system actually takes a lot of time before figuring out that there is nothing left.               déc. 11 15:28:56 hostname dbus[475]: [system] Failed to activate service 'org.freedesktop.ModemManager1': timed out     déc. 11 15:29:40 hostname dbus[475]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.ModemManager1.service': Unit dbus-org.freedesktop.ModemManager1.service failed to load: No such file or directory.     déc. 11 15:30:31 hostname dbus-daemon[475]: dbus[475]: [system] Failed to activate service 'org.freedesktop.ModemManager1': timed out     déc. 11 15:30:46 hostname systemd[1]: Starting Getty on tty2...     déc. 11 15:30:46 hostname systemd[1]: Started Getty on tty2.     déc. 11 15:31:56 hostname systemd[1]: Starting Session 2 of user username.     déc. 11 15:31:56 hostname systemd[1]: Started Session 2 of user username.     déc. 11 15:31:57 hostname systemd-logind[472]: New session 2 of user username.     déc. 11 15:31:58 hostname systemd[1]: getty@tty2.service holdoff time over, scheduling restart.     déc. 11 15:31:58 hostname systemd[1]: Starting Getty on tty2...     déc. 11 15:31:58 hostname systemd[1]: Started Getty on tty2.     déc. 11 15:32:10 hostname systemd[1]: Stopped Session 2 of user username.     déc. 11 15:32:18 hostname systemd-logind[472]: Removed session 2.     déc. 11 15:33:01 hostname systemd[1]: Starting Session 3 of user username.     déc. 11 15:33:02 hostname systemd[1]: Started Session 3 of user username.     déc. 11 15:33:15 hostname systemd-logind[472]: New session 3 of user username.     déc. 11 15:33:37 hostname systemd-logind[472]: Failed to save session data for 3: No space left on device     déc. 11 15:35:00 hostname dbus-daemon[475]: dbus[475]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.nm-dispatcher.service': Unit dbus-org.freedesktop.nm-dispatcher.service failed to load: No such file or directory.     déc. 11 15:35:00 hostname kernel: chromium invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=300     déc. 11 15:34:52 hostname systemd[1]: getty@tty2.service holdoff time over, scheduling restart.     déc. 11 15:34:52 hostname systemd[1]: Stopping Getty on tty2...     déc. 11 15:34:52 hostname systemd[1]: Starting Getty on tty2...     déc. 11 15:34:52 hostname systemd[1]: Started Getty on tty2.     déc. 11 15:34:52 hostname systemd-logind[472]: Removed session 3.     déc. 11 15:35:00 hostname kernel: chromium cpuset=/ mems_allowed=0     déc. 11 15:35:00 hostname kernel: CPU: 0 PID: 9811 Comm: chromium Not tainted 3.12.3-1-ARCH #1     déc. 11 15:35:00 hostname kernel: Hardware name: Dell Inc. Latitude E6400                  /0X574R, BIOS A20 12/21/2009     déc. 11 15:35:00 hostname kernel:  0000000000000000 ffff8800502179a8 ffffffff814ee3db ffff8800ab6588b0     déc. 11 15:35:01 hostname kernel:  ffff880050217a38 ffffffff814ec36e ffff8800502179c8 ffffffff81062d66     déc. 11 15:35:01 hostname kernel:  ffff880050217a10 ffffffff810f3354 0000000000000000 ffff8800bf449b28     déc. 11 15:35:01 hostname kernel: Call Trace:     déc. 11 15:35:01 hostname kernel:  [<ffffffff814ee3db>] dump_stack+0x54/0x8d     déc. 11 15:35:01 hostname kernel:  [<ffffffff814ec36e>] dump_header+0x7f/0x200     déc. 11 15:35:01 hostname kernel:  [<ffffffff81062d66>] ? put_online_cpus+0x56/0x80     déc. 11 15:35:01 hostname kernel:  [<ffffffff810f3354>] ? rcu_oom_notify+0xe4/0x100     déc. 11 15:35:01 hostname kernel:  [<ffffffff81138dd6>] oom_kill_process+0x206/0x390     déc. 11 15:35:01 hostname kernel:  [<ffffffff81139557>] out_of_memory+0x437/0x480     déc. 11 15:35:01 hostname kernel:  [<ffffffff8113f3e9>] __alloc_pages_nodemask+0xad9/0xaf0     déc. 11 15:35:01 hostname kernel:  [<ffffffff8117eaa9>] alloc_pages_current+0xa9/0x160     déc. 11 15:35:01 hostname kernel:  [<ffffffff81136297>] __page_cache_alloc+0x97/0xc0     déc. 11 15:35:01 hostname kernel:  [<ffffffff81137c38>] filemap_fault+0x188/0x430     déc. 11 15:35:01 hostname kernel:  [<ffffffff8115c2bf>] __do_fault+0x6f/0x590     déc. 11 15:35:01 hostname kernel:  [<ffffffff811610e8>] handle_mm_fault+0x398/0x10f0     déc. 11 15:35:01 hostname kernel:  [<ffffffff814f8c59>] __do_page_fault+0x1e9/0x5f0     déc. 11 15:35:01 hostname kernel:  [<ffffffff81168177>] ? do_mmap_pgoff+0x357/0x3e0     déc. 11 15:35:01 hostname kernel:  [<ffffffff814f906e>] do_page_fault+0xe/0x10     déc. 11 15:35:01 hostname kernel:  [<ffffffff814f5c88>] page_fault+0x28/0x30     déc. 11 15:35:01 hostname kernel: Mem-Info:     déc. 11 15:35:01 hostname kernel: Node 0 DMA per-cpu:     déc. 11 15:35:01 hostname kernel: Node 0 DMA per-cpu:     déc. 11 15:35:01 hostname kernel: CPU    0: hi:    0, btch:   1 usd:   0     déc. 11 15:35:01 hostname kernel: CPU    1: hi:    0, btch:   1 usd:   0     déc. 11 15:35:01 hostname kernel: Node 0 DMA32 per-cpu:     déc. 11 15:35:01 hostname kernel: CPU    0: hi:  186, btch:  31 usd:  30     déc. 11 15:35:01 hostname kernel: CPU    1: hi:  186, btch:  31 usd:  64     déc. 11 15:35:01 hostname kernel: active_anon:690683 inactive_anon:9400 isolated_anon:0                                           active_file:92 inactive_file:104 isolated_file:0                                           unevictable:37 dirty:3 writeback:24 unstable:0                                           free:14229 slab_reclaimable:4844 slab_unreclaimable:6907                                           mapped:9344 shmem:12110 pagetables:9731 bounce:0                                           free_cma:0     déc. 11 15:35:01 hostname kernel: Node 0 DMA free:12148kB min:232kB low:288kB high:348kB active_anon:3024kB inactive_anon:44kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15992kB managed:15908kB mlocked:0kB dirty:0kB writeback:0kB mapped:40kB shmem:44kB slab_reclaimable:32kB slab_unreclaimable:160kB kernel_stack:40kB pagetables:200kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes     déc. 11 15:35:01 hostname kernel: lowmem_reserve[]: 0 2984 2984 2984     déc. 11 15:35:01 hostname kernel: Node 0 DMA32 free:44768kB min:44820kB low:56024kB high:67228kB active_anon:2759708kB inactive_anon:37556kB active_file:368kB inactive_file:416kB unevictable:148kB isolated(anon):0kB isolated(file):0kB present:3117364kB managed:3058728kB mlocked:148kB dirty:12kB writeback:96kB mapped:37336kB shmem:48396kB slab_reclaimable:19344kB slab_unreclaimable:27468kB kernel_stack:3424kB pagetables:38724kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:1540 all_unreclaimable? yes     déc. 11 15:35:01 hostname kernel: lowmem_reserve[]: 0 0 0 0     déc. 11 15:35:01 hostname kernel: Node 0 DMA: 5*4kB (UEM) 4*8kB (UE) 6*16kB (UE) 1*32kB (E) 7*64kB (UEM) 0*128kB 3*256kB (UEM) 3*512kB (UEM) 1*1024kB (E) 2*2048kB (ER) 1*4096kB (M) = 12148kB     déc. 11 15:35:01 hostname kernel: Node 0 DMA32: 402*4kB (UER) 661*8kB (UEM) 437*16kB (UE) 141*32kB (UE) 96*64kB (UEM) 16*128kB (UE) 3*256kB (U) 0*512kB 15*1024kB (M) 1*2048kB (M) 0*4096kB = 44768kB     déc. 11 15:35:01 hostname kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB     déc. 11 15:35:01 hostname kernel: 12341 total pagecache pages     déc. 11 15:35:01 hostname kernel: 0 pages in swap cache     déc. 11 15:35:01 hostname kernel: Swap cache stats: add 0, delete 0, find 0/0     déc. 11 15:35:01 hostname kernel: Free swap  = 0kB     déc. 11 15:35:01 hostname kernel: Total swap = 0kB     déc. 11 15:35:01 hostname kernel: 783436 pages RAM     déc. 11 15:35:01 hostname kernel: 14777 pages reserved     déc. 11 15:35:01 hostname kernel: 557929 pages shared     déc. 11 15:35:01 hostname kernel: 739735 pages non-shared     déc. 11 15:35:01 hostname kernel: [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name     déc. 11 15:35:01 hostname kernel: [  152]     0   152   157732       79     284        0             0 systemd-journal     déc. 11 15:35:01 hostname kernel: [  184]     0   184     8115      317      19        0         -1000 systemd-udevd     déc. 11 15:35:01 hostname kernel: [  471]     0   471    82124      530      56        0             0 NetworkManager     déc. 11 15:35:01 hostname kernel: [  472]     0   472     6454       79      18        0             0 systemd-logind     déc. 11 15:35:01 hostname kernel: [  474]     0   474    20099      626      41        0             0 cupsd     déc. 11 15:35:01 hostname kernel: [  475]    81   475     4604      317      14        0          -900 dbus-daemon     déc. 11 15:35:01 hostname login[17681]: pam_unix(login:session): session opened for user username by LOGIN(uid=0)     déc. 11 15:35:01 hostname kernel: [  478]     0   478    47623      185      28        0             0 gdm     déc. 11 15:35:01 hostname kernel: [  491]     0   491    69089      264      38        0             0 gdm-simple-slav     déc. 11 15:35:01 hostname kernel: [  495]     0   495    52967    17799     112        0             0 Xorg     déc. 11 15:35:01 hostname kernel: [  496]     0   496    65758      934      32        0             0 accounts-daemon     déc. 11 15:35:01 hostname kernel: [  502]   102   502   126663     1810      46        0             0 polkitd     déc. 11 15:35:01 hostname kernel: [  504]     0   504    78582     1823      52        0             0 colord     déc. 11 15:35:01 hostname kernel: [  515]     0   515     7563      150      19        0             0 wpa_supplicant     déc. 11 15:35:01 hostname kernel: [  525]   120   525     7213      100      19        0             0 systemd     déc. 11 15:35:01 hostname kernel: [  527]   120   527    12666      255      29        0             0 (sd-pam)     déc. 11 15:35:01 hostname kernel: [  533]     0   533     2152       46      10        0             0 dhcpcd     déc. 11 15:35:01 hostname kernel: [  557]     0   557    56854      316      40        0             0 upowerd     déc. 11 15:35:01 hostname kernel: [  614]     0   614     2152       46      10        0             0 dhcpcd     déc. 11 15:35:01 hostname kernel: [  745]     0   745    98980     2352      64        0             0 gdm-session-wor     déc. 11 15:35:01 hostname kernel: [  748]  1000   748     7213       99      19        0             0 systemd     déc. 11 15:35:01 hostname kernel: [  749]  1000   749    12666      263      29        0             0 (sd-pam)     déc. 11 15:35:01 hostname kernel: [  752]  1000   752    91654     1159      41        0             0 gnome-keyring-d     déc. 11 15:35:01 hostname kernel: [  754]  1000   754   138634      493      99        0             0 gnome-session     déc. 11 15:35:01 hostname kernel: [  768]  1000   768     3976       38      13        0             0 dbus-launch     déc. 11 15:35:02 hostname kernel: [  769]  1000   769     4912      513      14        0             0 dbus-daemon     déc. 11 15:35:02 hostname kernel: [  772]  1000   772     3166       80      10        0             0 ssh-agent     déc. 11 15:35:02 hostname kernel: [  775]  1000   775    84370      678      33        0             0 at-spi-bus-laun     déc. 11 15:35:02 hostname systemd[1]: Starting Session 4 of user username.     déc. 11 15:35:02 hostname systemd-logind[472]: New session 4 of user username.     déc. 11 15:35:02 hostname systemd[1]: Started Session 4 of user username.     déc. 11 15:35:02 hostname login[17681]: LOGIN ON tty2 BY username     déc. 11 15:35:02 hostname kernel: [  779]  1000   779     4395      116      13        0             0 dbus-daemon     déc. 11 15:35:02 hostname kernel: [  782]  1000   782    31222      198      32        0             0 at-spi2-registr     déc. 11 15:35:02 hostname kernel: [  791]  1000   791   341490     2546     212        0             0 gnome-settings-     déc. 11 15:35:02 hostname kernel: [  803]  1000   803    50098      217      32        0             0 gvfsd     déc. 11 15:35:02 hostname kernel: [  809]  1000   809    93198      652      88        0             0 pulseaudio     déc. 11 15:35:02 hostname kernel: [  810]   133   810    42165       55      19        0             0 rtkit-daemon     déc. 11 15:35:02 hostname kernel: [  816]  1000   816    88701      219      39        0             0 gvfsd-fuse     déc. 11 15:35:02 hostname kernel: [  827]  1000   827    44128      285      21        0             0 dconf-service     déc. 11 15:35:02 hostname kernel: [  830]     0   830    88452      393      37        0             0 udisksd     déc. 11 15:35:02 hostname kernel: [  837]  1000   837   103711      438      97        0             0 gsd-printer     déc. 11 15:35:02 hostname kernel: [  846]  1000   846    17304      135      37        0             0 gconf-helper     déc. 11 15:35:02 hostname kernel: [  848]  1000   848    11426      202      27        0             0 gconfd-2     déc. 11 15:35:02 hostname kernel: [  850]  1000   850    89925     1001      40        0             0 ibus-daemon     déc. 11 15:35:02 hostname kernel: [  854]  1000   854    71274      207      40        0             0 ibus-dconf     déc. 11 15:35:02 hostname kernel: [  856]  1000   856    82143      550      89        0             0 ibus-x11     déc. 11 15:35:02 hostname kernel: [  865]  1000   865   490808    84757     496        0             0 gnome-shell     déc. 11 15:35:02 hostname kernel: [  873]  1000   873    52301      253      36        0             0 ibus-engine-sim     déc. 11 15:35:02 hostname kernel: [  886]  1000   886   122524     1764      70        0             0 gnome-shell-cal     déc. 11 15:35:02 hostname kernel: [  892]  1000   892   302273     2741     165        0             0 evolution-sourc     déc. 11 15:35:02 hostname kernel: [  895]  1000   895    95391      499      54        0             0 mission-control     déc. 11 15:35:02 hostname kernel: [  899]  1000   899   288823     8032     184        0             0 goa-daemon     déc. 11 15:35:03 hostname kernel: [  908]  1000   908    74163      402      43        0             0 gvfs-udisks2-vo     déc. 11 15:35:03 hostname kernel: [  913]  1000   913    52309      264      38        0             0 gvfs-goa-volume     déc. 11 15:35:03 hostname kernel: [  917]  1000   917    68304      236      34        0             0 gvfs-afc-volume     déc. 11 15:35:03 hostname kernel: [  922]  1000   922    49096      756      31        0             0 gvfs-gphoto2-vo     déc. 11 15:35:03 hostname kernel: [  926]  1000   926    46023      192      26        0             0 gvfs-mtp-volume     déc. 11 15:35:03 hostname kernel: [  928]  1000   928    27234      346      23        0             0 gvfsd-metadata     déc. 11 15:35:03 hostname kernel: [  969]  1000   969   393544    16251     221        0             0 evolution-calen     déc. 11 15:35:03 hostname kernel: [  970]  1000   970   121647     1552      99        0             0 zeitgeist-datah     déc. 11 15:35:03 hostname kernel: [  983]  1000   983   108204     2348      64        0             0 tracker-store     déc. 11 15:35:03 hostname kernel: [  989]  1000   989   134035     1425      84        0             0 tracker-miner-f     déc. 11 15:35:03 hostname kernel: [  994]  1000   994    89533      839      43        0             0 zeitgeist-daemo     déc. 11 15:35:04 hostname kernel: [  995]  1000   995   187376     2301     198        0             0 evolution-alarm     déc. 11 15:35:04 hostname kernel: [ 1093]  1000  1093   184129     1392     136        0             0 nm-applet     déc. 11 15:35:04 hostname kernel: [ 1100]  1000  1100    73740      286      45        0             0 telepathy-logge     déc. 11 15:35:04 hostname kernel: [ 1147]  1000  1147    68498      198      36        0             0 gvfsd-burn     déc. 11 15:35:04 hostname kernel: [ 1165]  1000  1165    12786      107      28        0             0 gnome-keyring-d     déc. 11 15:35:04 hostname kernel: [ 1389]  1000  1389   398982     8110     302        0             0 nautilus     déc. 11 15:35:04 hostname kernel: [ 1398]  1000  1398    88619      795      40        0             0 gvfsd-trash     déc. 11 15:35:04 hostname kernel: [ 1457]  1000  1457   203280    24474     225        0             0 lyx     déc. 11 15:35:04 hostname kernel: [ 1559]  1000  1559   183224     3012     149        0             0 gnome-terminal-     déc. 11 15:35:04 hostname kernel: [ 1562]  1000  1562     2092       30      10        0             0 gnome-pty-helpe     déc. 11 15:35:04 hostname kernel: [ 1563]  1000  1563    10912      634      25        0             0 zsh     déc. 11 15:35:04 hostname kernel: [ 1593]  1000  1593    57029     4140     110        0             0 gvim     déc. 11 15:35:04 hostname kernel: [ 2607]  1000  2607   102633      532      67        0             0 gvfsd-dav     déc. 11 15:35:04 hostname kernel: [ 3103]  1000  3103    10908      627      27        0             0 zsh     déc. 11 15:35:04 hostname kernel: [ 3148]  1000  3148   133807    31626     181        0             0 ipython2     déc. 11 15:35:04 hostname kernel: [ 3162]  1000  3162    98936     1056      60        0             0 gvfsd-http     déc. 11 15:35:04 hostname kernel: [ 3302]  1000  3302   107936      982      42        0             0 gvfsd-sftp     déc. 11 15:35:04 hostname kernel: [ 3308]  1000  3308     8996      212      21        0             0 ssh     déc. 11 15:35:04 hostname kernel: [ 5660]     2  5660    14912      126      31        0             0 dbus     déc. 11 15:35:04 hostname kernel: [ 8987]     0  8987     3653       42      11        0             0 rsync     déc. 11 15:35:04 hostname kernel: [ 9769]  1000  9769   511482    26442     351        0             0 chromium     déc. 11 15:35:05 hostname kernel: [ 9773]  1000  9773    93826     1522     144        0             0 chromium     déc. 11 15:35:05 hostname kernel: [ 9774]  1000  9774     1594       20       9        0             0 chrome-sandbox     déc. 11 15:35:05 hostname kernel: [ 9775]  1000  9775   104526     1647     158        0             0 chromium     déc. 11 15:35:05 hostname kernel: [ 9781]  1000  9781    42248      284      78        0             0 nacl_helper     déc. 11 15:35:05 hostname kernel: [ 9782]  1000  9782   159825     1664     139        0             0 chromium     déc. 11 15:35:05 hostname kernel: [ 9811]  1000  9811   329690    27929     379        0           300 chromium     déc. 11 15:35:05 hostname kernel: [ 9821]  1000  9821   321850    24448     515        0           300 chromium     déc. 11 15:35:05 hostname kernel: [ 9828]  1000  9828   305135     5463     199        0           300 chromium     déc. 11 15:35:05 hostname kernel: [ 9834]  1000  9834   305197     7785     219        0           300 chromium     déc. 11 15:35:05 hostname kernel: [13644]  1000 13644    11491      702      27        0             0 zsh     déc. 11 15:35:05 hostname kernel: [14978]  1000 14978   510597     4097     190        0             0 epiphany     déc. 11 15:35:05 hostname kernel: [15037]  1000 15037   490075     7884     183        0             0 WebKitWebProces     déc. 11 15:35:05 hostname kernel: [16463]  1000 16463   606648   342911     976        0             0 python2     déc. 11 15:35:05 hostname kernel: [17520]  1000 17520   307237     7027     213        0           300 chromium     déc. 11 15:35:05 hostname kernel: [17570]  1000 17570   308086     8086     216        0           300 chromium     déc. 11 15:35:05 hostname kernel: [17577]  1000 17577   308518     7981     210        0           300 chromium     déc. 11 15:35:05 hostname kernel: [17665]     0 17665    15239      114      36        0             0 login     déc. 11 15:35:05 hostname kernel: Out of memory: Kill process 16463 (python2) score 447 or sacrifice child     déc. 11 15:35:05 hostname kernel: Killed process 16463 (python2) total-vm:2426592kB, anon-rss:1366496kB, file-rss:5148kB


Lock CD/DVD drive (prevent eject)

On my laptop the eject button for the CD/DVD drive is placed in a very unfortunate position and I hit it a dozen times per day and the tray pops out. I found many solutions which seemed to work for other people: From `man eject`: > -i on | 1 | off | 0 > > This option controls locking of the hardware eject button. When enabled, the > drive will not be ejected when the button is pressed. This is useful when > you are carrying a laptop in a bag or case and don't want it to eject if the > button is inadvertently pressed. This seems to be exactly what I need. `eject -i on` successfully returns:               CD-Drive may NOT be ejected with device button      However, hitting the device button still ejects the drive. As suggested in another answer invoking               echo 1 > /proc/sys/dev/cdrom/lock      did not help either, `lock` already contains 1. The information from `/proc/sys/dev/cdrom/info` suggests that locking is possible:               drive name:            sr0     drive speed:           24     drive # of slots:      1     Can close tray:        1     Can open tray:         1     Can lock tray:         1     Can change speed:      1     Can select disk:       0     Can read multisession: 1     Can read MCN:          1     Reports media changed: 1      The cdctl tool is not in the Debian repository and it does not build on my system. How do I lock my drive so that hitting the hardware switch on the drive would no pop out the drive?


Run a GUI OS via a hypervisor from a Linux server terminal?

Is there a way to run a VM hypervisor, such as VirtualBox directly, from say, CentOS? Let's suppose that I want a high-efficiency server, but it can host guests with GUI-enabled OS's. Additionally, this can be booted directly via a terminal in a non GUI-enabled Linux distro?


Why "sshd Bad prime description" errors?

I've noticed that all our FreeBSD machines throw sshd Bad prime description in line xxx (insert a large number of values for xxx). Presumably this is not something they are all supposed to be doing (despite the fact that there's no visible problems with functionality). Unfortunately, I've not been able to find any useful resources on the web that relate to this problem. Any pointers for troubleshooting/making this obnoxious message go away?


AIX 'rm' command has no '-v' parameter for verbose output as stated by IBM's documentation. Normally I would run (in linux)               rm -rfv <myfile>      to (r)ecursively and (f)orcably delete files and get the verbose output. Since I can only run in AIX:               rm -rf <myfile>      How can I get the verbose output echoed into the terminal?


Automatically load a user function at startup with awk?

I guess this answer from awk separator preferences already gives a hint, but I thought I'd ask explicitly: Is there an equivalent to a `.bashrc` file for `awk`, where I could define my own library functions, which would be automatically (pre)loaded at every call to `awk` - and without using `-f` or `@include` at the command line?


Triggering an action when a specific volume is connected

I have a USB key that contains my keepass2 password database and I'd like to perform some actions when it is plugged into my computer, namely:   * Auto-mount it to some specific location   * When the mounting is done properly, launching keepass2 on the password database file Simple tasks I guess, but I can't find how to do that. I'm using Ubuntu 12.10, and it auto-mounts the device as a "media usb-key" and tries to open the images on it (even though there are none). What is the best way to do that and to disable the ubuntu auto-mounting (so it doesn't conflict) ?


Why can't I `tail -f /proc/$pid/fd/1`?

I wrote a simple script which `echo`-es its PID:               #/bin/bash          while true; do         echo $$;         sleep 0.5;     done      I'm running said script (it says `3844` over and over) in one terminal and trying to `tail` the file descriptor in another one:               $ tail -f /proc/3844/fd/1      It doesn't print anything to the screen and hangs until `^c`. Why? Also, all of the STD file descriptors (IN/OUT/ERR) link to the same pts:               $ ls -l /proc/3844/fd/     total 0     lrwx------ 1 mg mg 64 sie 29 13:42 0 -> /dev/pts/14     lrwx------ 1 mg mg 64 sie 29 13:42 1 -> /dev/pts/14     lrwx------ 1 mg mg 64 sie 29 13:42 2 -> /dev/pts/14     lr-x------ 1 mg mg 64 sie 29 13:42 254 -> /home/mg/test.sh     lrwx------ 1 mg mg 64 sie 29 13:42 255 -> /dev/pts/14      Is this normal? Running Ubuntu GNOME 14.04. Also, if you think this question belongs to SO or SU instead of UL, do tell.


How to add repository from shell in Debian?

In Ubuntu one can add a repository to `apt-get` via the following command -               sudo add-apt-repository ppa:yannubuntu/boot-repair      As Ubuntu is based on Debian code base, I was expecting that the same would work in Debian too, but it doesn't.   * What is the reason for this?   * Is there some other shell command I can use to achieve the same? _Note: I already know I can edit`/etc/apt-get/sources.list`, but I want to achieve this from shell. I also want to know why the same command won't work when the code base is the same._


How to specify command line options for XAMPP for Mac?

Per the answer to this question: Can I have conditional statements, based on server, in .htaccess file? I want to specify a command-line option when starting up Apache on my Mac. But my Apache is part of XAMPP-- I'm using the XAMPP app, where I click a button and Apache just starts. How can I specify a command line option? (I was hoping clicking that button trigged a script that I could edit, but I'm not able to find anything that looks like a startup script in the XAMPP folder.)


Which are the standard commands available in every Linux based distribution?

I would like to know which are the standard commands available in every Linux system. For example if you get a debian/ubuntu/redhat/suse/arch/slackware etc, you will always find there commands like: cd, mkdir, ls, echo, grep, sed, awk, ping etc. I know that some of the mentioned commands are shell-builtin but others are not but they are still always there (based on my knowledge and experience so far). On the other hand commands like gawk, parted, traceroute and other quite famous commands are not installed by default in different Linux distributions. I made different web searches but I haven't found a straight forward answer to this. The purpose is that I would like to create a shell script and it should make some sanity checks if the commands used in the script are available in the system. If not, it should prompt the user to install the needed binaries.


Windows 8.1 not appearing on grub after Linux Mint 16

I had followed a tutorial to install Linux Mint 16 Cinnamon and it works perfectly fine, currently using it to post this question. But when grub loads the only 3 options I am given, are Linux Mint, Linux Mint (Compatibility Mode) and system startup. My computer has come pre-installed with windows 8 on it, both the recovery and windows partition are still visible on the disk usage analyzer. When I installed Linux I had legacy mode turned on but if I turn it off, Linux still works fine. I've tried the "sudo update-grub" command and it reads as follows               Generating grub.cfg ...     Found linux image: /boot/vmlinuz-3.11.0-12-generic     Found initrd image: /boot/initrd.img-3.11.0-12-generic       No volume groups found     Adding boot menu entry for EFI firmware configuration     done      I would still like to dual boot Linux alongside Windows, what do I need to do to achieve this?


USB Media filesystem problem

My USB is not detected recently, I tried `mount`, `fdisk`, `dd`, `gparted`, `mkfs.vfat`               :~# tail -f /var/log/syslog     Oct 27 12:54:29 mohammad-Inspiron-N5110 kernel: [18843.105772] usb 3-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0     Oct 27 12:54:29 mohammad-Inspiron-N5110 kernel: [18843.107485] scsi31 : usb-storage 3-2:1.0     Oct 27 12:54:29 mohammad-Inspiron-N5110 mtp-probe: checking bus 3, device 13: "/sys/devices/pci0000:00/0000:00:1c.4/0000:0b:00.0/usb3/3-2"     Oct 27 12:54:29 mohammad-Inspiron-N5110 mtp-probe: bus: 3, device: 13 was not an MTP device     Oct 27 12:54:30 mohammad-Inspiron-N5110 kernel: [18844.104912] scsi 31:0:0:0: Direct-Access     USBest   USB2FlashStorage 0.00 PQ: 0 ANSI: 2     Oct 27 12:54:30 mohammad-Inspiron-N5110 kernel: [18844.107132] sd 31:0:0:0: Attached scsi generic sg2 type 0     Oct 27 12:54:30 mohammad-Inspiron-N5110 kernel: [18844.108857] sd 31:0:0:0: [sdb] Attached SCSI removable disk          :~# mount /dev/sdb /mnt     mount: no medium found on /dev/sdb          :~# fdisk -l          Disk /dev/sda: 640.1 GB, 640135028736 bytes     255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00051f45             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048   200000094    99999023+  83  Linux     /dev/sda2       200001534  1250263039   525130753    5  Extended     /dev/sda5       200001536  1250263039   525130752   83  Linux          :~# dd if=/dev/zero of=/dev/sdb bs=512 count=1     dd: opening ‘/dev/sdb’: No medium found          :~# gparted /dev/sdb     ======================     libparted : 2.3     ======================     Error opening /dev/sdb: No medium found          :~# lsusb     Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 003 Device 002: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D     Bus 003 Device 013: ID 1307:0163 Transcend Information, Inc. 256MB/512MB/1GB Flash Drive          :~# mkfs.vfat /dev/sdb     mkfs.vfat 3.0.14 (23 Jan 2023)     /dev/sdb: No medium found      testdisk also returns :               :~# testdisk /dev/sdb     TestDisk 6.13, Data Recovery Utility, November 2011     Christophe GRENIER <grenier@cgsecurity.org>     http://www.cgsecurity.org          Unable to open file or device /dev/sdb      Any idea? Any suggestion?


ungzip the gizpped war

I am totally new to linux. I have gzipped a war file like this `gzip mytest.war`. I try to ungzip it like it `\--ungzip mytest.war.gz`, it said command can't be found. How can I ungzip it? Moreover, how can gzip and ungzip a particular folder?


Installing development tools in RHEL 6

I have admin privilege on my office computer (running RHEL 6) which is connected in a network. I was trying to install development tools using the command: `sudo yum groupinstall "Development Tools"` but I got an error message saying:               Updating certificate-based repositories.     There was an error communicating with RHN.     RHN Satellite or RHN Classic support will be disabled.          Error Message:      Please run rhn_register as root on this client      Error Class Code: 9      Error Class Info: Invalid System Credentials.      I tried to run rhn_register, it said `"It appears this system has already been registered for software updates"`. Scrolling down, I found following lines:               Setting up Group Process     Warning: Group development does not have any packages.       No packages in any requested group available to install or update      Are these two things connected? Or the installation process of development tools have changed?


cron is ignoring MAILTO

I have big trouble with cron. On Debian 6, it is ignoring the `MAILTO` variable. Is there some other variable that has to be to set for cron to send emails to a different email address then local root? I just added `MAILTO=user@hostname` to `/etc/crontab`, restarted cron, then restarted the entire machine. Still, the mail daemon is receiving root as recipient. Edit: This is what comes from cron:               From: root (Cron Daemon)     To: root     Subject: Cron <root@core>   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete     Content-Type: text/plain; charset=UTF-8     X-Cron-Env: <SHELL=/bin/sh>     X-Cron-Env: <HOME=/root>     X-Cron-Env: <PATH=/usr/bin:/bin>     X-Cron-Env: <LOGNAME=root>      And the exec line:               -i -FCronDaemon -oem root


Removal of extra spaces but not the newline from csv files

I have to compare 2 files by using comm command like the below               comm -23 csv1 csv2 > csv3      I seem to face the problem that both the csv are generated from different sources (csv1 is extracted from another csv containing many columns and first column is extracted from it and csv 2 is generated from DB and consists of some extra spaces) csv2 contains data like below               Vp1234▒▒▒▒     vp4567▒▒▒▒     vp6789-v2▒▒▒      (where `▒` indicates a space). While csv1 contains similar data (which is why I have to compare to find the data only existing in csv1) but without spaces. Hence its difficult to compare both. I have tried sed but it didn't work or tried wrongly.


How can I install tactile audio keys on my latitude?

I have a Dell latitude 6430u which has three tactile keys for mute/audio decrease/audio increase. On debian (sid), either with xfce or gnome, these keys don't work well. The mute key has never work. The two others work sometimes, but not well (I have to press twice, sometimes nothing happens, ...) Is it possible to have a better support for these keys? I don't know anything about drivers for tactile keys. When I use `xev` and using this shortcut I've got:               FocusOut event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyGrab, detail NotifyAncestor          FocusIn event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyUngrab, detail NotifyAncestor          KeymapNotify event, serial 37, synthetic NO, window 0x0,         keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0                   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0             FocusOut event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyGrab, detail NotifyAncestor          FocusIn event, serial 37, synthetic NO, window 0x4c00001,         mode NotifyUngrab, detail NotifyAncestor          KeymapNotify event, serial 37, synthetic NO, window 0x0,         keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0                   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0


msmtp alternative that understands /etc/aliases

I'm looking for a simple smtp daemon, that supports aliases (due to issues with daemons, that refuse to send emails to anyone else than root). If you don't know msmtp, then basically, I just want to configure an external SMTP that will handle all mail delivery.


How long does a ssh connection last?

I've been looking around stackoverflow and it seems that SSH connections will disconnect when it doesn't see any packets for a while (2 hours?). Also, I looked in my /etc/ssh/ssh_config file and there doesn't seem to be anything there that would persist my current connection. My question is: Even after 48 hours, why would a SSH connection persist? (my computer is turned off, but the server that I SSH to is presumably still online)


Why use "nohup &" rather than "exec &"

I know that, `nohup` being a binary, it can be reached from any shell. But the `exec` built-in probably exists in every shell. Is there a reason to prefer one of them, to the other?


Grey background in vncviewer remote desktop

I keep getting a grey background in my VNC viewer on my VPS, like so: ![enter image description here](http://i.stack.imgur.com/2VzAv.png) My `.vnc/xstartup` is as follows:               #!/bin/sh          unset SESSION_MANAGER     exec /etc/X11/xinit/xinitrc          gnome-session --session=gnome-classic &     [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup     [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources          xsetroot -solid grey     xrdb $HOME/.Xresources     xsetroot -solid grey     vncconfig -iconic &          x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &     x-window-manager &      My server has the tightvncserver and everything else properly installed and configured to port 1. What is going wrong? I'm on Debian 6.0.4


When using 'yum list available' why are some entries in blue?

Using iTerminal on Mac OS X 10.8 to connect via SSH to a CentOS 6.4 server, running `yum list available` will show a list of packages available from the various repositories on that machine. Some of the entries' names are shown in blue. I'm not sure what significance that formatting has. Why are some installed packages shown in blue? ![ss of terminal w/ colored rpms](http://i.stack.imgur.com/oweY4.png)


Jittery mouse pointer when using high sensitivity mouse with high "Constant Deceleration" in xinput

I'm on Linux Mint 15 (MATE edition) (based on Ubuntu 13.04), and I'm using a Logitech G700 mouse. Since the mouse has a pretty high sensitivity, and I don't like mouse pointer acceleration, I use the following bash script to get a well behaved mouse pointer:               #!/bin/bash          xinput set-prop 9 'Device Accel Profile' -1     xinput set-prop 9 'Device Accel Constant Deceleration' 2.5          # I'm not sure this does anything:     xinput set-prop 9 'Device Accel Velocity Scaling' 1.0      This removes all mouse acceleration, and turns down the pointer speed to a level I think is good. The problem is that the mouse pointer movement is kind of jittery and erratic. I can't really explain it, but it makes the pointer hard to control. I use the same mouse on Windows 7, where I turn of mouse acceleration using the SetPoint software, and there the pointer movement is perfect and very easy to control. I tried lowering the sensitivity on the mouse itself and lowering the Constant Deceleration, but the problem persists. Does anyone know if there's any other way to fix this? I found an option called "Softening" in the Xorg documentation, but I don't really know how to enable it. I'm guessing I have to edit the Xorg config file, but I'm unsure of how to do this.


Stuck at "Attached SCSI removable disk" trying to install Linux Mint

I bought a new laptop the other day, and now i'm trying to dual boot Linux Mint with Windows 7, which is already installed. I initially used UNetBootin to put the .iso onto a USB. Rebooted with the USB, and chose the Live boot option. The install seemed to be running fine judging by the rapid rate of text that was flowing past my screen. It stopped at "[sdc] Attached SCSI removable disk" and refused to continue. the google search led me to this page, which also has no clear solution. http://ubuntuforums.org/showthread.php?p=11792569 I've installed fedora 16 via USB before, so I have at least a little experience. Here are my specs Toshiba Qosmio x770 i7 2670 QM NVIDIA GeForce GTX 560M TOSHIBA SSD 128GB TOSHIBA HDD 750GB I've tried 2 USB's so far in different ports and using other software to transfer the files to USB as well. I've also tried disconnecting everything but the USB from the other ports as well. Are there any other options that I haven't considered?


Why am I getting a Non-existent class error in PHP on Fedora?

I've set up an Nginx/PHP (both installed from Yum) environment on my Fedora 15 install, but I've run into a strange issue. I have some projects that use Codeigniter (1.6), but they keep getting the following error: > Non-existent class: Content The full output almost looks as if PHP starts parsing the Content.php file, but then stops partway through: > {$var})) { $this->{$var} = ''; } $this->{$var} .= ob_get_clean(); } } > > An Error Was Encountered > > Non-existent class: Content The contents of Content.php are:               <?          class Content {              function capture() {         ob_start();         }              function __get($name) {         return '';         }              function content_for($var) {         if (!isset($this->{$var})) { //It stops on this line             $this->{$var} = '';         }         $this->{$var} .= ob_get_clean();         }          }      What's odd to me is that this exact same setup works just fine on Ubuntu (the projects using this setup have been live for some time, I've also set it up on several Ubuntu machines for development and have never run into this problem. I also know that PHP itself works, in general, as I can run a basic site that uses a little bit of PHP, as well as some projects that use a different framework. From what I can tell, it runs through a number of other PHP files before getting to Content.php (it has to, just to even get to the point that tells it to load Content to begin with), so PHP works, at least for a time, but then it seems to suddenly die. There aren't any other errors in the log files, either. What is causing this error, and how can I fix it?


Why are certain menus unreadable when using a new GTK+ theme with Nautilus?

I installed a new GTK theme for both GTK 2.0 and 3.0, and now there are certain windows that have unreadable text in Nautilus. The text color is black on a light background, I made sure of this with the color manager in Gnome Tweak. For example, I can't see anything in the file properties dialog, or in the popups that occur when doing file operations, etc. If I highlight the invisible text it shows up. This also happens in Gnome Mplayer, I can't see any text when trying to change my preferences, so I know it isn't an issue with Nautilus. I can see my files and the text in the pane of nautilus just fine. If I switch to one of the themes that was installed by default, everything works fine. I'm using Crunchbang with the Fleche GTK+ theme https://github.com/hdni/Fleche ![screenshot](http://i.imgur.com/pbI8MyC.png)


Cannot remove /log/var/snort as root

I am using Ubuntu 11.10 Gnome. I uninstalled snort in order to install a more recent version. The new installation initially failed because the system would not let be rm or modify /var/log/snort even as root.               sudo chattr -i /var/log/snort/*      enabled me to remove the contents of /var/log/snort although the i attribute did not appear to have been set. However `sudo chattr -i /var/log/snort` did not allow me to remove `/var/log/snort` itself although only the e attribute was set. I was able to change ownership of `/var/log/snort` but that does not help               peter-Inspiron-620:/var/log$ ls -ld /var/log/snort     drwxrws--- 2 root adm 4096 2013-05-20 23:22 /var/log/snort     peter-Inspiron-620:/var/log$ sudo rmdir /var/log/snort     [sudo] password for peter:      rmdir: failed to remove `/var/log/snort': Operation not permitted     peter-Inspiron-620:/var/log$ sudo rm -rf /var/log/snort     rm: cannot remove `/var/log/snort': Operation not permitted     peter-Inspiron-620:/var/log$ sudo chown peter /var/log/snort     peter-Inspiron-620:/var/log$ ls -ld /var/log/snort     drwxrws--- 2 peter adm 4096 2013-05-20 23:22 /var/log/snort     peter-Inspiron-620:/var/log$ rmdir /var/log/snort     rmdir: failed to remove `/var/log/snort': Permission denied     peter-Inspiron-620:/var/log$ rm -rf /var/log/snort     rm: cannot remove `/var/log/snort': Permission denied     peter-Inspiron-620:/var/log$      I tried rebooting the computer and going into the root shell in restore mode but was still unable to remove this directory.


Some sort of X.org memory leak using nvidia proprietary driver

Could please anybody help me identify what is the source of problem? The problem is that after some time or after opening a window of some application in X, it seems like I suddenly lost 2d acceleration. Because the process `/usr/bin/X`and all its operations ( window resizing, scrolling) suddenly eats 60% to 150% of CPUs runtime when scrolling window for instance. I'm using twinview, but it happens even without it, but not so much. I'm not using any composition in KDE or xfce. The nvidia driver installation logs looks there was no problem during the installation. I tried various different kernel versions, 2 different Xorg version, 2 versions of nvidia driver and even different window managers. It only happens in particular time frames, if I open some specific www page or application in browser or it comes from nowhere. It is possible that it could be triggered by some flash animation, gif animation, javascript scrolling text or other effects in browser, but it is really hard to say, because it usually appears suddenly (when reading something in browser for instance). As far as `xorg.conf`, I have the default one from nvidia-settings. I also tried various possible configurations and modules. I have glxgears 2.241 FPS and after the problem is gone I have 6267.623 FPS.               Slackware-current - kernel 2.6.35.11 , 2.6.35.10 , 2.6.36.x 2.6.37     X.Org X Server 1.9.4     KDE 4.5.5   or   xfce-4.6.2     NVIDIA-Linux-x86_64-260.19.36  + twinview     Geforce 8400 GS      APPS:               google-chrome-8     XChat 2.8.8     eclipse-3.6


moving columns across rows

I am dealing with a txt file and trying to keep the first column/field in place, but shift the 2nd column down by 1 row. I tried this, but it gave the error unmatched .'s.               awk  '{for(i=1; i<NR; i++) FNR==i {print i, $(i+1)}}’ filename


Is there any way to resize scale application GUI window?

Is there any way to run an application scaling its GUI window? (Well, I'm using MATE but hope for universal solution). For example, up scale small window of an old game running under wine on high-resolution display or shrink windows that doesn't fit low-resolution display and so on. I'm not looking for any way of changing running Xorg resolution. I'm looking for a way to scale specific program. I'm not looking for any type of VM solution. However there might be an X server displaying and scaling applications inside a window. Magnifying part of the screen to whole screen might be acceptable solution also. But screen magnifiers like kmag is not suitable since it makes duplicate of picture and do magnify its own windows too disabling be full-screen expanded and doesn't support mouse clicks on magnified area. P.S. Well, if there is no such way, is there a way to force application running full screen?


Screen status bar multiple lines

I am using screen with several tabs open to separate my projects between them. However, when I open too many tabs they just appear off screen and I can no longer see them in my "screen status bar". I can still switch to them, but not see them in my list of windows. How can I make it so that my "screen status bar" will expand to two lines when necessary? I've gotten a `.screenrc` from a friend to start with which put me where I'm at, but I'd like to customize it to afford me this option.


How to invoke an Openoffice macro from the Linux command line

I have an OpenOfice macro that I want to use to process the contents of an OpenOffice file. I am able to do this by opening the file with OpenOffice and then running the macro. How do I invoke the macro from the Linux command line without using the GUI? Something like:               $ oowriter -headless -o MyDocument.odt -RUNMACRO MyLittleMacro


RealTek 8101E ethernet card or similar doesn't work on FreeBSD

I'm trying to install FreeBSD on my netbook using an usb sitck but I'm running into a major problem, my ethernet card doesn't work.               ifconfig -a      only returns me               lo0 …      but               dmesg | grep re0      gives me:               re0: <RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX> ...     re0: Using 1 MSI messages     re0: Chip rev. 0x24000000     re0: MAC rev. 0x00000000     re0: Unknown H/W revision rev. 0x24000000     device_attach: re0 attach returned 6      The installer crashes when I try to setup the network on FreeBSD 8.1 amd64 or 8.2RC3 amd64 on usb stick. Same dmesg messages with 9.0 CURRENT but it doesn't crash nor find re0. The network works fine with NetBSD 5.1 amd64 or OpenBSD 4.8 i386 using re.


How do I install additional modules when building an Apache RPM?

We've been compiling and installing Apache under `/usr/local/apache2` and in turn would tar the folder up to distribute to our other servers. I would like to convert this into an RPM package for easier maintenance. I'll be using `fpm` to handle the package creation, but I'm running into an issue when including additional modules. Once the `make install` completes, we have a couple of additional modules to compile and install using `apxs`. For example, to install `mod_qos` we would run the following command once the package is uncompressed. `/usr/local/apache2/bin/apxs PATH_TO_MOD_OAS_DIRECTORY` That installs the `mod_qos.so` file into Apache's module directory. But let's say my `make install` turns into `make install DESTDIR=/opt/buildbot` I mean I really don't want to install Apache on my build server. I want to stage it so that i can use `fpm` to create the rpm package.


No sound in webex player in wine

I am using Fedora Core 10. I have installed wine with both `wine-alsa` and `wine-oss` sound drivers. I am able to hear test sounds by running `winecfg`, but when I run the webex player there is no sound, and the option to increase volume is disabled. I am not sure whether the problem is with wine or with webex; how can I debug/fix this?


How to talk to geoclue through its dbus interface?

I'm trying to better understand what `geoclue` does, and how to gain information from it. From my understanding, it can be accessed through it's `dbus` interface to find geographic information about the user. The problem is finding the right `dbus` command to gain this information. I've searched all over the internet and checked all the documentation I could find, but still can't seem to find an easy answer other than obscure information about it's `dbus` properties, which I lack the knowledge to properly piece together. Is there a `dbus` command I could use to gain this information from `geoclue`, and perhaps an example of what that command should look like? I do not have the information required to put together the documentation from it to gain this.


sudo service errors out with JAVA_HOME not found

I've used visudoer to set the keep_env for JAVA_HOME:               $ sudo printenv | grep -i JAVA_HOME     JAVA_HOME=/opt/java          $ ls $JAVA_HOME     bin        db       jre  LICENSE  README.html  src.zip                             THIRDPARTYLICENSEREADME.txt     COPYRIGHT  include  lib  man      release      THIRDPARTYLICENSEREADME-JAVAFX.txt      I've also created symlink from usr/bin to my java executable:               $ ls -al /usr/bin/java     lrwxrwxrwx. 1 root root 18 Aug  7 07:09 /usr/bin/java -> /opt/java/bin/java      I can even do:               $ sudo java -version     java version "1.7.0_65"     Java(TM) SE Runtime Environment (build 1.7.0_65-b17)     Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)      However when I run               $ sudo service hadoop-hdfs-namenode start     Starting Hadoop namenode:                                  [  OK  ]     Error: JAVA_HOME is not set and could not be found.      Until a few hours ago, on this machine, in addition to my own installation of the JDK, I had the open-jdk installation that came with Centos-7...and everything was working. When I realized that there was an open-jdk installation, I removed it using:               $ sudo yum remove sudo yum remove java-1.7.0-openjdk-headless-1.7.0.65-2.5.1.2.el7_0.x86_64      And then I started getting the JAVA_HOME not found issue. I'm a newbie and totally at a loss! Please let me know if you need more info...


Sharing Mac Snow Leopard directory via NFS

I am running a Mac Pro using Snow Leopard (not server). I would like to share a directory with a linux machine. I have edited /etc/exports on the Mac to:               /Volumes/mstore/home/sdavis -maproot=root -rw      When I try to mount this from a linux machine, I get:                sudo mount gale.nci.nih.gov:/Volumes/mstore/home/sdavis /tmp/abc     mount.nfs: access denied by server while mounting gale.nci.nih.gov:/Volumes/mstore/home/sdavis      Also, this is what I get for showmount -e on the Mac:               % showmount -e     Exports list on localhost:     %       In other words, the mount is not seen, apparently. Any suggestions? I have not found much good documentation on sharing via NFS on the Mac, particularly for later OS versions.


sudo apt-get install g++-4.8-multilib not working on Mint?

I've got the latest version of Linux Mint 16 (64 bit) and in Netbeans I am compiling a project in 32 bit mode. I get the error that I am missing `bits/config.h`. I think this is because I am in 32-bit mode for compiling. I tried installing: > sudo apt-get install g++-4.8-multilib but after a few lines it said: > E: unable to locate package multilib Could someone please help? This line worked for a gcc 4.7 problem: http://stackoverflow.com/questions/4643197/missing-include-bits-cconfig-h- when-cross-compiling-64-bit-program-on-32-bit


Merging content of two files with comparing content of column

I have a problem trying to merge content of two files : file 1 :               873 1.1.1.1      1033 99.99.99.10     1108 78.2.204.174     1257 78.2.8.181      file 2:               test1 78.2.8.181 p6     test2 99.99.99.10 p9     test7 1.1.1.1 p10     test8 78.2.204.174 p4      I want to merge the two file into one file like this, taking in consideration that the shared columns is the second one, & it must be compared to fit the line in question:               873  1.1.1.1      test7 p10     1033 99.99.99.10  test2 p9     1108 78.2.204.174 test8 p4     1257 78.2.8.181   test1 p6      I've tried several things using `awk` but without success.


the slash (/) after a directory name on shell commands

I have a little question here. If I have two files, say `filea` and `fileb`, `mv filea fileb` would   * delete `fileb`   * rename `filea` to `fileb` Then if I have two directories, say `dira` and `dirb`, `mv dira dirb` would   * move `dira` into `dirb` (it will become `dirb/dira`) Noting that in both cases there are no notice or message, then this is pretty inconsistent to me. I think `mv dira dirb` should just overwrite `dirb` with the contents of `dira` (or merge the two directories under a directory named `dirb`). I remember reading somewhere that a directory name with a slash (like `dira/`) is treated like a directory, and name with no slash (like `dira`) is treated like a file (to certain extents, of course). Anyway now I want to make the shell (zsh and possibly bash) respect my notation of a directory by using a slash. Is there a terminal option which enable me to enforce that? To clarify, here is my desired behaviour:   * `mv dira dirb` results in `dirb` being overwritten with the contents of `dira`   * `mv dira dirb/` results in `dira` being moved into `dirb` (in `dirb/dira`) Has anyone thought the same way as me? Or am I just weird?


Seeking command-line example for adding images to MP3 files

> **Possible Duplicate:**   >  Searching for a command line tagging tool for mp3 and ogg that supports > pictures Anyone have a command-line example illustrating how to properly embed an image (for instance, cover art) in an mp3 file? I use Ubuntu, but I'm hoping the answer will run on any POSIX-compatible system, preferably in the Bash shell.


Motd doesn't show up

I'd like to set a custom motd ("message of the day") on my machine (currently Mac OS X 10.6.5 using Bash with Terminal.app). In `/etc/` there was no **motd** file so I created one with some sample text. But the message doesn't show up when I restart Terminal. I've tried to `logout` and then `login` but it still doesn't seem to kick in. If I do `ls -l /etc/motd` I get (if it's any clue): `-rw-r--r-- 1 root wheel 30 7 Dec 11:58 /etc/motd` Am I missing something?


PAM login permission denied

I have an OpenSuSE 12.3 machine and can't login to the box either on `tty` or via `ssh`. As soon as the user logs in the session terminates and in the message "login [1234] permission denied" is printed. The machine was set to autologin on KDE so that user autologs-in. Any Ideas? **Update:**   I am not sure what has changed on the system, I am not the only one who has access to the box and according to everybody nothing has changed.   The only thing that went wrong on the system was that it takes a backup of a DB on a different machine and there wasn't any space on it. I cleared all the space after some googling updated PAM, that solved the problem.   But then the problem repeated when I check the system there wasn't any space again, cleared the system re-installed PAM to no avail. Upgraded the system from 12.1 to 12.3 but didn't help. There isn't a `/var/log/secure` log. The only relevant message is permission denied. Users are not locked on KDE I can login with any user but not on `tty` or `ssh`, can su/sudo. There are lot of files in `/etc/pam.d/` which one do I need to check


How to get smartd to ignore an HDD?

I have an external HDD which does not report SMART information properly (it gives nonsense results). As such, the `smartd` daemon (part of `smartmontools`) keeps giving false alarms on how the device might be failing. In `/etc/smartmontools/smartd.conf` (I'm using the default, here) I see a bunch of options but none that relate to my need (ignoring the alarms for a specific hard drive - I would like to be able to refer to it e.g. by USB ID, since the entry in `/dev` will vary if I have more devices connected). I could edit `/usr/libexec/smartmontools/smartdnotify` (the script that `smartd` calls when an event happens) and manually force it to shut up about that specific device, but I'd like to know if there's a less ugly way to do that. How to get `smartd` to not report any warnings for a specific HDD? I would **not** like to disable the daemon; I would like it to just not care about this specific HDD.


Using Modifiers of Perl-compatible Regex (PCRE) in grep

According to `grep --help` and `man grep`, we can use the `-P` option in order to interpret the pattern as a Perl regular expression (PCRE, to be precise), instead of the default POSIX basic regular expressions (BRE). In Perl language, various **Modifiers** can be added to the expression, in order to adjust the pattern interpretation (in the syntax of `/pattern/modifiers`). So, **how can someone add modifiers** to the grep's Perl regular expression? I tried some variations like `grep -P "/^got.it$/ms" [FILE]` but the search results were wrong. However, about the PCRE interpretation, the manual points out that: > _This is highly experimental and **grep -P** may warn of unimplemented > features._ Is it possible that the grep tool **does not support modifiers at all**? By the way, I noticed that one can perform case-insensitive pattern matching by using the `-i` option, which is an example of a modifier.


Invoking pushd in a shell script

I have a simple script that I want to invoke 'pushed' followed by another command. But the 'pushd' command inside the script doesn't seem to stick past the script. What's a way to make this execute in the shell terminal?               #!/bin/sh          pushd $1     time      What I really want to accomplish is invoke `pushd` followed by `other-command` with one command.


What is the use of "magic arguments" in Linux reboot system call?

As I was reading Linux source code, and more specifically the system calls code, I came across `sys_reboot` implementation: http://lxr.free- electrons.com/source/kernel/reboot.c#L199.               199 SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,     200                 void __user *, arg)     201 {     202        ...     ...         286 }      In the middle, there is this specific piece of code:               209      210         /* For safety, we require "magic" arguments. */     211         if (magic1 != LINUX_REBOOT_MAGIC1 ||     212                         (magic2 != LINUX_REBOOT_MAGIC2 &&     213                         magic2 != LINUX_REBOOT_MAGIC2A &&     214                         magic2 != LINUX_REBOOT_MAGIC2B &&     215                         magic2 != LINUX_REBOOT_MAGIC2C))     216                 return -EINVAL;      I wonder what kind of "safety" it actually provides. I mean, is it to prevent misuse? In this case, as the parameters are public, any library or application could misuse the system call even though they are required to pass the parameters. What did I miss?


kdialog --getsavefilename target/directory?

When I use `kdialog --getsavefilename /path/to/specific/folder/`, it opens `folder/`'s parent directory, not `folder/` itself. How do I get it to start where I want it to?


Where on the Web can I find a comprehensive list of rolling-release Linux distros?

I'm asking as I've looked for such & can't find a comprehensive list. Feel free to post any less-well-known rolling distros, but I'm really looking for a comprehensive list. I'm thinking of creating a Wikipedia page "List of rolling-release Linux distributions". If there's already a good list somewhere then would help produce a draft of the Wikipedia page. If there isn't such a list on the Web it highlights the need of gathering that information on a site where most people would look for it. Wikipedia seemed to me like the obvious choice but suggestions of a better site [preferably, but not necessarily, a wiki] are welcome. Please don't post Dev.-branches: eg Fedora-Rawhide, Mandriva-Cooker, OpenSuSE- Factory etc. Also, please don't post the following rolling-distros as I'm already aware of them: Aptosid, LMDE, AnitX; OpenSuSE-Tumbleweed; Yoper; Foresight; PCLinuxOS; Unity; Arch, ArchBang, Chakra, Kahel; Gentoo & Sabayon; Lunar, Sorcerer, SourceMage. If any I've mentioned aren't rolling do correct me. I know some might not call AntiX & LMDE rolling as Debian-Testing "cycles". I also know PCLOS & Sabayon can need to be reinstalled (eg when PCLOS re-forks the Mandriva base). BTW I know there's a similar question asking "What distributions have rolling releases?" that was asked in August -- however it seems "inactive" and I'm really after a comprehensive list not the usual suspects. [Please leave a comment if you want to help create such a list or email my user-name at gmail.] PS If anyone objects to the question please post a comment so the moderator can choose whether to close it. I'm happy to re-edit the question if anyone wants so please let me know. :-)


How do I control ip routing in the new firewalld?

I have the following scenario: Our fedora server is connected to the internet on `eth0` and has a second nic, `wlan0` acting as an access point. The purpose of the access point is to provide a connection for mobile users to the services running on the server. We do NOT want users connecting on that access point to use the internet connection on the other NIC. If it had been an older version of Fedora, I would do this in iptables:               iptables -P FORWARD DROP      **The new network manager doesn't use`iptables` any more, so how do I establish the same effect?**