title: How to view core files for debugging purposes in Linux?

text: I want to view the contents of a core file while debugging a program. How can I view the contents of a core file?


title: Debian VPS, no loop devices present, modprobe fails

text: After acquiring a new virtual Debian squeeze I ran into a problem regarding loop devices. My plan was to set up an encrypted FS in a regular file and mount it. Unfortunately I can't do that since there are no loop devices in /dev. mount tells me to run modprobe loop, but modprobe fails with > FATAL: Could not load /lib/modules/2.6.32-5-vserver-amd64/modules.dep: No > such file or directory /lib/modules is empty. Still, the loop module seems to be loaded according to lsmod, so I created an /etc/modprobe.conf containing > options loop max_loop=8 and restarted the server. Still nothing. I tried to google every part of the problem, but no site seems to have something on this particular problem. Any ideas?


title: Escape text for further passing to zenity

text: I am going to show an error window using `zenity`:               /usr/bin/zenity --error --text="my error message"      The error text to pass is obtained as output from another application. This output may contain quotes, backslashes and other special symbols which could prevent `zenity` to start correctly.               /usr/bin/zenity --error --text=$(/usr/bin/some-application)     ### e.g. output of /usr/bin/some/application is: failed to "' \perform     ### so here will be an error      What is the easiest way to normalize such output before passing to `zenity`? `/bin/tr` I suppose? But I'd like to show the original message not modified.


title: byobu configuration menu is missing options

text: I've used byobu on servers in the past (with byobu version 3.4) but I recently installed CentOS 6.2 and installed byobu 5.15 from the tarball. Most byobu-config menus have options to change background/foreground color, change keybinding set, default windows, etc. After installing byobu version 5.15, I only have 4 options:   * Help -- Quick Start Guide   * Toggle status notifications   * Change escape sequence   * Byobu currently does not launch at login (toggle on) How can I get these missing options on my current version?


title: How do I output a count of all files with “tty” in the filename in the Linux directory that holds files on system devices

text: I am having trouble knowing how to output a count of all files with “tty” in the filename in the Linux directory that holds files on system devices.


title: GRUB 2 scripting: convert device name in GRUB notation into a Linux device name

text: I'm trying to use partition labels (or UUIDs, that does not matter) to select root partition without use of an initrd/initramfs. With initramfs, this is fairly easy: `root=LABEL=...` or `root=/dev/disk/by- label/...` in the kernel arguments does the job. However, without initramfs the above is not possible: the `LABEL=` notation is decoded by initramfs script, and `/dev/disk/by-label/...` symlinks are created by udev running from the initramfs. Only the `root=/dev/sdXY` notation is understood by the kernel itself. However, GRUB supports shell-like scripting, and I think that it is somehow possible to write a GRUB 2 scriptlet that will generate `root=/dev/sdXY` string from a device label or UUID. Especially, the command `search --label <label> \--set ROOTDEV` will set variable `ROOTDEV` with a string like `hd0,gpt5` which points to the partition with given label. If I understand correctly (please correct me if I'm wrong) the order of devices in GRUB and kernel is the same, so `hd0` is `/dev/sda`, `hd1` is `/dev/sdb` and so on. So here is a question: is there a way, from inside the GRUB 2 script, to convert `hd0,gpt5` into `/dev/sda5`? Exactly the `hd0` into `sda` part - the rest is easy with regexes.


title: Bluestacks on Linux Fedora

text: I am trying to use Bluestacks for running Android application on my Linux Fedora using Wine. I tried `wine BlueStacks-SplitInstaller_native.exe` from terminal. It gave me `Install Mono for Windows to run .NET 2.0 ...` error, so i downloaded Mono For Windows from here. I installed the complete package [checked all boxes including GTK etc] it using `wine mono-2.10.9-gtksharp-2.12.11-win32-0.exe` After the installation is done. After a while it just seemed to stop executing commands. However it did not return the prompt on terminal even after waiting for a long time,so i did Ctrl-C to get back the prompt. This showed some fixeme for the console. Following this by, `wine BlueStacks-SplitInstaller_native.exe` The bluestacks installer comes up and immediately gives the error dialog stating               Unhandled exception: page fault on read access to 0x7de321a8 in 32-bit code (0x100035cf).     Register dump:      CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b      EIP:100035cf ESP:0033f57c EBP:0033f5a0 EFLAGS:00010246(  R- --  I  Z- -P- )      EAX:0012bd98 EBX:0033fa54 ECX:7de32160 EDX:0033f594      ESI:00000643 EDI:0033f84c     Stack dump:     0x0033f57c:  0012bd98 0033f594 0033f84c 00000643     0x0033f58c:  0033fa54 00000136 00000000 00000000     0x0033f59c:  84ac8254 0033f64c 10005604 00000002     0x0033f5ac:  0012bd98 1001854a 0033f84c 0033fa54     0x0033f5bc:  0033f5d0 002206ec 00000000 00220706     0x0033f5cc:  00220706 7bc3d409 00000643 0012bd98      and lot other details. The installer meanwhile continues upto 98% installation and hangs. What step did i do wrong? **Note:** If there is any other technique to get Whatsapp usable on Fedora, do let me know.


title: Adding and removing text from the same place on every line of an emacs buffer

text: This is in a similar vein to my earlier question: Removing the last n characters from every line in an emacs buffer. The comments made there all apply here. Suppose I want to either insert the same text string on every line of an emacs buffer at the same place (k characters from the beginning) or remove n characters from every line of an emacs buffer starting at the same place (k characters from the beginning) could I do that using `replace-regex` and if so, how? If not, is there some other way? EDIT: To be clear, I'd like a solution which uses point and mark to define the location of insertion, as well as one that uses a specific n. EDIT 2: Thanks to alexis for an answer based on `replace-regex`. Gilles pointed out that one could use the rectangle commands, e.g. `string- rectangle`. Though I use these commands regularly, it did not occur to me to use it here. Dumb of me.


title: How can I add PAM functionality in netkit-rsh-0.17

text: I am using CentOS. In my project, that is working on a network, I need an `rsh` utility. I downloaded `netkit-rsh-0.17` for that and until recently all worked fine. But now I found that this utility does not load _PAM Module_ , which is required in my project. In the `README` file, It says,               WARNING: The PAM support in this version may be screwed up. If     you use PAM, please be sure to double- and triple-check the     behavior of rshd, rlogind, and rexecd to make sure they don't     inadvertently grant access when it should be denied. If in doubt,     get the SRPMs from Red Hat and use their sources instead.      Then how can I use this utility to solve my above problem. **I know that rsh should not be used, because of security issue. SSH should be used instead of rsh. But due to project issue, I have to use this only.**


title: How are loaded SSH keys referenced by name?

text: I'm using chef's knife ec2 tool which requires the **name** of a loaded SSH key (that was created in the Amazon EC2 control panel) It seems strange to me that it uses a _name_ to reference the keypair - because the name was created in the ec2 control panel: ![Picture.png](http://img843.imageshack.us/img843/4236/pictureiy.png) When I download the file I am just getting the `mykey.pem` file. Does that somehow contain the encoded keypair name? This key pair's _name_ does not seem to be visible at the command line:               $ ssh-add -L     ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQE69PeuHFtO[truncated]== /Users/me/mykey.pem          $ ssh-add -l     2048 b4:45:70:23:b1:f3:3b:01:11:23:45:67:89:0a:bc:de /Users/me/mykey.pem (RSA)      ### Questions   1. Is there a keypair "name" somewhere that I'm missing? How can I view these?   2. How does a third party software (like the knife tool) know which keypair to use based on the "name" of the keypair that appears invisible? I hope those questions make sense - I'm happy to elaborate on any gray areas.


title: How can I force a tap/tun interface into the running state?

text: I am trying to capture packets on a tun interface with libpcap. I am creating the interface with:               openvpn --mktun --dev tun0      When the adapter is setup it appears as so when I run ifconfig:               tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00               POINTOPOINT NOARP MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:100               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      The adapter needs to be running in order for libpcap to detect the packets:               POINTOPOINT NOARP RUNNING MULTICAST  MTU:1500  Metric:1      Is there any way to force the tun interface to be running so I can capture packets on it?


title: FreeBSD zfs create gpt

text: How can i create gpt marks on working system.                   NAME        STATE     READ WRITE CKSUM         zroot       ONLINE       0     0     0           mirror-0  ONLINE       0     0     0             ad4p3   ONLINE       0     0     0             ad6p3   ONLINE       0     0     0      I want ad4p3 to disk0 and ad6p3 to disk1                   NAME        STATE     READ WRITE CKSUM         zroot       ONLINE       0     0     0           mirror-0  ONLINE       0     0     0             disk0   ONLINE       0     0     0             disk1   ONLINE       0     0     0


title: Java problem - nearly looks like a virus?

text: I have a weird problem since about a week. When I wake up my computer from suspend, a java process starts and consumes about 170 % CPU capacity. I analyzed the java process a bit: it connects to static.icloud-ips.com. Here's a screenshot of what I found out: http://imageshack.us/photo/my- images/688/javavirus.png/ To solve this problem I deleted all files in ~/.java/deployment/cache/ but however, it seems like the file was recreated. Is this a virus? How can I solve this problem? I use Debian Wheezy x64 with Gnome 3.2


title: Align a hex text file at 9 bytes each line

text: I want to align the selected portion of a text file at 9 bytes each column. For example suppose my text file looks like below.               00 2f c6 b8 29 fd 02 37 11  00 9f 74 34 0b 60 72 38 20  00 9e 61 33 8e ab 8a c0 09      00 fa f0 66 6d 0c 44 d6 24 00 a1 11 9d a2 13 a5 b3 83       I want the resulting file to be like               00 2f c6 b8 29 fd 02 37 11      00 9f 74 34 0b 60 72 38 20      00 9e 61 33 8e ab 8a c0 09      00 fa f0 66 6d 0c 44 d6 24      00 a1 11 9d a2 13 a5 b3 83       What is the easiest way to do this? Is it possible to do it in `bash` using `sed` or `awk` maybe? Or a better way to frame the question will be I have formatted my input sequence as seen below.               00 88 ec 40 bf 94 1d 63     f4 00 04 1c 4e 06 d0 2c     2e f9 00 90 03 51 d5 71     cc 86 79 00 24 6b 22 30     b6 66 0f 5f 00 c1 cd a5     c8 45 b9 88 85 00 c0 de     ae 47 d9 91 f9 d3 00 5b      That is 8 bytes each line.If you notice carefully in line 1 first byte is `00`.in line 2 the second byte is `00` and in line 3 the third byte is `00`.I want the align the whole file so that the all the lines begin with a `00`.hope this helps


title: Nouveau doesn't work after upgrade to Debian Wheezy

text: I upgraded from Debian squeeze to wheezy. My box contains an old graphics card not supported by current Nvidia drivers for distros newer than lenny (NV5M64 [RIVA TNT2 Model 64/Model 64 Pro]), so in my `/etc/X11/xorg.conf`, I had `Driver "nv"` specified in squeeze (which didn't seem to work after the update to wheezy). After reading the internets for a bit, I found that my card should be supported by the `nouveau` driver. Replacing `Driver "nv"` by `Driver "nouveau"` in my xorg.conf still didn't produce a useable X. I read a bit more and made sure to remove any and all proprietary pieces of Nvidia stuff, including drm and whatnot. Just going with the non-free drivers, as suggested in many internet posts, was no option: Remember that Nvidia dropped the driver for my TNT2 card for everything newer than lenny. Anyhow, still no success. The only way I got _any_ type of X working was using the "vesa" driver, but only in a resolution lower than my LCD monitor's native 1280x1024.


title: Archlinux ARM Rasperry Pi decryption fail

text: I have created an encrypted Archlinux partition on my SD card, but currently I am unable to decrypt it. I am using the key "Xö&(4n=%YF3Ü!BN" which includes german letters. So for this I have included to /etc/mkinitcpio.conf:               HOOKS="[...] keyboard keymap consolefont encrypt [...]"      In /etc/vconsole.conf I have added               KEYMAP=delatin1     FONT=lat9w-16      And in /boot/cmdline.txt I have added:               vconsole.keymap=de-latin1 vconsole.font=lat9w-16      But I am still unable to decrypt it and I just do not know how to solve this. I am looking forward to hear from you.


title: .dtors looks writable, but attempts to write segfault

text: This is Ubuntu 9.04, 2.6.28-11-server, 32bit x86               $ cat test.c     main() { int *dt = (int *)0x08049f18; *dt = 1; }     $ readelf -S ./test     ...       [18] .dtors            PROGBITS        08049f14 000f14 000008 00  WA  0   0  4     ...     $ ./test     Segmentation fault     $      For the uninitiated: gcc creates a destructor segment, `.dtors`, in the elf executable, which is called after `main()` exits. This table has long been writable, and it looks like it should be in my case (see `readelf` output). But attempting to write to the table causes a segfault. I realize there has been a movement toward readonly .dtors, plt, got lately, but what I don't understand is the mismatch between `readelf` and the segfault.


title: How to build a live Debian CD/USB in Windows, bootable in EFI mode?

text: I tried to install the latest stable Debian release (Debian 7.0 "Wheezy") using the Debian Multi-arch netinstall (AMD64) _"debian-7.0.0-amd64-i386-netinst.iso"_ on my laptop. My laptop has a SecureCore Tiano™ firmware set to "UEFI only". Due to specific requirements:   * EFI only installation   * GPT partition table   * Encrypted LVMs I encountered an issue/bug during the bootloader install step in expert mode: _GRUB/default Debian installer bootloader installation failed._ I need to boot on a Debian live CD/USB in order to update/install GRUB EFI and repair the installed Debian system on the laptop (which currently miss a bootloader). I build a Debian 7.0 Live CD with the "AMD64 rescue+non free" ISO but the live CD won't boot in UEFI only mode (where the regular Debian DVD install does). **Problem is: My second PC runs Windows 7 and I need to build a Live EFI friendly Debian CD/USB on that platform.** I used Pendrive Linux "Universal USB Installer" which can't build "EFI enabled" bootable USB (I experienced this issue previously with the Debian 7.0 "Wheezy" installer: no UEFI only boot). I need to create a Debian Live on USB bootable in EFI mode, what tool/settings should I consider?


title: how to mount a range of drives in bash?

text: I use something like this to unmount a range of drives:               umount /dev/sd[c-k]2      Is there any way to use same thing with mount? something like this:               mount /dev/sd[c-k]2 /[c2-k2]


title: What packages are required to install vim on Fedora?

text: What RPM packages are required to install vim on a recent version of Fedora?


title: When is a reboot required?

text: Apart from upgrading the kernel, are there any changes to a Linux system that require a reboot? I know there are situations where a reboot makes things easier, but are there any that cannot be accomplished except with a reboot? To clarify: I'm thinking of a typical desktop or server system that isn't suffering from a hardware malfunction.


title: What is the setting in bash for globbing, to control whether * matches dot files

text: I was surprised recently when I did something like `mv ./* ../somedirectory` and found that files like `.gitignore` were not moved. I do most of my work in zsh on OS X, and this surprise bit me in bash on CentOS. I tried bash on OS X and found the same behavior: `*` does not match dot files. This seems very undesirable to me, but apparently it's the bash default. (It may be the zsh default too for all I remember, but I may have changed it years ago in my .zshrc and forgotten it ever worked differently.) How can I configure bash to behave as I expected: for * to match all files, and not ignore dot files. In case this is at all unclear, here's how to reproduce it               cd /tmp     mkdir {t,d}est     touch test/{.,}{1,2,3,4,5,6,7}     ls -hal test     mv test/* dest     ls -hal test     # notice dot files are still there     ls -hal dest     # notice only some files were mv'ed


title: gnome-screensaver or xscreensaver is better regarding security?

text: I'm using Ubuntu 12.04. I used to use gnome-screensaver.. but.. it happened too many times that when I closed the lid of my notebook, it suspended itself, OK, but after I wanted to turn it on again.. it just showed me my desktop instead of the login screen... (yes locking IS ENABLED) **Q:** So is it wiser to use xscreensaver, rather then the default gnome- screensaver?


title: What is the interface scope (global vs. link) used for?

text: Routing table entries have an attribute `scope`. I would like to know how the change from `global` to `link` (or the other way round) affects the network system.


title: inotifywait not working when folder is deleted and re-created

text: I am trying to use inotifywait to monitor a folder:               inotifywait -m -r /home/oshiro/Desktop/work_folder      The command works and if I create files in that folder, all seems to work correctly. While the folder is being monitored, if I delete it, I get the following output:               /home/oshiro/Desktop/work_folder/ MOVE_SELF      /home/oshiro/Desktop/work_folder/ OPEN,ISDIR      /home/oshiro/Desktop/work_folder/ CLOSE_NOWRITE,CLOSE,ISDIR      /home/oshiro/Desktop/work_folder/ MOVE_SELF      /home/oshiro/Desktop/work_folder/ ATTRIB,ISDIR      /home/oshiro/Desktop/work_folder/ OPEN,ISDIR      /home/oshiro/Desktop/work_folder/ DELETE Untitled Document     /home/oshiro/Desktop/work_folder/ DELETE Untitled Document 2     /home/oshiro/Desktop/work_folder/ CLOSE_NOWRITE,CLOSE,ISDIR      /home/oshiro/Desktop/work_folder/ DELETE_SELF       If I then re-create that folder again, while the monitoring is still taking place, inotifywait doesn't seem to continue monitoring it, unless I run `inotifywait -m -r /home/oshiro/Desktop/work_folder` again. How do I get around this issue? I basically want to monitor a USB stick which will be plugged in and removed many times during a day. When it's unplugged and plugged back in, I think inotifywait will stop monitoring it, the same way the folder above was deleted and re-created where inotifywait wasn't able to continue monitoring it, unless I run the above command again, i.e. `inotifywait -m -r /home/oshiro/Desktop/work_folder` Should I be using something more appropriate for such tasks and not use inotifywait? cron is not suitable for my needs, as I am not after time based actions, I am after event based actions.


title: How to create a copy of DVD that is larger than maximum size of file on filesystem?

text: How to create copy of DVD, which ISO image size is larger than maximum size of file on filesystem? There is only one DVD drive.


title: How do I share internet with Windows from my Linux box?

text: I have a Linux (Ubuntu 12.04) PC connected to the internet with a Greenpacket WiMax USB modem. I want to share the Internet connection with another computer running Windows 7 Home Premium, connected to the Linux PC over a LAN. Is this possible? How? Is the reverse possible instead (connecting the internet to the Windows computer and sharing it with Linux)?


title: Finding an USB device path

text: Recently I saw this command posted on the internet:               ls -l /dev/disk/by-label/      It worked, but I'm concerned, does it work on other Linux distros? How can I find USB device on the computer where USB is not automatically mounted?


title: What creates /etc/hosts (RHEL 5.5)

text: How does /etc/hosts get created on RHEL 5.5? It's not owned by any RPM and if deleted, it doesn't reappear on reboot, so apparently it's not a service created it. Does anaconda create it by default maybe? I'm trying to figure out exactly when during the install it's created. I'm assuming it must be created by anaconda before installing the RPMs?


title: Will a account get locked while logging in FTP mode to a remote server whose password has already expired in UNIX

text: I have a FTP user id to a remote server, the password for which has expired.The account is getting locked if connection is being made in FTP mode to the server with the old(expired) password. Is this possible?


title: Technology / program selection for picture viewing software

text: I want to learn some Binux usage and/or programming skills and provide an easy to use browser based picture gallery on my local home network. My idea is to have a server machine, that is the Linux machine, and store all my photos in it at some file structure or database. Then I want to access and manage (CRUD = Create Read Update Delete) them from browser on a tablet machine or mobile phone, connected via WLAN to that server machine. My need is for a program or technology which would be suitable for the purpose of easily show and manage that content.   1. **Is there ready program running on Linux to do that?**   2. **If I have to build this from pieces, which technologies are needed to provide the minimum requirements of CRUD ability?** I remember I have seen some file providers that show links to files at browser, but how ready products/technologies there is available to build such a thing up to your home machine?


title: Upgrade Minor Version of Postgres in Debian using apt

text: I'm trying to move from 9.1.3 to 9.1.4. I thought all I had to do was "apt-get update" and "apt-get upgrade", but that didn't work. It did install some updates, but that was only for 9.1.3. Any ideas what I'm doing wrong here?


title: Difference between cp -r and cp -a

text: Looking for the difference between cp -r and cp -a? What does recursive mean in terms of copying files from a folder?


title: What do you do when you try to sudo and root's PATH has gone kerblooey?

text: I've got a feeling something bad just happened to this machine.               faheem@bulldog:/usr/local/src/mercurial$ sudo dpkg -i      mercurial_3.0-1_amd64.deb mercurial-common_3.0-1_all.deb         dpkg: warning: 'ldconfig' not found in PATH or not executable      dpkg: warning: 'start-stop-daemon' not found in PATH or not executable      dpkg: error: 2 expected programs not found in PATH or not executable      Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin     and /sbin      This is an old unmaintained machine I've been using for a while. Assuming it was going to die some day. Looks like this might be the day. It starting throwing errors a bit earlier, and it looks like someone just rebooted it. UPDATE: After running               sudo -s      I checked the value of path               echo $PATH     /usr/local/bin:/usr/bin:/bin:/usr/games      So some stuff is missing from here, e.g. `sbin`, and `/usr/sbin`. UPDATE 2: As it turns out, person or persons unknown deleted the following lines from `/etc/sudoers`.               Defaults        mail_badpass     Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"      Thanks to Anthony for explaining.


title: Extract one occurrence of a pattern from file

text: I have large file containing logs similar to one shown below. I would like to find all transactions(TR#) that were affected with the error. I need to extract one occurrence of each TR# ID. How could I go about it?                   Apr 30 16:51:29.574 application.crit: [6104]:TR#14. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#14. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#14. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#14. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704      Required output:                   Apr 30 16:51:29.574 application.crit: [6104]:TR#14. Transaction send can not be sent. Error Code: 704         Apr 30 16:51:29.574 application.crit: [6104]:TR#238. Transaction send can not be sent. Error Code: 704


title: Hide make targets from shell when users autocomplete in bash

text: Is there a way to flag some targets in a `Makefile` so that they don't appear at all in the shell when the user types `make` and then presses `Tab` ? I am having a `Makefile` with too many recipes and I don't want them all to appear in the shell autocompletion when a users presses `Tab` looking for targets.


title: How do you verify if an INCOMING ssh tunnel is still up and who it belongs to?

text: **See edit below for short version** I am having issues displaying the status of the ssh tunnels on our server. Here is some relevant info:               user001 = remote client's username     123.123.123.123 = ssh server's ip     111.222.111.222 = database server      Right now I'm testing with only one remote client connected. I can see the two reverse tunnels it requested (filtered output):               lsof -i -P     sshd    14652 user001    8u  IPv4 1171285      0t0  TCP localhost:2000 (LISTEN)     sshd    14652 user001    9u  IPv4 1171287      0t0  TCP my.domain.com:2001 (LISTEN)          netstat -atpe --numeric-ports     tcp        0      0 127.0.0.1:2000          0.0.0.0:*               LISTEN      user001    1171285     14652/sshd: user001     tcp        0      0 123.123.123.123:2001     0.0.0.0:*               LISTEN      user001    1171287     14652/sshd: user001      Its very clear here they were initiated by user001 but the regular (-L) tunnel it creates is not listed by `lsof`. The only info I can find that relates to it is displayed by `netsat` and it doesnt even seem to be the tunnel itself but rather the network connection between the ssh server and the database server:               tcp        0      0 123.123.123.123:60299    111.222.111.222:52849     TIME_WAIT   root       0           -                    tcp        0      0 123.123.123.123:60300    111.222.111.222:52849     TIME_WAIT   root       0           -                     Which is a pita because not only is it showing under the root user, it only shows local IPs so I have no way of knowing who's tunnel/connection it is. When all the 50+ remote clients are connected its going to be a total mess to troubleshoot. **The Questions:** Is there a better way to display ssh tunnels? Better command? Some program? Is there any way to have this show under the remote client's user instead or at least show the remote client's ip? Why is `lsof` not displaying it? Thank you. **-----EDIT-----** Ok if you want scratch all that, here is a simplified question: **SSH CLIENT** connects to **SSH SERVER** and requests a tunnel ( using -L ) from his local port 100 to port 5000 on a **Database Server** on the same network as **SSH SERVER**. So we get a tunnel that looks like this: CLIENT:100 -----> SSH SERVER -----> DBSERVER:5000 How do you verify if this tunnel is up when you are logged in the **SSH SERVER** ? I do not want to see if the **SSH SERVER** is communicating to the **Database Server** I want to see if the tunnel initiated by **SSH CLIENT** is still active. The info displayed by netstat only shows that the server has an active connection from a random port to the port 5000 on the ssh server, it doesnt say why this connection is up (no pid linked to it) and it shows root as the owner (which is completely useless).


title: Accessing iDevice data out of IOS, using Linux

text: Here there is my friend's iPad 2(Wifi only) which is updated and is gone to the recovery mode. The only things that work on it is the recovery mode and DFU mode. The question is whether there is a way to connect the device to linux therefore we can get some of its data out of the device. All I could find was about connecting a healthy IOS to linux destos. Can it be done? P.S: There was a thread here: Accessing the iPhone file system via Linux/Unix that didn't get any clear result.


title: Test if command accepts a specific option

text: What is the preferred way to test if a command takes an option? What are the caveats? As a motivating example, at login my shell aliases grep to add several --exclude-dir options but this option is not available on all the machines I access.


title: Where should I mount a disk to store backups?

text: I'm new to Unix, and wanted to give it a try. I had an old PC lying around and decided to turn it into a network based backup system to keep the data in the other PCs safe. So I installed FreeBSD on it, and set up Bacula on it to handle the backups. So far so good. I'm configuring the system now, and I noticed that the default configuration stores backups in `/tmp`. The FreeBSD manual says that `/tmp` should be used for files that are not usually preserved across a reboot, which is obviously not the case for backups. I have a separate disk I want to keep the backups on, and I know how to configure Bacula to write to wherever I want it to write to. My question is, where should I mount the disk? It seems like maybe `/var` would work. I was thinking of creating a `/var/bacula/` directory and mounting my disk there. Would this be appropriate, or is there some other directory that should be used for long term storage?


title: Octave package installation: "couldn't create installation directory"

text: I am trying to install the statistics package (1.0.10) for Octave (3.2.4), which requires the miscellaneous package. When installing the miscellaneous package (1.0.11) I receive the following error:               couldn't create installation directory     /usr/lib/octave/packages/3.2/miscellaneous-1.0.11 : Permission denied          error: called from `pkg>copy_files' in file /usr/share/octave/3.2.4/m     /pkg/pkg.m  near line 1473, column 13 error: called from: error:       /usr/share/octave/3.2.4/m/pkg/pkg.m at line 756, column 5          error:   /usr/share/octave/3.2.4/m/pkg/pkg.m at line 287, column 7      I am running Ubuntu 11.04. What is causing this problem and how do I resolve it?


title: Record from the microphone indefinitely

text: I'm working with the application "arecord" (under Arch-Linux). I'm want to capture sounds from my microphone and save it to the disk. This is my command:               arecord -f dat -d 2 --channels 1 -D hw:1,0 /tmp/test.wav      this capture a 2 seconds (-d -> duration) file and then save it to disk. This basically working. `What I want to do` is to record a "infinite" sound track ( _without_ fixed duration) and save this track immediately to disk. without waiting for finish. So, if I will get power shut down while recording, the sound track will be saved into disk up to the power cut down. Is this possible?


title: Unable to apt-get after editing firewall settings

text: I am currently testing out the Tomcat on `apache` from turnkey Linux and I am unable to run any `apt-get` commands. The problem started when I edited the firewall settings from the `webmin`. How can I get this to work again? Firewall settings: ![enter image description here](http://i.stack.imgur.com/hd0LH.png) ![enter image description here](http://i.stack.imgur.com/vQeCw.png)


title: In emacs term-mode, what is char-mode and line-mode? How do they differ?

text: Googling, I can only find how to switch between these two, but no description of what they are. So, what is char-mode and line-mode? And what mode are usually regular shells in?


title: Convert to postscript format using the Backend command before sending to a printer

text: Without using CUPS is there an way to add something on the Backend line in the print queue to convert all print sent to a queue to postscript from PDF format before sending the output to the printer?


title: OpenSUSE version of arandr

text: `arandr` is a Debian/Ubuntu version of `xrandr` with a graphical interface to make it easier to use. I want the same package on OpenSUSE to use on my laptop. Can anyone help me?


title: processing multiple extensions

text: I have done a script to convert recursive .jpg files to another size:               echo $re     mkdir "$re"_tmp     for a in *.jpg ; do convert "$a" -resize $re "$re""_tmp/${a%.*} ["$re"].jpg" ; done      I'd like integrate a multi extension support: png, bmp, etc. better with:               FILEFORMAT="jpg, JPG, png, PNG, bmp, BMP"      any idea to build it? PS: variable re is the new size 1024x768 (or 800x600, etc)


title: Why does the i386 version of software get installed on an x86_64 system?

text: Why does the i386 version of most software get installed along with the x86_64 version on a CentOS 5.8 64-bit system?               # yum install php-xml     Loaded plugins: fastestmirror     Loading mirror speeds from cached hostfile     Setting up Install Process         Package php-xml-5.3.12-5.el5.art.x86_64 already installed and latest version         Package php-xml-5.3.12-5.el5.art.i386 already installed and latest version         Nothing to do


title: How to handle network interfaces on Crunchbang Linux desktop?

text: I have installed Crunchbang 10 (Statler) which is based on Debian 6 (Squeeze). By default there is network-manager-gnome 0.8.1 (`/usr/bin/nm-applet` I believe) running with an icon near the clock/tray area. I can add, edit and delete new connections there, but I cannot delete or change the existing one. There is a popup telling me I have insufficient privileges. Coming from Debian servers and little experience with Linux desktops and GNOME, I have only heard of the default UNIX permission system. But I am not sure if this is the permission system in effect here? What would be the steps to have full control over the existing connections (that were added by the installer?) using the network-manager-gnome "applet"? I am in the group `netdev` already. EDIT: I tried the following:               killall nm-applet     sudo nm-applet&      Now I could change and also save the settings, but I have now multiple connections and cannot remove the old ones. On startup the old one gets active.


title: Single machine with two disks

text: I have two disks on my local computer, so when you write to these disks simultaneously, are changes writting to them serially or in parallel?


title: Is it safe to use customized CFLAGS for linux kernel, e.g mmx sse instructions

text: Is it safe to use customized CFLAGS while compiling linux kernel, e.g enable SSE, MMX instructions, is that a problem ?


title: Why, When and Where is phy used

text: Reading that `iwconfig` is deprecated and should be replaced by `iw`, I was for the first time confronted with `phy`. I understand that `phy0` and so on represent physical devices, and perhaps `iwphy #` is equivalent (Found with `iw dev wlan0 info`). In any case, I couldn't find out what these `phy`s are used for. Moreover I don't quite understand the distinction for the `iw` command. Can someone help me out?


title: sshfs breaks symlinks from SFTP server

text: Does anyone know how to mount a remote SFTP path via SSHFS so that you can work with symlinks? When I do this, all the symlinks I create point to the wrong files (not the ones I linked to.) All the symlinks I am interested in are relative (not absolute) so having them appear exactly as they do on the remote machine would be ideal. Using sshfs with the default mount options, I cannot create a symlink to another file in the current directory:               $ cd /mnt/path/to/sshfs/mount     $ ln -s ./test ./test2     $ ls test2     lrwxrwxrwx 1 root webusers   11 Jul  3 09:11 test2 -> /test      Which is obviously incorrect, as the link target is in the current directory (`./test`), but here you can see that sshfs creates a link to `/test` which is incorrect - the link target is `/mnt/path/to/sshfs/mount/test` not `/test`. By adding the `transform_symlinks` option when I mount the sshfs filesystem, I get a relative link instead with the same command, but it still points to the wrong place:               $ cd /mnt/path/to/sshfs/mount     $ ln -s ./test ./test2     $ ls test2     lrwxrwxrwx 1 root webusers   11 Jul  3 09:13 test2 -> ../../../test      Here I tried to link to `./test` in the current directory, but instead I got a link to `../../../test` three levels up! Connecting with the command line SFTP client `sftp` instead of mounting with sshfs does work however:               sftp> open ...     sftp> symlink test test2     ...     $ cd /mnt/path/to/sshfs/mount     $ ls test2     lrwxrwxrwx 1 root webusers   11 Jul  3 09:13 test2 -> test      So this tells me the remote SFTP server is working fine (since I can create symlinks with a dedicated SFTP client), but for some reason I am unable to create any working symlinks though sshfs. Oddly enough, when I use sshfs to mount a path on an SSH server providing shell access (as opposed to an SFTP-only server) the symlinks work fine - I can create them correctly. It only seems to be problematic when connected to an SFTP-only server. What am I doing wrong? Is there a special option I have to pass to sshfs when I am connecting to an SFTP server to make the symlinks work?


title: How do I set up proper ownership of these files?

text: I need the directory `/var/www/` (and everything inside it) to be modifiable by only authorized users. The way I tried to do this was:               sudo groupadd webmasters     sudo usermod -G webmasters pi # My user is pi     sudo chown -R root:webmasters /var/www/     sudo chmod -R ug+rw /var/www/      ...but I can't modify anything in `/var/www/`, nor can I create new files in it. What am I doing wrong? How do I set this up the way it needs to be? What I'm envisioning is:   * Everyone in the group `webmasters` can create, delete, and edit files in `/var/www/`   * All newly-created files/folders are owned by `root:webmasters`   * All newly created files have permissions 775: `-rwxrwxr-x`   * Is is _vital_ that **no one** without authorization be able to have write permissions, OR any sort of Setuid/Setgid ability. (Authorization for write access can only be granted by Root.) Am I taking the wrong approach to this? Do I have the right idea, but I'm just messing something up? What's going wrong?


title: How and where can I permanently set $ program file to have extra argument '&'

text: When I run a program from terminal like so:                $ program file        For example                $ gedit myfile.txt      I cannot think of a time when I would not prefer to use '&' so that I can free up my terminal for use while the program is running. Does anyone know where or how I might set this '&' as an argument for such situations?


title: Difficulty setting up iptables

text: I'm very new to *nix operating systems, and I'm having some trouble which I believe is because of misconfiguration of the iptables firewall. My server has SSH running on port 22, and server software running on TCP port 25565. SSH and the server software respond appropriately to connections made from inside the network (that is, connections made using the server's local address, 10.0.0.xx). However, if I attempt to access them from outside the network or using the router's external IP address, they do not respond. The router is configured to forward those ports to the server; I very much doubt there is an error there. After researching iptables, I tried a few guides, but I am not seeing any results. The output of iptables -L is as such:               Chain INPUT (policy DROP)     target     prot opt source               destination     ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh     ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:25565     ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http     ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:27015     ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination          Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination      An nmap scan from inside the network reports that port 22 and 25565 are open, and that ports 80 and 2705 (another server software that I am not running at the moment) are closed. Running nmap with the router's external IP returns no useful results; I believe the router is detecting the scan attempt and refusing to respond. The server is running Debian in text-only mode. Does anyone see what the problem is, or have troubleshooting steps to suggest? In response to comments: netstat -tpln gives the following (among other things); I assume this is good, though the difference between tcp and tcp6 escapes me.               tcp6       0      0 :::25565                :::*                    LISTEN      3092/java      Hosts.deny is devoid of entries. However, /var/auth.log has some... _interesting_ contents. Is it normal for people to start trying to bruteforce my root password the very minute SSH is exposed? But yes, a perusal of the logs seems to suggest that I'm the only person who cannot SSH into my server.


title: Wake monitor from sleep remotely

text: I have an Ubuntu server running `xdm` with `openbox` on which is plugged a monitor that displays a video which is launched via a cron daemon. When the monitor is not used for a certain amount of time, it goes into sleep mode and I cannot wake it up with the video process : The monitor stays black. How can I wake the monitor? Without installing packages if possible, and without a physical access to the machine.


title: area on disk after the MBR and before the partition start-point

text: If I use a MBR partitioning scheme and create a primary or extended partition with `fdisk`(version 2.20.1), then it starts on sector 2048. If I remember correctly, then older versions of `fdisk` started the first partition on sector 63. If MBR needs only 512 bytes, then why doesn't the first partition start on sector 2? What is kept on those 2047 sectors? Some stage of the boot- loader?


title: Issues in XRDP installation on Cent OS 6.5

text: I already went through the similar issue tracked in Installing XRDP on Cent OS 6.5, however it haven't helped me to fix. I am using MAC and trying to install XRDP in CentOS release 6.5 (64 bit). So that I can connect to this Centos machine from MAC. I followed the steps explained in http://ajmatson.net/wordpress/2014/01/install-xrdp-remote-desktop-to- centos-6-5/ Created a new VNC user account named **_user_name_one_** and allotted a password as mentioned in http://wiki.centos.org/HowTos/VNC-Server Now, when I tried to connect Centos using Remote Desktop Connection (from MAC), I am receiving following error: ![enter image description here](http://i.stack.imgur.com/fSfDt.png) Initially my vncservers configuration in etc/sysconfig/vncservers are as follows:               VNCSERVERS="1:user_name_one"     VNCSERVERARGS[1]="-geometry 800x600"      As suggested, now changed the config values as follows:               VNCSERVERS="0:user_name_one"     VNCSERVERARGS[0]="-geometry 800x600"      **Error log in /var/log/xrdp-sesman.log:**               [20140416-06:43:43] [WARN ] [init:45] libscp initialized     [20140416-06:43:43] [CORE ] starting sesman with pid 1442     [20140416-06:43:43] [INFO ] listening...     [20140416-06:46:56] [INFO ] scp thread on sck 7 started successfully     [20140416-06:46:56] [INFO ] ++ created session (access granted): username user_name_one, ip 202.83.25.7:13889 - socket: 7     [20140416-06:46:56] [INFO ] starting Xvnc session...     [20140416-06:47:06] [ERROR] X server for display 10 startup timeout     [20140416-06:47:06] [INFO ] starting xrdp-sessvc - xpid=1717 - wmpid=1716     [20140416-06:47:06] [ERROR] X server for display 10 startup timeout     [20140416-06:47:07] [ERROR] another Xserver is already active on display 10     [20140416-06:47:07] [DEBUG] aborting connection...     [20140416-06:47:07] [INFO ] ++ terminated session:  username user_name_one, display :10.0, session_pid 1715, ip 202.83.25.7:13889 - socket: 7      **Log file found under /home/user_name_one/.vnc/SPU4-1-3-24-47230 :1.log**               Xvnc TigerVNC 1.1.0 - built Feb  4 2014 05:26:31     Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)     See http://www.tigervnc.org for information on TigerVNC.     Underlying X server release 11300000, The X.Org Foundation          Initializing built-in extension Generic Event Extension     Initializing built-in extension SHAPE     Initializing built-in extension MIT-SHM     Initializing built-in extension XInputExtension     Initializing built-in extension XTEST     Initializing built-in extension BIG-REQUESTS     Initializing built-in extension SYNC     Initializing built-in extension XKEYBOARD     Initializing built-in extension XC-MISC     Initializing built-in extension XFIXES     Initializing built-in extension RENDER     Initializing built-in extension RANDR     Initializing built-in extension DAMAGE     Initializing built-in extension MIT-SCREEN-SAVER     Initializing built-in extension DOUBLE-BUFFER     Initializing built-in extension RECORD     Initializing built-in extension DPMS     Initializing built-in extension X-Resource     Initializing built-in extension XVideo     Initializing built-in extension XVideo-MotionCompensation     Initializing built-in extension VNC     Initializing built-in extension GLX          Wed Apr 16 06:43:46 2014      vncext:      VNC extension running!      vncext:      Listening for VNC connections on all interface(s), port 5900      vncext:      created VNC server for screen 0     No protocol specified     vncconfig: unable to open display ":0"     No protocol specified     xrdb: Resource temporarily unavailable     xrdb: Can't open display ':0'     No protocol specified     xmodmap:  unable to open display ':0'     No protocol specified     No protocol specified          ** (gnome-session:1605): WARNING **: Cannot open display:       Can anyone please help me on this! Thanks.


title: Expansion of the word UNIX?

text: Is UNIX an acronym? What does it stand for?


title: Kate replaces alignment spaces by tabs

text: When indenting a block of code in Kate (3.11.2), spaces used for alignment are replaced by tabs, ruining all alignments and putting me in the hell of restoring all these spaces. Example:               if (true)     {     —→$foo = 'bar'.     —→•••••••'baz';     }      (`—→` are tabs, `•` spaces) I indent using two characters wide tabs. The problem is when I select these lines and press the `Tab` key to add an indentation level: it replaces groups of two spaces by one tab:               —→if (true)     —→{     —→—→$foo = 'bar'.     —→—→—→—→—→'baz';     —→}      Removing the last (odd) space. This is wrong since tabs width is undefined and must be able to vary without breaking the code presentation. In my settings (`Editor Component → Editing → Indentation`), I set `Indent using` on `Tabulators and Spaces` but it doesn't save it and returns immediately on `Tabulators`. Is it a bug? Or is my Kate misconfigured?


title: Linux driver for MSI z87 MPOWER motherboard NIC?

text: I am using Linux with the following hardware configuration:               1) Intel Core i7 3.4GHhz 4770k     2) MSI Z87 MPower motherboard     3) MSI GeForce GTX760 2GB DDR5 graphics card     4) 1TB hard drive     5) 16GB RAM      And I can't connect internet in it. I enabled the LAN port from BIOS. My LAN is " **MSI Z87 MPOWER Atheros Killer LAN** " I think Linux don't have any driver for this LAN port, if any body knows when can i get a driver for this LAN for Linux. Please inform me.


title: How would one permanently set names for network interface (wifi/ethernet) in arch

text: Seems every reboot the names reverse different nics ( wifi/ethernet )…


title: Generate suggestions for errors from a lookup dictionary

text: EDIT: the files were changed to tsv to deal better with spaces in text fields I have 2 csv files in the following form: ### File 1: availableText.csv (can be very big) > "id1" , "text1-1"   >  "id1" , "text1-2"   >  "id1" , "text1-3"   >  "id1" , "text1-4"   >  "id2" , "text2-1"   >  "id2" , "text2-2"   >  "id2" , "text2-3"   >  "id2" , "text2-4"   >  ... ### File 2: wrongText.csv > "id1" , "texta"   >  "id2" , "textb"   >  "id3" , "textc"   >  "id4" , "textd"   >  ... For every line in `wrongText.csv`, I want to filter the available text entries for the same id and suggest the best available option using `tre-agrep` (a grep-like functions that allows error in the pattern and using -B returns the best match) For example, for `id1`: > tre-agrep -B 'texta' (from text1-1:4) | tr "\n" "$"   >  ( will produce something like 'text1-2$text1-4' ) The desired output file would be like this: > "id1" , "texta" , "text1-2$text1-4"   >  "id2" , "textb" , "text2-1$text2-3$text2-4" Note:   1. The CSV can be converted to any format, but text may contain spaces (but not special characters)    2. IDs do contain both special characters and utf-8    3. Speed does not matter (for now at least)


title: How to run Gimphoto/Gimpad from command line?

text: In short, my question is this: what command line should I use to run Gimpad? Because Gimphoto it simply doesn't wont to react to my command when I click on the icon although it is installed and it worked fine at first, for several times. So, I think that if I will use a command line, I will force it to arise from the dead. My OS came with Gimp pre-installed, but I have tried Gimphoto on a Windows system and I liked a lot. So I tried to install it on my Linux too. Unfortunately, doing that is very difficult and tricky for a beginner, as you can see on their site. After several attempts I saw that Gimpad appeared in the menu and, it responded to my clicks. But all this worked only for several times. Now it has stopped to respond, although, since the moment I saw it works, I have made no changes related to Gimp and its "family". So, can you tell me an useful command line to force Gimpad to appear (and thus, to have a real Gimphop)? Even so, using a command line every time I open Gimpshop, is not very handy, so, if you have any other - permanent and easy - solution to solve this problem, I would be most grateful to hear it. Note: I don't know if this information is helpful, but I have observed that after installing Gimpshop, the splash-screen and everything related to the program remained labelled as Gimp, not Gimphoto or else, like you can see under Windows, when you use the Gimp-family. I am using Zorin OS which is based on Ubuntu 12.04, and I am quite new to it although I like to use the terminal for small things like updating and upgrading system, installing and even opening apps (mostly if and when they get stubborn like in this case).


title: When networkmanager is used, OpenSuSe gets stuck during boot for 10 minutes

text: I have this problem on all machines that I every installed (different configurations, different geographical locations, even different OpenSuSe versions) and it's extremely irritating. When I turn on network manager, all machines simply hang during boot. It seems that they hang on mounting network file systems. This happens even if the machines are connected to wired network (I would understand if it would happen only on WiFi). Now, this problem disappears if I turn of auto mounting of NFS partitions (each machine mount at least one), by setting the noauto in /etc/fstab. A solution would be keeping the noauto and leaving the automount to some daemon, that is started later, or fixing the problem with network manager. Any ideas?


title: best BSD distro for Desktop PCs?

text: I want to know if the bsd distros are for the desktop usage at all If yes; What is the Best bsd distro for desktop usage some thing like ubuntu linux which is easy to use and good GUI management instead of command line system management


title: calling sigprocmask from bash

text: I have a process that spawn a bash command with `system()` while the signal mask has all the signals blocked. This cannot be fixed easily. The bash command eventually `exec`s into a process. The all blocked signal mask is inherited from the original process through bash to the final process, so in the end I get a process that is "immune" to all the signals (except of course `SIGKILL`, `SIGSTOP`, etc). The workaround would be resetting `sigprocmask` from bash, but I cannot find any related command. Is it possible to do?


title: How do I redirect command completion output?

text: On the command line, I can redirect or pipe output of a command to a file or another command using the `>` or `|` operator after the command. I have come across a less standard situation that I would like to redirect the output to a file, but I don't seem to have the oppurtunity to redirect it: When at a new terminal,               [chiliNUT ~]$      if I press `Tab` without typing anything first, I get asked               display all 1725 possibilities? (y or n)      and if I then type `y`, I get a nice long list of different commands. How can I redirect or pipe this output to a file? I don't seem to get the chance to type `> myfile.txt` anywhere. Using _CentOS release 6.4 (Final)_.


title: Configuring CentOS apache server to default to a specific port for ExpressJS and Node

text: Completely new to Linux and virtual private servers so please bear with me. I have a webapp built on ExpressJS and NodeJS that runs on `port 5000` of my server, accessible via web by typing: `http://00.000.000.000:5000`. When you go to my non-port IP address (`http://00.000.000.000`) it shows the CentOS Apache setup welcome page. I've tried running my Express app on `port 80`, but I get an `Address In Use` error. What do I have to do to set up CentOS so that accessing its IP address at `00.000.000.000` loads up my Express app? I've tried adding `port 5000` to listeners in my `/etc/httpd/conf/httpd.conf` file but this did nothing.


title: Having trouble executing a compiled C program

text: I am running an Ubuntu v10.04 through VirtualBox. To test the persistence of files I create in the virtual machine, I wrote a very basic C program. When I shutdown the virtual machine and restart it, I see that the files have been retained. **What happens:**   * I can check the directory with `ls /root/` and see both `program_name.c` and the compiled `program_name`   * I use this command to compile: `gcc program_name.c -o program_name`   * I can run `./a.out` and the program will execute properly.   * Opening the C code with `nano program_name.c` shows the program, as I expect it to be. **The problem is...**   * When I try to the program via `./program_name`, nothing happens!   * If I check the exit status (`echo $?`), it is zero. **So what gives...?** I am a beginner, clearly, and I am having difficulties understanding why I can't run the compiled C program, even though I can find it. It is most bizarre to me considering I can locate all the files AND `./a.out` executes it properly. **EDIT:** Edited for clearer presentation. **Edit regarding answer...** In the off chance that someone else comes to this looking for help, it should be noted that while the `file program_name` command did expose that the file was blank, the cause hasn't been determined. I successfully ran the executable before I restarted the virtual machine. Perhaps I didn't shut down the virtual machine properly? Anyways, checking the file was/is certainly helpful!


title: when update kernels do they close bugs?

text: I'm not an expert in linux but when I upgrade my kernel to latest stable one which is 3.12.2, **does it close all security bugs**? How linux security bugs be closed? by installing newer kernel or how ??and who closes these bugs?


title: Screwed up my bash prompt, what happened?

text: I just thought I might get version information about the current bash by entering               bash -v      That brought many lines of code to stdout and left me with a line that appears right above my usual promt               printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"     [foo@bar path]$      I think I have a tiny clue what this might be (the code that renders how the prompt looks like), but I have no idea whatsoever how to get rid of this. Who does?


title: /var has most of the drive space. Need / to have most of it

text: So when my host setup my dedi, they seemed to apply most of the drive space to /var I am on cpanel, and need most of the space for the /home directory where all the accounts and data are. But on previous dedi's ive had the majority of the drive was just assigned to / This is what I get when I do a                   df -h                   Filesystem            Size  Used Avail Use% Mounted on         rootfs                 20G   16G  3.7G  81% /         /dev/root              20G   16G  3.7G  81% /         none                   16G  404K   16G   1% /dev         /dev/md2               92G   14G   74G  16% /var         /dev/loop0            4.0G  139M  3.7G   4% /tmp         /dev/loop0            4.0G  139M  3.7G   4% /var/tmp         /dev/root              20G   16G  3.7G  81% /var/named/chroot/etc/named         /dev/root              20G   16G  3.7G  81% /var/named/chroot/usr/lib64/bind      Not sure why its like this. Can I somehow use the 92G for / rather then /var without losing any data and things going tits up? I am on centos 6 if that helps. thanks mike


title: Why does mount require root privileges?

text: Why does Linux require that a user be root/using sudo/specifically authorized per mount in order to mount something? It seems like the decision as to whether to allow a user to mount something should be based on their access rights to the source volume/network share and to the mount point. A couple of uses for non-root mounting are mounting file-system images to a user owned direction and mounting a network share to a user owned directory. It seems like if the user has control over both sides of the mount equation everything should be cool. **Clarification of access restriction:** I feel I should be able to mount anything that the user otherwise would have access to to a mount-point that the user is the owner of. For instance, on my computer /dev/sda1 is owned by user root and group disk with permissions `brw-rw----`. Therefore non-root users can't mess with /dev/sda1 and clearly mount shouldn't allow them to mount it. However if the user owns /home/my_user/my_imagefile.img and mount point /home/my_user/my_image/ why shouldn't they be able to mount that image file on that mount point with:               mount /home/my_user/my_imagefile.img /home/my_user/my_image/ -o loop      As kormac pointed out there is a suid problem. So some restrictions would have to be added to prevent suid from being a problem as well as potentially some other issues. Perhaps one way to do this would be to make the OS treat all files as belonging to the user that did the mounting. However for simple read/write/execute, I don't see why this would be a problem. **Use case:** I have an account in a lab where my home space is restricted to 8GB. This is tiny and very very annoying. I would like to mount an nfs volume from my personal server to essentially increase the amount of room that I have. However, because Linux does not allow such things I'm stuck with scp'ing files back and forth to stay under the 8GB limit.


title: Determine if the current user has write permission in a directory

text: I know you can determine the owner of directory by doing:               ls -ld ~/foo | awk '{ print $3 }'      You could then compare it to the current user by doing this:               if [[ $(ls -ld ~/foo | awk '{ print $3 }') == "$USER" ]] # or $(id -u -n ) instead of $USER     then         echo "You are the owner"     else         echo "You are NOT the owner"     fi      But you can have permissions to write without being the owner. How do you determine this?


title: Prevent tmux from starting up on SSH

text: I would like `tmux` to create a new-window when I ssh onto a machine from an existing tmux session. However, I do not want a tmux session started on the new machine! I have the following in my `.bashrc`, so that `tmux` automatically starts up:               if [[ "$TERM" != "screen" ]]     then        # try to attach to existing session, or start a new one        tmux attach-session -t "$USER" || tmux -2 new-session -s "$USER"        exit     fi      I also have an `ssh` function:               alias ssh='ssh_func'     ssh_func (){         if [[ "$TERM" == "screen" ]]; then             tmux new-window -n "$1" "ssh $@";         else             /usr/bin/ssh "$@";         fi     }      This works ok, but I do not want a tmux session started on the machine I ssh to, because this gives me 2 sessions in the same terminal window. Is there anything I can put in my `.bashrc` so that tmux does not start up on a machine if the ssh command has been invoked from a tmux session? I am using PuTTY and tmux 1.5.


title: enabling thinkpad fn keys in openbox

text: I recently abandoned `gnome` and switched to a minimal `openbox` setup without any desktop environment. However, of the function keys on my laptop (ThinkPad), only the brightness keys are now responsive (they all worked properly in my previous desktop environment -- gnome 3 fallback). How can I restore function to the other Fn keys (volume, display device, etc)?


title: Arch Linux and Windows

text: I know this place maybe isn't the best place to ask for help with this specific question, but I guess you can help. I have a UEFI system with partitions arranged as follows:               #      # /etc/fstab: static file system information     #     # <file system> <dir>   <type>  <options>   <dump>  <pass>     # /dev/sda2     UUID=1839555a-70c8-4fec-8938-cfd7a16ecc6d   /           ext4        rw,relatime,data=ordered,discard,noatime    0 1          # /dev/sdb1     UUID=6d26afd2-cc3e-44a4-b5bd-ea209cd4343d   /home       ext4        rw,relatime,data=ordered,discard,noatime    0 2          # /dev/sda1     UUID=7628-D37A          /boot       vfat        rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2          # /dev/sdb2     UUID=f37bdb49-1d0f-4455-8f2d-559b923bfb40   /var        reiserfs    rw,relatime 0 2          # /dev/sdb3     UUID=96c1dbed-cf83-4a2e-9fc2-dcd9fa01a6bb   /tmp        reiserfs    rw,relatime 0 2      (note that this is my system's fstab) now, here is some info about how these partitions are arranged and their sizes: hardware:               SSD - 60Gb     HDD - 500Gb      / - about 20Gb on the SSD   /boot - about 1Gb on the SSD /home - about 100Gb on the HDD   /var - 10Gb on the HDD   /tmp - 1Gb on the HDD That means that I have about 389 Gb of empty space on the HDD, I want to use 100~200Gb from those to install Windows for games but I also want to keep some space for installing Gentoo. What would be the easiest way to install Windows? I don't want to put it on the SSD and won't use it for anything other than gaming, and I don't want to ruin my current Arch setup. Also can use the same /tmp partition in Arch or Gentoo? or it isn't possible? Same question but with a swap partition (that is if I eventually have to use one). BTW what about using a VM? is it worth it? I have 8Gb RAM and can easily get more... And do you have any other recommendations?


title: Stat usage in truss command?

text: I want to get the access time and modification time of the file in unix solaris machine. The `stats command was not found in that solaris machine. Could you please suggest which is the alternative command to find the access time and modification time of the file? I used the following (which clearly didn't work):               sftp> truss -f -v 'lstat,lstat64' ls -d 140901.log     Invalid command.      Could you please suggest the command?


title: debian/XFCE Virtualbox Guest on a Mac: how to use home and end keys?

text: So I have a Mac, and rather than boot debian/XFCE directly and have to configure hardware drivers I'm using VirtualBox. This means that my multitouch trackpad works well, and I can jump in and out of the VM very easily. I have correctly configured my keyboard mapping, including those pesky alt shortcuts, and everything. The problem comes from the lack of `home`/`end` keys. In OS X, I've got used to using `Ctrl+A` for `home` and `Ctrl+E` for `end`, which works everywhere (Terminal, obviously, plus TextMate, and even in forms in Chrome). However, in XFCE this only works inside a terminal by default. I'd like to extend that shortcut (or, indeed, something like `Ctrl+Left`/`Ctrl+right`, since `Ctrl+E` seems to actually be used in applications like eclipse) to map to `home`/`end` as global keyboard shortcuts. However, the two places where we can configure shortcuts in XFCE (Settings -> Keyboard -> Application Shortcuts, and Settings -> Window Manager -> Keyboard) the first wants a "command" to run on a particular shortcut, and the second doesn't allow you to add custom actions. Do I want to do this in a lower level configuration, like Xorg or something, or is there a way to configure global shortcuts like this in XFCE?


title: Unable to ping gateway & other Linux boxes on same network

text: I'm somewhat new to Linux, but I'm trying to network a few Linux machines. I can't seem to be able ping the gateway or the other Linux machines. My scenario: I have a few Linux boxes set up on a `10.45.89.x` subnet with the gateway being `10.45.89.1`. On all of these, I'm unable to ping anything except `127.0.0.1`. I'm wondering if I need to modify any of the routing tables or hosts file. Below is a few commands and their output. Perhaps I need to check something else? ### netstat -r output:               10.45.89.0   *   255.255.255.0    U     10.112.0.0    *    255.255.0.0    U     169.254.0.0    *    255.255.0.0    U     default    10.45.89.1    0.0.0.0    UG      ### /etc/hosts               127.0.0.1 localhost.localdomain  localhost     127.0.0.1 localhost.localdomain  localhost     9.37.253.154 rpt.rhn.linux.ul.com      ### /etc/resolv.conf               domain demolotus.com     namserver 127.0.0.1      ### /etc/sysconfig/network               NETWORKING=yes     NETWORKING_IPV6=no     HOSTNAME=st852.demolotus.com      ### ip route show dev eth0               10.45.89.0/24  proto  kernel  scope  link  src  10.45.89.138     default via 10.45.89.1      ### ifconfig               eth0    Link encap:Ethernet  HWaddr 00:0C:29:01:28:CD     inet addr:10.45.89.138  Bcast:10.45.89.255 Mask:255.255.255.0     UP BROADCAST MULTICAST MTU:1500 Metric:1          eth0:0 Link encap:Ethernet HWaddr 00:0C:29:01:28:CD     inet addr:10.45.89.139  Bcast:10.45.89.255 Mask:255.255.255.0     UP BROADCAST MULTICAST MTU:1500 Metric:1      ### ip addr show dev eth0               2: etho0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000     link/ether 00:0c:29:01:28:cd brd ff:ff:ff:ff:ff:ff     inet 10.45.89.138/24 brd 10.45.89.255 scope global eth0     inet 10.45.89.139/24 brd 10.45.89.255 scope global secondary eth0:0      Any suggestions are greatly appreciated. Thanks!


title: locate vs find: usage, pros and cons of each other

text: In Linux and Unix systems there are two common search commands: `locate` and `find`. What are the pros and cons of each? When one have benefits over the other?


title: What are the steps needed to get Redhat/Centos 7 to boot from an mdadm RAID?

text: I've spent a day on this. Figured it was time to ask. In the end I couldn't get around "Bad magic number in super-block ..." On an average install, my sda exits setup as an EFI. I'm cool with that but it makes it tough to follow most of the recipes out there. These 2, found 'em here (Best way to create RAID on an existing system drive) got me close to joy: http://community.spiceworks.com/how_to/show/340-lvm- single-drive-to-lvm-raid-1-mirror-migration http://www.howtoforge.com/how-to- set-up-software-raid1-on-a-running-lvm-system-incl-grub2-configuration- ubuntu-10.04 I'm running SSDs so I really want my sys on RAID1 ... Appreciate the help!!


title: Matching two files for similar first line

text: I have 2 set of files. File one contains ID's ex:               1111     2222     6666     3333     4444      File two contains ID and username:               1873 Neil     1111 Roger     7632 Tim     3333 Oscar     8723 Greg     4444 Roy     6666 Patrick      I want to extract the ID and username, but only the ones that has the same ID as in file 1. I did the normal `grep -f file1 file2`, on two test files I made, with few Id's such as the ones i just posted. However, when i apply this to the two proper files, where file1 contains 3500 ID's and File2 contains 12000 ID's + Username, instead of extracting the 3500 lines that occur in both files, it extracts 12000 lines. However, with the 2 test files, and a few dummy ID's it will only extract the correct ids and leave the others. Any tip on what's wrong?


title: Why I failed to reboot my centOS after I updated linux kernel?

text: I got a reboot error like the one showing in the picture      ![enter image description here](http://i.stack.imgur.com/HRCpM.png) I installed kernel using these commands:               make mrproper     cp /boot/config-2.6.18-371.11.1.el5 .config     sh -c 'yes "" | make oldconfig'     make menuconfig     make -j4     make -j4 modules_install     make install       No errors were found. Then I changed `/etc/grub.conf` to set default boot kernel. I could log in CentOS if other Linux kernel version was selected.


title: Run level script - Help

text: I want the following command to be ran, as soon as system boots.               glances -s -P redhat &      How to achieve that? I tried writing a run level script which didn't work as expected.


title: FreeBSD on RPi doesn't see TP-Link wifi dongle

text: I've installed FreeBSD 10 on a Raspberry Pi via Crochet. I'm trying to get it to work with a TP-Link TL-WN727N v3 USB wifi adapter, which should be supported and seems to work for others (though presumably on more standard hardware) via the `run` driver. However, though I can see a message in `dmesg` when the device is connected, I don't seem to see something indicating that the driver recognizes it and can use it, nor does `ipconfig` seem to want to have anything to do with it. Here's all that appears in `dmesg` when I connect the dongle:               ugen0.4: <TPlink> at usbus0      I should be seeing more messages from `run`, right? At any rate, `ifconfig` does not abide:               Pi ~> sudo ifconfig wlan0 create wlandev run0     ifconfig: SIOCIFCREATE2: Device not configured      The instance of the system that Crochet creates was pretty bare-bones, so I can't help but wonder if I'm missing a needed kernel module or something, but I'm not sure what I could be missing. Here's output that may be relevant…               Pi ~> cat /boot/loader.conf      ehci_load="YES"     uhci_load="YES"     ohci_load="YES"     usb_load="YES"     wlan_load="YES"     wlan_wep_load="YES"     wlan_ccmp_load="YES"     wlan_tkip_load="YES"     wlan_amrr_load="YES"          if_run_load="YES"     runfw_load="YES"          Pi ~> kldstat     Id Refs Address    Size     Name      1   27 0xc0100000 5b0290   kernel      2    1 0xc06b1000 222f0    if_run.ko      3    3 0xc06d4000 ae48     firmware.ko      4    6 0xc06df000 5b51c    wlan.ko      6    1 0xc0751000 1391c    uhci.ko      7    1 0xc0765000 12fac    ohci.ko      8    1 0xc0778000 a024     wlan_wep.ko      9    1 0xc0783000 e418     wlan_ccmp.ko     10    1 0xc0792000 b3c4     wlan_tkip.ko     11    1 0xc079e000 9c18     wlan_amrr.ko     12    1 0xc07a8000 ac34     runfw.ko      So `ehci` isn't loading, though it doesn't load manually either, and at any rate I don't know if that's relevant to this…               Pi ~> sudo kldload ehci     kldload: can't load ehci: No such file or directory     Pi ~> ls /boot/kernel/ehci.ko     /boot/kernel/ehci.ko      What should I look at next? EDIT: `usbconfig` output by request:               Pi ~> sudo usbconfig     …     ugen0.4: <802.11 n WLAN TPlink> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)


title: Arrow keys spontaneously stop working in vim

text: I recently upgraded from OS X 10.6 (I think) to 10.9. Since then it seems, while editing in `vim`, the arrow keys will "spontaneously" stop working. At one point, in frustration I "mashed" one of the arrow keys and was _eventually_ shown a "E388 Couldn't find a definition" error. All other times I've experienced it, the arrows, having worked for awhile, suddenly start _dinging_ at me! Quitting and reopening solves the problem _temporarily_. But, I'd like to _prevent_ it! Anyone know what this might be? And how to fix it? * * * It looks like my default `vimrc` was modified during the update. If my memory is correct, it was a pretty big file previously. Now, it just contains this:               " Configuration file for vim     set modelines=0         " CVE-2007-2438          " Normally we use vim-extensions. If you want true vi-compatibility     " remove change the following statements     set nocompatible        " Use Vim defaults instead of 100% vi compatibility     set backspace=2         " more powerful backspacing          " Don't write backup file if vim is being called by "crontab -e"     au BufWrite /private/tmp/crontab.* set nowritebackup     " Don't write backup file if vim is being called by "chpass"     au BufWrite /private/etc/pw.* set nowritebackup      I have no idea what these options do yet. I'll look into it -- but, hopefully someone here knows more quickly than I can google and read ...


title: Find out current working directory of a running process?

text: What command(s) can one use to find out the current working directory (CWD) of a running process? These would be commands you could use externally from the process.


title: Updating Linux Mint Without Internet Access

text: I can't afford to have an internet connection at home. Is there any way of figuring out what update I need for my system so that I can download the same onto my USB stick from the office internet connection, take it home and then update my system with the USB stick. EDIT: I'm using windows 7 in the office which is connected to the internet and I need to download all the updates that are needed for the proper functioning of my Linux mint system at home.


title: How to reduce chrome's virtual memory usage?

text: I am running a Debian Jessie and having memory issues when using Google Chrome ![Screenshot of a htop sorted by memory usage](http://i.stack.imgur.com/JfJY4.jpg) I tried disabling extensions, disabling cache, flushing the cache, and disabling the web 3d rendering, but nothing really improves. I am getting huge lags some times and I am really wondering where this is coming from.


title: Emacs font size changes frame size?

text: I'm using emacs 23.1.1. I set the font size in my .emacs with               (set-face-attribute 'default nil :height 100)      The problem is that my emacs is now really small. The outer box (what I call a window and what I think emacs calls a "frame") is sized normally, but the inner box (which I call a "frame" and emacs a "window", I think) is too small. I tried the suggestions here, but neither of them seem to work. Any ideas? I'm on ubuntu netbook if that's relevant. My entire startup file is:               (add-hook 'after-make-frame-functions       (lambda (frame)         (progn           (set-frame-height frame                 (/ (x-display-pixel-height)                    (frame-char-height)))           (set-frame-width frame                 (/ (x-display-pixel-width)                    (frame-char-width))))))               (autoload 'octave-mode "octave-mod" nil t)     (setq auto-mode-alist           (cons '("\\.m$" . octave-mode) auto-mode-alist))     (add-hook 'octave-mode-hook               (lambda ()                 (abbrev-mode 1)                 (auto-fill-mode 1)                 (if (eq window-system 'x)                     (font-lock-mode 1))))     (tool-bar-mode -1)     (set-face-attribute 'default nil :height 100)      Here is a picture of what it looks like. It might be hard to tell, but the "window" is taking up the whole screen; that whitespace is all inside emacs. ![Emacs](http://i.stack.imgur.com/EQrWA.png)


title: I am failing to build DocBook-utils

text: I was following these instructions (DocBook-utils 0.6.14), and now I get the following failure when running `make`:               ...     SGML_CATALOG_FILES=/etc/sgml/catalog \     SGML_SEARCH_PATH=../../doc:.. \         nsgmls ../../doc/docbook-utils.sgml | \         sgmlspl ../../helpers/docbook2man-spec.pl     nsgmls:../../doc/docbook-utils.sgml:1:55:W: cannot generate system identifier for public text "-//OASIS//DTD DocBook V3.1//EN"     nsgmls:../../doc/docbook-utils.sgml:9:0:E: reference to entity "BOOK" for which no system identifier could be generated     nsgmls:../../doc/docbook-utils.sgml:1:0: entity was defined here     nsgmls:../../doc/docbook-utils.sgml:9:0:E: DTD did not contain element declaration for document type name     nsgmls:../../doc/docbook-utils.sgml:11:11:E: there is no attribute "LANG"     nsgmls:../../doc/docbook-utils.sgml:11:19:E: there is no attribute "ID"     nsgmls:../../doc/docbook-utils.sgml:11:34:E: element "BOOK" undefined     ...      This goes on for several more lines.


title: standard VCS ignore list

text: What all do you think is the best standard list of ignored files for VCS? For example here's my .gitignore_global file.               # Compiled Sources #     ###################     *.pyc     *.pyo     *.exe     *.so     *.o     *.a     *.la     *.dex     *.class     *.elf     *.ko               # Build Enviornment #     #####################     CMakeCache.txt     CMakeFiles               # Packages #     ############     *.bz2     *.iso     *.dmg     *.7z     *.tar     *.gz     *.zip     *.apk     *.ap_                    # Logs and Databases #     ######################     *.log     *.sql     *.sqlite               # OS and Application #     ######################     .DS_Store     enthumbs.db     *~     *.sw?     Thumbs.db               # IDE Crap #     ############          # Eclipse     .classpath     .project     .metadeta     .pydevproject     .cproject               # KDevelop     *.kdev4               cscope.*     ncscope.*          # Other VCS #     #############     .svn     .hg          !.gitignore          *.old     *.orig     \#*#      Any comments? Things I'm missing? Things that should be there? (I'm sure I'm missing windows ones. Feel free to add them, but I don't dev on windows so I'm going to stay out =] ) I'm trying to keep this as project/language/IDE agnostic as possible. Ie I know the `bin` and `gen` folders in android projects should be ignored, but that should go in the `.gitignore` file in the project imo.


title: Laptop web cam not recognised by Linux Mint

text: I am new to Linux and I have a 64-bit Linux Mint 10 but it does not recognise my Lenovo Y650 camera. When I try to open the Video4Linux Control Panel, I get the following error: > Unable to open file /dev/video0   >  Permission denied. Could you please give me any suggestions?


title: Error: Can't open display: (null) after some time

text: Each time after a certain amount of time, any attempt to run a graphical program is causing the error "Can't open display". For example:               [shhdup@localhost ~]$ LANG=C xterm      No protocol specified     xterm: Xt error: Can't open display: :0          [shhdup@localhost ~]$ LANG=C xdotool getactivindiw     No protocol specified     Error: Can't open display: (null)     Segmentation fault (core dumped)      Some system info:               Linux localhost.localdomain 3.10.6-2-ARCH #1 SMP PREEMPT Tue Aug 13 09:47:01 CEST 2013 x86_64 GNU/Linux     i3 version 4.6 (2013-08-07, branch "tags/4.6") © 2009-2013 Michael           Stapelberg and contributors     X.Org X Server 1.14.2     Release Date: 2013-06-25     X Protocol Version 11, Revision 0     Build Operating System: Linux 3.9.7-1-ARCH x86_64      Current Operating System: Linux localhost.localdomain 3.10.6-2-ARCH #1 SMP PREEMPT Tue Aug 13 09:47:01 CEST 2013 x86_64     Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=3bca1b94-7f18-4ec7-a589-e50f295db4fc rw quiet     Build Date: 01 July 2013  10:48:42AM          Current version of pixman: 0.30.2


title: What is the local6 (and all other local#) facilities in syslog?

text: ## What I understand On *nix servers, we configure sending logs using `facility.severity`, where `facility` is the name of the (let's call it) "component" of the system, such as kernel, authentication, and so on; and `severity` is the "level" of each of the logs logged by a facility, such as `info` (informational), `crit` (critical) logs. So, if I want to send kernel critical logs, I'll use `kern.crit`. The combination of facility and severity is known as the priority, for example...   * priority = kern.crit   * facility = kern   * severity = crit ## Question There are "facilities" called `local0` to `local7`. What in the world are these `local#` facilities? I'm asking specifically about `local6`, since it's usually the most common one I find in searches. My question is actually because I'm configuring Snort (SourceFire Intrusion Sensor) to send logs, so I wanted to know which `facility` to use. My question is not Snort specific though, because `local#` facilities are everywhere; on Cisco and IBM's WebSphere Application Server for instance. ## Research   * `RFC3164`, which is where the syslog protocol is defined, only says:              local6 - local use 6      Which doesn't really describe it, as opposed to:              auth   - security/authorization messages        * In Ubuntu, `man syslog` shows:                 LOG_LOCAL0 through LOG_LOCAL7                       reserved for local use      Also, vague.


title: How to see which URLs are blocked by Privoxy

text: I want to see a log of which URLs are blocked by Privoxy, but I cannot find this anywhere. Relevant lines in my configuration file (`/usr/local/var/log/privoxy/logfile`) are as follows:               confdir /usr/local/etc/privoxy     logdir /usr/local/var/log/privoxy     logfile logfile      The log file `/usr/local/var/log/privoxy/logfile` is empty. Are blocked URLs logged in another file? Or how do I turn logging of blocked URLs on?


title: Why is lighttpd saying "unknown config-key: accesslog.filename"?

text: I have created a simply vhost on Lighttpd web server and put these lines on the .conf file.               server.errorlog                = "/var/log/lighttpd/error.log"     accesslog.filename             = "/var/log/lighttpd/access.log"      I have read error.log and I found this:               2011-04-22 00:36:58: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored)      How is it possible? `accesslog.filename` exists, it's an option of the server. I found it on their website: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ConfigurationOptions What can I do?


OpenSuse 13.1 I have an embarrassingly simple question that I'm compelled to ask: How can I tell which apps will "work" inside my desktop environment (Gnome 3)? Do certain apps require KDE? What should I look out for that would tell me? For example, I'm curious about Linux video game emulator programs and noticed a list here: http://www.linuxlinks.com/article/20081012160727880/VideoConsoles.html It's unclear to me which of these require Gnome, which require KDE, and which of these don't work at all inside desktop environment.


title: Arch Linux iMX6 capacitive touch LCD panel

text: I want to create an embedded system with a 7 inch capacitive touch screen and am planning on using Arch Linux on a Varscite made Freescale iMX6 quad based SOM development kit for this purpose. What I am struggling to find info on is how I should approach getting Arch Linux ARM running on a new board, as far as I can determine this should not be to hard as there is already a generic release for the iMX6 but I apparently still have to do something to get it running on this specific board but I have no idea what it is and how I should go about doing it. Another thing that I am struggling to figure out is how to deal with setting up Arch to display to an LCD panel like the FM-TPM070800480-01 from Fannal, how is this dealt with? Where do I need to configure timing for the display etc.? The last thing I need to find out is how I would go about getting Arch to respond to the i2c touch events that capacitive panels generate?


title: What is the structure of Libvirt Qemu VM dump/save files?

text: I need to do some exploration of Qemu-KVM virtual machines physical memory (particularly I need to check the fact of the physical memory intersection). In order to do that I'm trying to save VM's state with a `virsh dump` or `virsh save` command. The dumped files have binary structure, and I cannot find a description for that, exepting this unofficial(?) tool. It is told there that `virsh dump` creates file of _QEMU-savevm format_ while `virsh save` gives a Libvirt-QEMU- save formatted file. However, I didn't manage to find these terms on the Internet. I'll be glad if someone could clarify this situation, maybe giving a link to the mislaid documents. Thank you,


title: Selinux is denying access to mysqld

text: I have a script that dumps a mysql database. It then compresses the file and this gets stored in my home folder by using cron. The problem is I seem to be getting an error message. > mysqldump: Couldn't execute 'show fields from `auth_group`': Can't > create/write to file '/tmp/#sql_151e_0.MYI' (Errcode: 13) (1) > c2duo_db-22072011.sql Now on my centos server graphical end, it says selinx has denied access to mysqld. Ofcourse if I disable selinux this works fine. _But I need selinux enabled._ Is there a way around this problem? **cron**               10 11 * * 5 /home/sh/mysqlbackup.sh      **mysqlbackup.sh**                 #!/bin/sh              mysqldump -uroot -ppassword --opt c2duo_db > /home/sh/c2duo_db-`date +%d%m%Y`.sql              cd /home/sh         tar -zcvf c2duo_db.tgz *.sql      **EDIT:** Here what I get from the command `grep mysqld /var/log/audit/audit.log | tail | audit2why`.               type=AVC msg=audit(1311581788.889:12363): avc:  denied  { write } for  pid=22102 comm="mysqld" path="/tmp/#sql_151e_0.MYI" dev=dm-0 ino=103481390 scontext=root:system_r:mysqld_t:s0 tcontext=root:object_r:httpd_sys_content_t:s0 tclass=file             Was caused by:                     Missing or disabled TE allow rule.                     Allow rules may exist but be disabled by boolean settings; check boolean settings.                     You can see the necessary allow rules by running audit2allow with this audit message as input.      Also, my mysql server was already installed on this machine. So I guess it is an official repo.


title: How to use netperf on specific NIC port?

text: I have two servers, `SERVER` and `CLIENT`. Each server has its own onboard 1 GbE ports, and its own NIC with a 10 GbE port. `SERVER` and `CLIENT` are interconnected on both a 1 GbE switch (administrative traffic) and a 10 GbE switch (data traffic). I want to test the performance of a specific 10 gigabit connection using `netperf`. How do I specify to use the 10 GbE NIC ports instead of the 1 GbE onboard ports? Right now this is what I'm doing:               root@SERVER:~$ netserver     Starting netserver at port 12865     Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC          root@CLIENT:~$ netperf -H SERVER -l 15


title: Use a specific interface for a specific destination subnet (source IP setting)

text: I am looking for some sort of routing trickery to set a specific source IP: Local machine has two IPs; Eth1: 192.168.0.1 Eth1:2 192.168.0.2 Default gateway is 192.168.0.254 via Eth1 Remote subnet is 10.0.0.0/24 Any traffic that is sent to 10.0.0.x host, I want to leave via Eth1:2 so that it has IP 192.168.0.2 when it is received by the remote hosts, or some how force 192.168.0.2 to be my source IP when talking to 10.0.0.x hosts.


title: Cant make dual screens work

text: I installed manjaro on my system. Only one screen is working. The screen that is working is connected to the GPU (nVidia GTX 770). The other screen is connected to the Motherboard (Integrated graphics, Intel HD4600). Xrandr Output is that one screen is connected. I want to point out that this setup works on Ubuntu and Linux Mint. Someone told me it was about Xorg, but he didnt have enough knowledge about it. How can i make it work on Manjaro?


title: Editing /etc/init.d/mysql to remove mysql.sock automatically

text: I am running MySQL on a CentOS release 6.5 (Final) virtual machine. It is used for testing Joomla. The phyiscal host reboots frequently, which is fine. The VM, however, does not perform a clean shutdown. When it reboots there is a lock file here: `/var/lib/mysql/mysql.sock` I built a shell script that will remove it for me that i currently execute manually. This works perfectly well but requires that i run it.               #!/bin/bash     sudo mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak     sudo service mysqld restart      It was suggested to me that I edit the /etc/init.d/mysql to automatically remove the lock file for me. While this seems like a good idea the lock file does perform a valuable purpose and to tamper with that im mysqld might be more harmful that good. What can i do to remove the lock file automatically after a reboot?


title: Why doesn't xsetwacom work from udev?

text: I made a script to rotate my Wacom Bamboo tablet 180 degrees. It works fine when I execute it as myself (user) or root, but when started from `udev` (i.e. when plugging the tablet into a `usb` port) it won't work. **Udev rules** :               SUBSYSTEMS=="usb", ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00d1", ATTRS{manufacturer}=="Wacom Co.,Ltd.", RUN+="/usr/local/bin/red-wacom-bamboo.sh"      **Wacom script /usr/local/bin/red-wacom-bamboo.sh** :               #!/usr/bin/env bash          exec > /tmp/red-wacom.log     exec 2>&1          # I had to do this otherwise xsetwacom would say:     # "Failed to open Display ."     # Is there a way to do this without using my username?     export XAUTHORITY=/home/redsandro/.Xauthority     export DISPLAY=:0          /usr/bin/xsetwacom set "Wacom Bamboo 2FG 4x5 Pen stylus" Rotate half     /usr/bin/xsetwacom set "Wacom Bamboo 2FG 4x5 Finger touch" Rotate half      **Result in /tmp/red-wacom.log** :               Cannot find device 'Wacom Bamboo 2FG 4x5 Pen stylus'.     Cannot find device 'Wacom Bamboo 2FG 4x5 Finger touch'.      (Note that the error in the log means the udev rule itself is not the problem.) I tried setting a `sleep` in the script, maybe it needs a few ms. But that doesn't help.   * Why doesn't this script work when called directly from `udev`?      * How do I fix this?   * Can I call a script from `udev` as a specific user? (e.g. sync `/home` to external backup drive - /home/ is only visible to it's user)


title: Why does NOEXEC not prevent the specified program from running?

text: I have tried the NOEXEC in my CentOS6.4 I have edited my `/etc/sudo.conf` file as below :               Path noexec /usr/libexec/sudo_noexec.so      and `/etc/sudoers`:               ssh ALL=(root) ALL,NOEXEC:/usr/bin/passwd      I am sure that the lib for noexec exists in the right path, but as the user ssh still can change password. The NOEXEC did not make any effect, can anyone give some suggestions on it?


title: how to get Cisco IOS public key for automatic scp connection

text: I want to backup the running-config of all switches per SCP to a server. Question 1: is this possible with kron? Is there a better way and why? Question 2: how can I get the public key of the switch to auto-authentificate the user to the server? Thank you very much.


title: How do I find the repo information to setup yum?

text: I am running openSUSE 12.3 with the KDE 4 desktop. I am trying to install software, and most sites say to use `yum` to do it. I try this, but it appears that I do not have any of these repositories configured for yum. I have added one text file `repo` to the `/etc/yum.repos.d/` directory, which worked fine, but when I do not know how to find out the repository information for all of these other software packages. The sites seem to assume that you have the repository configured already, which in my case does not appear to be true. Can anyone explain to me the best way to get this setup?


title: Makefile $wildcard only matches top directory

text: I am trying to implement a makefile for my C project which has a directory structure as follows:               PROJECT_FOLDER:         folder1         folder2         folder // n number of folders         main.c          FOLDER1:         subfolder1         subfolder // n number of subfolders      And subfolder 1 can have further subfolders etc.. etc.. I don't intend on being stupid with my directory structure, the deepest I may go is 1-2 MAYBE 3. Thus far I have:               # A Makefile to build our First_Game_2 project          dirs = * */parse          PROJECT =  main     HEADERS =  $(PROJECT).h     OBJ     =  $(foreach dirz, $(dirs), \             \             $(patsubst %.c,%.o,$(wildcard $(dirz).c)) \             \         )          C99     =  gcc -std=c99     CFLAGS  =  -Wall -pedantic -Werror           $(PROJECT) : $(OBJ)             $(C99) $(CFLAGS) -o $(PROJECT) $(OBJ)               %.o : %.c $(HEADERS)             $(C99) $(CFLAGS) -c $<          clean:             rm -f $(PROJECT) $(OBJ)      My problem is if `parse` contains a subfolder, say `test` to give the structure               PROJECT_FOLDER/parse/test      In such a case, nothing is returned from               $(foreach dirz, $(dirs), \             \             $(patsubst %.c,%.o,$(wildcard $(dirz).c)) \             \         )      I tested the output of the function with the following makefile               # A Makefile to build our First_Game_2 project          dirs = * */parse          PROJECT =  main     HEADERS =  $(PROJECT).h     OBJ     =            C99     =  gcc -std=c99     CFLAGS  =  -Wall -pedantic -Werror           $(foreach dirz, $(dirs), \             \             $(patsubst %.c,%.o,$(wildcard $(dirz).c)) \             \         )      Which, given a structure of:               dirs = * */parse */parse/test      Produces an output of:               main.o parse/parse.o      Ignoring `*/parse/test` Why is this the case, what can I do to fix my OBJ assignment to recognize `*/parse/test` or otherwise?


title: How to force Intel GMA 3150 use only fixed rectangle of the screen e

text: I have Atom N455 with Intel GMA 3150 and Debian 6 xfce x64. It's connected to 1680x1050 display by VGA cable. The problem is that the screen looks blurry (on Win also). I found that the maximum resolution supported by this integrated graphics is 1400x1050. So, I want to make it clear, how to turn off screen auto scaling to achieve 1400x1050 visible area on display.


title: connecting (bridging) two networks

text: I would like to connect (bridge) two networks (ppp0 and eth2). Normally you would do this with brctl but one of the network-interface is a ppp-device so it won't work (ppp can't transport ppp-frames). What I could do, is enable ip- forwarding but that is not enough as I want traffic from that ppp-device only go to eth2 and vice versa. NAT is fine. Another problem is that as far as I know you cannot push routing information to ppp-clients? Any help is appreciated! (solutions that work with windows/mac/android clients would be nice but not absolutely required)


title: Xorg.conf, which modules should be loaded for better performance?

text: In general what is supposed to be in the Module section of the Xorg.conf file in order to get maximum performance from a graphic card? At the moment my Module section is empty... also because I didn't find any useful doc about modules. ...and if it matters, my graphic card is an ATI Radeon HD 5700 Series and I've already installed the Catalyst 12.6 drivers on my Ubuntu 12.04 box.


title: How to setup whatever.localhost.dev to resolve into 127.0.0.1 on Ubuntu 12.04?

text: I'm running Ubunut 12.04 I want *localhost.dev to point to 127.0.0.1. Ubuntu 12.04 comes with dnsmasq-base installed with network-manager. But there is no /etc/dnsmasq.conf.   1. So I installed the dnsmasq package   2. The /etc/dnsmasq.conf file appeared   3. I added: address=/localhost.dev/127.0.0.1   4. sudo restart network-manager Doesn't work. How do I solve this? EDIT: Turns out it works after a restart.


title: How to get the time of several commands with a loop

text: I have this command:               time -p sh -c 'command1; command2;'      So `command1`and `command2` is executed and I get the real, user and sys time printed on the console. But I want that `command1; command2;` is looped 10 times and then I want to get the time which is used for the two commands.


title: arm-linux-gnu-gcc Vs arm-linux-gcc

text: What is the difference between `arm-linux-gnu-gcc` and `arm-linux-gcc` Which should be used for cross compiling a C program for ARM ?