title: Good idea to symlink a virus database directory?

text: My Comodo Antivirus is installed in /opt/Comodo where its virus databases are stored in a directory `/opt/Comodo/scanners` which by far is the largest sized directory. I am running Crunchbang (debian) from 60gb SSD where `/` is allocated 16gb /swap 2gb & the rest as NTFS named 'CRUNCH'. Now what I did:               sudo mv /opt/Comodo/scanners /media/CRUNCH/Misc/Comodo_Bases/scanners     sudo ln -s /media/CRUNCH/Misc/Comodo_Bases/scanners /opt/Comodo/scanners      Above is an attempt to move & then symlink whole database directory from NTFS partition in a bid to save space while the executables remain where they are in `/opt/Comodo`. Will my solution work? **UPDATE** IT WORKED


title: Connect to a remote linux server that is in default setup, not configured to be connected?

text: In our Company we have an internal-wikipedia-like help site. The Problem is, the MindTouch-Wiki is out of date, so i have to update it! The Problem is, its running virtual. Its Ubuntu 7.7 In Microsoft Server 2003/2008, i cant connect to the machine using "Connect to virtual machine" Im not familiar with linux, is there a way to connect to the Ubuntu that is open by default? Like RDP oder VNC in Windows?


title: Automatically detect boot disk with grub0.9X

text: I have boot loader setup on a USB key, so when I boot with local grub4dos installation, I use:               rootnoverify (hd0)     chainloader +1     boot      But since I had two disk (usb and internal HDD), how can I detect the name(hd0, sometimes hd1, don't know why) automatically ? I can't just use `find --set-root`, because my usb has 3 partitions, and wasn't booting from one of it. Any solutions?


title: Russian characters instead of French or German, with Helvetica font

text: I was having problems with websites requiring the Helvetica family-font in their css: all special french and german characters were replaced by unrelated russian characters. That put me on the track of Helvetica. I have launched `font-manager`, to check about Helvetica. And when I enter custom text, the font is simply wrong. Example text:               être, spécial, déjà, aïe, bücher, öffentlich,  währe      Visual result: ![font-manager display](http://i.stack.imgur.com/kOvRJ.png) How could I fix the Helvetica font so as it displays properly ? Edit: `locate Helvetica` returns:               /usr/lib/libreoffice/share/psprint/fontmetric/Helvetica-Bold.afm     /usr/lib/libreoffice/share/psprint/fontmetric/Helvetica-BoldOblique.afm     /usr/lib/libreoffice/share/psprint/fontmetric/Helvetica-Oblique.afm     /usr/lib/libreoffice/share/psprint/fontmetric/Helvetica.afm     /usr/share/fonts/downloaded_unknown_copyright_use/Helvetica.ttf     /usr/share/fonts/type1/mathematica/Helvetica-Bold.afm     /usr/share/fonts/type1/mathematica/Helvetica-BoldOblique.afm     /usr/share/fonts/type1/mathematica/Helvetica-Oblique.afm     /usr/share/fonts/type1/mathematica/Helvetica.afm     /usr/share/matplotlib/mpl-data/fonts/pdfcorefonts/Helvetica-Bold.afm     /usr/share/matplotlib/mpl-data/fonts/pdfcorefonts/Helvetica-BoldOblique.afm     /usr/share/matplotlib/mpl-data/fonts/pdfcorefonts/Helvetica-Oblique.afm     /usr/share/matplotlib/mpl-data/fonts/pdfcorefonts/Helvetica.afm     /usr/share/perl5/Font/Metrics/Helvetica.pm     /usr/share/perl5/Font/Metrics/HelveticaBold.pm     /usr/share/perl5/Font/Metrics/HelveticaBoldOblique.pm     /usr/share/perl5/Font/Metrics/HelveticaOblique.pm


title: How to add specific directories to "updateb" (locate) search path?

text: I keep my digital music and digital photos in directories in a Windows partition, mounted at `/media/win_c` on my dual-boot box. I'd like to include those directories—but only those directories—in the `locate` database. However, as far as I can make out, `updatedb.conf` only offers options to exclude directories, not add them. Of course, I could remove `/media` from `PRUNEPATHS`, and then add a whole bunch of subdirectories (`/media/win_c/Drivers`, `/media/win_c/ProgramData`...) but this seems a very clunky way of doing it—surely there's a more elegant solution? (I tried just creating soft links to the Windows directories from an indexed linux partition, but that doesn't seem to help.)


title: /dev/shm/ecryptfs-$USER-Private keeps climbing in Kubuntu 12.10 Install

text: I'm having a problem with an installation of Kubuntu 12.10 with an encrypted home directory. I've been trying to figure it out for several weeks. For transparency, I'll note here that I posted this question on askubuntu.com for a while, but have taken it down from there and posted here, instead, because of a lack of response. I noticed a few weeks ago that when I logged out of my system, my encrypted home directory would not always be re-encrypted -- I was still able to view and access the files within the home directory when I SSHed into the computer from another computer (to be clear, my SSHD requires a shared key -- this might be relevant later). I did some reading, and found out that `ecryptfs` relies on a counter file in `/dev/shm/ecryptfs-$USER-Private` to know when to re-encrypt the home directory: When a user is logged in, the counter is '1', and when the user logs out, the counter hits '0' and triggers encryption. Running `cat /dev/shm/ecryptfs-my_user_name-Private` periodically, I found something odd: the counter file stays at 1 for a while after I log in on the physical machine, and then starts growing. At one point, after leaving the system on for several days, it was (as I remember) at 93! I found a report about the same type of issue at http://www.mail- archive.com/ecryptfs@lists.launchpad.net/msg01705.html. That page stated that different things can cause counter increases, including `ssh` logins and `cron`. Even having read that page, I'm having a lot of trouble figuring out what's causing the issue. Here are some things that I've observed: 1) Although the counter resets to 1 when I restart my computer and then log back in, the counter still begins to increase after several hours once I'm logged in. 2) This happens even when I have no active SSH connections to my computer. 3) This happens even when my computer is on different networks. Thus, I don't think that it has to do with an unauthorized user gaining access to my system. 4) This does not seem to do with using sudo in the terminal (or the equivalent in a GUI). 5) I set up a cron job to record the output of `cat /dev/shm/ecryptfs- my_user_name-Private` every 5 minutes, and couldn't find any correlation between anything that I was doing at the time and the point at which the counter started increasing (to start, from 1 to 3). 6) I've also disabled all of my custom crontab entries other than the script mentioned above that records the counter every five minutes. Increases in the counter do not seem to be correlated with this script running through `cron`. Anacrontab also doesn't have any custom entries. **Results of Logging** I started logging the counter's value every five minutes for several days. On a typical day, here are the results: After a restart of the computer, I logged in through SSH. The counter was at 1 for the duration of my session, which lasted a few hours. I then disabled networking and logged in to the physical machine (using the KDE DE). The counter was at 1 for 50 minutes, and then jumped to 3. I had enabled wifi around that time. An hour later, the number jumped to 420. Five minutes after that, it was at 537, where it stayed until I shut down the machine, at least a half-hour later. `w` showed three lines: One on tty7, one on pts/1 (`kdeinit4: kded4 [kdeinit]`), and one on pts/3 (the terminal that I was using `w` in). Thus, I think that it was not that 537 users were logged into my computer. What could be going on here? Later, I started logging the counter at `/dev/shm/ecryptfs-$USER-Private` every minute, and then looked at the system log in /var/sys/syslog during minutes during which the counter increased. The only thing that I could see that was consistent across minutes during which the counter increased was a steady stream of "[UFW BLOCK]" lines (to be clear, I use `ufw` as a system firewall, and only have one port open, for SSH). Nothing else seems to be consistent from incident to incident, except for my cron job that logs the counter (this cron job is not always associated with an increase in the counter, though, and was not present when the problem started). What should I try next to figure this out? I'll be very grateful for any advice or ideas.


title: How to limit available virtual memory per process

text: Occasionally some processes on my GNU/Linux desktop (such as gv and gnash) use up the physical memory and cause thrashing. Since these processes aren't important, I want them to be automatically killed if they use too much memory. I think the /etc/security/limits.conf file and the -v option could be used for this. The question is whether it limits the amount of available memory per process of a particular user, or the sum for all the processes of a user. Also I would like to ask how to make change to that file in effect without rebooting.


title: What's the connection between "/etc/init.d" and "/etc/rcX.d" directories in Linux?

text: I am learning command line from a book called "Linux Command Line and Shell Scripting Bible, Second Edition." The book states this: > Some Linux implementations contain a table of processes to start > automatically on bootup. On Linux systems, this table is usually located in > the special file /etc/inittabs. > > Other systems (such as the popular Ubuntu Linux distribution) utilize the > /etc/init.d folder, which contains scripts for starting and stopping > individual applications at boot time. The scripts are started via entries > under the /etc/rcX.d folders, where X is a run level. Probably because I am new to linux, I did not understand what the second paragraph quoted meant. Can someone explain the same in a much plainer language?


title: How to recover a 'lost' screen session?

text: Somehow I managed to close a screen window without screen 'noticing' it, so the session is still flagged as `attached`. This prevents me from re-attaching to this session. What can I do?               me@iupr-serv8:~$ screen -r     There are several suitable screens on:         25028.pts-19.XXX-serv8  (01/05/2012 07:15:34 PM)    (Attached)         24658.pts-19.XXX-serv8  (01/05/2012 07:11:38 PM)    (Detached)         24509.pts-19.XXX-serv8  (01/05/2012 07:10:00 PM)    (Detached)         18676.pts-5.XXX-serv8   (01/02/2012 06:55:33 PM)    (Attached)     Type "screen [-d] -r [pid.]tty.host" to resume one of them.     me@XXX-serv8:~$ screen -r 25028     There is a screen on:         25028.pts-19.XXX-serv8  (01/05/2012 07:15:33 PM)    (Attached)     There is no screen to be resumed matching 25028.      **[update]** In the end I found out, that the session was not lost, but the ID of the first session is `0`. The second session than has the ID `1`.


title: rsyslog: make %syslogtag% equal length

text: I have `rsyslog` configured to log in the following format:               $template long-iso,"%$NOW% %timereported:8:15%  %syslogtag% %msg%\n"      which produces logs like this one:               2013-12-14 15:59:39  postfix/pickup[4665]:  559A48C9: uid=0 from=<root>     2013-12-14 15:59:39  postfix/cleanup[5194]:  559A48C9: message     2013-12-14 15:59:39  postfix/qmgr[7358]:  559A48C9: from=<xyz@example.com>     2013-12-14 15:59:39  postfix/smtp[5196]:  559A48C9: to=<abc@example.net>     2013-12-14 15:59:39  postfix/qmgr[7358]:  559A48C9: removed      How can I make the text in 3rd column equal length, i.e.               2013-12-14 15:59:39  postfix/pickup[4665]:   559A48C9: uid=0 from=<root>     2013-12-14 15:59:39  postfix/cleanup[5194]:  559A48C9: message     2013-12-14 15:59:39  postfix/qmgr[7358]:     559A48C9: from=<xyz@example.com>     2013-12-14 15:59:39  postfix/smtp[5196]:     559A48C9: to=<abc@example.net>     2013-12-14 15:59:39  postfix/qmgr[7358]:     559A48C9: removed


title: Is there any *real* reason to use BackTrack?

text: I have heard of BackTrack, never used it, don't see the point. It doesn't use something that can read my mind and install the packages I am thinking about, it just uses `apt-get`. The other thing is, I had never even _heard_ of BackTrack until I looked at some youtube videos of 'how to hack stuff', _hack_ being pejorative. I forgot about it until today, when I read this article. My question is, is there actually a reason to use BackTrack as opposed to, say, Debian? From where I'm standing it just looks like a sort of trendy thing teenagers do in order to relieve the boredom of living in suburbs and whatnot. What's more, it seems like people who try BackTrack complain that they can't get the most basic things to work 'out of the box'. Are the repositories actually different? Or does it just 'look cool' in youtube videos and lifehacker articles?


title: how to locally redefine 'command_not_found_handle'?

text: I'd like to make a particular bash script failfast when it cannot find a command, while retaining globally the usual friendly command_not_found behavior. E.g., if I save the following to `/tmp/foo.sh`, ...               # ----------------------------start foo.sh----------------------------     THIS_FP="$0"     THIS_FN="$(basename ${THIS_FP})"     THIS_DIR="$(dirname ${THIS_FP})"          function setup {       for CMD in \         'foo' \       ; do         echo -e "\n$ ${THIS_FN}::${FUNCNAME[0]}::${CMD}"         eval "${CMD}"       done     } # end function setup          function teardown {       for CMD in \         "ls -alt ${THIS_DIR} | head" \       ; do         echo -e "\n$ ${THIS_FN}::${FUNCNAME[0]}::${CMD}"         eval "${CMD}"       done     } # end function teardown          for CMD in \       'setup' \       'teardown' \     ; do       echo -e "\n$ ${THIS_FN}::main loop::${CMD}"       eval "${CMD}"     done     # ------------------------------end foo.sh----------------------------      ... and make it executable, and run it, I get               # ----------------------------not what I want-------------------------     me@it:~$ /tmp/foo.sh           $ foo.sh::main loop::setup          $ foo.sh::setup::foo     /tmp/foo.sh: line 10: foo: command not found          $ foo.sh::main loop::teardown          $ foo.sh::teardown::ls -alt /tmp | head     total 68840     drwxrwxrwt 22 root  root           1600 May  6 18:49 .     -rwxr-xr-x  1 me    me         527 May  6 18:49 foo.sh     drwx------  2 me    me          40 May  6 17:54 plugtmp-1     srw-------  1 me    me           0 May  6 17:28 tramp.13004aZf     drwx------  2 me    me        4200 May  6 17:22 matecorba-me     drwx------  2 me    me          40 May  6 02:20 plugtmp     -rw-------  1 me    me     2034335 May  4 14:21 s_TTRuhW.mp3.part     -rw-------  1 me    me     1658381 May  2 12:21 +rM4IttD.mp3.part     -rw-r--r--  1 me    me       86420 May  1 19:22 duplicity_20130501_1917.txt     # ----------------------------not what I want-------------------------      Instead, I want to make **only this script`foo.sh`** fail, and to fail as soon as it encounters the 'command not found': e.g.,               # ------------------------------what I want---------------------------     me@it:~$ /tmp/foo.sh           $ foo.sh::main loop::setup          $ foo.sh::setup::foo     /tmp/foo.sh: ERROR: foo: command not found          # Throwing me back to the shell from which I invoked foo.sh,     # *without* changing the usual friendly behavior outside it, e.g.:          me@it:~$ foo     No command 'foo' found, did you mean:      Command 'fio' from package 'fio' (main)      Command 'xoo' from package 'xoo' (main)      Command 'fop' from package 'fop' (main)      Command 'fox' from package 'objcryst-fox' (main)      Command 'zoo' from package 'zoo' (main)      Command 'goo' from package 'goo' (main)     foo: command not found     # ------------------------------what I want---------------------------      Can I provide this behavior by editing **only** `foo.sh`, without touching `.bashrc` or any other currently-installed file ? If so, how? If not, why not?


title: How to write dconf overrides for site-custom keybindings?

text: I want to add custom keybindings using dconf. Previously, I had do the same job using gconf and succeeded. However, there are some problems using dconf. (I'm working on a Debian package, so file-based overrides is very easy to be packaged.) Here is what I have:               # cat /etc/dconf/profile/user:     user-db:user     system-db:site          # cat /etc/dconf/db/site.d/keybindings     [org/mate/desktop/keybindings/emacs]     action='emacs'     binding='<Mod4>e'     name='Emacs'          [org/mate/desktop/keybindings/pluma]     action='pluma'     binding='<Mod4>g'     name='Text Editor'          [org/mate/desktop/keybindings/virtualbox]     action='virtualbox'     binding='<Mod4>v'     name='Virtual Box'          [org/mate/desktop/keybindings/rhythmbox]     action='rhythmbox'     binding='<Mod4>r'     name='Music Player'          # sudo dconf update      As you see, file `/etc/dconf/db/site.d/keybindings` contains 4 keybindings, however, only the first work, ie., `Win`+`E` for Emacs. Other keybindings won't work. I can re-order the entries so that `pluma` be the first, or `virtualbox` be the first, but, the same problem again: only the first entry work. Ie., `Win`+`G` for pluma, or `Win`+`V` for virtualbox. However, I can't have all these keybindings at the same time! But wait a minute... If I move `/etc/dconf/db/site.d/keybindings` to `$HOME/.config/dconf/user.d/keybindings`, and run:               # cd ~/.config/dconf     # mkdir user.d     # mv /etc/dconf/db/site.d/keybindings user.d/keybindings     # sudo dconf update .      then everything work! Well, because I'm writing the Debian package, I can't install files to the user's homedir, so still face the problem.


title: installing radeon card under debian

text: I have this lenovo z575 with radeon HD 6520G. I have installed Crunchbang Linux and want to configure the video card. I installed open drivers (x-server-xorg...) and nothing. I purged them, installed closed drivers (from the repository), restarted - and still nothing. All the time I run in fallback mode. What is wrong? How to install and configure the driver


title: Why are these aliases failing?

text: I am attempting to put some alias definitions in `.bashrc`. Like this:               #Convienience aliases     alias ll='ls -l'     alias ldir='ls -p | grep "/"'     #Temporary aliases     alias mvFooLog='mv ~/Projects/Foo/Log.txt .'      The last alias will work for me, but there seems to be some subtlety which is corrupting the definition of the first two. When Looking at the output of `alias` in the console, I get something like the following:               'lias ldir='ls -p | grep "/"     'lias ll='ls -l     alias mvFooLog='mv ~/projects/foo/log.txt .      This is happening in cygwin.


title: Disable festival from 'noticing' abbreviations, by editing .festivalrc

text: The developers of the `festival` text-to-speech program do not seem to have been aware that DEC can stand for the Digital Equipment Corporation as easily as it can stand for December, and that SEP can stand for Somebody Else's Problem. I, for one, have never used DEC and SEP to refer to month names. Never once. In fact, since I began using `festival` to read things out and generally give my eyes a break, I've discovered that I hate all abbreviations, precisely because they're ambiguously un-meaningful, conveying an air of military-style deliberate obfuscation. But, annoyingly, any time `festival` encounters these or similar two-letter and three-letter collocations (like ST, which more often means _Saint_ or _Star Trek_ than Street), it reads them out. If I am going to listen to a text, I actually look hard for these abbreviations by means of regular expressions, so that I can un-abbreviate them. I don't want `festival` to get involved in that process. But configuring festival requires lisp, much like `emacs`. Which scheme statement will allow me to totally disable this feature in the `.festivalrc`?


title: Debian: No internet connection on reboot

text: A server I develop on ran out of memory during an overnight job and had to be rebooted. Upon reboot, it no longer has an internet connection. I've exhausted my google-fu abilities trying to troubleshoot, so now I have come to you. More Info:               ifconfig eth0              eth0      Link encap:Ethernet  HWaddr 00:1a:a0:cb:ec:a8                   BROADCAST 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:1000                   RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                   Interrupt:16      /etc/network/interfaces               auto lo     iface lo inet loopback          auth eth0     iface eth0 inet dhcp      Any ideas?


title: Directory/file naming conventions when storing media collection on Linux

text: I am building a NAS/HTPC that will operate under Debian (Wheezy, probably). I am trying to design the directory schema for what will be stored on the server so that everything is nice and uniform for whatever media playback software I choose to use (probably XBMC). From what I have read of the FHS, it looks like `/srv/` might be the most appropriate place to store media exports, but I'm not sure. Everyone in the family will have their own `home` directory, which I will use to set up syncing (hence backup) of their Windows 'My Documents' directories. Backup will be provided by software RAID5 with a big LV. Since everyone might want to watch media from their own computer, I want it to look friendly to Windows as well as Linux. I suggest that rules out spaces in directory names at least but what about filenames? So far I have come up with:               /srv/media/TV-Shows/Show Name/Season 1/Some Show.avi     - - - - - /Movies/Movie Title (2012)/Movie File.avi     - - - - - /Music/[various]/ nb. *my music folder is a ludicrous mess*     - - - - - /Photos/Mum/whatever/foo.png      I think Photos and Music might be a different kettle altogether - I wonder if they should store their own pictures in a directory under their `home` path or should use a unified directory of Photos on a share and then a subdir of their own name from then if necessary, or separated by whatever the event was the photos are of (e.g. Holiday 2010). I hope someone knows of something more conventional and this isn't assumed to be too subjective a question to be on topic. Either way let me know. Thanks!


title: Linux program running on Ubuntu machine but not on Unix webserver

text: I've downloaded the command-line program "Whitaker's Words" which was available for Linux as well as Windows etc. There is a main program named `words`. I tried to execute it on my Ubuntu (11.10) machine on command line and it worked:               ./words      When I tested it on my Linux webserver (Linux 2.6.37-he-xeon-64gb+1 i686), it worked as well. Then I decided to apply some changes to the source code and to recompile it. For that, I used the following commands (the latter four are supporting programs):               gnatmake -O3 words -bargs -static     gnatmake makedict -bargs -static     gnatmake makestem -bargs -static     gnatmake makeefil -bargs -static     gnatmake makeinfl -bargs -static      The resulting program worked properly on my Ubuntu machine again, as I could see the correct output in the terminal. But when I tried to execute it on my webserver using PHP's `shell_exec()` or `passthru()`, there was simply no output! According to `ldd`, the program is `statically linked` so it should really work, shouldn't it? I've been testing and debugging for weeks now and I can't find any reason why this is so. Can you help me? You can get the program here: download link at filedropper.com (I guess this is no programming question, as my problem is just: How to get that program running on my webserver?) **System I want to compile the program on:** Linux ubuntu 3.0.0-12-generic #20-Ubuntu x86 GNU/Linux This is the newest Wubi (32-bit) release of Ubuntu. `ldd --version` outputs `ldd (Ubuntu EGLIBC 2.13-20ubuntu5) 2.13` **System I want to run the compiled program on (webserver):** Linux 2.6.37-he-xeon-64gb+1 i686 GNU/Linux `ldd --version` outputs `ldd (GNU libc) 2.7` **Note:** Errors on the server side can be excluded as everything works fine if I just replace my own Linux program by the pre-compiled one. **Update #1:** I've tried running the program (that works fine under Ubuntu 11.10) in my VirtualBox under Ubuntu 5.10 - and it didn't work, either. Good news, so it's definitely not the server's fault. Ubuntu 5.10 just said: `floating point exception`. Does this help? Why is there an exception but not under Ubuntu 11.10? **Update #2:** Now compiled with Ubuntu 5.1 using GNAT 3.4. But all hope for nothing - still no output, `ldd` says `statically linked` (as I've compiled it that way) and `strace` gives the same error message. What does it mean? Is there any file missing? Is this the reason why it is not working?               execve("./words", ["./words"], [/* 15 vars */]) = 0     brk(0)                                  = 0x811e000     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76f8000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76f7000     set_thread_area({entry_number:-1 -> 6, base_addr:0xb76f7680, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0     --- SIGSEGV (Segmentation fault) @ 0 (0) ---     +++ killed by SIGSEGV +++


title: How to add a newline to the end of a file?

text: Using version control systems I get annoyed at the noise when the diff says `No newline at end of file`. So I was wondering: How to add a newline at the end of a file to get rid off those messages?


title: How many users does Linux support being logged in at the same time via SSH?

text: I know Linux supports multiple users being logged in at the same time. But what's the maximum number of users that can be logged into Linux at the same time? I see there are there are 69 `tty` files (`ttyn` or `ttysn`, where `n` is an integer, such as `tty0`, `tty1`, `tty2`... ) in my `/dev` directory. I assume that these files are the shells. So I am thinking that this Linux system will support only 69 user logged in simultaneously. Is my thinking correct? If my assumption is wrong, please explain the users limit of Linux, including how it's implemented. Also, how do I access the details of already logged in users? I know commands **w** , **who** , but I am looking for sophisticated tools.


title: second keyboard to run commands

text: On my computer I have two USB keyboards plugged in. Instead of having both just type the same key, is it possible for a second keyboard to be setup to run commands instead of typing letters? And If that's not possible, can it be setup to at least type in another language like Russian for example?


title: Gajim can't connect to gmail anymore

text: When I open Gajim and try to connect to my gmail account, it gives me the following:   1. Warns about an insecure connection: ![Insecure connection: You are about to send your password on an unencrypted connection. Are you sure you want to do that?](http://i.stack.imgur.com/5gGYK.png)   2. When I choose to connect insecurely, authentication fails, although my gmail username and password are correct: ![Authentication failed with "gmail.com": Please check your login and password for correctness.](http://i.stack.imgur.com/uROEh.png)   3. Shows a "programming error" window: ![A programming error has been detected: It is probably not your fault, but should be reported to the developers nonetheless.](http://i.stack.imgur.com/7qPd3.png) The details are: > `Traceback (most recent call last):` > > `File "/usr/share/gajim/src/dialogs.py", line 1538, in on_response_ok` > > `self.user_response_ok(self.is_checked())` > > `File "gajim.py", line 2238, in on_ok` > > `gajim.connections[account].connection_accepted(data[0], 'plain')` > > `File "/usr/share/gajim/src/common/connection.py", line 739, in > connection_accepted` > > `on_auth=self.__on_auth)` > > `File "/usr/share/gajim/src/common/xmpp/client_nb.py", line 445, in auth` > > `self._on_doc_attrs()` > > `File "/usr/share/gajim/src/common/xmpp/client_nb.py", line 470, in > _on_doc_attrs` > > `if not self._sasl or self.SASL.startsasl == 'not-supported':` > > `AttributeError: NonBlockingClient instance has no attribute 'SASL'` How can I fix this? I'm on Mandriva 2010.1


title: Having driver load after lid opens

text: I am running crunchbang OS, I need to load the wifi adapter's realtek driver when open the lid since it removes itself every time I close the laptop. Is it better to put the start up script inside `/etc/pm/sleep.d` or `/etc/acpi/events/lid`?


title: vi - search the string you cursor is over?

text: I looking more for a method that is "built-in" to `vi`, and not something that I could do in my `.vimrc`. Though, solutions for `.vimrc` are appreciated. :-) When I want to search a string, sometimes that string is already typed in and I want to see if it's being used elsewhere on the document. For example: I see a variable, but I want to know where it was initialized, so I'll search that variable's name and keep clicking `n` or `SHIFT+n` til I find it.               int c = 0;     .     . //100s or 1000s of lines of code     .     c = 5;      Is there a shortcut way to search the string that my cursor is hovered over? Not the mouse cursor, but the vi cursor (if that makes sense).


title: How does X-server calculate DPI?

text: From Xfce Docs: > In case you want to override the DPI (dots per inch) value _calculated by > the X-server_ , you can select the checkbox and use the spin box to specify > the resolution to use when your screen renders fonts. But _how_ does X-server do its calculation? What assumptions are made in the process and can some of the parameters be overridden? It may know how many pixels I have on my display, but is that enough?


title: Bash doesn't read .bashrc unless manually started

text: `bash` won't source `.bashrc` from an interactive terminal unless I manually run `bash` from a terminal:               $ bash      or manually source it:               $ source ./.bashrc      or running:               $ st -e bash      Here's some useful output I hope:               $ echo $TERM     st-256color          $ echo $SHELL     /bin/sh          $ readlink /bin/sh     bash          $ shopt login_shell     login_shell     off      I'm on CRUX Linux 3.0 and I use `dwm` and `st`. I've tried using `.bash_profile` and `.profile` with no success. Any ideas?


title: Copying an HDD to a larger one by dd

text: I'm trying to copy an entire HDD which has IBM PC-style partition table to a larger one by `dd` on GNU/Linux. The questions are:   1. Can I use the additional space on the larger disk by changing the partition table?   2. I was using LVM on the source disk. Does it help, or make complications when I copy it or use the additional space on the larger disk?


title: How to enable wifi using keyboard (Dell Inspiron 14r) in suse Linux 11.4

text: I have installed both Windows and SUSE Linux (11.4) on my Dell Inspiron 14r laptop. Both are working properly. I am facing one strange problem. I went to my Linux OS wifi was working fine and I pressed fn+f2 in-order to disable wifi.   Wifi got disable successfully but when I again pressed fn+f2 it is not enabling wifi. I can see wifi disabled. Instead of that bluetooth icon got enable. Then I switched to Windows and again pressed fn+f2 and wifi got enabled. Then I switched to linux OS and I can see my wifi enabled. Again I pressed fn+f2 and it got disabled and I'm not able to enable it by pressing fn+f2 again. How can I enable wifi on SUSE (11.4)?


title: Get 'less' to display filename

text: Something that seemed quite useful to me when looking for a certain var in a bunch of config files: `less * | grep some_var` So this returns the value of `some_var` without manually looking through all config files. Nice! But what if I didn't only want to know the value of `some_var` and wanted to change it? What file is it in? How do I get the `less` command (or `grep`, or another command) to display the var and what file it was found in? I searched the man-page, but couldn't find any suitable option...


title: TCP buffers keep filling up (Recv-Q full): named unresponsive

text: Using netstat -an, I set the message that the Recv-Q is full. It is filling up to the rmem_max:               Active Internet connections (servers and established)     Proto Recv-Q Send-Q Local Address               Foreign Address             State           udp   1894912      0 10.0.64.150:53              0.0.0.0:*      (it keeps 'filling' until it crashes) Sizes:               /proc/sys/net/core/optmem_max:20480     /proc/sys/net/core/rmem_default:8388608     /proc/sys/net/core/rmem_max:8388608     /proc/sys/net/core/wmem_default:229376     /proc/sys/net/core/wmem_max:229376      Result in netstat -su:               Udp:     426057 packets received     37152 packets to unknown port received.     2350589 packet receive errors     517422 packets sent      Who has an idea?


title: Adding corresponding Numbers in a Range

text: I have a dataset with 30000 lines. I want to add all the corresponding values (i.e. Column 2) between the range 0-50 and then 50.1-100 and then 100.1-150 etc. (presented in column 1), and this sequence goes on for the rest of the lines in the file. **Input File:**               10         1     21.1       1     22         1     28         2     30         5     44.44      2     44.45      1     50         2     55         22     100.11     200     105        5     600.2      10     888        90      **Expected Output:**               0          15     50         22     100        205     600        10     850        90      I tried               awk     'NR==1          {printf "%s\t",$1; N=$1+49}          $1>=N          {printf "%s\n%s\t",sum,N; N+=49; sum=0}                         {sum+=$2}          END            {printf "%s\n", sum}         ' myfile      But I am not getting the expected output.


title: What is the meaning of the .: in this linux statement?

text: Somebody helped me run a java program with the following (working) line of code. The zookeeper-3.4.5.jar exists in the working directory. What it is the meaning of the .: syntax here? Does that just mean current directory? I would have written this as `java -cp "zookeeper-3.4.5.jar"` but I'm not 100% sure this would do the same thing as the line below.               java -cp .:zookeeper-3.4.5.jar org.zookeeper.LsGroup


title: Globally change path for all users, even in cron

text: We're setting up an SGE cluster with CentOS 6. My sysadmin is installing applications that are not installed via RPM (i.e. via other means like make install) should go in a non-standard directory, in this case something like `/share/apps/install/bin/`. The path for this is currently added to most sessions (login, qlogin, etc) via `/share/apps/etc/environment.sh` which is called by `/etc/bashrc`. `environment.sh` also appends some stuff to the PERL5LIB. The problem that I'm running into is that the `/share/apps/install/bin` is not added to some instances, e.g. things called out of a crontab. I know I can manually and explicitly set `PATH=/bin:/usr/bin:/blah/blah:...` within my personal crontab or within any given script or crontab entry, but what I'm hoping is that there's a setting somewhere outside of `/etc/profile` or `/etc/bashrc` that would put the non-standard `.../bin` directory into all PATHs for all users.


title: How can I find the actual (dd) size of a flash disk?

text: When I put a flash disk into a card reader and make an image with `dd`, I see the actual size of the disk, like 512483328 bytes in the following example:               1000944+0 records in     1000944+0 records out     512483328 bytes (512 MB) copied, 33.0091 s, 15.5 MB/s      Is it possible to get the same number without actually copying the data?


title: grep all words with specified length, without letter x

text: So I am stuck here: `grep -E '^....c...c...$'` shows all words with the expr I need. Now from this words I only need the ones that don't have a `x`. Who can help me?


title: Allow a user to view the home directory of other users via sudo

text: I am new to system administration. We have a lab set up where we have a server and client machines. The client machines have LDAP users which has the work area for all the users in the centralized server. So whenever an user logs in, his work area will be mounted through the NFS service in the client machines and all his work will be saved to the server when he logs out. Now, I want to give a local user in the server limited root access. I want this local user to be able to view the home directory of all the LDAP users and nothing else. I believe I am looking for wheel user in the server. I also believe I should make some changes in the visudo file to allow limited root access to the local user in the server.               user1, %operator ALL= /home/users      I tried adding the above command in the visudo file for the local user user1. I also added the user to the wheel group like below.               usermod -G 10 user1      However, I do not see any changes. Why didn't my approach with `sudo` work? _Since this approach doesn't seem to be working, I asked:Allow a user to read some other users' home directories_


title: Use non-root user configuration for root account

text: When I work with the terminal and use `su` or `sudo` to execute a command with the root user's permissions, is it possible to apply the configuration of my "non-root user" (from which I am invoking `su` or `sudo`) stored in this user's home directory? For instance, consider that (being logged on as a non-root user) I would like to edit the configuration file `/etc/some_file` using `vim` and that my vim configuration file is located at `/home/myuser/.vimrc`. Firing up the command line and typing `sudo vim /etc/some_file`, I would want "my" beautiful and well-configured `vim` to show up. But what I get is an ugly `vim` with the default configuration, no plugins etc. Can I make `su` or `sudo` use my user's configuration files instead of the root user's files located at /root?


title: Bridging lxc vs virtualbox

text: Something that is confusing me is the difference between "bridging" with a Virtualbox VM, and an lxc container. When you start a start a VM, the VM creates a bridge ( apparently ) as a user. Furthermore the bridge does not have an interface on the host system ( as evidenced by the lack of new entries in the table generated by the command ifconfig ). OTOH a bridge for LXC, must be created on the host as root ( typically called lxcbr0, or lxcbrX if there is more than one ). Furthermore it seems that with the second mechanism, the bridge interface is more intrusive, limiting what a user networking on the host system can do. Can someone please explain the differences ( and in particular how to bring LXC bridging closer to vbox bridging)?


title: Artificially prime buffer cache?

text: Is it beneficial to artificially prime the buffer cache when dealing with larger files? Here's a scenario: A large file needs to be processed, line by line. Conceptually, it is easy to parallelize the task to saturate a multi-core machine. However, since the the lines need to be read first (before distributing them to workers round-robin), the overall process becomes IO- bound and therefore slower. Is it reasonable to read all or portions of the file into the buffer cache in advance to have faster read times, when the actual processing occurs? * * * Update: I wrote a small front-end to the `readahead` system call. Trying to add some benchmark later...


title: Correct way to mount a hard drive

text: I have a 2nd hard drive SDB but not sure how to mount it under linux. `mount -a` did not seem to mount all. Also would like to mount this RO for recovery.


title: Where are sent emails stored on unix?

text: We have smtp installed on the Unix box. I am looking for the sent emails being sent everyday but not sure which location to look for on unix.


title: Method to paste specific column when in terminal

text: I'd like to paste only the third column of data from within the terminal. I originally have something like:               4 SF0086 SF0086     12 SF0087 SF0087     17 TSF141 TSF141     29 TSF070 TSF070     30 TSF028 TSF028        31 TSF122 TSF122      which I copy and paste that into the terminal it becomes on a single line > 4 SF0086 SF0086 12 SF0087 SF0087 17 TSF141 TSF141 29 TSF070 TSF070 30 TSF028 > TSF028 31 TSF122 TSF122 I'd like to get it like:               SF0086     SF0087     TSF141     TSF070     TSF028     TSF122      I can save the one line (middle) option as a file at that point and then use something like `awk`, `sed` or `perl` or anything available in the common POSIX system is an option, but haven't figured that out. I've also had no luck with the `paste` command and I'm coming to the conclusion `paste` won't be able to do it for me. The data changes (meaning the spacing will change) each time I need to extract the third column. Any data extractor/formatting masters out there?


title: "Cannot run C compiled programs" error when installing PDO PHP module

text: I have a cPanel server I want to install some packages on. I connected to the server as root and ran the following commands to update and delete all the existing repositories:               yum update     yum clean all     rm -f /etc/yum.repos.d/*     rm -rf /var/cache/yum/*      My last command was to install the PDO PHP module, but that's when I got an error:               root@linux [~/TMP]# pecl install pdo     WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"     downloading PDO-1.0.3.tgz ...     Starting to download PDO-1.0.3.tgz (52,613 bytes)     .............done: 52,613 bytes     12 source files, building     running: phpize     Configuring for:     PHP Api Version:         20041225     Zend Module Api No:      20060613     Zend Extension Api No:   220060519     building in /var/tmp/pear-build-root/PDO-1.0.3     running: /root/tmp/pear/PDO/configure     checking for grep that handles long lines and -e... /bin/grep     checking for egrep... /bin/grep -E     checking for a sed that does not truncate output... /bin/sed     checking for cc... cc     checking for C compiler default output file name... a.out     checking whether the C compiler works... configure: error: in `/var/tmp/pear-build-root/PDO-1.0.3':     configure: error: cannot run C compiled programs.     If you meant to cross compile, use `--host'.     See `config.log' for more details.     ERROR: `/root/tmp/pear/PDO/configure' failed     root@linux [~/TMP]# pecl install bdoNo releases available for package "pecl.php.net/bdo"     install failed      What causes this error? How can I fix it? * * * **Edit** : Also, when I run `yum install php*`, after checking dependencies I get this:               --> Finished Dependency Resolution     Error: Package: rrdtool-php-1.3.8-6.el6.x86_64 (base)                Requires: php(zend-abi) = 20090626      * * * **Edit** : I uploaded my config.log and config.status files


title: How to pipe the list of commands displayed by of "tab complete"?

text: When using commands in bash I like the double tab option to display the available commands. Some commands have more possible matches than others: ![Screenshot of a tab completion](http://img13.imageshack.us/img13/5541/picturemhy.jpg) Is there a way I can pipe the output of the double tab to somwehere, like `grep`? I found a related post, but I'm still not sure how to implement it to pipe it to grep.


title: Handling SERIRQ Interrupts from LPC-Connected Devices

text: How are SERIRQ interrupts generated by devices connected via an LPC (Low Pin Count) bus handled by Linux device drivers? In particular, how is an interrupt generated by one device on the bus differentiated from an interrupt generated by another device on the bus?


title: Ethernet adapter stuck at 10 Mbit/s

text: My Ethernet adapter is somehow stuck at 10 Mbit/s. Here's the output of `ethtool eth0`:               Settings for eth0:         Supported ports: [ TP MII ]         Supported link modes:   10baseT/Half 10baseT/Full                                  100baseT/Half 100baseT/Full          Supported pause frame use: No         Supports auto-negotiation: Yes         Advertised link modes:  10baseT/Full          Advertised pause frame use: Symmetric Receive-only         Advertised auto-negotiation: Yes         Link partner advertised link modes:  10baseT/Half 10baseT/Full                                               100baseT/Half 100baseT/Full          Link partner advertised pause frame use: Symmetric         Link partner advertised auto-negotiation: Yes         Speed: 10Mb/s         Duplex: Full         Port: MII         PHYAD: 0         Transceiver: internal         Auto-negotiation: on         Current message level: 0x00000007 (7)                        drv probe link         Link detected: yes      As you can see, my adapter supports 100 Mbit/s, and the "link partner" (my router?) supports 100 Mbit/s. However, if I manually set the mode to 100 Mbit/s using `sudo ethtool -s eth0 speed 100 duplex full` the link immediately disconnects. How can I fix this problem?


title: Verifying a SSL certificate's fingerprint?

text: I'm toying around with a Puppet agent and a Puppet master and I've noticed that the Puppet cert utility provides a fingerprint for my agent's public key as it has requested to be signed:               $ puppet cert list       "dockerduck" (SHA256) 1D:72:C5:42:A5:F4:1C:46:35:DB:65:66:B8:B8:06:28:7A:D4:40:FA:D2:D5:05:1A:8F:43:60:6C:CA:D1:FF:79      How do I verify that this is the right key? On the Puppet agent, taking a `sha256sum` gives me something dramatically different:               $ sha256sum /var/lib/puppet/ssl/public_keys/dockerduck.pem     f1f1d198073c420af466ec05d3204752aaa59ebe3a2f593114da711a8897efa3      If I recall correctly, certificates provide checksums of their public keys in the actual key files themselves. How can I get access to a keys fingerprint(s)?


title: numfmt invalid suffix input

text: I am using `numfmt` to convert a remote file's `Content-Length` from bytes to IEC format, i.e. `21M`               $ curl -sI http://jruby.org.s3.amazonaws.com/downloads/1.7.12/jruby-bin-1.7.12.tar.gz|grep Length|cut -d' ' -f2|numfmt --from=auto --to=iec     'numfmt: invalid suffix in input: '21981488      Stumped at why numfmt complaining about invalid suffix. When I split the command and check the output of `cut`, and manually echo the value to `numfmt`, it works as expected               $ curl -sI http://jruby.org.s3.amazonaws.com/downloads/1.7.12/jruby-bin-1.7.12.tar.gz|grep Length|cut -d' ' -f2 -     21981488     $ echo 21981488|gnumfmt --from=auto --to=iec     21M      Am I missing something here?


title: Why aplay cannot play a 4 or 6 channels sound when speaker-test does?

text: I am currently trying to setup a soundblaster card (CA106 chipset) to output to 4 channels. I plugged 4 speakers to analog output (using the jack plugs). When I am testing the pseakers using the `speaker-test` utility it works well, but whenever I am trying to play a 4 channel (built by myself) or any multichannels sound (retrieved from the web) with `aplay` utility I cannot get it to work. Here is the information about my HW setup :               [root@server SurroundTestFiles]# aplay -L     default:CARD=CA0106     CA0106, CA0106     Default Audio Device     front:CARD=CA0106,DEV=0     CA0106, CA0106     Front speakers     rear:CARD=CA0106,DEV=0     CA0106, CA0106     Rear speakers     center_lfe:CARD=CA0106,DEV=0     CA0106, CA0106     Center and Subwoofer speakers     side:CARD=CA0106,DEV=0     CA0106, CA0106     Side speakers     surround40:CARD=CA0106,DEV=0     CA0106, CA0106     4.0 Surround output to Front and Rear speakers     surround41:CARD=CA0106,DEV=0     CA0106, CA0106     4.1 Surround output to Front, Rear and Subwoofer speakers     surround50:CARD=CA0106,DEV=0     CA0106, CA0106     5.0 Surround output to Front, Center and Rear speakers     surround51:CARD=CA0106,DEV=0     CA0106, CA0106     5.1 Surround output to Front, Center, Rear and Subwoofer speakers     surround71:CARD=CA0106,DEV=0     CA0106, CA0106     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers     iec958:CARD=CA0106,DEV=0     CA0106, CA0106     IEC958 (S/PDIF) Digital Audio Output     null     Discard all samples (playback) or generate zero samples (capture)     default:CARD=Intel     HDA Intel, AD198x Analog     Default Audio Device     front:CARD=Intel,DEV=0     HDA Intel, AD198x Analog     Front speakers     surround40:CARD=Intel,DEV=0     HDA Intel, AD198x Analog     4.0 Surround output to Front and Rear speakers     surround41:CARD=Intel,DEV=0     HDA Intel, AD198x Analog     4.1 Surround output to Front, Rear and Subwoofer speakers     surround50:CARD=Intel,DEV=0     HDA Intel, AD198x Analog     5.0 Surround output to Front, Center and Rear speakers     surround51:CARD=Intel,DEV=0     HDA Intel, AD198x Analog     5.1 Surround output to Front, Center, Rear and Subwoofer speakers     surround71:CARD=Intel,DEV=0     HDA Intel, AD198x Analog     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers     hdmi:CARD=Intel,DEV=0     HDA Intel     HDMI Audio Output          [root@server SurroundTestFiles]# alsacard     0          [root@server SurroundTestFiles]# cat /proc/asound/cards     0 [CA0106         ]: CA0106 - CA0106                       Audigy SE [SB0570] at 0xcce0 irq 169     1 [Intel          ]: HDA-Intel - HDA Intel                       HDA Intel at 0xf7ffc000 irq 82      Here is the command I use in both cases (and it corresponding output). The speaker-test :               speaker-test -c 4 -D surround40:CA0106 -t wav      This spit the correct sound to the correct speakers (4 channel to 4 speakers) Here is the `aplay` output when trying to play a 4 channels sounds using the same virtual device (surround40) :               [root@epr-servmcs-40 SurroundTestFiles]#  aplay -v -D surround40:CA0106 -c 4 test-4-channels.wav     Playing WAVE 'test-4-channels.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Channels 4     aplay: set_params:954: Sample format non available      If I try to use `aplay` without explicitly specifying the device it only plays the sound on 2 speakers, see the output for this test:               [root@epr-servmcs-40 SurroundTestFiles]#  aplay -v -c 4 test-4-channels.wav     Playing WAVE 'test-4-channels.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Channels 4     Plug PCM: Route conversion PCM (sformat=S24_3LE)                                                            Transformation table:                                                                                0 <- 0                                                                                1 <- 1                                                                                Its setup is:                                                                                stream       : PLAYBACK                                                                                access       : RW_INTERLEAVED                                                                             format       : S24_3LE                                                                                subformat    : STD                                                                                channels     : 4                                                                                rate         : 44100                                                                                exact rate   : 44100 (44100/1)                                                                            msbits       : 24                                                                                buffer_size  : 7526                                                                                period_size  : 940                                                                                period_time  : 21333                                                                                tstamp_mode  : NONE                                                                                period_step  : 1                                                                                avail_min    : 940                                                                                period_event : 0                                                                                start_threshold  : 7526                                                                                stop_threshold   : 7526                                                                                silence_threshold: 0                                                                                silence_size : 0                                                                                boundary     : 986447872                                                                                Slave: Rate conversion PCM (48000, sformat=S32_LE)                                                        Its setup is:                                                                                stream       : PLAYBACK       access       : MMAP_INTERLEAVED       format       : S24_3LE       subformat    : STD       channels     : 2       rate         : 44100       exact rate   : 44100 (44100/1)       msbits       : 24       buffer_size  : 7526       period_size  : 940       period_time  : 21333       tstamp_mode  : NONE       period_step  : 1       avail_min    : 940       period_event : 0       start_threshold  : 7526       stop_threshold   : 7526       silence_threshold: 0       silence_size : 0       boundary     : 986447872     Slave: Direct Stream Mixing PCM     Its setup is:       stream       : PLAYBACK       access       : MMAP_INTERLEAVED       format       : S32_LE       subformat    : STD       channels     : 2       rate         : 48000       exact rate   : 48000 (48000/1)       msbits       : 32       buffer_size  : 8192       period_size  : 1024       period_time  : 21333       tstamp_mode  : NONE       period_step  : 1       avail_min    : 1024       period_event : 0       start_threshold  : 8192       stop_threshold   : 8192       silence_threshold: 0       silence_size : 0       boundary     : 1073741824     Hardware PCM card 0 'CA0106' device 0 subdevice 0     Its setup is:       stream       : PLAYBACK       access       : MMAP_INTERLEAVED       format       : S32_LE       subformat    : STD       channels     : 2       rate         : 48000       exact rate   : 48000 (48000/1)       msbits       : 32       buffer_size  : 8192       period_size  : 1024       period_time  : 21333       tstamp_mode  : ENABLE       period_step  : 1       avail_min    : 1024       period_event : 0       start_threshold  : 1       stop_threshold   : 1073741824       silence_threshold: 0       silence_size : 1073741824       boundary     : 1073741824      My goal is to force (or allow) `aplay` to play multi channels sound (actually 4 channels sound only) correctly, by this I mean using the 4 speakers.


title: How do I remove the timeout in the boot menu

text: I am a beginner to Linux so I installed several operating systems on my computer in a multiboot configuration (Ubuntu, Linux Mint, Windows, ...). When I turn on my PC, the boot menu appears with a timeout. Sometimes, I don't focus on it (I turn on my PC and then I go to the fridge to get a soft drink, for example) so that I miss the boot menu so I cannot chose my desired OS. Because of that, I must restart my computer and choose my desired OS again. Is there anyway to remove the timeout. I mean when the boot menu appear, so that there is no timeout, no OS will boot until I chose my desired OS. I am using Ubuntu and Linux Mint.


title: FreeBSD based routers

text: I am looking for a `FreeBSD` based wireless router to hack around it and also use it at home. I saw some listed on www.bsdrouter.org but those seem outdated. Can someone point me to such a product/project which is ongoing? My motive is to learn hacking on this device.


title: Get a clean list of files transferred from rsync

text: I'm trying to get an itemized list of files transferred by rsync. Using the -i and --out-format options, I'm instead ending up with output that looks like this:               3HMP1MO_001.tif          974.68K 100%    9.58MB/s    0:00:00 (xfer#1, to-check=8/10)     3HMP1MO_002.tif          974.68K 100%    2.27MB/s    0:00:00 (xfer#2, to-check=7/10)     3HMP1MO_003.tif          974.67K 100%    1.33MB/s    0:00:00 (xfer#3, to-check=6/10)     3HMP1MO_004.tif          974.65K 100%    1.03MB/s    0:00:00 (xfer#4, to-check=5/10)     3HMP81O_005.tif          974.66K 100%  834.19kB/s    0:00:01 (xfer#5, to-check=4/10)     3HMP81GS1MO_006.tif          974.66K 100%    2.35MB/s    0:00:00 (xfer#6, to-check=3/10)     3HMP1MO_007.tif          974.66K 100%    1.60MB/s    0:00:00 (xfer#7, to-check=2/10)     3HMP1MO_008.tif          974.66K 100%    1.21MB/s    0:00:00 (xfer#8, to-check=1/10)     3HMP8MO_009.tif          974.65K 100% 1009.34kB/s    0:00:00 (xfer#9, to-check=0/10)      The full command is this:               rsync -irltShz --modify-window=2 --progress --exclude 'Thumbs.db' --out-format "%n" --log-file=current.log rsync://myserver/UserData/user1/ /mnt/bup/user1 2>/dev/null >filechanges.log      If I use -q (quiet), there is no output at all. Using the -i option doesn't seem to make any difference. I could grep the output, but surely I'm just doing something wrong?               It's `rsync  version 3.0.6  protocol version 30` on RHEL 6.2


title: Not able to install Nautilus Terminal

text: I am using centOS Release 6.4(Final) and GNOME 2.28.2. System information is               Linux localhost 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12 03:34:52      UTC 2013 x86_64 x86_64 x86_64 GNU/Linux      I downloaded Nautilus Terminal sources from here. I am getting following message.               [root@localhost nautilus-terminal_1.0_src]# ./install.sh -i          :: Checking the Runtime Dependencies...            > Python (>= 2.6)                                                      [ OK ]       > PyGObject                                                            [ OK ]       > GObject Introspection (and Gtk)                                      [MISS]       > VTE                                                                  [MISS]       > Nautilus Python (>= 1.0)                                             [MISS]       > Nautilus (>= 3.0)                                                    [ OK ]     E: Some dependencies are missing.      Which packages do I have to install and why doesn't it resolve on it's own?


title: Vlc Media Problem in Fedora!

text: I am using Fedora 13 and my VLC media player is showing this problem for the past one week. How do i rectify this error. * * * Summary: SELinux is preventing /usr/bin/vlc from loading /usr/lib/vlc/plugins/codec/libdmo_plugin.so which requires text relocation. Detailed Description: The vlc application attempted to load /usr/lib/vlc/plugins/codec/libdmo_plugin.so which requires text relocation. This is a potential security problem. Most libraries do not need this permission. Libraries are sometimes coded incorrectly and request this permission. The SELinux Memory Protection Tests (http://people.redhat.com/drepper/selinux-mem.html) web page explains how to remove this requirement. You can configure SELinux temporarily to allow /usr/lib/vlc/plugins/codec/libdmo_plugin.so to use relocation as a workaround, until the library is fixed. Please file a bug report. Allowing Access: If you trust /usr/lib/vlc/plugins/codec/libdmo_plugin.so to run correctly, you can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so'" You must also change the default file context files on the system in order to preserve them even on a full relabel. "semanage fcontext -a -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so'" Fix Command: chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so' Additional Information: Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1 023 Target Context system_u:object_r:lib_t:s0 Target Objects /usr/lib/vlc/plugins/codec/libdmo_plugin.so [ file ] Source vlc Source Path /usr/bin/vlc Port Host (removed) Source RPM Packages vlc-core-1.1.3-1.fc13 Target RPM Packages vlc-core-1.1.3-1.fc13 Policy RPM selinux- policy-3.7.19-51.fc13 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name allow_execmod Host Name (removed) Platform Linux (removed) 2.6.34.6-47.fc13.i686.PAE #1 SMP Fri Aug 27 09:29:49 UTC 2010 i686 i686 Alert Count 3 First Seen Sat 04 Sep 2010 08:26:05 PM IST Last Seen Sat 04 Sep 2010 08:35:40 PM IST Local ID 48840a90-fea4-403b-95a3-6cadc80b1a0a Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1283612740.262:117): avc: denied { execmod } for pid=9594 comm="vlc" path="/usr/lib/vlc/plugins/codec/libdmo_plugin.so" dev=sda2 ino=789070 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file node=(removed) type=SYSCALL msg=audit(1283612740.262:117): arch=40000003 syscall=125 success=no exit=-13 a0=4439000 a1=1e000 a2=5 a3=bfbe2480 items=0 ppid=1 pid=9594 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="vlc" exe="/usr/bin/vlc" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) * * * **Update** Well, i tried that now in terminal and nothing seems to happen. [chandru.math@chandru ~]$ chcon -t textrel_shlib_t '/usr/lib/vlc/plugins/codec/libdmo_plugin.so > It stops like this!


title: How to understand this fstab?

text: This is my fstab:               #     # /etc/fstab     # Created by anaconda on Sat Jan 12 02:12:44 2013     #     # Accessible filesystems, by reference, are maintained under '/dev/disk'     # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info     #     UUID=fb2b6c2e-a8d7-4855-b109-c9717264da8a /                       ext4    auto,noatime,noload,data=ordered,commit=10,defaults        1 1     UUID=71362665-f627-41e1-a093-de42a0a356e2 /boot                   ext3    defaults        1 2     UUID=8024a5cd-af4b-4776-af0d-65ad80af8649 swap                    swap    defaults        0 0     tmpfs                   /dev/shm                tmpfs   defaults        0 0     devpts                  /dev/pts                devpts  gid=5,mode=620  0 0     sysfs                   /sys                    sysfs   defaults        0 0     proc                    /proc                   proc    defaults        0 0     /usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0     /dev/sdd1               /home4                  auto    auto,noatime,noload,data=ordered,commit=10,defaults        0 0     /dev/sdc1               /home3                  auto    auto,noatime,noload,data=ordered,commit=10,defaults        0 0     /dev/sdb1               /home2                  auto    auto,noatime,noload,data=ordered,commit=10,defaults        0 0        1. What is UUID=fb2b6c2e-a8d7-4855-b109-c9717264da8a? Is it a partition in sda?   2. What is tmpfs,devpts,sysfs, and proc?   3. What is /usr/tmpDSK?Is it /dev/sdb /dev/sda or what? How do I get temporary directory in memory and then resort to disk when memory is full?


title: I can't start nfs in SLES 11

text: I'm trying to start nfs service in my SLES. I have my `/etc/exports` like this:               /var/share/testbed *(ro)      When I run `service nfs start`, it says:               Not starting NFS client services - no NFS found in /etc/fstab:      For `service nfs status`, it says:               Checking for mounted nfs shares (from /etc/fstab):idmapd not running


title: Nested read fails

text: I have a list of filenames in a file and want to do let the user decide what to do with each. In bash, iterating over filenames is not trivial in itself, so I followed this answer:               #!/bin/bash          while IFS= read -r THELINE;      do       read -n 1 -p "Print line? [y/n] " answer;       if [ ${answer} = "y" ];       then         echo "${THELINE}";       fi;     done < tester;      When I try to execute this (on a non-empty file), I get an error at the `if`:               line 5: [: =: unary operator expected      My best guess is that `answer` is not set properly, which would be caused by using two calls of `read` in a "nested" fashion since the following works as expected:               #!/bin/bash          for THELINE in $(cat "tester");     do       read -n 1 -p "Print line? [y/n] " answer;       if [ ${answer} = "y" ];       then         echo "${THELINE}";       fi;     done;      What is going on here? I run `bash 4.2.24(1)-release (x86_64-pc-linux-gnu)` on `3.2.0-37-generic #58-Ubuntu x86_64 GNU/Linux`.


title: While in vi how can I pull in / insert / paste the contents of another file

text: * I am editing file 'A' in vi.   * I have another file 'B' whose contents I want to 'paste' into my current location.   * Other than actual mouse copy and pasting, is there a command that I can use that will pull in the content of another file to my current edit location.


title: ICMP destination unreachable

text: I am working on an Arch Linux machine with an ethernet interface `eth1`. I have created the interface `eth1:0` using `ifconfig` and given it a dummy hardware address (`00:01:02:03:04:05`). When I send a UDP packet to a server application running on a remote server machine, I get back the right response. But then I see an ICMP Destination Unreachable going out from the `eth1:0` interface ip address. How can I mute this ICMP message? I have tried different mac addresses and set up an arp cache on both client and server machines without success. Appreciate any help and thanks in advance.


title: Is it possible to get the error message from previous command which failed when the conditional command runs using ||

text: I have a helper function:               function error_exit     {         /opt/aws/bin/cfn-signal ...         exit 1     }      This helper function is used to signal an error. Here is an example of usage:               /opt/aws/bin/cfn-init -s .. || error_exit 'Failed to run cfn-init'      The `cfn-init` command takes a lot of parameters which isn't relevant for the question. When the command returns a non-null value and possibly an error message to the error output, I would like to get the error message and include it to the `error_exit` method as a parameter. Is this possible? If not, how would you implement a helper method in bash which makes it possible to get the source error message?


title: Weird Wi-Fi connection issue on Linux Mint 16

text: We have a LG-R590 laptop and an AirTies 5343 WLAN router at home. When the router broadcasts the SSID of the wireless home network I cannot connect to the network automatically, I have to connect to the network as if its SSID were hidden. When I set the router to hide the SSID of the home network the wireless network browser in Mint MATE is able to see and connect to the network. However, in this case the SSID is hidden in Windows as expected and leads to undesired effort to get connected to the internet on other computers, and I am concerned about this since my parents are not that much tech-savvy. I have provided a screenshot of the modem settings (saved) when the computer is able to locate and connect to the network on Linux Mint 16 MATE. How can I restore default behaviour on this computer so that it sees and is able to connect to the network when SSID is broadcasted? **Details:** Linux Mint Mate 16 32-bit LG R590 Notebook **Output of lspci** 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10) 03:00.0 Ethernet controller: Qualcomm Atheros AR8131 Gigabit Ethernet (rev c0) ![enter image description here](http://i.stack.imgur.com/wCTMn.png) Thanks in advance


title: Select line not selecting whitespace

text: Is there a way to select (or paste) text without trailing/ending whitespace? eg. To copy the whole line I press `y`, to paste it somewhere else I use `p`, but it pastes the whole text with the trailing EOL character too. The same case using Windows standard:   home, shift+end, ctrl+c, ctrl+v   (allows me to paste the selected text inline) I'd like to have similar behavior in vim.   I'd like to avoid any macros, as I'm using PHPStorm plugin emulating vim, so not all sophistocated command are working there.


title: How to create a virtual file that is coupled to a program, e.g. to a `.gz` file via `gzip`?

text: Given e.g. a gzipped textfile `file.txt.gz`, how to create a special file `file.txt` that on reading yields the (interactively) decompressed contents of the `.gz` file, and on writing a) re-`gzip`s the new content or b) denies write-access?


title: More concise methods for wrapping a file than using sed

text: **Introduction** _script:_               sed -i '1i <?xml version=\"1.0\" encoding=\"utf-8\"?>' $1     sed -i '/<?xml version=\"1.0\" encoding=\"utf-8\"?>/a<hello>\n\t<world>' $1     sed -i "\$a\\\t<\/hello>\n<\/world>" $1      _input:_               <city id="city01">       <name>utrecht</author>       <population>328.577</population>       <districts>10</districts>       <country>netherlands</country>     </city>      _output:_               <?xml version="1.0" encoding="utf-8"?>     <hello>       <world>         <city id="city01">           <name>utrecht</author>           <population>328.577</population>           <districts>10</districts>           <country>netherlands</country>         </city>       </hello>     </world>      **Question** What are more concise methods for wrapping a file than using sed?


title: Dynamic linker "no version information available"

text: When I copy over a program and a few libraries it needs to another machine I get the "no version information available" when I run LDD on the program. I know why this is happening, I just want to know if its a big deal. Can I just ignore it? The program seems to execute and exhibits expected behavior. Could this come back to screw me in the future?


title: Looking for a Java class in a set of JARs with find, unzip, grep

text: I was trying to find the JAR containing a Java Class. JARs are in zip format. My first attempt was:               $ find -name "*3.0.6.RELEASE.jar" | xargs -l1 unzip -l \         | grep stereotype.Controller           554  2011-08-18 16:49   org/springframework/stereotype/Controller.class           554  2011-08-18 16:49   org/springframework/stereotype/Controller.class      I found the class, but I still don't know which of the 25 matching files contains it (there are two JARs containing it). So I thought to use `tee` in the middle to output the file names.               $ find -name "*3.0.6.RELEASE.jar" | tee - | xargs -l1 unzip -l \         | grep stereotype.Controller       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class       554  2011-08-18 16:49   org/springframework/stereotype/Controller.class      I'd have expected to see a filename followed by the Controller.class for matching files and by the next filename for non mathing. However, now that I think about it, standard output just flows in the pipe and gets processed by xargs, so it makes sense. I could use standard error, but then, I suppose, that since the processes are running concurrently, I could have timing issues that make the output not in the order I would hope to see. So there must be a better way to approach this problem, anyone has ideas? **UPDATE** : While waiting for an answer, I wrote a horrible Perl one liner that does the trick, but looking forward to see more elegant solutions.               $ find -name "*3.0.6.RELEASE.jar" | perl -e 'while (<>) { \         $file=$_; @class=`unzip -l $_`; foreach (@class) { \         if (/stereotype.Controller/) {print "$file $_";} } }'      Output:               ./spring-context/3.0.6.RELEASE/spring-context-3.0.6.RELEASE.jar        554  2011-08-18 16:49   org/springframework/stereotype/Controller.class     ./org.springframework.context/3.0.6.RELEASE/org.springframework.context-3.0.6.RELEASE.jar        554  2011-08-18 16:49   org/springframework/stereotype/Controller.class


title: What are dyld_shared_cache_xxx files and how do I extract object files from them?

text: I have a `dyld_shared_cache_armv7` file and I'm assuming that they hold various object files for a specific architecture. How do I extract the object files from it?


title: How to get core temperature of haswell i7 cores in i3status

text: I want to use i3status to display my CPU-Core temperatures (haswell i7). However the setting:               order += "cpu_temperature 1"     #...     cpu_temperature 1{             format = "T: %degree °C"     }     #      doesn't display the correct core temperature. The numbers it shows seem to correspond to the value xsensors shows for temp1, if I change the 1 to 2 above it corresponds to xsensors temp2. Trying 3 or 4 doesn't have any effect. However I want to get the true core temperatures of all 4 cores with i3 status. How can I do this?


title: how to replace IP address on remote host using expect

text: I wrote the following `expect` script in order to replace the IP address on remote Linux machine I use a `perl` one-liner for this task I get errors about can't read "HOME": no such variable , Please advise on what I need to change in my `expect` script so I can change the requested IP ?                #!/bin/ksh                expect_transfer=`cat << EOF      set timeout -1      spawn  ssh  12.219.102.43            expect {                      ")?"   { send "yes\r"  ; exp_continue  }                           word:  {send pass123\r}                   }       expect #  {send "export OLD=10.10.10.10 ; export NEW=1.1.1.1 ; perl -i -pe 's/\Q$ENV{OLD}\E/$1$ENV{NEW}$2/' /etc/hosts\r"}       expect #    {send exit\r}       expect eof       EOF`                 expect -c  "$expect_transfer"       results:                 spawn ssh 12.219.102.43       root@12.219.102.43's password:        Last login: Sun Aug  4 12:29:25 2013 from 12.219.102.43       [root@localhost ~]# can't read "HOME": no such variable       while executing        "send "export OLD=10.10.10.10 ; export NEW=1.1.1.1 ; perl -i -pe 's/\Q$HOME/.kshrc{OLD}\E/$HOME/.kshrc{NEW}/' /etc/hosts\r""       invoked from within       "expect #  {send "export OLD=10.10.10.10 ; export NEW=1.1.1.1 ; perl -i -pe 's/\Q$HOME/.kshrc{OLD}\E/$HOME/.kshrc{NEW}/' /etc/hosts"        * I will happy to get any other solution under ksh scripts


title: How to get details of RAID devices both soft and hard?

text: I want to check if my server has RAID configured both soft and hard. I tried some commands on my server (Suse Enterprise Edition 11):               **ms:~ #  cat /proc/mdstat     Personalities :     unused devices: <none>     ms:~ #**      I tried to execute `raiddev /dev/md0` but there is no raiddev command available. Is there any other command that will let me check the raid level of the server?


title: How can i start a wine application at startup without login?

text: I want to start a wine application when system startup. However this app need a Xwindow environment. I could only launch it manually by hand now, so I have to login first then start the app. I have searched something about Xsession startup setting. I think applying that method would require a login. How can I start the app without login?


title: How to remove lines included in one file from another file in bash?

text: I have two lists, a complete list and a partial list. I want a bash script that will search the complete list for any lines that are in the partial, if there are, they will be removed from the complete list. Can anyone help?


title: Piping search term (not filename) to grep

text: I want to pick out certain lines containing a given number from a file. The file I want to search is called `os_clusters/piRNA_clusters.bed`.               awk '{if (a[$0]++ == 0) {split($0,b,"."); ;split(b[1],c,"r"); print c[3]}};' test_non_enriched | xargs grep {} os_clusters/piRNA_clusters.bed      The first part, before the pipe, works- it produces the terms to search for, such as 8707, 8824 etc. However, the latter part does not.               awk '' ... | xargs grep {} os_clusters/piRNA_clusters.bed      Instead of searching the target file for the terms produced by the pipe, it considers the search terms as the input file. Hence, I get error messages like:               grep: 8707: No such file or directory     grep: 8824: No such file or directory      What do I need to change to search the file `os_clusters/piRNA_clusters.bed` for the terms produced by the pipe?


title: Linux child processes not being culled

text: This is causing significant problems for script portability between BSD and Linux. I am on a CentOS 6.4 where this happens. I have a nice compact test case: `bash -c "inotifywait -mcr . | sed s/CLOSE/z/"` `ps uf` and observe:                \_ bash -c inotifywait -mcr . | sed s/CLOSE/z/          \_ inotifywait -mcr .                       \_ sed s/CLOSE/z/                       Then, find the PID of the bash parent process, kill it. Notice how the shell prompt has come back, indicating our shell's done waiting on its child. But if you do anything on the filesystem to trigger inotify to report more events, it continues to dump to the terminal. On OS X, this does not happen because they would all be dead. `ps uf` again. See that both inotifywait and sed are now children of `init`. This seems totally wrong to me. What does POSIX say about this?


title: SSH is suddenly not working anymore: "Write Failed:Broken Pipe"

text: I use a macbook pro at home and regularly ssh into the machines at my lab. For the past 3-4 days however, whenever I SSH into the machine in the lab, I get a Write Failed:Broken Pipe error, hardly within 2 minutes of me ssh-ing. The fact that everything was working perfectly a few days ago baffles me, and any help to get things working again would be much appreciated.


title: Moved some files unable to use mv now

text: I accidently used `mv mymods /* *` . Now i am unable to undo it or either use any command. How do i fix that? I was in directory name `/home/nginx/crap`               [root@somehost /home/nginx/crap]# mv mymods /* *      **Centos 6.3 user - root** Directory Structure of `/home/nginx/crap` https://gist.github.com/anonymous/5493666


title: Passing capabilities through exec

text: I'm trying to understand how Linux capabilities are passed to a process that has been `exec()`'d by another one. From what I've read, in order for a capability to be kept after exec, it must be in the inheritable set. What I am not sure of, though, is how that set gets populated. My goal is to be able to run a program as a regular user that would normally require root. The capability it needs is `cap_dac_override` so it can read a private file. I do not want to give it any other capabilities. Here's my wrapper:               #include <unistd.h>          int main(int argc, char *argv[]) {         return execl("/usr/bin/net", "net", "ads", "dns", "register", "-P", NULL);     }      This works when I set the setuid permission on the resulting executable:               ~ $ sudo chown root: ./registerdns     ~ $ sudo chmod u+s ./registerdns     ~ $ ./registerdns      Successfully registered hostname with DNS      I would like to use capabilities instead of setuid, though. I've tried setting the `cap_dac_override` capability on the wrapper:               ~ $ sudo setcap cap_dac_override=eip ./registerdns     ~ $ ./registerdns      Failed to open /var/lib/samba/private/secrets.tdb     ERROR: Unable to open secrets database      I've also tried setting the inheritable flag on the `cap_dac_override` capability for the `net` executable itself:               ~ $ sudo setcap cap_dac_override=eip ./registerdns     ~ $ sudo setcap cap_dac_override=i /usr/bin/net     ~ $ ./registerdns      Failed to open /var/lib/samba/private/secrets.tdb     ERROR: Unable to open secrets database      I need to use the wrapper to ensure that the capability is only available when using that exact set of arguments; the `net` program does several other things that could be dangerous to give users too broad of permissions on it. I'm obviously misunderstanding how the inheritance works. I can't seem to figure out how to set up the wrapper to pass its capabilities along to the replacement process so it can use them. I've read the man page, and countless other documents on how it _should_ work, and I thought I was doing what it describes.


title: Can't get Intel I210 ethernet working on Debian wheezy

text: I have a server with an Asus P9D-I mainboard. It has two onboard Intel NICs:               # lspci -nn | grep Eth     01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)     02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)      The server is running Debian wheezy with the most recent backports kernel:               # cat /etc/debian_version     7.2          # uname -a     Linux hostname 3.10-0.bpo.3-amd64 #1 SMP Debian 3.10.11-1~bpo70+1 (2013-09-24) x86_64 GNU/Linux          # dpkg -l | grep -E '(linux-image-amd64|linux-image-3.10)'     ii  linux-image-3.10-0.bpo.3-amd64          3.10.11-1~bpo70+1                   amd64        Linux 3.10 for 64-bit PCs     ii  linux-image-amd64                       3.10+52~bpo70+1                     amd64        Linux for 64-bit PCs (meta-package)      The ethernet interfaces _do_ show up in `ifconfig -a`:               # ifconfig -a     eth0      Link encap:Ethernet  HWaddr ac:22:0b:8b:30:a7                 BROADCAST 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:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Memory:dfe00000-dfe80000           eth1      Link encap:Ethernet  HWaddr ac:22:0b:8b:30:a8                 BROADCAST 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:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Memory:dfd00000-dfd80000      [...]      But for some reason, I can't actually use them for anything:               # ifconfig eth0 up     SIOCSIFFLAGS: No such device     # ifconfig eth1 up     SIOCSIFFLAGS: No such device     # ethtool eth0     Settings for eth0:     Cannot get device settings: No such device     Cannot get wake-on-lan settings: No such device     Cannot get message level: No such device     Cannot get link status: No such device     No data available     # ethtool eth1     Settings for eth1:     Cannot get device settings: No such device     Cannot get wake-on-lan settings: No such device     Cannot get message level: No such device     Cannot get link status: No such device     No data available      `dmesg` doesn't seem to have any interesting output from the responsible `igb` driver:               # dmesg | grep igb     [    0.555167] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.3-k     [    0.555168] igb: Copyright (c) 2007-2013 Intel Corporation.     [    0.555669] igb 0000:01:00.0: irq 44 for MSI/MSI-X     [    0.555674] igb 0000:01:00.0: irq 45 for MSI/MSI-X     [    0.555679] igb 0000:01:00.0: irq 46 for MSI/MSI-X     [    0.555683] igb 0000:01:00.0: irq 47 for MSI/MSI-X     [    0.555689] igb 0000:01:00.0: irq 48 for MSI/MSI-X     [    0.599539] igb 0000:01:00.0: added PHC on eth0     [    0.599551] igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection     [    0.599553] igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) ac:22:0b:8b:30:a7     [    0.599732] igb 0000:01:00.0: eth0: PBA No: 001300-000     [    0.599733] igb 0000:01:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)     [    0.600233] igb 0000:02:00.0: irq 50 for MSI/MSI-X     [    0.600237] igb 0000:02:00.0: irq 51 for MSI/MSI-X     [    0.600241] igb 0000:02:00.0: irq 52 for MSI/MSI-X     [    0.600244] igb 0000:02:00.0: irq 53 for MSI/MSI-X     [    0.600247] igb 0000:02:00.0: irq 54 for MSI/MSI-X     [    0.641792] igb 0000:02:00.0: added PHC on eth1     [    0.641794] igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection     [    0.641796] igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) ac:22:0b:8b:30:a8     [    0.641853] igb 0000:02:00.0: eth1: PBA No: 001300-000     [    0.641854] igb 0000:02:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)      Does anyone know what could be going wrong here and how I can get these NICs working? If it's at all possible to do that without manually compiling kernels or drivers, I would prefer that.


title: Xorg Setting checking from Command Line

text: How do I determined, whether Xorg is using `Xinerama, DDC and Reduced Blanking` ?? Just adding few options in Xorg.conf is sufficient ? If I have to check from command-line, then how can I check above mentioned settings ? (I am using VIA chipset and Dell DELA07A monitor, Just in case this info required ) EDIT: If I execute the command: `Xorg -extension ?` It gives me the output as               [mi] Extension "?" is not recognized     [mi] Only the following extensions can be run-time disabled:     [mi]    Generic Events     [mi]    Composite     [mi]    DAMAGE     [mi]    DOUBLE-BUFFER     [mi]    DPMS     [mi]    GLX     [mi]    MIT-SCREEN-SAVER     [mi]    MIT-SHM     [mi]    RANDR     [mi]    RENDER     [mi]    SECURITY     [mi]    X-Resource     [mi]    XFIXES     [mi]    XINERAMA     [mi]    SELinux     [mi]    XTEST     [mi]    XVideo      As per the above output, I assume that it is possible to enable/disable extensions in runtime. Question is HOW ? If it is really possible then I can enable/disable the XINERAMA extension as and when I want I also assume that when XINERAMA is ON in dual-head then maximizing an open application will span on both monitor. And when XINERAMA is off then maximizing an application will span to one monitor only. ( Correct me if I'm wrong )


title: Checking if one of 4 variables starts with string &red in ksh

text: I'm trying to check if one of 4 variables starts with the string "&red" and I'm struggling to get the match to work. At the moment I've got this,               if [[ $filemsgCICS = "&red"* || $filemsgCICSU1 = "&red"* || $snufmsgCICS = "&red"* || $snufmsgCICSU1 = "&red"* ]];then      but that doesn't work. I can't seem to find a solution that will work. I've tried '&red'* and I've tried \&red* but none of them work.


title: FreeBSD: How to start a python script as daemon?

text: I'm facing an issue with a python file that I'd like to start as a service. I named my service ocrserver and the script I want to start is in /home/administrator/ocr/ocrserver/ **init**.py with some parameters added like --address --port etc... After reading the documentation from the FreeBSD site I wrote the following script:               #!/bin/sh          # $FreeBSD$     #     # PROVIDE: ocrserver      # REQUIRE: NETWORK     # KEYWORD: shutdown          # add the following line to /etc/rc.conf to enable the ocrserver:     # ocrserver_enable="YES"          . /etc/rc.subr          name="ocrserver"     rcvar="ocrserver_enable"          # default values     : ${ocrserver_enable="NO"}          base_path="/home/administrator/ocr/ocrserver"          address="localhost"     http_port=8080     pyproxy_port=10800          log_level="debug"          pidfile="${base_path}/ocrserver.pid"          command="/usr/sbin/daemon"          # -p : daemon handler pidfile     # -f : redirect stdout and stderr to /dev/null     # -c : change working dir to root     command_args="-p ${pidfile} -f -c /home/administrator/ocr/ocrserver/__init__.py \     --address ${address} --http-port ${http_port} --log-level ${log_level} \     --pyproxy-port ${pyproxy_port}"          procname="/home/administrator/ocr/ocrserver/__init__.py"     command_interpreter="/usr/local/bin/python3.3"          load_rc_config $name     run_rc_command "$1"      Then I added one line setting up the corresponding rcvar to YES in the /etc/rc.conf file. and I launched it: sudo service ocrserver start where I get the message "Starting ocrserver". and after entering a sudo service ocrserver status, I can see that the service is not running. I also ran a pgrep -l python3.3 command to see if any python3 process was running but no result I precise that I did a chmod 755 on the file to make it readable and executable by all the users. Has anyone some experience with this kind of thing? Thanks for your answers.


title: Equivalent of "passwd -sa" in RHEL?

text: I feel a little silly having to ask this, but: In Solaris you can issue a `passwd -sa` command which gives you (more or less) the same output as `passwd -S userName` does, except it prints out the status information for all users it finds in /etc/passwd. What is the equivalent GNU/Linux command? I'm trying to put together simple instructions for someone else to baseline a server, and part of that is them identifying the password aging configured on all accounts. I can for loop over `cut -f1 -d: /etc/passwd` but I was hoping there was a simple command I could give him.


title: Sniffing VirtualBox machine behind NAT

text: I have a VirtualBox machine with a single interface connected to VB's NAT mode. What I would like to do is sniff _all traffic coming from/to any machine_ behind that NAT. (I don't think I will need to sniff on more machines at the same time). Background for this is software testing. More specifically, I'd like to see in bigger picture what exactly goes from/to the machine without the need to filter out all the noise that the host is already producing. I used to do this on Windows 7 with VMWare, where the traffic flew through a separate virtual interface on the host, so sniffing the traffic from (all) machines behind the NAT was as easy as sniffing on that interface only. Now I tried to achieve the same setup on Debian with VirtualBox, and I stopped at the fact that VirtualBox does not seem to separate the traffic this way: on Debian Wireshark only offers `eth0`, `nflog`, `lo` and `any` (pseudo-device to capture on all others). When I sniff on `eth0`, I can't easily distinguish between what came from host and what came from guest. Is it possible to do this with VirtualBox? Or is there a better (easier) setup? Both machines are running Debian 7.0 Wheezy. Note: What I was (maybe naively) thinking as a possible solution was: a way to distinguish on the outgoing packets that they have been translated. (Does NAT _really_ not leave a trace?) Now it strikes me that this would at least definitely not be easy for _incoming_ packets...


title: What does ln stand for?

text: In Linux you can use the `ln` command to make links.               $ touch foo     $ ln -s foo foo_link     $ ls -l     lrwxrwxrwx  1 cklein cklein         3 May 29 16:11 foo_link -> foo      I assume that the 'l' in `ln` stands for "link", but what does the 'n' stand for? What does `ln` stand for?


title: creating variable using variable value as part of new variable name

text: I'm trying to create a new variable using the value of an existing variable as part of the variable name.               filemsg"$word1"=" "      I've also tried               filemsg$word1=" "          filemsg${word1}=" "      on all attempts I get the following when that line executes,               cicserrors.sh[45]: filemsgCICS= : not found [No such file or directory]


title: Block motion for any bracket type?

text: If I want to, say delete a block, I can use text object motions. I.e if my text looks like this:               (let [a 1 b {:x 3  :y 4}]           a)      And the cursor is for example on character `3`. If I type `diB` then `:x 3 :y 4` would be deleted If it is `daB` then both the block and surrounding brackets are deleted :`{:x 3 :y 4}` So, the pattern is:               operation inclusion block-motion      Where operation may be:   * `d` \- delete   * `c` \- change   * `y` \- copy ... inclusion is either:   * `i` \- inner (no brackets) or   * `a` \- all  and block-motion:   * `b`,`(` or `)` for `()` parens   * `B`, `{` or `}` for `{}` curlies   * `[` or `]` and `<` or `>` for their own respective brackets, etc.. Now, the question is: **Is there a block motion for the inner-most block with brackets of any of these types?** I'd like to be able to do `da?` with `?` being the motion I'm looking for. And if the cursor in my example above is within `{}` say on `3` I'd delete just the `{}` but if my cursor was on `b` I'd delete the `[]` block, etc.


What is the difference between procfs and sysfs? Why are they made as file systems? As I understand it, proc is just something to store the immediate info regarding the processes running in the system.


title: Find command: Searching for executable files

text: What type of parameter/flag can I use with the unix _find_ command so that I search executables? (if this question is better suited for another stackexchange forum, I welcome you telling me so) p.s. If you know of one, I've been looking for a detailed (non-beginner) tutorial/screencast about grep and/or find.


title: Installing a package locally to a user - best practices?

text: I want to install Git locally to a user on a RHEL server (I don't have root access) What would be your cleanest/ most organized way of installing software to a local user account?   * Installing everything in that users home directory?   * What would the directory layout look like?   * Would you install from source or RPM?   * If from RPM would you use YUM or RPM?


title: Linux routing tables

text: I'm trying to learn Linux routing tables and ran into bit of snag. In the example below I'm not sure what is happening. My understanding is 0.0.0.0 means that for line 1 and 2 any packets outside of its network look at the default gateway 10.0.0.1.               Destination Gateway Genmask       Flags MSS Window  irtt    Iface     10.0.0.0    0.0.0.0  255.255.255.0  U   40  0          0    eth1     10.1.1.0    0.0.0.0  255.255.255.0  U   40  0          0    eth0     0.0.0.0     10.0.0.1    0.0.0.0     UG  40  0           0   eth1      So my question is this, which interface is closer to the Internet? Im not sure if packets immediate leave eth0 and eth1 sends packets to the gateway 10.0.0.1 or if both eth0 and eth1 both route packets to 10.0.0.1 for the Internet.


title: How to configure kmail2 to use client certificates for POP3 and IMAP access

text: I would like to run a POP3 server with TLS transport security such that a client must authenticate with a client certificate. (This shields the server from brute force password guessing attacks.) How can I configure kmail2 (KDE 4.12.5) accordingly? There is no obvious (to me) configuration setting for client certificates.