title: What software allows the change of runtime-environment, while keeping the same kernel running?

text: I know that with a GNU/Linux distribution you can switch between different distributions at runtime when they use the same kernel or the kernel is compatible between 2 or more different distributions; I never used this feature of the Linux-based OSs, but I would like to ask what is the software/s that makes this possible and how to perform this switch at runtime correctly. It will be nice to also have a list of pros and cons, for example what settings I loose and what I can keep during the switch.


title: Arch Linux: Strange version mismatch when trying to install UWSGI with pacman. Is this common / trivial?

text: When I run `pacman -S uwsgi` or `pacman -S community/uwsgi` I get the following error:               resolving dependencies...     looking for inter-conflicts...          Packages (6): jansson-2.5-2  libxml2-2.9.1-5  libyaml-0.1.4-3                   python2-2.7.6-1  sqlite-3.8.2-1  uwsgi-1.9.20-1          Total Download Size:    0.27 MiB     Total Installed Size:   69.85 MiB          :: Proceed with installation? [Y/n] Y     :: Retrieving packages ...          error: failed retrieving file 'uwsgi-1.9.20-1-x86_64.pkg.tar.xz' from         archlinux.mirrors.uk2.net : The requested URL returned         error: 404 Not Found     warning: failed to retrieve some files     error: failed to commit transaction (download library error)     Errors occurred, no packages were upgraded.      This would indicate to me that the package is not on the server. However I tried a number of mirrors and got the same result. I then investigated further, by directing my web browser to the mirror directory and confirmed that there is a `uwsgi` package there, but the version is later:               uwsgi-1.9.21.1-1-x86_64.pkg.tar.xz      I am fairly new to Arch so don't know if I'm missing something obvious here. On Debian my response would be to run `apt-get update`, but can't find a similar facility in `pacman`: My understanding is that the `-S` option will take care of that as well as installing the package. Could this be a case of mirrors not being synced properly, or am I missing something simple at the client end? If the mirror contains a later version, why isn't my `pacman` command picking that up?


title: Getting "zsh: command not found: time" when running `time` in subshell

text: I installed ZSH (and Oh-My-ZSH) on a Ubuntu 12.10 64 bit machine a few days ago. I just tried to do:               time (time ls)      and got this error:               zsh: command not found: time     ( time ls; )  0.00s user 0.00s system 64% cpu 0.002 total      The exact same thing works on ZSH on my Mac. I also tried running ZSH without loading any config file, using `zsh -f -d`, but got the same error. What could be the problem here? * * * Some more output that may help:               ➜  ~  type -a time     time is a reserved word     ➜  ~  time (type -a time)     time is a reserved word     ( type -a time; )  0.00s user 0.00s system 0% cpu 0.001 total     ➜  ~  time (time)     zsh: command not found: time     ( time; )  0.00s user 0.00s system 0% cpu 0.001 total     ➜  ~  which time     time: shell reserved word     ➜  ~  time (which time)     time: shell reserved word     ( which time; )  0.00s user 0.00s system 0% cpu 0.001 total


title: Linux newbie: How do I use Jack? How does Linux sound work?

text: I am a Linux newbie. I know my way around the command-line enough to where it doesn't get in the way of my day job (I develop web applications in Python). This involves some piping, grep, awk, and programmer-oriented stuff like that. I am experimenting with desktop Linux on my home computer (using Ubuntu). I am trying to set up Jack, as I've heard it's the Linux equivalent to ASIO on Windows. I play guitar for fun and thought it would be cool to play with Ardour or find a FOSS equivalent to Guitar Rig. However I do not understand... well, anything. I don't understand what Jack does. From what I can gather, the general flow is `[sound hardware]` -> `[kernel]` -> `[JACK]` -> `[ALSA]` -> `[PulseAudio]` -> `[Phonon]` -> `[my headphones]` (Phonon comes in because I use KDE. I think.) I don't actually know _what_ the arrows represent. The JACK website contains essentially zero beginning user oriented documentation, except for one page describing how to use JACK with PulseAudio. As a beginner who, regardless of JACK, doesn't understand how sound works in Linux, where can I go to learn? I'd like to gain an understanding of the sound stack. But for JACK all I was able to find is its barren Wiki (including two juicy links named _Configuring and running a JACK server_ and _Setting up a simple audio chain_ , which both turn out to be "Coming Soon" pages which haven't been edited in five years) and a Linux Journal article from 2005. Many things confuse me. How can I tell which sound devices Linux recognizes? I have three: an onboard chip, a USB audio interface (an M-Audio FastTrack), and a USB webcam that has a microphone. Do all of these things get recognized by Linux? Do they all register specifically as sound devices? Does each device have to have independent drivers for JACK, ALSA, PulseAudio, etc.? Is there a basic way I can test my device to make sure it has output? Is there a way I can monitor my devices to see if the software is actually using them? Right now Amarok sound is audible, but Youtube sound isn't. Amarok is also running through my USB FastTrack instead of my onboard sound chip. Hydrogen refuses to start, presumably because I have JACK or Alsa or something configured wrong. I have no idea how to figure out the rhyme or reason for these things. I realize I am asking several questions. I am not really hoping to get an answer for any specific one, but just trying to paint a picture of the general mayhem I am experiencing. I know the questions are supposed to be focused and I apologize but I feel like I'm at the end of my rope. I'm hoping there's some nice, well-written "Here's how you work the sound on Linux" article (or set of articles) I just can't find. I am slightly panicked only because there seems to be so little information available on JACK in general, even on the official JACK wiki. Please help!!


title: UID of a deleted account

text: How can an administrator find the UID of a user that's been deleted with the `userdel` command?


title: How do I find out where the contents of a package are installed?

text: I ran into this bug, where Cantor can't find the sage backend if both are installed through the ubuntu package system. I can get around this bug if I know the path to the sage executable, but even after installing cantor- backend-sage I can't figure out where sage is located. `locate` and `find` both return loads of files called `message`-something, and have been unhelpful. `which sage` and `whereis sage` return nothing. Is there some way to figure out where apt-get installs everything in a package?


title: Adding bindings for ed2k:// links with xdg-open?

text: I want to use a customized program to handle "ed2k://" links , it already got a "*.desktop" file , but how can I bind it with xdg-open as the default handler ? Since I don't know the exact mimetype of "ed2k://" links , I had to ask here **Temporary solution** Modify xdg-open to handle "ed2k:%2F%2F" links , source code Still looking for standard work arounds


title: how to use "Unusable" sectors outside defined partition boundaries

text: What might be a convenient way to stash some hidden data in the "Unusable" area following the last partition, or anywhere outside defined partition boundaries? For example, making it appear as a `/dev/___` ready for I/O to my userspace programs. Let's say I don't care if partitioning programs or bootloaders don't recognize that there might be something important there and step on it; I'd do a structure sanity check & re-create data as needed.                                            cfdisk (util-linux 2.19.1)                                          Disk Drive: /dev/sda                              Size: 160041885696 bytes, 160.0 GB                    Heads: 255   Sectors per Track: 63   Cylinders: 19457           Name     Flags     Part Type   FS Type        [Label]        Size (MB)       --------------------------------------------------------------------------------      sda1                Primary    vfat           [ACER]         25827.38         sda2                Primary    ntfs                          90033.92                                            Unusable               13193.35      sda3                Primary    ext4                          16508.14      sda4     Boot       Primary    ext4                          14476.50                                            Unusable                   2.62  *


title: Including pending update list in motd

text: How would you include the list and / or count of pending updates in the welcome banner? Eg.               username: User     password: *****          Hi 'User', welcome on 'localhost'     There are 8 pending updates, you need to execute "sudo apt-get upgrade"          User@localhost:~$      Bonus question : How to display this "extra message" only for users belonging to the "sudo" group ?


title: Vim settings within ncftp edit

text: I'm using the `ncftp` utility. It has an `edit` command which handles the get, edit, put sequence for me as in GUI ftp clients. It's great except for one thing, I get vanilla `vim`, with none of my settings. Ideally, I'd like to have it configured exactly the same as outside of `ncftp` (colors, key mappings, pathogen bundles, etc). How can I force vim to load my settings when invoked from within `ncftp`? NCFTP relies on the following environment variable to find the editor:               EDITOR="/usr/bin/vi" ; export EDITOR      Can that somehow be tweaked to force load my settings?


title: Extracting just a single group from a regular expression

text: I am trying to get a list of numbers from some hacked-together log files using zgrep. So, I am using:               zgrep -ie "total time: .* ms" *      This returns the whole line that I care about. I'd just like the number. (after total time but before the 'ms') Is there any way to get this information without further processing?


title: PAM debugging "check pass; user unknown"

text: I am attempting to get Prosody authenticating with its `auth_pam` module. It is configured to use the `PAM` service name `xmpp`. The `pam.d/xmpp` file is copied straight from the one configured for dovecot (originally taken from, I think, dovecot's documentation), which is known to be working:               # cat /etc/pam.d/xmpp      auth    required    pam_unix.so nullok debug     account required    pam_unix.so debug      Logging in with dovecot works wonderfully. Logging in with Prosody, with exactly the same username and password, causes Prosody to return 'Not authorized', and the following output in `journalctl -f`:               Oct 29 22:12:14 riscque.net prosody[9396]: c2s1d010b0: Client sent opening <stream:stream> to riscque.net     Oct 29 22:12:14 riscque.net prosody[9396]: c2s1d010b0: Sent reply <stream:stream> to client     Oct 29 22:12:14 riscque.net prosody[9396]: [178B blob data]     Oct 29 22:12:14 riscque.net unix_chkpwd[9408]: check pass; user unknown     Oct 29 22:12:14 riscque.net prosody[9396]: pam_unix(xmpp:auth): conversation failed     Oct 29 22:12:14 riscque.net prosody[9396]: pam_unix(xmpp:auth): unable to obtain a password     Oct 29 22:12:14 riscque.net prosody[9396]: pam_unix(xmpp:auth): auth could not identify password for [lvc]     Oct 29 22:12:14 riscque.net prosody[9396]: riscque.net:saslauth: sasl reply: <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/><text>Unable to authorize you with the authentication credentials you've sent.</text></failure>      This series of errors seems mutually contradictory - first it says "user unknown", but then that it can't obtain the password for `lvc` - this username certainly exists on the system. What is likely going on here, and how would I debug this further?


title: How to use the last command in the while loop?

text: I am wondering how to modify this code.               ls     while [ 1 > 0 ]     do     fc -s     sleep 1     done      For `fc -s`, you can refer to this question for details. My question are as follows:   1. How will it run? If you name it as `test.sh`.   2. If I want `fc -s` represent the first line `ls`, how will I modify it? That is to say, I want to Run `ls` then sleep one second, then `ls`, then sleep one second,... Of course `ls` may be placed by some other command.


title: How do you do NAT port redirection with PF?

text: In Linux, you can do NAT port redirection with a command like this:               iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8000      What is the equivalent with BSD's PF?


title: Can't play games fullscreen, Only see black but can hear them

text: I have installed several games from steam, but when I open all of them they go to full screen and the screen is black. I can hear the sounds of the game but can see nothing. My GPU is a AMD Radeon 6858 and I have Catalyst 13.4 on Elementary OS Luna beta 2. Any ideas as to how I can go about preventing this?


title: Install GNOME in freebsd

text: I'm new to FreeBSD it comes with a CLI mode not a graphical interface. How can I install GNOME in FreeBSD. Can I install GNOME by downloading its package from a different machine if its possible and also what is the size of GNOME v 2.0.


title: How to get my files from my encrypted home folder on Ubuntu 12.04?

text: Last night there was a power outage and now my computer will not boot up. After pushing the power button and seeing the BIOS I only see a black screen with a white cursor at the top left of the screen. I plugged in an external hard drive and put in my live CD hoping I could use the live CD to copy my files from my home folder to my external drive. But when I opened the home folder each containing folder says I do not have access to them and they are all empty. I assume this is because I encrypted my home folder when I first installed Ubuntu. How can I get my files back?


title: Wait for ethernet cable plug-in/plug-out event under Linux?

text: I know that I can poll the link state via the SIOCETHTOOL/ETHTOOL_GLINK ioctl but this would require to endlessly request the state. The same goes for parsing /var/log/messages. So my questin is, is there any way under Linux to wait on a state change of the ethernet cable from userspace?


title: How do I kill all a user's processes using their UID

text: I want to kill all running processes of a particular user from either a shell script or native code on a linux system. Do I have to read the /proc directory and look for these? Any ideas? Is there a dynamic mapping of the pids under UIDs in linux? Isnt this in the proc? If no where is this list maintained. Should I read from it? Also where is the static list of all UIDs in the system so I can validate this this user exists and then proceed to kill all processes running under it?


title: Best way to find the active wireless device

text: Of course I know the command: `iwconfig` which lists devices (and gives info about whether they have a wireless connection). For the purposes of a shell script, I'm really wondering, is there any way to list only the device names that DO have a wireless connection? Essentially any other iw command (or something similar)... Specifically looking for solutions besides `iwconfig | grep ...`


title: Is this the correct way to create a repo for offline usage ? ( for : yum groupinstall "Desktop" )

text: Let's create a repo for:               yum groupinstall "Desktop"      first, i create a folder named "test"               /root/Desktop/test      next i need to know what is inside of "Desktop" group.               yum groupinfo "Desktop"      result:               Group: Desktop      Description: A minimal desktop that can also be used as a thin client.      Mandatory Packages:        NetworkManager        NetworkManager-gnome        alsa-plugins-pulseaudio        at-spi        control-center        dbus        gdm        gdm-user-switch-applet        gnome-panel        gnome-power-manager        gnome-screensaver        gnome-session        gnome-terminal        gvfs-archive        gvfs-fuse        gvfs-smb        metacity        nautilus        notification-daemon        polkit-gnome        xdg-user-dirs-gtk        yelp      Default Packages:        control-center-extra        eog        gdm-plugin-fingerprint        gnome-applets        gnome-media        gnome-packagekit        gnome-vfs2-smb        gok        openssh-askpass        orca        pulseaudio-module-gconf        pulseaudio-module-x11        rhn-setup-gnome        vino      Optional Packages:        sabayon-apply        tigervnc-server        xguest      i suppose optional packages are to be ignored, for each of the mandatory and default packages, i am going to download them via `yumdownloader` let's do just that:                cd /root/Desktop/test      and then download each one:               # Mandatory Packages:     yumdownloader --resolve NetworkManager     yumdownloader --resolve NetworkManager-gnome     yumdownloader --resolve alsa-plugins-pulseaudio     yumdownloader --resolve at-spi     yumdownloader --resolve control-center     yumdownloader --resolve dbus     yumdownloader --resolve gdm     yumdownloader --resolve gdm-user-switch-applet     yumdownloader --resolve gnome-panel     yumdownloader --resolve gnome-power-manager     yumdownloader --resolve gnome-screensaver     yumdownloader --resolve gnome-session     yumdownloader --resolve gnome-terminal     yumdownloader --resolve gvfs-archive     yumdownloader --resolve gvfs-fuse     yumdownloader --resolve gvfs-smb     yumdownloader --resolve metacity     yumdownloader --resolve nautilus     yumdownloader --resolve notification-daemon     yumdownloader --resolve polkit-gnome     yumdownloader --resolve xdg-user-dirs-gtk     yumdownloader --resolve yelp     #Default Packages:     yumdownloader --resolve control-center-extra     yumdownloader --resolve eog     yumdownloader --resolve gdm-plugin-fingerprint     yumdownloader --resolve gnome-applets     yumdownloader --resolve gnome-media     yumdownloader --resolve gnome-packagekit     yumdownloader --resolve gnome-vfs2-smb     yumdownloader --resolve gok     yumdownloader --resolve openssh-askpass     yumdownloader --resolve orca     yumdownloader --resolve pulseaudio-module-gconf     yumdownloader --resolve pulseaudio-module-x11     yumdownloader --resolve rhn-setup-gnome     yumdownloader --resolve vino      okay, everything got downloaded to the 'test' folder. in this 'test' folder let's run this command to create a 'Desktop' group.               yum-groups-manager -n "Desktop" --id=desktop --save=Desktop.xml \     --mandatory  \     NetworkManager \     NetworkManager-gnome  \     alsa-plugins-pulseaudio  \     at-spi  \     control-center  \     dbus  \     gdm  \     gdm-user-switch-applet  \     gnome-panel  \     gnome-power-manager  \     gnome-screensaver  \     gnome-session  \     gnome-terminal  \     gvfs-archive  \     gvfs-fuse  \     gvfs-smb \     metacity \     nautilus  \     notification-daemon  \     polkit-gnome  \     xdg-user-dirs-gtk  \     yelp \     --default  \     control-center-extra  \     eog  \     gdm-plugin-fingerprint  \     gnome-applets  \     gnome-media  \     gnome-packagekit  \     gnome-vfs2-smb  \     gok  \     openssh-askpass  \     orca  \     pulseaudio-module-gconf  \     pulseaudio-module-x11  \     rhn-setup-gnome  \     vino      error:               yum-groups-manager: error: no such option: --default      let's remove the '--default' so i suppose everything is 'mandatory'               yum-groups-manager -n "Desktop" --id=desktop --save=Desktop.xml \     --mandatory  \     NetworkManager \     NetworkManager-gnome  \     alsa-plugins-pulseaudio  \     at-spi  \     control-center  \     dbus  \     gdm  \     gdm-user-switch-applet  \     gnome-panel  \     gnome-power-manager  \     gnome-screensaver  \     gnome-session  \     gnome-terminal  \     gvfs-archive  \     gvfs-fuse  \     gvfs-smb \     metacity \     nautilus  \     notification-daemon  \     polkit-gnome  \     xdg-user-dirs-gtk  \     yelp \     control-center-extra  \     eog  \     gdm-plugin-fingerprint  \     gnome-applets  \     gnome-media  \     gnome-packagekit  \     gnome-vfs2-smb  \     gok  \     openssh-askpass  \     orca  \     pulseaudio-module-gconf  \     pulseaudio-module-x11  \     rhn-setup-gnome  \     vino      it created the file : `Desktop.xml` let's see what it looks like :               [root@localhost test]# cat Desktop.xml     <?xml version="1.0" encoding="UTF-8"?>     <!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">     <comps>            <group>        <id>desktop</id>        <default>false</default>        <uservisible>true</uservisible>        <display_order>1024</display_order>        <name>Desktop</name>        <description></description>         <packagelist>           <packagereq type="mandatory">NetworkManager</packagereq>           <packagereq type="mandatory">NetworkManager-gnome</packagereq>           <packagereq type="mandatory">alsa-plugins-pulseaudio</packagereq>           <packagereq type="mandatory">at-spi</packagereq>           <packagereq type="mandatory">control-center</packagereq>           <packagereq type="mandatory">control-center-extra</packagereq>           <packagereq type="mandatory">dbus</packagereq>           <packagereq type="mandatory">eog</packagereq>           <packagereq type="mandatory">gdm</packagereq>           <packagereq type="mandatory">gdm-plugin-fingerprint</packagereq>           <packagereq type="mandatory">gdm-user-switch-applet</packagereq>           <packagereq type="mandatory">gnome-applets</packagereq>           <packagereq type="mandatory">gnome-media</packagereq>           <packagereq type="mandatory">gnome-packagekit</packagereq>           <packagereq type="mandatory">gnome-panel</packagereq>           <packagereq type="mandatory">gnome-power-manager</packagereq>           <packagereq type="mandatory">gnome-screensaver</packagereq>           <packagereq type="mandatory">gnome-session</packagereq>           <packagereq type="mandatory">gnome-terminal</packagereq>           <packagereq type="mandatory">gnome-vfs2-smb</packagereq>           <packagereq type="mandatory">gok</packagereq>           <packagereq type="mandatory">gvfs-archive</packagereq>           <packagereq type="mandatory">gvfs-fuse</packagereq>           <packagereq type="mandatory">gvfs-smb</packagereq>           <packagereq type="mandatory">metacity</packagereq>           <packagereq type="mandatory">nautilus</packagereq>           <packagereq type="mandatory">notification-daemon</packagereq>           <packagereq type="mandatory">openssh-askpass</packagereq>           <packagereq type="mandatory">orca</packagereq>           <packagereq type="mandatory">polkit-gnome</packagereq>           <packagereq type="mandatory">pulseaudio-module-gconf</packagereq>           <packagereq type="mandatory">pulseaudio-module-x11</packagereq>           <packagereq type="mandatory">vino</packagereq>           <packagereq type="mandatory">xdg-user-dirs-gtk</packagereq>           <packagereq type="mandatory">yelp</packagereq>         </packagelist>       </group>     </comps>      Now i need to create a 'group' in the repo ? based on info i read i am suppose to run this command to "create a group in the repo" i thought what i did was basically just that. i suppose there is another step ?               [root@localhost test]# createrepo -g /root/Desktop/test/Desktop.xml /root/Desktop/test/     Spawning worker 0 with 60 pkgs     Workers Finished     Gathering worker results          Saving Primary metadata     Saving file lists metadata     Saving other metadata     Generating sqlite DBs     Sqlite DBs complete     [root@localhost test]#       okay, let's run `ls` to see what is in this folder `test` now..               [root@localhost test]# ls     alsa-lib-1.0.22-3.el6.i686.rpm     alsa-plugins-pulseaudio-1.0.21-3.el6.i686.rpm     alsa-plugins-pulseaudio-1.0.21-3.el6.x86_64.rpm     at-spi-1.28.1-2.el6.centos.i686.rpm     at-spi-1.28.1-2.el6.centos.x86_64.rpm     control-center-2.28.1-38.el6.i686.rpm     control-center-2.28.1-38.el6.x86_64.rpm     control-center-extra-2.28.1-38.el6.x86_64.rpm     dbus-1.2.24-7.el6_3.x86_64.rpm     Desktop.xml     eog-2.28.2-4.el6.x86_64.rpm     flac-1.2.1-6.1.el6.i686.rpm     gdm-2.30.4-39.el6.x86_64.rpm     gdm-plugin-fingerprint-2.30.4-39.el6.x86_64.rpm     gdm-user-switch-applet-2.30.4-39.el6.x86_64.rpm     gnome-applets-2.28.0-7.el6.centos.x86_64.rpm     gnome-media-2.29.91-6.el6.x86_64.rpm     gnome-packagekit-2.28.3-7.el6.x86_64.rpm     gnome-panel-2.30.2-14.el6.x86_64.rpm     gnome-power-manager-2.28.3-7.el6_4.x86_64.rpm     gnome-screensaver-2.28.3-24.el6_4.1.x86_64.rpm     gnome-session-2.28.0-18.el6.x86_64.rpm     gnome-terminal-2.31.3-8.el6.x86_64.rpm     gnome-vfs2-smb-2.24.2-6.el6.x86_64.rpm     gok-2.28.1-5.el6.x86_64.rpm     gvfs-archive-1.4.3-15.el6.x86_64.rpm     gvfs-fuse-1.4.3-15.el6.x86_64.rpm     gvfs-smb-1.4.3-15.el6.x86_64.rpm     libasyncns-0.8-1.1.el6.i686.rpm     libcanberra-0.22-1.el6.centos.i686.rpm     libcanberra-gtk2-0.22-1.el6.centos.i686.rpm     libgnomekbd-2.28.2-2.el6.i686.rpm     libgudev1-147-2.46.el6.i686.rpm     libogg-1.1.4-2.1.el6.i686.rpm     libsndfile-1.0.20-5.el6.i686.rpm     libtdb-1.2.10-1.el6.i686.rpm     libtool-ltdl-2.2.6-15.5.el6.i686.rpm     libudev-147-2.46.el6.i686.rpm     libvorbis-1.2.3-4.el6_2.1.i686.rpm     libwacom-0.5-4.el6.i686.rpm     libxkbfile-1.0.6-1.1.el6.i686.rpm     libxklavier-4.0-9.el6.i686.rpm     libXScrnSaver-1.2.2-2.el6.i686.rpm     libXtst-1.2.1-2.el6.i686.rpm     metacity-2.28.0-23.el6.i686.rpm     metacity-2.28.0-23.el6.x86_64.rpm     nautilus-2.28.4-19.el6.x86_64.rpm     NetworkManager-0.8.1-43.el6.x86_64.rpm     NetworkManager-gnome-0.8.1-43.el6.x86_64.rpm     notification-daemon-0.5.0-1.el6.x86_64.rpm     openssh-askpass-5.3p1-84.1.el6.x86_64.rpm     orca-2.28.2-1.el6.x86_64.rpm     polkit-gnome-0.96-3.el6.i686.rpm     polkit-gnome-0.96-3.el6.x86_64.rpm     pulseaudio-libs-0.9.21-14.el6_3.i686.rpm     pulseaudio-module-gconf-0.9.21-14.el6_3.x86_64.rpm     pulseaudio-module-x11-0.9.21-14.el6_3.x86_64.rpm     repodata     tcp_wrappers-libs-7.6-57.el6.i686.rpm     vino-2.28.1-8.el6_3.x86_64.rpm     xdg-user-dirs-gtk-0.8-7.el6.x86_64.rpm     yelp-2.28.1-17.el6_3.x86_64.rpm     [root@localhost test]#       looks like a folder named 'repodata' has been created.               [root@localhost test]# cd repodata     [root@localhost repodata]# ls     02e6e67a0eedf0b7d561253fd5e7d71032a6e0054536b88e75563681822dd774-filelists.xml.gz     3fc84c02d6c0e033441e6f00353a98a7c2cc5530ff27f63206d5ef300890d9a0-primary.xml.gz     91fe015bc6db77cd159518699d5c70838143681955bf3d3c28804d08063c3f92-filelists.sqlite.bz2     af6d0c22babf5796feed2a24e1d74d5d0c6507f2625fbfa65c8acc8495856dc0-primary.sqlite.bz2     c18a67f5fc206032c0081bc55bee52a2ea258873c093cdb55cda89d68a7af4eb-other.xml.gz     c9913ed4169437a1728d021cce5d54f8b7bbf02e82fa5cab5345f653f97c64ae-other.sqlite.bz2     e5ad7753d9fe659de92967aaeb29de70e0cf4b9bc3e8a07970a236748299b486-Desktop.xml     f9c925984ac89f3772590032080c01bca01df81b9bf611041cfbaceaaf107114-Desktop.xml.gz     repomd.xml     [root@localhost repodata]#       looks like lots of gibberish random stuff. but anyway, now how exactly do i use this repo to install..               yum -y groupinstall "Desktop"       to be more specific, how do i test it given that i already have it installed? i just would like to ensure it won't fail when i re-install minimal linux and then try to install this from this repo.


title: how to get out from the command iostat on unix?

text: I was installing a .iso 8,2 version in a vmware to learn unix., and i am stuck with iostat command, i run `iostat 3` and is keep going to show me the results, but whem i put `exit` or `q` or `q!` to exit, he not want to go out from `iostat 3`.


title: Is troff/groff relevant anymore?

text: I've heard that troff/groff have largely been replaced by TeX. Is this true? The only thing that I know actually used troff nowadays is manpages. Is this also true? If not, what are some other uses?


title: List only bind mounts

text: Rather than using `mount | grep`, I'd like to use `mount -l -t bind`, but that doesn't work, and `-t none` shows _all_ mounts.


title: How can I create and grant a normal user with root privileges?

text: I'm wondering how to create and grant a normal user (for example, named 'sybase') with root privileges? I found useradd, adduser, and passwd to be useful, but are there any other files to modify to get 'root'-like privileges, so that user can do installation tasks?


title: Vim - Cursorline turns on after saving a remote file

text: Using `vim scp://....` I open a remote file. cursorline is not shown until I save the file(:w). When I type :w and enter password, cursorline appears.If I type `:set nocursorline` it disappears but again when I type `:w` it appears. When I edit file in remote machine cursorline is turned off and is not shown. Why does it have such a behavior?


title: Running (X) Xfce4 in Debian chroot

text: I was trying to start Xfce4 in a chroot. The problem is that Xfce4 starts, shows default the UI but the USB keyboard and mouse are not working. My chroot script:               #!/bin/bash     mount --bind /dev /srv/nboot_i386/dev     mount --bind /dev/pts /srv/nboot_i386/dev/pts     mount --bind /proc /srv/nboot_i386/proc     mount --bind /sys /srv/nboot_i386/sys     mount --bind /tmp /srv/nboot_i386/tmp     chroot /srv/nboot_i386/ /bin/bash     umount /srv/nboot_i386/dev     umount /srv/nboot_i386/dev/pts     umount /srv/nboot_i386/proc     umount /srv/nboot_i386/sys     umount /srv/nboot_i386/tmp      When I copy the chroot filesystem onto a separate HDD, and install a bootloader to make it boot, everything works fine. I also tried to run KDE4 the same way and the keyboard and mouse weren't working, so it seems the chrooted X server is causing trouble. I've studied the X server log, but haven't found anything suspicious. I'am using Virtualbox, but the problem is same on the real PC. What I do: debootstrap, install Xfce4 in chroot, run Xfce4. I've tested i386/amd64 Wheezy/Jessie What magic am I missing? I've found the answer at last - `/run/udev` should be binded also. I think this info may be helpfull.


title: Cursor keys do not jump over tabs in Vim

text: When I step over a tab with the cursor keys (`h` and `l`), the cursor does not jump over the tab, it just goes one space at a time. This is annoying because I am not sure if there is a tab there or spaces. What I expect is that if I move onto a tab the cursor should situate at the beginning of the tab (the leftmost position) and if I move one space to the right, it should jump to the first character after the tab. How can I achieve this behavior? Note that I am using `visualedit=all`.


title: rpmbuild error: Symlink points to BuildRoot

text: In the package that I'm building, there are symbolic links within the Buildroot directory. For instance this:                /home/sg/impkg/buildroot/dir1/bin/w_be -> /home/sg/impkg/buildroot/dir2/targ/be      This is making `rpmbuild` to fail with the error:                RPM build errors:      Symlink points to BuildRoot:       /home/sg/impkg/buildroot/dir1/bin/w_be -> /home/sg/impkg/buildroot/dir2/targ/be      In my `%files` section, I have only included the `buildroot` directory, which is what I want. Following is a snippet from my spec-file:               Summary:                research compiler tool set     License:                GPL     Name:                   %{name}     Version:                %{version}     Release:                %{release}     Source:                 %{name}-%{version}.tar.gz     Prefix:                 /usr     Group:                  Development/Tools     Autoreq:                0     Autoprov:               0          %description     research compiler tool set          %prep     %setup -q          %build     rm -rf %{buildroot}/%{name}-%{version}     mkdir %{buildroot}/%{name}-%{version}     cd %{buildroot}/%{name}-%{version} && %{_builddir}/%{name}-%{version}/./configure --     prefix=%{buildroot}/%{name}-%{version}     make %{?_smp_mflags} -C %{buildroot}/%{name}-%{version}          %install     cd %{buildroot}/%{name}-%{version} && make DESTDIR=%{buildroot}/%{name}-%{version}  install          %clean     rm -rf %{buildroot}/%{name}-%{version}          %files     %defattr(755,-,-)     /%{name}-%{version}      I have to adhere to the logic, which means I cannot remove these links from the Makefiles...how do I solve this problem and generate the RPM?


title: Control Initial size of xfce4-terminal?

text: As I didn't see the option to configure start window size of xfce4's terminal program , is it configurable ?


title: Which GNOME themes are suitable for black and white printing?

text: I need to place some screenshots of GNOME applications, such as the file manager, in a book. The book will be printed in black and white, and, although shades of gray are okay, it is best that I avoid printing large areas of solid ink. Are there any GNOME themes which look good printed in black and white? What theme to many books use?


title: Software developer switching from Linux to OS X, what are the gotchas?

text: I have used Ubuntu/Fedora/Red Hat/Suse but haven't used OS X at all. If I have to start using OS X regularly, what are the things I should look out for? Tools I use are GNU tool chain, C++/Boost, etc.


title: Forcing X to recognise video ram, saving the file 99-vesa file

text: So I was looking at a question about forcing X to recognise video memory to achieve 1080p resolution, however when I finished the following piece of code:               Section "Device"                  Identifier "Screen0"             VideoRam 1048576          EndSection      I don't know what to do. I tried to exit and save it but it told me "File and location does not exist" or something like that. What do I do? How do I save it? Here is the post I was looking at for answers. Achieving full resolution with PowerVR SGX454 on Ubuntu 12.04


title: To configure script to send email only when diff command gives a difference

text: I'm new to the world of scripting and and currently using a script to perform a health check on the san devices that I manage. The script is simple and redirects output of commands to a current file from remote device to my local host. I then use a diff command to compare output of current file and reference file and get a email alert of the difference. However the problem that I'm currently facing is that every time I run the script, I get a email after the script is executed, that is even if there is no difference in the comparison, I get a blank email from the script execution. As this is related to performing a automated health check, getting a blank email everyday will be a nuisance. Is there any way of tweaking the diff or add some more code to make sure that when there is no difference showing from the diff, I should not get a email and only get a email if there is a difference and showing the difference. ### current script               ### saves output of command switchshow in a file on local host     ssh user@ip_of_switch switchshow > switchshow_results          ### Compares current output to reference file and mails the difference     diff switchshow_reference switchshow_results \         | mail -s device_PORT_ERROR email_recipient      Please let me know if any other information is required. * * * Thanks for the help and details explanation Slm :) I have so far got the email part working (I get an email only if there is a difference from `diff` command). However the email that I now get has its test concatenated into one long string, which is bad for viewing and not easy to understand for the people who will be getting it. My current script is pasted below:               ssh test@ip_of_device switchshow > switchshow_results          variable=`diff switchshow_reference switchshow_results`          if [[ $variable -eq 0 ]]         then           echo $"nothing"         else           echo $variable | mail -s switch_HARDWARE_CHECK  recipeint_email_address         fi      The output of the above script is blank and I don't get any email when the `diff` command does not find any difference. However when the `diff` commands finds a difference, I get a email as pasted below:               16c16 < 0 0 010000 id N4 Online FC F-Port 1 N Port + 1 NPIV public --- > 0 0 010000 id N4 No_Light FC F-Port 1 N Port + 1 NPIV public 26c26 < 10 10 010a00 id N4 Online FC F-Port 1 N Port + 1 NPIV public --- > 10 10 010a00 id N4 No_Light FC F-Port 1 N Port + 1 NPIV public 29c29 < 13 13 010d00 id N4 Online FC F-Port 50:06:01:67:3b:20:23:0a --- > 13 13 010d00 id N4 No_Light FC F-Port 50:06:01:67:3b:20:23:0a      This should ideally look like this in the email..               16c16 < 0 0 010000 id N4 Online FC F-Port 1 N Port + 1 NPIV public --- > 0 0 010000 id N4 No_Light FC F-Port 1 N Port + 1 NPIV public           26c26 < 10 10 010a00 id N4 Online FC F-Port 1 N Port + 1 NPIV public --- > 10 10 010a00 id N4 No_Light FC F-Port 1 N Port + 1 NPIV public          29c29 < 13 13 010d00 id N4 Online FC F-Port 50:06:01:67:3b:20:23:0a --- > 13 13 010d00 id N4 No_Light FC F-Port 50:06:01:67:3b:20:23:0a      Output should display one line at a time in the email. Any suggestions?


title: iptables based redirect captive portal style

text: What is a iptables set of rules that will force hosts connected to a access point, that try to access any website (port 80 of any ip or hostname) to be redirected to another device on the network (Which is actually seperate). For example the second server (hosting the web server) is connected via ethernet, and has a IP of 192.168.1.99/24 (eth0) The primary server hosts a wireless hotspot (from adapter wlan0ap), and has an ip of 192.168.12.1/24. I want to make it so that any wifi users of the hotspot (in the 192.168.12.0/24 network) that try to access 192.168.12.1:80 or 192.168.12.4:80 or google.com:80 will be forcefully redirected to 192.168.1.99:80. Currently I have tried these rules in combination with enabling `net.ipv4.ip_forward=1` settings in sysctl               sudo iptables -A POSTROUTING -t nat -o wlan0ap -j MASQUERADE     sudo iptables -t mangle -N internet     sudo iptables -t mangle -A PREROUTING -i wlan0ap -p tcp -m tcp --dport 80 -j internet     sudo iptables -t mangle -A PREROUTING -i wlan0ap -p tcp -m tcp --dport 443 -j internet     sudo iptables -t mangle -A internet -j MARK --set-mark 99     sudo iptables -t nat -A PREROUTING -i eth1 -p tcp -m mark --mark 99 -m tcp --dport 80 -j DNAT --to-destination 192.168.1.98


title: How to change icon for Mathematica nb files

text: I'm using _Mathematica_ 9.0 on Lubuntu 11.10 and its icons on menus work well. But `nb` files (note book files) does not have a nice icon. They appears with a king of engine icon (like configuration icon). I have on `/usr/share/mime/application` a file `mathematica.xml` with               <?xml version="1.0" encoding="utf-8"?>     <mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/mathematica">       <!--Created automatically by update-mime-database. DO NOT EDIT!-->       <comment>Mathematica Notebook</comment>       <comment xml:lang="ar">مذكرة رياضيات</comment>       <comment xml:lang="be">Natatnik Mathematica</comment>       <comment xml:lang="be@latin">Natatnik Mathematica</comment>       <comment xml:lang="bg">Тетрадка — Mathematica</comment>       <comment xml:lang="bs">Mathematica bilješka</comment>       <comment xml:lang="ca">llibreta de notes de Mathematica</comment>       <comment xml:lang="cs">Sešit Mathematica</comment>       <comment xml:lang="da">Mathematica Notebook</comment>       <comment xml:lang="de">Mathematica-Dokument</comment>       <comment xml:lang="en_GB">Mathematica Notebook</comment>       <comment xml:lang="es">notebook de Mathematica</comment>       <comment xml:lang="eu">Mathematica Notebook</comment>       <comment xml:lang="fi">Mathematica-muistilehtiö</comment>       <comment xml:lang="fr">carnet de notes Mathematica</comment>       <comment xml:lang="ga">leabhar nótaí Mathematica</comment>       <comment xml:lang="gl">Mathematica Notebook</comment>       <comment xml:lang="he">מחברת מתמטיקה</comment>       <comment xml:lang="hu">Mathematica notesz</comment>       <comment xml:lang="id">Mathematica Notebook</comment>       <comment xml:lang="it">Notebook Mathematica</comment>       <comment xml:lang="ja">Mathematica ノートブック</comment>       <comment xml:lang="kk">Mathematica Notebook</comment>       <comment xml:lang="ko">Mathematica 노트북</comment>       <comment xml:lang="lt">Mathematica užrašinė</comment>       <comment xml:lang="lv">Mathematica bloknots</comment>       <comment xml:lang="nb">Mathematica notisblokk</comment>       <comment xml:lang="nl">Mathematica-notitieboek</comment>       <comment xml:lang="nn">Mathematica-notatbok</comment>       <comment xml:lang="oc">quasernet de nòtas Mathematica</comment>       <comment xml:lang="pl">Notatnik Mathematica</comment>       <comment xml:lang="pt">Bloco de notas Mathematica</comment>       <comment xml:lang="pt_BR">Caderno do Mathematica</comment>       <comment xml:lang="ro">Carnețel Mathematica</comment>       <comment xml:lang="ru">Mathematica Notebook</comment>       <comment xml:lang="sk">Zošit Mathematica</comment>       <comment xml:lang="sl">Datoteka dokumenta Mathematica</comment>       <comment xml:lang="sq">Notebook matematike</comment>       <comment xml:lang="sv">Mathematica Notebook-dokument</comment>       <comment xml:lang="uk">математичний записник</comment>       <comment xml:lang="vi">Cuốn vở Mathematica</comment>       <comment xml:lang="zh_CN">Mathematica 记事</comment>       <sub-class-of type="text/plain"/>       <generic-icon name="x-office-document"/>       <glob pattern="*.nb"/>       <alias type="application/x-mathematica"/>     </mime-type>      But I don't know how to change the icon. I even don't know if that file is being used. I guess that the line `<generic-icon name="x-office-document"/>` is the main line but what should I write therein? For example, how to use ![this as icons for nb files](http://i.stack.imgur.com/rhdmx.png) as icons for `nb` files?


title: SED not Deleting lines

text: Can anyone tell me why sed fails to delete the lines containing `0` in the last column. I have used the following and nothing seems to work.               sed "/0/d"     sed "/ 0 /d"     sed "/\t0\n/d"     sed "/0\n/d"      Output:                93000000       95       95       3328   0      99000000       96       96       3206   0      99000000       96       96       3210   0      99000000       96       96       3215   0      99000000       96       96       3224   0      99000000       96       96       3230   0      99000000       96       96       3236   0      99000000       96       96       3268   0      99000000       96       96       3292   0      99000000       96       96       3459   0      591000000      85       85       2      2 CDL (control)      321000000      40       40       109    4.2 COZI-TV      585000000      84       84       8      8 NJTV      585000000      84       84       8134   10 WTBY      543000000      77       77       710    10.1 WLNY-10      585000000      84       84       62     12 N12WC      657000000      101      101      1014   14 OPTCH


title: How to troubleshoot systemd's "contradicts existing jobs" error message

text: Looking through my system logs, I see the following message in `/var/log/messages`:               Sep  2 15:29:15 <myhostname> systemd[1]: Requested transaction contradicts existing jobs: File exists      So, my question is: How do I troubleshoot this error? What steps should I take to understand what this means, what is causing it, whether it is something to be worried about, and if so, how to correct it? And, what is the meaning of the message "Requested transaction contradicts existing jobs"? I suspect there must be conceptual background that I am missing. In any case, does this error message suggest some candidate next steps to diagnose the cause of this error message and understand what is causing it? I've read the systemd docs, but I did not find them helpful with this. It'd be great to have a general guide on what to look for: I suspect this might be helpful to others who also experience the "... contradicts existing jobs" message.


title: Slide show/screensaver over login screen on RHEL 6.4

text: I've see the slide show (Pictures folder) screensaver. I've also seen how to change the background behind my login screen. What I haven't been able to figure out is how to display a slide show as a screensaver over my login screen. Can someone please point me in the right direction?


title: Where to put scripts only to be called by another script?

text: I've written a basic command line application composed of multiple bash scripts. One of these is intended to be run by any user of the computer, so I understand the correct location for this would be `/usr/local/bin/`. The other scripts should not be directly run by the user, but called only by the first script. Security isn't an issue here, I don't mind if the user goes to the trouble of finding their exact path and executing them from there, but I don't want them in a path that means they can be called from anywhere. Currently I've got them all in `/usr/sbin/my_app_name/` but I understand I shouldn't really be putting stuff there. But where should I put such scripts? Ideally I'd like to just move the `my_app_name` folder, which contains the scripts, to the correct location.


title: Convert ASCII-8BIT to UTF-8 using OSX' .bash_profile

text: When running certain rails scripts in OSX' Terminal, I get warnings such as the following:               unable to convert "\xA9" from ASCII-8BIT to UTF-8 for tmp/cache/assets/CC7/4D0/sprockets%2Fd7d58761510113ba5435f0baba05573b, skipping      I've added               export LC_CTYPE="utf-8"      to my `.bash_profile`, but that did not fix anything. Apparently, these warnings don't matter, but I want to fix them. They're literally hundreds of them and they're a bit annoying.


title: Java application locks up after playing sound

text: Our Java application plays short notification sounds periodically (in response to user actions). On some hardward, our application will lock up after the 3rd or 4th short sound. We have to `pkill java` to recover. We have the application installed on around 40 computers. All are running Linux. Half have Kubuntu 12.04 installed, half have Linux Mint 11 installed. All the Linux Mint 11 machines work fine and the Java app plays sound without locking up. Initially (from the release of 12.04) all the Kubuntu machines also worked fine. At some point, after an update, the Kubuntu machines started locking up when sound was played. If we turn off the sound notification option in our application, that is a workaround. The app will not lock up. But users want the sound. When we discovered the problem, we stopped running updates on the Kubuntu machines and all those without updates (from months ago) continue to play sound from our app without the app freezing. Even on the updated Kubuntu machines, lock up problem does not occur on all hardware. For example, on a Thinkpad X220 tablet, sound in our app works without problems. But on a ThinkPad E430, enabling sound in our app causes our app to freeze. We cannot discover the pattern. What is causing the lockups on a recent Linux and some hardware while the older Linux is fine on all hardware we use? Here's the info on some hardware where we **do have** the problem:               uname -a     Linux mynetbook-AO532h 3.2.0-41-generic #66-Ubuntu SMP Thu Apr 25 03:27:11 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux     ################################################################################     lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 12.04.2 LTS     Release:    12.04     Codename:   precise     ################################################################################     aplay --list-devices     Home directory /home/myuser not ours.     **** List of PLAYBACK Hardware Devices ****     card 0: Intel [HDA Intel], device 0: ALC272X Analog [ALC272X Analog]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 1: Pro [Sound Blaster X-Fi Go! Pro], device 0: USB Audio [USB Audio]       Subdevices: 1/1       Subdevice #0: subdevice #0     ################################################################################     aplay --version     aplay: version 1.0.25 by Jaroslav Kysela <perex@perex.cz>     ################################################################################     cat /proc/asound/cards      0 [Intel          ]: HDA-Intel - HDA Intel                           HDA Intel at 0x58200000 irq 44      1 [Pro            ]: USB-Audio - Sound Blaster X-Fi Go! Pro                           Creative Technology Ltd Sound Blaster X-Fi Go! Pro at usb-0000:00:1d.1-1, full      ################################################################################     hwinfo --sound     process 2393: arguments to dbus_move_error() were incorrect, assertion "(dest) == NULL || !dbus_error_is_set ((dest))" failed in file ../../dbus/dbus-errors.c line 282.     This is normally a bug in some application using the D-Bus library.     libhal.c 3483 : Error unsubscribing to signals, error=The name org.freedesktop.Hal was not provided by any .service files     11: PCI 1b.0: 0403 Audio device       [Created at pci.318]       Unique ID: u1Nb.ZCVQnTUjxO7       SysFS ID: /devices/pci0000:00/0000:00:1b.0       SysFS BusID: 0000:00:1b.0       Hardware Class: sound       Model: "Intel 82801G (ICH7 Family) High Definition Audio Controller"       Vendor: pci 0x8086 "Intel Corporation"       Device: pci 0x27d8 "82801G (ICH7 Family) High Definition Audio Controller"       SubVendor: pci 0x1025 "Acer Incorporated [ALI]"       SubDevice: pci 0x0349        Revision: 0x02       Driver: "snd_hda_intel"       Driver Modules: "snd_hda_intel"       Memory Range: 0x58200000-0x58203fff (rw,non-prefetchable)       IRQ: 44 (262 events)       Module Alias: "pci:v00008086d000027D8sv00001025sd00000349bc04sc03i00"       Driver Info #0:         Driver Status: snd_hda_intel is active         Driver Activation Cmd: "modprobe snd_hda_intel"       Config Status: cfg=new, avail=yes, need=no, active=unknown     ################################################################################     lsmod     Module                  Size  Used by     joydev                 17693  0      rfcomm                 47604  0      bnep                   18281  2      bluetooth             180153  10 rfcomm,bnep     parport_pc             32866  0      ppdev                  17113  0      acer_wmi               28418  0      sparse_keymap          13890  1 acer_wmi     snd_hda_codec_realtek   224173  1      snd_hda_intel          33719  3      snd_hda_codec         127706  2 snd_hda_codec_realtek,snd_hda_intel     snd_usb_audio         122982  2      snd_pcm                97275  3 snd_hda_intel,snd_hda_codec,snd_usb_audio     snd_hwdep              17764  2 snd_hda_codec,snd_usb_audio     snd_usbmidi_lib        29476  1 snd_usb_audio     arc4                   12529  2      snd_seq_midi           13324  0      snd_rawmidi            30748  2 snd_usbmidi_lib,snd_seq_midi     snd_seq_midi_event     14899  1 snd_seq_midi     cp210x                 21898  0      usbserial              47077  1 cp210x     ath9k                 132428  0      uvcvideo               72627  0      psmouse                97485  0      snd_seq                61929  2 snd_seq_midi,snd_seq_midi_event     videodev               98259  1 uvcvideo     mac80211              506862  1 ath9k     serio_raw              13211  0      v4l2_compat_ioctl32    17128  1 videodev     ath9k_common           14053  1 ath9k     ath9k_hw              411239  2 ath9k,ath9k_common     snd_timer              29990  2 snd_pcm,snd_seq     ath                    24067  3 ath9k,ath9k_common,ath9k_hw     snd_seq_device         14540  3 snd_seq_midi,snd_rawmidi,snd_seq     cfg80211              205774  3 ath9k,mac80211,ath     snd                    79041  21 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_pcm,snd_hwdep,snd_usbmidi_lib,snd_rawmidi,snd_seq,snd_timer,snd_seq_device     soundcore              15091  1 snd     snd_page_alloc         18529  2 snd_hda_intel,snd_pcm     mac_hid                13253  0      lp                     17799  0      parport                46562  3 parport_pc,ppdev,lp     usbhid                 47238  0      hid                    99636  1 usbhid     i915                  477763  3      drm_kms_helper         46978  1 i915     drm                   241971  4 i915,drm_kms_helper     atl1c                  41718  0      i2c_algo_bit           13423  1 i915     wmi                    19256  1 acer_wmi     video                  19651  1 i915     ################################################################################     cat /etc/modprobe.d/blacklist.conf     # This file lists those modules which we don't want to be loaded by     # alias expansion, usually so some other driver will be loaded for the     # device instead.          # evbug is a debug tool that should be loaded explicitly     blacklist evbug          # these drivers are very simple, the HID drivers are usually preferred     blacklist usbmouse     blacklist usbkbd          # replaced by e100     blacklist eepro100          # replaced by tulip     blacklist de4x5          # causes no end of confusion by creating unexpected network interfaces     blacklist eth1394          # snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much     # hardware on its own (Ubuntu bug #2011, #6810)     blacklist snd_intel8x0m          # Conflicts with dvb driver (which is better for handling this device)     blacklist snd_aw2          # causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)     blacklist i2c_i801          # replaced by p54pci     blacklist prism54          # replaced by b43 and ssb.     blacklist bcm43xx          # most apps now use garmin usb driver directly (Ubuntu: #114565)     blacklist garmin_gps          # replaced by asus-laptop (Ubuntu: #184721)     blacklist asus_acpi          # low-quality, just noise when being used for sound playback, causes     # hangs at desktop session start (Ubuntu: #246969)     blacklist snd_pcsp          # ugly and loud noise, getting on everyone's nerves; this should be done by a     # nice pulseaudio bing (Ubuntu: #77010)     blacklist pcspkr          # EDAC driver for amd76x clashes with the agp driver preventing the aperture     # from being initialised (Ubuntu: #297750). Blacklist so that the driver     # continues to build and is installable for the few cases where its     # really needed.     blacklist amd76x_edac     ################################################################################     cat /etc/modprobe.d/alsa-base.conf     # autoloader aliases     install sound-slot-0 /sbin/modprobe snd-card-0     install sound-slot-1 /sbin/modprobe snd-card-1     install sound-slot-2 /sbin/modprobe snd-card-2     install sound-slot-3 /sbin/modprobe snd-card-3     install sound-slot-4 /sbin/modprobe snd-card-4     install sound-slot-5 /sbin/modprobe snd-card-5     install sound-slot-6 /sbin/modprobe snd-card-6     install sound-slot-7 /sbin/modprobe snd-card-7          # Cause optional modules to be loaded above generic modules     install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }     #     # Workaround at bug #499695 (reverted in Ubuntu see LP #319505)     install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }     install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }     install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }     #     install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }     # Cause optional modules to be loaded above sound card driver modules     install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }     install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }          # Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)     install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }     # Prevent abnormal drivers from grabbing index 0     options bt87x index=-2     options cx88_alsa index=-2     options saa7134-alsa index=-2     options snd-atiixp-modem index=-2     options snd-intel8x0m index=-2     options snd-via82xx-modem index=-2     options snd-usb-audio index=-2     options snd-usb-caiaq index=-2     options snd-usb-ua101 index=-2     options snd-usb-us122l index=-2     options snd-usb-usx2y index=-2     # Ubuntu #62691, enable MPU for snd-cmipci     options snd-cmipci mpu_port=0x330 fm_port=0x388     # Keep snd-pcsp from being loaded as first soundcard     options snd-pcsp index=-2     # Keep snd-usb-audio from beeing loaded as first soundcard     options snd-usb-audio index=-2     ################################################################################     lspci -vvx     [snip]     00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)         Subsystem: Acer Incorporated [ALI] Device 0349         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-         Latency: 0, Cache Line Size: 64 bytes         Interrupt: pin A routed to IRQ 44         Region 0: Memory at 58200000 (64-bit, non-prefetchable) [size=16K]         Capabilities: [50] Power Management version 2             Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)             Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-         Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+             Address: 00000000fee0300c  Data: 4179         Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00             DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us                 ExtTag- RBE- FLReset-             DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-                 RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+                 MaxPayload 128 bytes, MaxReadReq 128 bytes             DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-             LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us                 ClockPM- Surprise- LLActRep- BwNot-             LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-                 ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-             LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-         Capabilities: [100 v1] Virtual Channel             Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1             Arb:    Fixed- WRR32- WRR64- WRR128-             Ctrl:   ArbSelect=Fixed             Status: InProgress-             VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                 Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-                 Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01                 Status: NegoPending- InProgress-             VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-                 Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-                 Ctrl:   Enable+ ID=1 ArbSelect=Fixed TC/VC=80                 Status: NegoPending- InProgress-         Capabilities: [130 v1] Root Complex Link             Desc:   PortNumber=0f ComponentID=02 EltType=Config             Link0:  Desc:   TargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+                 Addr:   00000000fed1c000         Kernel driver in use: snd_hda_intel         Kernel modules: snd-hda-intel     00: 86 80 d8 27 06 04 10 00 02 00 03 04 10 00 00 00     10: 04 00 20 58 00 00 00 00 00 00 00 00 00 00 00 00     20: 00 00 00 00 00 00 00 00 00 00 00 00 25 10 49 03     30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 01 00 00     [snip]      Here's a similar report for a machine that **does not** exhibit the problem:               uname -a     Linux netbook-Gate 3.2.0-41-generic-pae #66-Ubuntu SMP Thu Apr 25 03:50:20 UTC 2013 i686 i686 i386 GNU/Linux     ################################################################################     lsb_release -a     No LSB modules are available.     Distributor ID: Ubuntu     Description:    Ubuntu 12.04.2 LTS     Release:    12.04     Codename:   precise     ################################################################################     aplay --list-devices     Home directory /home/me not ours.     **** List of PLAYBACK Hardware Devices ****     card 0: ICH6 [Intel ICH6], device 0: Intel ICH [Intel ICH6]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: ICH6 [Intel ICH6], device 4: Intel ICH - IEC958 [Intel ICH6 - IEC958]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 1: Pro [Sound Blaster X-Fi Go! Pro], device 0: USB Audio [USB Audio]       Subdevices: 1/1       Subdevice #0: subdevice #0     ################################################################################     aplay --version     aplay: version 1.0.25 by Jaroslav Kysela <perex@perex.cz>     ################################################################################     cat /proc/asound/cards      0 [ICH6           ]: ICH4 - Intel ICH6                           Intel ICH6 with Cx20468-31 at irq 21      1 [Pro            ]: USB-Audio - Sound Blaster X-Fi Go! Pro                           Creative Technology Ltd Sound Blaster X-Fi Go! Pro at usb-0000:00:1d.0-1, full      ################################################################################     hwinfo --sound     process 2510: arguments to dbus_move_error() were incorrect, assertion "(dest) == NULL || !dbus_error_is_set ((dest))" failed in file ../../dbus/dbus-errors.c line 282.     This is normally a bug in some application using the D-Bus library.     libhal.c 3483 : Error unsubscribing to signals, error=The name org.freedesktop.Hal was not provided by any .service files     18: PCI 1e.2: 0401 Multimedia audio controller       [Created at pci.318]       Unique ID: r0Vg.2VcHkXp8YSA       SysFS ID: /devices/pci0000:00/0000:00:1e.2       SysFS BusID: 0000:00:1e.2       Hardware Class: sound       Model: "Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller"       Vendor: pci 0x8086 "Intel Corporation"       Device: pci 0x266e "82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller"       SubVendor: pci 0x107b "Gateway 2000"       SubDevice: pci 0x0365        Revision: 0x04       Driver: "snd_intel8x0"       Driver Modules: "snd_intel8x0"       I/O Ports: 0x1c00-0x1cff (rw)       I/O Ports: 0x18c0-0x18ff (rw)       Memory Range: 0xb0040800-0xb00409ff (rw,non-prefetchable)       Memory Range: 0xb0040400-0xb00404ff (rw,non-prefetchable)       IRQ: 21 (58 events)       Module Alias: "pci:v00008086d0000266Esv0000107Bsd00000365bc04sc01i00"       Driver Info #0:         Driver Status: snd_intel8x0 is active         Driver Activation Cmd: "modprobe snd_intel8x0"       Config Status: cfg=new, avail=yes, need=no, active=unknown     ################################################################################     lsmod     Module                  Size  Used by     michael_mic            12540  4      arc4                   12473  2      lib80211_crypt_tkip    17275  1      lib80211_crypt_ccmp    12789  1      rfcomm                 38139  0      bnep                   17830  2      bluetooth             158479  10 rfcomm,bnep     parport_pc             32114  0      ppdev                  12849  0      snd_usb_audio         101566  2      snd_hwdep              13276  1 snd_usb_audio     snd_usbmidi_lib        24588  1 snd_usb_audio     joydev                 17393  0      snd_intel8x0           33455  2      snd_ac97_codec        110213  1 snd_intel8x0     ac97_bus               12642  1 snd_ac97_codec     snd_pcm                80916  3 snd_usb_audio,snd_intel8x0,snd_ac97_codec     snd_seq_midi           13132  0      snd_rawmidi            25424  2 snd_usbmidi_lib,snd_seq_midi     snd_seq_midi_event     14475  1 snd_seq_midi     pcmcia                 39826  0      snd_seq                51592  2 snd_seq_midi,snd_seq_midi_event     snd_timer              28931  2 snd_pcm,snd_seq     snd_seq_device         14172  3 snd_seq_midi,snd_rawmidi,snd_seq     cp210x                 21610  0      psmouse                86520  0      ipw2200               146241  0      libipw                 46732  1 ipw2200     tifm_7xx1              12937  0      cfg80211              178877  2 ipw2200,libipw     usbserial              37173  1 cp210x     tifm_core              15040  1 tifm_7xx1     snd                    62218  18 snd_usb_audio,snd_hwdep,snd_usbmidi_lib,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device     yenta_socket           27465  0      serio_raw              13027  0      pcmcia_rsrc            18367  1 yenta_socket     soundcore              14635  1 snd     pcmcia_core            21511  3 pcmcia,yenta_socket,pcmcia_rsrc     lib80211               14040  4 lib80211_crypt_tkip,lib80211_crypt_ccmp,ipw2200,libipw     snd_page_alloc         14108  2 snd_intel8x0,snd_pcm     mac_hid                13077  0      lp                     17455  0      parport                40930  3 parport_pc,ppdev,lp     usbhid                 41937  0      hid                    77428  1 usbhid     i915                  423564  2      firewire_ohci          40172  0      sdhci_pci              18324  0      firewire_core          56940  1 firewire_ohci     crc_itu_t              12627  1 firewire_core     sdhci                  28241  1 sdhci_pci     drm_kms_helper         45466  1 i915     drm                   197641  3 i915,drm_kms_helper     i2c_algo_bit           13199  1 i915     video                  19115  1 i915     sky2                   53628  0      ################################################################################     cat /etc/modprobe.d/blacklist.conf     # This file lists those modules which we don't want to be loaded by     # alias expansion, usually so some other driver will be loaded for the     # device instead.          # evbug is a debug tool that should be loaded explicitly     blacklist evbug          # these drivers are very simple, the HID drivers are usually preferred     blacklist usbmouse     blacklist usbkbd          # replaced by e100     blacklist eepro100          # replaced by tulip     blacklist de4x5          # causes no end of confusion by creating unexpected network interfaces     blacklist eth1394          # snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much     # hardware on its own (Ubuntu bug #2011, #6810)     blacklist snd_intel8x0m          # Conflicts with dvb driver (which is better for handling this device)     blacklist snd_aw2          # causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)     blacklist i2c_i801          # replaced by p54pci     blacklist prism54          # replaced by b43 and ssb.     blacklist bcm43xx          # most apps now use garmin usb driver directly (Ubuntu: #114565)     blacklist garmin_gps          # replaced by asus-laptop (Ubuntu: #184721)     blacklist asus_acpi          # low-quality, just noise when being used for sound playback, causes     # hangs at desktop session start (Ubuntu: #246969)     blacklist snd_pcsp          # ugly and loud noise, getting on everyone's nerves; this should be done by a     # nice pulseaudio bing (Ubuntu: #77010)     blacklist pcspkr          # EDAC driver for amd76x clashes with the agp driver preventing the aperture     # from being initialised (Ubuntu: #297750). Blacklist so that the driver     # continues to build and is installable for the few cases where its     # really needed.     blacklist amd76x_edac     ################################################################################     cat /etc/modprobe.d/alsa-base.conf     # autoloader aliases     install sound-slot-0 /sbin/modprobe snd-card-0     install sound-slot-1 /sbin/modprobe snd-card-1     install sound-slot-2 /sbin/modprobe snd-card-2     install sound-slot-3 /sbin/modprobe snd-card-3     install sound-slot-4 /sbin/modprobe snd-card-4     install sound-slot-5 /sbin/modprobe snd-card-5     install sound-slot-6 /sbin/modprobe snd-card-6     install sound-slot-7 /sbin/modprobe snd-card-7          # Cause optional modules to be loaded above generic modules     install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }     #     # Workaround at bug #499695 (reverted in Ubuntu see LP #319505)     install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }     install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }     install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }     #     install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }     # Cause optional modules to be loaded above sound card driver modules     install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }     install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }          # Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)     install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }     # Prevent abnormal drivers from grabbing index 0     options bt87x index=-2     options cx88_alsa index=-2     options saa7134-alsa index=-2     options snd-atiixp-modem index=-2     options snd-intel8x0m index=-2     options snd-via82xx-modem index=-2     options snd-usb-audio index=-2     options snd-usb-caiaq index=-2     options snd-usb-ua101 index=-2     options snd-usb-us122l index=-2     options snd-usb-usx2y index=-2     # Ubuntu #62691, enable MPU for snd-cmipci     options snd-cmipci mpu_port=0x330 fm_port=0x388     # Keep snd-pcsp from being loaded as first soundcard     options snd-pcsp index=-2     # Keep snd-usb-audio from beeing loaded as first soundcard     options snd-usb-audio index=-2     ################################################################################     lspci -vvx          00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 04)         Subsystem: Gateway 2000 Device 0365         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-         Latency: 0         Interrupt: pin A routed to IRQ 21         Region 0: I/O ports at 1c00 [size=256]         Region 1: I/O ports at 18c0 [size=64]         Region 2: Memory at b0040800 (32-bit, non-prefetchable) [size=512]         Region 3: Memory at b0040400 (32-bit, non-prefetchable) [size=256]         Capabilities: [50] Power Management version 2             Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)             Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-         Kernel driver in use: snd_intel8x0         Kernel modules: snd-intel8x0     00: 86 80 6e 26 07 00 90 02 04 00 01 04 00 00 00 00     10: 01 1c 00 00 c1 18 00 00 00 08 04 b0 00 04 04 b0     20: 00 00 00 00 00 00 00 00 00 00 00 00 7b 10 65 03     30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 01 00 00


title: Why does shell Command Substitution gobble up a trailing newline char?

text: As per the following example, and as in my recent question _In bash, where has the trailing newline char gone?_ , I want to know "why" it happens                 x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p      # Output is: 610a62      # The trailing newline from the 'echo' command     #   has been "deleted" by Command Substitution      I assume there must be some _very_ significant reason for a shell action, namely Command Substitution, to actually delete some data from the command output it is substituting...   but I can't get my head around this one, as it seems to be the antithesis of what it is _supposed_ to do.. ie. to pass the output of a command back into the script process... Holding back one character seems weird to me, but I suppose there is a sensible reason for it... I'm keen to find out what that reason is...


title: Send an email right before the password prompt of ecryptfs during bootup

text: I'm setting up a home server which has full disk encryption enabled. In order to recover from a power failure the machine automatically reboots. I'm also able to unlock the disk remotely using ssh according to this topic: SSH to decrypt encrypted LVM during headless server boot? The only thing missing is that I'm not informed when the machine reboots so that I know when to unlock the disk again. Is there some kind of built-in functionality in GRUB2 that helps me achieve this or is my only option to set up an external site monitoring service?


title: sftp from Unix server to Window

text: I am trying to `sftp` from a Unix box to my computer. I'm use the command:               sftp userid@ipaddr      where "ipaddr" is the IP Address of my computer. But I'm unable to connect. I tried with `ftp` and `sftpg3`, but I'm getting this error `Couldn't read packet: Connection reset by peer`. How can I troubleshoot this error?


title: apt-cache policy gimp libgegl-0.2-0

text: I have tried to install Gimp on my Ubuntu 14.04, but I encountered an error:               root@vitor-pc:~# LANG=C apt-get -f install     Reading package lists... Done     Building dependency tree            Reading state information... Done     0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     root@vitor-pc:~# LANG=C apt-get install gimp      Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:     gimp : Depends: libgegl-0.2-0 (>= 0.2.0) but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      And I already to tried this solution How do I resolve unmet dependencies?. However, I still get the above message. How can I fix this? * * * `apt-cache policy <package>`:               vitor@vitor-pc:~$ LANG=C apt-cache policy gimp libgegl-0.2-0     gimp:     Installed: (none)     Candidate: 2.8.10-0ubuntu1     Version table:         2.8.10-0ubuntu1 0         500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages         2.8.10-0trusty4~ppa 0         500 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/   trusty/main i386 Packages          2.8.8~trusty~NoobsLab.com 0         500 http://ppa.launchpad.net/noobslab/ppa-gimp/ubuntu/ trusty/main i386   Packages         libgegl-0.2-0:         Installed: (none)         Candidate: 0.2.1-3~trusty~Noobslab.com         Version table:         0.2.1-3~trusty~Noobslab.com 0         500 http://ppa.launchpad.net/noobslab/ppa-gimp/ubuntu/ trusty/main  i386    Packages      0.2.0-4ubuntu1 0         500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages      * * * `apt-cache policy`:               root@vitor-pc:~# LANG=C apt-cache policy     Package files:     100 /var/lib/dpkg/status      release a=now      500 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/ trusty/main i386  Packages      release v=14.04,o=LP-PPA-otto-kesselgulasch-gimp,a=trusty,n=trusty,l=gimp,c=main      origin ppa.launchpad.net      500 http://ppa.launchpad.net/noobslab/ppa-gimp/ubuntu/ trusty/main i386 Packages      release v=14.04,o=LP-PPA-noobslab-ppa-gimp,a=trusty,n=trusty,l=Gimp,c=main      origin ppa.launchpad.net      500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ trusty/main i386 Packages      release v=14.04,o=LP-PPA-libreoffice,a=trusty,n=trusty,l=LibreOffice PPA,c=main      origin ppa.launchpad.net      500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ trusty/main i386 Packages      release v=14.04,o=LP-PPA-kubuntu-ppa-backports,a=trusty,n=trusty,l=Kubuntu Backports,c=main      origin ppa.launchpad.net     500 http://ppa.launchpad.net/irie/blender/ubuntu/ trusty/main i386 Packages      release v=14.04,o=LP-PPA-irie-blender,a=trusty,n=trusty,l=PPA for Blender  2.4 and 2.7,c=main      origin ppa.launchpad.net     500 http://ppa.launchpad.net/inkscape.dev/trunk/ubuntu/ trusty/main i386 Packages      release v=14.04,o=LP-PPA-inkscape.dev-trunk,a=trusty,n=trusty,l=Inkscape Trunk,c=main      origin ppa.launchpad.net     500 http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages      release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main      origin dl.google.com     500 http://extras.ubuntu.com/ubuntu/ trusty/main i386 Packages      release v=14.04,o=LP-PPA-app-review-board,a=trusty,n=trusty,l=Application Review Board PPA,c=main      origin extras.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-security/universe Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-security/restricted Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-security/multiverse Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-security/main Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-security/multiverse i386 Packages      release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=multiverse      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-security/universe i386 Packages      release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=universe      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-security/restricted i386 Packages      release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=restricted      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-security/main i386 Packages      release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-backports/universe Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-backports/restricted Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-backports/multiverse Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-backports/main Translation-en     100 http://archive.ubuntu.com/ubuntu/ trusty-backports/multiverse i386 Packages      release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=multiverse      origin archive.ubuntu.com     100 http://archive.ubuntu.com/ubuntu/ trusty-backports/universe i386 Packages      release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=universe      origin archive.ubuntu.com     100 http://archive.ubuntu.com/ubuntu/ trusty-backports/restricted i386 Packages      release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=restricted      origin archive.ubuntu.com     100 http://archive.ubuntu.com/ubuntu/ trusty-backports/main i386 Packages      release v=14.04,o=Ubuntu,a=trusty-backports,n=trusty,l=Ubuntu,c=main      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse i386 Packages      release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=multiverse      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe i386 Packages      release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=universe      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/restricted i386 Packages      release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=restricted      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages      release v=14.04,o=Ubuntu,a=trusty-updates,n=trusty,l=Ubuntu,c=main      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty/universe Translation-pt_BR     500 http://archive.ubuntu.com/ubuntu/ trusty/universe Translation-pt     500 http://archive.ubuntu.com/ubuntu/ trusty/universe Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty/restricted Translation-pt_BR     500 http://archive.ubuntu.com/ubuntu/ trusty/restricted Translation-pt     500 http://archive.ubuntu.com/ubuntu/ trusty/restricted Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse Translation-pt_BR     500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse Translation-pt     500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty/main Translation-pt_BR     500 http://archive.ubuntu.com/ubuntu/ trusty/main Translation-pt     500 http://archive.ubuntu.com/ubuntu/ trusty/main Translation-en     500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages      release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages      release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty/restricted i386 Packages      release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted      origin archive.ubuntu.com     500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages      release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main      origin archive.ubuntu.com      Pinned packages:


title: Low level system call

text: C provides library functions such as write(),read().. for system calls.How to make a system call without using any library in linux in C ?


title: How to build gcc inside a Debian chroot?

text: I used `debootstrap` to set up a minimal Debian system (x86):               debootstrap wheezy /var/chroot http://ftp.debian.org/debian/      Then I entered the chroot and installed some packages:               apt-get install build-essential m4 flex bison libgmp-dev libmpfr-dev      I'm trying to build gcc 4.1.3 (don't ask why). I configured it as follows:               ./configure --prefix=/usr/local --program-suffix=-4.1.3 --enable-languages=c,c++      It ran for a few minutes, and then it failed with errors like:               In file included from /usr/include/stdio.h:28,                      from ../.././gcc/tsystem.h:90,                      from ../.././gcc/crtstuff.c:68:     /usr/include/features.h:323:26: error: bits/predefs.h: No such file or directory     /usr/include/features.h:356:25: error: sys/cdefs.h: No such file or directory     /usr/include/features.h:388:23: error: gnu/stubs.h: No such file or directory     In file included from ../.././gcc/tsystem.h:90,                      from ../.././gcc/crtstuff.c:68:     /usr/include/stdio.h:36:25: error: bits/types.h: No such file or directory     In file included from ../.././gcc/tsystem.h:90,                      from ../.././gcc/crtstuff.c:68:      However, I have no trouble building a small program that uses `stdio.h`. So I can compile stuff, but not gcc, apparently. What additional installation/configuration has to be done to the chroot in order to make it possible to build gcc?


title: How do I extract all subjects of a cacertfile with the openssl command line?

text: Is there an openssl command to extract all certifacte subjects of a cacertfile (a file containing several certificates like /etc/ssl/certs/ca- certificates.crt)? I tried `openssl x509 -in /etc/ssl/certs/ca-certificates.crt -noout -subject` but it only gives me the subject of the first certificate.


title: How can you log every command typed

text: **How can you log every command someone has entered into the shell?** I'm asking on both the basis of protecting yourself if you are logged into someone else's server and something breaks, or if someone else is logged into your server (either intentionally or maliciously). Even a novice can bypass history with `unset history` or create a new shell to hide their tracks. I'm curious how the senior linux admins track what commands have been entered / changes made to the system.


title: To recover my system so it shut down normally?

text: I have Linux mint 13(ubuntu 12.04) installed on my thinkpad T520, running for around 1 year. I'm not able to shut down my machine even if I do: `sudo shutdown now`. At first, it halts after messages of collectmon signal caught and modem-manager signal caught: ![signal caught](http://i.stack.imgur.com/8x1Qa.jpg) I uninstalled both programs. Now it halts "my_username login:". If I shutdown right before login, I have this screen: ![before login](http://i.stack.imgur.com/rCLl1.jpg) And it still refuses to shutdown.I suspect it might be a result after I disabled some of the service through boot-up manager. I didn't take notes exactly what I did and neither there were any problems at that moment. I would like to know what prevents the machine to shut down. Now, I have to press the shut down button every time, which is annoying. This is the screen capture of the services that are still disabled: ![ss of services #1](http://i.stack.imgur.com/4sYJe.jpg) ![ss of services #2](http://i.stack.imgur.com/dtkbs.jpg) ![ss of services #3](http://i.stack.imgur.com/eB8sj.jpg) ![ss of services #4](http://i.stack.imgur.com/3adLi.jpg) ![ss of services #5](http://i.stack.imgur.com/7cAGh.jpg) The link to the original images is here. `ls /etc/init.d/*net*`               /etc/init.d/networking                   /etc/init.d/network-interface-security     /etc/init.d/network-interface            /etc/init.d/network-manager     /etc/init.d/network-interface-container      `ls /etc/init.d/acpid`               /etc/init.d/acpid      `ls /etc/rc0.d/`               K01mdm                  K20vboxautostart-service    S20sendsigs     K01tlp                  K20vboxballoonctrl-service  S30urandom     K09apache2              K20vboxdrv                  S31umountnfs.sh     K10unattended-upgrades  K20vboxweb-service          S35networking     K20acpid                K20virtualbox-guest-utils   S40umountfs     K20hddtemp              K20wicd                     S48cryptdisks     K20mbmon                K20winbind                  S59cryptdisks-early     K20network-interface    K80openvpn                  S60umountroot     K20network-manager      K95collectd                 S90halt     K20speech-dispatcher    README


title: Courier IMAP cannot find my Maildir but can find root's Maildir

text: I'm running into a weird issue setting up Postfix and Courier IMAP on a clean Ubuntu 13.04 install. I'm using this tutorial, and am currently Testing Courier IMAP. When I try to login with root, everything's fine (this is part of a netcat connection):               a login root my-pass     a OK LOGIN Ok.     a logout     * BYE Courier-IMAP server shutting down     a OK LOGOUT completed      However, when I try to login with my own account, I get an error:               a login camilstaps my-other-pass     * BYE [ALERT] Fatal error: No such file or directory: No such file or directory      The mail.log:               Jun  2 13:47:37 cs imapd: Connection, ip=[::ffff:127.0.0.1] # this is the root login     Jun  2 13:47:51 cs imapd: LOGIN, user=root, ip=[::ffff:127.0.0.1], port=[54630], protocol=IMAP     Jun  2 13:48:11 cs imapd: LOGOUT, user=root, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=9, sent=80, time=20     Jun  2 13:50:59 cs imapd: Connection, ip=[::ffff:127.0.0.1] # this is the other login     Jun  2 13:51:07 cs imapd: chdir Maildir: No such file or directory     Jun  2 13:51:07 cs imapd: camilstaps: No such file or directory      And the mail.err, not really adding something:               Jun  2 13:51:07 cs imapd: camilstaps: No such file or directory      I configured Postfix to use the Maildir format using `/var/mail/%u` where `%u` is the username. At first, I thought the camilstaps user missed his mail folder. However, it does have one similar to root's one:               root@cs:/# tree -CdA /var/mail     /var/mail     ├── camilstaps     │   └── Maildir     │       ├── cur     │       ├── new     │       └── tmp     └── root         └── Maildir             ├── cur             ├── new             └── tmp      Then I thought the camilstaps user had a different maildir in the MAIL constant, however...               root@cs:/# echo $MAIL     /var/mail/root     camilstaps@cs:/$ echo $MAIL     /var/mail/camilstaps      What's going on here? How can I fix this? For what it's worth, I'm on Ubuntu Server 13.04. * * * With help from the comments, I found out something interesting / possibly useful:   * There was an old Maildir in `/root`. When I remove that one, I get the same error when logging in as root to the IMAP server.   * When I add a Maildir directory to the homedir of the camilstaps user, I don't get the error anymore. For some reason, the IMAP server doesn't look in `/var/mail/%u` (`%u` = username) but in `%h/Maildir` (`%h` = homedir). The `$MAIL` variable has been set correctly, so what could be the problem here?


title: Python.h: No such file or directory

text: I'm tring to build omniORB 4.1.6 under Arch Linux, however when I type `make`, here is the message:               ../../../../../src/tool/omniidl/cxx/idlpython.cc:188:26: fatal error:  python3.3/Python.h: No such file or directory     #  include PYTHON_INCLUDE      I'm sure both python3 and pyhon2 were installed, and I can remember last time I was tring to do the same thing under Linux Mint I met the same problem, that time I used this command to solve the problem:               sudo apt-get install python-dev      However, it seems Arch doesn't seperate python-dev with python, I checked my `/usr` and found Python.h under `/usr/include/python3.3m`, so what should I do for now？


title: can't view `split` output files with cat

text: File `a.txt` contains:               1 one     2 two     3 three     4 four     5 five     6 six      Then the command: `split -2 a.txt output_` yields as output three new files `output_aa`, `output_ab`, `output_ac` When I type: `cat output_aa` I received a message: `no such file or directory`. But I can view `output_aa` in gedit. Why?


title: Secure wipe (scrub) filesystem of VPS from VPS itself

text: I have a VPS I'm planning to delete. This particular cloud provider makes no guarantee that the data on the drive will be wiped before giving the disk to the next person. What's a **best effort** attempt I can make to secure-wipe sensitive data (whether existing as files **or as deleted data** ) on the drive?   * Assume the provider does not offer a separate, bootable OS to perform maintenance from   * If not every last bit of sensitive data can be guaranteed to be wiped, that's ok      * (I would have encrypted the data, if it were that critically sensitive!)


title: 64bit Linux or 32bit Linux with PAE kernel causes x server to crash on boot

text: I have a home server that was running 64bit Linux Mint with Core 2 Duo, 4GB ram, nvidia 7950GT, and RAID 0 two 150GB drives. It was running fine til the power supply failed and I had to replace it. When the power supply failed the video card also got fried unfortunately so I had to switch to an ATI card. I've tried an old Radeon X800 as well as a Radeon HD 4600. Both of these video cards have hard problems with X server in 64bit mode. Even trying to run a liveCD version of different distros they fail at 64bit. Is there a work around for getting 64bit to work? On a side note I've also tried enabling the PAE kernel while still in 32bit OS that also causes X server to crash on startup.


title: Move between different workspaces efficiently

text: Using GNOME here, I want to switch between different workspaces more efficiently -- by this I mean, suppose I am on `workspace #1` and I want to switch to `workspace #3` ... how do I that efficiently? The technique I follow is by pressing `Ctrl + Left Arrow` twice, which is highly unproductive. I am guessing there is a better way and hopefully without installing an external software (on Debian).


title: How to pipe the result of 'date' command to 'mv' command

text: I want to rename my file to the current timestamp.I know how to get the current timestamp("date +%s") but how can I pipe it to 'mv' command?


title: Xmonad: Float and resize windows to its "natural size"

text: In xmonad she standard behaviour of windows is that they are tiled. One can change this, if one uses for example xprop | grep WM_CLASS and puts something like this:               myManageHook = composeAll         [ className =? "MPlayer"        --> doFloat         , className =? "Gimp"           --> doFloat]      Then the windows of those programs float and have a **"natural size"** (as they would appear e.g. in gnome). Now my question is the following: Is it possible to do this "on the fly"? I can click and drag it with the mod-button1 held down and then resize it manually. However, it should resize automatically to it's "natural size". What can I change in my xmonad.hs to achieve this? Another possibility (which would be sufficient for me) would be to have some "starter script", lets call it xms: If I type `xms foo` the program foo is started floated and its windows have "natural size".


title: Which device uses which driver under Linux?

text: How can I find out or list that what drivers the devices in my pc use?


title: Linux Distro and Media Server Software choice

text: I'm going to be building a computer and setting it up as a media center for the guys I live with. The things I would like it to do are show up in iTunes as a shared library, and probably be able to stream videos and things from its harddrive to things like boxee but also game consoles if possible. Is there a specific software package that will let me do that or Is it going to be a little more difficult that that?


title: Mac OS X command-line tools - differences from FreeBSD

text: As I understand it many Mac OS X command-line tools (like `ls`, `cp`, `chmod`, `chown` etc.) are imported from FreeBSD.   * Which version of FreeBSD contains the command-line tools most compatible with the OS X ones?   * What are important differences?   * Are some of the tools imported from different systems (NetBSD, GNU...)? My intention is to build a free environment which would contain command-line tools closest to Mac OS X for testing simple shell scripts behaviour in Mac OS X like environment. The filesytem structure, devices or other aspects do not need to be similar.


title: Running ipython notebook on Debian

text: I'm trying to get ipython notebook to run on my Debian machine without much success. I've installed ipython and ipython-notebook via apt-get, but when I try to start it up I get the following:               $ ipython notebook     Could not start notebook. Please install ipython-notebook     $ dpkg -l ipython ipython-notebook     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                          Version             Architecture        Description     +++-=============================-===================-===================-===============================================================     ii  ipython                       1.2.1-2             all                 enhanced interactive Python shell     ii  ipython-notebook              1.2.1-2             all                 interactive Python html notebook     $ ipython --debug notebook             [TerminalIPythonApp] Config changed:     [TerminalIPythonApp] {'TerminalIPythonApp': {'log_level': 10}}     [TerminalIPythonApp] Using existing profile dir: u'/home/eyal/.config/ipython/profile_default'     [TerminalIPythonApp] Searching path [u'/home/eyal', u'/home/eyal/.config/ipython/profile_default'] for config files     [TerminalIPythonApp] Attempting to load config file: ipython_config.py     [TerminalIPythonApp] Config file ipython_config.py not found          [TerminalIPythonApp] Loading IPython extensions...     [TerminalIPythonApp] Loading IPython extension: storemagic     [TerminalIPythonApp] WARNING | File not found: u'notebook'     [TerminalIPythonApp] IPython not interactive...     $ dlocate ipython_config.py        ipython: /usr/lib/python2.7/dist-  packages/IPython/config/profile/math/ipython_config.py     ipython: /usr/lib/python2.7/dist-packages/IPython/config/profile/pysh/ipython_config.py     ipython: /usr/lib/python2.7/dist-packages/IPython/config/profile/sympy/ipython_config.py     ipython: /usr/lib/python2.7/dist-packages/IPython/config/profile/cluster/ipython_config.py      Note sure where it's looking for notebook or why it's not finding it. What am I missing?