title: Why does my Arch install hang at random stages during boot?

text: I've installed Arch on my Macbook Pro, and I can't get it to boot. I removed the `quiet` flag from grub.cfg to figure out what's going on, but I can't find any pattern. Here are the last few lines of three unsuccessful boots:               ...     [ OK ] Reached target Sound Card.     [ OK ] Created slice system-systemd\x2drfkill.slice.            Starting Load/Save RF Kill Switch Status of rfkill0...     [ OK ] Reached target Bluetooth.     [ OK ] Found device Hitachi_HTS[...blah blah blah...] EFI.             Mounting /boot...     [ OK ] Started Load/Save Screen Backlight Brightness of leds:smc::kbd_backlight.     [ OK ] Found device Hitachi_HTS[...blah blah blah...] home.            Starting File System Check on /dev/disk/bu-uuid/44[...valid UUID of my /home partition...]     [   7.420848] sd 6:0:0:0: [sdc] No caching mode page found     [   7.42... ] sd 6:0:0:0: [sdc] Assuming drive cache: write through     [   7.42... ] sd 6:0:0:0: [sdc] No caching mode page found     [   7.42... ] sd 6:0:0:0: [sdc] Assuming drive cache: write through     [   7.43... ] sd 6:0:0:0: [sdc] No caching mode page found     [   7.43... ] sd 6:0:0:0: [sdc] Assuming drive cache: write through      ^ Hangs here.               [ OK ] Started udev Coldplug all Devices.     [ OK ] Started Remount Root and Kernel File Systems            Starting Load/Save Random Seed...     [ OK ] Started Create Static Device Nodes in /dev.            Starting udev Kernel Device Manager...     [ OK ] Reached target Local File Systems (Pre).     [ OK ] Started udev Kernel Device Manager.     [ OK ] Started Load/Save Random Seed.     [ OK ] Reached target Sound Card.      ^ Hangs here.               [ OK ] Found device Hitachi_HTS[...blah blah blah...] EFI.            Mounting /boot...     [ OK ] Found device Hitachi_HTS[...blah blah blah...] home.            Starting File System Check on /dev/disk/bu-uuid/44[...valid UUID of my /home partition...]     [ OK ] Created slice system-systemd\x2backlight.slice.            Starting Load/Save Screen Backlight Brightness of leds:smc::kbd_backlight...     [ OK ] Started Load/Save Screen Backlight Brightness of leds:smc::kbd_backlight.     [ OK ] Created slice system-systemd\x2drfkill.slice.            Starting Load/Save RF Kill Switch Status of rfkill0...     [ OK ] Reached target Bluetooth.     [ OK ] Started Load/Save RF Kill Switch Status of rfkill0.      ^ Hangs here. I have Arch installed on a MacbookPro8,2 with rEFInd and GRUB v2.


title: Gnome-keyring iteration count location

text: I know that Gnome-keyring hashes master password between 1000 and 2000 times. It picks random number. I would like to ask where does it save this number, what is the location of that file? As far as I know it needs this count number when decrypting the files with saved passwords.


title: Explain how to install windows office 2013 in linux mint 17

text: I am tring to install microsoft office 2013 in linux mint 17.. But i couldnt achieve it... I just did right click on the setup file for microsoft office and chose openwith--> wine windows program loader.. But it is working.. that is its not installing office 2013.. help me to install..


title: disable mouse and keyboard on Ubuntu 14.04

text: I use only ssh access to my 'slideshow' computer (it, and a big TV screen are located in a public room). I'd like to disable generally (not X only) all of the USB slots, and the PS2 keyboard/mouse slots as well (to prevent myself from jokes). Using the configuration file `/etc/modprobe.d/blacklist.conf`, I successfully disabled the USB slots (`hid_generic`,`usbhid`,and other hid modules are blacklisted). However, using a PS2 keyboard, I am still able to switch to console from graphic mode. The PS2 mouse also works. I googled some recipes for doing this. Some of them suggest to use a kernel parameter at boot time. However, the others suggest setting some driver parameters like serio, atkbd, or bind at run-time, after boot. I'd prefer this method, but haven't gotten it to work. How can I disable the PS2 ports on this machine?


title: Modify 'Soft Limit' of 'Max processes'

text: I tried `ulimit -u 2000` and `ulimit -Su 2000` to modify the ' _Max processes_ ', and started up my program, but failed. I found file '/proc/pid/limit' is still:               Max processes             1024                 2000                 processes      How could I change the soft limit?


title: Fedora OS structure change

text: I recently noticed that the structure of **16** : http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/16/Fedora/x86_64/os/ is different from **17** : http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/17/Fedora/x86_64/os/ Has something significant changed in the way that Fedora is packaged, and if so does this effect auto install tools that read from the os/ directory? For example, virt-install.


title: How to use Gnome's extensions

text: I have been trying to install some Gnome extensions from the site `https://extensions.gnome.org`. I get the dialogue asking if I want to install, but after I select yes, it fails silently. This is the behavior using either Firefox or Chromium. I have checked to make sure the `Gnome Shell Integration` plugin is installed and enabled for both Chromium and Firefox. My operating system in Ubuntu 12.10, and my version of Gnome is 3.6.3.1. I have made sure (using `sudo apt-get update`) that everything is up-to-date. I have tried restarting, but to no avail. What am I doing wrong, and how do I fix this?


title: RUN WIN CLI commands from linux ( WINEXE )

text: my target is to run windows command from linux ( WINEXE ) I search and find the wine tool ( this tool can run WIN command from the linux machine I have Linux machine version red-hat3 I take the instructions from the following link ( download and install )                http://blog.projectz.me/2013/03/14/linux-tip-running-windows-commands-on-remote-servers-not-using-ssh/      the following procedure described how to install the WINE tool but when I get to autogen.sh part I get this errror:                  ./autogen.sh: need autoconf 2.53 or later to build samba from SVN      please advice how to continue and fix this issue second I don’t sure if WINE is the best "WINEXE" tool so if some one have better tool from WINE I will be happy to ear . PROCEDURE               bunzip2 winexe-static-081123.bz2      chmod a+x winexe-static-081123     ln -s winexe-static-081123 /usr/local/bin/winexe     wget http://eol.ovh.org/winexe/winexe-source-081123.tar.bz2     cd winexe-source-081123     [root@linux winexe-source-081123]# ./autogen.sh     ./autogen.sh: need autoconf 2.53 or later to build samba from SVN


title: Different configurations for ssh client depending on ip address or hostname

text: I have this in my ~/.ssh/config directory:               Host 12.34.56.78         IdentityFile ~/.ssh/my_identity_file      When I ssh to 12.34.56.78, everything works fine. I'm asked for the passphrase for "my_identity_file" and I can connect to the server. However, sometimes I'd also like to ssh to another server. But whatever the server, if I do:               ssh account@anotherserver.com      I'm also asked for the passphrase for "my_identity_file" (even though the server has a different ip address). This is very annoying because I don't have the public key for this file set up on all my servers. I'd like to connect to this other server (an old shared hosting account) with a password, and now I cant. How do I manage to use the key authentication only with one server, and keep using password by default for servers that aren't listed in my ~/.ssh/config ?


title: How might I log my Internet traffic, grouped by IP address/hostname, port, etc?

text: While I'm going to be switching to a slightly saner plan soon, being stuck on a 5GB monthly bandwidth cap has made me very data-conscious, and I'm looking for a way to log my Internet usage in such a way that I can see how much I've uploaded, and how much I've downloaded, to each port on each host/IP I visit; seeing "you downloaded 823.64MB and uploaded 92.12MB last Tuesday" on my ISP's web portal isn't _especially_ insightful... I have a couple of extra considerations I'd like to take into account:   * I would like the monitoring system to be as lightweight as possible. While existing software would be preferred, at the most extreme I'd consider a simple homemade C libpcap program, if there are examples that I could get up and running from with less than 150 lines of trivial modifications.   * Since just about everything that works with a domain name is going to do a DNS lookup to find the IP address, a system which sniffs for the DNS lookup response and uses that to associate IP addresses with hostnames - rather than making an indepentant/spurious call - would be nice to have.


title: How to solve sudo: unable to execute /bin/ls: Argument list too long

text: When I run this command from php `sudo -u db2inst1 ls -t /var/lib/edumate/bdrs/*/*/daily/*NODE* | sort -r` I receive `sudo: unable to execute /bin/ls: Argument list too long` ls lists all daily backup files we have for each customer. Customer has their directory under the `bdrs` directory. So I guess the number of files got bigger than allowed because it used to work correctly. Is there any way how to get list of all daily backup files using one shell command?


title: How to prevent a program from dying when its ssh session dies?

text: I have a really old console application that I want to make a bit more resilient. The program is used this way:   * the user uses a custom terminal emulator to connect to a remote machine through ssh   * the user starts a shell script    * the shell script might start a long-running progress database process. Obviously, sometimes users simply lose the ssh connection to the machine, and in this case, the ssh session is terminated, the shell script running inside is terminated, and finally the progress database process is terminated as well. In like one case out of a thousand this causes corruption in the database, so I'd like to prevent it from happening. What I tried so far:   * starting a screen or tmux session before starting the shell script - this doesn't work because the application needs the TERM variable to be set to at386 (and it bypasses termcap/terminfo completely... ugh...)   * nohup/disown the progress process - this doesn't work because the shell script and the progress process are continuously communication with each other in obscure ways it seems Any other idea of how to make sure that the progress process doesn't terminate when the ssh session is killed?


title: SSH to decrypt encrypted LVM during headless server boot?

text: When I installed Ubuntu 10.04 and, now, 10.10, I was offered the option of enabling "encrypted LVM" for my hard drive. After choosing that option, I am prompted for my password during boot to decrypt the LVM. Now, I am thinking about setting up a headless server that runs Linux (not necessarily Ubuntu), but I am worried that since the server is headless I won't be able to decrypt it during startup. Would I be able to SSH in during boot to enter my password for the encrypted LVM? If so how do I set it up? Or is there another solution? Again this question is NOT specific to Ubuntu. Thanks.


title: Xorg: two different libglx.so's with two different serverlayouts

text: I have an nvidia card for on monitor and a radeon (onboard) card for a second screen on Ubuntu 11.04. Would it be possible to have one serverlayout use the nvidia libglx.so and the second serverlayout use the default xorg libglx.so? Here's my xorg.conf at the moment: http://pastie.org/1962509


title: Getting direct input from keyboard, ignoring X

text: I've made a hardware keylogger for PS/2 (it is connected between keyboard and PC) and it's storing keystrokes directly as keyboard is sending signals. When device dumps data to the computer, everything goes exactly the same as normal keyboard. I'd like to write an application which saves the dump. When user types only text, there's no problem - I can open any text editor and everything's saved there. The problem is when user types key combinations like ALT+TAB, CTRL+F1 , CTRL+A and similar. My question is - how to pass the keyboard keystrokes directly to file ignoring X?


How to block ip adresses which access more than n-pages in m-prediod of time? I want to blovk all auto-traffic and I am not sure how to approach this issue.


title: Remove files, which provided by pipe

text: I have this command chain:               find . -print | grep php | xargs grep 'eval' -sl | xargs wc -l | grep ' [1-2][0-9] '      This provide me this output:                14 ./includes/js/calendar/lang/vgju.php      18 ./includes/phpInputFilter/default.php      14 ./includes/Archive/eula.php      18 ./media/system/js/json.php      This files are infected php files and I would like to remove it with my chain. How can I do it?


title: how to use nvidia vdpau decoding for mplayer video player in linux?

text: How can I manage to switch on nvidia vdpau decoding on mplayer video player in Ubuntu 11.04? It doesn't work with default options. I've got the proprietary drivers installed:               dpkg -l nvidia-current      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                                               Description     +++-=====================================================-=====================================================-==========================================================================================================================     ii  nvidia-current                                        270.41.06-0ubuntu1                                    NVIDIA binary Xorg driver, kernel module and VDPAU library      If I try it like this:               mplayer -vo vdpau and -vc ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau -ao alsa file.mp4      I get sound but no image window, the prompt showing this:               Playing file.mp4.     libavformat file format detected.     [lavf] stream 0: video (h264), -vid 0     [lavf] stream 1: audio (aac), -aid 0, -alang und     VIDEO:  [H264]  832x468  24bpp  25.000 fps  1402.1 kbps (171.2 kbyte/s)     Clip info:      major_brand: isom      minor_version: 512      compatible_brands: isomiso2avc1mp41      encoder: Lavf52.64.2     Xlib:  extension "NV-GLX" missing on display ":0.0".     Xlib:  extension "NV-GLX" missing on display ":0.0".     [vdpau] Error when calling vdp_device_create_x11: 1     Error opening/initializing the selected video_out (-vo) device.     ==========================================================================     Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)     AUDIO: 48000 Hz, 2 ch, s16le, 94.7 kbit/6.17% (ratio: 11841->192000)     Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))     ==========================================================================     AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)     Video: no video     Starting playback...     A:  39.2 (39.2) of 5341.1 ( 1:29:01.0)  2.9%       Any ideas?


title: What are the pros/cons of Upstart and systemd?

text: It appears systemd is the hot new init system on the block, same as Upstart was a few years ago. What are the pros/cons for each? Also, how does each compare to other init systems?


title: Add applications to launcher

text: I recently installed Matlab in `/usr/matlab`. What do I do to make it appear in the application launcher on the top left of the taskbar?


title: restricting pushes to selected Mercurial repositories using `ssh` forced commands and `hg-ssh`

text: The context of this question is the `hg-ssh` script. It is helpful but not critical to know something about Mercurial. This script sets up a forced command using public keys so the given public key setup on the server will only allow the owner of the corresponding private key to push to a permitted set of repositories on the server. This forced commands is usually prefixed to the public key in the file `~/.ssh/authorized_keys` on the server. With regard to this permitted set, the documentation before the script in the link above says:               You can use pattern matching of your normal shell, e.g.:     command="cd repos && hg-ssh user/thomas/* projects/{mercurial,foo}"      The idea is to permit only pushing to repositories on the server that match this pattern. I've been using `hg-ssh` with the forced command               command="cd /srv/hg && /usr/local/bin/hg-ssh * */* */*/* */*/*/*",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa [...]      to match all repositories (up to some number of path components) under `/srv/hg`, using shell globbing. I belatedly realized that it is _not_ matching paths which contain components starting with `.`. My current non- working example is the MQ repository `/srv/hg/faheem/bixfile/.hg/patches`. So, my question is, can I select a pattern that corresponds to _all_ paths? I would prefer to use shell globbing, which are less of a headache than regular expressions in general, but I'd take a regular expression if globbing is not an option.


title: Is there any manual about C in Linux? If any, what is it?

text: While I find that we can read some manuals about Library calls (C library functions) & acsii in Linux. But I still do not find any manual about C precedence order so far. So you can recommend other useful manual about C now. Thank you! PS: Note that the manual can be accessed via `man` command in Linux, so do not take those online manual or books into answers please.


title: How to setup a local POP3 server?

text: I'm developing a Thunderbird extension and I would like to setup a fake POP3 account to play with. What's the easiest way to setup a local POP3 server? It doesn't need to be particularly secure/robust, as it's meant only for local testing purposes.


title: Loading of shared libraries and RAM usage

text: I'm wondering about the way Linux manages shared libraries. (actually I'm talking about Maemo Fremantle, a Debian-based distro released in 2009 running on 256MB RAM). Let's assume we have two executables linking to libQtCore.so.4 and using its symbols (using its classes and functions). For simplicity's sake let's call them `a` and `b`. We assume that both executables link to the same libraries. First we launch `a`. The library has to be loaded. Is it loaded in whole or is it loaded to the memory only in the part that is required (as we don't use each class, only the code regarding the used classes is being loaded)? Then we launch `b`. We assume that `a` is still running. `b` links to libQtCore.so.4 too and uses some of the classes that `a` uses, but also some that aren't used by `a`. Will the library be double loaded (separately for `a` and separately for `b`)? Or will they use the same object already in RAM. If `b` uses no new symbols and `a` is already running will the RAM used by shared libraries increase? (Or will the difference be insignificant)


title: No /proc/sys/fs/binfmt_misc/CLR on my system?

text: I run docky which is programmed with `mono` so I think the binfmt is running correctly, but `proc-sys-fs-binfmt_misc.automount` complains about it, since I don't have `/proc/sys/fs/binfmt_misc/CLR` I already have `CONFIG_BINFMT_MISC=y` in my kernel config.


title: securing SSH and disabling direct root

text: In these instructions below what appears on my terminal is different so not sure what I should change. After port 22 mine says #AddressFamily any and further down for protocol it has longer line saying #activation of protocol 1 then on line below uncommented Protocol 2. Also if you disable direct root login do you use sudo instead with same password you created for root? Scroll down to the section of the file that looks like this:               #Port 22     #Protocol 2, 1     #ListenAddress 0.0.0.0     #ListenAddress ::      Uncomment and change               #Port 22      to look like      Port 5678 (choose your own 4 to 5 digit port number (49151 is the highest port number AND do not use 5678  lol )          Uncomment and change      #Protocol 2, 1     to look like      Protocol 2          Uncomment and change      #ListenAddress 0.0.0.0     to look like      ListenAddress 123.123.123.15 (use one of your own IP Addresses that has been assigned to your server)      Note 1: If you would like to disable direct Root Login, scroll down until you find               #PermitRootLogin yes     and uncomment it and make it look like      PermitRootLogin no      whereas mine is this:               #Port 22     #AddressFamily any     #ListenAddress 0.0.0.0     #ListenAddress ::          # Disable legacy (protocol version 1) support in the server for new     # installations. In future the default will change to require explicit     # activation of protocol 1     Protocol 2      argh you have to do an online course just to work this forum :/


title: ALSAMIXER - deleted the alsa* from /bin - need to recover

text: I am an Archlinux user and I ve had problems with alsamixer which didn't play sound in google-chrome. So I 1st tried to uninstall it using:               sudo pacman -Rns alsa-plugins alsa-tools alsa-oss      After "removing" the alsa (so I ve thought) I could still call it using command `alsamixer` which is bizarre. So i tried ti completely remove it by changing my pwd into the `/bin` and using command:               sudo rm alsa*      which did seem to remove the alsa and the command alsamixer wasnt reckognized any more (file `.asoundrc` in my home folder was also removed by me):               [ziga@ziga-cq56 ~]$ alsamixer     bash: alsamixer: command not found      Then I tried to reinstall the same packets that I deleted and now I get:               [ziga@ziga-cq56 ~]$ alsamixer     bash: alsamixer: command not found      It is weird that Amarok music player still plays music. Can anyone help me recover alsa?


title: How to run the most recent command on AIX?

text: How can I run the most recent command again from history in AIX Server? And how to edit the most recent command and run it again in AIX?


title: Is an ethernet bridge the correct way?

text: I want to access a private subnet, is bridging the right way? ## Example eth0   192.168.178.x tun0   10.8.0.x I can access every VPN client with 10.8.0.x. But I want to access devices from eth0 when connected to my VPN.   Is a bridge between eth0 and tun0 the correct way?


title: Linux: How to auto-configure IP routing based upon ping results

text: I've got a linux server with two possible connections to the net: one is a slow, high-latency cellular modem (ppp0), and the other is through fast wifi->broadband (wlan0). The problem is that the broadband connection sometimes goes down. However, because the **wifi** is still there, wicd leaves the default route through wlan0. (If the wifi signal disappeared, then wicd would remove wlan0 from the routing tables and the default route would fail over to ppp0, but, in this case, the wifi, itself, looks fine). What I need is a tool which will actually test for connectivity _all the way_ to some selected servers and, if they are unreachable, set the default routing interface to be ppp0 for a time. I can probably hack together a script which can do this, but it seems like something which other people would have needed to do. Is there not already a tool or script which does this?


title: How can I speed up operations on sparse files with tar, gzip, rsync?

text: I have a sparse file. (`du -h` reports 3G and `du -h --apparent-size` reports 100G.) So far, so good. Now, when I want to compress the file using `tar` or send it over the network using `rsync`, it will require as much time as 3G. It seems these tools read all the zeros. I thought the holes are somehow marked and these tools could somehow just skip them? There is likely no issue with my file? Is this a missing feature in `tar` and `rsync` to not look for sparse files? I used the `tar` parameter `\--sparse`, but that didn't speed up things. Neither did `rsync` parameter `\--sparse`. Is there any way to speed these tools up on sparse files?


title: How do I upgrade TCL on FreeBSD?

text: I updated the PORTS tree and run portmaster -a, but came to a screeching halt at:               ===>>> The lang/tcl-modules port has been deleted: Modules are now part of the base Tcl distributions     ===>>> Aborting update      So, I installed TCL86 manually and tried to remove tcl-modules, but I'm stuck here now:               / # pkg_delete lang/tcl-modules     pkg_delete: no such package 'tcl-modules' installed      What's the right way to handle this conflict so I can continue upgrading all my other ports?


title: EXT4 FS needs journal recovery. What does this mean?

text: $ sudo file -s /dev/sdb1     /dev/sdb1: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents) (large files) (huge files)      What does "needs journal recovery" mean? Do I need to do something? What more can I check?


title: How to sort big files?

text: I have a PC with Intel(R) Pentium(R) CPU G640 @ 2.80GHz and 8 GByte RAM. Installed Scientific Linux 6.5 on it with EXT3 filesystem. **Q:** What is the fastest way I can do a " **sort -u list.txt -o list- sorted.txt** " on a file that is 200 GBytes big? Maybe split it to files, smaller then 8 GBytes, "sort -u" them, then they will be smaller, then put them together, then split them again (?) with different sizes, "sort -u" them again, etc. (?) Or are there any sorting scripts, programs that could handle files this big? (and with this limited RAM?)


title: E: Some index files failed to download. They have been ignored...” when tunning “sudo aptitude update”?

text: This is what the end of output after I run `sudo apt-get update` on Ubuntu 12.04:               Ign http://apt.typesafe.com unicorn/main Translation-en     35% [Working]W: Failed to fetch http://ppa.launchpad.net/eclipse-team/ppa/ubuntu/dists/precise/main/source/Sources  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/eclipse-team/ppa/ubuntu/dists/precise/main/binary-amd64/Packages  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/eclipse-team/ppa/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found          E: Some index files failed to download. They have been ignored, or old ones used instead.      My version of Ubuntu is 12.04. **Update:** I figured out dates with this command `find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;` Here is output: /etc/apt/sources.list                1  #############################################################      2  ################### OFFICIAL UBUNTU REPOS ###################      3  #############################################################      4        5  ###### Ubuntu Main Repos      6  deb http://mirror.mirohost.net/ubuntu/ precise main restricted universe multiverse      7  deb-src http://mirror.mirohost.net/ubuntu/ precise main restricted universe multiverse      8        9  ###### Ubuntu Update Repos     10  deb http://mirror.mirohost.net/ubuntu/ precise-security main restricted universe multiverse     11  deb http://mirror.mirohost.net/ubuntu/ precise-updates main restricted universe multiverse     12  deb http://mirror.mirohost.net/ubuntu/ precise-backports main restricted universe multiverse     13  deb-src http://mirror.mirohost.net/ubuntu/ precise-security main restricted universe multiverse     14  deb-src http://mirror.mirohost.net/ubuntu/ precise-updates main restricted universe multiverse     15  deb-src http://mirror.mirohost.net/ubuntu/ precise-backports main restricted universe multiverse     16       17  ###### Ubuntu Partner Repo     18  # deb http://archive.canonical.com/ubuntu precise partner     19  # deb-src http://archive.canonical.com/ubuntu precise partner     20       21  ###### Ubuntu Extras Repo     22  # deb http://extras.ubuntu.com/ubuntu precise main     23  # deb-src http://extras.ubuntu.com/ubuntu precise main     24  # deb http://linux.dropbox.com/ubuntu precise main     25  # deb-src http://linux.dropbox.com/ubuntu precise main      /etc/apt/source.list                1  deb http://security.ubuntu.com/ubuntu precise-security main universe      /etc/apt/sources.list.d/webupd8team-y-ppa-manager-precise.list                1  # deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu precise main      2  # deb-src http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu precise main      /etc/apt/sources.list.d/google-talkplugin.list                1  ### THIS FILE IS AUTOMATICALLY CONFIGURED ###      2  # You may comment out this entry, but any other modifications may be lost.      3  deb http://dl.google.com/linux/talkplugin/deb/ stable main      /etc/apt/sources.list.d/playonlinux.list                1  # deb http://deb.playonlinux.com/ quantal main      /etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa- uploaders_intellij-idea-ce_ubuntu.list                1  # deb https://private-ppa.launchpad.net/commercial-ppa-uploaders/intellij-idea-ce/ubuntu precise main #Added by software-center; credentials stored in /etc/apt/auth.conf      2  deb https://private-ppa.launchpad.net/commercial-ppa-uploaders/intellij-idea-ce/ubuntu precise main #Added by software-center; credentials stored in /etc/apt/auth.conf      /etc/apt/sources.list.d/webupd8team-sublime-text-3-precise.list                1  # deb http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu precise main      2  deb-src http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu precise main      /etc/apt/sources.list.d/typesafe-apt.list                1  # Typesafe repository.      2  deb http://apt.typesafe.com/ unicorn main # Typesafe "unicorn" releases.      /etc/apt/sources.list.d/eclipse-team-ppa-precise.list                1  deb http://ppa.launchpad.net/eclipse-team/ppa/ubuntu precise main      2  deb-src http://ppa.launchpad.net/eclipse-team/ppa/ubuntu precise main      /etc/apt/sources.list.d/medibuntu.list                1  ## Please report any bug on https://bugs.launchpad.net/medibuntu/      2  deb http://packages.medibuntu.org/ precise free non-free #Medibuntu - Ubuntu 12.04 "precise pangolin"      3  # deb-src http://packages.medibuntu.org/ precise free non-free #Medibuntu (source) - Ubuntu 12.04 "precise pangolin"      /etc/apt/sources.list.d/lezhoev-qstamina-precise.list                1  deb http://ppa.launchpad.net/lezhoev/qstamina/ubuntu precise main      2  deb-src http://ppa.launchpad.net/lezhoev/qstamina/ubuntu precise main      /etc/apt/sources.list.d/webupd8team-java-precise.list                1  deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main      2  deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main      /etc/apt/sources.list.d/tualatrix-ppa-precise.list                1  deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu precise main      2  deb-src http://ppa.launchpad.net/tualatrix/ppa/ubuntu precise main      /etc/apt/sources.list.d/kilian-f_lux-precise.list                1  deb http://ppa.launchpad.net/kilian/f.lux/ubuntu precise main      2  deb-src http://ppa.launchpad.net/kilian/f.lux/ubuntu precise main      /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list                1  deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main      2  deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main      /etc/apt/sources.list.d/fsqcds-goldendict-precise.list                1  deb http://ppa.launchpad.net/fsqcds/goldendict/ubuntu precise main      2  deb-src http://ppa.launchpad.net/fsqcds/goldendict/ubuntu precise main      /etc/apt/sources.list.d/webupd8team-rhythmbox-precise.list                1  deb http://ppa.launchpad.net/webupd8team/rhythmbox/ubuntu precise main      2  deb-src http://ppa.launchpad.net/webupd8team/rhythmbox/ubuntu precise main      /etc/apt/sources.list.d/upubuntu-com-devel-precise.list                1  deb http://ppa.launchpad.net/upubuntu-com/devel/ubuntu precise main      2  deb-src http://ppa.launchpad.net/upubuntu-com/devel/ubuntu precise main      And I caught another snippet of trouble at `sudo apt-get update`:               Err http://ppa.launchpad.net precise/main Sources                                                               404  Not Found     Err http://ppa.launchpad.net precise/main amd64 Packages                                                        404  Not Found     Err http://ppa.launchpad.net precise/main i386 Packages                                                         404  Not Found        * _**How to solve this trouble?_**


title: How to show the tree view in left pane of Nautilus?

text: My question is similar to this one, however the answers provided are not sufficient. I'm a linux occasional user / learner, not having much background to understand what to do reading between the lines. I've Ubuntu and Nautilus, in a mode that shows a left pane, without the appropriate content. At the moment a flat list, not a tree, shows personal folders, disk drives and network places (plus some bookmarks I managed to add). I assume I got the spatial view. I'd like to have a tree. In the selected answer, the fix is to hit F9 to show the left pane. Not working. F9 just hides and shows this left pane I don't want. "View" menu also suggested is not even possible, since I've no menu displayed either. The other suggestion to hit Alt-F2 to open a command prompt and then launch `gconf-editor`. Tried that, and got `command not found`. Also tried `sudo gconf-editor` in a terminal. Got the same result. Did a little google work, but I mustn't express my problem correctly, results are similar to the linked question. What's wrong with my configuration?


title: How can I change the look of applications running via NoMachine?

text: I have set up the NoMachine NX server on a virtual machine running on a server in my datacenter to use for keeping applications running and connecting/disconnecting from them via my laptop. The problem is, applications I run on there are kinda... ugly! This is what Firefox looks like when running it through NoMachine: ![NX Screenshot](http://i.stack.imgur.com/ROaCN.png) And this is how it looks when running directly in the VMware console: ![Direct Screenshot](http://i.stack.imgur.com/v4u5X.png) How can I change how applications look when using NoMachine NX? **EDIT:** I am starting the NX session using custom desktop settings. I have selected "Run the console" as the Application and "Floating Window" under the "custom desktop" settings under the "Configure..." screen: ![Configure screen](http://i.stack.imgur.com/F1HUH.png) ![Custom Settings Screenshot](http://i.stack.imgur.com/OxCTG.png)


title: emacsclient -t hangs

text: I'm trying to use emacs (23.2.1) in daemon mode. I started it as `emacs --daemon` and that works just fine. But whenever I try `emacsclient -t somefile` I first get a line of garbage (e.g., `1;25C2;'), then the file is displayed (with emacs's mode line), but I can't do anything. It hangs; cursor movement keys don't work; C-x # doesn't work; the only thing I can do is open another console and kill the process. If I start emacs normally (by clicking on a launcher on the panel, or just running `emacs`) with `(server-start)` in the config, `emacsclient file` works just fine (i.e., loads the file in the graphical emacs instance). If I start emacs normally but use `emacsclient -t file`, I get the same problem with it hanging. I'm using Debian 6/Xfce, kernel 2.6.32-5-686. `$TERM` is xterm, maybe that needs to be changed to something else? Is there anything else that's a likely culprit? I don't want to post my entire emacs config here because it's extensive, but if you really want to look through it it's here on github. Thanks


title: No exec permissions on programs in /usr/local/bin

text: I have installed the newest Erlang from source. As the final step I have executed                sudo make install      Among other things, it placed erl link in /usr/local/bin, but its permissions are insufficient for me to use, other than with sudo                lrwxr-x---  1 root  wheel    21B Apr 19 22:26 erl@      /usr/local/bin permissions:                drwxr-xr-x  18 root  wheel   612B Apr 20 21:45 bin/      sudo gives enough permissions to execute, but not enough to change the permissions. The question is, how do I change the permissions on these symbolic links?


title: Does ssh compress connections in a tunnel individually?

text: I have _one_ compressed SSH tunnel with _one_ tunnel and _multiple_ connections over it. Data in every connection tunneled is rather homogeneous, but compressing an interleaved stream will obviously make the compression worse. How does SSH compress data with several connections:   1. On TCP connection level (i.e. one compressed stream, one zlib compression state)?   2. Or on logical in-tunnel connection level (multiple logical streams over one TCP connection, zlib state for each one)? Implementation is OpenSSH.


title: Determine whether a particular file is compressed

text: How to know in Linux whether a particular file is compressed or not using a command?


title: Unidentified network connections

text: I have an external-facing ftp/webserver (with virtual hosts) running Ubuntu 12.04LTS, and I have some concerns about some network traffic I'm seeing. Some background. I tried to be as preventive in setting up the computer as possible, perhaps relevant:   1. It is directly connected to the internet and independent of our LAN, so that if it were ever compromised the damage can't spread,   2. It runs `ufw` with a deny-first rule structure that only allows:      1. Connections to any ports from the LAN IP address (for admin purposes)     2. Connections to ports 21/80 from any IP address (for the services)   3. `apache2` is configured to only allow access to potentially 'dangerous' webpages, like _admin.php_ or _setup.php_ from the LAN IP address, and   4. Other things like automatic updating, `denyhosts`, etc. My concern is I was looking at the output of `nethogs` this morning and found a lot entries I don't understand (I've removed my server's IP address and cropped the list a bit):               PID   USER     PROGRAM                                             DEV        SENT      RECEIVED     ?     root     server.address:80-180.126.248.132:56745                      11.879       0.454 KB/sec     ?     root     server.address:80-180.126.248.132:56752                       9.568       0.354 KB/sec     8300  jon      sshd: jon@pts/0                                    bond0      5.597       0.323 KB/sec     ?     root     server.address:80-180.126.248.132:56663                       6.690       0.185 KB/sec     ?     root     server.address:80-180.126.248.132:56739                       5.242       0.170 KB/sec     ?     root     server.address:80-180.126.248.132:56608                       4.658       0.170 KB/sec     ?     root     server.address:80-180.126.248.132:56723                       5.242       0.162 KB/sec     ?     root     server.address:80-180.126.248.132:56515                       4.658       0.150 KB/sec     [...]     3614  www-data /usr/sbin/apache2                                  bond0      0.292       0.000 KB/sec     3134  www-data /usr/sbin/apache2                                  bond0      0.292       0.000 KB/sec     3307  www-data /usr/sbin/apache2                                  bond0      0.292       0.000 KB/sec     3009  www-data /usr/sbin/apache2                                  bond0      0.292       0.000 KB/sec     3768  www-data /usr/sbin/apache2                                  bond0      0.000       0.000 KB/sec     3132  www-data /usr/sbin/apache2                                  bond0      0.000       0.000 KB/sec     3384  www-data /usr/sbin/apache2                                  bond0      0.000       0.000 KB/sec      So my question, and obvious concern, is what are these connections? Why are they owned by root and without a PID? Why are there so many? Another answer suggested that similar entries in the other direction (i.e., from a random port to an external port 80 owned by root with no PID) signify connections _to_ external websites, but I don't know if the reverse is the case as I also have listings for `apache2`... I'd like to think I'm pretty experienced with Linux at a user-level, but system administration is a little new to me. The system has `chkrootkit` and `rkhunter` installed, but running them didn't turn anything up. I would obviously like to know if I have a problem, but I'd also like to understand what's going on... ### Appendix For interest, the following is the result of my `sudo ufw status verbose`               Status: active     Logging: on (low)     Default: deny (incoming), allow (outgoing)     New profiles: skip          To                         Action      From     --                         ------      ----     Anywhere                   ALLOW IN    lan.address     80                         ALLOW IN    Anywhere     21/tcp                     ALLOW IN    Anywhere     80                         ALLOW IN    Anywhere (v6)     21/tcp                     ALLOW IN    Anywhere (v6)


title: How can I configure IP address from class E on Linux?

text: I would like to configure an IP address from class E, for example `241.0.0.2`. Currently Linux (Linux-2.6.21.7-hrt1) returns the following answer:               ifconfig: SIOCSIFADDR: Invalid argument      Is there a way to do this? (The reason for using class E is that I would like to avoid IP address conflicts with customer IP networks.)


title: How can I create a unionfs-fuse mount that is readable by all?

text: I'd previously used aufs2 in aufs-tools with some luck, but apparently this package has been "superseded" (this is strange term to use for a package which seems to have been removed only because it no longer compiles, but never mind). Okay, so I thought I would try to use unionfs-fuse. I can't for the life of me figure out how to make it work for users though. I'm using this command to make my unified mount:               unionfs-fuse /mnt/disk1-pool=RW:/mnt/disk3-pool=RW /mnt/union-pool      When I run this as root, I cannot access this share as joe user:               $ ls -al /mnt          ls: cannot access /mnt/union-pool: Permission denied     ...     d??????????  ? ?    ?       ?                ? union-pool      When I run it as joe user, I cannot access this share as root. I basically get the exact same output as above. This is a little weird to me, root being root. Both root (obviously) and joe user can access the /mnt/disk1-pool and /mnt/disk3-pool mounts. If anybody has any info about aufs-tools for natty I'd also be interested. I am quite fond of this package because it worked.


title: Can connect to wireless router but can't browse internet

text: I have a Dell Studio 1450 running Fedora 17. I installed a new wireless router in the office recently. And everybody apart from me is able to connect to the internet via it. Google revealed http://forums.fedoraforum.org/showthread.php?t=276645 which is very similar to my problem. Here are output logs of some commands for you to help me.               $ ifconfig wlan0     wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet 192.168.11.5  netmask 255.255.255.0  broadcast 192.168.11.255             inet6 fe80::222:fbff:febd:a1d4  prefixlen 64  scopeid 0x20<link>             ether 00:22:fb:bd:a1:d4  txqueuelen 1000  (Ethernet)             RX packets 217025  bytes 207399872 (197.7 MiB)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 140947  bytes 22960122 (21.8 MiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          $ ping -c 3 192.168.11.1     PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.     ^C     --- 192.168.11.1 ping statistics ---     3 packets transmitted, 0 received, 100% packet loss, time 1999ms          $ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.11.1    0.0.0.0         UG    0      0        0 wlan0     192.168.11.0    0.0.0.0         255.255.255.0   U     0      0        0 wlan0          $ cat /etc/resolv.conf      # Generated by NetworkManager     nameserver 192.168.11.1     nameserver 192.168.1.1      Regards EDIT 1: outputs from other machine running Linux Mint, normally working on the network.               $ ifconfig wlan0     wlan0     Link encap:Ethernet  HWaddr e0:ca:94:8a:f4:08                 inet addr:192.168.11.2  Bcast:192.168.11.255  Mask:255.255.255.0               inet6 addr: fe80::e2ca:94ff:fe8a:f408/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:795989 errors:0 dropped:0 overruns:0 frame:0               TX packets:729687 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:871899683 (871.8 MB)  TX bytes:83227427 (83.2 MB)               $ ping -c 3 192.168.11.1     PING 192.168.11.1 (192.168.11.1) 56(84) bytes of data.     64 bytes from 192.168.11.1: icmp_req=1 ttl=64 time=1.12 ms     64 bytes from 192.168.11.1: icmp_req=2 ttl=64 time=1.17 ms     64 bytes from 192.168.11.1: icmp_req=3 ttl=64 time=1.12 ms          --- 192.168.11.1 ping statistics ---     3 packets transmitted, 3 received, 0% packet loss, time 2002ms     rtt min/avg/max/mdev = 1.123/1.139/1.172/0.035 ms               $ route -n     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.11.1    0.0.0.0         UG    0      0        0 wlan0     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0     192.168.11.0    0.0.0.0         255.255.255.0   U     2      0        0 wlan0               $ cat /etc/resolv.conf     cat: /etc/resolv.conf: No such file or directory      UPDATE: It is not a problem with fedora, it is my laptop. I tried with other distros (Ubuntu 12.04 anh Bodhi Linux) and the same problem exists.


title: Circumvent permissions of filesystem on an external drive

text: Suppose that I have only non-root access on a desktop Linux machine. I want to work with an external, pluggable storage device (hdd, flash drive or memory card) with an ext{2,3,4} file system. Since I have physical control over the storage device, it seems that I should be able to do whatever I want with it, regardless of my privileges on the current system. I can mount it using `pmount`. But how do I access files that have such permissions that I wouldn't be able to access them if they were on a local file system? (For example, files owned by root with permissions `0600`)


title: Cannot pair my generic keyboard via automatic PIN

text: I am using Xubuntu, pure Xfce, 64-bit. **The problem:** I have tried 2 ways; both have failed for different reasons: (1) the commandline way (see below) fails because at no stage does it actually ask for a pin verification. (2) the GUI way using the "Bluetooth" utility (that sounds generic but it's what the tool is actually called and how it is catalogued under Synaptic) fails because the keyboard is unresponsive when the pin is requested by Bluetooth. How do I pair my device properly with the use of a automatically generated PIN? I really don't care if the solution will be GUI-based or not, as long as you can get it to pair the secure way, with a PIN. I don't want to be using my keyboard on discovery mode all the time for obvious reasons relating to security. **Details of my failed efforts:** I followed the directions on http://ubuntuforums.org/showthread.php?t=224673 in order to activate a generic bluetooth device (http://www.ebay.com/itm/Mini- Bluetooth-Keyboard-PC-Mac-iPhone-Nokia-PDA- HTC-/110653444332?pt=PCA_Mice_Trackballs&hash=item19c37590ec), which succeeded. Except come the part where I am supposed to be asked for a password, I wasn't. This is a bit disturbing, I think to myself. Anyone in the neighborhood could've in this manner connected to my keyboard and started key- logging my activities. Anyhow this is how I did it:               peter@peter-xfce:~$ hcitool scan     Scanning ...     peter@peter-xfce:~$ hcitool scan     Scanning ...         00:12:A1:11:04:E9   Bluetooth Keyboard     peter@peter-xfce:~$ gksudo mousepad /etc/bluetooth/hcid.conf     peter@peter-xfce:~$ sudo gedit /etc/default/bluetooth     peter@peter-xfce:~$ sudo /etc/init.d/bluetooth restart      * Stopping bluetooth                                                    [ OK ]       * Starting bluetooth                                                    [ OK ]      peter@peter-xfce:~$ sudo hidd --connect 00:12:A1:11:04:E9     sudo: hidd: command not found     peter@peter-xfce:~$ hidd --connect 00:12:A1:11:04:E9     The program 'hidd' is currently not installed.  You can install it by typing:     sudo apt-get install bluez-compat      [at this point bluez-compat is installed]               peter@peter-xfce:~$ sudo hidd --connect 00:12:A1:11:04:E9     peter@peter-xfce:~$       [can now type using the bluetooth keyboard] Again this is unacceptable. I don't consider that the device was paired securely because no pin was requested. Alternatively via GUI: ![enter image description here](http://i.stack.imgur.com/185Bh.png) But the keyboard is unresponsive so I cannot enter to PIN when requested.


title: Timer interrupts count in `/proc/interrupts` is updated very slowly and is very small

text: There is the result of `cat /proc/interrupts|grep timer` on my Ubuntu 11.04 machine:                 0:         63          0          0          0   IO-APIC-edge      timer     LOC:         59         44         27         10   Local timer interrupts      As one can see timer interrupts count is suspiciously small and is updated very slowly — it takes more than 30 seconds (or even more) for the value to be incremented. Though this do not cause any work or performance issues, this oddity is very disturbing so I will very appreciate any help. * * * Here is a uname output, I have Core i5 760 with 4 cores:               Linux calculon 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux


title: why "ps -ef -u root -U root" also displays user processes?

text: ps -ef -u root -U root      Also displays processes whose user is not root (the current user). Can someone explain me why ?               -u : EUID          -U : RUID


title: SELinux interfering with host/guest file sharing using KVM

text: I'm running Fedora 17 with KVM and the virtual machine runs okay. I tried to follow this to get access to a file on the host system but SELinux prevents the VM from accessing any files other than those in `/var/lib/libvirt/images`. This is the message the host gives when running `ls` inside the VM on the shared path.               SELinux is preventing /usr/bin/qemu-kvm from read access on the     directory share.      How can I get around this? The purpose of my VM is to test binaries on multiple Linux distributions so a shared path would be easiest. Is there a way to make /tmp/share absolutely accessible by everyone?


title: How do I stop ssh-agent trying all keys with agent forwarding?

text: Often I'll connect via SSH to VM instances to deploy code from private Bitbucket repositories, cloning repositories via git over SSH. Today I was getting the error: `conq: repository access denied. deployment key is not associated with the requested repository.` A quick search showed it was this problem. The issue is my forwarded SSH agent was trying to connect to Bitbucket with a Vagrant development key that I'd added since I'd last tried to clone a private repository over SSH. (Removing the Vagrant key from my `.ssh` directory allowed me access to the private repositories again.) My SSH `config` is:               Host bitbucket.org       User git       IdentityFile ~/.ssh/bitbucket_key       IdentitiesOnly yes      and locally this seems to behave as expected. The output of `ssh -v git@bitbucket.org` shows               debug1: Authentications that can continue: publickey     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/me/.ssh/bitbucket_key      whereas when I'm connected to another server over SSH:               debug1: Offering RSA public key: steve@not_a_bitbucket_key     debug1: Authentications that can continue: publickey     debug1: Offering RSA public key: steve@still_not_a_bitbucket_key     debug1: Authentications that can continue: publickey     debug1: Offering RSA public key: steve@bitbucket_key      Is there some other configuration other than `IdentitiesOnly` that I'm missing to ensure only the requested keys are sent to particular servers when using agent forwarding? Running Ubuntu 12.04 with OpenSSH 5.9p1 installed.


title: Disable MySQL startup arch

text: I have KDE, and it has software to manage startup packages. But, I don't see any `mysql`, `mariaDB` or `mysqld` service. How can I disable or prevent the `mariaDB` and `mysql` daemons from starting automatically?


title: Buildroot: Unknown own user

text: I crated an image with buildroot. Everything went smooth. When I untarred the bz2 image in vmware and tried to boot into it then I observed an issue, in which, system is unable to recognize any user, even root. While starting dbus, it gives error as: `Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry` Unknown username "root" in message bus configuration file `Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry` `free -m` returns total=> 1006 used=> 46 free=> 959


title: Adding multiple sites at once to forward-zone of Unbound?

text: The usual format for Unbound forward-zone is               forward-zone:     name: "imap.gmail.com"     forward-addr: 8.8.8.8 #googleDNS     forward-addr: 8.8.4.4 #googleDNS      for example. Is it possible to add multiple sites in a list to the `name' field? I've tried comma separation but doesn't seem to work, e.g. something perhaps like:               forward-zone:     name: "site1.com; site2.com"     forward-addr: 8.8.8.8 #googleDNS     forward-addr: 8.8.4.4 #googleDNS      perhaps? If so what is the correct format for the list of sites? I just want to save some space in the `unbound.conf' file.


title: How to check if disk has linux inside

text: I am trying to boot a external USB drive which runs Linux to check whether the main computer hard drive is running (so it contains) Linux or not, and mount it into `/mnt` directory to modify some files. I may be able to detect the devices (hard drives) plugged into the computer, but I have no idea how to detect if that disk has an OS in it and if that OS is any distort of Linux. I'm trying to implement it in Python.


title: What is the source of truth for currently active tty/pts connections?

text: I'm looking for a simple way to determine the number of currently logged in users, using only the filesystem and basic bash functions (instead of using binaries). The `uptime` binary appears to be reading from `/var/run/utmp` according the its source code, but `/var/run/utmp` doesn't seem to update in real time (it shows `tty7` and `pts/1-5` for my user, but I'm only on `tty7` and `pts/5` at the moment). However, the `uptime` binary correctly shows "2 users". Note: Instead of relying on `uptime` or `getutent()` in C, I'm trying to better understand how the underlying system works. What's the best place to find a current, accurate number of users logged into the system?


title: How do I pass my password to gksu?

text: `gksu` doesn't has an option like `sudo` has to pass the password to it in the following way:               echo ' _password_ ' | sudo -S _command_ Anyway I wonder which is the simplest way to pass my password to `gksu`. What I found until now is:               parallel -j 2 -- "gksu _command_ " "( sleep 1; xdotool type ' _password_ ';  xdotool key 'Return' )" But this doesn't look so good for me (`parallel` and `xdotool` must to be installed, there is some time spent until the password is passed, the window which asking password is not avoided). So, is there a better way? * * * Note: I'm not interested to edit the `sudoers` file or in explanations like " _don't do this, it's not safety!_ ".


title: Run Script at fail login attempt?

text: Lately, I've been trying to create a Bash script to capture a webcam photo when a fail attempt to login is registered. First of all, I found 2 guides related to this (links at the end), they explained how to create script etc.. It was going pretty good until I noticed my System (Archlinux, Fresh installation) doesn't have PAM's common-auth file. I've checked the entire `/etc/pam.d/` directory and still can't find the file or a file with same contents. My Script so far:               #!/bin/bash          # Let's watch our thief's face n.n               ts=$(date +"%m_%d_%Y_%H_%M_%S")          ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /home/haoa2/Logins-Fail/login-$ts.jpg          exit 0      My `/etc/pam.d/` directory contents: `chage`, `chfn`, `chgpasswd`, `chpasswd`, `chsh`, `groupadd`, `groupdel`, `groupmems`, `groupmod`, `login`, `newusers`, `other`, `passwd`, `polkit-1`, `rlogin`, `rsh`, `shadow`, `slim`, `su`, `sudo`, `su-l`, `system-auth`, `systemd-user`, `system-local-login`, `system-login`, `system-remote-login`, `system-services`, `useradd`, `userdel`, and `usermod` The orginal answer, and a tutorial-like answer. (Note: I know there is a related answer out there, but this quetion is more about the PAM's file rather than Scripting.)


title: Automated Install Fails due to CRC on /dev/sda

text: I'm running an X8STI-3F with an onboard LSI 1063E SAS controller running in IT mode. I'm trying to get an automated install going on it and I keep getting               ddf1: physical drives with CRC AE516B03, expected FFFFFFFF on /dev/sda     ERROR: ddf1: Cannot find physical drive description on /dev/sda!     ERROR: ddf1: setting up RAID device /dev/sda`      I've `dd`'ed out `/dev/sda` and continue to get the error.               [anaconda root@TPC-E2-11 ~]# dmraid -r     no raid disks     [anaconda root@TPC-E2-11 ~]# dmraid -l     asr     : Adaptec HostRAID ASR (0,1,10)     ddf1    : SNIA DDF1 (0,1,4,5,linear)     hpt37x  : Highpoint HPT37X (S,0,1,10,01)     hpt45x  : Highpoint HPT45X (S,0,1,10)     isw     : Intel Software RAID (0,1,5,01)     jmicron : JMicron ATARAID (S,0,1)     lsi     : LSI Logic MegaRAID (0,1,10)     nvidia  : NVidia RAID (S,0,1,10,5)     pdc     : Promise FastTrack (S,0,1,10)     sil     : Silicon Image(tm) Medley(tm) (0,1,10)     via     : VIA Software RAID (S,0,1,10)     dos     : DOS partitions on SW RAIDs          [anaconda root@TPC-E2-11 ~]# ls -l /dev/disk/by-id     total 0     lrwxrwxrwx. 1 root root 10 Aug 29 18:32 dm-name-live-base -> ../../dm-1     lrwxrwxrwx. 1 root root 10 Aug 29 18:32 dm-name-live-rw -> ../../dm-0     lrwxrwxrwx. 1 root root  9 Aug 29 19:07 scsi-35000cca00f08c5f0 -> ../../sda     lrwxrwxrwx. 1 root root 10 Aug 29 18:46 scsi-35000cca00f08c5f0-part1 -> ../../sda1     lrwxrwxrwx. 1 root root  9 Aug 29 19:07 wwn-0x5000cca00f08c5f0 -> ../../sda     lrwxrwxrwx. 1 root root 10 Aug 29 18:46 wwn-0x5000cca00f08c5f0-part1 -> ../../sda1          [anaconda root@TPC-E2-11 ~]# lsblk     NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda           8:0    0 558.9G  0 disk     ââsda1        8:1    0   100M  0 part     loop0         7:0    0 278.8M  1 loop     loop1         7:1    0     2G  1 loop     ââlive-rw   253:0    0     2G  0 dm   /     ââlive-base 253:1    0     2G  1 dm     loop2         7:2    0   512M  0 loop     ââlive-rw   253:0    0     2G  0 dm   /          [anaconda root@TPC-E2-11 ~]# dmesg | grep ddf     [  182.059331] type=1400 audit(1409336387.072:42): avc:  denied  { add_name } for  pid=1563 comm="dmraid" name="dmraid.ddf1" scontext=system_u:system_r:getty_t:s0-s0:c0.c1023 tcontext=system_u:object_r:root_t:s0 tclass=dir      What does the error mean? How do I prevent it from showing up in the future?


title: Sudo changes PATH, yet executes the same binary

text: There are two Python interpreters installed:               [user@localhost ~]$ /usr/bin/python -V && /usr/local/bin/python -V     Python 2.4.3     Python 2.7.6      Sudo changes PATH when executed:               [user@localhost ~]$ env | grep PATH && sudo env | grep PATH     PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/user/bin     PATH=/usr/bin:/bin      Yet Python run through sudo is the same as the one run directly:               [user@localhost ~]$ sudo python -V && python -V     Python 2.7.6     Python 2.7.6      I would expect `sudo python` to run `/usr/bin/python` which is the only one visible on the modified `PATH`. Why does it run `/usr/local/bin/python` instead? I asked this question on sudo-users mailing list but we couldn't find the reason for this behavior in discussion with sudo maintainer Todd C. Miller. For reference:               [user@localhost ~]$ sudo -l     Matching Defaults entries for user on this host:         requiretty, !visiblepw, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS         LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE         LINGUAS _XKB_CHARSET XAUTHORITY"          Runas and Command-specific defaults for user:               User user may run the following commands on this host:         (ALL) NOPASSWD: ALL               [user@localhost ~]$ sudo sudo -V     Sudo version 1.7.2p1          Sudoers path: /etc/sudoers     nsswitch path: /etc/nsswitch.conf     ldap.conf path: /etc/ldap.conf     ldap.secret path: /etc/ldap.secret     Authentication methods: 'pam'     Syslog facility if syslog is being used for logging: authpriv     Syslog priority to use when user authenticates successfully: notice     Syslog priority to use when user authenticates unsuccessfully: alert     Ignore '.' in $PATH     Send mail if the user is not in sudoers     Use a separate timestamp for each user/tty combo     Lecture user the first time they run sudo     Require users to authenticate by default     Root may run sudo     Allow some information gathering to give useful error messages     Visudo will honor the EDITOR environment variable     Set the LOGNAME and USER environment variables     Length at which to wrap log file lines (0 for no wrap): 80     Authentication timestamp timeout: 5 minutes     Password prompt timeout: 5 minutes     Number of tries to enter a password: 3     Umask to use or 0777 to use user's: 022     Path to mail program: /usr/sbin/sendmail     Flags for mail program: -t     Address to send mail to: root     Subject line for mail messages: *** SECURITY information for %h ***     Incorrect password message: Sorry, try again.     Path to authentication timestamp dir: /var/run/sudo     Default password prompt: [sudo] password for %p:      Default user to run commands as: root     Path to the editor for use by visudo: /bin/vi     When to require a password for 'list' pseudocommand: any     When to require a password for 'verify' pseudocommand: all     File containing dummy exec functions: /usr/libexec/sudo_noexec.so     File descriptors >= 3 will be closed before executing a command     Reset the environment to a default set of variables     Environment variables to check for sanity:             TERM             LINGUAS             LC_*             LANGUAGE             LANG             COLORTERM     Environment variables to remove:             RUBYOPT             RUBYLIB             PYTHONINSPECT             PYTHONPATH             PYTHONHOME             TMPPREFIX             ZDOTDIR             READNULLCMD             NULLCMD             FPATH             PERL5DB             PERL5OPT             PERL5LIB             PERLLIB             PERLIO_DEBUG              JAVA_TOOL_OPTIONS             SHELLOPTS             GLOBIGNORE             PS4             BASH_ENV             ENV             TERMCAP             TERMPATH             TERMINFO_DIRS             TERMINFO             _RLD*             LD_*             PATH_LOCALE             NLSPATH             HOSTALIASES             RES_OPTIONS             LOCALDOMAIN             CDPATH             IFS     Environment variables to preserve:             XAUTHORIZATION             XAUTHORITY             TZ             PS2             PS1             PATH             MAIL             LS_COLORS             KRB5CCNAME             HOSTNAME             HOME             DISPLAY             COLORS     Locale to use while parsing sudoers: C     Local IP address and netmask pairs:             10.0.2.15 / 255.255.255.0             fe80::a00:27ff:febb:56ce / ffff:ffff:ffff:ffff::               [user@localhost ~]$ sudo cat /etc/sudoers | grep -v -E '^#|^$'     Defaults    requiretty     Defaults   !visiblepw     Defaults    env_reset     Defaults    env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \                             LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \                             LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \                             LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \                             LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \                             _XKB_CHARSET XAUTHORITY"     root    ALL=(ALL)       ALL     user    ALL=(ALL)       NOPASSWD: ALL               [user@localhost ~]$ which sudo && command -V sudo     /usr/bin/sudo     sudo is hashed (/usr/bin/sudo)          [user@localhost ~]$ cat /etc/redhat-release      Red Hat Enterprise Linux Server release 5.10 (Tikanga)


title: Run Java in a chrooted jail

text: I'm on a CentOS 6.5 machine with Plesk Panel which I used to create a chrooted environment for a user who can access it via ssh. I'm not a big expert but somehow I managed to let him use some basic non chroot standard command like chmod or ps. NOW what I need to do to let him use java to run his own compiled jar inside his new shiny jail? Oh and by the way, I don't know absolutely nothing about Java


title: Run script as a different user from root

text: From root user, how can I give permissions to another user to execute the file /root/script.sh ? The idea is to run the script like `sudo -u user1 /root/script.sh`


title: Raspberry Pi Wireless USB stick

text: I recently acquired a Raspberry Pi, and have installed Debian Squeeze on it, and after doing a small bit of research (I'm not too proficient with Linux) I found and ordered a USB wireless dongle ("LevelOne WUA-0605 N_Max Wireless USB Adapter") that appears to have support for Linux. This is the page I found that looks like it says the dongle has a Linux driver. I installed (what I think) was the driver package, `firmware-ralink`. Now I'm not sure what i need to do to make it work. `lsusb` lists the device as               Bus 001 Device 008: ID 0bda:8172 Realtek Semiconductor Corp.         RTL8191SU 802.11n wLAN Adapter


title: Recommend distribution for Graphic Design

text: I'm new here. I need for a `Linux Distribution` for my girlfriend, to install on her computer (in a `VM`, to be more exactly). She studies Graphic Design, and she use to work on `Windows XP`, but she got problems with License and other stuffs (also, her machine is a little older), so a proffesor on her University recommended her to work on Linux. I do some research and I found `Ubuntu Lucid Lynx` here, and it looks like it will work for her. I've seen the tools that the distro has, but I don't know how useful are. She works a lot with `Photoshop` and `Illustrator` as far as I know, but she could use some other tools.. The question is, is this the best choice for an SO oriented to graphic Design? Better a newest version, or an older ? What other tools she can get on this distro ? Are another option better? Also, about the requerimients, she has a Pentium IV and 2 GB RAM (a little older). I don't remember how much free space disk she has.. Is this a recommended version, or a newest will work better ?


title: Passing parsed output of sed to find (in this direction)

text: Well, I think you can find dozens of questions on this platform how to pipe `find` _output_ to `sed`, but I haven't found anything for the reverse direction so far. What I want to do is modify my _input_ , and _then_ pass it to `find`. Supposing I want to do something like the following, in order to make life easier for myself by avoiding to type in those cumbersome asterisk wildcards. (I hope it's obvious enough that the expression which follows the triple redirection operator `<<<` is eventually planned to get replaced by a parameter, e. g. `$1`, in a script later. The line below is merely for demonstration.)               $ sed 's/ /\*/g' <<< ' foo bar baz ' | find . -type f -iname -       That `-` at the end of this one-liner was actually _supposed_ to use the output of `sed` as input for `find`; however, extending the `find` part to               ... find -D tree . -type f -iname - ...       revealed that the parameter was _not_ passed to `find`. Perhaps you cannot pass pre-processed input to `find` using a pipe at all?


title: ngircd refuses connection over ssh tunnel

text: This might be just a misunderstanding of how ssh tunneling works, but here goes: In my `ngirgd.conf` file I have the following:               Ports = 6669     Listen = 127.0.0.1      This ngircd server is running on **HostA**. I've tunneled into it using the following: > wayne@ **HostB** % ssh -N wayne@ **HostA** -L 6669: **HostA** :6669 I enter my password. Then inside irssi on **HostB** , I do:               /connect localhost 6669      And I get               Looking up localhost     Connecting to localhost [127.0.0.1] port 6668     Connection to localhost established     Connection lost to localhost      Inside the terminal window where I launched the tunnel, I get:               channel 2: open failed: connect failed: Connection refused      From what I've understood, the ssh tunnel should be connecting `HostB:6669` to `HostA:6669`, so as far as ngirgd is concerned, the connection came from localhost/127.0.0.1. But it appears this is not the case - when I forwarded to port 80 it connected to my server just fine. Am I misunderstanding something, or is something wrong? And how do I fix it?


title: The most universal scripting language for Linux is?

text: We are writing scripts for Linux systems, there has been some debate over what would be the most universally Linux present scripting language to use. Bash, SH, Posix? What?


title: Why would my Linux host suddently stop receiving multicast? All other nics on private network are receiving

text: Here is my dilemma. Suddenly, as of yesterday, multicast packets are no longer being received from eth1 (private gigabit network) from one node. Routing between all the nodes is fine, no collisions, packet loss, etc. `ifconfig` info, inet addr, Bcast, Mask, are all fine - they all share the same bcast and netmask. Also, they all share: UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 on eth1 . These nodes are all hosted by a Xen VM provider. All the guests are seeing each others private IP addresses. There are no `iptables` rules involved. Multicast packets can be seen between all the nodes (20+) except one - using `tcpdump`. The system was restarted, etc. just to add, the affected node, according to netstat -g is not being assigned the multicast group, "eth1 1 224.2.2.4" as all the others. What would cause something like this? It seems that one node is no longer part of the multicast group - I have a ticket opened but I have a feeling they are stumped.


title: Apple Bluetooth Keyboard

text: I have an Apple bluetooth keyboard and want to use it with Fedora 15. I turn on the bluetooth on the both devices. Click 'Setup new device' via Gnome3's GUI. The computer detects the keyboard but it shows up with a MAC address kind of number format instead of a name. Upon selecting I am unable to proceed with the setup, i.e., it does not proceed to the stage where it asks for a PIN to connect the devices. It works flawlessly with both a friend's iPad and my own Windows. So there doesn't seem to be any problem with the keyboard itself. I don't have much experience with bluetooth devices and there seem to be no Fedora specific posts regarding the topic, and the Ubuntu forum solutions don't seem to work for me. * * * I know the question is vague but I don't know what else I could post to help the reader. Therefore if any further information is required, please ask for it, I will post the same ASAP.


title: Flatten Directory but Preserve Directory Names in New Filename

text: How can I flatten a directory in the following format? Before: `./aaa/bbb/ccc.png` After: `./aaa-bbb-ccc.png`


title: How to move file from one folder to another in shell script by changing the permission

text: I want to move a file from one folder to another folder. When the file's format is with space in between (`file _name.dat`) and when I am using the command `mv file _name.dat /tmp` then the file is not moving. But when am using `mv "file _name.dat" /tmp` then the file is moving. Help me in writing a script which helps to change the `file _name.dat` to `"file _name.dat"` when it is moving automatically.


title: How do I exit or cancel a bad bash command?

text: I expect to get some flak for this, but I can't find the answer anywhere. It seems like it should be so obvious. Sometimes, when I type a bad command in a bash terminal, the cursor just jumps down to the next line without any error or anything. I can't tell what I did wrong. It's like I'm stuck in the program. Reenactment:               $ tidy      Me: "Oops! That's not what I meant to type..."               :q      Me: "That didn't work..."               :exit     :quit     exit     quit     /exit     /quit     -exit     -quit     -wtf???      I know I screwed up but how do I get back to the prompt without closing the terminal?


title: Can I watch the progress of a `sync` operation?

text: I've copied a large file to a USB disk mounted on a Linux system with async. This returns to a command prompt relatively quickly, but when I type `sync`, of course, it all has to go to disk, and that takes a long time. I understand that it's going to be slow, but is there somewhere where I can watch a counter go down to zero? Watching `buffers` in `top` doesn't help.


title: Unable to control audio volume in BackTrack5 R2

text: I have Backtrack5 R2, one of the several problems I have is the audio works but I cannot control the volume, it is always the same and it's very annoying. What can I do to fix this?


title: How to install Gentoo with VirtualBox and use it as native OS later?

text: I'd like to try Gentoo (again...). I know that many steps require a lot of configuration and much more time. I'd like to do something else on computer during long waiting, because of that I would like to install it using VirtualBox and then move it to an partition and use it as normal OS. Update: I know how to `chroot` from live to HDD, "restore" GRUB bootloader. I need especially to know how to have my Gentoo installed to real HDD partition using VirtualBox.


title: Support of USN Journal (change journal) in NTFS-3G driver

text: Does any one know if ntfs-3g driver implements change journal? I checked official website but couldn't find any information re. USN.


title: Reading System manual and large files

text: How can I copy the description of cat command from the manual to the file named cat-man? I have tried to the synopsis of cat command while it is always with a error that no file name cat-man or destination.


I'm experimenting with OpenVPN connections routed through Tor, using pairs of Tor gateway and OpenVPN-hosting VMs. On the server side, link local ports are forwarded to Tor hidden-service ports on the associated gateway VM. On the client side, OpenVPN connects through socks proxies on the associated Tor gateway VM. The above setup works using Debian 7 for all Tor gateway and OpenVPN-hosting VMs. I'm using Whonix, which has been updated to OpenVPN 2.3.2 (built on 2013-09-12). Server-client ping is about 1200 msec. However, the setup does not work using pfSense 2.1 as Tor gateway and OpenVPN- hosting VMs on the server side. pfSense 2.1 also has OpenVPN 2.3.2 (built on 2013-07-24). For both Debian and pfSense clients, I see:               TCP connection established with [AF_INET]192.168.0.10:9152     recv_socks_reply: TCP port read timeout expired: Operation now in     progress (error ...)      This is the same error reported in Debian bug #657964 for openvpn version 2.2.1-3: "openvpn: Can't connect to a VPN using SOCKS proxy". It's also been reported in OpenVPN bug #328 for openvpn version 2.3.2: "openvpn client gives up instead of retrying when proxy server is slow". However, this may not be the same bug. The problem here may be latency in forwarding OpenVPN server ports through Tor hidden services, rather than latency in Tor SOCKS proxies on the client side. Or it may be both. In any case, I find that OpenVPN 2.3.2 servers fail with this client error in pfSense 2.1, but not in Debian 7. Perhaps the latest package in the Debian 7 repository includes bug fixes that were issued since the pfSense 2.1 build. How can I configure OpenVPN to wait for slow SOCKS proxies?


title: Copy a directory to external HDD

text: I'm trying to copy a directory to external HDD- i mounted the device and then typed : `cd root tar -cf - * | (cd /mnt ; tar -xpf -)` I got this error message: "cowardly refusing to create an empty archive" When I do `ls` to the same root directory- it is not empty at all- all my needed files are there. Why does this happen?


title: Solaris - get a list of the commands run at startup/boot?

text: Is there any way of seeing a list of commands that were run at startup/boot on Solaris? I know there is a network drive being mounted at startup but I wanted to see the exact 'mount ...' command being used.


title: sources.list - Understanding syntax & structure in Debian

text: I have generated a sources.list file from http://debgen.simplylinux.ch/ with the following parameters:   * Country: New Zealand   * Release: Stable (Wheezy)   * Architecture: 64 bits   * Sources: Main + Security + Updates   * Include source package: No The output I get is:               deb http://ftp.nz.debian.org/debian stable main         deb http://ftp.debian.org/debian/ wheezy-updates main         deb http://security.debian.org/ wheezy/updates main      My questions are:   1. **Observation:** The 'base' source (line 1) points to my local repository (NZ) but the wheezy-updates source (line 2) points to the main repository (US?). **Question:** Is there any good reason why they cannot both point to my local (NZ) repository? Possible reasons I can assume are that the NZ repository does not contain the wheezy-updates, or that the main repository releases them earlier than the NZ mirror.   2. **Observation:** Line URL in line 2 ends with a trailing slash, compared with the URL in line 1 that does not.  **Question:** Is the trailing slash required or important for either line 1 or 2?   3. **Observation:** The order of the lines goes:     1. Base installation source     2. Base updates source (my understanding is this used to be called volatile?)     3. Security updates source **Question:** Is the order of the lines really all that important? I read here that: > "It is important to list sources in order of preference, with the most > preferred source listed first. Typically this will result in sorting by > speed from fastest to slowest (CD-ROM followed by hosts on a local network, > followed by distant Internet hosts, for example)." However, I would have thought that the security updates were more important, so would go on line 1. Or is is really not that much of an issue?


title: set up a proxy in nginx

text: I'm using amazon cloud. I have configured LB with SSL certificates and LB's port 443 is pointing to 80 to the instance. Nginx is running on instance on port 80. I have configured `nginx` like if some request, say abc.com, comes on port 80 of instance it will proxypass the request to another instance say xyz.com on HTTP. But my concerns is, when I hit `https://abc.com`, it's proxypassing to`http://xyz.com`. I want that, `http://xyz.com` should show `https://xyz.com`. How to set up a proxy in `nginx` where the client connects over HTTPS, but the proxy connects to the final destination server using HTTP?


title: print command instead of echo in linux

text: I simply can print a message in terminal using linux `echo` command.               prayag@prayag$ echo "prayag works on JVM"     prayag works on JVM      Can I have the same output with `print` command. I actually went through their manuals, where `$ man print` describes it as Run-mailcap-programs which term I never heard before. And came to know that it is used to find the correct program to open a file with, based on MIME. ## So is there any way to **print a simple line** using `print` alone instead of `echo`? Found similar kind of problem at Need to assign the contents of a text file to a variable in a bash script, but people suggesting `echo` over `print` there. I tried following, but got issues.               $ print --"text/plain" "prayag works on JVM"     Warning: unknown mime-type for "prayag works on JVM" -- using "application/octet-stream"     Error: no such file "prayag works on JVM"      It asks for a file, with file provided.               $ print --"text/plain" application.properties      Warning: unknown mime-type for "application.properties" -- using "application/octet-stream"     Error: no "print" mailcap rules found for type "application/octet-stream"      But got working in combination with `awk` command with a file provided,               $ awk '{print}' application.properties      prayag works on JVM


title: Why is Vim eating up Ctrl when used with Ctrl+v and how to fix it?

text: I'm using Vim `/etc/zsh/zshrc` to add key bindings for `zsh` because it doesn't work with `inputrc`. In my terminal with tmux when I type `Ctrl`+`v` then `Ctrl`+`LeftArrow` the shell will show `^[OD`. However, when I'm in Vim insert mode, pressing the same sequence will result in `^[[D`. I found out that `^[[D` is what the shell produces when I type `Ctrl`+`v` then `LeftArrow`. I have also changed `^[[D` to `^[OD` in the file `/etc/zsh/zshrc` and it works as expected (pressing `Ctrl`+`LeftArrow` causes the cursor to move back a word). Here is the line I'm talking about:               bindkey "^[OD" backward-word      I guess something is wrong with Vim because it's consuming the `Ctrl`. How do I fix this?


title: No 32 development library error after install glibc-devel.i686

text: I am trying to install gcc 4.9.0 on centOS 6. During `./configure` there is an error coming up:               /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -lgcc_s     /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-   linux/4.4.7/libgcc_s.so when searching for -lgcc_s     /usr/bin/ld: cannot find -lgcc_s     collect2: ld returned 1 exit status     configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.      I have searched for an answer and found out that this error should be resolved by installing the `glibc-devel.i686` package. However, the same error persists even after I install it using `yum`. Any ideas?


title: Is there a way to determine machine hostname without touching "/etc/hosts"?

text: Considering that I'm in a LAN that assigns IP addresses using DHCP (and that I'm not its administrator), how do I set things up such that when I `ping <hostname>` (instead of `ping <IP address>`, I do get something back, without having added the match in "/etc/hostname")? Would I need to do this change in separate places for the web- and for ssh-server? I'm wondering because I _think_ there was a time when I could do this without any fiddling with "/etc/hosts" (or am I mistaken?). The problem with that file is that I would have to do it on every client that wants to use the name-to-IP mapping, and to have to continually change it if some IP address changes. The question really is: is there's a tool that can do network discovery of hostnames (matched to their IP addresses of course).


title: Fun, tricky and hard questions for Unix/Linux Admin interview

text: I am now preparing process of recrutation for group of Unix/Linux Administrators and I was wondering if maybe you have idea for fun or tricky or hard questions to ask the candidates in order to test their knowledge, level of system understanding and way of thinking? I'd ask for fun questions (to lighten the atmosphere and for beginners), tricky questions (to induce thinking and for medium/high level admins) and hard ones (for highest level people, to find ninja administrators). Ideally, you might give the answer along with the question, but this is not entirely required ;) So, any ideas?


title: How to unpack, modify, rebuild and install a SRPM

text: I would like to modify a Fedora 15 package (`gnome-shell-extensions- alternative-status-menu`). It's a small modification (reverting this commit). Using `yumdownloader` I'm able to download a SRPM (`gnome-shell- extensions-3.0.2-1.g63dd27cgit.fc15.src.rpm`). After this, how do I unpack it and then rebuild it?


title: vsftpd - ftp user cannot create folders

text: CentOS - I have created an ftp user that can log in remotely over the internet to the vsftpd server. Now I can log in via ftp, see all the directory listings (not limited/jailed) to any directory, but I **cannot create a new folder** inside `/var/www/html` When I want to create a new directory, it fails:               550 Create directory operation failed      Note, that I have done the following:               chmod 775 as well as chmod 777      as the root user on the server itself (using putty). How do I get write access to a specific folder for an FTP user? **Note** : I have the following permissions:               drwxr-xr-x. 6 david root 4096 Jul  7 20:30 html


title: Missing /etc/default/grub in fedora15

text: Based on this suggestion, I want to edit `/etc/default/grub` to add the line:               GRUB_CMDLINE_LINUX="acpi_osi=Linux"      However, I don't have that file on my system. What should I do?


title: start autossh reverse tunnel automatically when network comes up

text: I connect from my home PC thru an Internet server I own to a restricted client (that I also own) using a reverse ssh tunnel. I have a script that sets up the restricted client to middleman leg of this ssh tunnel. It works fine if I execute the script manually. Here it is:               #!/bin/sh     autossh -M 12399 -oPubkeyAuthentication=yes -oPasswordAuthentication=no -oLogLevel=error  -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i ~/.ssh/named_id_rsa -R 12345:localhost:22 client@example.com -p 22      **I want to have it run automatically whenever the network is up** on this machine. To accomplish this I thought about saving it as: /etc/network/if- up.d/reverse_ssh_tunnel.sh I know I would have to remove "~/" and specify the full path to the private key as home/username/.ssh/named_id_rsa. I suspect I'll have to use su -c `my_script_name` username, but I can't get that to work. Solving this part of my question is the most important. It needs to be fully automatic & unattended. To connect from my home, I do two manual steps: A. ssh home -> middleman   B. ssh middleman -> restricted client Can A & B be done in a single step? (This would be nice, but not essential.) In summary:   1. Ideally, I'd like to do A & B in one step, manually.   2. And I need the restricted client -> middleman `autossh` connection to be fully automatic.


title: apt config file location

text: I have my / mounted as read-only (and my /root as well). Every time I start aptitude, it complains that it cannot write to /root/.aptitude/. Is it possible to tell aptitude to use another directory to store its config files ? For example /var/tmp/aptitude ?


title: How to find list of available shells by command-line?

text: How to list available shells for use by command-line?


title: GNU utility: sort

text: I have an issue sorting a file based on the first two columns. The layout of the file is:               1 998688068 PizzaFan Insurance 22.47     5 072821325 Plaisio Computers 26.35     4 998688068 PizzaFan Food 27.32     5 456834578 G.Yannopoulos Medical 91.67      .... .... I used this command : `sort -n -k 1,2 "$fpath" -o "$fpath.ordered"` The sort result is:               1 473151252 Goodys Food 7.15     1 951515524 Atlantic SuperMarket 41.32     1 998688068 Atlantic SuperMarket 80.23     1 998688068 PizzaFan Food 61.72     1 998688068 PizzaFan Insurance 22.47     2 094321587 Vasilopoulos SuperMarket 6.50      .... .... I don't understand why all columns get sorted (see 3rd column & PizzaFan Insurance) I think -k 1,2 means sort on column 1 and resolve ties with column 2, but it's like it doesn't work. It's the same as using the: `sort -n "$fpath" -o "$fpath.ordered"`


title: RED HAT LOGIN problem with root

text: I want to log in to my new installed RHEL 6.2 I am totally new to Linux. I tried to log in with root, and password that I created during the installation process, but after log in this appears root@myName ~1# : what should I write? I wrote startx but it didn't work


title: Weird samba and gvfs behavior - ~half of directories/files randomly appears to be "missing"

text: _The situation:_ Server with Gentoo Linux and Samba on it. There's around 15 Windows PCs, one MacBook Pro and one Samsung's laptop with Ubuntu. There's no domain, just a workgroup and the server is used only for Samba shares. On Ubuntu I use gvfs to mount samba shares. _And the problem:_ One day around half of directories went missing, but only when viewing on this Ubuntu laptop. If I ssh to the server I can see the missing files/dirs and I can also see the missing things from win or mac computers. _The tempfix:_ When I rename some of the missing directories, even if it's one symbol, missing directories reappear … even without reloading/refreshing the gvfs-mounted share. If I rename instantly back to the previous directories/file names, all previously missing dirs/files instantly go missing again. So, as this problem reappeared again around month later, I could use some advice where to start checking.


title: bind9named binary missing - not starting

text: I have just compiles and installed BIND 9.9.1-P1 on Debian 6.0 as the version in the repositories is too old for Samba4, and am getting the said error. I have been looking for source for named, but cannot find any.               # ls ¦ grep named in /usr/sbin     named-checkconf     named-checkzone     named-compilezone      Any suggestions? Regards


title: "Modules not found" error during kernel install

text: I have a question regarding a kernel installation. I downloaded a new version of net-next kernel source and I performed the following steps:   * `make allyesconfig`   * `make -j16`   * `make modules_install`   * `make install` The problem is that when I try to execute `make install`, I get a "modules not found" error. I am confused here since someone else was able to make the kernel with the same procedure and I am unable to do the same (We both have root permission). Is there something extra I need to do to make sure those modules are visible/available?


title: Shell script hangs on mail command

text: I'm finding that a call to the mail command is causing a script to suspend without error. To close the script I have to ctrl-c or issue a kill command on the process id. The pertinent section of the script is below:               EMAIL_TO="my@email.com"          if [ -f /www/archives/pdf/pdf_201207021048.tar ]; then         echo "file exists"     else         echo "file does not exist"     fi          echo "sending mail next..."          mail -s "pdfbackup" "$EMAIL_TO"          echo "mail sent?"      When running this, I'm seeing the text "sending mail next..." and nothing more. It never returns to prompt. I can see the script is still in memory with ps -ax | grep myscript.sh. I've tried using quotes around the subject and email, and again without. The same result is produced either way. What am I doing wrong?


title: Debian Sparc on Sunfire 240V recommended?

text: We're working on a Sunfire V240 server with SunOS 5.9 (Solaris 9, yeah really old one), I'm not expert on server architecture and I'd like your advices about installing Debian Sparc on those systems.   Is this a good choice, could we even install Solaris Sparc 11 other wise, what about compatibility?


title: Convert output of tree command to json format

text: Is there a convenient way to convert the output of the *nix command "tree" to JSON format? **Edit:** I think I didn't describe my problem well enough. My goal is to convert something like:               .     |-- dir1     |   |-- dirA     |   |   |-- dirAA     |   |   `-- dirBB     |   `-- dirB     `-- dir2         |-- dirA         `-- dirB      into:               {"dir1" : [{"dirA":["dirAA", "dirAB"]}, "dirB"], "dir2": ["dirA", "dirB"]}


title: usage of ! -d in a if condition

text: When reading the bash script for hadoop management, I found the following one               if [ ! -d "${HADOOP_HOME}" ]; then        if [ -d "${CDH_HADOOP_HOME}" ]; then      what does `! -d "${HADOOP_HOME}"` and `-d "${CDH_HADOOP_HOME}`stand for?


title: How can I write a sed script to delete numbers from a line?

text: **Sample File**               a.b.gg3d 0000000001 0000000001 y     a.b.112a 0000000000 0000000001 y     a.b.gg3s 0000000001 0000000001 y     a.b.1111 0000000000 0000000001 m      I have a file that includes about three thousand unique lines, similar to the sample above. I want to use sed to remove the "xxxxxxxxxx xxxxxxxxxx" numbers from each line. Using the sample above, I would like the sed script to produce the following output:               a.b.gg3d y     a.b.112a y     a.b.gg3s y     a.b.1111 m      How can I accomplish this? Is there a string of commands to tell sed something like "delete all numbers after the first whitespace, but leave the last character"?


title: 2 snmp packages; ports 161/162 already in use, can I configure additional ports?

text: I have 2 snmp packages to install on a standalone server. 1 package is already using ports 161/162. Where can I configure a Cacti Listener and which ports can I use? Also which `snmpd.conf` file should I edit?


title: MongoDB install errors / E: Sub-process /usr/bin/dpkg returned an error code (1)

text: I'm trying to install things in Linux (Crunchbang Linux - a derivation of Debian), and I'm getting errors which point towards mongodb-20gen. When I try to remove it using :-                 cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-10gen      I get ...                Reading package lists... Done      Building dependency tree      Reading state information... Done      The following packages will be REMOVED:        mongodb-10gen      0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.      1 not fully installed or removed.      After this operation, 221 MB disk space will be freed.      Do you want to continue [Y/n]? y     (Reading database ... 81657 files and directories currently installed.)      Removing mongodb-10gen ...      arg: remove      invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.      dpkg: error processing mongodb-10gen (--remove):       subprocess installed pre-removal script returned error exit status 100      invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.      dpkg: error while cleaning up:       subprocess installed post-installation script returned error exit status 100      Errors were encountered while processing:       mongodb-10gen      E: Sub-process /usr/bin/dpkg returned an error code (1)      I read something on here for similar errors with MongoDB, and it suggested removing mongo-clients, so, I tried:-                cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-clients      and get:-                Reading package lists... Done      Building dependency tree      Reading state information... Done      Package 'mongodb-clients' is not installed, so not removed      0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.      1 not fully installed or removed.      After this operation, 0 B of additional disk space will be used.      Setting up mongodb-10gen (2.4.6) ...      invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.      dpkg: error processing mongodb-10gen (--configure):      subprocess installed post-installation script returned error exit status 100      Errors were encountered while processing:       mongodb-10gen      E: Sub-process /usr/bin/dpkg returned an error code (1)      on schaiba's advice, I tried :-               cometbill@Linuxn00b:~$ sudo apt-get install -f      and got :-               Reading package lists... Done     Building dependency tree            Reading state information... Done     0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Setting up mongodb-10gen (2.4.6) ...     invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.     dpkg: error processing mongodb-10gen (--configure):      subprocess installed post-installation script returned error exit status 100     Errors were encountered while processing:      mongodb-10gen     E: Sub-process /usr/bin/dpkg returned an error code (1)