Why is plymouth-log-viewer starting up?

I've been using Fedora 14 for about a month on my primary system (converted from Win2K). My secondary system was converted to Fedora 12 from Win2K, and was updated sequentially to Fedora 14 (using package-update both times). Recently, my primary system started showing an alert icon in the notification area immediately after login - a yellow triangle with an "!" in it. When I click on the triangle, I get a window titled "Boot Messages" with the following content:                       Welcome to Fedora      Starting udev:                                             [  OK  ]     Setting hostname gravastar.oakenhammer.org:                [  OK  ]     Setting up Logical Volume Management:   3 logical volume(s) in volume group "vg_gravastar" now active                                                                [  OK  ]     Checking filesystems     _Fedora-14-i686-: clean, 161569/1638400 files, 1511990/6553600 blocks     /dev/sda1: clean, 47/128016 files, 81952/512000 blocks     /dev/mapper/vg_gravastar-lv_home: clean, 55815/1646592 files, 1597690/6578176 blocks                                                                [  OK  ]     Remounting root filesystem in read-write mode:             [  OK  ]     Mounting local filesystems:                                [  OK  ]     Enabling /etc/fstab swaps:                                 [  OK  ]     Entering non-interactive startup     Starting monitoring for VG vg_gravastar:   3 logical volume(s) in volume group "vg_gravastar" monitored                                                                [  OK  ]     ip6tables: Applying firewall rules:                        [  OK  ]     iptables: Applying firewall rules:                         [  OK  ]     Starting portreserve:                                      [  OK  ]     Starting system logger:                                    [  OK  ]     Enabling p4-clockmod driver (passive cooling only):        [  OK  ]     Starting irqbalance:                                       [  OK  ]     Starting mdmonitor:                                        [  OK  ]     Starting system message bus:                               [  OK  ]     Setting network parameters...                              [  OK  ]     Starting NetworkManager daemon:                            [  OK  ]     Starting Avahi daemon...                                   [  OK  ]     Starting cups:                                             [  OK  ]     Starting HAL daemon:                                       [  OK  ]     Retrigger failed udev events                               [  OK  ]     Starting sshd:                                             [  OK  ]     Starting ntpd:                                             [  OK  ]     Starting sendmail:                                         [  OK  ]     Starting sm-client:                                        [  OK  ]     Starting abrt daemon:                                      [  OK  ]     Starting httpd:                                            [  OK  ]     Starting crond:                                            [  OK  ]     Starting atd:                                              [  OK  ]     Starting jexec services      This content corresponds exactly to the full content of `/var/log/boot.log`. Some poking around determined that this was the process `plymouth-log-viewer`, and that it is a graphical boot log viewer. I can understand this occurring if there's a boot problem. However, reviewing the content of the log does not seem to reveal any problems. Also, it's somewhat disconcerting that my only option once the viewer appears is to right-click the "!" and select "`Quit`". Can anyone provide any information on why this is happening, and how to stop it? This does not happen on my secondary system at all, and I cannot identify any significant discrepancies between the two systems. The only information that appears to indicate a potential cause is the following fragments from `/var/log/messages`: **UPDATE** The message content below also appears in the same log file on my secondary system, where `plymouth-log-viewer` is not triggered on login. Repeats several times:               Dec 18 19:18:51 gravastar NetworkManager[1069]: <error> [1292717931.616234] [nm-manager.c:1332] user_proxy_init(): could not init user settings proxy: (3) Could not get owner of name 'org.freedesktop.NetworkManagerUserSettings': no such name      Occurs once:               Dec 18 19:18:59 gravastar gdm-simple-greeter[1564]: Gtk-WARNING: gtkwidget.c:5691: widget not within a GtkWindow     Dec 18 19:19:00 gravastar gdm-simple-greeter[1564]: WARNING: Unable to load CK history: no seat-id found     Dec 18 19:19:09 gravastar gdm-simple-greeter[1564]: WARNING: Failed to send buffer      Occurs once:               Dec 18 19:19:44 gravastar dbus: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.60" (uid=500 pid=1815 comm="nautilus) interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply=0 destination=":1.18" (uid=0 pid=1461 comm="/usr/sbin/console-kit-daemon))      Thanks in advance!


Stuck on Fedora splash screen after OpenBox3/tint2 install

My system was bogged down by Gnome3 DE and so I made an install of OpenBox3 and tint2 on a Fedora 17 system yesterday. Both were working marvelously. After a system reboot this morning, my system is stuck on the Fedora splash screen and will go no further. I tried entering into command line and modifying my `~/.xinitrc` (which I had to create) through vim and then running `xinit` and `startx`, but both returned errors stating the X server failed to run. Are there any suggestions? I am somewhat new to the underpinnings of Linux, so this a bit more of a difficult puzzle to wade through.


remove lines that is newer than the given date in a file

I'm stuck on how I can go about deleting lines that are newer than given date. Here is a snippet of contents of a file. buildsave.txt               647919 2013/11/30     647946 2013/11/30     647955 2013/12/01     648266 2013/12/03     648267 2013/12/03     648674 2013/12/04      I would like to remove the lines that are newer than 2013/12/03 leaving only               647919 2013/11/30     647946 2013/11/30     647955 2013/12/01      How can this be done through bash?


Copy files to parent directory using relative pathnames

![This is the directory tree I'm working with](http://i.stack.imgur.com/2jCWF.png) If I'm in the current working directory of oxford. How would I copy `outline.doc`, and place it into the `sample_dir` directory using relative pathnames? I've tried               cp outline.doc ../outline.doc


A terminal that is always scrollable or forever like less?

I'm currently using #!Waldorf, but have used Manjaro, Mint, Ubunto, Fedora, etc. Is there a way to make my terminal always behave like it's passed to less but without the (END) "feature" that requires I quit before I type anymore text. What I'm looking for, is a terminal that always supports scrolling left,right, up and down with the keyboard... and "No, SHIFT+PgUp and SHIFT+PgDn are not the same thing". The command `less` allows for a "natural" scrolling as if I were viewing the terminal's output inside of a window. Clearly the ability to detect when output has exceeded the current viewport's width and height exist, does anyone know how to incorporate this into the terminal itself?


How to configure a shortcut to open a window accessed by right click on the systray icon?

The application I am referring to is Turpial and it is a Twitter client. The problem is to open the window I need to send twits, I have to right click on a systray icon and select an option. In the manual (`man turpial`), I can't find a command to open the 'send twit' window, just the timeline window. After I open the window and send a twit, the window closes. I would like configure a global shorcut to open this window and then send my twits. So, some possibles solutions that I need are: How do I discover the command in the application that opens the 'send twit' window (when the systray icon right click and option select) and then use it in a terminal? This is probably the better solution. How to open the 'send twit' window that can be accessed with just a right click (and option select) on the systray icon by the terminal? How can I enable a shortcut to open this window to send twits?


How do you connect to the internet in backtrack 5 R2

I have recently installed backtrack 5 r2 so it dual-boots alongside windows. However for some reason I'm finding it difficult to make a wired connection using wicd. I know that the connection itself works because it's fine on windows. I also don't have (never had) a static IP. What steps do I have to follow to setup a such connection?


Tools for Monitoring Steal Time (st)

We're running on a virtual "dedicated" server, which should, in theory, mean that we're the only guys on the server. In practice.... I'm thinking we might not be. ![enter image description here](http://i.stack.imgur.com/rMrVk.png) Notice that although it looks like we're killing our machine, "Steal time" is at 71% I'm taking statistics on load and I was disappointed that this stat didn't show up in my graphs. Are there any tools which monitor this which might be able to help? * * * Additional information: We're running 4 cores, model:               # grep "model name" /proc/cpuinfo | sort -u     model name  : Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz


How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)


Running two animations side-by-side using ImageMagick

I have two animations (.gif files) I want to run side-by-side. Can this be done with ImageMagick? Moreover, I want to start one of the gifs after thirty frames of the other have passed. Can this be done as well? Otherwise, I can manually insert thirty frames of blackness into one image, but it would be easier to automate this step with ImageMagick, because I will potentially be doing this many times.


Executing a program with various parameters (loop)

I have a program, `prog`, which takes an integer argument when I call it from the terminal, eg:               ./prog 10      I would like to execute `prog` with a range of values, e.g. `10, 20, 30, ...`. Is there a neat way to do it, besides using:               ./prog 10 ; ./prog 20 ; ./prog 30 ; ....


How to give variable to a KSH script with a CGI?

index.sh is in the cgi-bin directory:               #!/usr/bin/ksh          echo 'Content-type: text/html          <html><body>     <form action=FOO.KSH method=POST>     <input type=submit value=fgrep style=width:42px>     <input type=text name=name type=text autofocus size=60>     </input></form>     <br>'      FOO.KSH               #!/usr/bin/ksh          printf "Content-type: text/html\n\n";           echo $1     echo $QUERY_STRING     echo $(</dev/stdin)      **Q** : Why does the FOO.KSH gives an empty file if I send an "a" string in the index.sh's form?


File permissions of file when tranferring from Windows to Unix

When I am uploading a file from windows PC to Unix ,the permissions of file are `\--wxr----t` on unix machine , whereas umask is `0022` .I am not able to understand from where is the file getting permissions `\--wxr----t` ? Please help me understand.


Lightest Debian Linux Distribution : Console Only - StandAlone (not net install)

Please suggest to me the lightest Debian Linux release with console only (no GUI). Please don't suggest any net install like `netinst`. I need an ISO of that release which is capable to boot and install from. Later I'll install my own chosen GUI and applications for my needs from Debian/Ubuntu repositories.


How to enable tab completion of  wildcards in bash?

How can I enable tab completion in bash for a statement such as `vim db/migrate/*crea`? Essentially I am looking for tab completion to match the regular expression and present the options. How would one go about doing this? This questions relates to one I asked here


Why do Unix-like systems execute a new process when calling a new function?

Why do Unix-like systems execute a new process when calling a function rather than a dynamic library? Creating a new process is costly in terms of performance when compared to calling a dynamic library.


Is disabling barriers for ext4 safe on a laptop with battery?

The manual page says about the `barrier` option for ext4: > Write barriers enforce proper on-disk ordering of journal commits, making > volatile disk write caches safe to use, at some performance penalty. **If > your disks are battery-backed in one way or another** , disabling barriers > may safely improve performance. Does a laptop with a battery (and an SSD) count as having a battery-backed disk? So, is `barrier=0` for ext4 safe on a laptop?


How to disable autocompletion for sudo ...?

I am new to zsh and I like it a lot, especially with oh-my-zsh plugin. I installed oh-my-zsh with its default values and can't figure out how to turn off autocompletion for specific commands, that I often use, such as: `sudo mc` or `sudo gem update`. The thing is that I have .mc directory and .gem directory and zsh proposes corresponding autocompletions (for .mc and .gem). Generally I would like to config zsh so that `sudo` is not considered a separate command (which it is not) with the following as a params. Is there a config for that?


Gnome 3 notification doesn't appear While vlc is runnig

I am using Gnome3 on Fedora 15. One of the good features of Gnome3 is Notifications from empathy will appear while you are watching a movie in the movie player and you can reply without changing the focus. This is working with totem movie player, but not with VLC. Actually the notification will have the top Z-index but it fails to get the top position with VLC.


I was wondering how logical volume, logical disk, volume, partition, physical disk and filesystem are related and correspond to each other? I am confused about these concepts and would like to have some general idea and big picture.


How to check that AES-NI is supported by my CPU?

Howcan I check if my CPU supports the AES-NI instruction set under Linux/UNIX.


Excessive resource usage by Xorg

I'm using Debian (testing) on a laptop. I have installed the Nvidia drivers and I'm using an external monitor connected to my laptop. My desktop environment is Xfce4. My problem is that Xorg seems to consume too much of the system resources. If I scroll a web page, it takes about 30/40% of the CPU and the Nvidia card runs at the max frequency. Maybe I have some bad configurations, but I don't known how to check. What can I do? Thank.


How can I automate sending mail using a script?

I have in the past heard of using `nail` for this task, but I can't seem to find it for my distribution (Ubuntu 11.04) in any of the repositories. What program can I use to one-off emails from a shell like so:               send-mail -to me@email.com -file attachment.zip -message "Hello World"      Is there a program out there through which I can script mail sending as above?


Gentoo: Display stays black after inactivity (ThinkPad T60p, ATI FireGL)

I've freshly installed Gentoo on my ThinkPad T60p. The graphics card is an ATI FireGL v5200, so I configured the Kernel to use KMS with radeon selected and included R300_cp.bin as the firmware. (buildin) (1st Question - Is that correct?) Now, wenn I use my device, everything works like a charm. - But after some inactivity, the display turn black and whatever I try to do, I can't get it back on again. It doesn't suspend or anything. - If I execute the command "speaker-test", I hear some noices. What might be the problem here? - Why doesn't the display turns back on, after I've pressed some keys? PS: I'm not using X11/Xorg by now, just the textmode.


What does dead.letter files do

I find dead.letter files from time to time in my `$HOME` directory. What they are for?


How do rolling releases work?

In my understanding of linux distributions, you get notified of updates, then by a simple click or with a bunch of commands you can install them. These may be patches or minor version updates of software you installed previously. For example, the distribution may suggest to upgrade firefox version 23 to firefox version 24 (bad example this is not a minor release but you get the idea). After a few months, though, the system asks you to do an upgrade : you're updating the system itself, not the software packages you have installed. Why can't the system itself be updated the same way as other software packages, via small, continuous updates ? What solution do rolling releases use to solve this problem ?


Changing monospace fonts system-wide

By default, the monospace font for my distribution (Trisquel) is Font A. I would like to change it to font B. Some time ago, I managed to make a partial change to Font C, but I have since forgotten this method and cannot reproduce it. The trouble is that now I may see all three fonts in monospaced contexts. Using `gnome-tweak-tool` as both root and user, I have changed the "monospace" field to Font B. I have also done this via the command line on gsettings, again as both root and user. However:   * ~~If a web page requests the style`{font-family: monospace;}`, Font C displays.~~ Edit: this was a setting in Firefox, which I have changed.   * In the Inkscape and gedit font menus, there is a font called simply "Monospace", which is font A. My distribution's default UI fonts, which I have changed, also display in these menus under the names "Sans" and "Serif".   * When Thunderbird messages I have received are formatted as plain text, they are displayed in Font A. Unless explicitly changed, messages I write also display in the fonts "Sans" and "Monospace". How can I fix this situation, such that Font B displays in all contexts described above, and the mysterious "Sans" font is replaced by the UI font I am currently using?


Weird stuff going on in terminal and emacs since upgrade to Ubuntu 10.10

I can't really describe the slightly odd behaviour of my terminal window and occasionally also on emacs, but here's a picture of it happening: ![Weird stuff](http://i.stack.imgur.com/CVU4w.png) If I press CTRL+L, it disappears. What could cause this? It started happening once I upgraded to Ubuntu 10.10, so I expect something broke there. It's a zsh shell using xterm. The computer in question is an Acer Aspire Timeline 4810T.


Variable with multiple values in Bash

I am trying to create a variable with multiple values, and use it in a command that will execute these values one by one. Example:               value=(a, b, c, d, e)      By using `echo "$value"` I would like these values to be passed on to echo one by one. When I use `ARRAY=(a, b, c, d, e)`, they all get executed at once. Which I'm trying to avoid. Any ideas?


Parse expirydate from openssl command

Was about to ask how to check the date of SSL certificates automatically but then figured it out, so below you can find my answer too.


imagemagick display: different text in font preview

The awesome `display` command from imagemagick allows me to preview fonts:               display ~/.fonts/font.ttf      However, the text is always the same ('That which does not destroy me, only makes me stronger'). Is there a way to change the standard text?


Is it possible to have more than just one backup when editing text files?

`Gedit` and `medit` are two text editors that I know of that allow me to save a backup. So, if I create a file called `temp.txt` the next time I edit it and then save it, I'll have a backup called `temp.txt~`. My question is this: is there a text editor that allows me to have backups named in a serial fashion so that I can have more than just the one backup in case I want to go back to the file as it existed a few revisions ago? For example, I'd have `temp.txt` as the latest version and `temp.bak.1`, `temp.bak.2`, etc.? If that is not possible, is there some script that will automatically rename a backup each time it is created so that serial versions are retained? Even a `temp.timestamp.txt` would be great. (I don't mind a solution using `nano` as the text editor.) * * * I should clarify that I'm not a coder or programmer. I just want to have previous versions of text files that I edit. These text files maybe `.css` or `.rc` or `.svg` files that form part of a theme. So if I edit some aspect of a theme's file, I can go back a bit in case I don't like a change I made.


How to change the backgrounds in isolinux

I've been messing with this problem for a while now, and it seems like there isn't much documentation, or people who have asked about this before. I've been trying to change the back640x480.jpg, back800x600.jpg,and welcome.jpg file in isolinux, but when I make the iso and boot it, none of the pictures show up. its just black instead of the modified images. I also change them in the bootlogo CPIO archive, and then recompress it. How can I make these image show?


How to explicitly load shell interpreter in a C program

I want to create an **executable script** which is not **readable/writable** However since an interpreter needs to read this file it is not possible to do so directly. Therefore I wanted to know if I could explicitly load an interpreter into a C program along with my script. This would allow me to set the permission of the C program according to my needs.


Multiple video cards on Xorg on Debian 7.4

I have 2 video cards installed and configured xorg.conf to output onto both monitors with Option "Xinerama" "1" but rather than extending my display, it is simply cloning the displays. I'm using KDM as a display manager, which recognises that there are 2 monitors, but no matter what I do, it seems to only clone the displays Here is the server layout and flags from xorg.conf:               Section "ServerLayout"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection          Section "ServerFlags"         Option      "Xinerama" "1"      EndSection


Whonix no DHCP offer received

Hi I'm on the last step of setting up Whonix physical isolation and can't get the gateway to see the workstation. I'm confused because on the page linked below where it says 'Host Network' and 'NAT Recommended'. They both advise to replace the same file with different code? Anyways, the gateway will just tell me something like:               DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7     No DHCPOFFER received.      Any ideas on how to fix this? I'm using a wired connection. Site: https://www.whonix.org/wiki/Physical_Isolation


How to make a custom FreeBSD distribution

I have been struggling for several hours on how to find a coherient guide on how to create your own BSD distribution based off of FreeBSD. I have looked at the GitHub repositories for pfsense, but I don't understand how it works. My goal is to create a custom distro that comes with a desktop environment and other desktop utilities already setup, etc... (not interested in PCBSD or any other similar solution) I ran across the following article, but it does not tell you how to install custom ports and customize the ISO, rather just compile the existing source. This article is more in the direction I was aiming for, but it only sets up basic files and not ports. If I copy the binaries from ports, how will the system keep track of which programs need to be updated? Furthermore, the documentation on the FreeBSD website is of not much help, it still does not cover installing custom ports.


How to evaluate if it's worth using deduplication?

I have a partition where I am considering to use deduplication. For the profile of it's data I think it will be a good choice. Still, before doing it, I would like to evaluate the impact in a more systematic way than "feeling". Is there a tool that evaluates the impact of deduplication on a partition? (either file level or block level). For now I have ubuntu and ext4, but if deduplication proves to be valuable in this situation I am considering using opendedup or lessfs. Any other sugestion is welcome, even if that might mean using a different distribution / free *nix.


Can I reference a command before '&&' after '&&'

Not sure how else to phrase the question, but basically, I often find myself running a command like `vagrant` to bring up the VM, and then ssh into it like below:               vagrant up && vagrant ssh      Short of writing my own function or script, is there a way to "reuse" the `vagrant` portion in the second part of the command?


Double click Linux Bash Script and debug with pause commands

I'm fairly good with windows .bat scripts and normally use the pause command while developing them so I can see things step by step as the script runs in the command prompt. I am trying to do something similar with a Linux Bash file. I have a very simple bash, which can be seen below...               #!/bin/bash     echo Hello World!     read -p "Press [Enter] key to continue..."      I configured Nautilus (a Linux file management program) to "Run executables when they are double clicked" but I don't see anything when I double click the script. Do I need to re-route output to the console or something? **Edit** Here is how I achieved what I wanted...   1. Create a .sh file (I am using one from above)    2. Open Nautilus    3. Click Edit -> Preferences -> Behavior tab    4. Under "Executable Text Files" choose "Ask Each Time" Radio button Now when you click on .sh files, you will be prompted with a few options. Option "Run in Terminal" does exactly what I want. Thanks everyone for the contributions!


Log files for kernel panic on Arch Linux

I have recently updated my Arch Linux machine. Since then, I have been getting kernel panics here and there. (the screen freezes and the status lights on my keyboard are blinking) It seems to happen when I watch a YouTube video for around 10 minutes. I want to find out what is causing these kernel panics so that I may solve them. I can't seem to find any kind of log file with any kind of valuable information. `journalctl` gives no useful information and `dmesg` only shows information about the current running kernel. Most of the log files in /var/log/ are empty. I think this is normal since systemd handles logging and doesn't store the logs there. Where can I find more information about the kernel panics I'm getting? I don't need a full kernel dump, A stack trace or the name of the module/subsystem at fault should be enough.


How to setup port redirection after a ssh connection has been opened?

I'm using openssh on both client and server. I know I can run `ssh -L` or `ssh -R` to setup some port redirections over ssh. However, since they are command- line parameters, such redirections must be written before the connection is opened. **Can I setup port redirections on-the-fly using the command-line ssh client?** When I used the `PuTTY` ssh client, I could interactively setup a port redirection while a connection was already opened, without dropping nor reconnecting, thus I know it is technically possible.


Vi for Cygwin syntax

How can I make vi in Cygwin highlight the syntax when I open a file by default? I know that I can type in the command "syntax on" but I would prefer to not do this all the time.


xargs grep suggestion

grep -v "\<Swap" instruments.log | awk '{ idx=index($0, "MasterId="); masterId=substr($0, idx+length("MasterId=")+1); masterId=substr(masterId,1,index(masterId,"L")-3); print masterId; }' | xargs grep rel.log      I need to search each of that MasterId/output of `awk` in `rel.log` using `xargs` or something.   How can I do that?


How to configure Linux to cache file metadata in preference to contents?

I’d like to set the system up to use most RAM for file system metadata caching, but only a reasonably small amount for read/write caching and prefetching files. Ideally I would like to be able to browse the filesystem (as much as it fits in the RAM) without spinning up the disks until I actually open a file. Here are the details: I have a home-made file server. It’s got five disks in a LVM volume around 9TB, but only 4GB of RAM. Since the server doesn’t do much else then serve files, most of the RAM is used for caching. (“free” reports 3.4G out of 3.9G used for cache.) The server lives in my bedroom, and if all disks are spinning it makes enough noise to be annoying when it’s quiet. (I don’t mean seek noise, just spinning noise. The disks are of various makes and models, and I think slight differences in rotation speeds cause interference. No disk is noisy on its own, but if some of them are spinning together there’s a slight noise with a sub-Hertz period.) So I configured the server to spin down the disks most of the time. Of course, if the disks are spun down when I open a folder in my file manager, there’s a delay while whichever of the disks has that folder spins up. Just that is no big deal. But depending on where I look, it can happen several times in a row, if LVM happened to spread the metadata for each subfolder on the different disks. I suspect that Linux mostly fills its cache with file contents, and possibly prefetched data. The caching isn’t very useful beyond a few MB to ensure smooth playback; if I just watched a movie I probably won’t look at it again anytime soon. Prefetching, if it happens, is also completely useless _in my case_ , after more than a few MB. But one would think that 4GB should be plenty to be able to cache most file- system metadata, at least those parts that were already visited, so that I could browse the files without needing to spin up the disks if it turns out they’re sleeping. There would still be a delay when opening the file, but that’s OK. Compare “click; _wait_ ; click; _wait_ ; click; _wait_ ; play; watch” with “click; click; click; play; _wait_ ; watch”. The former is incredibly frustrating; the latter is almost expected. Notes:   1. Should it matter, the kernel is 3.2, the OS is Debian, the volume is lvm2, and the FS is ext4.   2. The only reason for the spin down is noise during the night; the server is otherwise running continuously. (I made it as low-power as reasonable.) The spin-down delay is varied depending on the time of day.   3. The hard disks are only for media. The OS is on a separate (small) flash drive. (Which means any spin-up delays comes from the data, not just because it needed something in `/usr` or whatever. I could spare a few GB on it if it would help with my problem somehow.   4. A reasonable impact on performance is not a big deal. The disks are faster than my network anyway.


Which edac module should I enable here?

I got a `Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz` CPU here , not sure which module should be enabled for EDAC: ![enter image description here](http://i.stack.imgur.com/85Pzr.png) Chipset: `Inter Coporation 6 Series/C2000` , driver in use: `i801_smbus`


Is it possible to get a character at terminal cursor using ANSI escape codes?

I know I can move the cursor with the escape codes, and I can also print at the cursor. What I'd like to know is if it is possible to pull the character under the cursor. I tried searching for such a code, but failed. So I assume it is not possible, but I'd like to ask if there is some way I failed to find.


Fedora 18 not working on an HP Dv7

I've recently installed Fedora 18 on my brand new HP Dv7 that comes with Windows 8 and secure boot. Before install Fedora I disabled secure boot in the BIOS. I've installed Fedora 18 and all is working well, but for some reason the laptop boots to the default bootloader (the HP one that sends you straight to Windows 8) instead of Grub. At boot, I can push F9 and I see   * OS Bootloader - This is the HP Bootloader for windows 8   * Fedora (Hitachi hard drive name) - This is the Grub bootloader   * Select an EFI File - In Grub, Fedora and Windows boot just fine, but I want the computer to boot to grub, instead of the HP bootloader, what should I do?


Bash: Float to Integer

Is this right way of doing float to integer in bash, Or is there any other method ?               flotToint() {         printf "%.0f\n" "$@"     }


Bash history number not starting at 1?

I was customizing my bash prompt (I'm on OS X 10.7) when I came across something strange. Within my prompt I included !, which should give me the history number. However the history number always starts out at 501, instead of 1. This is true even if I restart Terminal. I can't seem to find anything close to this, I was wondering if you guys could offer some insight.


Change to the last modified subdirectory of the current directory

I have an application which generates a couple of files in different directories at a regular interval and I need to check the latest files generated, i.e. the file which is generated in the most recent directory (created or updated). The name of the file remains the same in all directories, so I just want a simple script which will change the directory to the last modified subdirectory. [Update] By seeing most of the answers, I think I should clarify that the directory names are dynamic (depends upon some user input & timestamp), so I can assume a directory pattern like dir[1,2,3] or similar


Cleanup of temporary file ~/.cache/duplicity/temp failed

Often when I run Duplicity I see an error message like this at the end of the run:               Cleanup of temporary file /home/user/.cache/duplicity/9a169830d41477b2dbc3c5b32edd4e8a/duplicity-MEXhMY-tempdir/mktemp-StAkzj-1 failed      The mentioned directory will contain ten or so files that are deleted the next time I run Duplicity. Any idea why this sometimes fails when running incremental backups? I have not seen any pattern to it myself, and have had little luck in finding others mentioning the same issue. Some guy on some emailing list once mentioned that his locale caused problems for Duplicity. I tried changing from my normal Norwegian bokmål locale to en-US, but still see the issue. Is this just normal operation for Duplicity? Seeing it on three different systems: two Ubuntu 13.04 64-bit desktops and one Ubuntu Server 13.04 64-bit.


Security of an encrypted (dm-crypt & LUKS) Ubuntu 12.04 installed by somebody else?

Suppose I want an Ubuntu setup (let it be 12.04) with full disk encryption. Ubuntu offers this as an option during installation. Suppose also that I have somebody (e.g. my vendor) else set this up for me and that I only get the finished system including the predefined encryption password (and of course all other passwords). Is there any way that this person can _reliably_ retain access to the encrypted data on the device even when I change the encryption password (and possibly other passwords)? (Note that I'm not talking about normal backdoors like installing a SSH key or a root shell or patching some daemon to receive commands from outside. I am talking specifically about backdoors that target the full disk encryption and possibly cannot be closed without having to reinstall or re-encrypt the whole system.) For example, with TrueCrypt it is (or was) possible to save the first sectors of an encrypted harddisk, because it only uses the password to encrypt the master key (which is then used to encrypt the data) - and if you replace both password and encrypted master key by replacing those sectors after a password change, you can practically undo an encryption password change. Is something like this possible with dm-crypt/LUKS? If not, anything similar?


GNU Screen: you have neither usable sockets nor usable pipes

I am trying to build GNU screen on CentOS 6 Minimal and When I type the command `./configure` it gives me this error > you have neither usable sockets nor usable pipes -> no screen I tried to use `yum update` and `yum provide */stropts.h` Still gives me the same error when I type the command `make` it gives me that error > pty.c:38:26: error: sys/stropts.h: No such file or directory How should I solve it? Pleas don't answer use `yum install screen`


How to enable swap accounting for memory cgroup in Archlinux?

On my Archlinux box I want to limit some applications to a smaller amount of memory using cgroups. Since I use swap, I need to account memory+swap. How can I enable swap accounting?


Shell script to backup VMware VM's, exporting each VM to a list then asking user intput

What I'm Trying To Accomplish:   * Get list of Virtual Machines ".vmx" file and place in variables    * Give the user and choice of which VM to backup   * Use "ovftool" to produce an export of the chosen VM to a hardcoded location What I Have So Far:               #!/bin/bash          # MyVariables     #vmFolder=     #vmList=     #vmDestination="~/Desktop/"     vmTool="/Applications/VMware OVF Tool/ovftool"          # DatScript     for i in "/Users/$USER/Documents/Virtual Machines.localized/"* ; do        if [ -d "$i" ]; then          echo $(basename "$i")        fi     done      Still getting used to Bash and FWIW I'm writing this for OS X 10.8 but thought the Unix SE would be best.


How can I monitor a file that fully recreates during its run?

This is a follow-up question of > Why are some file changes not shown in tail -f? With the use of capital F: `tail -F` I can monitor the output of               tail -F ~/.mysql_history      from the manual:               --retry           keep trying to open a file even if it is inaccessible when  tail           starts  or if it becomes inaccessible later; useful when follow-           ing by name, i.e., with --follow=name          -f, --follow[={name|descriptor}]           output appended data as the file grows; -f, --follow, and --fol-           low=descriptor are equivalent          -F     same as --follow=name --retry      but then the whole file is added to the output each time it changes. Is there a way to tail the `.mysql_history` file correctly? I also tried               tail --follow=name ~/.mysql_history       but then I get the same behaviour and additionally this each time the history file changes:               tail: '.mysql_history' has been replaced; following end of new file      _(using`LC_ALL=C tail --follow=name ~/.mysql_history` to get the english errormessage)_ My **end goal** is to redirect the complete output of all changes in the mysql history into another file, but this is not satisfying:               tail -F ~/.mysql_history >> ~/.mysql_complete_history


ffmpeg webcam to device driver , output 8 bit grayscale

With the following command i'm trying to capture 10fps and send them the device driver. Now i want 8 bit gray raw frames (640x480= 307200 bytes per frame) to be send to the device driver. I can't figure out how to set the output with ffmpeg or the intput with v4l2 to this format.               ffmpeg -f v4l2 -r 25 -s 640x480 -i /dev/video0 -f rawvideo "/dev/devicedriver"      ffmpeg doesn't seem to support 8-bit gray output. And with v4l2 i can't figure out how to set it. It seems it doesn't recoginize V4L2_PIX_FMT_GREY.               v4l2-ctl --set-fmt-video-out=width=640,height=480,pixelformat=V4L2_PIX_FMT_GREY      I came up with a solution combining python, opencv and ffmpeg:               import cv     import sys     import os     import time     camera_index = 0      capture = cv.CaptureFromCAM(camera_index)     count = 0     def repeat():         global capture         global camera_index         global count         frame = cv.GetMat(cv.QueryFrame(capture))         framegray = cv.CreateMat(480, 640, cv.CV_8UC1)         cv.CvtColor(frame, framegray, cv.CV_BGR2GRAY)         sys.stdout.write(framegray.tostring())         c = cv.WaitKey(1)         if c == 27:             print count             sys.exit()          while True:         repeat()      and then pipe it to ffmpeg               python capturewebcam.py | ffmpeg -f rawvideo -pix_fmt gray -s 640x480 -i - -an -f rawvideo -r 10 "/dev/null"      But i think it really has to be possible with just ffmpeg and v4l2, and i can't figure out how. My head hurts from reading the documentation :p.


How can I print "-n" with `echo`?

I feel really stupid, yet I can't figure how to print the string "-n" with the over 30 years-old command `echo`. I tried these:               Michaels:Scripts$ echo -n     Michaels:Scripts$ echo "-n"     Michaels:Scripts$ echo -e "-n"     Michaels:Scripts$ echo -- -n     -- -n     Michaels:Script$ echo -- "-n"     -- -n     Michaels:Script$ echo "\-n"     \-n      I use Mac OS X ML. I consider this behaviour very weird and unexpected.


AR9485 Wireless Network Adapter with Linux

Lately I change my VivoBook 500ca for Linux. I installed the latest Mint Cinnamon. I have been having some problems with my wireless card :                  description: Wireless interface        product: AR9485 Wireless Network Adapter        vendor: Atheros Communications Inc.        physical id: 0      When I start my PC everything works perfectly for about 10 minutes and then I get disconnected from my wireless network. Any ideas why I keep getting disconnected?


vim regex to search for lines containing string1 AND string2

How in vim/vi can I search for all lines that contain string1 and string2, where either string can appear anywhere on the line separated by whitespace and possibly other words? I would also like to know how to do this using the less pager search (/).


Makefile idiom to install to the first available directory

I have a Makefile which, among other things, installs a Bash completion script:               install [...] /etc/bash_completion.d/      This works fine in Ubuntu, but in Arch Bash completions are installed to `/usr/share/bash-completion/completions`. What would be the **idiomatic GNU or POSIX`make` way** to handle this? I expect a nice solution would have something like these features:   1. If the `install` command fails, the target must fail.   2. Traverse the list of directories in sequence as written. At the first directory which already exists (if any):      1. Install the file if it does not exist,     2. overwrite the file if it exists and is not up to date (according to `make` semantics),     3. skip the file if it exists and is up to date, and     4. stop processing directories.   3. It is _not_ an error if the file is not installed anywhere.   4. It is _not_ an error (nor should the `Makefile` attempt to handle this case) if the file has already been installed in one directory, and subsequent runs installs it into another directory. That is, given a directory list `/a /b`, if someone     1. creates `/b`,     2. puts the file in `/b`,     3. then creates `/a` and     4. runs `make` the `Makefile` should _not_ detect the presence of `/b` at all.   5. It is _not_ an error if none of the directories exist.   6. Feedback about which directories were attempted would be nice, but not mandatory.


Docear on Kubuntu 12.04 64

I am running a 64bit version of Kubuntu 12.04 and I would like to run Docear (Some kind of research assistant) on it. The software is based on Java (which I had it installed) and has only a `.sh` file which based on their website you just need to double click it to run the software. Every time I double click I just seed the splash screen and then nothing! Is there anyway to resolve this issue? cause this software can severely ease my burden.


Install Cinnamon on Debian

Is it possible to install Cinnamon on Debian unstable? There is no packages for Debian on their official download page, and when i tried to add PPA to my repositories list, it won't install because of lacking dependencies. ### Edit (01.05.12) My actions. I downloaded the source, then ran `./configure` in the folder. I got that: `configure: error: Your intltool is too old. You need intltool 0.40 or later.` There were 2 packages, `intltool` (version 0.50.2) and `intltool-debian` (version 0.35.0), so i installed the first one. Then it complained that the following packages were not installed or were older than required. `dbus-glib-1 folks libmuffin gjs-internals-1.0 libgnome-menu-3.0 gconf-2.0 clutter-x11-1.0 libstartup-notification-1.0 gobject-introspection-1.0 libcanberra telepathy-glib telepathy-logger-0.2 polkit-agent-1 libnm-glib libnm-util gnome-keyring-1` Unfortunately i could not satisfy the versions and dependencies. Linux Mint claims that "Users can ... switch their sources to follow Testing, or even Unstable, directly to get more frequent updates", so i decided there should not be compatibility problems and just added `deb http://packages.linuxmint.com/ debian main upstream import` to my `/etc/apt/sources.list`. After that i installed Cinnamon from Linux Mint repositories and when i logged in, there was MATE (i think), not Cinnamon, loaded, with almost unreadable fonts and some other glitches. I decided it is easier to just install LMDE with proper apt repository priorities, than to install Cinnamon on Debian unstable. So i ultimately failed at my task, but marked one of the answers as correct.


How to install Aurora (Firefox) on Debian?

How to install the latest Firefox build (called Aurora) on Debian unstable? Are there any packages or repositories?


What are the strengths and weaknesses of different Unices

In a few points, what are the strength and weakness of your favourite Unix. Tell us the unique features that other implementations do not offer.


Running shell commands in .sh file results to error

I have two following linux shell commands:               echo 'CPU type and model'     cat /proc/cpuinfo | head -5 | tail -1      When i run these commands directly in Terminal, i get this result truly:               CPU type and model     model name  : Intel(R) Core(TM) i3 CPU       M 330  @ 2.13GHz      But when i save them into a `test.sh` file and run `sh test.sh`, i get this error:               CPU type and model     tail: option used in invalid context -- 1      I also try `bash test.sh` and get this:               CPU type and model     tail: option used in invalid context -- 1


What is causing a pause during the system device probe?

I am running FreeBSD 10.0-RELEASE. During the boot device probe there is a two-times 30 second pause. The output relevant to this is               # dmesg     ...     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     run_interrupt_driven_hooks: still waiting after 60 seconds for xpt_config     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     ...      I am quite new to this OS but does this mean the system is detecting a device but cannot figure out what it is? I have nothing but the bare essentials attached - hard drive and optical drive and is confirmed with:               # camcontrol devlist     <MATSHITA DVD-RAM UJ-841S 1.00>     at scbus0 target 0 lun 0 (pass0,cd0)     <HGST HTS7250xxxxxxxx GHB0xxxx>     at scbus1 target 0 lun 0 (pass1,ada0)      I tried some other commands to get some additional information:               # camcontrol rescan all     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     (aprobe0:ata0:0:1:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 00 00     (aprobe0:ata0:0:1:0): CAM status: Command timeout     (aprobe0:ata0:0:1:0): Error 5, Retry was blocked     Re-scan of bus 0 was successful     Re-scan of bus 1 was successful     Re-scan of bus 2 was successful     Re-scan of bus 3 was successful     Re-scan of bus 4 was successful      With `camcontrol rescan all` the system again pauses twice for 30 seconds before it rescans the buses. Even if I request to scan just a single bus the system insists on doing the 'aprobe0' scan first. Also, the "aprobe0..." lines are bold and bright white which someone told me means it is a kernel response. I would be happy if I could even just reduce the length of the pauses. I tried entering `kern.cam.ada.default_timeout=5` in `/boot/loader.conf` but it did not have any effect. I have searched long and hard without success and can't get much help. Anyone who knows better have any ideas? Thanks! Just to add, this is RELEASE-10. For a short while before this I was running RELEASE-8.3 which worked perfectly with no delays. The boot process took something like 15 seconds. But just as I was starting to learn on R8.3, it reached EOL, so I just decided to move up to R10. The ATA kernel modules for R10 are very different from those in R8.3. I have read about such changes but I don't know where to go from here.


I face this issue on some of Unix servers. When I open different session for same user, command history is shared by all the session. This creates issues if by mistake I press `Ctrl-P` or `up arrow` and just press Enter. On one occasion I end up running `rm -rf *` thankfully I was in directory where I don't have permissions to remove files. How to have separate command history for different sessions for the same user? Most of the time I am using ksh and tcsh shells.


Calculating memory and CPU utilization

I want to know how to calculate CPU and memory utilization of a process using the `/proc/stat` and `/proc/status` files. Can I calculate the total memory and CPU a user is using?


Tell wget not to spider URL matching a pattern?

I want to test how my site would be behave when being spidered. However, I want to exclude all URLs containing the word "page". I tried:               $ wget -r -R "*page*" --spider --no-check-certificate -w 1 http://mysite.com/      The `-R` flag is supposed to reject URL pattern containing the word "page". Except that it doesn't seem to work:               Spider mode enabled. Check if remote file exists.     --2014-06-10 12:34:56--  http://mysite.com/?sort=post&page=87729     Reusing existing connection to [mysite.com]:80.     HTTP request sent, awaiting response... 200 OK      How do I exclude spidering of such URL?


Control and up/down keys in terminal for use by emacs

Is it possible to use `C-up` and `C-down` when running emacs in the terminal window (when starting emacs from the command line with the `-nw` flag)? What should my terminal send when I press `C-up` and `C-down` for these keys to work in emacs? I'm on Mac OSX, using iterm2 to ssh into a remote linux server, where I start the emacs session from bash.


What is the equivalent of /usr/share/misc on Solaris?

The Linux Filesystem Hierarchy Standard has the following to say: > This directory contains miscellaneous architecture-independent files which > don't require a separate subdirectory under /usr/share. This leads me to ask, what is the equivalent to /usr/share/misc on Solaris? Is there none, would a directory with a single file do the best job?


Help updating OpenSSH to v6.6

My system is vulnerable to OpenSSH Wildcards on AcceptEnv Vulnerability, CVE-2014-2532. I have tried to update openssh to version 6.6 for centos but I can not get repository[sic] for that version. **/EDIT/** PCI-DSS compliance is a driving factor for this question.


Cannot install Snort 2.9.6.1 due to "Not a compatible architecture"

I have Centos 6.5 installed on a Dell Inspirion Intel chip. When I entered               uname -a      I got               Linux family.room 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 i686 i686 i386 GNU/Linux      I tried the following commands after downlowning the appropriate .rpm file.               sudo yum localinstall snort-2.9.6.1-1.f19.x86_64.rpm     sudo yum localinstall snort-2.9.6.1-1.centos6.x86_64.rpm     sudo yum localinstall snort-2.9.6.0-1.src.rpm      In every case, the response was               Loaded plugins: fastestmirror, refresh-packagekit, security     Setting up Local Package Process     Examining snort-2.9.6.1-1.f19.x86_64.rpm: 1:snort-2.9.6.1-1.x86_64     Cannot add package snort-2.9.6.1-1.f19.x86_64.rpm to transaction. Not a compatible architecture: x86_64     Nothing to do


Debian restarts itself after booting with a "not responding" error

I had a stable Debian 6 install until earlier today, when some keys on my USB keyboard stopped working and my USB mouse buttons started to behave strangely. I had not installed anything new since the last time I shutdown my computer. I ran `sudo reboot`, left to check on something else, then came back to see a screen like the following:               [nnnn.nn] not responding     [nnnn.nn] not responding      ... where the `n`s were numbers (I don't know if the decimal point was always placed at the same spot). After a few seconds, my computer restarted. This would happen every time after I got to the GRUB screen and selected Debian. Is there any way to fix this? Thanks.


df reports the space occupied in the partition, but there is no data

Pasting the output of `df -h` for the `/mtd_rwarea` partition:               $ df -h      Filesystem                Size      Used Available Use% Mounted on     /dev/mmcblk0p16         150.0M    138.5M     11.5M  92% /mtd_rwarea      But there is nothing in the directory. Directory `/mtd_rwarea` is empty. The output of `ls -la` from that partition:               ls -la     drwxr-xr-x    1 root     0                2 Jan  1 00:01 .     drwxrwxrwx   26 root     0              693 Aug 16  2012 ..      Could anyone please help in understanding what could be the reason here? Thanks!


Bonding two broadband connections to serve LAN as a gateway

I need to increase the connectivity and speed of the Internet to my LAN users. These are the things I have in my hand to do so.   1. PC with 3 NICs 1 for LAN and 2 for routers   2. 2 broadband connections with dynamic IPs connected to two routers. (one with 192.168.1.1 and one with 192.168.0.1)   3. CentOs 6.4 I need My Eth0 to serve my LAN users as below: Eth0 Ip: 192.168.100.250 and this should be their gateway and DNS to the Internet (Correct me if this wrong) I use each router's Lan IPs as gateways and DNSs as; Eth1 IP: 192.168.0.250, Gateway 192.168.0.1, DNS 192.168.0.1 Eth2 Ip: 192.168.1.250, Gateway 192.168.1.1, DNS 192.168.1.1 But how do I configure Bonding? Do I need to assign IP settings before the configuration of bonding? should I change LAN ip addresses of routers to one/same segmant/subnet as 192.168.1.1 and 192.168.1.2? If I config the bonding, what should be my Eth0 configuration? Leave it as it is? What is the most suitable bonding mode for a LAN more than 50 users?


Force command to be run on logout or disconnect?

I'm logging in to a system via SSH and I'd like to be able to force a command to be run on logout, whether that's an intentional logout (exiting the shell) or because my SSH connection has dropped/been terminated. Is there any way to set this up? My best guess right now is to change the login shell to a program that intercepts the signal sent on SSH closing (SIGHUP?) and executes the command then, but I'm wondering if there's a cleaner solution.


Text annotations and image additions to PDF file using free software

I'm mostly interested in annotating a PDF file with text at a predetermined position. GUIs and command line utilities are both Ok, but only free software solutions, please. However, I included image additions for completeness. There are two similar questions on Ask Ubuntu, but they are both a couple of years old. These are How can I add text and images (for example, a signature) to a PDF? and How can I edit a picture into an existing PDF file? I've tried Xournal, which does work. However, I think a little tutorial about how to do this would be good, so you want to add a small tutorial on how to use Xournal to accomplish these tasks, please add an answer. I also tried updf, which didn't work for me, though this answer and this one for example says it can. I rebuilt the package (which is pure Python) on Debian Wheezy, using the sources from the updf PPA. It seems quite primitive and the "Save As" dialog did not even have a save button. If other people have had different experiences, please post. For each answer, please provide a brief tutorial with screenshots if appropriate, as to how you accomplished this task.


DVD not mounted automatically in Linux Mint Debian Edition

I just installed LMDE on a brand new laptop. When I inserted a movie-dvd for the first time, it was loaded not causing any trouble. But since then, there seems to be no automatic mounting of dvds anymore. Mouting the dvd manually works fine and even when I open a video player - vlc for example - the dvd gets loaded after a short while. That wouldn't be too much of an issue for me, but since it's about a laptop of a friend of mine - who isn't too experienced when it comes to technical affairs - I'd better fix it for him. The output of `fdisk -l` looks alright too. I know that's only a small amount of information, but I don't really know what's of further interest for you in order to be able to spot the bug.


Asterisk, GSM-FXO gateway example of usage

Can anyone explain where to use GSM-FXO gateway. I understand where to use GSM-FXS - for example to connect analogue telephone to gsm gateway. But do we use GSM-FXO to connect to two telephone stations?


grub thinks ext4 is iso9660 filesystem

How do I fix this and install grub? When I use gparted I see /dev/sdb has one partition and it is ext4 however when I tried to install grub I got > #grub-install /dev/sdb   >  /usr/sbin/grub-setup: error: hd0 appears to contain a iso9660 filesystem > which isn't known to reserve space for DOS-style boot. Installing GRUB there > could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by > grub-setup (--skip-fs-probe disables this check, use at your own risk). I also see a mount point and 2 disk systems. One is appears to be my debian install the other appear to be a install disk. I can't seem to figure out whee on the filesytem the install disk is. There is clearly only one partition. I installed this by using VMWare and installing to usb rather then a disk in vmware. I have another usb that doesn't suffer the problem but I used a labtop instead


Uninstalling software packages, without removing the downloaded .deb in apt-cache?

Currently I am running Wheezy 32-bit, and recently I installed FreeSWITCH from the official repos. However, I realized that for the purpose I had in mind, I needed to rebuild FreeSWITCH myself, from source, which is somewhat newer than the binary release no. installed. Just to be sure that I can reinstall/reuse the FreeSWITCH binaries from official repos at a later date, without having to fetch the package .deb files again (which took quite a while on my slow connection) — I wanted to thus uninstall, while keeping the package files in apt cache. How can I achieve this ? Also, the FreeSWITCH package installation was done using a meta-package (i.e. “freeswitch-meta-vanilla”) which pulled in all the other FreeSWITCH package. Would I need to perform this uninstall differently ?


Get errors when aptitude update

I get the following errors when `aptitude update`. These errors are after non- error updates. What do I do to fix this, but not remove the ppas, etc?               Err http://ppa.launchpad.net  Packages       404  Not Found     Ign http://ppa.launchpad.net  Translation-en_CA     Ign http://ppa.launchpad.net  Translation-en     Fetched 520 kB in 2s (206 kB/s)     W: Failed to fetch http://ftp.ca.debian.org/debian/dists/wheezy/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://dl.google.com/linux/talkplugin/deb/dists/stable/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ftp.ca.debian.org/debian/dists/wheezy-updates/Release: Unable to find expected entry 'non-free/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ftp.ca.debian.org/debian/dists/wheezy-proposed-updates/Release: Unable to find expected entry 'non-free/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://packages.linuxmint.com/dists/debian/Release: Unable to find expected entry 'import/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://packages.crunchbang.org/waldorf/dists/waldorf/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu/dists/lucid/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ftp.debian.org/debian/dists/wheezy-backports/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://repository.violetsky.ch/steam/dists/wheezy/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://mozilla.debian.net/dists/wheezy-backports/Release: Unable to find expected entry 'iceweasel-release/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release: Unable to find expected entry 'non-free/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://http.debian.net/debian/dists/wheezy/Release: Unable to find expected entry 'main/binary-back/Packages' in Release file (Wrong sources.list entry or malformed file)     W: Failed to fetch http://ppa.launchpad.net///download.learnfree.eu/repository/skss/Packages: 404  Not Found     E: Some index files failed to download. They have been ignored, or old ones used instead.     E: Couldn't rebuild package cache          W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/main amd64 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_main_binary-amd64_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/contrib amd64 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_contrib_binary-amd64_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/non-free amd64 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_non-free_binary-amd64_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/main i386 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_main_binary-i386_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/contrib i386 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_contrib_binary-i386_Packages)     W: Duplicate sources.list entry http://http.debian.net/debian/ wheezy/non-free i386 Packages (/var/lib/apt/lists/http.debian.net_debian_dists_wheezy_non-free_binary-i386_Packages)     W: You may want to update the package lists to correct these missing files


acpid - Hibernate When Unplugged

I'm new to programming for Linux (lubuntu specifically) and I'm working on a project to get an old, discarded laptop up and running the way I want it. I have acpi and acpid installed, and when I run the acpi command, I]m informed of whether my laptop is plugged in (charging) or unplugged (discharging). I would now like to have the laptop automatically hibernate when the laptop is discharging. My first thought was to write a script that would poll acpi every 30 seconds or so and then run a hibernate command whenever it responded with the word "discharging". However, I understand that acpid is the better tool to use, as it is more event-driven. I can't seem to find any material on making a laptop hibernate when unplugged - any advice?


Can I bypass crontab command by putting the file?

I need to create and put my cron file with               cat cronfile1 cronfile2 > cronfile     crontab cronfile -u myuser      This works for me, but I want to know if I can do directly               cat cronfile1 cronfile2 > /var/spool/cron/crontabs/myuser      Of course I am root, and I'm doing this from busybox. Is it safe or am I doing something wrong and should use the crontab command instead?


Why would anyone not set 'histappend' in bash?

After finding out what this `shopt -s histappend` means, it seems a very sane setting, and I'm surprised that it isn't default. Of course I may be shortsighted, so why would anyone not use such a setting? Why would anyone want to wipe their history on each shell exit?


Get line numbers for empty lines

I have a large pipe-delimited file where I need to find the line number of all lines where a certain field is empty. I can use `cut -d \| -f 6 filename.txt` to output just that column. What is a utility/tool/command I can use to find what output lines from the above are empty?


Debugging system-related application errors in Linux

I am now faced with trying to debug some odd crashes for a commercial application, the dreaded SAS, and I am looking for some clues that might help to diagnose the issue. Of course I check the SAS runtime logs, and I also check /var/log/messages. Nothing in /var/log/messages, but the SAS runtime log seems to indicate a memory or disk space issue:               ERROR: Insufficient space in file WORK.'#tf0533'n.UTILITY.     ERROR: Insufficient space in file WORK.20110609_BCH.DATA.      There is **surely enough** disk space, so I am lead to believe it might be a memory issue. What other system logs or even tools can I use for looking for further information (such as writing to a full disk device, spikes in memory usage, swapfs errors, etc.)?


Need to upgrade svn on centos

I have an error when I run `svn up` > svn this client is too old to work with working copy...please get a newer > subversion client This is on centos. I need to update svn. How do I do this?               [user@somewhere cms]$ sudo yum install     subversion Loaded plugins:     fastestmirror Loading mirror speeds     from cached hostfile * addons:     mirror.chpc.utah.edu * base:     mirrors.usc.edu * extras:     mirror.chpc.utah.edu * updates:     centos.mirror.facebook.net Setting up     Install Process Package     subversion-1.4.2-4.el5_3.1.i386     already installed and latest version     Nothing to do      `yum update` does the same thing. Additionally, only one directory is supposedly affected, but deleting this from the repository doesn't fix the issue.


How can I give a very stripped down login for viewing logs?

I have various log files in folders on an RHEL 5 system:               /var/log/syslog-ng/A/     /var/log/syslog-ng/B/     /var/log/syslog-ng/C/      I would like to be able to give certain users the rights to view/tail (but not modify/delete) all files inside the folders `B` and `C` (and subdirectories) but not to view the contents of folder `A` nor the `/var/log/syslog-ng` folder itself. What I can imagine is a cut down shell with the only commands being `tail`, `cd`, `grep` and `vi`, with `cd` only able to navigate into the `B` and `C` folders. A single user/password shared between the people who would be using this information is fine. How would you recommend achieving this? Is it even possible? (we currently achieve this with a bash script made available through Apache HTTPD, with the Apache configuration requiring a password if the path being navigated passes above the B or C folders. The script is clunky and hacky to say the least, and doesn't provide any form of live updating apart from a meta-refresh on the generated HTML page - making use of ssh and tail would be a much better user experience, and be less prone to errors)


How can I add a certificate to Mercurial?

I use Arch Linux, when I want to clone a project from bitbucket with mercurial I get this error:               warning: bitbucket.org certificate with fingerprint 24:...:3b         not verified (check hostfingerprints or web.cacerts config setting)     searching for changes        * how can I fix this?    * how can I add this certificate to my shell?   * is there a pack of certificate to install? like the default certificate bundle that comes with Firefox?


Bring up all terminal windows to front of screen?

I usually have 2-3 terminals open when programming on Fedora, but I find it quite tedious having to click and manually bring every terminal to the front screen when I compile and run. Are there any hotkeys / tools that will bring all terminals to the front of the screen?


How do I remap my caps lock key to ctrl+x within x.org?

I've seen some `setxkbmap` stuff when talking about key mappings, but `ctrl`-`c` isn't a single key. Ideally, I would love to make it a copy/paste key but that seems impossible on Linux. Is there a way on Gentoo/Arch Linux to remap the caps lock key into:   * caps lock on = copy   * caps lock off = paste or just a "hitting the caps lock = ctrl+c" mapping?


Defragment a USB flash drive on Mac OS X

I frequently create bootable flash drives and many a time large files need to be defragmented in order to boot. On Windows I'd used Contig/WinContig, but I must use OS X for the same purpose now. Are there any free tools for defragmenting external drives for Mac or something more specifically for defraging single files?


domain 'ubuntu-hvm' does not exists, xen + ubuntu, hvm guest os installation problem

I am following the installation/setup instructions at https://help.ubuntu.com/community/XenProposed to install ubuntu + xen. I was able to install a PV guest OS. However, when I got to the HVM guest OS part, I keep getting the statement:               error: domain 'ubuntu-hvm' does not exist      This error shows when I execute the following command:               sudo xm create /etc/xen/ubuntu-hvm.cfg      My `ubuntu-hvm.cfg` looks like the following:               builder = "hvm"     name = "ubuntu-hvm"     memory = "512"     vcpus = 1     vif = ['']     disk = ['phy:/dev/xenvg/ubuntu-hvm,hda,w','file:/home/jwayne/ubuntu-12.04-desktop-amd64.iso,hdc:cdrom,r']     vnc = 1     boot="dc"      I did some internet searches, and some site the `dhcp = 'dhcp'` line in the configuration file as the problem (which I do not have). I've also seen some variations of the configuration file where they set:               kernel = "/usr/lib/xen-4.1/boot/hvmloader"      which doesn't resolve the error message for me. The way I create a logical volume is as follows:               sudo lvcreate -L 4G -n ubuntu-hvm /dev/xenvg      The logs at /var/log/xen/qemu-dm-ubuntu-hvm.log looks like the following.               Using file /dev/xenvg/ubuntu-hvm in read-write mode     Using file /home/jwayne/ubuntu-12.04-desktop-amd64.iso in read-only mode     Watching /local/domain/0/device-model/3/lodirty/cmd     Watching /local/domain/0/device-model/3/command     Watching /local/domain/3/cpu     qemu_map_cache_init nr_buckets = 10000 size 4194304     shared page at pfn feffd     buffered io page at pfn feffb     Guest uuid = d56fc9dd-0a2e-a797-8ebe-c4f0d7a4fae8     Time offset set 0     populating video RAM at ff000000     mapping video RAM at ff000000     Register xen platform.     Done register platform.     platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state.     xs_read(/local/domain/0/device-model/3/xen_extended_power_mgmt): read error     Could not read keymap file: '/usr/share/qemu/keymaps/en-us'      How can I fix this problem?


Nautilus Actions embedded not working right

I installed Nautilus Actions from Community (nautilus-actions) and the Nautilus Terminal from Community (nautilus-terminal). I can see the terminal (screenshot http://screencloud.net/v/EknY) and I made a simple Nautilus Action to use Filebot (another screenshot http://screencloud.net/v/ohJf) so as you can see from the second screenshot I chose Embedded which should run the command inside the nautilus-terminal but it doesn't. It always launches a new gnome-terminal. Versions   Nautilus: GNOME nautilus 3.12.2   Nautilus Actions: nautilus-actions-config-tool (Nautilus-Actions) v 3.2.3


How do find the LDAP connection details that the Solaris box uses to authenticate users?

The Solaris box is configured to use LDAP and has no local user accounts. This is the output of the `nsswitch.conf` file:               bash-3.2$ less /etc/nsswitch.conf     passwd:     files [NOTFOUND=continue] ldap     group:      files ldap     hosts:      files dns     ipnodes:    files     networks:   files     protocols:  files     rpc:        files     ethers:     files     netmasks:   files     bootparams: files     publickey:  files     automount:  files ldap     netgroup:   ldap     aliases:    files     services:   files     sendmailvars:   files     printers:   user files ldap     auth_attr:  files     prof_attr:  files     project:    files     sudoers:    ldap      So Solaris will look-up users and groups in the LDAP. But where exactly are the LDAP service/server details configured? * * * Note that I am new to working with *nix so any additional references would be very helpful. References:   1. /etc/nsswitch.conf


Eclipse not executable

I have just downloaded the Android SDK for Linux. I am running OpenSuse 12.3. When I try to run Eclipse, there is an error that says that there is no program to run executable files. So, I use the following ways to make the Eclipse program executable.   1. Right click on the program and open the 'Properties' option to check the 'Allow executing file as program' checkbox. But as soon as I check the box, it gets unchecked and I am not able to run Eclipse.   2. I tried using the `chmod +x` command but there was no change. As requested here is the output of the `file eclipse` and `ldd eclipse` command.               gursheel@linux-vfsr$ file eclipse     eclipse: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped     gursheel@linux-vfsr$ ./eclipse     bash: ./eclipse: Permission denied     gursheel@linux-vfsr$ ldd eclipse     ldd: warning: you do not have execution permission for `./eclipse'     /usr/bin/ldd: line 124: ./eclipse: Permission denied     gursheel@linux-vfsr$ chmod +x eclipse     gursheel@linux-vfsr$ ldd eclipse     ldd: warning: you do not have execution permission for `./eclipse'     /usr/bin/ldd: line 124: ./eclipse: Permission denied      Here is the entry in `/etc/fsatb`               /dev/disk/by-id/ata-HITACHI_HTS725032A9A364_100712PCK304VKKKRWMJ-part7 swap                 swap       defaults              0 0     /dev/disk/by-id/ata-HITACHI_HTS725032A9A364_100712PCK304VKKKRWMJ-part8 /                    ext4       acl,user_xattr        1 1     /dev/disk/by-id/ata-HITACHI_HTS725032A9A364_100712PCK304VKKKRWMJ-part9 /home                ext4       acl,user_xattr        1 2     proc                 /proc                proc       defaults              0 0     sysfs                /sys                 sysfs      noauto                0 0     debugfs              /sys/kernel/debug    debugfs    noauto                0 0     usbfs                /proc/bus/usb        usbfs      noauto                0 0     devpts               /dev/pts             devpts     mode=0620,gid=5       0 0      and `/proc/mounts` **Statics** is the name of the drive that has the adt folder with eclipse in it.               /dev/sda3 /run/media/gursheel/Statics fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0     /dev/sda3 /var/run/media/gursheel/Statics fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0      How do I make Eclipse executable?


Removing lines that are common to the outputs produced by two commands

Say, I have two commands that return some text. For example:               $ ./c1     /usr/bin/foo     /usr/bin/bar     /usr/bin/baz     $ ./c2     /usr/bin/foo     /usr/bin/qux     /usr/bin/buzz     /usr/bin/bar      I want to remove the duplicate lines; i.e. the output will be (order isn't important):               /usr/bin/baz     /usr/bin/qux     /usr/bin/buzz      How would I go about doing this?


mount tmpfs preserve current permissions

I have a directory of a web application cache and this has the permissions 755 (default), and I configured setfacl additional permissions. the problem is that when I restart the system, the information is always lost permissions. As I can preserve them? ### `/etc/fstab`               none /home/rkmax/myapp/cache tmpfs defaults 0 0      ### `setfacl` command               -R -m rkmax:rwx -m appuser:rwx /home/rkmax/myapp/cache     -dR -m rkmax:rwx -m appuser:rwx /home/rkmax/myapp/cache


Ubuntu 13.04 does not recognize USB drive

Using Ubuntu 13.04 (with Gnome 3), my new USB stick (details see dmesg/lsusb) doesn't show up automatically. Situation:   * The drive does not show up at `fdisk -l`   * The drive does appear when running `lsusb`   * The drive is correctly recognized by a Windows 8 Machine After waiting some minutes and watching the `reset high-speed USB device number 4 using ehci-pci` messages in my dmesg, I decided to pull out my stick, which resulted in a disk read failure. ### dmesg               Aug 27 19:44:48 nbuntu kernel: [  257.189068] sd 9:0:0:0: [sdc] Attached      SCSI removable disk     Aug 27 19:44:55 nbuntu kernel: [  264.349591] usb 3-2: new high-speed USB device number 4 using ehci-pci     Aug 27 19:44:55 nbuntu kernel: [  264.797502] usb 3-2: New USB device found, idVendor=0951, idProduct=162b     Aug 27 19:44:55 nbuntu kernel: [  264.797505] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3     Aug 27 19:44:55 nbuntu kernel: [  264.797507] usb 3-2: Product: DT HyperX 3.0     Aug 27 19:44:55 nbuntu kernel: [  264.797508] usb 3-2: Manufacturer: Kingston     Aug 27 19:44:55 nbuntu kernel: [  264.797510] usb 3-2: SerialNumber: 20CF30E118F8BD6180000356     Aug 27 19:44:55 nbuntu kernel: [  264.797883] scsi10 : usb-storage 3-2:1.0     Aug 27 19:44:56 nbuntu kernel: [  265.794211] scsi 10:0:0:0: Direct-Access     Kingston DT HyperX 3.0    PMAP PQ: 0 ANSI: 6     Aug 27 19:44:56 nbuntu kernel: [  265.794905] sd 10:0:0:0: Attached scsi generic sg3 type 0     Aug 27 19:44:56 nbuntu kernel: [  265.795986] sd 10:0:0:0: [sdc] 123469824 512-byte logical blocks: (63.2 GB/58.8 GiB)     Aug 27 19:44:56 nbuntu kernel: [  265.796576] sd 10:0:0:0: [sdc] Write Protect is off     Aug 27 19:44:56 nbuntu kernel: [  265.796580] sd 10:0:0:0: [sdc] Mode Sense: 45 00 00 00     Aug 27 19:44:56 nbuntu kernel: [  265.797200] sd 10:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA     Aug 27 19:45:27 nbuntu kernel: [  296.403451] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:45:58 nbuntu kernel: [  327.264520] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:46:29 nbuntu kernel: [  358.221324] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:47:00 nbuntu kernel: [  389.178831] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:47:31 nbuntu kernel: [  420.087249] usb 3-2: reset high-speed USB device number 4 using ehci-pci     Aug 27 19:47:50 nbuntu kernel: [  438.752891] usb 3-2: USB disconnect, device number 4     Aug 27 19:47:50 nbuntu kernel: [  438.766483] ldm_validate_partition_table(): Disk read failed.     Aug 27 19:47:50 nbuntu kernel: [  438.766494] Dev sdc: unable to read RDB block 0     Aug 27 19:47:50 nbuntu kernel: [  438.766507]  sdc: unable to read partition table      ### lsusb               Bus 003 Device 004: ID 0951:162b Kingston Technology      Bus 004 Device 002: ID 046d:c526 Logitech, Inc. Nano Receiver     Bus 005 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub      Someone on the sellers homepage also stated he can't use the stick with Linux, Android, his TV and his Blu-Ray Player. Can somebody give me a hint what the problem could be?


Backing up a large file

I have a test running which crashes. I need to find out how far it reached before crashing. It will restart again after crashing and wipe the log file. This wiping takes 10 minutes though. So If I'm saving the log file every 9 minutes, I should be able to get the log file. The problem is that how do I write a bash script to copy a log file to a specific location and overwrite an existing file (if any) only if the file being copied is larger than the file at the destination. Else I want to leave it alone.                25       if [ -f $testFile ]; then      26         COUNT=`cat $testFile|wc -l`      27                 if [ $COUNT -gt 0 ];then      28                     ARGS=`head -1 $testFile`      29                     echo "Executing test for ARGS"      30                     sed -i '1d' $testFile      31                     cd /testCode; sleep 600      At this point, the code sleeps for 10 minutes, as mentioned                32                     /testCode/startTest.sh $ARGS      This starts the test which removes the log file. If the test did not crash, then when the test is done it goes to the next command. Else it starts again from the top                33                     `wall "System is going down for reboot in 600 seconds. Please save your work"`      34                     sleep 600      35                     /sbin/reboot &      36                     exit 0      37                 fi      38 fi      ### UPDATE #1 I figured out a way. So when the test starts, I save the logs from the previous run. Then I have enough time to check the logs while the test has restarted. The test usually crashes after an hour or so with segfaults. That gives me ample time to check the logs. It is not a really clean way, but it will work. @Alexandre Alves also gave a good answer. That can work too. @Slm gave a good answer, but unfortunately that will not work in large tests like mine since that will clutter up the log file. Also my issue is saving the log file, not logging per se.


Letting an OVZ container use the hosts ip

I have a server over at OVH and it has Proxmox installed on it. I've created a container but I want to host a server in there and I want it to use the host's external IP. How can I do this? I hope I don't have to get a second IP for this. Both the host and containers have Debian.


Xmonad and X Window System

I installed _X Window System_ (xinit) and `xmonad` only, without installing a desktop environment. The problem is that the configuration file `~/.xmonad/xmonad.hs` does not apply after starting. I usually execute the `startx` command after logging in and then `xmonad` is already running and ignores my `xmonad.hs`. I changed the permissions to 777 for all files under the `~/.xmonad` directory. How would you fix this?


Running Custom commands in a Terminal Application

I'm running a terminal application in `/dev/pts/X` terminal that has its own console as:        ![enter image description here](http://i.stack.imgur.com/8QeZV.png) What I need is to run commands specific to this application but from another terminal. Using `ttyecho` does not work as it interacts with the shell not with the application running on the shell.


Is there a good way to encrypt and store a mailbox while still being able to quickly access and search it?

I am wondering if it is possible to :   1. Store a mailbox in a way that the system administrator (ie: root) cannot see it   2. User(s) with the valid credentials would be able to see it AND be able to search quickly in it, preferably via http access I know that I can:   * Encrypt on the partition level, but it won't disallow the system administrator from seeing files in it.   * Encrypt emails with the GPG system, but I don't if and how I could apply it to an entire mailbox (ie: past and future emails in this mailbox).   * Give access to a mailbox via an open source webmail like roundcube, but I don't know if and how he would be able to access an encrypted mailbox Do you know if this is possible?


Why do SELinux policies require a system restart?

When changing SELinux policies, I've been reading that you're required to restart the system. What changes would require this? Are there certain policy changes that would not require a restart?


Check multiple directory properties

I'd like to make this test as fast as possible: (`Bash`)               if [[ -d $directory_path && -r $directory_path && -x $directory_path ]]


mounting by default at startup with /etc/fstab doesn't work

I'm trying since a few hours to mount a partition (md0) automatically with the server start. The Content of my /etc/fstab:               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     # / was on /dev/sdd1 during installation     UUID=369adef0-c8d7-4a35-9fcf-6e8cb6dc2546 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sdd5 during installation     UUID=ed608f40-8f2f-4f57-8488-8981cc602010 none            swap    sw              0       0     /dev/sde1       /media/usb0     auto    rw,user,noauto  0       0     /dev/md0        /mnt/RAID       ext4    rw,user,noauto  0       0      But it doesn't work. Then I mount it manually via `mount -t ext4 /dev/md0 /mnt/RAID`, what works well. But it's very annoying to mount it manually every time the server has rebooted. Is there a way to have this done automatically? * * * As it is easily confused: this is about **mounting by default at startup** of the system, but **not about automount**. The difference is that automounting mounts the filesystem automatically on access of actual files - physical read and writes - and usually unmounts when not in use.


Make FreeRDP prompt user for username and password?

At the moment, I'm using the following command to start an FreeRDP session:               $ sudo xfreerdp /v:farm.company.com /d:company.com \         /u:oshiro /p:oshiro_password /g:rds.company.com      Works fine. However, I don't want the password to be in the command line like that. So I tried it without the password:               $ sudo xfreerdp /v:farm.company.com /d:company.com /u:oshiro /g:rds.company.com      And I got a connection failure message instead of some sort of dialog box or prompt asking me to enter in a password. Is it possible to get this to prompt the user for a password? * * * **UPDATE: Omitting the`/p` switch** Without the `/p` switch, I get the following:               oshiro@ubuntu:~$ xfreerdp /v:farm.company.com /d:company.com -u:oshiro /g:rds.company.com     connected to rds.company.com:443     connected to rds.company.com:443     Could not open SAM file!     Could not open SAM file!     Could not open SAM file!     Could not open SAM file!     rts_connect error! Status Code: 401     HTTP/1.1 401 Unauthorized     Content-Type: text/plain     Server: Microsoft-IIS/7.5     WWW-Authenticate: Negotiate     WWW-Authenticate: NTLM     WWW-Authenticate: Basic realm="rds.company.com"     X-Powered-By: ASP.NET     Date: Sun, 23 Mar 2014 10:40:30 GMT +12     Content-Length: 13          rts_connect error!     rpc_connect failed!     Error: protocol security negotiation or connection failure


Set default font size in Emacs 23.4?

I use the following in my .emacs to set my default font to Ubuntu Mono:               (set-face-attribute 'default nil :font "Ubuntu Mono")      However, the defauly font size is too tiny for me. In my menubar I see Options->Set Default Font..., but the changes I make there does not propogate to my next session. Should I be setting something in .emacs to set default font size? (I like it to be 24) Thanks!


Which file system to choose for small sized files?

I have a partition and it has ~100 GB of audio files. Most of them are mp3 or ogg, each has size of ~15 MB. I update it on a weekly basis. Right now, the partition is formatted as `ext4`. I have read that `reiserfs` might perform better with small sized files. Would I gain anything from `reiserfs` in my case? Or do you suggest another FS for me?


How do I prevent tmux from wrapping around when searching?

When I am in edit mode in a tmux pane and I do a search, once it reaches the end, it goes back to the beginning. Is there any setting to prevent this?


Is there a way to monitor the temperature of CPU using lm_sensors?

I can successfully detect the temperatures of sensors using the sensors command. But is there a way or a tool so that I can dynamically monitor the temperatures of sensors conveniently?


Problem Installing .ttf with FontConfig, in userdir for user account, running RHEL

I'm trying to install TTF fonts, for a normal user account, on my RHEL5.4 box The steps I followed are :               $ cd ~     $ mkdir .fonts     $ cd .fonts     $ wget -q http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf     $ mkfontscale     $ mkfontdir     $ fc-cache -fv ~/.fonts      fc-list command shows that Monaco is installed               $ fc-list | grep Monaco      Monaco:style=Regular,Standard,Testo normale,Normaal,Normal,Común,Almindelig,Vanlig tekst,Normaali,\u30ec\u30ae\u30e5\u30e9\u30fc      But when I try to change font in console, Monaco is not listed.


What is wrong with my .bashrc PS1 line?

I think the screenshot should show what's going on. I open a shell, and dir colors don't work. I run bash again, and dir colors work. What's going on? ![enter image description here](http://i.stack.imgur.com/8bXyk.png)


Why does !! inside an alias not work?

I have this alias set in my system `/etc/bashrc` file:               alias root="sudo !!"      The intention of this being to run the last used command using `sudo` of course. When used, it of course appears to substitute the last command in `history` to the `bashrc` file upon shell initialization, and not the actual command that you would get if you were to run `sudo !!` in an interactive shell. I've also tried `alias root="sudo fc -s"` to no avail. I realize this is probably something to do with how the BASH does command substitutions, but can someone explain why this is, and provide a usable substitute? I'm running BASH version 3.2.51(1)-release (x86_64-apple-darwin13).


Suddenly changing users

Has anyone ever encountered a scenario where you are logged into a system going about your standard business, `cat`, `ls`, `tail`, `grep`, `vim`, `find` etc. and suddenly permissions to regular things stop working? When I do a `whoami` it turns out I'm not my regular user but another user. For example               bash>whoami          mark     bash>cat /dev/null > perm.mark     bash>clear     bash>tail -f perm.mark     bash>^C     bash>cat /dev/null > perm.mark          permission denied     bash>whoami          adam      Any ideas about what's happening here?


How to only zip the files of a specific user?

I like zip, it's simple, but recently I came with the need of only zipping the file owned by one user in a directory. I read the manual and I can't find any option to for example do things like:               zip /tmp/file.zip -own antoine -r /usr/something/*       Does I miss the option or maybe it's possible with other archive standard format (I'm open to suggestion though I work on AIX and might miss some options or binary)


Which Debian Architecture Should I Use? AMD Sempron 2500

I have an old computer with an AMD Sempron 2500 1.7GHz Processor and 512MB ram. I am trying to build a simple NAS for my home office. I downloaded the Debian Small CD file amd64 and i386, burnt them to CD and tried to boot from them. After a few minutes, nothing happened. It just sat there on a blank screen. I am familiar with the windows installer how it says "Press any key to continue...." when you try to boot from CD. So I was thinking that I might be using the wrong small cd file. But which one do I use? I am very new to anything other than Windows. I found this wonderful guide on how to setup a NAS, but it seems to be way over my head at the moment. http://versia.com/2009/11/nas-debian-lenny-raid1-encrypted/ So please talk slow and use little words :) Any suggestions for a linux newb would be great.


Route all HTTP traffic through polipo

I've set up polipo on my machine to listen to the default port `8123`. To test it, I set the in-memory cache to a ridiculously high 2 GB and downloaded a 50 MB file using `wget` utilizing the proxy.               http_proxy='http://localhost:8123' wget server/file      As expected, the first execution needs some seconds to transfer the file. Subsequent repetitions utilize caching and complete in less than a second. Now, I want to try directing all HTTP (port 80) traffic to be automatically routed through `polipo`, so that I don't have to specify the proxy with each web browser, mail client or other program I use. Although the faq indeed states that polipo is not intended for this use case, the Arch Linux Wiki mentions to do this via `iptables`               iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner ! --uid-owner polipo -j ACCEPT     iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8123      After executing these commands as root, I again issue the `wget` command without the proxy environment variable set. All invocations need to download the file again, caching is not utilized, which is also reflected by               $ iptables -t nat -vL     [...]     Chain OUTPUT (policy ACCEPT 5 packets, 529 bytes)      pkts bytes target     prot opt in     out     source               destination                  6   312 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:http ! owner UID match polipo         0     0 REDIRECT   tcp  --  any    any     anywhere             anywhere             tcp dpt:http redir ports 8123     [...]      Only the `ACCEPT` rule is triggered, not the `REDIRECT` directive. I also tried to reverse the filter. Note the missing negation `!`.               iptables -t nat -R OUTPUT 1 -p tcp --dport 80 -m owner --uid-owner polipo -j ACCEPT      Thereafter, only the second rule was utilized, redirecting all HTTP traffic to always return the `polipo` configuration interface. How do I configure `iptables` correctly to route HTTP traffic through `polipo`? Is it even possible? Or do I have to switch to the more heavyweight squid?


Recursive grep vs find / -type f -exec grep {} \; Which is more efficient/faster?

Which is more efficient for finding which files in an entire filesystem contain a string: recursive grep or find with grep in an exec statement? I assume find would be more efficient because you can at least do some filtering if you know the file extension or a regex that matches the file name, but when you only know `-type f` which is better? GNU grep 2.6.3; find (GNU findutils) 4.4.2 Example: `grep -r -i 'the brown dog' /*` `find / -type f -exec grep -i -r 'the brown dog' {} \;`


Looping over a folder enter anyways the loop

When looping on a folder through a               for f in $path       I am experiencing an unexpected behaviour, i.e. the loops is entered anyway even if no file match the wildcard. I am using cygwin and this is my code               #!/bin/sh     here=$(pwd)     release(){         release="$1"         targetdisk="$2"         package="$3"         searchPath="../$package/${package}Setup/*/*/*.msi"         echo $searchPath         ls $searchPath         for f in $searchPath; do             mode=$(echo $file | sed -e 's:.*/.*/\(.*\)/.*\.msi:\1:')             version=$(echo $file | sed -e 's:.*/\(.*\)/.*/*.\.msi:\1:')             PREVIOUSIFS=$IFS             IFS=#             targetPath="$targetdisk:\\Software and tools\\Install\\$release"             newFile="$targetPath\\$package-$mode-$release.exe"             if [ ! -d "$targetPath" ]; then                 mkdir -p "$targetPath"             fi             echo $newFile             echo $f                       #cp $file $newFile             IFS=$PREVIOUSIFS         done;     }     release $1 $2 MyStuff      I put on purpose MyStuff, which does not exist:               $ ./release.sh 1.0-dev G     ../MyStuff/MyStuffSetup/*/*/*.msi     ls: ../MyStuff/MyStuffSetup/*/*/*.msi: No such file or directory     G:\Software and tools\Install\1.0-dev\MyStuff--1.0-dev.exe     ../MyStuff/MyStuffSetup/*/*/*.msi      As you can see however, the two echos are executed. Why this happens even if there is no match?