Apache fails to reload... Is there a log that I can look in for details?

I have a webserver that I'm working on adding a site to. After running `a2ensite`, I ran `service apache2 reload`, and got this: > [FAIL] Reloading web server config: apache2 failed! Is there a log file that I can look in for more details?


Tools that list the prototypes in .so library

Is there a tool that list the prototypes in a .so library. I found `nm` close to my need, but what I got are just symbols.


delayed write in operating file system

I read in some papers about NFS and Sprite that a system can use delayed writes when a client writes something to the server. I would like to know what is the purpose of this technique?


Execute string result from shell script as a set of shell commands

I create a string result from my `shell script` and i want to execute it as a `shell command`. For example `file_a` is:               user1@gmail.com     user2@gmail.com      script:               awk '{print "mail -s \"welcome\"", $1}' file_a      And result:               mail -s "welcome" user1@gmail.com     mail -s "welcome" user2@gmail.com      So i want to execute the result as a set of shell commands.


SNMP Trap on Unix

Nearly for 6 days i 'm trying to get over this problem . I have 2 machines . One of them is manager 10.201 machine, and the other is agent (10.226) i've configured **manager's snmptrap.conf** file like this .               authCommunity  execute  public      default  .1     traphandle  default /usr/bin/traptoemail -s localhost -f snmp@localhost root@localhost      and then i've configured agent's snmpd.conf file like this.               ###########################################################################     # SECTION: Access Control Setup          rocommunity  public       rwcommunity  private                    ###########################################################################     # SECTION: System Information Setup          syslocation  "Izmir, 226. machine "     syscontact  info@abc.com          ###########################################################################     # SECTION: Trap Destinations          trap2sink  10.0.0.201  162          authuser   read -s v2c guest_user noauth  .1     authuser   read -s usm guest_user noauth  .1     authcommunity read  public  default .1     iquerySecName guest_user     agentSecName  guest_user          monitor   -u guest_user  -r  1  "interface down" -o ifDescr ifOperStatus != 1      But I want to trap for agent machine's CPUIdle rate. For example I can get CpuIdle like this way by snmpwalk command.               # snmpwalk -v 2c  -c public 10.0.0.226 .iso.org.dod.internet.private.enterprises.ucdavis.systemStats.**ssCpuIdle**.0      I want to trap to manager host(10.0.0.201) when agent's (10.0.0.226) CPuIdle rate is over 98. Is there anyone that can help me ? Where I ve done mistakes,conf files or anything else ?


How to understand the result returned by "nm" command

I used `nm` command to inspect the function names in a .so library. And the result I got is like this:               00009634 T _Z24ICTCLAS_ParagraphProcessPKciPc9eCodeTypeb     00009764 T _Z25ICTCLAS_ParagraphProcessAPKciRi9eCodeTypeb     00009b24 T _Z26ICTCLAS_ParagraphProcessAWPKcP17tagICTCLAS_Result9eCodeTypeb      Actually there are functions called `ParagraphProcess` and `ParagraphProcessA`. But how to interpret the prefix(`_Z24ICTCLAS_`) and suffix(`PKciPc9eCodeTypeb`) and the address-like string(`00009634`) at the start of the line?


DNS reverse query

When I do reverse DNS queries with IP address that I obtained from DNS query of one website, it shows many different domain names, why is it so? I thought if I do the reverse DNS query I will obtain the domain name which I did with just DNS query. Reverse DNS doesn't work correct or all those names are correct? I don't understand


Where would I start looking for documentation on the graphical mode of the Linux console?

I'm writing my own display server as an educational exercise. Where in the Linux kernel tree would I look for documentation on the console's graphical mode? Basically, as I understand it, Xorg takes over the tty device and also takes over the raw hardware. How can I find documentation on duplicating that action?


Getting info about a Virtual file system

I have created a Virtual ext3 partition on a armv7 machine with:               dd if=/dev/zero of=./system.img bs=1000000 count=200     mkfs.ext2 ./system.img     tune2fs -j ./system.img      Now I need to get info about this fs like total space, free space and used space. How can I do this without mounting the fs. Is it possible?


What kind of Linux can verify all of its files / packages like debsums(Debian), but more?

# debsums -a, --all  check configuration files (normally excluded)      However, there is large amount of temporary, ancillary files here and there, not only in tmp-dir. About 4,000 of binaries .pyc files of python, which can not be disabled by default:               # cat /etc/python/debian_config       # standard, optimize      byte-compile = standard      etc... Is there any distribution of Linux, which have on-line repositories with capability to verify each file installed on my machine securely ? I'm talking about **packages manager** like Host-based Intrusion Detection System with modern cryptography capable to prevent/detect any infection.


Run mutter window manager standalone

I'm trying to run my window manager standalone on Debian 7 (i.e. without Gnome 3, which is currently installed). Apparently Gnome is already running the `mutter` window manager:               $ wmctrl -m     Name: Mutter     Class: N/A     PID: N/A     Window manager's "showing the desktop" mode: N/A      I can't seem to find the mutter executable to run it, though. It's not on the `$PATH` and none of the results from `locate mutter` look like executables to me: (note that `/usr/share/mutter/` and `/usr/lib/mutter/` are both directories in the below output)               $ sudo locate mutter     /usr/lib/libmutter.so.0     /usr/lib/libmutter.so.0.0.0     /usr/lib/mutter     /usr/lib/mutter/Meta-3.0.typelib     /usr/share/mutter     /usr/share/GConf/gsettings/mutter-schemas.convert     /usr/share/app-install/desktop/mutter.desktop     /usr/share/doc/gir1.2-mutter-3.0     /usr/share/doc/libmutter0     /usr/share/doc/mutter-common     /usr/share/doc/gir1.2-mutter-3.0/AUTHORS     /usr/share/doc/gir1.2-mutter-3.0/NEWS.gz     /usr/share/doc/gir1.2-mutter-3.0/README.gz     /usr/share/doc/gir1.2-mutter-3.0/changelog.Debian.gz     /usr/share/doc/gir1.2-mutter-3.0/changelog.gz     /usr/share/doc/gir1.2-mutter-3.0/copyright     /usr/share/doc/libmutter0/AUTHORS     /usr/share/doc/libmutter0/NEWS.gz     /usr/share/doc/libmutter0/README.gz     /usr/share/doc/libmutter0/changelog.Debian.gz     /usr/share/doc/libmutter0/changelog.gz     /usr/share/doc/libmutter0/copyright     /usr/share/doc/mutter-common/AUTHORS     /usr/share/doc/mutter-common/NEWS.gz     /usr/share/doc/mutter-common/README.gz     /usr/share/doc/mutter-common/changelog.Debian.gz     /usr/share/doc/mutter-common/changelog.gz     /usr/share/doc/mutter-common/copyright     /usr/share/glib-2.0/schemas/org.gnome.mutter.gschema.xml     /usr/share/gnome-control-center/keybindings/50-mutter-windows.xml     /usr/share/locale/am/LC_MESSAGES/mutter.mo     /usr/share/locale/ar/LC_MESSAGES/mutter.mo     /usr/share/locale/as/LC_MESSAGES/mutter.mo     /usr/share/locale/ast/LC_MESSAGES/mutter.mo     /usr/share/locale/az/LC_MESSAGES/mutter.mo     /usr/share/locale/be/LC_MESSAGES/mutter.mo     /usr/share/locale/be@latin/LC_MESSAGES/mutter.mo     /usr/share/locale/bg/LC_MESSAGES/mutter.mo     /usr/share/locale/bn/LC_MESSAGES/mutter.mo     /usr/share/locale/bn_IN/LC_MESSAGES/mutter.mo     /usr/share/locale/br/LC_MESSAGES/mutter.mo     /usr/share/locale/bs/LC_MESSAGES/mutter.mo     /usr/share/locale/ca/LC_MESSAGES/mutter.mo     /usr/share/locale/ca@valencia/LC_MESSAGES/mutter.mo     /usr/share/locale/cs/LC_MESSAGES/mutter.mo     /usr/share/locale/cy/LC_MESSAGES/mutter.mo     /usr/share/locale/da/LC_MESSAGES/mutter.mo     /usr/share/locale/de/LC_MESSAGES/mutter.mo     /usr/share/locale/dz/LC_MESSAGES/mutter.mo     /usr/share/locale/el/LC_MESSAGES/mutter.mo     /usr/share/locale/en_CA/LC_MESSAGES/mutter.mo     /usr/share/locale/en_GB/LC_MESSAGES/mutter.mo     /usr/share/locale/eo/LC_MESSAGES/mutter.mo     /usr/share/locale/es/LC_MESSAGES/mutter.mo     /usr/share/locale/et/LC_MESSAGES/mutter.mo     /usr/share/locale/eu/LC_MESSAGES/mutter.mo     /usr/share/locale/fa/LC_MESSAGES/mutter.mo     /usr/share/locale/fi/LC_MESSAGES/mutter.mo     /usr/share/locale/fr/LC_MESSAGES/mutter.mo     /usr/share/locale/ga/LC_MESSAGES/mutter.mo     /usr/share/locale/gl/LC_MESSAGES/mutter.mo     /usr/share/locale/gu/LC_MESSAGES/mutter.mo     /usr/share/locale/ha/LC_MESSAGES/mutter.mo     /usr/share/locale/he/LC_MESSAGES/mutter.mo     /usr/share/locale/hi/LC_MESSAGES/mutter.mo     /usr/share/locale/hr/LC_MESSAGES/mutter.mo     /usr/share/locale/hu/LC_MESSAGES/mutter.mo     /usr/share/locale/hy/LC_MESSAGES/mutter.mo     /usr/share/locale/id/LC_MESSAGES/mutter.mo     /usr/share/locale/ig/LC_MESSAGES/mutter.mo     /usr/share/locale/is/LC_MESSAGES/mutter.mo     /usr/share/locale/it/LC_MESSAGES/mutter.mo     /usr/share/locale/ja/LC_MESSAGES/mutter.mo     /usr/share/locale/ka/LC_MESSAGES/mutter.mo     /usr/share/locale/kn/LC_MESSAGES/mutter.mo     /usr/share/locale/ko/LC_MESSAGES/mutter.mo     /usr/share/locale/ku/LC_MESSAGES/mutter.mo     /usr/share/locale/la/LC_MESSAGES/mutter.mo     /usr/share/locale/lt/LC_MESSAGES/mutter.mo     /usr/share/locale/lv/LC_MESSAGES/mutter.mo     /usr/share/locale/mai/LC_MESSAGES/mutter.mo     /usr/share/locale/mg/LC_MESSAGES/mutter.mo     /usr/share/locale/mk/LC_MESSAGES/mutter.mo     /usr/share/locale/ml/LC_MESSAGES/mutter.mo     /usr/share/locale/mn/LC_MESSAGES/mutter.mo     /usr/share/locale/mr/LC_MESSAGES/mutter.mo     /usr/share/locale/ms/LC_MESSAGES/mutter.mo     /usr/share/locale/nb/LC_MESSAGES/mutter.mo     /usr/share/locale/nds/LC_MESSAGES/mutter.mo     /usr/share/locale/pa/LC_MESSAGES/mutter.mo     /usr/share/locale/pl/LC_MESSAGES/mutter.mo     /usr/share/locale/pt/LC_MESSAGES/mutter.mo     /usr/share/locale/pt_BR/LC_MESSAGES/mutter.mo     /usr/share/locale/ro/LC_MESSAGES/mutter.mo     /usr/share/locale/ru/LC_MESSAGES/mutter.mo     /usr/share/locale/rw/LC_MESSAGES/mutter.mo     /usr/share/locale/si/LC_MESSAGES/mutter.mo     /usr/share/locale/sk/LC_MESSAGES/mutter.mo     /usr/share/locale/sl/LC_MESSAGES/mutter.mo     /usr/share/locale/sq/LC_MESSAGES/mutter.mo     /usr/share/locale/sr/LC_MESSAGES/mutter.mo     /usr/share/locale/sr@latin/LC_MESSAGES/mutter.mo     /usr/share/locale/sv/LC_MESSAGES/mutter.mo     /usr/share/locale/ta/LC_MESSAGES/mutter.mo     /usr/share/locale/te/LC_MESSAGES/mutter.mo     /usr/share/locale/th/LC_MESSAGES/mutter.mo     /usr/share/locale/tk/LC_MESSAGES/mutter.mo     /usr/share/locale/tr/LC_MESSAGES/mutter.mo     /usr/share/locale/ug/LC_MESSAGES/mutter.mo     /usr/share/locale/uk/LC_MESSAGES/mutter.mo     /usr/share/locale/vi/LC_MESSAGES/mutter.mo     /usr/share/locale/wa/LC_MESSAGES/mutter.mo     /usr/share/locale/xh/LC_MESSAGES/mutter.mo     /usr/share/locale/yo/LC_MESSAGES/mutter.mo     /usr/share/locale/zh_CN/LC_MESSAGES/mutter.mo     /usr/share/locale/zh_HK/LC_MESSAGES/mutter.mo     /usr/share/locale/zh_TW/LC_MESSAGES/mutter.mo     /usr/share/man/man1/mutter-message.1.gz     /usr/share/man/man1/mutter-theme-viewer.1.gz     /usr/share/man/man1/mutter-window-demo.1.gz     /usr/share/man/man1/mutter.1.gz     /usr/share/mutter/icons     /usr/share/mutter/icons/mutter-window-demo.png     /var/lib/dpkg/info/gir1.2-mutter-3.0.list     /var/lib/dpkg/info/gir1.2-mutter-3.0.md5sums     /var/lib/dpkg/info/libmutter0.list     /var/lib/dpkg/info/libmutter0.md5sums     /var/lib/dpkg/info/libmutter0.postinst     /var/lib/dpkg/info/libmutter0.postrm     /var/lib/dpkg/info/libmutter0.shlibs     /var/lib/dpkg/info/mutter-common.list     /var/lib/dpkg/info/mutter-common.md5sums     /var/lib/dpkg/info/mutter-common.preinst      To get the window manager running my thinking was that I would just turn off the Gnome Desktop Manager and then run X from `.xinitrc` like so:               $ /etc/init.d/gdm3 stop     $ cat .xinitrc     #!/bin/bash     [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources     exec mutter     exec xterm -maximized     $ startx      Is this the right way to go about starting an xterm with the window manager enabled? I think I remember reading somewhere that only one `exec` is allowed in `.xinitrc`, so maybe I am trying this the wrong way?


What about no swap?

I have a netbook with a very slow (especially on writes) SSD, would it be a good idea to go without swap? The way I see it is that code and unmodified pages will still be swapped (re-read) but I won't be writing anything. Plus, I was also thinking about disabling file-system cache in order to free up some more memory and have a bit more control on when the disk is accessed. Your thoughts? EDIT: I agree that disabling fs cache would increase disk access, however what matters most to me is to minimize disk writes, which shouldn't be affected I believe. Is there any way to keep fs cache and at the same time forcing writes immediately (let's say I want to prevent data loss on a power failure)? Also it is worth noting that being it a netbook physical ram is limited to 1.5Gb


Why can't I install Linux on this SSD

I have tried installing several different distros onto my Vertex2 SSD. Whenever I try the disk does not show up as an installation option (it is not present in the drop down box). My most recent attempt to install Mint is also failing. The device shows up fine at the live CD's terminal (at `/dev/sdb`) and shows up fine in the distribution installed on my regular HDD: ![enter image description here](http://i.stack.imgur.com/SC0W8.png) A few months back I had Windowss Server 2008 installed on it, and booting fine. What could the problem be?


Checking linux Kernel for RT-Preempt Patch

How to know whether a particular patch is applied to the kernel? Especially RT-Preempt Patch.


Automate `pbrun su` via plink

I am trying to automate an sFTP process for our project. When I login with PuTTY and manually type the command `pbrun su - user1`, root access is given to user1 and I am able to do the sFTP process. I want to perform the same process via plink (a command line version of PuTTY). But when I type `plink -pw password user1@server pbrun su - user1` in the command prompt, root access is not given to the user1 and an error (`chown : no file or directory found`) is displayed. I am wondering why, when I type the same command manually via PuTTY, no error is displayed but when I send the same command via plink it does not work. Please tell me is there any config setup need to done at the powerbroker to automate the `pbrun su` command. Note : I am able to run all other UNIX commands via plink.


how to perform git push using crontab

I'm using crontab for synchronizing git repositories. I was able to do operations like git add and commit, but can't perform git push to origin, since every git push asks for a password. How can I connect to the server using git push using cron?


Does linux modules/drivers belong to kernal space or user space

Some articles say that modules/drivers belong to kernel space as it take part in forming the kernel; (reference: http://www.freesoftwaremagazine.com/articles/drivers_linux) While others say that only Ring0(directly interact with hardware)can be called kernel space(excluded modules/drivers as they are at Ring2). (reference:http://jaseywang.me/2011/01/04/vfs-kernel-space-user-space-2/ ) Could anybody tell me which point of view is correct?


How do I update my Debian kernel?

Essentially I have an Ubuntu laptop and a board running Debian. I have installed the same kernel module and a utility for managing it on each, using aptitude. Unfortunately, the versions of the kernel modules and utilities, do not match up. The Debian version is 2010 and Ubuntu is 2012. It is important that they do as they are for ad-hoc networking and the two computers can only recognise each other as nodes when the versions are aligned. I have updated aptitude on the Debian board and tried re-installing but it can't get a newer version. I'm figuring if I can do one of the following (but don't know how to do them):   * Find where aptitude downloads the kernel modules and utilities from on ubuntu and tell the debian version to also download from here    * Download and install the kernel module from source (I have a source   file for the module and utility but I'm not 100% on how to install   * Somehow use aptitude to install the older version on ubuntu (this is non-ideal as some features are missing) Preferably I'd like to be able to install it all using apt-get. Any ideas?


Can't connect to vsftpd, not even from localhost

I have installed _vsftpd_ on Raspbian by following steps:   1. `sudo apt-get install vsftpd`   2. I altered a few settings by calling `sudo nano /etc/vsftpd.conf`   3. Restarted by `sudo service vsftpd restart` No errors so far. The problem, however, does not even seem to be a matter of the settings - I can't connect on port 20 no matter what. It acts like any other unused port. If I try to connect self:               pi@raspberrypi ~ $ telnet 127.0.0.1 20     Trying 127.0.0.1...     telnet: Unable to connect to remote host: Connection refused      And, on windows telnet:               Microsoft Telnet> o 192.168.0.244 20     Připojování k 192.168.0.244...Nelze navázat spojení s hostitelem. na portu 20: P     řipojení se nezdařilo     Microsoft Telnet>      Sorry, it's Czech, but it just says it can't connect. There is no delay between calling and getting the error message. I can't check if it runs on another port, however, it runs for sure, because `netstat -a | egrep 'Proto|LISTEN'` gives me this:               Proto Recv-Q Send-Q Local Address           Foreign Address         State     tcp        0      0 *:ftp                   *:*                     LISTEN     tcp        0      0 *:ssh                   *:*                     LISTEN     tcp        0      0 localhost:mysql         *:*                     LISTEN     tcp        0      0 *:http                  *:*                     LISTEN     Proto RefCnt Flags       Type       State         I-Node   Path     unix  2      [ ACC ]     STREAM     LISTENING     9405     /var/run/mysqld/mysqld.sock     unix  2      [ ACC ]     STREAM     LISTENING     2517     /var/run/dbus/system_bus_socket     unix  2      [ ACC ]     SEQPACKET  LISTENING     497      /run/udev/control      However `:ftp` is pretty useless to check if the port is or isn't 20.


Occasional error from bash on AIX: Interrupted system call

I am experiencing problems with process substitution in bash on AIX It happens very rarely, apparently only when the server is loaded. An example error message is:               line 9: /tmp//sh-np-7841523: Interrupted system call      Before I investigate more into my script, I wanted to know if you had already had issues with process substitution. Or get your inputs regarding some possible recommendations to observe when implementing process substitution. Note: this simple script can generate the aforementioned error:               #!/bin/bash     read var < <(echo)      However I stress this point: the error is very rare. It cannot be reproduced systematically. The server on which the script has been tested is a production server.


Can I somehow add a "&& prog2" to an already running prog1?

Most shells provide functions like `&&` and `;` to chain the execution of commands in certain ways. But what if a command is already running, can I still somehow add another command to be executed depending on the result of the first one? Say I ran               $ /bin/myprog     some output...      but I really wanted `/bin/myprog && /usr/bin/mycleanup`. I can't kill `myprog` and restart everything because too much time would be lost. I can `Ctrl`+`Z` it and `fg`/`bg` if necessary. Does this allow me to chain in another command? I'm mostly interested in bash, but answers for all common shells are welcome!


Remove alias from current session

How to remove a `alias` from current session without closing that session?


Why does ls sorting ignore non-alphanumeric characters?

When sorting file names, `ls` ignores characters like `-,_`. I expected it to use those characters in sorting as well. An example:               touch a1 a2 a-1 a-2 a_1 a_2 a.1 a.2 a,1 a,2      Now display these files with `ls -1`:               a1     a_1     a-1     a,1     a.1     a2     a_2     a-2     a,2     a.2      What I expected was something like this:               a1     a2     a,1     a,2     a.1     a.2     a_1     a_2     a-1     a-2      i.e. I expected the non-alphanumeric characters to be taken into account when sorting. Can anyone explain this behaviour? Is this behaviour mandated by a standard? Or is this due the encoding being UTF-8? **Update:** It seems that this is related to UTF-8 sorting:               $ LC_COLLATE=C ls -1     a,1     a,2     a-1     a-2     a.1     a.2     a1     a2     a_1     a_2


'altinstall' python-devel; can't install psycopg2 on centos

I installed python2.7 on my               centos 2.6.32-431.17.1.el6.x86_64      following these directions: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/               #after the yum stuff...     # Python 2.7.6:     wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz     tar xf Python-2.7.6.tar.xz     cd Python-2.7.6     ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"     make && make altinstall      I am trying to install psycopg2:               [stuff]# pip2.7 install psycopg2     ...     ./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory      Upon researching, that means I need to install python-devel (I think), but I can't install this because it would install for my 2.6 default on the system. I tried to install from source:               [stuff]# python2.7  ./external_dependancies/psycopg2-2.5.3/setup.py install     Traceback (most recent call last):       File "./external_dependancies/psycopg2-2.5.3/setup.py", line 474, in <module>         use_pydatetime  = int(parser.get('build_ext', 'use_pydatetime'))       File "/usr/local/lib/python2.7/ConfigParser.py", line 607, in get         raise NoSectionError(section)     ConfigParser.NoSectionError: No section: 'build_ext'      **What do I need to do to get python-devel (or better yet, psycopg2) on my system**


How to disable "auto cd" in zsh with oh-my-zsh

Googling this didn't show up any results. Here's what I mean: I have a binary file named `x` in my path (not the current folder, but it is in the `PATH`), and _also_ a folder with the same name in the current working directory. If I type `x`, I want the binary to execute, but instead it cd's into that folder. How do I fix this?


How to install Windows 8 after arch?

Okay so after a painful 3 days of fixing / changing / reformatting I have finally got Arch Linux install. Now comes the problem. I had to remove Windows when installing Arch but I still need Windows. How would one go about installing Windows after Arch? I am using refined and (what I think is) grub as my bootloaders. Grub coming in before refined. I understand this is backwards and you are supposed to install Windows then Arch because of windows bootloader and other annoying features that like to be annoying. Important things to note -   * UEFI   * GPT   * Windows 8   * Refined   * Arch Linux Is it a different process than this one? I am only asking because I don't think I can handle going through the install again. Why I'm concerned-   * The wonderful recovery partition   * Windows boot loader   * I'm not familiar with how W8 installs and while I'm painfully familiar with Arch's install it's still new to me.   * And most importantly I don't want to go through Arch install again   * Very new to both OSs EDIT: [ During my install I ran into a problem with Grub where it would not over-take the Windows Boot manager. I attempted the following things               mkdir /foo && mount -t vfat /dev/sda2/foo      cd /foo      mount -t proc proc proc/      mount -t sysfs sys sys/      mount -o bind /dev dev/      mount -t devpts pts dev/pts/      chroot /foo /usr/bin/bash          grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug     grub-mkconfig -o /boot/grub/grub.cfg      And it did not work. This furthers my worry that this will happen again. ]


Gnome programs (eog/gnome-terminal) have a slow start and produce a DBus.Error.NoReply Warning

For some time `eog` and `gnome-terminal` are starting very slow on my (X)Ubuntu 13.10. I think other gnome tools are affected, too, but I don't use any else. Now I get a `org.freedesktop.DBus.Error.NoReply` error, everytime `gnome- terminal` starts: > ** (gnome-terminal:5516): WARNING **: Error retrieving accessibility bus > address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. > Possible causes include: the remote application did not send a reply, the > message bus security policy blocked the reply, the reply timeout expired, or > the network connection was broken. and everytime `eog` starts: > ** (eog:4996): WARNING **: Error retrieving accessibility bus address: > org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes > include: the remote application did not send a reply, the message bus > security policy blocked the reply, the reply timeout expired, or the network > connection was broken. > > (eog:4996): EOG-WARNING **: Couldn't load icon: Icon 'image-loading' not > present in theme I think it has something to do with me deinstalling some programs that were starting by Default, including `at-spi2-registryd`, which I think belongs to Gnome's Accessibility Project. According to `dpkg --getselections | grep spi`, `at-spi2-core` is still installed on my system. I remember doing something very hacky/stupid like exchanging some config files or binaries with empty echo programs to stop the daemon from starting.   * How can I fix this error?   * What causes this error? Google produces some `at-spi...` related links:   * https://lists.ubuntu.com/archives/ubuntu-accessibility-bugs/2013-August/006261.html   * https://lists.ubuntu.com/archives/ubuntu-accessibility-bugs/2013-August/006264.html This might have to do with a `freedesktop` related issue I have with `nmcli`, so please have a look at it: nmcli freedesktop DBus warnings and errors. * * * `ltrace -r eog`:               0.000000 __libc_start_main(0x41e210, 2, 0x7fff41235b18, 0x45c020, 0x45c0b0 <unfinished ...>     0.000734 bindtextdomain("eog", "/usr/share/locale") = "/usr/share/locale"     0.001297 bind_textdomain_codeset(0x463fff, 0x45c0f6, 1, 0, 65535) = 0x1d59750     0.000863 textdomain("eog")                     = "eog"     0.000759 dcgettext(0, 0x45c0fc, 5, 0x676f65, 65535) = 0x45c0fc     0.000718 g_option_context_new(0x45c0fc, 1, 2, 3, 0) = 0x1d598e0     0.000711 g_option_context_add_main_entries(0x1d598e0, 0x45c300, 0x463fff, 0x1d59940, 88) = 0     0.000668 gtk_get_option_group(1, 0x7f161670f2e0, 0x1d59960, 0x7f161670bec0, 0) = 0x1d5ccd0     0.003283 g_option_context_add_group(0x1d598e0, 0x1d5ccd0, 0x1d5cf60, 0x7f161670bec0, 3) = 0x1d5d000     0.000711 g_irepository_get_option_group(0, 0, 0x1d5d000, 0x1d50670, 0) = 0x1d5cf80     0.000845 g_option_context_add_group(0x1d598e0, 0x1d5cf80, 0x1d5d830, 3, 3) = 0x1d5d000     0.000613 g_option_context_parse(0x1d598e0, 0x7fff41235a0c, 0x7fff41235a00, 0x7fff41235a18, 0     ** (eog:2797): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.     ) = 1     25.069454 g_option_context_free(0x1d598e0, 0x7fff41235b18, 0x7fff41235b20, 0x7fff412373c4, 2) = 0     0.000330 xmp_init(0x7f1616281740, 0xffffffff, 0, 0x7f1616281768, 0) = 1     0.001356 g_getenv(0x45c905, 0x1dbb610, 0x1dbb5c0, 1, 3) = 0          [...]          0.000509 g_object_ref(0x204f240, 3, 1, 51, 0x7f16080008e0) = 0x204f240     0.000681 g_queue_push_tail(0x1d5d780, 0x204f240, 2, 51, 0x204d270) = 0x1ff5ce0     0.000793 g_cond_broadcast(0x67b7d0, 0x1ff5ce0, 0, 16, 0) = 0     0.000797 g_mutex_unlock(0x67b7c0, 132, 1, -1, 0x7f16080008e0) = 0     0.000716 g_object_unref(0x204f240, 0, 0x7f16080008e0, -1, 0x7f16080008e0) = 2          (eog:2797): EOG-WARNING **: Couldn't load icon: Icon 'image-loading' not present in theme     0.048019 gtk_icon_view_get_type(0x1fb23b0, 0x450510, 0x1fb23b0, 0x7f1616703450, 0x1d50a60) = 0x2015420     0.000800 g_type_check_instance_cast(0x1fb23b0, 0x2015420, 0x1fb23b0, 0x7f1616703450, 0x1d50a60) = 0x1fb23b0     0.000743 gtk_icon_view_get_visible_range(0x1fb23b0, 0x7fff41235820, 0x7fff41235828, 0x2015420, 0x2015420) = 0     0.000588 gtk_icon_view_get_type(0x1fb23b0, 0x450510, 0x1fb23b0, 0x7f1616703450, 0x1d50a60) = 0x2015420          [...]      `ltrace -r gnome-terminal`:               [...]          0.000543 g_str_hash(0x7f1ba08d1617, 0x7f1ba08d1617, 0x21cd180, 0, 0x219d050) = 0x6e8257f7     0.000714 g_str_hash(0x7f1ba08d194c, 0x7f1ba08d194c, 0, 0x7f1ba08d194c, 0) = 0x24119b48     0.000490 g_str_hash(0x7f1ba08d194c, 0x7f1ba08d194c, 0x21bcaa0, 0, 0x219d050) = 0x24119b48     0.000655 g_str_hash(0x7f1ba12f72c7, 0x7f1ba12f72c7, 0, 0x7f1ba12f72c7, 40) = 0xac0d625f     0.000596 g_str_hash(0x7f1ba12f72c7, 0x7f1ba12f72c7, 0x21bcc20, 0, 0x219d050) = 0xac0d625f          [...]          ** (gnome-terminal:5758): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.     25.036838 g_str_hash(0x7f1ba0b4452a, 0x7f1ba0b4452a, 0, 0x7f1ba0b4452a, 508) = 0xa59bb851     0.000696 g_str_hash(0x21b18bc, 0x21b18bc, 0x21d7080, 0, 509) = 0xa59bb851     0.000501 g_str_hash(0x7f1ba13cf396, 0x7f1ba13cf396, 0, 0x7f1ba13cf396, 24) = 0x22c79e89     0.000550 g_str_hash(0x7f1ba13cf396, 0x7f1ba13cf396, 0x21d7150, 0, 0x219d050) = 0x22c79e89     0.003683 g_str_hash(0x7f1ba0dc076b, 0x7f1ba0dc076b, 0, 0x7f1ba0dc076b, 384) = 0xa4fa89ab      `strace -r eog`:               [...]     0.000268 poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])     0.000723 recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\v\0\0\0\1\0\0\0=\0\0\0\6\1s\0\6\0\0\0:1.307\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 262     0.000351 recvmsg(3, 0x7ffff251a080, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)     0.000339 sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\2\0\0\0[\0\0\0\1\1o\0\r\0\0\0/org/a11"..., 112}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 112     0.000354 poll([{fd=3, events=POLLIN}], 1, 25000) = 0 (Timeout)     25.025550 open("/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)     0.000410 write(2, "\n** (eog:2786): WARNING **: Erro"..., 319     ** (eog:2786): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.     ) = 319     0.000660 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4     0.000305 connect(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0     0.000243 getpeername(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, [20]) = 0          [...]          0.000054 poll([{fd=4, events=POLLIN}], 1, 4294967295) = 1 ([{fd=4, revents=POLLIN}])     0.000029 recvfrom(4, "\1\0\213\0\0\0\0\0\240\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32     0.000027 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)     0.000026 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)     0.000027 poll([{fd=4, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=4, revents=POLLOUT}])          (eog:2786): EOG-WARNING **: Couldn't load icon: Icon 'image-loading' not present in theme     ) = 16     0.000056 poll([{fd=4, events=POLLIN}], 1, 4294967295) = 1 ([{fd=4, revents=POLLIN}])     0.000029 recvfrom(4, "\1\0\214\0\0\0\0\0\241\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32     0.000028 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)     0.000026 recvfrom(4, 0x1709c34, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)     0.000032 poll([{fd=4, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=4, revents=POLLOUT}])      `strace -r gnome-terminal`:               [...]          0.000406 recvmsg(3, 0x7fffb9bbc6e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)     0.000434 sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\2\0\0\0[\0\0\0\1\1o\0\r\0\0\0/org/a11"..., 112}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 112     0.000328 poll([{fd=3, events=POLLIN}], 1, 25000) = 0 (Timeout)     25.006307 open("/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)     0.000486 write(2, "\n** (gnome-terminal:5885): WARNI"..., 330     ** (gnome-terminal:5885): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.     ) = 330     0.000519 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4     0.000118 connect(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0     0.000125 getpeername(4, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, [20]) = 0          [...]


How to install Ubuntu 13.10 virtual machine on top of KVM running on Ubuntu 13.10

When I try to install LUbuntu 13.10 as a virtual machine using Qemu-KVM running on Lubuntu 13.10, I get a garbled screen when I start the virtual machine and/or when I start the installation process. I have a raw image created using `dd` of size 32768M for the virtual machine, and I pass the ISO file to it. I have tried both Spice and VNC , both without success, and when I do get the virtual machine to open I cannot get it to fill my monitor (1920x1080). Sometimes also the cursor disappears. Alternatively, if I open a terminal in the virtual machine the fonts are totally garbled so that I cannot read them - it appears to have something to do with the display resolution. My question is are there any special settings needed to install a Ubuntu virtual machine on QEMY/KVM running on top of Ubuntu? I had tried earlier to do so with LUbuntu 14.04 but pcmanfm started running 25% of the cpu (I am running a dual core i7 with 8GB ram on a samsung series 9 with 256 GB solid state drive.


Heartbleed Bug, which OpenSSL services are vulnerable to the leak?

I'm getting ready to patch my server (Debian Wheezy), and it's going to be a pain because I built a lot of it from source (Apache 2.4, PHP, MySQL). Before I get started patching, I'd like to have a better understanding of which OpenSSL services are vulernarable to the leak. Obviously HTTP/HTTPS services are vulnerable. What about SMTP, IMAP and POP? SSH? Or is it **any** public-facing service that uses the affected versions of OpenSSL I should be aware of? My server also has IPMI/KVM (Supermicro) that I use to install my OS. It's accessible via HTTP/HTTPS on the same machine, but with a different IP address. I wonder if this is also vulnerable. I'm not sure if the built-in Supermicro web server uses OpenSSL. If so, I may ask my server provider to apply any firmware patches.


Remove files and directories even if not empty, except some directories

I am trying to remove all contents of a directory with some exclusions. I'm currently using this:               find . -type f | grep -vZf ../../exclude.file | xargs rm -rf      The `exclude.file` contains:               *log*     world*     crash-reports     banned-ips*      I don't want to remove the `world`, `log` or `crash-reports` folders or any of their contents (the * is to cover backups, which are generated as `world.zip`). The command above does this, but it does not remove non-empty directories. E.g. the `Config` directory is left, but I need it removed. I've also experimented with similar to the following:               find -maxdepth 0 -not -name '*log*' -not -name 'crash-reports' -not -name 'world*' | xargs rm -rf      But I still get the same result. Is there a way to do this?


disable init.d script in systemd

I changed the init system from sysvinit to systemd on a raspbian installation. The install boots fine, but now starts lightdm on boot. I don't want it to do that. I noticed `lightdm.service` is started on boot. Stopping the service with `systemctl stop lightdm.service` works fine. `systemctl disable lightdm.service` should disable it, but gives me `Failed to issue method call: No such file or directory` `systemctl status lightdm.service` gives me               lightdm.service - LSB: Light Display Manager           Loaded: loaded (/etc/init.d/lightdm)           Active: inactive (dead) since Thu, 03 Jul 2014 09:33:00 +0000; 22min ago          Process: 762 ExecStop=/etc/init.d/lightdm stop (code=exited, status=0/SUCCESS)          Process: 411 ExecStart=/etc/init.d/lightdm start (code=exited, status=0/SUCCESS)           CGroup: name=systemd:/system/lightdm.service      I'm assuming that lightdm is started from an init.d script rather than a systemd script, and `systemctl disable` doesn't work if the source is an init.d script. What should I do instead to disable lightdm starting at boot? edit: More info output of `$ ls -l /etc/systemd/system`:               total 20     lrwxrwxrwx 1 root root   42 Jul  3 09:04 dbus-fi.epitest.hostap.WPASupplicant.service -> /lib/systemd/system/wpa_supplicant.service     lrwxrwxrwx 1 root root   37 Jul  3 13:03 default.target -> /lib/systemd/system/multi-user.target     drwxr-xr-x 2 root root 4096 Jul  3 09:00 getty.target.wants     drwxr-xr-x 2 root root 4096 Jul  3 09:04 graphical.target.wants     drwxr-xr-x 2 root root 4096 Oct 11  2013 local-fs.target.wants     drwxr-xr-x 2 root root 4096 Jul  3 09:04 multi-user.target.wants     drwxr-xr-x 2 root root 4096 Oct 11  2013 sysinit.target.wants     lrwxrwxrwx 1 root root   35 Mar 20  2013 syslog.service -> /lib/systemd/system/rsyslog.service      output of `systemctl --all -t target`:               UNIT                LOAD   ACTIVE   SUB    JOB DESCRIPTION     all.target          error  inactive dead       all.target     basic.target        loaded active   active     Basic System     cryptsetup.target   loaded active   active     Encrypted Volumes     emergency.target    loaded inactive dead       Emergency Mode     final.target        loaded inactive dead       Final Step     getty.target        loaded active   active     Login Prompts     local-fs-pre.target loaded active   active     Local File Systems (Pre)     local-fs.target     loaded active   active     Local File Systems     multi-user.target   loaded active   active     Multi-User     network.target      loaded inactive dead       Network     nss-lookup.target   loaded inactive dead       Name Lookups     remote-fs.target    loaded active   active     Remote File Systems     rescue.target       loaded inactive dead       Rescue Mode     shutdown.target     loaded inactive dead       Shutdown     sockets.target      loaded active   active     Sockets     sound.target        loaded active   active     Sound Card     swap.target         loaded active   active     Swap     sysinit.target      loaded active   active     System Initialization     syslog.target       loaded active   active     Syslog     time-sync.target    loaded inactive dead       System Time Synchronized     umount.target       loaded inactive dead       Unmount All Filesystems      output of `ls -l /etc/systemd/system/multi-user.target.wants/`:               total 8     drwxr-xr-x 2 root root 4096 Jul  3 09:04 .     drwxr-xr-x 7 root root 4096 Jul  3 13:03 ..     lrwxrwxrwx 1 root root   36 Oct 11  2013 remote-fs.target -> /lib/systemd/system/remote-fs.target     lrwxrwxrwx 1 root root   33 Jul  3 09:04 rsync.service -> /lib/systemd/system/rsync.service     lrwxrwxrwx 1 root root   35 Mar 20  2013 rsyslog.service -> /lib/systemd/system/rsyslog.service     lrwxrwxrwx 1 root root   32 Jul  3 09:04 sudo.service -> /lib/systemd/system/sudo.service     lrwxrwxrwx 1 root root   42 Jul  3 09:04 wpa_supplicant.service -> /lib/systemd/system/wpa_supplicant.service


Run terminal commands from within LibreOffice's Basic programming?

Is there a way to run system commands in LibreOffice Basic macros so that macros will be able to do things outside LibreOffice (e.g. changing keyboard layout)?


Full disk encryption with dm-crypt (without LUKS)

I am currently trying to achieve full disk encryption using dm-crypt in plain mode without LUKS header with a separate `/boot` on USB stick. My main goal is to achive plausible deniability on a Debian-based distro. For now I've managed to encrypt partitions using `cryptsetup` and to install the `/boot` partition to a separate USB key. It all goes as it should and because the header for encryption is not stored in LUKS, I need to manually enter it at the initramfs screen, but at this step I simply get an error that indicates there's no cryptsetup in initramfs ("/bin/sh: cryptsetup: not found") while trying to parse the header. In conclusion:   * `dev/sda` encrypted using `dm-crypt` (`/root` and `/home` volumes) with:               cryptsetup --hash=sha512 --cipher=twofish-xts-plain64 create crypt /dev/sda   * `dev/sdb` boot stick with grub installed I can successfully boot from the bootstick. I see the Ubuntu splashscreen for about 20 seconds which is what I wanted to achive for plausible deniability and then it drops to the initramfs complaining about not being able to find `/dev/mapper/root`--which is also something I wanted to achieve. The problem is that when I want to parse the cryptsetup line which would allow me to enter a password and continue with boot, then the initramfs complains about "cryptsetup: not found". I guess this complaint is true. My question is: how to install cryptsetup into the initramfs so it would allow fruther booting for the password prompt? Also, I know that I'm omitting something with adding the appropriate entries in `/etc/fstab`, `/etc/crypttab` and devices are not found during start up. These are the guides I've found and used to setup all curent config, maybe this will clear up things I did not cover in my question:   * http://and1equals1.blogspot.ro/2009/10/encrypting-your-hdd-with-plausible.html   * https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Plain_dm-crypt The first one is a little outdated and the second one is for Arch Linux, but I've used two of them with newest Lubuntu instalation with little tweaking.


REISUB (Alt+SysRq+key) doesn't work on Slackware13.37_64, KDE

Under Slackware I never used the magical REISUB, and never used KDE (I don't know if it is important). But now I installed a Slackware13.37_64 with KDE, and, as far as I know, I didn't modify anything that could modify the default REISUB behaviour. Well, it didn't work in a disastrous situation. I tried then it with the system functioning well, and it didn't work either. Is it a bug or a disabled feature? How to switch it on? `$ uname -a` `Linux mysystem 2.6.37.6 #3 SMP Sat Apr 9 22:49:32 CDT 2011 x86_64 Pentium(R) Dual-Core CPU T4300 @ 2.10GHz GenuineIntel GNU/Linux` The notebook is ASUS K50IJ.


apt-get install doesn't install latest version of Owncloud Client

I'm trying to install the latest version of the Owncloud Client (`owncloud- client`) on a raspberry Pi running Raspbian Linux. When I just enter `sudo apt-get install owncloud-client`, I get version 1.2 of the client. So I added the Owncloud repository from the official download page and ran all the commands from the Debian-section as root. But when I try to install `owncloud-client` now, i still get the version 1.2 (and not the latest Version, which is 1.6.1 Do I need apt-pinning for this or is there a simpler solution to this problem?


How to configure Tcl on Linux From Scratch?

I got this error following LFS 6.8, chapter 5, Tcl-8.5.10 to install Tcl:               lfs@sam:/mnt/lfs/sources/tcl8.5.9/tools$ ./configure --prefix=/tools     ./configure: line 1208: cd: ../../tcl8.5/unix: No such file or directory     configure: error: There's no tclConfig.sh in /mnt/lfs/sources/tcl8.5.9/tools;  perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?     lfs@sam:/mnt/lfs/sources/tcl8.5.9/tools$      How can I fix it?


Comparing directories in Emacs

I am experimenting with `ediff-directories`, but I am not sure I am using it correctly. I read in the documentation that, once I supply two directories to `ediff- directories`, if I press `==` Emacs compares them recursively. However, if I press `==` I only get folders with `=` signs (meaning that the two folders have identical contents) on the level where I run the command. If I want to see which folders have `=` signs at deeper levels in the folder hierarchy, I need to re-run the `==` command at each level. How can I tell emacs to go recursively all the way to the leaves so that I can see all the differences in the `directory difference buffer` (accessible via the keyboard command `D`)? If anybody knows of a tutorial on how to use `ediff-directories` (other than the official documentation), I would be highly interested. * * * Also, if I want to exit a session group (comparison of folders at one level), but I have sessions open for deeper levels, if I press `q` (quit this session group), Emacs complains with the messaage: > This sesssion group has active sessions---cannot exit How can I exit session groups without exiting the sub-sessions one by one?


update-initramfs fails with 'File exists' errors during upgrade from lenny to squeeze

I am in the process of upgrading a machine from Debian Lenny to Squeeze (I know it was about time ;-) and ran into a weird error that boils down to the update-initramfs command complaining about some files already existing. **Here is the complete output I get:**               Debian-50-lenny-64-LAMP:/tmp/mkinitramfs_Zq6I1R/usr/share# update-initramfs -u     update-initramfs: Generating /boot/initrd.img-2.6.26-2-amd64     ln: creating symbolic link `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     mkdir: cannot create directory `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     ln: creating symbolic link `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     mkdir: cannot create directory `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     ln: creating symbolic link `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     mkdir: cannot create directory `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     ln: creating symbolic link `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     mkdir: cannot create directory `/tmp/mkinitramfs_i1KKQH//usr/share/java/^^': File exists     E: /usr/share/initramfs-tools/hooks/mdadm failed with return 1.     update-initramfs: failed for /boot/initrd.img-2.6.26-2-amd64      So I started investigating the above directory and made some interesting findings - the directory does indeed exist but **can not be deleted by running`rm -rf`:**               Debian-50-lenny-64-LAMP:/tmp/mkinitramfs_i1KKQH/usr/share# rm -rf /tmp/mkinitramfs_i1KKQH//usr/share/java/     rm: cannot remove `/tmp/mkinitramfs_i1KKQH//usr/share/java': Directory not empty     Debian-50-lenny-64-LAMP:/tmp/mkinitramfs_i1KKQH/usr/share#       And further when changing into the given directory and **running`ls` I get:**               Debian-50-lenny-64-LAMP:/tmp/mkinitramfs_i1KKQH/usr/share/java# ls     ls: reading directory .: No such file or directory      I am not really sure where to go from here - needless to say I am logged in as root. Everytime the command gets executed a new temp folder in the form of `mkinitramfs_<randomstring>`is created - so it seems unlikely that it is a disc corruption problem in my eyes as I am not running into this problem anywhere else on my system. Thanks.


MS Core Fonts download?

I'm looking for the MS core fonts. I can't find any good Linux downloads. All I can find are Windows installers; you have to download one for each font, then go through a huge process to get everything extracted.   I'm running Puppy Linux. This means that I can't just open the EXE's as archives. I don't care whether the download is .tar.gz, .zip, .rar, .tc, or even .torrent; I just want the fonts. This is not a duplicate of this question; that one is specifically about installation on Fedora, likewise, the answers are about as Fedora-specific as humanly possible. They would all be entirely inapplicable to any other non- redhat-based Linux distro. I have a strong suspicion that this question doesn't quite belong on this site, so could whoever closes it leave a comment explaining which site this belongs on (or, even better, migrate it?) I couldn't find any site that fit my question more perfectly than this one...


Confused about Debian error message from su

On Raspbian, the Debian distro aimed at RPi, I end up getting the following error:               $ sudo su -l root -c /bin/bash     bash: cannot set terminal process group (-1): Inappropriate ioctl for device     bash: no job control in this shell      ... however, if I change this to `sudo su -`, everything works fine. Any ideas what's wrong in the above command line? The main issue here is that the terminal is borked after this command ... I found this bug report but it looks like there is no clonclusion. * * * ## System info               $ lsb_release -a     No LSB modules are available.     Distributor ID: Debian     Description:    Debian GNU/Linux 7.0 (wheezy)     Release:        7.0     Codename:       wheezy     $ dpkg -l |grep sudo     ii  libgksu2-0                            2.0.13~pre1-6                        armhf        library providing su and sudo functionality     ii  sudo                                  1.8.5p2-1                            armhf        Provide limited super user privileges to specific users      * * * ## NOTE The reason I am using `-c /bin/bash` is that it actually looks more like `-c /bin/bash --rcfile /path/to/rcfile` ... and therefore is different from a mere `sudo -i` or `sudo su -` and so on ... The reason I gave the command line as I did above in my question was that it is the minimal example that reproduces the problem.


Restricting memory area for linux kernel

I am running ltib Linux on P1022RDK (P1022 Core) platform. I have 512 MB = 0x20000000 memory. I want my Linux kernel to use the second half of the board memory (i.e from 256 MB to 512 MB) and want the first half of memory to be reserved for some other purpose. For this I am building the Linux kernel using ltib, and setting the following kernel configuration. Please suggest if I am doing it the right way.               CONFIG_LOWMEM_SIZE = 0x10000000 # 256 MB      CONFIG_PHYSICAL_START = 0x10000000 # Starting from 256MB (second half of memory) On the Uboot I am loading the kernel the following way:               setenv loadaddr 0x11000000 # Kernel base = 0x10000000 + 0x01000000 (offset)      setenv fdtaddr 0x10c00000 # Kernel base = 0x10000000 + 0x00c00000 (offset)      bootm $loadaddr - $fdtaddr My kernel Load address is 0x10000000 & kernel entry point is 0x10000000 Using the above configuration/steps my kernel is stuck at the following on Uboot:               Booting kernel from Legacy Image at 11000000 ...          Image Name: Linux-2.6.32.13      Image Type: PowerPC Linux Kernel Image (gzip compressed)      Data Size: 3352851 Bytes = 3.2 MB      Load Address: 10000000      Entry Point: 10000000      Verifying Checksum ... OK          Flattened Device Tree blob at 10c00000          Booting using the fdt blob at 0x10c00000      Uncompressing Kernel Image ... OK It _should_ uncompress FDT here & continue Any thoughts?


How can I match the page break character in a regular expression?

Nano calls it `^L`, but of course, typing something like               $ grep -v "^\^L" file      doesn't work. Its unicode codepoint is 000C. How can I match it in a regular expression?


Xvfb does not release memory

We want to create screenshots of websites for our software, and we are doing this by using CutyCapt with Xvfb. Unfortunatly every time CutyCapt takes a screenshot, the memory of Xvfb increases .. until the memory of the boy explodes. This is not bound to CutyCapt, it seems that the Xvfb doesn't clean some memory when the application quits. Are there any solutions (except restarting Xvfb (which we do now via cron as a hotfix)). I start Xvfb with `Xvfb :1 -screen 0 1280x1024x24` (in a script of course ;) )


installed `default-jdk` but there is no `javac`

I have a Debian Unstable VM which I used to package a Java project before. Today, the `javac` was gone somehow, so I installed `default-jdk` again. But still, there is no `javac`. What could I do?


I can not get my Realtek 8723 driver source compiled

I have a Lenovo IdeaPad Yoga 13. WLAN won't work out of box with fedora 18. So I googled around and found this 2 links: http://askubuntu.com/questions/139632/wireless-card-realtek-rtl8723ae-bt-is- not-recognized https://ask.fedoraproject.org/question/9633/i-can-not-get-my- realtek-8723-chip-to-work/ So I downloaded the source install gcc, kernel-header, kernel-devel and patch. I comment the line 320 in base.c out. But I get still an error.               make -C /lib/modules/3.8.9-200.fc18.x86_64/build M=/home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012 modules     make[1]: Entering directory `/usr/src/kernels/3.8.9-200.fc18.x86_64'       CC [M]  /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.o     In file included from /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.c:39:0:     /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/pci.h:245:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl_pci_probe’     /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.c: In function ‘rtl_action_proc’:     /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.c:870:25: error: ‘RX_FLAG_MACTIME_MPDU’ undeclared (first use in this function)     /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.c:870:25: note: each undeclared identifier is reported only once for each function it appears in     /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.c: In function ‘rtl_send_smps_action’:     /home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.c:1432:16: error: ‘struct <anonymous>’ has no member named ‘sta’     make[2]: *** [/home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012/base.o] Error 1     make[1]: *** [_module_/home/l33tname/rtl_92ce_92se_92de_8723ae_linux_mac80211_0006.0514.2012] Error 2     make[1]: Leaving directory `/usr/src/kernels/3.8.9-200.fc18.x86_64'     make: *** [all] Error 2      The line 245 on pci.h is this: > int __devinit rtl_pci_probe(struct pci_dev *pdev,const struct pci_device_id > *id); And yeah I try it as normal user and as root. My question is how can I compile this or what must be fixed.


How can I set repeat rate of USB keyboard with udev?

How can I get my keyboard repeat rate to apply to a hotplugged USB keyboard? I made a udev rule to set the keyboard repeat delay and rate, `/etc/udev/rules.d/99-usb-keyboard.rules` with the following contents:               ACTION=="add", SUBSYSTEM=="usb", RUN+="/home/michael/bin/keyboard_settings.sh"      keyboard_settings.sh:               #!/bin/bash          # Set keyboard repeat delay and rate     xset -display :0.0 r rate 250 40      udev seems to see this, using the command `udevadm test /sys/bus/usb/devices/3-2\:1.0/`               read rules file: /etc/udev/rules.d/99-usb-keyboard.rules     rules contain 393216 bytes tokens (32768 * 12 bytes), 37438 bytes strings     31709 strings (264322 bytes), 28154 de-duplicated (230440 bytes), 3556 trie nodes used     IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:11     RUN '/home/myuser/bin/keyboard_settings.sh' /etc/udev/rules.d/99-usb-keyboard.rules:1     unable to create temporary db file '/run/udev/data/+usb:3-2:1.0.tmp': Permission denied     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0     DEVTYPE=usb_interface     DRIVER=usbhid     ID_VENDOR_FROM_DATABASE=Hewlett-Packard     INTERFACE=3/1/1     MODALIAS=usb:v03F0p0325d0102dc00dsc00dp00ic03isc01ip01in00     PRODUCT=3f0/325/102     SUBSYSTEM=usb     TYPE=0/0/0     USEC_INITIALIZED=4145997461     run: '/home/myuser/bin/keyboard_settings.sh'      And yet, this doesn't actually change the repeat rate. The laptop keyboard has the correct settings, but the external USB keyboard does not. Is Xorg overwriting the settings after the udev rule is applied? How can I find out? I get this in the Xorg.0.log, indicating that X11 is fussing with things, but none of the rules in `/usr/share/X11/xorg.conf.d/` do anything to keyboards.               [164570.705] (II) config/udev: Adding input device Lite-On Technology Corp. HP Basic USB Keyboard (/dev/input/event6)     [164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: Applying InputClass "evdev keyboard catchall"     [164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: Applying InputClass "Keyboard Defaults"     [164570.705] (II) Using input driver 'evdev' for 'Lite-On Technology Corp. HP Basic USB Keyboard'     [164570.705] (**) Lite-On Technology Corp. HP Basic USB Keyboard: always reports core events     [164570.705] (**) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Device: "/dev/input/event6"     [164570.705] (--) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Vendor 0x3f0 Product 0x325     [164570.705] (--) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Found keys     [164570.705] (II) evdev: Lite-On Technology Corp. HP Basic USB Keyboard: Configuring as keyboard     [164570.705] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/input/input34/event6"     [164570.705] (II) XINPUT: Adding extended input device "Lite-On Technology Corp. HP Basic USB Keyboard" (type: KEYBOARD, id 11)     [164570.705] (**) Option "xkb_rules" "evdev"     [164570.705] (**) Option "xkb_model" "pc105"     [164570.705] (**) Option "xkb_layout" "us"


Asteriks in filename as wildcard not working

So I have a folder with many files like 20140720.457812.tmp and I try to count how many lines they have, I tried this:               #!/bin/bash     lines=`more /folder/20140720*.tmp|wc -l`      but I get this error:               /folder/20140720*.tmp: No such file or directory      When I do `more /folder/20140720*.tmp|wc -l` in the terminal it works but not in the script.


Installing required libs/frameworks/packages for compilation on OSX

I'm trying to compile SmartSim for OSX Lion, and at the moment I'm at the `./configure` stage. Here is a dump of what I've managed to get so far:               $ ./configure     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for a thread-safe mkdir -p... ./install-sh -c -d     checking for gawk... no     checking for mawk... no     checking for nawk... no     checking for awk... awk     checking whether make sets $(MAKE)... yes     checking for gcc... gcc     checking whether the C compiler works... yes     checking for C compiler default output file name... a.out     checking for suffix of executables...      checking whether we are cross compiling... no     checking for suffix of object files... o     checking whether we are using the GNU C compiler... yes     checking whether gcc accepts -g... yes     checking for gcc option to accept ISO C89... none needed     checking for style of include used by make... GNU     checking dependency style of gcc... gcc3     checking for ... no     checking for pkg-config... /usr/local/bin/pkg-config     checking pkg-config is at least version 0.9.0... yes     checking for GLIB... yes     checking for GTK... no     configure: error: Package requirements (gtk+-2.0) were not met:          Package 'cairo', required by 'pangocairo', not found          Consider adjusting the PKG_CONFIG_PATH environment variable if you     installed software in a non-standard prefix.          Alternatively, you may set the environment variables GTK_CFLAGS     and GTK_LIBS to avoid the need to call pkg-config.     See the pkg-config man page for more details.      However, I have installed Homebrew, and it says I have the above installed:               $ brew install gtk+     Warning: gtk+-2.24.17 already installed      Here's a dump of my `/etc/paths` file:               /usr/local/Cellar/     /usr/local/bin     /usr/local/sbin     /usr/bin     /bin     /usr/sbin     /sbin     /Library/Frameworks/GTK+.framework/Resources/bin      Oh, and I have XCode installed for the compiler collection, build tools, and all the other dev tools. So, how do I get the configure script to recognize that I have the required pkgs/libs/frmwrks installed?


Why is 'umount' not spelled 'unmount'?

I am wondering if there is any historical or practical reason why the `umount` command is not `unmount`.


Can't install GRUB, no matter what

My PC has Windows 7 and Mint 16 (Cinnamon). After installing Mint, GRUB stopped working, and I got a GRUB Rescue console instead of the GRUB menu. Being in a hurry, I launched the Windows installation disk and executed a series of `bootexec` commands in order to restore at least it. Later on, I found that I could boot my Mint installation if, with the Mint Live CD in the drive, I switched to the GRUB console from the disk boot menu. After that, I typed the following:               set root=(hd1,msdos6)     set prefix=/boot/grub     linux /vmlinuz root=/dev/sda6 ro     initrd /initrd.img     boot      With Mint up and running, I ran Boot Info Script, and got the following:                                 Boot Info Script 0.61      [1 April 2012]               ============================= Boot Info Summary: ===============================           => Windows is installed in the MBR of /dev/sda.      => Windows is installed in the MBR of /dev/sdb.          sda1: __________________________________________________________________________              File system:       ntfs         Boot sector type:  Windows Vista/7: NTFS         Boot sector info:  No errors found in the Boot Parameter Block.         Operating System:           Boot files:        /bootmgr /Boot/BCD          sda2: __________________________________________________________________________              File system:       ntfs         Boot sector type:  Windows Vista/7: NTFS         Boot sector info:  No errors found in the Boot Parameter Block.         Operating System:  Windows 7         Boot files:        /Windows/System32/winload.exe          sda3: __________________________________________________________________________              File system:       ntfs         Boot sector type:  Windows Vista/7: NTFS         Boot sector info:  No errors found in the Boot Parameter Block.         Operating System:           Boot files:                  sda4: __________________________________________________________________________              File system:       Extended Partition         Boot sector type:  Unknown         Boot sector info:           sda5: __________________________________________________________________________              File system:       swap         Boot sector type:  -         Boot sector info:           sda6: __________________________________________________________________________              File system:       ext4         Boot sector type:  -         Boot sector info:          Operating System:  Linux Mint 16 Petra         Boot files:        /boot/grub/grub.cfg /etc/fstab          sda7: __________________________________________________________________________              File system:       ext4         Boot sector type:  -         Boot sector info:          Operating System:           Boot files:                  sdb1: __________________________________________________________________________              File system:       ntfs         Boot sector type:  Windows XP: NTFS         Boot sector info:  No errors found in the Boot Parameter Block.         Operating System:           Boot files:            (This file actually have a lot more content, but I believe that the following isn't relevant to the problem.) And this grab my attention:                => Windows is installed in the MBR of /dev/sda.      So I should just `sudo grub-install /dev/sda` and everything would be fine right? Well, nope. `grub-install` complains nothing, and after that running Boot Info Script gives me the exact same output. If I restart, Windows loads up without any sign of the GRUB menu. So, what am I missing here?


Centralising CUPS config

I have a LAN with a few Ubuntu machines on. They each need to be set up with the same printers. I would like to have a script that copies a centrally stored config to each machine so that they're all doing the same thing with the same drivers. Looking in /etc/cups/ I see quite a lot of files including duplicates but with `.O` appended for some reason (backups?). Is it as simple as               service cups stop     cp -ar /path/to/source/cups /etc/cups     service cups start      or are any of the config things in there necessarily unique to the machine they are running on?


sort based on column

10 awhdk;     14 hjoeow;     2  kdkld;     4  jkjdksl      How to sort this based on column one (i.e the count) ? I'd want to get this output : `14 hjoeow;10 awhdk;4 jkjdksl;2 kdkld` I need both the columns to be printed based on sorting the first column.


Launch background processes in one group and later kill them all

The other day I tried writing a script that would kill a _PID_ and all its children processes, but after spending some time on it, I decided it wasn't trustworthy, because sometimes some of the children would end up with a _PPID_ of _1_. Now, what I'm looking for is how can I run the following function in the background, and have the function and `curl` all in the same **group** , and later kill this script if it gets stuck, killing all its children that were left in the background:               download(){         until curl -s -S -L -A Mozilla/5.0 -m 300 "$@"; do             echo Retrying in 5 seconds... >&2             sleep 5         done     }          for url in foo.com bar.com baz.com; do         download $url >$url &     done     wait      I know there's no need for this function `download`, but I included here because it is a function I use many times in this script. Also, I'm giving a max time limit of _300_ to `curl`, but depending on some network errors, it also gets stuck.


Debian wheezy FN key inverted after resume from suspend

I have debian wheezy installed on my new laptop (Toshiba Satellite L70), with Kernel 3.14 from backports. After I resume from suspend, all function keys (`F1` - `F12`) behaviour is inverted, for example, instead of `Alt`+`F4` to close a window, I have to press `Alt`+`Fn`+`F4`. Function keys alone perform special operations (volume up/down, brightness, etc.).   A restart brings things back to normal.


How to make xargs ping and head output as expected?

Given an array of domains I would like to obtain their IP addresses, in the following format:               98.139.183.24     98.137.236.24      This script               #!/bin/bash     domains=(yahoo.com yahoo.ca)     printf "%s\0" "${domains[@]}" | xargs -0 -t -n 1  ping -c 1 -w 3 | grep -E 'PING.*' | sed -r 's:^.*\((([0-9]{1,3}\.){3}[0-9]{1,3})\).*$:\1:'      gives the expected output. But initially I tried: `printf "%s\0" "${domains[@]}" | xargs -0 -t -n 1 ping -c 1 -w 3 | head -n 1 | sed -r 's:^.*\\((([0-9]{1,3}\\.){3}[0-9]{1,3})\\).*$:\1:'` and the command exited with a signal 13 ( which,from what I understand, means broken pipe ?!?). Obviously the issue is with `head` . Now I would like to explore why it does not work and if and eventually how I could make this long “wiener” work with `head`. I have not tried it yet but I am pretty sure it would work using a `for` construct and using `head` for each `ping`. Using `xargs` with the `-P` option also does not work. I guess the main issue would be that `head` is fed `xargs` output as one continous file ( did I say right or is it “input” ?). EDIT1: My goal was to obtain the IP addresses of a set of website addresses and then check to what organisations are those IPs registered too by using`whois` and piping its output to `sed` and then maybe do some grouping so I have only unique names, no repetitions. I agree that `dig` or `host` are much more thorough than `ping` but I am fairly certain the websites are small enough that only one IP address will be found for each domain. Nevertheless I think now I will go with `dig` ( or `host`; I have not decided yet) as others suggested. To make it clear why I am interested in using `head` and not `grep` for what I need: I am just curious how it would be done(I am quite new to bash and linux in general) and I felt that it might clear up how piping works. That's all


Making less's follow option show line movement

I often find myself using less to display log files that contain hundreds of contiguous, identical lines that are appended to the files at set intervals. For example,               something happened     something happened     something happened     something happened     something happened     something happened     something happened     ... (100 identical lines later)     something happened     something happened      I use less's follow option to follow the log file, but once a certain number of identical lines have been printed, it is impossible to tell if the log file is still being written to. Using `tail` with the `-f` flag solves this problem by allowing me to put newlines in with its output, which float along with the text, showing the text's flow/movement.               $ tail -f a-terrible-log-file   |   (a few seconds later)     something happened              |   something happened           something happened              |   something happened           something happened              |   something happened           something happened              |   something happened           something happened              |        something happened              |   something happened           something happened              |   something happened           something happened              |   something happened           something happened              |   something happened           something happened              |   something happened           something happened<C-j>         |   something happened                                     |   something happened                             something happened              |   something happened           something happened              |   something happened           something happened              |   something happened           something happened              |   something happened            Is there a way to show line flow/movement in `less`?


Bizarre Disk Use Problem

I have an external hard drive on which I use `rsync` to backup my home directory. Today, I tried to `umount` the drive. It said it was busy. So, I used `fuser` to figure out who was using it:               /media/Panp9 Backups:           10198rce 10283rce 10284rce 10337rce 10338rce 10339rce 10341rce     10345rce 10348rce 10353rce 10354rce 10356rce 10362rce 10367rce     10371rce 10374rce 10378rce 10384rce 10387rce 10389rce 10396rce     10433rce 10436rce 10439rce 10441rce 10443rce 10447rce 10448rce     10457rce 10460rce 10466rce 10467rce 10473rce 10478rce 10487rce     10492rce 10504rce 10522rce 10538rce 10555rce 10560rce 10561rce     10562rce 10563rce 10564rce 10565rce 10566rce 10567rce 10720rce     10721rce 10722rce 10723rce 11083rce 11088rce 11090e 11094e      Most of these seem to be various bids of Nepomuk. So, I went ahead and issued a `fuser -c -k` in my frustration. Apparently, this command (without `sudo`, I should mention) managed to kill X11. I'm at a loss and can't figure out why this is happening. Can anyone help me? **System Details:**   * Intel i7, 4 cores    * 8 GB RAM    * Linux Mint Nadia 14 KDE


How does Linux md-RAID handle disk read errors?

There are 2 cases:   * the read command times out at kernel level (30 seconds by default),    * the drive reports its unability to read a given sector _before_ the kernel lose patience (the case I'm interested in).  ## Kernel timeout As drive access is usually going through the Linux SCSI layer, I think the timeout case is completely handled by this layer. According to this documentation, it tries the command several time after having reset the drive, then the bus, then the host, etc. If none of this works, the SCSI layer will offline the device. At this point, I think the md layer just "discovers" that one drive is gone, and mark it as missing (failed). **Is this correct?** ## Drive reported error Some drives can be configured to report a read error after a certain timeout is reached, thus aborting internal recovery attempts. This is called ERC (or TLER, CCTL). The disk timeout is usually configured to trigger _before_ the OS timeout (or hw RAID controller), so that the latter knows what really happened instead of just "waiting and aborting". My question is: **how does Linux (and md) handle drive-reported read errors?** Will it try again, do something clever, or just offline the drive without going through all attempts described in "Kernel timeout" above? Is md even aware when such a thing happens? Some people suggest that ERC is dangerous on Linux as it will not give enough time for the drive to try to recover. They also say that ZFS-raid is nice because if a read error occurs, it will compute the missing unreadable sector data thanks to RAID redundancy, and _overwrite_ it back on the drive. The latter should then stop trying to read the nasty sector, automatically mark it as bad (not to be used anymore), and remap it on a nice sane sector. **Is md also capable of doing this?**


Making less print to stdout if an entire file can be displayed on one screen

When `more` is passed a file whose contents can be displayed on one screen, it just writes the file's contents to stdout without pagination. If the file cannot fit on one screen, `more` paginates it. `less` has an option to quit if the file it is working with can be displayed on one screen (`-F`) and it has a `more`-emulation feature that behaves in a similar manner to the `-F` flag, but neither of these options seems to cause `less` to write the file's contents to stdout if the contents can fit on one screen. How can I get `less` to write a file's contents to stdout if the file's contents can fit on one screen and paginate the file as it normally would otherwise?


Cent OS 6.4 UEFI Dual boot

i'm really a beginner to Linux trying to study for RHCSA certification here. I have Windows 8 installed on UEFI BIOS. When i installed Cent OS, installation went smoothly and then after restarting, Windows booted normally like there's no Linux installed. I know it's something to do with UEFI, but i really cannot figure it out, i tried to boot from Hard drive instead of "OS.. something" inside the BIOS Boot Order, but i get blinking cursor nothing more. **NOTE** For partitions i've created two partition normally like i always do before using UEFI.. `ext4` drive for `/` and `swap` drive. Can anybody tell me how to dual boot while using UEFI ?


xfce: too high gnome-terminal after going out of maximize/full screen

I use debian (wheezy) with xfce 4.8. My laptop screen resolution is 1366x768. I use a script to open two gnome-terminals:               #!/bin/bash     gnome-terminal --geometry 74x51+0+0 --working-directory="/home/nuoritoveri/mag/repo/src" &     gnome-terminal --geometry 73x51+700+0 --working-directory="/home/nuoritoveri/mag/build" &      Together they take approximately whole space of the laptop screen, one window on the right and one on the left. If I maximise one of the windows (by clicking button on window bar) it gets maximised. When I click the 'unmaximise' button it does not return to previous size. It returns to previous width but is too high - it's too big to fit the screen. The same is happening if instead of maximising I use `F11` to get to fullscreen and go back. I wasn't able to reproduce this problem with gnome-terminal opened from menu and resized to the approximately the same size as the start size of the script-made windows. Is there a way to overcome this? What should I check first? I usually use this script to edit code on the right and compile on the left but sometimes I have to enlarge the window to see a long line in code (I don't use wrap in vim, it makes me go insane).


sed not working from sh file, but working from the command line

`sed` works from the command line, but does not work if put it in an `sh` file and execute it. I want to change a number in an existing file and direct it to a new file, so I tried this:               echo enter number      read num     var1='more ods2.sql | egrep -e "test" | cut -c 5-7'      sed "s/test$var1/test$num/g" ods2.sql > odstest.sql      If I execute these statements in a prompt they execute with the desired results. I replaced `$var1` with the string I passed, e.g `12345`:               sed "s/test$var1/test$num/g" ods2.sql > odstest.sql      This also works fine from a prompt:               more ods2.sql | egrep -e "test" | cut -c 5-7'      Why isn't it working if I put this in a shell script?


Compiz Window Picker plugin for XFCE4?

Is there a separate window picker software (like the one in Compiz or `Present Window` in KDE4) ? I'm running xfce4


Self hosted cloud storage

I'm looking for some software that would provide features like Dropbox. Will a simple webdav be enough for this use case?


using read inside if clause - bash

I have a script:               #!/bin/bash          if [[ read -t 10 -sp "Enter Password: " passwd ]]; then         echo -e "\nPassword: ${passwd}"     else         echo -e "\nInput timed out" >&2         exit 1     fi          exit 0      But it gives error:               ./script.sh: line 3: conditional binary operator expected     ./script.sh: line 3: syntax error near `-t'     ./script.sh: line 3: `if [[ read -t 10 -sp "Enter Password: " passwd ]]; then'      What is wrong with my code?


Confusion about low frame rate with Nvidia GeForge, but hardware rendering seems to work?

All over the years I have always wondered why my Compiz animations on Gnome 2 are not as smooth as on my old Laptop running with Intel GMA 965. Maybe this is related to low frame rates. When I run glxgears (I know, it's no benchmark test) I get only values about 300 frames in 5 seconds:               $ glxgears      Running synchronized to the vertical refresh.  The framerate should be     approximately the same as the monitor refresh rate.     302 frames in 5.0 seconds = 60.391 FPS     300 frames in 5.0 seconds = 59.919 FPS     300 frames in 5.0 seconds = 59.921 FPS     300 frames in 5.0 seconds = 59.921 FPS     300 frames in 5.0 seconds = 59.921 FPS      The text says that this frame rates are correct, but I can't believe that. This can't be normal, because I found forum entries with frame rates about 20000 or more. I think that my Nvidia GTS 250 can do this much better. Moreover Software Rendering is disabled, so that means that hardware rendering actually works:               $ glxinfo | grep render     direct rendering: Yes     OpenGL renderer string: GeForce GTS 250/PCIe/SSE2         GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,          GL_NV_path_rendering, GL_NV_pixel_data_range, GL_NV_point_sprite,          GL_NVX_conditional_render, GL_NVX_gpu_memory_info, GL_OES_depth24,          GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,       Can anybody explain to me why a frame rate of 300 should be normal or maybe anything else is not correct?


How to fairly share bandwidth between IPs with tc?

I have a linux router (d-link 320-nru) with tc installed. I have some users' computers to fairly share bandwidth between them. Also there is such complication as inconstant uplink bandwidth. How can I configure tc to meet all these requirements? Thanks in advance.


What does the following kernel message mean?

The following appears /var/log/messages, what that means ?                 Feb 19 22:51:20  kernel: [  187.819487] non-matching-uid symlink following attempted in sticky world-writable directory by sh (fsuid 1001 != 0)      It happens when a cron job was about to run.


Top says 100% CPU used, but 50% of cores idle?

top - 08:43:16 up 96 days, 22:16,  1 user,  load average: 4.03, 3.92, 3.98     Tasks: 199 total,   1 running, 198 sleeping,   0 stopped,   0 zombie     Cpu0  :  0.0%us,  0.5%sy, 50.0%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu1  :  0.0%us,  3.9%sy, 46.8%ni, 49.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu2  :  0.0%us,  3.0%sy, 47.5%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu3  :  0.0%us,  5.0%sy, 45.5%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st            PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      3593 foldinga  39  19  276m  80m 2972 S  402  1.0  12:55.42 FahCore_a3.exe      Now, how come top says it's using 100% of the CPU (400% / 4 cores) while exactly half of the processors are idle??               processor       : 3     vendor_id       : GenuineIntel     cpu family      : 6     model           : 30     model name      : Intel(R) Xeon(R) CPU           X3440  @ 2.53GHz     stepping        : 5     cpu MHz         : 2526.932     cache size      : 8192 KB     physical id     : 0     siblings        : 4     core id         : 3     cpu cores       : 4     apicid          : 6     initial apicid  : 6     fpu             : yes     fpu_exception   : yes     cpuid level     : 11     wp              : yes     flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid     bogomips        : 5054.02     clflush size    : 64     cache_alignment : 64     address sizes   : 36 bits physical, 48 bits virtual     power management:      * * * EDIT: In response to i_grok and Max Alginin, I made sure Hyperthreading was enabled on the server. Once I got it turned on, here are the results of top now. Notice, the same symptoms are evident.               top - 10:17:01 up 47 days, 10:28,  3 users,  load average: 7.93, 7.96, 8.02     Tasks: 150 total,   1 running, 149 sleeping,   0 stopped,   0 zombie     Cpu0  :  0.0%us,  2.8%sy, 42.0%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu1  :  0.0%us,  2.2%sy, 42.5%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu2  :  1.2%us,  3.7%sy, 95.1%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu3  :  0.0%us,  1.7%sy, 43.1%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu4  :  0.0%us,  1.1%sy, 43.6%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu5  :  0.0%us,  0.0%sy, 44.8%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu6  :  0.0%us,  2.2%sy, 42.5%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Cpu7  :  0.0%us,  1.7%sy, 43.1%ni, 55.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st     Mem:   8177700k total,  6258704k used,  1918996k free,    29248k buffers     Swap:        0k total,        0k used,        0k free,  5203172k cached            PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      8132 foldinga  39  19  557m  99m 3060 S  796  1.2   1510:53 FahCore_a3.exe


xmodmap configuration to emulate Mac special key layout?

On my Mac, I frequently type curly quotes manually. For example, a left curly double quote is Option-[. I would like to do the same on my Linux box. I run vanilla X11 (FVWM) with no GNOME, KDE, etc. Is there an xmodmap file out there that maps the curly quotes, and ideally all the rest of the Option and Shift-Option characters, to the same key combinations as Macs use?


Using regex inside if clause in bash

Look at this if block:               #!/bin/bash          str="m.m"     if [[ "${str}" =~ "m\.m" ]]; then         echo "matched"     else         echo "not matched"         exit 1     fi          exit 0      This should print "matched", but it doesn't. Where am I going wrong?


Crunchbang/Debian apt-preferences

So I did manage to set up apt-preferences but I'm not sure if I did it correctly. So basically what I want is, if I have the need I want to install packages from TESTING, UNSTABLE and DEB-MULTIMEDIA and that (ONLY) these Packages also get updates from the specific Repo. But as a "base" I want to have the STABLE-Version. Would be nice if somebody could check if I set this up correctly, because I'm not quite sure how the Pin-Priority works... so this i my sources.list               ## CRUNCHBANG     ## Compatible with Debian Wheezy, but use at your own risk.     deb http://packages.crunchbang.org/waldorf waldorf main     #deb-src http://packages.crunchbang.org/waldorf waldorf main          ## DEBIAN-STABLE     deb http://ftp.cz.debian.org/debian stable main contrib non-free     #deb-src http://http.debian.net/debian wheezy main contrib non-free          ## DEBIAN-BACKPORTS     deb http://http.debian.net/debian wheezy-backports main contrib non-free          ## DEBIAN-TESTING     deb http://ftp.cz.debian.org/debian testing main contrib non-free          ## DEBIAN-UNSTABLE     deb http://ftp.cz.debian.org/debian unstable main contrib non-free          ## DEBIAN MULTIMEDIA     #deb http://www.deb-multimedia.org wheezy main non-free          ## DEBIAN SECURITY     deb http://security.debian.org/ wheezy/updates main contrib     #deb-src http://security.debian.org/ wheezy/updates main      and my apt/preferences               Package: *     Pin: release a=waldorf     Pin-Priority: 1001          Package: *     Pin: release a=stable     Pin-Priority: 800          Package: *     Pin: release a=wheezy-backports     Pin-Priority: 650          Package: *     Pin: release a=testing     Pin-Priority: 400          Package: *     Pin: release a=unstable     Pin-Priority: 90          Package: *     Pin: origin *.deb-multimedia.org     Pin-Priority: 10


Triple Boot - Mac, Windows, Backtrack

This was the closest stackexchange site I could find to something of this nature. Currently, I own a Macbook Pro with a Bootcamp Partition (Win7), a Mac Partition (OS X Lion), and the Recovery Partition that comes with the aforementioned Lion. How do I go about creating a new partition with Backtrack on it?


Order of redirections

I don't quite understand how the computer reads this command. `cat file1 file2 1> file.txt 2>&1` If I understand, `2>&1` simply redirect Standard Error to Standard Output. By that logic, the command reads to me as follows:   1. concatenate files `file1` and `file2`.    2. send `stdout` from this operation to `file.txt`.   3. send `stderr` to `stdout`.   4. end? I'm not sure what the computer's doing. By my logic, the command should be `cat file1 fil2 2>&1 > file.txt` but this is not correct.


Determine which process is taking most of disk bandwidth?

When the HDD indicator is blinking (for a long period), how could I know which process is taking most disk bandwidth?


Apache : Close entire site to public but display a custom page

Suppose I do not want to delete any files or anything from my web site, but I want to close everything to the public. They simply need to see a custom page. How can one go about this via `httpd.conf` file? Perhaps something like:               Alias /* /a.txt


Rfkill refuses to unblock the WiFi device

Running `rfkill list` indicates the USB WiFi adapter is softblocked. I can run `rfkill unblock 0` with no error message, yet running `rfkill list` again indicates the device is still softblocked. ### Questions   * How can I unblock this device?   * Why is there no warning or error message reporting that it was unsuccessful?


Redirect VI command output to a file

I want to export the output of `vi` command `:set fileencoding` to another file. It seems `vi`'s file encoding detection is better than `file` command. How to do that? I could write a macro with:               :set fileencoding     :q      but this won't export the output.


Why no other distros/spins based on openSuSE?

So... I've been looking at 'returning' to openSuSE after a long absence (parted ways back in the 7.x/8x time frame). One thing that kind of jumped out at me all of a sudden was that for a relatively popular 'mainstream' distro that has been around for a _long_ time... I don't believe I've ever heard of or seen any forks, spins or any other kind of distro based off of SuSE. Any ideas as to why that might be?


Is it possible to have a seperate firefox profile for root?

There's a shared office PC that employees can use to surf / look up information on, etc. There are times when it would be convenient for me to use the same PC to check my email / log into secure sites. These are sites they should not have access to, for instance HR records of other employees. I have root access on the PC and they don't. Is there a way for me to do some quick work on the machine and ensure they won't see my saved passwords, etc.? For instance, run firefox as root instead of as the normal user? Or do I need to log into an entirely different profile?


Make mouse movements scroll when the middle button is held down

In Windows, I'm used to clicking the center button and it offering a "fast scroll" option up or down. How can I get this behavior on Linux? It currently seems to use the back button upon center click instead. I use Gnome under CentOS.


Why can an unpriviliged user execute the `sync` command?

Currently on Ubuntu Linux, but I noticed this on other OS's too. Apparently any user can execute the `sync` command, but why is this? I can only see the disadvantage: system slow down due to unnecessary disk writes. Why can every user execute `sync`?


Where are the CentOS 6.4 documents?

I'm only able to find up to version 5 on CentOS.com: http://www.centos.org/docs/ Even though CentOS 6 was released back in mid-2011..


sda and sdb block specials point to same device and get mixed up (hardware RAID doesn't work after new installation of 12.04)

I just installed the latest Ubuntu 12.04 and obviously it screws something up. I'm not sure if this has anything to do with the fact that I have a Raid 1 but at the moment, I have sda and sdb which point to the same device:               # blkid     /dev/sda1: UUID="88aa922a-4304-406e-8abd-edc2e9064d79" TYPE="ext2"      /dev/sda2: UUID="22b881d5-6f5c-484d-94e8-e231896fa91b" TYPE="swap"      /dev/sda3: UUID="e1fa161b-b014-4a6b-831a-9d8f9e04be07" TYPE="ext3"      /dev/sda5: UUID="6ed19886-1cba-47b2-9ce0-7c2ea8f9c3c9" SEC_TYPE="ext2" TYPE="ext3"      /dev/sdb1: UUID="88aa922a-4304-406e-8abd-edc2e9064d79" TYPE="ext2"      /dev/sdb2: UUID="22b881d5-6f5c-484d-94e8-e231896fa91b" TYPE="swap"      /dev/sdb3: UUID="e1fa161b-b014-4a6b-831a-9d8f9e04be07" SEC_TYPE="ext2" TYPE="ext3"      /dev/sdb5: UUID="6ed19886-1cba-47b2-9ce0-7c2ea8f9c3c9" TYPE="ext3"       But I have only one "visible" hard disc, so this ought to be sda. In my earlier version (10.10) /dev/mapper took care of it. Look at the mount points below. In the current version, this doesn't work anymore, so I entered sda mount points to fstab at first, which seemed to work, but when I execute the mount command, I saw that suddendly one partition was mounted as sdb instead of sda. So I tried to use the UUID as file system in fstab but the problem still exists. Which is even worse: It mixes up both devices. That means it sometimes mount one partition as sda, at next reboot it is suddendly sdb. And it behaves as it would mount different hard drives, because my /home partition was mounted once as sda, now as sdb and changes and setting I made in file system were suddenly "reset". What can I do? Should I delete all sdb block specials?               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     #/dev/mapper/pdc_ccfhbjbeeg3 /               ext3    errors=remount-ro 0       1     #/dev/mapper/pdc_ccfhbjbeeg1 /boot           ext2    defaults        0       2     #/dev/mapper/pdc_ccfhbjbeeg5 /home           ext3    defaults        0       2     #/dev/mapper/pdc_ccfhbjbeeg2 none            swap    sw              0       0     #/dev/sda1                   /boot           ext2    defaults        0       2     #/dev/sda2                   none            swap    sw              0       0     #/dev/sda3                   /               ext3    errors=remount-ro 0     1     #/dev/sda5                   /home           ext3    defaults        0       2          UUID=e1fa161b-b014-4a6b-831a-9d8f9e04be07      /               ext3    errors=remount-ro 0     1     UUID=88aa922a-4304-406e-8abd-edc2e9064d79       /boot           ext2    defaults        0       2     UUID=6ed19886-1cba-47b2-9ce0-7c2ea8f9c3c9      /home           ext3    defaults        0       2     UUID=22b881d5-6f5c-484d-94e8-e231896fa91b       none            swap    sw     0       0      UPDATE   by the way, the Ubuntu installer shows the RAID array and not the partitions. See also https://bugs.launchpad.net/ubuntu/+bug/973147


Blurred 70/100 DPI Xorg font packages with Webkit?

In web browsers using Webkit as their engine we have blurred and unclear font rendering issue in some pages such as Stackexchange, Github and some random other sites. The problem is the fonts come with Xorg 70/100 dpi fonts packages. In the case of Stackexchange and Github it is helveticam which come with `font- adobe-75dpi` and `font-adobe-100dpi`. Removing these packages may affect other part of system, so my question is:   * Is there any way to tell the system to load these fonts, without scaling them or not to load these font for webkit browsers?   * Does it help to solve the problem?


How to configure Kate to always use 2 spaces for tabulation?

By default Kate inserts 2 spaces on Tab press but switches to real tabs starting from the fourth Tab level. Can I disable this and use spaces always, regardless to the depth? I want this because I use Kate to code Scala, and using space pairs instead of tabs is a convention there.


How to write a script to execute files in multiple directories

How do I write a script to execute the files in multiple directories? The problem is this: I have many directories, and each has a data file to be read and analyzed by a python script (say, `a.py`). I don't want to "cd" to each of the directories and type "a.py". Outputs are saved in each directory.


How I should load file with setkey -f

I would like to load a text on Fedora. I use this command:               setkey -f "name"      but the file cannot be found. I have the file on my desktop.


Search ALL files with ack

How can I search **all** files (including binary) in the current directory with `ack` v2? I want to do the same as doing `ack 'foo' **`, but just with a flag, so it works if I want to search all files in a specific directory without appending `**`. * * * Difference between `ack 'foo'` and `ack 'foo' **`:               $ mkdir test && cd test     $ printf '\x00\x01foo1\x00' > test1     $ printf 'foo2' > test2     $ ack 'foo'     test2     1:foo2     $ ack 'foo' **     test1     1:foo1          test2     1:foo2


How do I extract a specific directory from a tarball? and strip a leading directory?

I want to extract a specific directory from the wordpress tarball. specifically `wp-includes` to `.`. It appears that the directory structure inside the tarball is `wordpress/wp-includes` but I just need`./wp-includes` once it's been extracted, no leading wordpress directory. How would I do this?


Why does the linux kernel use linux-libre code to get rid of binary blobs?

I ask this question because I'm curious as to whether there is some sort of performance advantage offered from the binary blobs that are in the Linux kernel. Since many of these blobs have been replaced with code in linux-libre, why has that same code not been incorporated into the Linux kernel at kernel.org?


add monitor to linux tty framebuffer

Whenever I use my laptop at my desk, I usually connect it to an external display on DP-1. To switch the window manager output to this display, I can just use xrandr --output DP-1 ... However, whenever I switch to another virtual tty (e.g. because I messed up again and X is frozen), the output is only shown on the laptop display (LVDS-1). This is quite annoying if the laptop is closed. If I reboot the laptop, both the LVDS-1 and VGA-1 output display the same framebuffer tty. My question: is there any way to achieve this behaviour without rebooting? By this I mean: is there an easy way to activate framebuffer output for the external display? I've searched this question on google, but all I seem to find is people suggesting me to use vbetool, which only allows to disable the front panel.


How do I permanently increase the font size in mrxvt?

The `Ctrl`+`=` hotkey increases the font size for the current session in mrxvt. What configuration option will increase the font size permanently?


How to list all the files used during Linux boot

I would like to get the list of files that are used during the process of Linux boot. We are developing the protected enterprise system based on the RHEL 6.4. The integrity of specified files will be checked by a special hardware. So the question is - how to get the list of these files (with resolved dependencies coming from different booting services and daemons).