title: How to fix frequent crashes of openshot?

text: I have been using the `openshot` video editing software for some time on Ubuntu 13.10, which does not run stable for me. I would like to know if I can do something to stabilize it, so I can actually use it for video editing... The version used is 1.4.3, and below I post a recent backtrace. Maybe the crashes are related to some other libraries, so if you need to extra information please provide a way how to get this information.               *** Error in `/usr/bin/python': double free or corruption (fasttop): 0x000000000370c920 ***     ======= Backtrace: =========     /lib/x86_64-linux-gnu/libc.so.6(+0x80996)[0x7ff8c2ed7996]     /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(gdk_region_union+0x97)[0x7ff8bfeaf487]     /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(+0x3cb7d)[0x7ff8bfeb9b7d]     /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x23d090)[0x7ff8c036c090]     /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x242a1c)[0x7ff8c0371a1c]     /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_widget_queue_resize+0x68)[0x7ff8c0371ab8]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_cclosure_marshal_VOID__OBJECTv+0x77)[0x7ff8c0e27257]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x103b7)[0x7ff8c0e243b7]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x442)[0x7ff8c0e3ce82]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7ff8c0e3dae2]     /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x242f45)[0x7ff8c0371f45]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_run_dispose+0x60)[0x7ff8c0e2a8a0]     /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x1f1eb5)[0x7ff8c0320eb5]     /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x1f2668)[0x7ff8c0321668]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_closure_invoke+0x138)[0x7ff8c0e24188]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x21337)[0x7ff8c0e35337]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0xde9)[0x7ff8c0e3d829]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7ff8c0e3dae2]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x14505)[0x7ff8c0e28505]     /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_notify+0x16b)[0x7ff8c0e2aabb]     /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so(+0x148730)[0x7ff8c08b3730]     /usr/bin/python(PyEval_EvalFrameEx+0x435)[0x561125]     /usr/bin/python(PyEval_EvalFrameEx+0xc9a)[0x56198a]     /usr/bin/python(PyEval_EvalFrameEx+0xc9a)[0x56198a]     /usr/bin/python(PyEval_EvalFrameEx+0xc9a)[0x56198a]     /usr/bin/python[0x556cea]     /usr/bin/python[0x4b5164]     /usr/bin/python(PyEval_CallObjectWithKeywords+0x6b)[0x4d997b]     /usr/bin/python[0x584b42]     /lib/x86_64-linux-gnu/libpthread.so.0(+0x7f6e)[0x7ff8c3226f6e]     /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff8c2f519cd]     ======= Memory map: ========     00400000-006ba000 r-xp 00000000 08:07 4201204                            /usr/bin/python2.7     008b9000-008ba000 r--p 002b9000 08:07 4201204                            /usr/bin/python2.7     008ba000-0092e000 rw-p 002ba000 08:07 4201204                            /usr/bin/python2.7     0092e000-00941000 rw-p 00000000 00:00 0      01dbe000-047b3000 rw-p 00000000 00:00 0                                  [heap]     7ff850000000-7ff8503c2000 rw-p 00000000 00:00 0      7ff8503c2000-7ff854000000 ---p 00000000 00:00 0      7ff856ffe000-7ff856fff000 ---p 00000000 00:00 0      7ff856fff000-7ff8577ff000 rw-p 00000000 00:00 0                          [stack:6260]     7ff8577ff000-7ff857800000 ---p 00000000 00:00 0      7ff857800000-7ff858000000 rw-p 00000000 00:00 0                          [stack:6261]     7ff858000000-7ff85822b000 rw-p 00000000 00:00 0      7ff85822b000-7ff85c000000 ---p 00000000 00:00 0      7ff85c000000-7ff85c3ab000 rw-p 00000000 00:00 0      7ff85c3ab000-7ff860000000 ---p 00000000 00:00 0      7ff860000000-7ff86022c000 rw-p 00000000 00:00 0      7ff86022c000-7ff864000000 ---p 00000000 00:00 0      7ff864000000-7ff86408e000 rw-p 00000000 00:00 0      7ff86408e000-7ff868000000 ---p 00000000 00:00 0      7ff868000000-7ff869f03000 rw-p 00000000 00:00 0      7ff869f03000-7ff86c000000 ---p 00000000 00:00 0      7ff86dffb000-7ff86dffc000 ---p 00000000 00:00 0      7ff86dffc000-7ff86e7fc000 rw-p 00000000 00:00 0                          [stack:6238]     7ff86e7fc000-7ff86e7fd000 ---p 00000000 00:00 0      7ff86e7fd000-7ff86effd000 rw-p 00000000 00:00 0                          [stack:6237]     7ff86effd000-7ff86effe000 ---p 00000000 00:00 0      7ff86effe000-7ff86f7fe000 rw-p 00000000 00:00 0                          [stack:6232]     7ff86f7fe000-7ff86f7ff000 ---p 00000000 00:00 0      7ff86f7ff000-7ff86ffff000 rw-p 00000000 00:00 0                          [stack:6262]     7ff86ffff000-7ff874000000 rw-s 00000000 00:14 154498                     /run/shm/pulse-shm-2289669443     7ff874000000-7ff874450000 rw-p 00000000 00:00 0      7ff874450000-7ff878000000 ---p 00000000 00:00 0      7ff878000000-7ff878198000 rw-p 00000000 00:00 0      7ff878198000-7ff87c000000 ---p 00000000 00:00 0      7ff87c000000-7ff87c021000 rw-p 00000000 00:00 0      7ff87c021000-7ff880000000 ---p 00000000 00:00 0      7ff880758000-7ff88080d000 r--p 00000000 08:07 5243501                    /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf     7ff880b01000-7ff88158f000 rw-p 00000000 00:00 0      7ff88158f000-7ff881590000 ---p 00000000 00:00 0      7ff881590000-7ff882094000 rw-p 00000000 00:00 0                          [stack:6233]     7ff882094000-7ff882095000 ---p 00000000 00:00 0      7ff882095000-7ff882895000 rw-p 00000000 00:00 0                          [stack:6263]     7ff882895000-7ff8828f5000 rw-s 00000000 00:04 7503895                    /SYSV00000000 (deleted)     7ff8828f5000-7ff882ffe000 rw-p 00000000 00:00 0      7ff8837ff000-7ff883800000 ---p 00000000 00:00 0      7ff883800000-7ff884000000 rw-p 00000000 00:00 0                          [stack:6223]     7ff884000000-7ff88409f000 rw-p 00000000 00:00 0      7ff88409f000-7ff888000000 ---p 00000000 00:00 0      7ff888000000-7ff888231000 rw-p 00000000 00:00 0      7ff888231000-7ff88c000000 ---p 00000000 00:00 0      7ff88c000000-7ff88c021000 rw-p 00000000 00:00 0      7ff88c021000-7ff890000000 ---p 00000000 00:00 0      7ff89003c000-7ff8901de000 rw-s 00000000 00:04 7634961                    /SYSV00000000 (deleted)     7ff89095f000-7ff8909df000 rw-s 00000000 00:04 10387474                   /SYSV00000000 (deleted)     7ff8909df000-7ff890ae0000 rw-p 00000000 00:00 0      7ff890ae0000-7ff890ae1000 ---p 00000000 00:00 0      7ff890ae1000-7ff8912e1000 rw-p 00000000 00:00 0                          [stack:6220]     7ff8912e1000-7ff891341000 rw-s 00000000 00:04 7340048                    /SYSV00000000 (deleted)     7ff891341000-7ff891353000 r-xp 00000000 08:07 4590283                    /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so     7ff891353000-7ff891552000 ---p 00012000 08:07 4590283                    /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so     7ff891552000-7ff891554000 r--p 00011000 08:07 4590283                    /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so     7ff891554000-7ff891555000 rw-p 00013000 08:07 4590283                    /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so     7ff891555000-7ff89157a000 r-xp 00000000 08:07 4589183                    /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so     7ff89157a000-7ff89177a000 ---p 00025000 08:07 4589183                    /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so     7ff89177a000-7ff89177f000 r--p 00025000 08:07 4589183                    /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so     7ff89177f000-7ff891780000 rw-p 0002a000 08:07 4589183                    /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so     [3]+  Aborted                 (core dumped) openshot


title: High varying discharge rate

text: I got an Asus N76VB notebook. On Windows I can easily stay on battery for 3-4 hours in powersave mode, but on Linux (first Ubuntu 14.04, currently Fedora 20) the battery's discharge rate varies from 10 watt to 40 watt (~25 watt mean) on powersave mode with backlight on the lowest possible value, resulting in 1-2 hours of battery life. I've tried:   * Installing Bumblebee (with nVidia drivers)   * Installing TLP (with most powersaving configuration)   * Enable all tunables in powertop (already done by TLP) Powertop shows the following: ![powertop](http://i.stack.imgur.com/JvERD.png) I've no idea of any other causes of the high discharge rate. What's an average discharge rate? Currently I've only opened a terminal and Google Chrome window with this page and a YouTube video, on a almost clean Fedora installation, but it also happens with Firefox or without YouTube video. Any help would be appreciated!


title: Is building Perl an inside joke or is it supposed to require this many `make` invocations?

text: So I am building Perl version 5.18.2 from source on an ARMv7 processor right now, a Krait on the Snapdragon S4, and I am not too sure how much support there is for such an architecture. By the way, I am trying to build an LFS system. The thing is for two days I have been stuck at Perl. I tried different users, as root, with CFLAGS, without CFLAGS, Debian source versions 5.16 and 5.18 and I always got stuck at a particular build step. So this last time around I decided to pay attention to that message that says,               ==> Your Makefile has been rebuilt. <==     ==> Please rerun the make command.  <==      or something like that. So I made a little for loop...               RET=$?; for i in `seq 10`; do if [ ! $RET -eq 0 ]; then echo " \          RETURN ${i} == ${RET} \          " && make; RET=$?; fi; done      ... I started with seq 3, and sure enough after each one it _seems_ to be making progress along the build. That is, it fails at a different step and when I check the log I see that the last step it failed at succeeded and I see the same message:               ==> Your Makefile has been rebuilt. <==     ==> Please rerun the make command.  <==      I skimmed over the build instructions at CPAN and didn't see any references, or anything indicating I should expect to go through this, so it begs the question. Is this some sort of inside joke, or am I doing something terribly wrong?


title: How to upload a file from Windows to Linux?

text: I'm using Windows. I want to upload a file to Amazon server using `putty` from my Windows system.   * How to do this using `scp` or any other command?   * How do I download a file from the Amazon server to my Windows system?


title: What are the two head.S files in linux source ?

text: In the linux source there are two different head.S files located at: arch/arm/kernel/head.S arch/arm/boot/compressed/head.S What is the puprpose of each one and what is the order of there execution ?


title: vim/gvim failing to put X11 clipboard in registers "+ or "*?

text: Due to the lack of security with standard vino server, I switched to use x11vnc on my linux (with Xubuntu 14.04) box and SSVNC on the windows side. With vino, cut and paste from windows to Linux and windows, in the two directions, was flaky(1) but when it worked, it worked for every program; I could use the `vim` register `"+` without problem. I run(2)               autocutsel -fork       normally so that the "middle click" and ctrl-c/v selections are the same. Now that I use x11vnc (called with: `x11vnc -forever -repeat -safer -usepw -ssl -autoport 6000`) to have a safe, encrypted connection, a problem arose:   1. I can copy on windows and paste in the remote linux terminals, libreoffice etc. without any problem, in both directions.    2. In `vim`, or `gvim`, any attempt to paste with `"+p` or `"*p` says `E353: Nothing in register *`   3. Again in `vim` or `gvim`, the other way around does work: if I `"+yy` then I can paste the thing on the Windows side.  As anyone any clue about this problem? The strange thing is that paste works everywhere I checked but in `vim`...               Package                 Installed       Previous        Now             State     =======================-===============-===============-===============-=====     vim                     2:7.4.052-1ubuntu3  2:7.4.052-1ubuntu3  2:7.4.052-1ubuntu3  install     vim-gnome               2:7.4.052-1ubuntu3  2:7.4.052-1ubuntu3  2:7.4.052-1ubuntu3  install      _Footnotes:_ (1) can't find the bug now --- it is reported. It stops working after a while. (2) I tried with and without. No changes.


title: "No target" error using Make

text: I'm learning how to use `make` and makefiles, so I wrote this little file:               %.markdown: %.html         pandoc -o $< $@      But when I run `make`, all I get is `make: *** No targets. Stop.` What's going on?


title: Why doesn't mount respect the read only option for bind mounts?

text: On my Arch Linux system (Linux Kernel 3.14.2) bind mounts do not respect the read only option               # mkdir test     # mount --bind -o ro test/ /mnt     # touch /mnt/foo      creates the file `/mnt/foo`. The relevant entry in `/proc/mounts` is               /dev/sda2 /mnt ext4 rw,noatime,data=ordered 0 0      The mount options do not match my requested options, but do match both the read/write behaviour of the bind mount and the options used to originally mount `/dev/sda2` on `/`               /dev/sda2 / ext4 rw,noatime,data=ordered 0 0      If, however, I remount the mount then it respects the read only option               # mount --bind -o remount,ro test/ /mnt     # touch /mnt/bar     touch: cannot touch ‘/mnt/bar’: Read-only file system      and the relevant entry in `/proc/mounts/`               /dev/sda2 /mnt ext4 ro,relatime,data=ordered 0 0      looks like what I might expect (although in truth I would expect to see the full path of the `test` directory). The entry in `/proc/mounts/` for the orignal mount of `/dev/sda2/` on `/` is also unchanged and remains read/write               /dev/sda2 / ext4 rw,noatime,data=ordered 0 0      This behaviour and the work around have been known since at least 2008 and are documented in the man page of `mount` > Note that the filesystem mount options will remain the same as those on the > original mount point, and cannot be changed by passing the -o option along > with --bind/--rbind. The mount options can be changed by a separate remount > command Not all distributions behave the same. Arch seems to silently fail to respect the options while Debian generates a warning when the bind mount does not get mount read-only               mount: warning: /mnt seems to be mounted read-write.      There are reports that this behaviour was "fixed" in Debian Lenny and Squeeze although it does not appear to be a universal fix nor does it still work in Debian Wheezy. What is the difficultly associated with making bind mount respect the read only option on the initial mount?


title: Unable to copy that prior version to newer version

text: # in bash     shopt -s extglob     cd /oc/txa/db/     dirs=$(echo $(ls [1-9]*([0-9])_[0-9] | sort -rn | head -n 2))     # if there are no other files and directories you can use "ls |" in the line above     newer="${dirs% *}"     prior="${dirs#* }"     test -z "$newer" && exit 1     test -z "$prior" && exit 1     cp -p "${prior}/mit.sas" "$newer"/      Result: `cp: cannot access 15_1:/mit.sas: No such file or directory`. Here in this script problem will rise has `15_1:/mit.sas`. Actually will need as `15_1/mit.sas`. Please make a quick view in this script. And suggest where should change the exact script. Is it possible to write this script at ksh?


title: How to give Read, Write Permissions using IPs in SAMBA

text: I want to give Read and Write access based on the IPs instead of the Users in SAMBA using smb.conf This is the Text I copied from my smb.conf file.               [TEST]             comment = test             path = /mnt/vg-stg/storage/test             read only = no             writeable = yes             oplocks = yes             level2 oplocks = yes             force security mode = 0             dos filemode = yes             dos filetime resolution = yes             dos filetimes = yes             fake directory create times = no        browseable = yes        csc policy = manual        veto oplock files = /*.mdb/*.MDB/*.dbf/*.DBF/        veto files = /*:Zone.Identifier:*/        store dos attributes = yes        map acl inherit = yes             create mode = 0777             directory mode = 2777             printable = no             guest ok = yes             hosts allow = 10.20.20.213             #hosts readonly allow =          [TEST]             comment = test             path = /mnt/vg-stg/storage/test             read only = yes             writeable = no             oplocks = yes             level2 oplocks = yes             force security mode = 0             dos filemode = yes             dos filetime resolution = yes             dos filetimes = yes             fake directory create times = no        browseable = yes        csc policy = manual        veto oplock files = /*.mdb/*.MDB/*.dbf/*.DBF/        veto files = /*:Zone.Identifier:*/        store dos attributes = yes        map acl inherit = yes             create mode = 0777             directory mode = 2777             printable = no             guest ok = yes             hosts allow = 10.20.20.147             #hosts readonly allow =      But the Samba is not picking up the changes. Because when i try to access from explorer or Nautilus it is giving me error               Could not display "smb://XXX.XXX.XXX.XXX/Reports     The file is of an unknown type      Please give me advice what im doing wrong here


title: Routing 4 Networks

text: I've been trying for almost a week to make it work but without success. I'm starting to feel hopeless. I have 4 Ethernet adapters :               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN         link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo         inet6 ::1/128 scope host            valid_lft forever preferred_lft forever     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 30:85:a9:ad:54:1e brd ff:ff:ff:ff:ff:ff         inet 10.100.36.2/29 brd 10.100.36.7 scope global eth0         inet6 fe80::3285:a9ff:fead:541e/64 scope link            valid_lft forever preferred_lft forever     3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether a0:f3:c1:04:64:40 brd ff:ff:ff:ff:ff:ff         inet 69.70.164.242/30 brd 69.70.164.243 scope global eth1         inet6 fe80::a2f3:c1ff:fe04:6440/64 scope link            valid_lft forever preferred_lft forever     4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether a0:f3:c1:04:a0:2f brd ff:ff:ff:ff:ff:ff         inet 10.45.13.1/24 brd 10.45.13.255 scope global eth2         inet6 fe80::a2f3:c1ff:fe04:a02f/64 scope link            valid_lft forever preferred_lft forever     5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 28:10:7b:c9:58:76 brd ff:ff:ff:ff:ff:ff         inet 10.45.15.1/24 brd 10.45.15.255 scope global eth3         inet6 fe80::2a10:7bff:fec9:5876/64 scope link            valid_lft forever preferred_lft forever      This is the default route my linux server (Debian) give me at startup :               69.70.164.240/30 dev eth1  proto kernel  scope link  src 69.70.164.242     10.100.36.0/29 dev eth0  proto kernel  scope link  src 10.100.36.2     10.45.15.0/24 dev eth3  proto kernel  scope link  src 10.45.15.1     10.45.13.0/24 dev eth2  proto kernel  scope link  src 10.45.13.1     default via 10.45.15.254 dev eth3     default via 10.45.13.254 dev eth2     default via 69.70.164.241 dev eth1     default via 10.100.36.1 dev eth0      Here's what I want to do. eth0 is my VDSL line and eth1 is my cable line. I want to:   * Forward all traffic from `10.45.13.0` (eth2) to the gateway `10.100.36.1` (eth0)   * Forward all traffic from `10.45.15.0` (eth3) to the gateway `69.70.164.241` (eth1) If I make this work, I would be happy enough but I would also like to make `10.45.13.0` invisible from `10.45.15.0` and vice-versa.


title: How does killproc knows what PID to kill?

text: When I look at my `/etc/rc.d/init.d/functions`, I see the following under my `killproc()` function.                       if [ -n "${LSB:-}" -a -n "$killlevel" ]; then                     RC=7 # Program is not running             else                     failure $"$base shutdown"                     RC=0             fi      The problem is that I have to set my `/etc/init.d/<prog>` script to call with the following.               killproc -p /jail/var/run/prog.pid      Instead of the following.               killproc prog      When I trace through the `killproc()` function it brought me to the above if statement, whenever I don't supply the `-p <PID file>` option. Can someone let me know what that if statement does as I don't know what the LSB is for.


title: How to create customized xsession in RHEL 6?

text: I want to create a customized xsession so that it should run at a time only one application without any desktop in RHEL 6


title: SPSS temp directory space issue

text: I am trying to import a table data into _SPSS Statistics Server_ , but due to space constraints in the _temp_ directory location I am not able to facilitate the data import. I need to either increase the temp directory size or change the temp directory location thereby having sufficient space for SPSS processing. How can I change the location of _Temp_ directory to a desired location in the server without changing any configuration file settings?


title: How can I know if a network is password-protected before connecting to it?

text: What command can I run to determine the security of a wireless network, without needing to connect to it? I want to know if it needs a password to connect or if it's a public network without security. I'm mostly concerned with Ubuntu.


title: Empty desktop after installing xrdp on Centos 6.5 with XFCE as window manager

text: I followed the directions to install xRDP from this site (http://ajmatson.net/wordpress/2014/01/install-xrdp-remote-desktop-to- centos-6-5/) When I RDP from Windows -> Linux, I successfully enter username/password, but then I get an empty desktop. It shows the desktop wallpaper (not actually my wallpaper either -- looks like the default wallpaper for XFCE/CentOS) I'm not sure what I should be seeing at this point. It doesn't matter if I am already logged in interactively or not. (BTW -- Should I be seeing a new desktop or the same one that I'm logged in with? I imagine that is configurable anyhow.) **UPDATE:** I confirmed that I am indeed seeing Gnome (The `gnome-session` command is running) when I login to XRDP instead of `startxfce4`. From some searching around, this may be realated to to be a bug in Centos 6.5 wherein CentOS had some code changed that normally would have read from the user's `.xsession` or `.Xclients` file. However, I compared the 6.4 and the 6.5 file and I'm not seeing a difference. Furthermore, this doesn't entirely explain everything. It's probably OK if Gnome runs instead of XFCE, but why no panels, menus, can't right click, etc? I experimented with making adjustments to files like the `startwm.sh` file and the scripts in `xinit`. This yielded some fruit -- I was able to see a new XFCE desktop, but the adjustments I made seem to be incomplete because the .bashrc file and related scripts failed to execute and it feels hacky.


title: bind the MAC with IP address?

text: I have configured a DHCP server on Linux. My goal is to map client IP address with their MAC address in such a way that no "unregistered" client machine gets a response from the DHCP server. That is, I would like to give them Internet access one by one through IP and MAC binding.


title: Is there any harm in using variables that aren't set?

text: Say I have the following code:               # Check if the color prompt is enabled and supported on this system     if [ -n "$force_color_prompt" ] && [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then         GREEN="\033[1;32m"         DIM="\033[2m"         RESET="\033[00m"     fi          echo -e "Oh, ${GREEN}green${RESET} world, ${DIM}don't desert me now...${RESET}"      If color support is enabled, it will echo out a pretty, colored line. If color support isn't enabled, values like `${GREEN}` will not have been set, and the text will print out in the usual white with black background. The code relies on the fact that variables that aren't set will simply evaluate to an empty string (which in my tests, they do). Will this cause bugs or problems on some systems, or will all non-existent variables _always_ evaluate to an empty string? Is there any reason I shouldn't rely on this mechanic?


title: Inserting a line in a file only if this line isn't yet part the file

text: Total newbie to shell scripting, I am searching to create a script to automatically apply some custom configuration to text based configuration files. In the present case, I am searching to add 2 line to `/etc/sysctl.conf` if these line are not yet in the file (to avoid having multiple occurrence of these line in the file). here is the script I use :               if [ `grep vm.swappiness /etc/sysctl.conf` != "vm.swappiness=5" ]; then     echo vm.vfs_cache_pressure=50 | sudo tee -a /etc/sysctl.conf     fi     if [ `grep vm.vfs_cache_pressure /etc/sysctl.conf` != "vm.vfs_cache_pressure=50" ]; then     echo vm.vfs_cache_pressure=50 | sudo tee -a /etc/sysctl.conf     fi      and the error I get :               /home/erwan/Workspace/Install.sh: ligne 19 : [: != : opérateur unaire attendu     /home/erwan/Workspace/Install.sh: ligne 23 : [: != : opérateur unaire attendu      What am I doing wrong?


title: Chromium webrowser can't be installed in tinycore 5.3.19

text: I'm working with tinycore-5.3.19 in an x86 architecture. I've tried to install a browser using the Apps. Browser. I've selected as remote extension `chromium-browser.tcz`. "OnBoot": Details:   * Title: chrmoimum-browser.tcz   * version: 23.0.1271.64   * original-site::http://code.google.com/chromium/   * size:44m But it fails to install. The status message is: > chromium-broser.tcz Failed. No more Info to guess which is the problem. ### Questions   * Has anyone tried to install this extension?    * Someone could, please, tell me which may be the problem? ### EDIT #1: New information If I try to install it in tinycorelinux 3.8.4, `chromium-browser.tcz` tries to install, but it gives me this error: > mount: mounting /dev/loop5 on /tmp/tcploop/glib2 failed: invalid argument. And if I try to install and download `glib2.tcz` the new error is: > Error in glib2.tcz **EDIT #2: New information** I've been suggested to better follow this tutorial: http://distro.ibiblio.org/tinycorelinux/book.html Maybe it's useful for anybody else in trouble with tinycore. Regards


title: How do I hide packages from appearing in apt system?

text: The list of uninstalled packages appearing in my `aptitude` is massive, but is full of packages that I'm very sure I will never ever install. E.g. my laptop is using intel graphics, so it doesn't make sense to install `xserver-xorg- video-nouveau`. Therefore I want to hide it forever. This is important while listing using `!~i!~v`, as it shows all packages available for installation (I still need to know the filter for packages with dependencies marked UNAVAILABLE), so if I can hide them, it's easier to find packages that I haven't tried out. How do I make it so, if possible, for the whole apt database to ignore the uninteresting packages?


title: index.html is not working in apache document root

text: I have got Ubuntu 12.04. I have a file `index.html` in apache'd document root but apache lists all the files when I access the document root from the browser. It works fine if I replace `index.html` by `index.php`. My `/etc/apache2/sites-enabled/000-default`:               <VirtualHost *:80>         ServerAdmin webmaster@localhost          DocumentRoot /home/test/www     <Directory /home/test/www/>             Options Indexes FollowSymLinks MultiViews             AllowOverride All             Order allow,deny             allow from all         </Directory>                        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/         <Directory "/usr/lib/cgi-bin">             AllowOverride None             Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch             Order allow,deny             Allow from all         </Directory>              ErrorLog ${APACHE_LOG_DIR}/error.log              # Possible values include: debug, info, notice, warn, error, crit,         # alert, emerg.         LogLevel warn              CustomLog ${APACHE_LOG_DIR}/access.log combined              Alias /doc/ "/usr/share/doc/"         <Directory "/usr/share/doc/">             Options   MultiViews FollowSymLinks             AllowOverride None             Order deny,allow             Deny from all             Allow from 127.0.0.0/255.0.0.0 ::1/128         </Directory>          </VirtualHost>      I have `/etc/apache2/mods-enabled/dir.conf`:               <IfModule mod_dir.c>                    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm          </IfModule>      I did lot of searching but don't know my why `index.html` is not working and is getting listed in the browser. If I keep both the files (index.html and index.php), then index.php works fine. Here is the output of `ls -l /home/test/www`:               total 1816236     -rw-r--r--  1 root   www-data          3 Jun  3 10:09 index.html     -rw-r--r--  1 ubuntu www-data         53 Mar  4 16:55 index.php     drwxrwsr-x  5 ubuntu www-data       4096 May 12 05:03 lifetimeholidays     -rw-r--r--  1 root   www-data 1859796992 May 29 10:32 magentolive17_4_2014.zip     drwxrwsr-x 15 ubuntu www-data       4096 May 28 15:22 railsapp     drwxr-sr-x 15 root   www-data       4096 May 28 17:15 railsapp1     drwxrwxr-x  2 ubuntu www-data       4096 Apr 29 09:05 var


When we attempt to use tar to write data to an LTO-5 tape, we get the following error. The device starts to write, and then fails. See the tar command and output, followed by the dmesg output. I included the mt status as well. Any help is appreciated. This is an Ultrium 3280 LTO5 drive connected through a SAS interface on RHEL 6. We tried a second drive, and second tape. These are brand new tapes, and new drives. Both of the following commands run without any issues.               sudo mt -f /dev/st0 stsetoptions scsi2logical     sudo mt -f /dev/st0 erase      `mt status` provides the following               sudo mt -f /dev/st0 status     SCSI 2 tape drive: File number=0, block number=0, partition=0.     Tape block size 0 bytes.     Density code 0x58 (no translation).     Soft error count since last status=0     General status bits on (41010000): BOT ONLINE IM_REP_EN      When we attempt to write some output to the drive, we get the following. The device acts as if it is writing, lights start flashing and starts making noise.               sudo tar cvf /dev/st0 /vader     tar: Removing leading `/' from member names     /vader/     /vader/data0905a-data0906/     /vader/data0905a-data0906/data0905a-FINAL/     /vader/data0905a-data0906/data0905a-FINAL/data0905a.trk     /vader/data0905a-data0906/data0905a-FINAL/plots/     /vader/data0905a-data0906/data0905a-FINAL/plots/0905A_trak.ps     /vader/data0905a-data0906/data0905a-FINAL/plots/0905A_trak.jpg     /vader/data0905a-data0906/data0905a-FINAL/das/     /vader/data0905a-data0906/data0905a-FINAL/das/uw/     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905tmp.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905nud.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905das.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905wnc.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905bdp.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905vp1.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905rv1.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905tsg.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905co2.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905guv.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905ng1.tar     /vader/data0905a-data0906/data0905a-FINAL/das/uw/0905wx1.tar     /vader/data0905a-data0906/data0905a-FINAL/dcp/     /vader/data0905a-data0906/data0905a-FINAL/dcp/0905dcp.tar     tar: /dev/st0: Cannot write: Input/output error     tar: Error is not recoverable: exiting now      Here is `dmesg`               mptbase: ioc0: LogInfo(0x31120403): Originator={PL}, Code={Abort},     SubCode(0x0403) cb_idx mptscsih_io_done     LSI Debug log info 31120403 for channel 0 id 2     st0: Error 80000 (driver bt 0x0, host bt 0x8).      Does anyone have any ideas or suggestions?


title: Perl print the lines matching with the columns of file 1 and file2

text: Here I am printing the contents of the file which are not matching. I want to do a vice versa, i.e. print the lines of file1 (those which are matching in file2)               #!/usr/bin/perl          # create names lookup table from first file     my %names;     while (<>) {         (my $col1)= split / /, $_;         $names{$col1} = 1;         last if eof;     }          # scan second file     while (<>) {         print if /^(\S+).*/ && not $names{$1};     }      you can refer this Question Compare two files with first column and remove duplicate row from 2nd file in shell script. I don't want to remove duplicates, I only want to print those which match with the contents of column and leave others.


title: Linux mint update problem

text: I am very new to Linux mint and I have a problem while doing updates. If I type sudo apt-get updates I will get the following:               Err http://ppa.launchpad.net saucy/main Sources                                                                                404  Not Found     Err http://ppa.launchpad.net saucy/main amd64 Packages                                                                                404  Not Found     Err http://ppa.launchpad.net saucy/main i386 Packages                                                                                404  Not Found     Ign http://packages.linuxmint.com petra/main Translation-en                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en_US                                                                                Ign http://packages.linuxmint.com petra/upstream Translation-en_US                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en_US                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en_US                                                                                Ign http://packages.linuxmint.com petra/upstream Translation-en                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en_US                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en_US                                                                                Ign http://ppa.launchpad.net saucy/main Translation-en                                                                                Fetched 204 kB in 9s (21,7 kB/s)                                                                                W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/dists/saucy/main/binary-amd64/Packages  404  Not Found          W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/dists/saucy/main/binary-i386/Packages  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/shnatsel/zram/ubuntu/dists/saucy/main/source/Sources  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/shnatsel/zram/ubuntu/dists/saucy/main/binary-amd64/Packages  404  Not Found          W: Failed to fetch http://ppa.launchpad.net/shnatsel/zram/ubuntu/dists/saucy/main/binary-i386/Packages  404  Not Found          E: Some index files failed to download. They have been ignored, or old ones used instead.      Output of inxi -r is:               Repos:     Active apt sources in file: /etc/apt/sources.list            deb http://extras.ubuntu.com/ubuntu/dists/ saucy main            Active apt sources in file: /etc/apt/sources.list.d/additional-repositories.list            deb http://download.virtualbox.org/virtualbox/debian saucy contrib            Active apt sources in file: /etc/apt/sources.list.d/chris-lea-node_js-saucy.list            deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu saucy main            deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/fossfreedom-packagefixes-saucy.list            deb http://ppa.launchpad.net/fossfreedom/packagefixes/ubuntu saucy main            deb-src http://ppa.launchpad.net/fossfreedom/packagefixes/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/google-talkplugin.list            deb http://dl.google.com/linux/talkplugin/deb/ stable main            Active apt sources in file: /etc/apt/sources.list.d/no1wantdthisname-ppa-saucy.list            deb http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu saucy main            deb-src http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/nviennot-tmate-saucy.list            deb http://ppa.launchpad.net/nviennot/tmate/ubuntu saucy main            deb-src http://ppa.launchpad.net/nviennot/tmate/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list            deb http://packages.linuxmint.com/ petra main upstream import            deb http://archive.ubuntu.com/ubuntu/ saucy main restricted universe multiverse            deb http://archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse            deb http://security.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse            deb http://archive.canonical.com/ubuntu/ saucy partner            Active apt sources in file: /etc/apt/sources.list.d/olivier-berten-misc-saucy.list            deb http://ppa.launchpad.net/olivier-berten/misc/ubuntu saucy main            deb-src http://ppa.launchpad.net/olivier-berten/misc/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/shnatsel-zram-saucy.list            deb http://ppa.launchpad.net/shnatsel/zram/ubuntu saucy main            deb-src http://ppa.launchpad.net/shnatsel/zram/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/ubuntu-wine-ppa-saucy.list            deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu saucy main            deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/webupd8team-java-saucy.list            deb http://ppa.launchpad.net/webupd8team/java/ubuntu saucy main            deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/webupd8team-sublime-text-3-saucy.list            deb http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu saucy main            deb-src http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu saucy main            Active apt sources in file: /etc/apt/sources.list.d/xorg-edgers-ppa-saucy.list            deb http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu saucy main            deb-src http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu saucy main      And my sources.list contain only:               deb http://extras.ubuntu.com/ubuntu/dists/ saucy main


title: How is new hardware support added to the linux kernel?

text: Imagine there's a company A that releases a new graphics adapter. Who manages the process that results in this new graphics adapter being supported by the Linux kernel in the future? How does that proceed? I'm curious how kernel support for any new hardware is handled; on Windows companies develop drivers on their own, but how does Linux get specific hardware support?


title: Operate on command output in tcsh

text: I think the correct operator for executing subshell command in tcsh is the backtick ``` but when I attempt to do a diff on the results of two commands I get an error. When I direct the information to files first and do a diff on the two files I get exactly what I want but I'd rather just use a single command like:               diff `jar -tvf org.jar` `jar -tvf new.jar`      What is the correct syntax in tcsh?


title: Problems moving home partition

text: I was running low in disk space on my Linux box, Ubuntu 10.10 Desktop, (specifically on my /home partition) so I added another disk to it and I am trying to move the home partition into it. I am trying to follow the steps on this guide here: https://help.ubuntu.com/community/Partitioning/Home/Moving However, when copying the files over to the new mounted partition rsync seems to fail silently. When I compare the folders, the new one is still empty. This is the command that I am executing:               sudo rsync -axS --exclude='/*/.gvfs' /home/. /media/home/.      Has it anything to do with the encryption on my home folder?


title: Fedora yum update error

text: When I run `yum update`, I receive the following error:               [root@chandru chandru.math]# yum update     Loaded plugins: presto, refresh-packagekit, remove-with-leaves     Setting up Update Process     Resolving Dependencies     --> Running transaction check     --> Processing Dependency: kdebase-runtime-libs(x86-32) = 4.5.3-3.fc13 for package: kdebase-runtime-4.5.3-3.fc13.i686     ---> Package kdebase-runtime-libs.i686 0:4.5.4-1.fc13 set to be updated     --> Finished Dependency Resolution     Error: Package: kdebase-runtime-4.5.3-3.fc13.i686 (@updates)                Requires: kdebase-runtime-libs(x86-32) = 4.5.3-3.fc13                Removing: kdebase-runtime-libs-4.5.3-3.fc13.i686 (@updates)                    kdebase-runtime-libs(x86-32) = 4.5.3-3.fc13                Updated By: kdebase-runtime-libs-4.5.4-1.fc13.i686 (updates)                    kdebase-runtime-libs(x86-32) = 4.5.4-1.fc13                Available: kdebase-runtime-libs-4.4.2-3.fc13.i686 (fedora)                    kdebase-runtime-libs(x86-32) = 4.4.2-3.fc13      You could try using --skip-broken to work around the problem     ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows:     kdebase-runtime-4.5.4-1.fc13.i686 is a duplicate with kdebase-runtime-4.5.3-3.fc13.i686     kdebase-runtime-4.5.4-1.fc13.i686 has missing requires of kdebase-runtime-libs(x86-32) = ('0', '4.5.4', '1.fc13')     kdebase-runtime-flags-4.5.4-1.fc13.noarch is a duplicate with kdebase-runtime-flags-4.5.3-3.fc13.noarch     6:kdelibs-4.5.4-2.fc13.i686 is a duplicate with 6:kdelibs-4.5.3-3.fc13.i686     6:kdelibs-common-4.5.4-2.fc13.i686 is a duplicate with 6:kdelibs-common-4.5.3-3.fc13.i686     phonon-4.4.3-2.fc13.i686 is a duplicate with phonon-4.4.2-1.fc13.i686      Please let me know what to do.


title: Fuzzy Fonts in Vim-Like (Webkit) browsers

text: I tried several vim-like browsers such as _uzbl_ , _vimb_ and _dwb_ recently. All they have in common is the **Fuzzy fonts** rendering in some pages such as **stackexchang** or **github**. ![enter image description here](http://i.stack.imgur.com/cUGQV.gif) I've searched and found out the problem is cause by a bitmap font named _Clean_. I added this to my `~/.config/fontconfig/fonts.conf` but I had no luck.               <?xml version="1.0"?>     <!DOCTYPE fontconfig SYSTEM "fonts.dtd">         <fontconfig>             <selectfont>             <rejectfont>                 <pattern>                 <patelt name="family">                     <string>Clean</string>                 </patelt>                 </pattern>             </rejectfont>             </selectfont>              </fontconfig>      Is there a way to fix this problem (preferably without sacrificing all of my bitmap fonts).


title: Fresh install Windows 7 from USB on machine with Ubuntu and Windows 7

text: I have a Toshiba laptop l755 S5282 with Windows 7 and Ubuntu 12.04 on it. About a year ago, I pulled an iso file off of DigitalRivers for Windows 7. I did a fresh install of Windows 7 from USB, then after that, I installed Ubuntu along side it. Everything is fine with system. My question: I may be selling this laptop and buying a desktop, and the buyer asked that I install Windows 7 as the only operating system on it. Does anyone have experience with doing a fresh install of Windows 7 on a machine that has Ubuntu and Windows installed? What is the safest way to go about it? Can I use the same iso from the same USB stick and just run the install prompts from boot up off usb? Will that take care of rewriting the partitions as Windows 7 on C: and the 1.46gb recovery? No more Grub menu? I used to have Toshiba recovery partition on it, but once I saw how easy it was to do a fresh install myself, I deleted the huge 13.5GB Toshiba recovery partition and used it towards Ubuntu's partition. I just want to make sure it'll go as smoothly as before, when I was just over writing Windows by itself. Here's a screenshot of Gparted output, to show what's on it now: ![Gparted image](http://i.stack.imgur.com/qOhY8.png)


title: Application on server crashes when accessed via browser - after full system upgrade

text: After a recent full-system upgrade one of my applications stopped working. It's Fatrat 1.2.0_beta2-11 on Archlinux (installed from community repository). Without enabling web access the application works just fine, but when web access is enabled **and accessed via browser** , the app on server crashes:               [pi@raspberrypi data]$ fatrat -n     Current locale "C"     Locating the Java VM for Java-based plugins...     Loading queues     HttpService::applySettings()     Listening on port 2233     FatRat is up and running now     Floating point exception (core dumped)      I tried downgrading the application to beta2_10 from cache but it didn't help. I also cleared all fatrat .conf files and reinstalled to the latest version, it didn't help either so I suspect there must be a problem with some upgraded dependency. How can I check the fatrat dumped core? Or what else I can do to fix this?


title: Installing TOMCAT on AIX 7.1

text: After installing a lot of packages I finally got ./configure to work, just to get a horrible message **Host support** :- checking C flags dependant on host system type... failed configure: error: Unsupported operating system "aix7.1.0.0" **Versions:** AIX 7.1 & TomCat 7.0.55 & JAVA 1.6 Any suggestions/ideas?


How can I reproduce solarized theme colors with xcalib for reading pdf's? I want to use `xcalib` such that I can read (black and white) pdf's with `evince` such that the background is like that one I am used to from my emacs solarized (light) color theme and the font color is also similar to that of the emacs solarized theme. So how can I reproduce this with `xcalib`? I tried `xcalib -red 1.5 0 65 -green 1.5 0 60 -blue 1.5 0 25 -alter` but it didn't lead to the desired result. I don't see how to adjust the values correctly to get what I want.


title: Why is "dir-or-file-in-usr-local" an error rather than a warning?

text: I'm building some rpm packages and checking for standards and style conformance using `rpmlint`. The packages are specific to systems at my place of work and they won't get pushed upstream. Our packages include a variety of software, including in-house software, patched versions of software from the repositories, and software not available from the official repositories. We install local packages into `/usr/local` for many reasons:   * avoids naming conflicts with official packages   * prevents `yum update` from clobbering local packages   * allows local packages to live on separate partition or disk and/or be shared over NFS so that packages and configurations can be shared among hosts   * allows us to have greater control over packages that are installed from sources outside the official repository, many of which do not conform to the standard installation paths (`bin`, `lib`, `include`, `share`, etc.) However, `rpmlint` gets very complainy when run on a package that installs files to `/usr/local`. For instance, on a custom build of GNU Hello World, this is what `rpmlint -i` has to say:               hello.x86_64: E: dir-or-file-in-usr-local /usr/local/hello-2.8/bin/hello     A file in the package is located in /usr/local. It's not permitted for     packages to install files in this directory.      I'm aware of the filesystem hierarchy standard, according to which: > The original idea behind '/usr/local' was to have a separate ('local') > '/usr' directory on every machine besides '/usr', which might be just > mounted read-only from somewhere else. It copies the structure of '/usr'. > These days, '/usr/local' is widely regarded as a good place in which to keep > self-compiled or third-party programs. The /usr/local hierarchy is for use > by the system administrator when installing software locally. It needs to be > safe from being overwritten when the system software is updated. It may be > used for programs and data that are shareable amongst a group of hosts, but > not found in /usr. Locally installed software must be placed within > /usr/local rather than /usr unless it is being installed to replace or > upgrade software in /usr. We are, in fact, following these standards and installing our local software to `/usr/local` for just these reasons, so I don't see why there should be anything wrong with using a package manager to install packages to `/usr/local`. However, I'd also like our packages to be standards-compliant, if for no other reason than consistency among our local packages. So why does `rpmlint` throw an error for files in `/usr/local`? Shouldn't this be at the packager's descretion? Can I ignore this error or at least make `rpmlint` print a warning instead?


title: Can I put 2 disks into a raid-0 array without reformating the FS?

text: We have an existing /dev/sda disk, we are adding an identical /dev/sdb I want to place these two disks in a raid-0 array. Can I do that without reformating /dev/sda?


title: Rebuild damaged system directory (for example, /lib)

text: Let's say I have a Linux system, either Debian, Ubuntu, or CentOS, where a user removed `/lib`, for example. Let's also say that I managed to boot this system with a livecd version of whatever OS it was running. Is it possible to run a command that will rebuild `/lib` on the damaged system? For example, I would guess that something like this could work by re- installing all packages that the target system had in use. I had a colleague encounter this situation, but the end result was a full reinstall. However, that got me thinking if a repair is possible, and perhaps quicker?


title: Can't use exclamation mark (!) in bash?

text: I'm trying to use the curl command to access a http url with a exclamation mark (`!`) in its path. e.g:               curl -v "http://example.org/!287s87asdjh2/somepath/someresource"      the console replies with `bash: ... event not found`. What is going on here? and what would be the proper syntax to escape the exclamation mark?


title: Sharing a 1 GB HD file that can be stream more then 10 computer simultinuasly

text: I want to share a file that is sized at 1 GB and my OS is Linux Ubuntu 12.10 via a wireless router by the name of TP-link with a speed of around 400MBps. I want to share this file to at least 10 computers that are capable to "play" the file simultaneously at the same time. Can anyone help me to share this file? Thus far I've tried to share it via Samba and also Apache2 but I can't stream or play to more than two or three computers at the same time.


title: Problem in splitting a string using awk or cut command

text: I have a properties file which has a password field (key value pair)               PASSWORD=NDhhHcsOBofXUdUzGw5B0Q==      I am trying to get the value in my shell script using the `awk` command               password=`awk -F "=" '{if($1 == "PASSWORD") print $2}' "$PASSWORD.ini"`      But it retrieves only `NDhhHcsOBofXUdUzGw5B0Q`. I need the entire password (including the last two `=` characters).


title: Set default permisson for newly folders and files in Linux

text: I'm using OpenSuSE and my computer has only 2 accounts: root and me.I have a directory `/srv/www/htdocs/abc`. I just want to set it up so that when new folders or files are created in this directory they will have the permissions set to 777. When new files are created in this directory, I have to set them to 777 again to gain write access. I use root and type:               chmod me /srv/www/htdocs      But I doesn't work. How can I do that?


title: How can I recover damaged file from overwritten ext4 partition?

text: My disk, which was previously ext4 has been formatted and Windows has been installed. I want to recover my previous files (family photos, ..) and I tried everything I could find on the internet. I first cloned an image of the disk to work on it, and I've tested Testdisk, but I couldn't do anything with it. In fact, when I analyze the disk I can find the partition (multiple instances, I don't know why) but when I list the files it doesn't find anything and give the message error: "can't open filesystem. Filesystem seems damaged". I also tried to look for superblocks but still the same error. `e2fsck` tell's me : "the superblock could not be read or does not describe a correct ext2 filesystem".


title: small Linux host for virtual box

text: Does anybody know a small and simple Linux distribution that contains not much more than the "VirtualBox" program? I'd like to set up a machine that actually needs some kind of graphical display plus VirtualBox, which should automatically boot the productive OS as a virtual system.


title: How to make an ext4 file writable on mounting by a user (not root)

text: I have been trying to write onto a newly created partition My partition block is /dev/sda6 I am unable to write anything onto that partition. My Corresponding fstab file is this               /dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXD1EA0TV384-part7 swap                 swap       defaults              0 0     UUID=827020aa-bccf-493e-acdc-21dd8eb98639 /                    btrfs      defaults              1 1     /dev/disk/by-id/ata-WDC_WD5000BEVT-24A0RT0_WD-WXD1EA0TV384-part8 /boot                ext4       acl,user_xattr        1 2     proc                 /proc                proc       defaults              0 0     sysfs                /sys                 sysfs      noauto                0 0     debugfs              /sys/kernel/debug    debugfs    noauto                0 0     devpts               /dev/pts             devpts     mode=0620,gid=5       0 0     /dev/sda6            /home/hawk/gentoo            ext4       users,gid=users,fmask=133,dmask=022                   1 2      If I format it back to any other windows based file system such as fat I am able to both read and write


title: To pass a parameter with sed

text: For my script I have to read the data from a file. For example I have 2 files: one is a text file, the second is a csv file with 10 columns. What I am trying to do is to read the csv and change the parameters in the first file.   1. Using `sed -n` to read the data one row at a time and save this in a `fileC`   2. Using `sed "s/&replacefile1param/&readFileC/g"` What I have issue is to read the `cat` of `readFileC` as a parameter in the second step. How can I do this? The first file is a sample script file with 2 parameters inside. The second file is a CSV file with 200 lines with 6 columns. I need to change the template file by reading the columns from the CSV, and substituting the parameters. The result need to be 200 file1 and each result needs to be saved in the location specified in the the 4th column of the CSV as well. ### Sample template file               The name =scriptname          The staments go here          job name = jobname          exit      ### Sample CSV data               scriptname,jobname,date,location,updated,env     kkkkkk,filetest,2001-01-01,/san00/project,test     kkkkk2,filetest2,2001-01-01,/san00/project,test     kkkkk3,filetest3,2001-01-01,/san00/project2,real      I need to replace the parameters in the template file with values taken from the CSV, and save the file in the `/san00` location from the 4th column of the CSV. ### Desired output               The script name kkkkkk          The staments go here          job name = filetest          exit      This should be saved in `san00/project`.


title: Is there a PAM Standard?

text: Related to a StackOverflow question I have. Since it's more or less really a SO question through and through, I won't go into the whole spiel. My platform question is this: Is there an industry standard somewhere that specifies how various aspects of PAM should operate?


title: Why is du giving me unexpected output?

text: I'm new to Linux, so sorry for my simple question. I'm on Ubuntu. I have this directory:               $ ls -al     total 16     drwxr-xr-x 2 alberto alberto 4096 2011-04-03 16:02 .     drwxr-xr-x 4 alberto alberto 4096 2011-04-03 16:01 ..     -rw-r--r-- 1 alberto alberto    7 2011-04-03 16:02 .hidden     -rw-r--r-- 1 alberto alberto    4 2011-04-03 15:51 testfile      When I run `du`, I'm expecting this:               $ du     4   testfile     4   .hidden      But I'm getting this:               $ du     12  .     $ du *     4   testfile     $ du .*     12  .     20  ../snippet     12  ../test     52  ..     4   .hidden      Why is this happening?


title: How to enable autocompletion for remote paths when using scp?

text: I remote copied a file to my laptop using:               scp someFile USER@192.168.178.32:/home/USER/put/it/some/where/oh/damn/you/here      I want to be able to autocomplete the remote path by hitting tab.


title: Does Linux Kernel 3.5 have the improvement from 3.3?

text: Some weeks ago I updated to Linux kernel version 3.3 because Radeon Audio HDMI wasn't working on my laptop. The issue was fixed with the upgrade to version 3.3 (Though Suspend still doesn't work) I recently changed distributions, switching from Ubuntu to Mint and when I wanted to update to 3.3 I saw that 3.5 was out too(i'm not really kernel- aware). But after updating, my Radeon HDMI Audio stopped working again. So my question is: for me in logical order kernel 3.5 should have improvements from 3.3, except if it's a completely different branch which I don't know about. So why did it break my system? And is there any (easy) way to get the improvement made to radeon drivers from 3.3 to 3.5 ? (question already asked on superuser , but someone told me that will be better to move it here)


title: Check integrity of a dd backup

text: I just made a backup of an entire hard drive (50GB) over `ssh` via:               dd if=/dev/hda | buffer -s 64k -S 10m | ssh myuser@myhost "cat > ~/image.img"      What's now the best way to check the integrity of the file `image.img`, i.e. how to verify that everything is copied correctly?


title: Creating formatted partition from nothing

text: I need to create filesystem with just one partition from nothing (`/dev/zero`). I tried this sequence of commands:               dd if=/dev/zero of=mountedImage.img bs=512 count=131072     fdisk mountedImage.img         n         p          2048         131072      Basically, I need to create 64MB image file filled with zeroes. Then I use `fdisk` to add a new partition for new filesystem (which should finally be FAT32), starting at sector `2048` and using all remaining sectors.               losetup /dev/loop1 mountedImage.img     mkfs -t vfat /dev/loop1      But here I'm hitting problems. If I set up a `loop` device and format it using `mkfs -t vfat`, partition table is overwritten and filesystem (FAT32) is placed to disk. I don't need whole disk formatted with FAT32, I just need my primary partition to be so. Does anybody know how can I format only one partition of raw disk image, not whole image? Please help.


title: Untar directory from large tarball

text: How do I untar a directory that I don't know the path to? I only know the directory name. I know how to untar a single file with a wildcard: `tar -xf somefile.tar.gz --wildcards --no-anchored 'index.php'`


title: Is there a way to install and remove packages in a single yum command?

text: Is there a way to add and remove packages at the same time with a single `yum` command? For example, installing postfix and removing sendmail without running two separate commands/transactions.


title: From df device name to physical drive name (vendor / type)

text: Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as **vendor / type**.               /dev/sda3               915.4G     34.9G    880.0G   4% /share/HDA_DATA     /dev/sdd3                 1.8T    668.1G      1.1T  36% /share/HDD_DATA      I have learnt that I find some info in sys/block, but I do not find the vendor's type name in there? -- Added -- My system is a Linux based QNAP NAS, so things might be a little different there. For me as a non Linux expert hard to tell, what is "standard", and what not. -- Added as of Steven's answer --               [~] # hdparm -I /dev/sdb3          /dev/sdb3:      HDIO_DRIVE_CMD(identify) failed: Invalid argument


title: Running chsh does not change shell

text: I want to change my shell from bash to zsh. I have tried running the following while logged in as user zol:               $ chsh -s /bin/zsh     $ sudo chsh -s /bin/zsh zol     $ su -c 'chsh -s /bin/zsh zol'     # The above all results with:     $ password:     $ chsh: Shell not changed.          # zsh exists in /etc/shells..      chsh -l     /bin/sh     /bin/bash     /sbin/nologin     /bin/zsh      What could be wrong? How can I fix it?


title: "Short write" error message with wget

text: I got the following error when trying to pull down a 300 MB ISO. It appears to pull down 25 MB then stop. Any idea what's going on here?               ~ # wget http://centos.mbni.med.umich.edu/..../CentOS-6.2-x86_64-netinstall.iso     Connecting to centos.mbni.med.umich.edu (141.214.186.162:80)     CentOS-6.2-x86_64-ne  11% |**************| 25930k 00:00:39 ETA     wget: short write


title: Redirect http using iptables for an ip range

text: I have a range of ip addresses (10.13.13.10-19) that I want to redirect all outgoing http traffic to an internal webserver. So if someone in that range tried to access any site, the html from my webserver would be returned instead. However, I only want to affect that ip range. What iptables rules do I need on my router to make this happen?


title: How do I go to beginning of command line when I am inside the screen?

text: In bash I can hit `Ctrl` + `a` and go to first of the command line. But in `screen` `Ctrl` + `a` does not do this. How do I go to first of command line in screen?


title: Protecting data against bit rot

text: I have realized that I need to protect all of my photographs against bit rot (file corruption occurring at random due to errors in hard drives or network transfer). I recently discovered par2 which seems like a great program to create redundancy files and give the ability to detect and repair file corruptions. I don't think journaling file systems are the right solution here, since I want the protection to follow along with the files into my backup and when migrating onto new laptops. So, what I think I need is a script that can be run as a cronjob, maybe once an hour. It would look through all of the files that needs protection and update the redundancy files if files are added or changed (file has edit timestamp newer than redundancy arhive), and it would repair files if any file has been corrupted (file has changed but edit timestamp hasn't been updated). Is there any script or program that would do this? Or are there programs that solve the problem in another way? Or should I just write such a script myself (a would prefer not to, I want something robust and tested by a lot of users)?


title: In tcsh shell how I find a particular word in the command prompt?

text: Suppose I have the following line in my command prompt and the cursor is at the and of the line or the beginning of the line by using (`CTRL+A`)               [subhrcho@slc04lyo pcbpel]$ abc def ghi jkl      How can I navigate to a particular word say, for example, to `def`. I am using _tcsh_ shell in _linux_ with default binding which I suppose is _emacs_ mode. P.S:I do not have a `Meta` key in my keyboard. I can move forward or backward between words by using `CTRL+f` and respectively. So I think my `Meta` key is the `Esc` key. Please **correct me if that presumption is wrong**. `Alt` isn't working either as the meta key.I had a look at the emacs documentation but invoking `CTRL-s w` and then pressing `Enter` is not working for me. It would just try to execute whatever is there in the prompt by first appending a `w` character to it and the prompt would say :               [subhrcho@slc04lyo pcbpel]$ abc def ghi jklw     abc: Command not found.


title: Script to restart the application

text: I need to write a script for the below scenario in Linux:   * Run a cron every 5 minutes.   * `grep` the application log file to see if we can see the pattern "ORA-".   * If we see this pattern:     * stop the service.     * Rename the application log file with timestamp appended.     * Start the service. So each time there is a problem, within 5 minutes the application will get restarted.


title: Dual boot Linux partition scheme with encryption

text: I am trying to figure out how I should encrypt my machine. I am reorganizing and will have two 500GB drives. I am setting up a dual boot system (both linux). My prospective partition scheme: sda:   * `/boot`   * `/swap` [encrypted]   * `/[file system #1 - Xubuntu]` [encrypted]   * `/[file system #2 - Crunchbang]` [encrypted]   * `/home` [encrypted]   * `/data1` [encrypted] sdb:   * `/data2` [encrypted] the encryption schemes I’ve been looking at (dm-crypt and/or ecryptfs) are: sda:   * `/boot`   * `/VLM` [dm-crypt]      * swap     * `[file system #1 - Xubuntu]`     * `[file system #2 - Crunchbang]`     * `/home`     * `/data` sdb:   * `/data2` [dm-crypt] or sda:   * `/boot`   * `/swap` [dm-crypt]   * `/file system #1` [dm-crypt]   * `/file system #2` [dm-crypt]   * `/home`     * /home/xubuntu [ecryptfs]     * /home/crunchbang [ecryptfs]   * `/data1` [dm-crypt] sdb:   * `/data2` [dm-crypt] I want decryption of the sub-LVM disk (or individual file system depending on the case) encryption to trigger decryption of both home directories and the data partitions. encrypting with LVM would nead just one encrypt hook for the sdb encryption I suppose. Does one align more with best practices?


title: umount an external ntfs drive as non-root

text: I have ntfs-3g installed, and use this udev rule to auto mount external drives automatically. When I try umount it as non-root, it says:               umount: /media/umm is not in the fstab (and you are not root)      The device mounts as:               /dev/sdc1  fuseblk    150G  143G  6.6G  96% /media/umm      and is part of the `users` group. I did a `chkdsk` on a Windows machine to ensure no file system errors. Any ideas? (personally I'd prefer not to use ntfs, but I need it for sharing with all the non-UNIX systems and allow for files > 4GB).


title: How to align columns of multiple lines at a fixed distance with vim

text: Here is another one of my `vim` question (They seem to become my trademark here.). I have a really long file basically consisting of lines of the following form:               ;07     :ANZ textv      S9_1  9_1_K3_2  S9_3  S9_4 9_1_K3_5 S9_T1_1 S9_T1_2 S9_T1_3 S9_T1_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10    9_V3n   E3              ;08     :ANZ textv      S9_1  9_1_K3_2  S9_3  S9_4 9_1_K3_5 S9_T1_1 S9_T1_2 S9_T1_3 S9_T2_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10    9_V3n   E3       09     :ANZ textv       S9_1  9_1_K3_2  S9_3  S9_4 9_1_K3_5 S9_T1_1 S9_T1_2 S9_T1_3 S9_T3_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10    9_V3n   E3            ;10     :ANZ textv      S9_1  9_1_K4_2  S9_3  S9_4 9_1_K4_5 S9_T1_1 S9_T1_2 S9_T1_3 S9_T1_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10    9_V4n   E3              ;11     :ANZ textv      S9_1  9_1_K4_2  S9_3  S9_4 9_1_K4_5 S9_T1_1 S9_T1_2 S9_T1_3 S9_T2_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10    9_V4n   E3       12     :ANZ textv       S9_1  9_1_K4_2  S9_3  S9_4 9_1_K4_5     S9_T1_1     S9_T1_2     S9_T1_3     S9_T3_4     S9_T1_5     S9_T1_6     S9_T1_7     S9_T1_8     S9_T1_9     S9_T1_10    9_V4n       E3            13     :ANZ text    S9_1  9_2_K1_2  S9_3  S9_4  9_2_K1_5    S9_T1_1 S9_T1_2 S9_T1_3 S9_T1_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10         ;14     :ANZ text       S9_1  9_2_K1_2  S9_3  S9_4  9_2_K1_5    S9_T1_1 S9_T1_2 S9_T1_3 S9_T2_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10         ;15     :ANZ text       S9_1  9_2_K1_2  S9_3  S9_4  9_2_K1_5    S9_T1_1 S9_T1_2 S9_T1_3 S9_T3_4 S9_T1_5 S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10          As you can see the columns of these lines are not aligned e.g. line `13` is misaligned with respect to lines `14` and `15` because of the `;`. But there are more difficult cases of misalignment. For example there are lines like this:               ;14     :ANZ text   S9_1  9_2_K1_2   S9_3  S9_4 9_2_K1_5         S9_T1_1    S9_T1_2 S9_T1_3 S9_T2_4 S9_T1_5 S9_T1_6 S9_T1_7       S9_T1_8 S9_T1_9   S9_T1_10         ;15     :ANZ text           S9_1  9_2_K1_2  S9_3     S9_4   9_2_K1_5    S9_T1_1 S9_T1_2 S9_T1_3 S9_T3_4 S9_T1_5     S9_T1_6 S9_T1_7 S9_T1_8 S9_T1_9 S9_T1_10          or whatever you can imagine. What I want is to align all columns such that between every column there are four spaces distance. For example, I want lines `;07-09` to look like this:               ;07     :ANZ    textv    S9_1    9_1_K3_2    S9_3    S9_4    9_1_K3_5    S9_T1_1    S9_T1_2    S9_T1_3    S9_T1_4    S9_T1_5    S9_T1_6    S9_T1_7    S9_T1_8    S9_T1_9    S9_T1_10    9_V3n    E3              ;08     :ANZ    textv    S9_1    9_1_K3_2    S9_3    S9_4    9_1_K3_5    S9_T1_1    S9_T1_2    S9_T1_3    S9_T2_4    S9_T1_5    S9_T1_6    S9_T1_7    S9_T1_8    S9_T1_9    S9_T1_10    9_V3n    E3        09     :ANZ    textv    S9_1    9_1_K3_2    S9_3    S9_4    9_1_K3_5    S9_T1_1    S9_T1_2    S9_T1_3    S9_T3_4    S9_T1_5    S9_T1_6    S9_T1_7    S9_T1_8    S9_T1_9    S9_T1_10    9_V3n    E3        Is there a way to do this with `vim` in an efficient way?


title: Why does this simple Perl client not work?

text: I am fairly new to IPC with sockets and expect this issue is a simple one to resolve. I'm trying to understand why I cannot get this example script from `perldoc perlipc` to run on my Ubuntu setup:               #!/usr/bin/perl -w     use IO::Socket;     $remote = IO::Socket::INET->new(                                      Proto    => "tcp",                                      PeerAddr => "localhost",                                      PeerPort => "daytime(13)",                                    )               || die "can't connect to daytime service on localhost";          while (<$remote>) { print }      The script `die`s because the TCP client cannot be established. Running `$ less /etc/services` shows me that `daytime(13)` is defined. What could be wrong here?


title: Is there an upper limit to the number of zombie processes you can have?

text: I used to work with an HP-UX system and the old admin told me there is an upper limit on the number of zombie processes you can have on the system, I believe 1024.   * Is this a hard fact ceiling? I think you could have any number of zombies just as if you can have any number of processes...?   * Is it different value from distro to distro?   * What occurs if we hit the upper limit and try to create another zombie?


title: Proxy problem in Mint 16

text: I recently installed Mint 16 alongside windows 8. I use the Internet through a proxy server in my campus.So after setting the proxy in the Network setting, I noticed that the Software center and the terminal cannot connect to the Internet.However, FireFox works fine and it has in its network settings to use the system proxy.So what is the problem? I can't install repositories using apt-get, help me please.


title: Pg Dn key returns tilde (~)

text: When I hit `Page Down` in terminal (I'm using Ubuntu 12.04), strangely I get the ~ (tilde) character. This is annoying especially when I searched my command line history and decided to go to the bottom to get my prompt back. Say, I have 1,351 lines of history. Found what I was looking for in line 869. I could just `backspace` or `Ctrl` + `C`, but I'd much prefer to go to the bottom. Anyone knows how to change this behavior?


title: fail to install kolab dependencies

text: I need some help. I'm trying to setup a kolab sever to be used by computer science students at my college, starting this fall. I had a bit of some trouble setting up ldap, bur after some experimenting it finally worked. Now I'm having trouble installing kolab. IN SUMMARY:               sudo apt-get install kolab          (...)          dpkg: error processing kolab-cli (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of kolab-server:      kolab-server depends on pykolab (= 0.5.11-5); however:       Package pykolab is not configured yet.          (...)          dpkg: error processing kolab-saslauthd (--configure):      dependency problems - leaving unconfigured     Errors were encountered while processing:      pykolab      kolab-cli      kolab-server      kolab-conf      wallace      kolab      kolab-xml      kolab-mta      kolab-saslauthd      --->>>>> How can I fix this? I really would appreciate your help, my deadline is approaching fast.


title: What is this VIM plugin?

text: It's a modified vim bar that includes current path and current git branch. I've been looking around but couldn't find anything. ![enter image description here](http://i.stack.imgur.com/lU78y.png) ![enter image description here](http://i.stack.imgur.com/PauqK.png) Found in: https://github.com/w0ng/vim-hybrid


title: Ways to give a process "idle" network priority

text: When I'm playing a game, I don't want Dropbox taking hogging my network connection. I have been able to noticeably reduce my latency by turning it off while playing. The same is true to a lesser extend for web browsing. I'm looking for network equivalents for niceness and scheduling policies (`SCHED_BATCH` etc. in schedtool). Does such a thing exist? Alternatively, automatically cutting off network access for a specific process while another one is running would work too.


title: How to configure for an Authenticating Proxy Server

text: My work proxy server requires authentication with the Microsoft AD domain user credentials. Everybody knows how it works: If you log in on a Windows workstation, your "Internet Explorer" browser based internet access requests are automatically authenticated (and identified) using your domain login credentials. I found that Firefox can also authenticate against these proxy servers and long assumed that they "do something special". Recently a colleague installed Linux Mint in a VM and to my surprise he was busy getting updates from the internet. When I asked how he got it wo work he shrugged and said "It just worked" This prompted me to re-look at the proxy settings. I run Kubuntu (with a mix of G* and K* applications, but I only use the GTK applications when I'm convinced that they are much better than anything K*) I do still have a copy of Windows guest running in a VirtualBox VM, mainly for Printing and for accessing internal/corporate web sites (Which both requires authentication and identification via MS domain credentials) as well as for changing my domain password every so many days. So it would be very helpful if I could get [some/most/all] of my Linux applications to work via the proxy server. My most urgent needs are for Akregator and Muon to be able to work. Other applications that may benefit are some apps that auto-update (Eg Virtual Box Extentions) or wrap themselves around a browser (Get More Themes/Wall Papers/etc comes to mind, and the occasional use of wget) SSH/SCP clients manage to work via the firewall without authentication. What is the right way (tool and/or procedure) to configure this, ideally in a single location because having to maintain my password in multiple locations is a recipe for getting locked out of my account :-/ Oh, and it would be a dream come true if I could have the equivalent to the Firefox "Quick Proxy" proxy disable/enable utility, eg one click to enable or disable the use of proxy, without heaving to log out and back in, depending on what network I'm on. Actually thinking about it, a utility should be trainable to look at your IP address and know when you need to use the proxy! But I digress. I imagine running a local proxy server which can dynamically add the authentication and forward to an upstream proxy server when needed may be the only real solution.


title: What happens when you read a file while it is overwritten?

text: Suppose I read (cat) a file while another process is rewriting its contents. Is the output predictable? What would happen?


title: How to find/correct error in a path

text: It's often that a long path is mistyped or you get a log file entry that a path does not exist. Is there a command or shell function that navigates the path hierarchy until it finds a matching path? The command line exchange could go like this:               $ ls /var/lib/my/supper/complicated/path     File or directory not found     $ fixpath /var/lib/my/supper/complicated/path     Found /var/lib/my      As a bonus feature, a similarity detection would be great:               $ fixpath /var/lib/my/supper/complicated/path     Found /var/lib/my     Did you mean /var/lib/my/super/complicated/path


title: Slow network with e1000

text: I've got a problem with my network speed. I sometimes have full download speed (i.e. 5 MB/s, which is about my max. internet dl-speed) and sometimes comparable slow speed (about 0.5 MB/s). This is affects **both** internet and home network! When I got slow network speed it stays that way until I 'renew' the module for my PCI network card (`sudo rmmod e1000` followed by `sudo modprobe e1000`). Then I've got full speed again for at least a few minutes, if I'm lucky even for a few hours... I've got no idea where to look for such an error (and how to get rid of it). Any help/suggestion is appreciated! EDIT2: **'Solution'** : I'm using a PCIe NIC now and everything works fine. EDIT: Xubuntu 12.10 (also tried other recent Distros like openSUSE and Fedora because of this issue, same results) Kernel 3.5.0-26-generic #42-Ubuntu SMP Fri Mar 8 23:18:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux **ethtool eth0**               Settings for eth0:         Supported ports: [ TP ]         Supported link modes:   10baseT/Half 10baseT/Full                                  100baseT/Half 100baseT/Full                                  1000baseT/Full          Supported pause frame use: No         Supports auto-negotiation: Yes         Advertised link modes:  10baseT/Half 10baseT/Full                                  100baseT/Half 100baseT/Full                                  1000baseT/Full          Advertised pause frame use: No         Advertised auto-negotiation: Yes         Speed: 100Mb/s         Duplex: Full         Port: Twisted Pair         PHYAD: 0         Transceiver: internal         Auto-negotiation: on         MDI-X: Unknown         Supports Wake-on: umbg         Wake-on: g         Current message level: 0x00000007 (7)                                drv probe link         Link detected: yes'      **ethtool -S eth0**               NIC statistics:      rx_packets: 23955      tx_packets: 19121      rx_bytes: 23989358      tx_bytes: 2096615      rx_broadcast: 17      tx_broadcast: 4      rx_multicast: 556      tx_multicast: 310      rx_errors: 0      tx_errors: 0      tx_dropped: 0      multicast: 556      collisions: 0      rx_length_errors: 0      rx_over_errors: 0      rx_crc_errors: 0      rx_frame_errors: 0      rx_no_buffer_count: 0      rx_missed_errors: 0      tx_aborted_errors: 0      tx_carrier_errors: 0      tx_fifo_errors: 0      tx_heartbeat_errors: 0      tx_window_errors: 0      tx_abort_late_coll: 0      tx_deferred_ok: 0      tx_single_coll_ok: 0      tx_multi_coll_ok: 0      tx_timeout_count: 0      tx_restart_queue: 0      rx_long_length_errors: 0      rx_short_length_errors: 0      rx_align_errors: 0      tx_tcp_seg_good: 9      tx_tcp_seg_failed: 0      rx_flow_control_xon: 0      rx_flow_control_xoff: 0      tx_flow_control_xon: 0      tx_flow_control_xoff: 0      rx_long_byte_count: 23989358      rx_csum_offload_good: 23035      rx_csum_offload_errors: 0      alloc_rx_buff_failed: 0      tx_smbus: 0      rx_smbus: 0      dropped_smbus: 0      **dmsg** (partially, `/var/log/kern.log` says quite the same concerning e1000)               [12113.565834] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI     [12113.565838] e1000: Copyright (c) 1999-2006 Intel Corporation.     [12114.045957] e1000 0000:08:00.0: eth0: (PCI:33MHz:32-bit) 90:e2:ba:39:b1:17     [12114.045965] e1000 0000:08:00.0: eth0: Intel(R) PRO/1000 Network Connection     [12114.056047] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready     [12114.056399] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready     [12116.058691] e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX     [12116.059516] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready     [12245.684427] irq 18: nobody cared (try booting with the "irqpoll" option)     [12245.684432] Pid: 0, comm: swapper/2 Tainted: P           O 3.5.0-26-generic #42-Ubuntu     [12245.684433] Call Trace:     [12245.684435]  <IRQ>  [<ffffffff810e1c1d>] __report_bad_irq+0x3d/0xe0     [12245.684443]  [<ffffffff810e1f24>] note_interrupt+0x1b4/0x200     [12245.684448]  [<ffffffff810df6b7>] handle_irq_event_percpu+0xa7/0x1f0     [12245.684451]  [<ffffffff810df84e>] handle_irq_event+0x4e/0x80     [12245.684454]  [<ffffffff810e2a5a>] handle_fasteoi_irq+0x5a/0x100     [12245.684458]  [<ffffffff81015082>] handle_irq+0x22/0x40     [12245.684461]  [<ffffffff8168ad4a>] do_IRQ+0x5a/0xe0     [12245.684466]  [<ffffffff816812ea>] common_interrupt+0x6a/0x6a     [12245.684467]  <EOI>  [<ffffffff8139145a>] ? intel_idle+0xea/0x150     [12245.684474]  [<ffffffff8139143b>] ? intel_idle+0xcb/0x150     [12245.684479]  [<ffffffff81525009>] cpuidle_enter+0x19/0x20     [12245.684482]  [<ffffffff81525639>] cpuidle_idle_call+0xa9/0x240     [12245.684486]  [<ffffffff8101c48f>] cpu_idle+0xaf/0x120     [12245.684489]  [<ffffffff81669baa>] start_secondary+0x1de/0x1e5     [12245.684491] handlers:     [12245.684496] [<ffffffffa0148a60>] oxygen_interrupt [snd_oxygen_lib]     [12245.684501] [<ffffffffa0ae8540>] e1000_intr [e1000]     [12245.684502] Disabling IRQ #18      **/proc/interrupts**                      CPU0       CPU1       CPU2       CPU3              0:         43          0          0          0   IO-APIC-edge      timer       1:          3          0          0          0   IO-APIC-edge      i8042       8:          1          0          0          0   IO-APIC-edge      rtc0       9:          0          0          0          0   IO-APIC-fasteoi   acpi      12:          4          0          0          0   IO-APIC-edge      i8042      16:     143514      62226     106210     312347   IO-APIC-fasteoi   ehci_hcd:usb1, nvidia      17:        126          0          0         98   IO-APIC-fasteoi   snd_hda_intel      18:        495      20639     179361     199518   IO-APIC-fasteoi   snd_oxygen_lib, eth0      23:      30450     257271     182367     175510   IO-APIC-fasteoi   ehci_hcd:usb2      41:          1          0          0          0   PCI-MSI-edge      xhci_hcd      42:          0          0          0          0   PCI-MSI-edge      xhci_hcd      43:          0          0          0          0   PCI-MSI-edge      xhci_hcd      44:          0          0          0          0   PCI-MSI-edge      xhci_hcd      45:          0          0          0          0   PCI-MSI-edge      xhci_hcd      46:          1          0          0          0   PCI-MSI-edge      xhci_hcd      47:          0          0          0          0   PCI-MSI-edge      xhci_hcd      48:          0          0          0          0   PCI-MSI-edge      xhci_hcd      49:          0          0          0          0   PCI-MSI-edge      xhci_hcd      50:          0          0          0          0   PCI-MSI-edge      xhci_hcd      51:      40805       8429      38266      34073   PCI-MSI-edge      ahci      52:          0          0          0          0   PCI-MSI-edge      ahci      53:         11          0          0          0   PCI-MSI-edge      mei     NMI:        924        997        962       1005   Non-maskable interrupts     LOC:     895029    1172293     876204     941898   Local timer interrupts     SPU:          0          0          0          0   Spurious interrupts     PMI:        924        997        962       1005   Performance monitoring interrupts     IWI:          0          0          0          0   IRQ work interrupts     RTR:          3          0          0          0   APIC ICR read retries     RES:     435704      55688      17924      11697   Rescheduling interrupts     CAL:      43826      56182      55976      43671   Function call interrupts     TLB:      24234      30699      30637      27213   TLB shootdowns     TRM:          0          0          0          0   Thermal event interrupts     THR:          0          0          0          0   Threshold APIC interrupts     MCE:          0          0          0          0   Machine check exceptions     MCP:         79         79         79         79   Machine check polls     ERR:          0     MIS:          0


title: make: i686-linux-gcc: Command not found

text: I am using Ubuntu-11.10 amd64 and trying to cross-compile a linux-2.6.38.8 kernel for a 32-bit target.I tried               make CROSS_COMPILE=i686-linux- ARCH=i386      But I got error               make: i686-linux-gcc: Command not found     CHK     include/linux/version.h     CHK     include/generated/utsrelease.h     CC      kernel/bounds.s     /bin/sh: i686-linux-gcc: not found     make[1]: *** [kernel/bounds.s] Error 127     make: *** [prepare0] Error 2      I know there is not any i686-linux-gcc compiler on my system. I don't know how to install it too.               echo $path       shows               /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin      I created **symlinks** too but no results. Any help will be greatly appreciated.


title: What makes an operating system "Unix-Like"?

text: I frequently come across the term "unix-like" on the internet on many sites. There is no standard; it is just in the way it behaves. But if I were to develop a kernel from scratch, what would make it considered "unix-like"? Basically, what are the things that make written code like Unix?


title: How to create folder shortcuts in file manager?

text: ![enter image description here](http://i.stack.imgur.com/Nvjsn.jpg) I'm using Thunar. What i want is remove `Networks` since i don't use it, and add `Lello` below `videos`. I know if you right click on any folder like `videos` you can remove the shortcut, I don't know how to add shortcuts.


title: Why doesn't "sudo su" in a shell script run the rest of the script as root?

text: A sample script can be as below:               #!/bin/bash     sudo su     ls /root      When using `./test.sh` as the normal user, instead run `ls` as super user and exit, it switches to root; and when I logout, it executes `ls /root` as the normal user. Can anybody tell me about the mechanism about it?


title: Disable the GIO network extension?

text: I don't use any LAN, so the following "Network" is useless to me: ![enter image description here](http://i.stack.imgur.com/XJtcz.png) I checked the source code partially and it seems to be using the GIO network extension. How can I disable this without modification of the source code ?


title: Detached screen on a remote host

text: I have a local script that runs a remote script via ssh. The local script is minecraft.php:               ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {$this->pemkey} {$this->ssh_user} sudo /vol/start_bukkit.sh      The remote script is /vol/start_bukkit.sh:               #!/bin/bash     cd "/vol/bukkit"     /usr/bin/screen -S bukkit -m -d /usr/local/bin/java -Xnoclassgc -Xms1024M -Xmx1024M -jar /vol/bukkit/craftbukkit.jar nogui      What happens is that the java command works, launching craftbukkit.jar, but screen doesn't launch a new window. What's going on? How can a new window be created? If I sign in to the remote server and run start_bukkit.sh then screen works as expected, creating a newly detached window running craftbukkit.jar in it. **EDIT:** I got it to work. I updated the local script by removing the sudo and putting the screen command in. Here it is:               ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {$this->pemkey} {$this->ssh_user} /usr/bin/screen -S bukkit -m -d /vol/start_bukkit.sh      On the remote side I removed the screen command:               #!/bin/bash     cd "/vol/bukkit"     /usr/local/bin/java -Xnoclassgc -Xms1024M -Xmx1024M -jar /vol/bukkit/craftbukkit.jar nogui      I can't explain why this works.


title: How do I create a bunch of files with different parameters in the body of each file?

text: So, say, I want to create a bunch of files named this way (where I have an original file "albedo10solar100" with text inside), where I vary albedo from 10 to 60 in steps of 10 and solar from 90 to 100 in steps of 5:   * albedo10solar100.m   * albedo10solar95.m   * albedo10solar90.m   * ...   * albedo20solar100.m   * albedo30solar100.m I would imagine that I would have to first use the cat command numerous times first on albedo10solar100, so I would first need some shell script that could cat albedo10solar100 > albedo{$m}solar{$n}. But then, what if I then wanted to batch replace every instance of 100 with 95 in the body of albedo10solar100? And so on for each additional file?


title: Replace multiple strings in a single pass

text: I'm looking for a way to replace placeholder strings in a template file with concrete values, with common Unix tools (bash, sed, awk, maybe perl). It is important that the replacement is done in a single pass, that is, what is already scanned/replaced must not be considered for another replacement. For example, these two attempts fail:               echo "AB" | awk '{gsub("A","B");gsub("B","A");print}'     >> AA          echo "AB" | sed 's/A/B/g;s/B/A/g'     >> AA      The correct result in this case is of course BA. In general, the solution should be equivalent to scanning the input left-to- right for a longest match to one of the given replacement strings, and for each match, performing a replacement and continuing from that point on in the input (none of the already read input nor the replacements performed should be considered for matches). Actually, the details don't matter, just that the results of the replacement are never considered for another replacement, in whole or in part. **NOTE** I am only looking for correct generic solutions. Please do not propose solutions which fail for certain inputs (input files, search and replace pairs), however unlikely they may seem.


title: Easiest way to sandbox an user

text: I'd like to sandbox a user so that they can only read files under `/media/shared/somefolder`. What's the easiest way to accomplish this? Users/groups? ACL? AppArmor? Some context: Plex Media Server is a media server with a web interface that allows you to browse all of your server's file-system searching for media files. I don't want users to be able to navigate my whole filesystem, not even in read-only mode! So I need to restrict the `plex` user.


title: Could not boot from an external hard drive

text: I burned a live session of Linux Mint 17 Cinnamon to a USB stick. Then I installed LM17C into an external hard drive by using this USB stick. I managed to do it and even successfully started on my computer. However I have tried to boot it on another computer, yet it did not started and gave the error below:               error: file '/boot/grub/i386-pc/normal.mod' not found.     entering rescue mode...     grub rescue >      My computer has an Intel processor, but the second PC has AMD. I think this is the problem. I do not know how to solve it, though.


title: Is it possible for a shell script to contain both tcsh and bash commands in the same script?

text: Say, I modify a lot of code that uses tcsh, but since a lot of people say that bash is more modern, I'd also like to learn bash along the way. Is it possible for me to use a script that contains both of these commands at the same time? Since this is for personal use, elegance is not an issue.


title: Creating a file from another file on the basis of a numeric value in each line

text: We will generate a csv file with below values.               yp1234,577,1,3     yp5678,570,3,5     yp9012,132,8,9      I need to extract data and create files based on second column. If it's value greater than 577 then the whole line has to be extracted and placed in a separate file. I mean I need a file having lines with second column greater than 577. Please assist using `sed` or `awk` command.


title: Emacs: mode-local macro with dashes and dots

text: In Emacs, how can I make a macro, that is local to the HTML mode, and uses dashes and dots? Take a look at the Elisp below:               (define-abbrev-table 'html-mode-abbrev-table        '(("..." "…")   ; won't work          ("---" "—")    ; won't work          ("aaa" "…")   ; works          ("bbb" "—") )) ; works