Installing OpenVPN to replace Cisco VPN because Cisco will not work with the kernel I am on or downgrade instead?

I had difficulties installing Cisco5.0 VPN on my Ubuntu 10.04 LTS. I asked for assistance in this question: link to previous question. The answer is that this Cisco program will run on only older versions of the kernel. I would like to use the VPN to connect through my university's network so that I can view academic journals under their subscription. One option could be to downgrade the kernel; how can this be done and what consequences would this have? The second question is whether I can install an alternative VPN client to connect? I have a ".pcf" file from the university to use with the Cisco client. Would this be compatible information to allow another client to connect? Is the connection independent of the software used?


Last command in ksh

In bash I can use `!!` to indicate the last command. In ksh I think you can use `r` to do something similar, but it seems to fail in one of my common patterns: typing `sudo [last command]`.               > cp foo /bar     cp: permission denied     > r c       # If I do this it will repeat my cp call     > sudo r c  # when I do this, it tells me that "r" is not a command      How can I use history to quickly type "sudo [last command]"?


Why can my gentoo systemd installation only execute files as root?

If I try to login as any other user, via `su` it says 'permission denied'. If I use `su -l` it says 'canot cd to `/home/<user>`'. Logging in via the tty just kicks anyone without a message out except root.   If I try to install somthing via portage, it says 'permission denied to `/usr/bin/sandbox`'. When I try to run `gdm`, it just shows a black screen. Also, I get an error when trying `sudo -u <username> [a command]` as root. It says:               sudo: unable to stat /etc/sudoers: Permission denied     sudo: no valid sudoers sources found, quitting     sudo: unable to initialize policy plugin      This guy seems to have had a similar problem in 2005. However, nobody helped him out. This is my kernel configuration. However, I don't think that is the problem. I've literally searched for hours. Any suggestions would be appreciated.


WebGUI for Virtualization?

Are there any virtualizations that can be accessed via a WebGUI too? I mean the administration part is enough on a terminal, but we need a virtualization/webgui solution for "customers". So that they could for ex.: reboot their guest machine or reach it when it's "frozen" [bsod/kernel panic] or maybe clone it, etc. There is Xen with the xen-shell, but it's not good because it's only available via terminal. Any solutions?


How to change or create Lvm partition in Centos after install OS in shell

How to change or create Lvm partition in Centos dedicate server after install OS in shell?


uniq a csv file ignoring a column, awk maybe?

Given this file (annotations are not part of file, but form part of explanation)...               x,a,001,b,c,d,y     x,a,002,b,c,e,yy     x,bb,003,b,d,e,y     x,c,004,b,d,e,y     x,c,005,b,d,e,y   # nb - dupe of row 4     x,dd,006,b,d,e,y     x,c,007,b,d,e,y   # nb - dupe of row 4 and 5     x,dd,008,b,d,f,y     x,dd,009,b,d,e,y   # nb - dupe of row 6     x,e,010,b,d,f,y      ... I would like to derive the following output:               x,a,001,b,c,d,y     x,a,002,b,c,e,yy     x,bb,003,b,d,e,y     x,c,004,b,d,e,y     x,dd,006,b,d,e,y     x,dd,008,b,d,f,y     x,e,010,b,d,f,y      If column 3 were cut from the file, and then uniq were run over the file, then if the remaining rows had their column three value added back in at the right place, then I'd get the above result. But I'm really struggling, to come up with something that would do this. I'd welcome an opportunity to learn about linux's text processing utilities. Performance: Files don't look likely to grow to more than 1MB, and there is only 1 file per day. Target: Debian GNU/Linux 7 amd64, 256MB / Xeon. Edit: tweaked example as fields are not fixedwidth, and a solution involving `uniq --skip-chars=n` will not work as far as I can tell.


gpg starting gpg-agent on demand?

The man page of `gpg-agent` states:                  The agent is usualy started on demand by gpg,  gpgsm,  gpgconf  or        gpg-connect-agent.   Thus there is no reason to start it manually.        In case you want to use the included Secure Shell  Agent  you  may        start the agent using:               gpg-connect-agent /bye             The usual way to run the agent is from the ~/.xsession file:               eval $(gpg-agent --daemon)      This on the one hand tells me that "there is no reason to start it manually" and on the other hand tells me how to start it manually. -- Did I misunderstand anything here? On my system it seems like I definitely have to start it manually. Otherwise for example `gpg-connect-agent` complains: `can't connect to the agent: IPC connect call failed`. - Do I need to configure anything to make `gpg-connect- agent` start the agent as stated in the man page? * * * Also the man page of `gpg-connect-agent` says:                  --agent-program file               Specify the agent program to be started if none is running.      However `gpg-connect-agent --help` does not list this option and the command also complains if I try to use it. Seems like the man page describes a different command, or did I miss anything important? * * * My system is a current Arch Linux. (Same situation on another debian box.) Requested details:               $ gpg --version     gpg (GnuPG) 2.0.22     libgcrypt 1.5.3     Copyright (C) 2013 Free Software Foundation, Inc.     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>     This is free software: you are free to change and redistribute it.     There is NO WARRANTY, to the extent permitted by law.          Home: ~/.gnupg     Supported algorithms:     Pubkey: RSA, ELG, DSA, ?, ?     Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,             CAMELLIA128, CAMELLIA192, CAMELLIA256     Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224     Compression: Uncompressed, ZIP, ZLIB, BZIP2     $ gpg-connect-agent --version     gpg-connect-agent (GnuPG) 2.0.22     Copyright (C) 2013 Free Software Foundation, Inc.     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>     This is free software: you are free to change and redistribute it.     There is NO WARRANTY, to the extent permitted by law.          Home: ~/.gnupg     $ man gpg-connect-agent |grep -A1 agent-program            --agent-program file                   Specify the agent program to be started if none is running.     $ gpg-connect-agent --agent-program foo     gpg-connect-agent: invalid option "--agent-program"     $ gpg-connect-agent /bye     gpg-connect-agent: can't connect to the agent: IPC connect call failed


How can I replace a tty using getty with qingy on ubuntu 12.04 or later?

Qingy is a getty replacement. I'd like to use it for a tty terminal on Linux Mint 15 (in hopes of getting tmux to get proper 256 colors in tty which fails with fbterm) which means replacing getty. I'm not sure how to do so, as it says I need to edit /etc/inittab, which doesn't exist in current versions of Ubuntu.


rc.subr can't access file?

On FreeBSD 8.3 I'm running script (as root):               /usr/local/etc/rc.d/foo/foo.sh start      content is typical:               . /etc/rc.subr     name="foo"     rcvar=${name}_enable     load_rc_config ${name}     required_files=${foo_conf}      in `/etc/rc.d.local` I have:               foo_conf=/cf/foo/config/foorc      And when I start it I get:               /usr/local/etc/rc.d/foo.sh: WARNING: /cf/foo/config/foorc is not readable.     /usr/local/etc/rc.d/foo.sh: WARNING: failed precmd routine for foo      But when I run application (`/usr/local/bin/foo`) directly with `-f` parameter as `/cf/foo/config/foorc` application starts normal. Permission for `foorc` file: `-rwxr-xr-x` and for directory: `drwxr-xr-x`. Fragment in rc.subr looks like:               check_required_before()     {         for _f in $required_files; do         if [! -r "${_f}" ]; then         warn "${_f} is not readable"         fi         done     }      It is permission problem or what?


how do i suppress seds unnessary output while using option -e?

why n option is not working here                  [root@testgfs2 final]# echo a b c | sed -ne 's/[[:blank:]]/"/gp' -ne 's/^/"/pg' -ne 's/$/"/pg'         a"b"c         "a"b"c         "a"b"c"      i just need :               "a"b"c"      actually i want sed to do somehting like :               echo a b c d | sed ...      output:               'a' 'b' 'c' 'd'


Digging through huge gziped log files

From time to time I need to dig through huge log files (several GB unpacked) to debug a specific error. Now, vim is OK for browsing through the file, but when I need to find something in the file it's completely useless. Is there some tool that could index the log and allow me to search the file faster? Ideally a command line tool. EDIT: Just to clarify, tools like `ack` or `grep` aren't suitable since I need to examine the context of the matches and `-C`,`-A`,`-B` just aren't good enough. Plus `ack` and `grep` are still unusably slow.


grep upto matching brackets

I have a file like this:-               pin(ABC) {                     a b c d e f {                     abc                     }                    }       pin(XYZ) {                     g h i j k  {                             j k {                               cg {                            }                           }                          }                         }       abcd pqrs rstu       mango banana tree       pin(PQR) {                      mango                }        Now i want to grep the text like this:-   when i give ABC as input then output should be a file named ABC with the content from "pin(ABC) {" upto matching bracket "}" like this :-               pin(ABC) {                     a b c d e f {                     abc                     }                    }        when i give PQR the output should be a file named PQR with this content:-               pin(PQR) {                      mango                }        & so on for any word which is inside pin()   one way to do it is to grep the text from "pin(ABC" till next name "pin" & direct the output to the file named "ABC" , it works for only ABC but fails for case of PQR & XYZ. How to do it.


Theme looks different depending on location in FS?

I am noticing an annoying effect when copying GTK themes and I am unable to explain it. Copying a theme from /usr/share/themes to ~/.local/share/themes results in a new theme that looks different than the original. As it's a `cp -a` copy that is surprising to me and I can't find a proper explanation for it. Why does the copied theme in ~/.local yield a different result than the original in /usr? The whole story: I am unhappy with the current coloring scheme I use for XFCE because it won't highlight the active tab in a gnome-terminal. The only solutions to this problem I was able to find was "use another coloring scheme". However, all the coloring schemes that solve this problem for me have other effects I don't like. So I am looking to bring that one feature of highlighted active tabs into my favorite coloring scheme. I start out copying my favorite scheme from /usr/share/themes into ~/.local/share/themes by               cp -a /usr/share/themes/i_like_you_best ~/.local/share/themes/renamed_to_be_discernible      Now, when I open `xfce4-appearance-settings` I can select renamed_to_be_discernible as coloring scheme. Unfortunately, renamed_to_be_discernible looks different than i_like_you best. Here are two small screenshots showing the difference. ![with scheme i_like_you_best](http://i.stack.imgur.com/1DgEX.png) ![with scheme renamed_to_be_discernible](http://i.stack.imgur.com/nXCRG.png) The left picture shows a (piece of a) window using the original scheme i_like_you_best, whereas the right picture shows the same screenarea but with renamed_to_be_discernible. Notice the difference in the gray used for the window manager decorations and the two much more pronounced borders of the menu and tab bars. One of the reasons why I like i_like_you_best best is that it's simple. Consequently the entire theme is just one file `/usr/share/themes/i_like_you_best/gtk-2.0/gtkrc`. That file does neither include nor reference another file explicitly. Why do these two themes yield different results? These days Xfce still uses GTK2 and I was hoping if i threw `i_like_you_best/gtk-2.0` and `theme_with_what_i_want/gtk-3.0` together I would get an Xfce theme that does what I want, but apparently even copying the gtk-2.0 folder to a new location breaks the theme.


Unable to pass a bash variable as a python argument in bash

For some reason I cannot pass the bash variable `$FOLDER` as a python argument on the following code. The python script downloads some files from amazon s3. Bash script:               #!/bin/bash     FOLDER=$(./aws get $BUCKET"/location.txt")     python /data/pythonscript.py $FOLDER     #      The output of the `$FOLDER` is a regenerated date eg. `2014/07/31/14-16-34` which is used as a path. Here is the python script:               #!/usr/bin/python          import boto, sys     from boto.s3.connection import S3Connection          access_key = 'accesskey'     secret_key = 'secretkey'     bucket_name = 'a name'     folder_path =  str(sys.argv[1]) if len(sys.argv) > 1 else ''          print("Forwarded folder path " + folder_path)          conn = S3Connection(access_key, secret_key)     bucket = conn.get_bucket(bucket_name)          print("Bucket Location:" + bucket.get_location())          for key in bucket.list(prefix=folder_path, delimiter=''):             if '.' in key.name:                     file_name = key.name[len(folder_path)+1:]                     print("Downloading file " + file_name)                     key.get_contents_to_filename('/data/temp/' + file_name)      When I execute the bash script without changing the `python /data/pythonscript.py $FOLDER` line, I get the following output:               Forwarded folder path 2014/07/31/14-16-34      Buckect Location:       But when I change it to `python /data/pythonscript.py 2014/07/31/14-16-34` , everything works:               Forwarded folder path 2014/07/31/14-16-34     Bucket Location:      Downloading 2014/07/31/14-16-34/FacetedSearch.zip      Downloading file FacetedSearch.zip     Downloading 2014/07/31/14-16-34/Location.zip     Downloading file Location.zip     Downloading 2014/07/31/14-16-34/LocationPage.zip     Downloading file LocationPage.zip


Install r5u87x on FreeBSD

I need to install Ricoh r5u87x webcam loader on FreeBSD, because it solve not suspending in unix/linux boxes on my vaio laptop as I try it in UBUNTU, but the loader is simply for Linux, I think. Is there any solution for FreeBSD? Thanks.


I am new to linux. I am looking at some configuration notes for a CentOS, but I am configuring a Redhat machine. I am not clear:   1. What the below commands install?    2. Why one might install these?    3. Are these applicable to a RedHat installation?                   yum groupinstall  "Development Libraries"         yum groupinstall  "Development Tools"         yum groupinstall  "Server Configuration Tools"      Note: I started by Googling _yum group install "development libraries"_ , but felt some terms might be ambiguous.


The ERE regex to split() string between a delimiter and end-of-word

I'm using a long **gawk 3.1.6** script to do a complex conversion of Zim markdown text into GtkDialog code and am stuck on the following problem... Sample ASCII input...               [[link|label label]] [[link]] @tag more text      Commandline test to find right regex...               re="[][][][]"; echo '[[link|label label]] [[link]] @tag more text' | awk -v RE=$re '{split($0,A,RE); printf "\n(" A[1] ")(" A[2] ")(" A[3] ")(" A[4] ")(" A[5] ")(" A[6] ")(" A[7] ")(" A[8] ")\n"}'      The regex `"[][][][]"` splits out the two hyperlink forms quite nicely so that's not a problem. > It would be more understandable if we could divided it in two -- `"[][]"` > and `"[][]"`. We are looking for either "[[" or "]]" to split on. The order > of the characters in the class have to be reversed to comply with class > meta-character restrictions. The problem is in also splitting out the "@tag" into just "tag". "tag" could be any alphanumeric text either followed by a space or the end of the string. Executing the commandline test above yields...               ()(link|label label)( )(link)( @tag more text)()()      But I need it to yield...               ()(link|label label)( )(link)( )(tag)(more text)      I've tried numerous regex strings like `"[][][][]|@[[:alnum:]]*"` which drops the entire word and yields...               ()(link|label label)( )(link)( )( more text)()      and `"[][][][]|@"` which yields...               ()(link|label label)( )(link)( )(tag more text)()      Any ideas?


Where is / why is there no log for normal user systemd services?

I'm trying to learn basic systemd usage and I've run into a confusing issue with user service units. When running ordinary services with **systemctl start some.service** I can find the full log for this service (including what it has printed to stdout / stderr, as I understand it) by running **sudo journalctl --unit some.service**. Consider the example servicefile **chatty.service** :               [Service]     ExecStart=/usr/bin/echo "test from chatty.service"      When I place this service file in **~/.config/systemd/user/chatty.service** and run it with **systemctl --user start chatty.service** I cannot find its output sent to stdout in journalctl, neither with plain **journalctl** nor with **journalctl --user**. I only get the following output in both:               Jan 15 19:16:52 qbd-x230-suse.site systemd[1168]: Starting chatty.service...     Jan 15 19:16:52 qbd-x230-suse.site systemd[1168]: Started chatty.service.      And **journalctl --unit chatty.service** does not return anything at all (with or without --user makes no difference). While if I move the same service file to **/etc/systemd/system** and run it with **sudo systemd start chatty.service** I then get the following output when I run **sudo journalctl --unit chatty.service** :               Jan 15 19:28:08 qbd-x230-suse.site systemd[1]: Starting chatty.service...     Jan 15 19:28:08 qbd-x230-suse.site systemd[1]: Started chatty.service.     Jan 15 19:28:08 qbd-x230-suse.site echo[27098]: test from chatty.service      It seems like the user service unit isn't as well integrated somehow, is this expected, am I missing something or is it a bug? I am running openSUSE 13.1 x86-64, with systemd 208 (default install).


How to speed up migration from Raid 5 to Raid 6 with mdadm?

Today I started the migration of my Raid 5 to Raid 6 by adding a new disk (going from 7 to 8 disks, all 3TB). Now the reshape is in progress:               Personalities : [raid6] [raid5] [raid4]      md0 : active raid6 sdi[9] sdh[8] sdf[7] sdc[6] sdd[4] sda[0] sde[5] sdb[1]           17581590528 blocks super 1.2 level 6, 512k chunk, algorithm 18 [8/7] [UUUUUUU_]           [>....................]  reshape =  2.3% (69393920/2930265088) finish=6697.7min speed=7118K/sec          unused devices: <none>      but it is slow as hell. It will be almost 5 days before completion. I was using to reshape the array in about 1 day, but here it is horrible. The speed is very low. The backup file is on a SSD. I did change the stripe size and the min and max speed limits, and it did not change a thing. Is there any way I can speed up the process to reasonable amount of time or I have to wait 5 days to finish ? Update: iostat -kx 10               avg-cpu:  %user   %nice %system %iowait  %steal   %idle                0.05    0.00    1.68   22.07    0.00   76.20          Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util     sda            1675.90  1723.00   27.60   23.90 13875.20  6970.00   809.52     0.55   10.79    8.59   13.33   7.97  41.02     sdb            1675.90  1723.10   27.20   23.80 13670.40  6970.00   809.43     0.55   10.80    8.96   12.90   8.12  41.43     sdc            1675.90  1723.60   27.50   23.30 13824.00  6970.00   818.66     0.65   12.85   10.48   15.65   9.83  49.94     sdd            1675.90  1723.10   27.60   23.80 13875.20  6970.00   811.10     0.55   10.80    8.93   12.98   8.16  41.95     sde            1675.90  1723.10   27.20   23.80 13670.40  6970.00   809.43     0.60   11.79    9.17   14.79   9.19  46.87     sdf            1675.90  1723.80   27.70   23.10 13926.40  6970.00   822.69     0.72   14.28   11.65   17.43  10.12  51.40     sdg               0.00     4.10    0.00   93.20     0.00 39391.20   845.30     6.07   65.14    0.00   65.14   2.71  25.29     dm-0              0.00     0.00    0.00    4.30     0.00    18.40     8.56     0.00    0.07    0.00    0.07   0.02   0.01     dm-1              0.00     0.00    0.00   89.60     0.00 39372.80   878.86     6.07   67.78    0.00   67.78   2.82  25.28     md0               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00     sdh            1583.50  1631.70  216.50  115.90 13824.00  6970.00   125.11     1.56    4.73    5.36    3.55   0.43  14.41     sdi               0.00  1631.70    0.00  115.90     0.00  6970.00   120.28     0.21    1.77    0.00    1.77   0.28   3.25     dm-2              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00     dm-3              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00     dm-4              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00      sdi is the disk I last added. sdg is the SSD. The dmX are the partitions on LVM.


"echo 3 > /proc/sys/vm/drop_caches" - Permission denied as root

I am currently having some issues with the cache. It is a little too much right now so I wanted to clear it. I googled and found this little command: `sync && echo 3 > /proc/sys/vm/drop_caches`.   I am logged in as root over SSH (not using sudo). These are the attempts I made:               root@server: ~ # ll /proc/sys/vm/drop_caches     -rw-r--r-- 1 root root 0 15. Jan 20:21 /proc/sys/vm/drop_caches          root@server: ~ # echo 3 > /proc/sys/vm/drop_caches     -bash: /proc/sys/vm/drop_caches: Permission denied          root@server: ~ # sudo su -c "echo 3 > /proc/sys/vm/drop_caches"     bash: /proc/sys/vm/drop_caches: Permission denied          root@server: ~ # echo 3 | sudo tee /proc/sys/vm/drop_caches     tee: /proc/sys/vm/drop_caches: Permission denied     3      It is a remote machine running Debian. As far as I know there are some vCores in this machine and it uses Virtuozzo for the virtualization.   I really just want to clear the cache _(So I can only access it using SSH)_.   I also tried registering this as a cronjob. But it simply fails too!


How to install CentOS 6 via USB mass storage device?

I want to install CentOS 6.2 on a laptop (Thinkpad R40) which comes without CD/DVD-drive but with USB 2.0 ports. It seems that CentOS does not provide ready-to-use dd-able USB images for installation. Thus my question: How to install CentOS via a USB device (e.g. a 16 GB USB flash drive)? Regarding using different available iso-images as base: the laptop has net- access - but I want to make sure that the CentOS installer is not loading unchecked packages from the net during installation - perhaps a netinstall image does not check cryptographically signed packages during installation (as with the Fedora 14 installer). There is a CentOS InstallFromUSBkey which just provides outdated, cryptic and wrong information. Especially, the instructions for CentOS 6 are missing details and contain errors (10 MB for the first partition is not enough, `syslinux device` fails and what are they talking about grub?)


Some keyboard shortcuts do not work in Compiz

I've bound `Win-R` with the _Run Application_ dialog in Metacity. However, the shortcut doesn't work when switched to Compiz. The entry _Show the panel's "Run application" dialog box_ even doesn't appear in the _Keyboard Shortcuts_ dialog in Compiz. There are also other shortcuts that do not work in Compiz. I can add them using custom shortcuts, but I don't know the command line to popup the "Run Application" dialog. Why are there so many shortcut entries missing in Compiz? (~90 entries in Metacity compared to ~20 entries in Compiz) (OS: Debian Squeeze) **EDIT** Screenshot: Keyboard shortcuts list in Compiz ![Keyboard shortcuts list in Compiz wm](http://i.stack.imgur.com/E28fs.png) As you see, the list is very limited, most shortcuts set in Metacity are missing.


Detecting computer models , e.g the vendor

How can I detect the model of a computer, like Leveno or Sony? Is there any program can do this, for both PC & Laptop? (I just want to load a specific driver when the target model is detected.)


clear tmpfs in my case

I am on a **Ubuntu** machine. I have make a directory under **root** directory, by:               $ sudo mkdir /hello     $ sudo mkdir /hello/bye      Then I mount **tmpfs** with size 1024M to `/hello/bye` by:               $ sudo echo "tmpfs   /hello/bye   tmpfs   size=1024M,mode=0777  0  0" >> /etc/fstab     $ sudo mount -a      In future , **How to clear** `/hello/bye` (tmpfs) ?


vim horizontal line count

Using set number you can turn on vertical line count.   Is there also a command to turn on horizontal line count? I hate talking my hands away from typing and would like to be able to quickly address an area by column and row and past it starting at another column and row. As an example I can copy from col 12 line 14 to col 14 line 17 THEN pate is at col 20 line 16


Auto correct path when running a command from history?

I perform a recursive search to find a command I executed few days back and I want to run it. However that command should run from the path from where I ran it previously from and not where I currently am. Is it possible for `zsh`to figure this out and change the command to the full path and run from my current path? or maybe fork a process switch to the original path run it and come back?


mount freebsd slice partition under linux

I have under linux:                      Device   Boot      Start         End      Blocks   Id  System     /filename.img      *         63     1007999      503968+  a5  FreeBsd      Under above partition i have two slices: ufs filesystem and swap. I don't know, how I can determine mount offset to mount ufs partition.               mount -r -t ufs -o loop,offset=32256,ufstype=ufs2 filename.img /test/      dmesg output               ufs_read_super: bad magic number      It's not working.


Simple wrapper scripts spawning 100s of bash processes

I have this kind of GCC multilib wrapper set up:               #file: gcc     #!/usr/bin/env bash     gcc -m32 "$@"      which essentially just wraps a 64-bit multilib gcc to act as a non-multilib 32-bit gcc. When I build something (like binutils for example), this spawns hundreds of `bash` processes, until even `fork` fails. How can I work around this?


How to open a file in the last closed position in VI

I want to open a file which is closed in line xxx. So I can easily continue editing


Can I achieve functionality similar to interrupts in Linux userspace?

One of functionalities I miss the most from "small embedded" in Embedded Linux is the interrupts. A signal appears on a specific pin, or other interrupt source is triggered and whatever was done inside the CPU gets interrupted, and my function of interrupt handler is launched. In Linux everything is buffered, if something happens the system just goes about its own course and when (at last) given thread is brought to foreground, its wait-state expecting the external source ends, and its handler starts. The closest thing I know are the signals, which can trigger a handler interrupting normal flow of the thread, but still, the handler will not pick up the signal until the kernel brings the thread into foreground, which may be many milliseconds after the signal happened - and triggering the signals isn't as robust either; I need an app or a kernel module to send a signal, I can't just trivially attach it to a GPIO pin. How could I achieve a functionality similar to hardware interrupts within Linux userspace software - have a specific function launched or specific thread brought to foreground immediately after an externally sourced condition is triggered, without waiting for the process queue to bring my thread to foreground? If you feel this question is too broad, let's narrow it to a specific example: a Raspberry Pi board receives a signal on one of its GPIO pins (not necessarily arbitrary; if only some pins can do that, that's okay.) I want my userspace application to react to this event within least time possible, be it bringing it out of wait state, launching a handler function or any equivalent mechanism, but above all not waiting for the task queue to cycle through all pending processes before the handler is brought to foreground, but trigger it ASAP. (and specifically, when there is no signal, not leaving the system locked forever with the handler process occupying 100% CPU time polling the input and never yielding to the OS.) Is there such a mechanism?


Username conflicts on a central printer queue

We have just switched to a centralized print queue. The printer is setup with               lpadmin -p SPScolour -E -D "Sustainable Print Colour" -v lpd://xxx.yyy.com/colour      The IT people are saying my local username must match my central username. Of course the IT people are not that organized and I have a number of "central" usernames. Is there a way to specify the print queue username through an environment variable or some other trick? I can work around the username constraint by using `lp -U mycentralusername -d SPSColour foo.txt`. This isn't a complete solution since not all GUIs give you the option of specifying the print command. If I am willing to install a different printer for each user I can do               lpadmin -p SPScolour -E -D "Sustainable Print Colour" -v lpd://mycentralusername@xxx.yyy.com/colour      I have had no luck with setting lpoptions. I have tried               lpoptions -d SPScolour -o username=myusername     lp -d SPSColour foo.txt      which does not print. It looks like `lpoptions` takes a `-U` flag, but I cannot figure out how to use it.               lpoptions -U myusername -d SPSColour      gives me an error.


Speakers make popping sound when on battery power. What should I do?

I am running Linux Mint 11 on my notebook, which is basically a variation of Ubuntu. I have been hearing a popping noise in the speakers ever since I installed the OS, but just now realizing that the popping sound only happens on battery power. This noise is driving me insane and even happens when I mute the speakers. It sounds like: "pop" [30 sec pause] "pop pop". Please someone, anyone help me. Notebook: HP Pavilion DV6325US P/N: RV004UA OS: Linux Mint 11 (with current updates)


HAProxy should not forward an incoming request to down instance

In my scenario, I have 2 servers, both are communicating with HAProxy. When a request comes in, HAProxy splits the request and sends it to both servers, following a round robin method. If in any case my first instance goes down, at that time HAProxy should come to know that one of the servers are down and it should not forward any requests to that server. It should only communicate with the other server for every request. Can anybody tell me how I can configure my HAProxy for above scenario, please?


What are the minimum root filesystem applications that are required to fully boot linux?

It's a question about user space applications, but hear me out! 3 'applications', so to speak, are required to boot a funcitonal distro of Linux:   1. Bootloader - For embedded typically that's U-Boot, although not a hard requirement.   2. Kernel - That's pretty straightforward.   3. Root Filesystem - Can't boot to a shell w/out it. Contains the filesystem the kernel boots to, and where `init` is called form. My question is in regard to #3. If someone wanted to build an extremely minimal rootfs (for this question let's say no gui, shell only), what files/programs are required to boot to a shell?


Changing username but not home directory

Is it a bad idea to do `usermod -l login-name old-name` to change my username while leaving my home directory name intact? A few years ago my university changed my username, but since it didn't affect anything, I did not change my local username. Now in order to use our centralized printers, the local username must match the university username (or so they claim). The reason I don't want to change my home directory is twofold.   1. I think there are a number of scripts that have my username hardcoded into them.    2. I think a change in my home directory name might throw my backup and revision control systems into a state of chaos.


File no longer available when trying to edit in vim via <()

When working with mercurial, I frequently do things like               vim <(hg cat -r 42 somefile)      However, if I try this with a file larger than several hundred lines, I get a Read Error in vim, and only the first couple of hundred lines are included. If I use gvim instead of vim, I get an error like               E211: FIle "/proc/3546/fd/63" no longer available      Isn't this supposed to work? I don't know if it's relevant, but I've tried both in bash and zsh, with the same result, and I also tried               cat <(hg cat -r 42 somefile)      which prints the entire file as I would expect.


Not able to extend the size of an LVM logical volume

During RedHat installation, I created one volume group with two logical volumes in it.               Volume Group Name = VolGroup00     LVMs              = LogVol00 and LogVol01                    LogVol00 size = 48G     LogVol01 size = 81G      I have added extra 146GB hard drive. I added that drive as a physical volume and ran the command `pvs`:                 PV         VG         Fmt  Attr PSize   PFree       /dev/sda3  VolGroup00 lvm2 a-   132.00G      0       /dev/sdb5  VolGroup00 lvm2 a-   136.09G 136.09G      Now I'm trying to extend the size of `LogVol01` from 81GB to +200Gb using the command               lvextend /dev/VolGroup00/LogVol01 -l 100%VG      But it is giving me this error:               [root@APP ~]# lvextend /dev/VolGroup00/LogVol01 -l 100%VG       Extending logical volume LogVol01 to 268.09 GB       Insufficient free space: 5917 extents needed, but only 4355 available      How can I fix this and extend my volume?


How to set up FreeBSD for my region?

im currently installing FreeBSD. Im at the "Time Zone Selector" screen. I don't know what should i choose. Normally, since i live in Quebec (Canada), i choose Eastern time GMT -5, but there is no such option. Should i choose "Atlantic Ocean" or "America -- North And South" or UTC or something else? During the installation, i also had to choose which keyboard layout, i took French Canadian, but some of my keyboard's button dont give the expected result. There was no Canadian Multilingual option... How to set up Canadian Multilingual??


Linux sort second last column

I would like know how to sort the second last column ? It has the word "days=" in front of the number. I'm able to get the column with awk '{print $(NF-1)}', but sorting is wrong.                   457000      (test2) && (SGD||RMB||HKD||YEN)    days=5000    71         37622 (this is || test1)&&(SGD||HKD||RMB) days=630 40010          43944 (this is)&&(SGD||HKD) days=80 102732          79378 (this is||test2)&&(HKD||RMB)   days=800 205425       The result I'm looking for is                   43944 (this is)&&(SGD||HKD) days=80 102732          37622 (this is || test1)&&(SGD||HKD||RMB) days=630 40010          79378 (this is||test2)&&(HKD||RMB) days=800 205425         457000      (test2) && (SGD||RMB||HKD||YEN)    days=5000    71


Centos 6.2 static IP: only getting IPV6 address and need IPV4

I installed a Centos 6.2 min install. I have edited `/etc/sysconfig/network- scripts` and I have `ifcfg-eth0,eth1` I have tried to setup static IPs but I only get IPV6 address back on both adapters and can't ping anything since the rest of the network is IPV4. I have copied my working settings from another Centos 6 server I have setup and working. Not sure what to do next? I already added a line to say `NETWORKING_IPV6=no`


Incomplete factory update makes btrfs filesystem unusable?

After an incomplete update from the factory repo my opensuse 12.1 btrfs filesystem is unusable. I have plenty of disk space free but zero inodes. When I try to delete or create a file it gives me the error no space available? How can I fix this? Here is how I solved it: http://www.nrtm.de/index.php/2012/03/13/the-joys-of- btrfs-and-opensuse-or-no-space-left-on-device/


Output of `java -version` not matched by grep or awk

On my Linux machine, it isn't clear to me why if I do the following then I don't get only the version string ("1.5.0_32").               # java -version | grep version | awk '{print $NF}'     java version "1.5.0_32"     Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_32-b05)     Java HotSpot(TM) Server VM (build 1.5.0_32-b05, mixed mode)      Why don't `grep` or `awk` work? Just to show that grep and awk work on other example               # echo ' java version "1.5.0_32" ' | grep version  | awk '{print $NF}'     "1.5.0_32"


How to control the time that users spend on

I need a solution that allows me to control the time that each user spend on the computer, excluding idle time (some kind of parental control). I've tried _timekpr_ , but it doesn't work on Ubuntu 13.10. pam_time is not what I'm looking for... Here is how my situation looks like in practice: There are several user's accounts in the system, let's call them U1, U2 and U3. I would like to know how long and at what time each of them was active, BUT if i. e. U2 doesn't perform any operations (just idle logged in) or lock his account without logging off, it shouldn't be counted against the total time spent by him on the computer. If user exceed the time limit assigned to his account, I would like to be able to run a bash script (and the same when he tried to use a computer in some specified hours). My computer works as a server, so more than one user can use it at the same time. Users work in graphical mode (Unity, X Window System) without using the terminal. Is there any third-hand software, a system command, some suggestions what can I use developing my own solution, _et cetera_?


Why does this work: "cp image.bin /dev/mapper/loop0p1"?

Why does this work?               cp image.bin /dev/mapper/loop0p1      `image.bin` is a partition image. I have tried it and works, but why? Shouldn't a `dd` be used?


Install MultiUpload Extension in MediaWiki

I am trying to install "MultiUpload" mediawiki extension. I followed the installation instructions and added below code to my mediawiki "LocalSetting.php" file `require_once("/var/lib/mediawiki/extensions/MultiUpload/MultiUpload.php");` but when I tried to verify the installation by go to the webpage `http://myserverIP/wiki/index.php/Special:Version` It gave me "http error 500". However I have successfully installed "FCKeditor" extension by using the below command and it went on very well:               sudo apt-get install mediawiki-extensions     sudo mwenext ParserFunctions.php      My Apache error log shows:               [Tue Mar 20 13:40:18 2012] [error] [client 172.29.35.61] PHP Warning:  require_once(/var/lib/mediawiki/extensions/MultiUpload/MultiUpload.php): failed to open stream: No such file or directory in /etc/mediawiki/LocalSettings.php on line 142     [Tue Mar 20 13:40:18 2012] [error] [client 172.29.35.61] PHP Fatal error:  require_once(): Failed opening required '/var/lib/mediawiki/extensions/MultiUpload/MultiUpload.php' (include_path='/var/lib/mediawiki:/var/lib/mediawiki/includes:/var/lib/mediawiki/languages:.:/usr/share/php:/usr/share/pear') in /etc/mediawiki/LocalSettings.php on line 142     [Tue Mar 20 13:40:19 2012] [error] [client 172.29.35.61] PHP Warning:  require_once(/var/lib/mediawiki/extensions/MultiUpload/MultiUpload.php): failed to open stream: No such file or directory in /etc/mediawiki/LocalSettings.php on line 142     [Tue Mar 20 13:40:19 2012] [error] [client 172.29.35.61] PHP Fatal error:  require_once(): Failed opening required '/var/lib/mediawiki/extensions/MultiUpload/MultiUpload.php' (include_path='/var/lib/mediawiki:/var/lib/mediawiki/includes:/var/lib/mediawiki/languages:.:/usr/share/php:/usr/share/pear') in /etc/mediawiki/LocalSettings.php on line 142      My "MultiUpload" directory shows:               total 112     drwxrwxr-x 2 2010  500  4096 2009-06-10 15:57 .     drwxr-xr-x 3 root root  4096 2012-03-20 13:38 ..     -rw-rw-r-- 1 2010  500   788 2009-06-10 15:57 multiupload.js     -rw-rw-r-- 1 2010  500  1100 2009-06-10 15:57 README     -rw-rw-r-- 1 2010  500  2942 2009-06-10 15:57 SpecialMultipleUpload.alias.php     -rw-rw-r-- 1 2010  500 13314 2009-06-10 15:57 SpecialMultipleUpload.body.php     -rw-rw-r-- 1 2010  500 70689 2009-06-10 15:57 SpecialMultipleUpload.i18n.php     -rw-rw-r-- 1 2010  500  3188 2009-06-10 15:57 SpecialMultipleUpload.php      May I know how to troubleshoot this error and get this extension working on my mediawiki? I am using Ubuntu11.04, MediaWiki 1.15.5-3.


How to get GPU acceleration working for my old PC?

I am using an old PC Pentium4 2.4Ghz with nVidia GS 7900 AGP 256MB and I would like to support the video play from GPU. As far what I have read, the support for vdpau has come for nVidida 8 series. Is there any way to support playing from GPU using mplayer?


tcpdump not capturing http or tcp/ssl traffic

I have been trying to learn `tcpdump` and I am using this command to attempt to monitor my network:               sudo tcpdump -I -i en1      But this gives me a bunch of stuff I don't want, so I used this version to filter the packets:               sudo tcpdump -I -i en1 port 80 or 443      And it gives me nothing. I know you can't use your WiFi when using monitor mode, but I still can, so I think thats a sign something is wrong. I tried it with en0, but it couldn't go into monitor mode. What am I doing wrong? I am using a MacBook Pro with OS X 10.9.3, and I would like to be able to do this with `tcpdump`, or any other utility that's built into OS X.


touch and tar from a text file

Am trying to zip a certain number of files and am stuck at below point,                  ls -lrt /lag/cnn/*/*/*/adb.tar.gz | grep -nri ABC >> sample.txt      In sample.txt i got filesNames on which i have to do touch command to extract filesNames that i need to tar.                  touch -t '<time>' first & touch -t '<time>' last       So my question is , how can i implement this touch in sample.txt to extract what i need based on time and tar those files. Whether touch command and tar command can be added to the above command using pipe or should i do it separately.


Busybox ash script does not exit cleanly after executing cat; unable to get exit code

Consider the following script `wrapcat.sh` (a wrapper for cat) for illustrative purposes. It is run with busybox (ash) in an embedded Linux 2.6 box.               #!/bin/sh     cat $1      Under certain circumstances, this script will not always exit cleanly. For instance, when I run               $./wrapcat.sh /proc/pid/cmdline      for some `pid`, I will sometimes be dropped into a shell awaiting a command. After hitting return or the like, it terminates. My diagnosis is that `cat` is interrupted by some signal, and therefore the script does not exit cleanly (as I do not set any -e option). So I am interested in the return status of the `cat` command. I modify the script as follows:               #!/bin/sh     cat $1     echo $? # echo the exit status      However, the exit status is not echoed when the script fails to exit cleanly. I'd like to know why the `$?` exit status is not echoed (and perhaps more specifically why a clean exit doesn't always happen particularly when catting `/proc/pid/cmdline`). The same also sometimes occurs when catting `/proc/pid/auxv` and `/proc/pid/environ`. Relevant function in source: http://lxr.linux.no/#linux+v2.6.31/fs/proc/base.c#L253 I don't want to necessarily know how to 'fix' this, that can probably be done by setting the aforementioned -e option. Note: you will probably not be able to reproduce this in something like Ubuntu or Debian - the phenomenon may be specific to busybox ash, cat, or embedded Linux. You can, however, simulate it by interrupting a child process `sleep` run inside a script. E.g. run a script `s.sh`:               #!/bin/sh     sleep 1000     echo $?      Then `$./s.sh`, ctrl-z, `bg`, `disown %1` to run the script in it's own process. Now in `ps` you will see something like:               15610 pts/35   00:00:00 s.sh     15611 pts/35   00:00:00 sleep      If you go ahead and run `kill -2 15611` (on the _child_ process), you observe               $ 130 # the exit status, which does get printed     command line waits for next command without clean exit


Get screenshots of a Linux machine that I connect to remotely with PuTTY

My setup is this, I connected my Cent box via PuTTY on windows 7, I've Xming and using X11forwarding to have GNOME in windows. Now when I did `gnome- screenshot` in putty, I cannot have the CentOS current Screenshot. Why is this happening? Is there any reason? Like PID is linked with screen. I get screenshot of Windows screen. I need to get CentOS screenshot, which is connected through PuTTY. ![The below image is a screenshot which is blank](http://i.stack.imgur.com/ZJ3Oo.png)


Disable the external keyboard from a script

I have a udev rule for my external keyboard. I can catch events, and by running a script I can also reach udev env variables. Can I disable keyboard with udev? Or must I use a script to disable the keyboard in another way. There is a one way to disable keyboard with script to running `xinput` but it wants an "id". How can I get the id information for `xinput` from udev? or is there another effective way? Whole trace when I monitor udev for keyboard:               KERNEL[2563.037091] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2 (usb)     ACTION=add     BUSNUM=002     DEVICE=/proc/bus/usb/002/003     DEVNAME=bus/usb/002/003     DEVNUM=003     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2     DEVTYPE=usb_device     MAJOR=189     MINOR=130     PRODUCT=1c4f/2/110     SEQNUM=1538     SUBSYSTEM=usb     TYPE=0/0/0     UDEV_LOG=3          KERNEL[2563.037837] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0 (usb)     ACTION=add     DEVICE=/proc/bus/usb/002/003     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0     DEVTYPE=usb_interface     INTERFACE=3/1/1     MODALIAS=usb:v1C4Fp0002d0110dc00dsc00dp00ic03isc01ip01     PRODUCT=1c4f/2/110     SEQNUM=1539     SUBSYSTEM=usb     TYPE=0/0/0     UDEV_LOG=3          KERNEL[2563.038023] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005 (hid)     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005     HID_ID=0003:00001C4F:00000002     HID_NAME=SIGMACH1P USB Keykoard     HID_PHYS=usb-0000:09:00.0-2/input0     MODALIAS=hid:b0003v00001C4Fp00000002     SEQNUM=1540     SUBSYSTEM=hid     UDEV_LOG=3          KERNEL[2563.040754] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17 (input)     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17     EV=120013     KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe     LED=7     MODALIAS=input:b0003v1C4Fp0002e0110-e0,1,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,F0,ram4,l0,1,2,sfw     MSC=10     NAME="SIGMACH1P USB Keykoard"     PHYS="usb-0000:09:00.0-2/input0"     PRODUCT=3/1c4f/2/110     PROP=0     SEQNUM=1541     SUBSYSTEM=input     UDEV_LOG=3     UNIQ=""          KERNEL[2563.040970] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17/event6 (input)     ACTION=add     DEVNAME=input/event6     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17/event6     MAJOR=13     MINOR=70     SEQNUM=1542     SUBSYSTEM=input     UDEV_LOG=3          KERNEL[2563.041090] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005/hidraw/hidraw2 (hidraw)     ACTION=add     DEVNAME=hidraw2     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005/hidraw/hidraw2     MAJOR=252     MINOR=2     SEQNUM=1543     SUBSYSTEM=hidraw     UDEV_LOG=3          KERNEL[2563.041168] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1 (usb)     ACTION=add     DEVICE=/proc/bus/usb/002/003     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1     DEVTYPE=usb_interface     INTERFACE=3/0/0     MODALIAS=usb:v1C4Fp0002d0110dc00dsc00dp00ic03isc00ip00     PRODUCT=1c4f/2/110     SEQNUM=1544     SUBSYSTEM=usb     TYPE=0/0/0     UDEV_LOG=3          KERNEL[2563.041309] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006 (hid)     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006     HID_ID=0003:00001C4F:00000002     HID_NAME=SIGMACH1P USB Keykoard     HID_PHYS=usb-0000:09:00.0-2/input1     MODALIAS=hid:b0003v00001C4Fp00000002     SEQNUM=1545     SUBSYSTEM=hid     UDEV_LOG=3          KERNEL[2563.044144] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18 (input)     ABS=100000000     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18     EV=1f     KEY=4837fff072ff32d bf54444600000000 1 20c100b17c000 267bfad941dfed 9e168000004400 10000002     MODALIAS=input:b0003v1C4Fp0002e0110-e0,1,2,3,4,k71,72,73,74,77,80,82,83,85,86,87,88,89,8A,8B,8C,8E,8F,90,96,98,9B,9C,9E,9F,A1,A3,A4,A5,A6,A7,A8,A9,AB,AC,AD,AE,B1,B2,B5,CE,CF,D0,D1,D2,D4,D8,D9,DB,E4,EA,EB,F1,100,161,162,166,16A,16E,172,174,176,178,179,17A,17B,17C,17D,17F,180,182,183,185,188,189,18C,18D,18E,18F,190,191,192,193,195,198,199,19A,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1B0,1B1,1B7,1BA,r6,a20,m4,lsfw     MSC=10     NAME="SIGMACH1P USB Keykoard"     PHYS="usb-0000:09:00.0-2/input1"     PRODUCT=3/1c4f/2/110     PROP=0     REL=40     SEQNUM=1546     SUBSYSTEM=input     UDEV_LOG=3     UNIQ=""          KERNEL[2563.044365] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18/event7 (input)     ACTION=add     DEVNAME=input/event7     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18/event7     MAJOR=13     MINOR=71     SEQNUM=1547     SUBSYSTEM=input     UDEV_LOG=3          KERNEL[2563.044560] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006/hidraw/hidraw3 (hidraw)     ACTION=add     DEVNAME=hidraw3     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006/hidraw/hidraw3     MAJOR=252     MINOR=3     SEQNUM=1548     SUBSYSTEM=hidraw     UDEV_LOG=3          UDEV  [2563.066401] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2 (usb)     ACTION=add     BUSNUM=002     DEVICE=/proc/bus/usb/002/003     DEVNAME=/dev/bus/usb/002/003     DEVNUM=003     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2     DEVTYPE=usb_device     ID_BUS=usb     ID_MODEL=USB_Keykoard     ID_MODEL_ENC=USB\x20Keykoard     ID_MODEL_ID=0002     ID_REVISION=0110     ID_SERIAL=SIGMACH1P_USB_Keykoard     ID_USB_INTERFACES=:030101:030000:     ID_VENDOR=SIGMACH1P     ID_VENDOR_ENC=SIGMACH1P     ID_VENDOR_ID=1c4f     MAJOR=189     MINOR=130     PRODUCT=1c4f/2/110     SEQNUM=1538     SUBSYSTEM=usb     TYPE=0/0/0     UDEV_LOG=3     USEC_INITIALIZED=2563048257          UDEV  [2563.071837] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1 (usb)     ACTION=add     DEVICE=/proc/bus/usb/002/003     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1     DEVTYPE=usb_interface     INTERFACE=3/0/0     MODALIAS=usb:v1C4Fp0002d0110dc00dsc00dp00ic03isc00ip00     PRODUCT=1c4f/2/110     SEQNUM=1544     SUBSYSTEM=usb     TYPE=0/0/0     UDEV_LOG=3     USEC_INITIALIZED=2563068334          UDEV  [2563.072377] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0 (usb)     ACTION=add     DEVICE=/proc/bus/usb/002/003     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0     DEVTYPE=usb_interface     INTERFACE=3/1/1     MODALIAS=usb:v1C4Fp0002d0110dc00dsc00dp00ic03isc01ip01     PRODUCT=1c4f/2/110     SEQNUM=1539     SUBSYSTEM=usb     TYPE=0/0/0     UDEV_LOG=3     USEC_INITIALIZED=2563068933          UDEV  [2563.079363] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005 (hid)     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005     HID_ID=0003:00001C4F:00000002     HID_NAME=SIGMACH1P USB Keykoard     HID_PHYS=usb-0000:09:00.0-2/input0     MODALIAS=hid:b0003v00001C4Fp00000002     SEQNUM=1540     SUBSYSTEM=hid     UDEV_LOG=3     USEC_INITIALIZED=2563074770          UDEV  [2563.080760] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005/hidraw/hidraw2 (hidraw)     ACTION=add     DEVNAME=/dev/hidraw2     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/0003:1C4F:0002.0005/hidraw/hidraw2     MAJOR=252     MINOR=2     SEQNUM=1543     SUBSYSTEM=hidraw     UDEV_LOG=3     USEC_INITIALIZED=2563080427          UDEV  [2563.084307] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006 (hid)     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006     HID_ID=0003:00001C4F:00000002     HID_NAME=SIGMACH1P USB Keykoard     HID_PHYS=usb-0000:09:00.0-2/input1     MODALIAS=hid:b0003v00001C4Fp00000002     SEQNUM=1545     SUBSYSTEM=hid     UDEV_LOG=3     USEC_INITIALIZED=2563073436          UDEV  [2563.085738] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006/hidraw/hidraw3 (hidraw)     ACTION=add     DEVNAME=/dev/hidraw3     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/0003:1C4F:0002.0006/hidraw/hidraw3     MAJOR=252     MINOR=3     SEQNUM=1548     SUBSYSTEM=hidraw     UDEV_LOG=3     USEC_INITIALIZED=2563085486          UDEV  [2563.238882] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18 (input)     ABS=100000000     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18     EV=1f     ID_BUS=usb     ID_INPUT=1     ID_INPUT_KEY=1     ID_MODEL=USB_Keykoard     ID_MODEL_ENC=USB\x20Keykoard     ID_MODEL_ID=0002     ID_PATH=pci-0000:09:00.0-usb-0:2:1.1     ID_PATH_TAG=pci-0000_09_00_0-usb-0_2_1_1     ID_REVISION=0110     ID_SERIAL=SIGMACH1P_USB_Keykoard     ID_TYPE=hid     ID_USB_DRIVER=usbhid     ID_USB_INTERFACES=:030101:030000:     ID_USB_INTERFACE_NUM=01     ID_VENDOR=SIGMACH1P     ID_VENDOR_ENC=SIGMACH1P     ID_VENDOR_ID=1c4f     KEY=4837fff072ff32d bf54444600000000 1 20c100b17c000 267bfad941dfed 9e168000004400 10000002     MODALIAS=input:b0003v1C4Fp0002e0110-e0,1,2,3,4,k71,72,73,74,77,80,82,83,85,86,87,88,89,8A,8B,8C,8E,8F,90,96,98,9B,9C,9E,9F,A1,A3,A4,A5,A6,A7,A8,A9,AB,AC,AD,AE,B1,B2,B5,CE,CF,D0,D1,D2,D4,D8,D9,DB,E4,EA,EB,F1,100,161,162,166,16A,16E,172,174,176,178,179,17A,17B,17C,17D,17F,180,182,183,185,188,189,18C,18D,18E,18F,190,191,192,193,195,198,199,19A,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1B0,1B1,1B7,1BA,r6,a20,m4,lsfw     MSC=10     NAME="SIGMACH1P USB Keykoard"     PHYS="usb-0000:09:00.0-2/input1"     PRODUCT=3/1c4f/2/110     PROP=0     REL=40     SEQNUM=1546     SUBSYSTEM=input     UDEV_LOG=3     UNIQ=""     USEC_INITIALIZED=2563044149          UDEV  [2563.391000] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17 (input)     ACTION=add     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17     EV=120013     ID_BUS=usb     ID_INPUT=1     ID_INPUT_KEY=1     ID_INPUT_KEYBOARD=1     ID_MODEL=USB_Keykoard     ID_MODEL_ENC=USB\x20Keykoard     ID_MODEL_ID=0002     ID_PATH=pci-0000:09:00.0-usb-0:2:1.0     ID_PATH_TAG=pci-0000_09_00_0-usb-0_2_1_0     ID_REVISION=0110     ID_SERIAL=SIGMACH1P_USB_Keykoard     ID_TYPE=hid     ID_USB_DRIVER=usbhid     ID_USB_INTERFACES=:030101:030000:     ID_USB_INTERFACE_NUM=00     ID_VENDOR=SIGMACH1P     ID_VENDOR_ENC=SIGMACH1P     ID_VENDOR_ID=1c4f     KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe     LED=7     MODALIAS=input:b0003v1C4Fp0002e0110-e0,1,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,F0,ram4,l0,1,2,sfw     MSC=10     NAME="SIGMACH1P USB Keykoard"     PHYS="usb-0000:09:00.0-2/input0"     PRODUCT=3/1c4f/2/110     PROP=0     SEQNUM=1541     SUBSYSTEM=input     UDEV_LOG=3     UNIQ=""     USEC_INITIALIZED=2563040766          UDEV  [2563.410790] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18/event7 (input)     ACTION=add     BACKSPACE=guess     DEVLINKS=/dev/input/by-id/usb-SIGMACH1P_USB_Keykoard-event-if01 /dev/input/by-path/pci-0000:09:00.0-usb-0:2:1.1-event     DEVNAME=/dev/input/event7     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.1/input/input18/event7     ID_BUS=usb     ID_INPUT=1     ID_INPUT_KEY=1     ID_MODEL=USB_Keykoard     ID_MODEL_ENC=USB\x20Keykoard     ID_MODEL_ID=0002     ID_PATH=pci-0000:09:00.0-usb-0:2:1.1     ID_PATH_TAG=pci-0000_09_00_0-usb-0_2_1_1     ID_REVISION=0110     ID_SERIAL=SIGMACH1P_USB_Keykoard     ID_TYPE=hid     ID_USB_DRIVER=usbhid     ID_USB_INTERFACES=:030101:030000:     ID_USB_INTERFACE_NUM=01     ID_VENDOR=SIGMACH1P     ID_VENDOR_ENC=SIGMACH1P     ID_VENDOR_ID=1c4f     MAJOR=13     MINOR=71     SEQNUM=1547     SUBSYSTEM=input     UDEV_LOG=3     USEC_INITIALIZED=2563239989     XKBLAYOUT=tr     XKBMODEL=pc105     XKBOPTIONS=lv3:ralt_switch          UDEV  [2563.576817] add      /devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17/event6 (input)     ACTION=add     BACKSPACE=guess     DEVLINKS=/dev/input/by-id/usb-SIGMACH1P_USB_Keykoard-event-kbd /dev/input/by-path/pci-0000:09:00.0-usb-0:2:1.0-event-kbd     DEVNAME=/dev/input/event6     DEVPATH=/devices/pci0000:00/0000:00:1c.4/0000:09:00.0/usb2/2-2/2-2:1.0/input/input17/event6     ID_BUS=usb     ID_INPUT=1     ID_INPUT_KEY=1     ID_INPUT_KEYBOARD=1     ID_MODEL=USB_Keykoard     ID_MODEL_ENC=USB\x20Keykoard     ID_MODEL_ID=0002     ID_PATH=pci-0000:09:00.0-usb-0:2:1.0     ID_PATH_TAG=pci-0000_09_00_0-usb-0_2_1_0     ID_REVISION=0110     ID_SERIAL=SIGMACH1P_USB_Keykoard     ID_TYPE=hid     ID_USB_DRIVER=usbhid     ID_USB_INTERFACES=:030101:030000:     ID_USB_INTERFACE_NUM=00     ID_VENDOR=SIGMACH1P     ID_VENDOR_ENC=SIGMACH1P     ID_VENDOR_ID=1c4f     MAJOR=13     MINOR=70     SEQNUM=1542     SUBSYSTEM=input     UDEV_LOG=3     USEC_INITIALIZED=2563392826     XKBLAYOUT=tr     XKBMODEL=pc105     XKBOPTIONS=lv3:ralt_switch      EDIT FOR SHW POST System info Distributor ID: Debian Description: Debian GNU/Linux 7.2 (wheezy) Release: 7.2 Codename: wheezy udev version 175 Unbind keyboard syslog result               Jan 16 13:47:50  acpid: input device has been disconnected, fd 13     Jan 16 13:47:51  kernel: [  694.216123] usb 1-1.3: USB disconnect, device number 17     Jan 16 13:47:51  acpid: input device has been disconnected, fd 15     Jan 16 13:47:51  kernel: [  694.507848] usb 1-1.3: new low-speed USB device number 18 using ehci_hcd     Jan 16 13:47:51  kernel: [  694.606225] usb 1-1.3: New USB device found, idVendor=1c4f, idProduct=0002     Jan 16 13:47:51  kernel: [  694.606235] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0     Jan 16 13:47:51  kernel: [  694.606242] usb 1-1.3: Product: USB Keykoard     Jan 16 13:47:51  kernel: [  694.606246] usb 1-1.3: Manufacturer: SIGMACH1P     Jan 16 13:47:51  kernel: [  694.609792] input: SIGMACH1P USB Keykoard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input57     Jan 16 13:47:51  kernel: [  694.610190] generic-usb 0003:1C4F:0002.0027: input,hidraw2: USB HID v1.10 Keyboard [SIGMACH1P USB Keykoard] on usb-0000:00:1a.0-1.3/input0     Jan 16 13:47:51  kernel: [  694.613248] input: SIGMACH1P USB Keykoard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1/input/input58     Jan 16 13:47:51  kernel: [  694.613646] generic-usb 0003:1C4F:0002.0028: input,hidraw3: USB HID v1.10 Device [SIGMACH1P USB Keykoard] on usb-0000:00:1a.0-1.3/input1     Jan 16 13:47:51  mtp-probe: checking bus 1, device 18: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3"     Jan 16 13:47:51  mtp-probe: bus: 1, device: 18 was not an MTP device


Installing and using VNC for command-line purposes on FreeBSD

I am running a VPS with FreeBSD 8.3-RELEASE-p3 This is my first time using FBSD as a server, and as a newbie I locked myself out of su by taking my user out of wheel group. I have disabled the ability to login with 'root' from SSH in order to increase the security level of my server. I know that someVPS providers provide remote console control service that allows you to see what's going on the screen while booting and everything, but mine doesn't allow that. Will installing VNC for command-line use only, keep me unworried of making mistakes like taking myself out of 'wheel' and not being able to 'su'?


How to resize logical volume to fit filesystem

How can I resize logical volume to fit filesystem automagically?


perl one liner + how to match IP address that located in the first/sec field of file

the following perl one liner syntax verify if IP address in "$IP" match the IP ADDRESS in file                    perl -ne 'BEGIN{$IP=shift} print if /(^|\s)\Q$IP\E(\s|$)/;' $IP file      file have two fields as the following example               more file               192.9.200.1  172.19.2.100     10.23.1.10   34.12.0.1     45.2.11.1    192.9.200.1     .     .     .      is it possible to define the perl syntax to match the IP that exists in the first field or the second field ? - if yes what I need to change in my syntax for that? for example ( in case we want to match only the first field )                    perl -ne 'BEGIN{$IP=shift} print if /(^|\s)\Q$IP\E(\s|$)/;' 192.9.200.1 file      then it should to match the IP - 192.9.200.1 that exists in the first field of the line:                  "192.9.200.1  172.19.2.100"


How to change hard disk spin-down time on my WD MyBook Live?

I have a 2TB Western Digital MyBook Live. It works quite well and provides a web-based administration interface. There is an option to either enable or disable power saving mode, which spins down the drive when not in use. However, there is no option to control the amount of time that must elapse before the disk spins down. This drive runs an embedded build of the Linux kernel and I was able to gain root access (via SSH) to the device. There is probably an easy way to adjust the spin down time but I haven't been able to figure out what it is. Where would I begin looking to find such an option? (Configuration files, `/proc`, etc.) I have absolutely no idea if this helps, but `/dev/md1` is mounted on `/`. I'm guessing that `/dev/md` (which does exist) is the physical disk itself?


Is "ps -ef" deprecrated?

I was doing some work on a linux and the system admin told me that `ps -ef` is deprecated though it still works. I can't seem to find any documentation towards the same. Has `ps -ef` really been deprecated?


Wireless not working on very old PC on Debian

I have this really old **PC Toshiba Pro L10** running on 512 MB on RAM. I installed Debian 32 bit lxde spin off. Everything is working well except the wireless (`no wireless extensions`). Wired network connection works. My environment is this:               $ cat /etc/debian_version     7.5     $ uname -r     3.2.0-4-686-pae     $ iwconfig     l0       no wireless extensions.     eth0     no wireless extensions.     $ apt-cache policy wireless-tools     wireless-tools:       Installed: 30~pre9-8       Candidate: 30~pre9-8       Version table:      *** 30~pre9-8 0             100 /var/lib/dpkg/status     $ lspci -v     00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, fast devsel, latency 0         Memory at <unassigned> (32-bit, prefetchable)         Capabilities: [40] Vendor Specific Information: Len=05 <?>         Kernel driver in use: agpgart-intel          00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, fast devsel, latency 0          00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, fast devsel, latency 0          00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02) (prog-if 00 [VGA controller])         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, fast devsel, latency 0, IRQ 6         Memory at e8000000 (32-bit, prefetchable) [size=128M]         Memory at e0000000 (32-bit, non-prefetchable) [size=512K]         I/O ports at 1800 [size=8]         Expansion ROM at <unassigned> [disabled]         Capabilities: [d0] Power Management version 1         Kernel driver in use: i915          00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, fast devsel, latency 0         Memory at f0000000 (32-bit, prefetchable) [size=128M]         Memory at e0080000 (32-bit, non-prefetchable) [size=512K]         Capabilities: [d0] Power Management version 1          00:1d.0 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03) (prog-if 00 [UHCI])         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 0, IRQ 6         I/O ports at 1820 [size=32]         Kernel driver in use: uhci_hcd          00:1d.1 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03) (prog-if 00 [UHCI])         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 0, IRQ 6         I/O ports at 1840 [size=32]         Kernel driver in use: uhci_hcd          00:1d.7 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03) (prog-if 20 [EHCI])         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 0, IRQ 10         Memory at e0100000 (32-bit, non-prefetchable) [size=1K]         Capabilities: [50] Power Management version 2         Capabilities: [58] Debug port: BAR=1 offset=0080         Kernel driver in use: ehci_hcd          00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83) (prog-if 00 [Normal decode])         Flags: bus master, fast devsel, latency 0         Bus: primary=00, secondary=02, subordinate=06, sec-latency=64         I/O behind bridge: 00003000-00003fff         Memory behind bridge: e0200000-e04fffff         Prefetchable memory behind bridge: 24000000-27ffffff          00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)         Flags: bus master, medium devsel, latency 0          00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03) (prog-if 8a [Master SecP PriP])         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 0, IRQ 6         I/O ports at 01f0 [size=8]         I/O ports at 03f4 [size=1]         I/O ports at 0170 [size=8]         I/O ports at 0374 [size=1]         I/O ports at 1810 [size=16]         Memory at 20000000 (32-bit, non-prefetchable) [size=1K]         Kernel driver in use: ata_piix          00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)         Subsystem: Toshiba America Info Systems Device ff31         Flags: medium devsel, IRQ 11         I/O ports at 1860 [size=32]         Kernel driver in use: i801_smbus          00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 0, IRQ 11         I/O ports at 1c00 [size=256]         I/O ports at 1880 [size=64]         Memory at e0100c00 (32-bit, non-prefetchable) [size=512]         Memory at e0100800 (32-bit, non-prefetchable) [size=256]         Capabilities: [50] Power Management version 2         Kernel driver in use: snd_intel8x0          00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03) (prog-if 00 [Generic])         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 0, IRQ 11         I/O ports at 2400 [size=256]         I/O ports at 2000 [size=128]         Capabilities: [50] Power Management version 2         Kernel driver in use: snd_intel8x0m          02:01.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 02)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 168, IRQ 10         Memory at e0400000 (32-bit, non-prefetchable) [size=4K]         Bus: primary=02, secondary=03, subordinate=06, sec-latency=176         Memory window 0: 24000000-27ffffff (prefetchable)         Memory window 1: 28000000-2bffffff         I/O window 0: 00003400-000034ff         I/O window 1: 00003000-000030ff         16-bit legacy interface ports at 0001         Kernel driver in use: yenta_cardbus          02:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)         Subsystem: Toshiba America Info Systems Device ff31         Flags: bus master, medium devsel, latency 64, IRQ 6         I/O ports at 3800 [size=256]         Memory at e0402000 (32-bit, non-prefetchable) [size=256]         Capabilities: [50] Power Management version 2         Kernel driver in use: 8139too          02:04.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)         Subsystem: Intel Corporation Device 2741         Flags: medium devsel, IRQ 11         Memory at e0401000 (32-bit, non-prefetchable) [size=4K]         Capabilities: [dc] Power Management version 2


What customizations have you done on your shell profile to increase productivity?

I know some people have some startup scripts and some people personalise the prompt. One developer uses short aliases for the long path he often visits and the frequent commands he runs. What are all the effective customization you have done on your UNIX profile to increase productivity and ease of use?


Processing bash variable with sed

Been banging my head off a wall on this bash variable LATLNG contains a latitude & longitude value in brackets like so `(53.3096,-6.28396)` I want to parse these into a variable called LAT and LON which I'm trying to do via sed like so `LAT=$(sed "s/(\\(.*\\),\\(.*\\))/\1/g" "$LATLNG")`   `LON=$(sed "s/(\\(.*\\),\\(.*\\))/\2/g" "$LATLNG")` However, I get the following error: `sed: can't read (53.3096,-6.28396): No such file or directory` I'm obviously doing something silly here but it's very late and I cant see what it is. I've tried several other variations without luck too.


Partition manager that can handle LVM?

I have been looking but neither Gparted nor KDE Partition Manager can handle LVM. Working with the command line is probably fine but it would be clearer to have a GUI tool here. Does such thing exist?


Reset running process when certain ammount of memory is consumed

I'm running a Hydra on Rasppberry PI. There were some problems with the program, but aside from these, there is a hidden memory leak in the program. The source is pretty big and really can't find the problem. Unfortunatelly, upon reaching memory limit, the program doesn't crash - instead it returns bunch of error messages. When I say bunch, I mean hundreds. ![enter image description here](http://i.stack.imgur.com/aKhd3.png) So I thought the if I can't un-allocate the memory within the program, I might need to reset whole process. **So I need to:**   1. Guard the process resource usage   2. Stop the process **gracefully** (similar to `Ctrl`+`C`, the program says " _received signal 2_ " then)   3. Start the process again I must do this until fix the program to die on errors - or not to produce them in the first place. * * * If you know hydra and you're curious about the errors I've found at least something in the code:               [ERROR] Fork for children failed: Cannot allocate memory     [ERROR] socketpair creation failed: Too many open files      The second part of the errors comes from `perror` C system function. It's sort of last error.


BURG menu error

I installed Ubuntu 10.10 recently and installed BURG (bootloader based on GRUB). However, the boot menu seems to have swapped Vista and Windows Recovery mode; so to go to Vista I need to select the 'recovery mode'. How can I fix this?


I have an environment variable for LANG set in ~/.profile but it is not getting set

I want to set the locale. I have this in my ~/.profile               #language     export LANG=en_GB.utf8     export TESTING123=en_GB.utf8      But when I type:               echo $LANG $TESTING123      I get (LANG not set, but TESTING123 is set )               en_US.utf8 en_GB.utf8      If I do `export LANG=en_GB.utf8` directly in the shell it all works               #export LANG=en_GB.utf8     #echo $LANG     en_GB.utf8     #locale     LANG=en_GB.utf8     LANGUAGE=     LC_CTYPE="en_GB.utf8"     LC_NUMERIC="en_GB.utf8"     LC_TIME="en_GB.utf8"     LC_COLLATE="en_GB.utf8"     LC_MONETARY="en_GB.utf8"     LC_MESSAGES="en_GB.utf8"     LC_PAPER="en_GB.utf8"     LC_NAME="en_GB.utf8"     LC_ADDRESS="en_GB.utf8"     LC_TELEPHONE="en_GB.utf8"     LC_MEASUREMENT="en_GB.utf8"     LC_IDENTIFICATION="en_GB.utf8"     LC_ALL=      * * * system is Debian 7.2, shell is bash.


How do I associate applications with KDE Activities? It doesn't seem obvious how it works. Are there any tricks?


How to edit command line in full screen editor in ZSH?

In bash, using vi mode, if I hit `Esc`,`v`, my current command line is opened in the editor specified by `$EDITOR` and I am able to edit it in full screen before 'saving' the command to be returned to the shell and executed. How can I achieve similar behaviour in zsh? Hitting `v` in command mode results in a bell an has no apparent effect, despite the `EDITOR` environment variable being set.


How can I check for bad blocks on an LVM physical volume?

When you're using ext4, you can check for badblocks with the command `e2fsck -c /dev/sda1 # or whatever`. This will "blacklist" the blocks by adding them to the bad block inode. What is the equivalent of this for an LVM2 physical volume? The filesystem on it is ext4, but presumably, the bad blocks that are detected will become invalid as the underlying LVM setup moves data around on the physical disk. In other words, how can I check for bad blocks to not use in LVM?


Equivalent of full control, modify and write in linux

What is the equivalent of assigning _Full control_ , _Modify_ and _Write_ permission, in Windows, to a particular user and group, in Linux? `chgrp`, `chmod` and `chown` seems quite limited in this case.


gdb-multiarch command not found

I have installed QEMU in RHEL for running the assembly programs in ARM. I have successfully installed QEMU and ARM. However, for debugging we are thinking to use GDB. I want to install the **GDB-Multiarch** in RHEL. I have installed GDB and when I run the command **GDB** I am getting the GDB shell successfully. However, I need to use the **GDB-Multiarch** and I am not able to run this command. To successfully run an assembly program, I need to execute the below command.               qemu-system-arm -S -s -M versatilepb -daemonize -m 128M -d in_asm,cpu,exec -kernel hello_world.bin ; gdb-multiarch --batch --command=hello_world.gdb      In the above command, I am getting the error as gdb-multiarch command as not found. I am really new to this environment and I would appreciate the help.


USB hard drive not recognized

My computer runs Cruncbang Linux (debian based). When I try to connect my friends external USB hard drive, it's not recognized. `sudo fdisk -l` doesn't show any new devices when I plug the USB drive in. `lsusb` does show the device. If I save the output of `ls -la /dev` to a file before and after plugging the device in. Then diff I get this `sg3`. This is the file: `crw------- 1 root root 21, 3 Sep 23 20:39 sg3` The first letter in the line is `c` which means character special file. When I tail `/var/log/syslog` and plug the USB drive in I get this output:               Sep 23 20:20:54 crunchbang kernel: [  642.116178] usb 2-4: new high-speed USB device number 7 using ehci_hcd     Sep 23 20:20:54 crunchbang kernel: [  642.250196] usb 2-4: New USB device found, idVendor=1058, idProduct=0740     Sep 23 20:20:54 crunchbang kernel: [  642.250206] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=5     Sep 23 20:20:54 crunchbang kernel: [  642.250213] usb 2-4: Product: My Passport 0740     Sep 23 20:20:54 crunchbang kernel: [  642.250219] usb 2-4: Manufacturer: Western Digital     Sep 23 20:20:54 crunchbang kernel: [  642.250225] usb 2-4: SerialNumber: 575834314136314838333937     Sep 23 20:20:54 crunchbang kernel: [  642.251082] scsi4 : usb-storage 2-4:1.0     Sep 23 20:20:54 crunchbang mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:06.1/usb2/2-4"     Sep 23 20:20:54 crunchbang mtp-probe: bus: 2, device: 7 was not an MTP device     Sep 23 20:20:54 crunchbang dbus[2208]: [system] Activating service name='org.freedesktop.UDisks' (using servicehelper)     Sep 23 20:20:54 crunchbang dbus[2208]: [system] Successfully activated service 'org.freedesktop.UDisks'     Sep 23 20:20:55 crunchbang kernel: [  643.250209] scsi 4:0:0:0: Direct-Access     WD       My Passport 0740 1003 PQ: 0 ANSI: 6     Sep 23 20:20:55 crunchbang kernel: [  643.250691] scsi 4:0:0:1: Enclosure         WD       SES Device       1003 PQ: 0 ANSI: 6     Sep 23 20:20:55 crunchbang kernel: [  643.255046] sd 4:0:0:0: Attached scsi generic sg3 type 0     Sep 23 20:20:55 crunchbang kernel: [  643.256741] scsi 4:0:0:1: Attached scsi generic sg4 type 13     Sep 23 20:21:56 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:21:57 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:21:58 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:21:59 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:22:00 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:22:01 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]     Sep 23 20:22:01 crunchbang kernel: [  643.263011] sd 4:0:0:0: [sdc] Spinning up disk.............................................................not responding...     Sep 23 20:22:02 crunchbang udevd[2788]: timeout: killing '/sbin/modprobe -b scsi:t-0x0d' [3945]      A similar question suggests to comment out MTP catch all rules. I don't know much about MTP but the link that that question points to https://bbs.archlinux.org/viewtopic.php?id=119676 suggests it has something to do with `/etc/udev/rules.d/libmtp.rules`. I don't have this file on my computer. But I do have these three:               /etc/udev/rules.d/10-vboxdrv.rules     /etc/udev/rules.d/70-persistent-cd.rules     /etc/udev/rules.d/70-persistent-net.rules      Does anyone know what the problem is here and how I might go about mounting this drive.


Extensible filesystems. AIDE vs tripwire

In my /etc directory there is something I do with files. Let us say that I am looking at /etc/passwd. What I do when it will be modified is to copy it over, in the following sense. I have a heirarchy of files: passwd, passwd_1,passwd_2,passwd_3 ... passwd_n. Before passwd is modified, I "rotate" the files ( similar to logrotate). passwd_n goes to passwd_n+1, passwd_n-1 goes to passwd_n, ... passwd_1 goes to passwd_2, passwd copies to passwd_1. Then I modify passwd. What I would like to do vis a vis a checksum program like tripwire or AIDE is to "let them know I've rotated and allow them to update the checksums but also check that the rotation has gone smoothly. Do either of there programs provide a way for specifying something like this?


Sparc Solaris - install optimised GCC 4.9, 32/64 bit?

We have a new (to us) solaris 10 box running on T4 cpus. Our software stack is Perl/Oracle based. We now have to install GCC 4.9. I wish to optimise this for the T4 CPU. I think the following configure will work:               configure --prefix=/app/org/sfw --enable-languages=c,c++ --with-cpu=niagara4      Is there anything else I need to do to get an optimised build for gcc 4.9? Any pitfalls I need to be made aware of?


Suspend-to-ram fails on Gentoo with i915

I am struggling with suspend-to-ram on my Acer Aspire V3 772G with Gentoo. My configuration:   * Gentoo 3.12.5 kernel (.config)   * /etc/portage/make.conf   * Portage world file 1) It works in Windows 7 and Linux LiveCD (Ubuntu 13.10). Therefore hardware is fine and it's not a general Linux issue, the cause must be in my Gentoo installation 2) On Gentoo it fails both in console and X (black screen after resume). In order to debug I tried the following:               dmesg > dmesg_before.ker; echo mem > /sys/power/state; dmesg > dmesg_after.ker      The results: dmesg_before.ker / dmesg_after.ker Since dmesg_after.ker was created, I can suspect BIOS resume works fine, but the graphics driver (i915) is the issue. 3) I wondered if it would work without i915 driver. Since it was built into kernel, I recompiled the kernel with the driver built as a module (new .config) and:               dmesg > dmesg_before.mod; echo mem > /sys/power/state; dmesg > dmesg_after.mod      Suprisingly, the suspend failed stopping at "Suspending console(s)" message. It was both with i915 module loaded and unloaded. Here's dmesg_before.mod. 4) I also tried other kernel versions (3.10.17, 3.12.0) and newest unstable xf86-video-intel package, but no luck, same results. I feel this is something trivial, like some kernel parameter or a package missing, but I don't know how to debug it further. Any hints? _EDIT_ : I was actually able to type `touch TEST; reboot` blindly after resume. It means that the resume is in fact successful, the only issue is that the screen remains off.


Intel wireless 7260 card is slow; eventually hangs and is unable to reconnect

I have fresh install of Debian Jessie. My WiFi controller is `Intel Corporation Wireless 7260 (rev 73)`. My WiFi works really slowly and after 5-10 minutes it just hangs. It fails to reconnect for some time. `wicd` shows the following error:               ERROR:dbus.connection:Exception in handler for D-Bus signal:     Traceback (most recent call last):       File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 230, in maybe_handle_message     self._handler(*args, **kwargs)       File "/usr/share/wicd/gtk/gui.py", line 253, in handle_connection_results     error(self.window, language[results], block=False)     KeyError: dbus.String(u'bad_pass')      I've tried `11n_disable=1` but it didn't worked


How can I launch gnome-terminal with unique titles for multiple tabs?

I've seen various posts about launching gnome-terminal with multiple tabs and the script below is working for me. That is to say, this script will launch gnome-terminal with various working directories or profiles. . .               #!/bin/sh     gnome-terminal \     --tab --working-directory=$HOME/notes  \     --tab --working-directory=$HOME/puppet \     --tab --profile=root-beamish           \     --tab --profile=odyssey                \     --tab --profile=root      ... but I'd like to set a unique title for each tab. In the case where a tab has its own profile I can change the title from within gnome-terminal with `Edit | Profiles | (NAME) | Edit | Title and Command` and then change "Initial Title" to what I want and "When terminal commands set their own titles" from "Replace initial title" to "Keep initial title". However, I'd rather not create a unique profile for every tab. I'd like a generic solution. I've tried adding `\--title='MyTitle'` but it doesn't seem to help. I'm using GNOME 2.28.2 on CentOS 6.


Why does adding a colon break this grep pattern?

I executed a search with `grep`, but it doesn't work like I expected it to. I have the following lines in a file:               blacklists/redirector/domains:needyoutube.com     lacklists/redirector/domains:openyoutube.com     blacklists/redirector/domains:proxy-youtube.com     blacklists/redirector/domains:proxytoyoutube.com     blacklists/redirector/domains:streamyoutube.com     blacklists/redirector/domains:unblockyoutube.com      When I run:               grep ':youtube.com'      I get no results. The following works:               grep 'youtube.com'      How can I escape the colon (`:`)? Backslash (grep '\:youtube.com') doesn't work. I use RHEL 5, grep (GNU grep) 2.5.1. Update: I forgot the entries I wanted to grep, these exist also:               ./blacklists/movies/domains:youtube.com     ./blacklists/movies/domains:youtube.com.br      I want to just get the fields that contain the exact domain name. So I want to get the blacklists linked to youtube.com, so I use ":youtube.com". From the list above (youtube.com, youtube.com.br), I only should get youtube.com, but I don't get anything. I wasn't clear enough, sorry.


Automounting USB sticks on Debian

I'm running Debian Squeeze on a plug computer (so SSH only, no GUI) and what I'm trying to do is get it so that when a USB stick is plugged in, it gets automatically mounted. What I've done is install `autofs` which from what I gather handles the automounting providing it knows where the device is in `/dev`. The problem is that the USB stick isn't always on the same device name. Sometime's it's `/dev/sdc1`, sometimes `/dev/sdd1`, etc. I gather that to remedy this, I need to use `udev` to ensure that the USB stick is always given the same name. I got the following info out of `udevadm`:               Udevadm info starts with the device specified by the devpath and then     walks up the chain of parent devices. It prints for every device     found, all possible attributes in the udev rules key format.     A rule to match, can be composed by the attributes of the device     and the attributes from one single parent device.            looking at device '/block/sdd/sdd1':         KERNEL=="sdd1"         SUBSYSTEM=="block"         DRIVER==""         ATTR{partition}=="1"         ATTR{start}=="63"         ATTR{size}=="129339"         ATTR{ro}=="0"         ATTR{alignment_offset}=="0"         ATTR{discard_alignment}=="0"         ATTR{stat}=="      31      244      275      190        0        0        0        0        0      190      190"         ATTR{inflight}=="       0        0"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0/8:0:0:0/block/sdd':         KERNELS=="sdd"         SUBSYSTEMS=="block"         DRIVERS==""         ATTRS{range}=="16"         ATTRS{ext_range}=="256"         ATTRS{removable}=="1"         ATTRS{ro}=="0"         ATTRS{size}=="129439"         ATTRS{alignment_offset}=="0"         ATTRS{discard_alignment}=="0"         ATTRS{capability}=="51"         ATTRS{stat}=="      56      727      783      520        0        0        0        0        0      520      520"         ATTRS{inflight}=="       0        0"         ATTRS{events}=="media_change"         ATTRS{events_async}==""         ATTRS{events_poll_msecs}=="-1"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0/8:0:0:0':         KERNELS=="8:0:0:0"         SUBSYSTEMS=="scsi"         DRIVERS=="sd"         ATTRS{device_blocked}=="0"         ATTRS{type}=="0"         ATTRS{scsi_level}=="3"         ATTRS{vendor}=="        "         ATTRS{model}=="Flash Disk      "         ATTRS{rev}=="2.00"         ATTRS{state}=="running"         ATTRS{timeout}=="30"         ATTRS{iocounterbits}=="32"         ATTRS{iorequest_cnt}=="0x90"         ATTRS{iodone_cnt}=="0x90"         ATTRS{ioerr_cnt}=="0x0"         ATTRS{modalias}=="scsi:t-0x00"         ATTRS{evt_media_change}=="0"         ATTRS{queue_depth}=="1"         ATTRS{queue_type}=="none"         ATTRS{max_sectors}=="240"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8/target8:0:0':         KERNELS=="target8:0:0"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/host8':         KERNELS=="host8"         SUBSYSTEMS=="scsi"         DRIVERS==""            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0':         KERNELS=="1-1.2:1.0"         SUBSYSTEMS=="usb"         DRIVERS=="usb-storage"         ATTRS{bInterfaceNumber}=="00"         ATTRS{bAlternateSetting}==" 0"         ATTRS{bNumEndpoints}=="02"         ATTRS{bInterfaceClass}=="08"         ATTRS{bInterfaceSubClass}=="06"         ATTRS{bInterfaceProtocol}=="50"         ATTRS{modalias}=="usb:v1976p6025d0100dc00dsc00dp00ic08isc06ip50"         ATTRS{supports_autosuspend}=="1"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2':         KERNELS=="1-1.2"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="80"         ATTRS{bMaxPower}=="100mA"         ATTRS{urbnum}=="383"         ATTRS{idVendor}=="1976"         ATTRS{idProduct}=="6025"         ATTRS{bcdDevice}=="0100"         ATTRS{bDeviceClass}=="00"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="00"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="12"         ATTRS{busnum}=="1"         ATTRS{devnum}=="11"         ATTRS{devpath}=="1.2"         ATTRS{version}==" 1.10"         ATTRS{maxchild}=="0"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"            looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1':         KERNELS=="1-1"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="e0"         ATTRS{bMaxPower}=="100mA"         ATTRS{urbnum}=="197"         ATTRS{idVendor}=="1a40"         ATTRS{idProduct}=="0101"         ATTRS{bcdDevice}=="0111"         ATTRS{bDeviceClass}=="09"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="01"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="480"         ATTRS{busnum}=="1"         ATTRS{devnum}=="2"         ATTRS{devpath}=="1"         ATTRS{version}==" 2.00"         ATTRS{maxchild}=="4"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"         ATTRS{product}=="USB 2.0 Hub"            looking at parent device '/devices/platform/orion-ehci.0/usb1':         KERNELS=="usb1"         SUBSYSTEMS=="usb"         DRIVERS=="usb"         ATTRS{configuration}==""         ATTRS{bNumInterfaces}==" 1"         ATTRS{bConfigurationValue}=="1"         ATTRS{bmAttributes}=="e0"         ATTRS{bMaxPower}=="  0mA"         ATTRS{urbnum}=="24"         ATTRS{idVendor}=="1d6b"         ATTRS{idProduct}=="0002"         ATTRS{bcdDevice}=="0206"         ATTRS{bDeviceClass}=="09"         ATTRS{bDeviceSubClass}=="00"         ATTRS{bDeviceProtocol}=="01"         ATTRS{bNumConfigurations}=="1"         ATTRS{bMaxPacketSize0}=="64"         ATTRS{speed}=="480"         ATTRS{busnum}=="1"         ATTRS{devnum}=="1"         ATTRS{devpath}=="0"         ATTRS{version}==" 2.00"         ATTRS{maxchild}=="1"         ATTRS{quirks}=="0x0"         ATTRS{avoid_reset_quirk}=="0"         ATTRS{authorized}=="1"         ATTRS{manufacturer}=="Linux 2.6.38.8 ehci_hcd"         ATTRS{product}=="Marvell Orion EHCI"         ATTRS{serial}=="orion-ehci.0"         ATTRS{authorized_default}=="1"            looking at parent device '/devices/platform/orion-ehci.0':         KERNELS=="orion-ehci.0"         SUBSYSTEMS=="platform"         DRIVERS=="orion-ehci"         ATTRS{modalias}=="platform:orion-ehci"            looking at parent device '/devices/platform':         KERNELS=="platform"         SUBSYSTEMS==""         DRIVERS==""      I've been trying to write `udev` rules to force the USB stick to take the name `/dev/usbstick` but so far I haven't been successful. Can someone help out with what rule I need to specify in my rules file to get this USB stick to always get the same name? -- Or, is there much easier way to automount the USB stick that I'm missing entirely? **UPDATE** OK so I have made some progress. I added the following rule: `SUBSYSTEMS=="scsi", ATTRS{model}=="Flash Disk ", DRIVERS=="sd", NAME="usbstick-%k" RUN+="mkdir /mnt/usbstick-%k; mount /dev/usbstick-%k /mnt/usbstick-%k"` I know this still needs some work in terms of handling add/remove, but it's just a basic test for now. The effect of this is that I now manage to get three new device nodes in `/dev`, namely `/dev/usbstick-sdc`, `/dev/usbstick-sdc1` and `usbstick-sg2`. However, what I've found is that the code in the `RUN` section only executes once and just makes a directory `mnt/usbstick-sdc`. I've also found that the directory is always empty, so something is clearly still going wrong! (although I'm making progress).


Debian Wheezy, VirtualBox, HP DV6-7099EL problem with AltGr

I just bought a HP DV6-7099EL laptop (Italian keyboard). I'm going to install Debian in a week or two, I just want to test the computer without touching the partitions (just in case I need support/assistance for hardware problems in the first period). But Debian it's my main system and I need it for work, so I installed it in VirtualBox. And the problem is this: before launching X11, my `AltGr` works in the right way (i.e. it allows me to enter `@` `#` `[` `]` `{` `}`), but in X (I tried XFCE, FluxBox, KDE) it stops working, it simply does nothing:   * `AltGr` + `ò` = `ò` (instead of `@`)   * `AltGr` + `à` = `à` (instead of `#`) Using `xev` I found that the code of `AltGr` is 108, so I tried to modify the keymapping creating `~/.Xmodmap` but `AltGr` behaviour was even weirder:   * `AltGr` + `ò` = nothing   * `AltGr` + `à` = `#` and carriage return   * `AltGr` + `è` = nothing (instead of `[`)   * `AltGr` + `+` = sometimes gives `]` (which is right), sometimes nothing. BTW, under Windows the key behaves perfectly as expected. **Edit:** Following the advice of trying and experimenting with a Debian live, I managed to have my AltGr working (even in virtualbox) with these commands:               clear mod1     clear mod3     clear mod5     keycode 108 = Alt_R     keysym Alt_R = ISO_Level3_Shift     add mod3 = ISO_Level3Shift      Perhaps the three clear are too many, but at the moment it seems working, and the output of `$ xmodmap -pm` shows that `ISO_Level3_Shift` has only the `mod3` modifier. On the net almost everyone says that `AltGr` is recognized by Xorg as `Mode_switch`, but here I found out that the right name is `ISO_Level3_Shift` (or so it seems, empirically). Now I'm too much tired, I go to bed. Thank you again jasonwryan and terdon :-)


Converting Linux into a Router- Traffic from eth0:0 to eth0

So I have been trying to convert my linux box which is running Mint into an router. eth0 has a public address that has 71.xx.xx.xx for an IP addr. I created an eth0:0 and set it an IP address , 10.0.0.100. I started a DHCP server that is on eth0 ( because it wont use eth0:0) and that's giving out addresses between 10.0.0.101 and 10.0.0.200. I can ping between eth0 and eth0:0 on the same machine. I have a another laptop connected to the linux via a switch and its able to receive an ip addr via the DHCP server. Problem is how do I route traffic from and to eth0:0 to eth0 and vice versa so that computers on the private network that is 10.0.0.x can access internet via the static IP on eth0. Need help..


Using startx on Fedora 17, a non-root user cannot join new wireless networks -- how to fix?

I have Fedora 17 installed on a Lenovo X230, and if I leave it configured to boot into Gnome using systemd's runlevel5.target (or graphical.target), which is the default, networking seems to work just fine -- a local user can join a new wireless network, authenticating and saving a network password as needed. So far, so good. However, this laptop's owner prefers to boot into a non-graphical display (systemd's runlevel3.target or multi-user.target); when desired, he runs `startx` to get Gnome started. When Gnome is started this way, the user cannot join any new wireless network; you can select the desired SSID from the drop- down list, but no prompt for network password appears, and no connection is made. I don't see anything relevant logged in /var/log/messages. What can be done, so that a non-privileged user who has started Gnome using `startx` can be allowed to join new wireless networks? _**Notes:_** If root logs in, starts Gnome, and joins the new wireless network, then appropriate new files are created under /etc/sysconfig/network-scripts for the network and key information. Once this is done, the non-root user can use the wireless network when he logs in. This workaround is horribly inconvenient. The user is already a member of group 'wheel' and has full sudo access without password. SELinux is disabled on this machine. As a test, I added the user to group 'root', and made /etc/sysconfig/network- scripts group-writable. This didn't help or change anything.