title: Broken GLX error when using Bumblebee 3.2.1 on openSUSE 13.1

text: **Update** I started all over again. This time instead of the one-click button for the drivers I installed `nvidia-bumblebee`. This works slightly better because now I have my desktop effects back again. Also applications which need OpenGL are up and running again. However I still cannot run glxspheres:               $ optirun glxspheres     Polygons in scene: 62464     libGL error: failed to load driver: swrast     libGL error: Try again with LIBGL_DEBUG=verbose for more details.     Visual ID of window: 0x20     [VGL] WARNING: The OpenGL rendering context obtained on X display     [VGL]    :8 is indirect, which may cause performance to suffer.                                                                                [VGL]    If :8 is a local X display, then the framebuffer device                                                                                [VGL]    permissions may be set incorrectly.     Context is Indirect     OpenGL Renderer: GeForce GT 540M/PCIe/SSE2     [VGL] ERROR: in readpixels--     [VGL]    358: GL_ARB_pixel_buffer_object extension not available      **Old** I have installed Bumblebee 3.2.1 for openSUSE 13.1 64 bit, unfortunately it is not working properly. The discrete card is OFF as it should, however if I use optirun/primusrun I get the following error:               $ optirun glxspheres64     primus: fatal: broken GLX on main X display          $ primusrun glxspheres64     primus: fatal: broken GLX on main X display      I managed to discover that a symbolic is pointing to a non-existing shared library:               $ cd /usr/lib64/nvidia/xorg/modules/extensions     $ ls -l     $ libglx.so -> /usr/lib64/nvidia/xorg/modules/extensions/libglx.so.331.4x      I do not remember what the exact last digit was, so that's the reason for the trailing x. I changed the symbolic link to point to other similar (existing) shared libraries such as:   * /usr/lib64/xorg/modules/extensions/libglx.so   * /usr/lib64/xorg/modules/updates/extensions/libglx.so.331.79 But that did not work (even after a reboot). So I'm out of ideas. Can someone help me out? For the purpose of completeness I will now elaborate on how I installed bumblebee. **How I installed Bumblebee**   * First I cleaned up my system using this guide: http://smithfarm-thebrain.blogspot.cz/2013/10/opensuse-131-nvidia-optimus-bumblebee.html   * Reboot   * Then I installed Bumblebee according to the section "Procedure" of this guide: http://en.opensuse.org/SDB:NVIDIA_Bumblebee   * According to that same guide I installed the NVIDIA drivers using the one-click button for "GeForce 8 and later" on: http://en.opensuse.org/SDB:NVIDIA_drivers   * Reboot **Output of verifications**               $ groups     users wheel video vboxusers bumblebee          # ls /proc/acpi/bbswitch     /proc/acpi/bbswitch          # cat /proc/acpi/bbswitch     0000:01:00.0 OFF          # systemctl status bumblebeed     bumblebeed.service - Bumblebee C Daemon     Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)     Active: active (running) since Mon 2014-06-16 17:15:54 CEST; 31min ago     Main PID: 730 (bumblebeed)     CGroup: /system.slice/bumblebeed.service             └─730 /usr/sbin/bumblebeed          Jun 16 17:26:21 izanagi bumblebeed[730]: [45B blob data]     Jun 16 17:26:21 izanagi bumblebeed[730]: Try '/usr/bin/mknod --help' for more information.     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964255] [WARN][XORG] (WW) Unresolved symbol: fbGetGCPrivateKey     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964294] [ERROR][XORG] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964301] [ERROR][XORG] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964307] [ERROR][XORG] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964313] [ERROR][XORG] (EE) NVIDIA(0):     you continue to encounter problems, Please try     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964319] [ERROR][XORG] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.     Jun 16 17:26:22 izanagi bumblebeed[730]: [  642.964329] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.     Jun 16 17:26:22 izanagi bumblebeed[730]: [  643.080318] [ERROR][XORG] (EE) Server terminated successfully (0). Closing log file.          $ optirun --status     Bumblebee status: Error (3.2.1): [XORG] (EE) Server terminated successfully (0). Closing log file.


title: Are there any Linux distributions that focus on binary backward compatibility?

text: If you build an executable that works on a current version of Windows, that executable will probably work for many years on newer versions of Windows. Microsoft works very hard to ensure this. With Linux, there's an expectation that you'll have the source code to the software you're using, and therefore breaking binary compatibility is OK as long as you maintain source compatibility. This leads to distros phasing out old library versions and periodically breaking things that used to work. For someone using Linux as a gaming platform, this is a problem, because games tend to be distributed only in binary form. It makes Linux ports look bad when they break, but I have a feeling it would be more productive to try to solve this problem generally, rather than expect everyone to update their ports. Are there any distributions that try to preserve binary compatibility, not necessarily by keeping all old versions around but at least keeping old sonames, such that a binary that works with release n should also work with release n+1? The closest thing I can find is Valve's "Steam Runtime", which is a binary compatibility layer only available to programs distributed through Steam.


title: Wrong amount of free disk space seen after using Gparted

text: I am running Ubuntu 12.04 in a VM. I have recently resized the hard drive of this VM doubling its size with Gparted. However, when I run `df -h`, Ubuntu still sees the old hard drive space, while Gparted sees the new one. How can I force a refresh of this so that the OS can see the correct amount of space available?


title: What are the practical implications, if any, of using software which processes are not the descendants of the window manager?

text: I've set up Openbox on bare X with the slim login manager, all on a systemd init (on Gentoo). I'm using two different terminal emulators on the desktop so as to be able to create different behaviors for each in my `rc.xml` file (standard sized `lxterminal` snap to top left, `roxterm` to right maximized vertically). I went further and added an entry to my `.config/openbox/autostart` file to start lxterminal automatically upon login. Then I opened two other instances of lxterminal manually, as well as roxterm. Looking at the `pstree` output:               systemd        ├─acpid -f       ├─agetty --noclear tty1       ├─at-spi-bus-laun       │   ├─dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork--print-addres       │   └─2*[{at-spi-bus-laun}]       ├─at-spi2-registr --use-gnome-session       │   └─{at-spi2-registr}       ├─dbus-daemon --system --address=systemd: --nofork --nopidfile--systemd-activation       ├─dbus-daemon --fork --print-pid 6 --print-address 8 --session       ├─dbus-launch --exit-with-session /etc/X11/Sessions/openbox       ├─dhcpcd -q --nobackground       ├─lal -c blue -s 10 -b -f %c -w 152       ├─lxterminal   <----------(1)       │   ├─bash       │   │   └─htop       │   ├─bash       │   │   └─su       │   │       └─bash       │   │           └─grc /usr/lib/python-exec/python2.7/grc tail -f ...       │   │               ├─grcat /usr/lib/python-exec/python2.7/grcat conf.log       │   │               └─tail -f /var/log/emerge.log       │   ├─bash       │   │   └─su       │   │       └─bash       │   │           └─grc /usr/lib/python-exec/python2.7/grc tail -f /var/log/dmesg       │   │               ├─grcat /usr/lib/python-exec/python2.7/grcat conf.log       │   │               └─tail -f /var/log/dmesg       │   ├─gnome-pty-helpe       │   └─{lxterminal}       ├─slim -nodaemon -s       │   ├─X -nolisten tcp -br -deferglyphs 16 vt07 -auth /var/run/slim.auth       │   └─sh /etc/X11/Sessions/openbox       │       └─openbox --startup /usr/libexec/openbox-autostart OPENBOX       │           ├─firefox       │           │   ├─plugin-containe /usr/lib64/nsbrowser/plugins/libflashplayer.so ...       │           │   │   └─6*[{plugin-containe}]       │           │   └─35*[{firefox}]       │           └─roxterm   <------------------------(2)       │               ├─bash       │               │   └─pstree -a       │               ├─gnome-pty-helpe       │               └─{roxterm}       ├─systemd --user       │   └─(sd-pam)                        ├─systemd-journal       ├─systemd-logind       ├─systemd-udevd       └─xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55      I noticed that lxterminal(1) and the other instances of `bash` I called through launching it manually are not children instances of the slim/X/openbox processes, like roxterm(2) or firefox are; rather their parent is systemd directly. I don't understand why something stemming from Openbox autostart can yield a process that wouldn't be its direct descendant. Nevertheless, inspired by how seemingly some of the 'widgets' are set up under Archbang, I modified autostart to include a substitution `$(lxterminal) &` instead of just `lxterminal &`. The result is still outside the Openbox process context and here's the relevant part:               ├─sh /home/myuser/.config/openbox/autostart       │   └─lxterminal <----------------------(3)       │       ├─bash       │       ├─bash       │       │   └─pstree -a       │       ├─gnome-pty-helpe       │       └─{lxterminal}        * What are the practical implications, if any, from using software which processes don't stem from your window manager like with lxterminal(1) here and which are not 'gated' so to speak by your login manager?   * Does the substitution in (3) introduce anything new to the setup (i.e. is it different than in (1) and how so )? * * * Part of `ps -aux` output, for a look at the _process state_ column (see codes in man) etc.:               root         1  0.0  0.0  40008  3096 ?        Ss   17:16   0:00 /usr/lib/systemd/systemd     ...     root       3290  0.0  0.0  30048  1656 ?        Ss   17:17   0:00 /usr/lib/systemd/systemd-logind     root       3291  0.0  0.0   4248   824 ?        Ss   17:17   0:00 /usr/sbin/acpid -f     message+   3292  0.0  0.0  21732  1568 ?        Ss   17:17   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation     root       3299  0.0  0.0  19900  1104 tty1     Ss+  17:17   0:00 /sbin/agetty --noclear tty1     user       3359  0.0  0.0  30916  2064 ?        Ss   17:17   0:00 /usr/lib/systemd/systemd --user     user       3362  0.0  0.0  56820  1132 ?        S    17:17   0:00 (sd-pam)                      root       3820  0.0  0.0      0     0 ?        S    17:31   0:00 [kworker/1:1]     root       3823  0.0  0.0      0     0 ?        S    17:31   0:00 [kworker/3:0]     root       4644  0.0  0.0      0     0 ?        S    18:09   0:00 [kworker/1:2]     root       4912  0.0  0.0      0     0 ?        S    18:18   0:00 [kworker/1:0]     root       4918  0.0  0.0      0     0 ?        S    18:18   0:00 [kworker/0:0]     root       4919  0.2  0.4 132660 17632 ?        Ss   18:18   0:00 /usr/bin/slim -nodaemon -s     root       4921  2.6  0.8 132044 34176 tty7     Ss+  18:18   0:05 /usr/bin/X -nolisten tcp -br -deferglyphs 16 vt07 -auth /var/run/slim.auth     user       4931  0.0  0.0  14804  1384 ?        S    18:18   0:00 /bin/sh /etc/X11/Sessions/openbox     user       4961  0.0  0.0  24480   628 ?        S    18:18   0:00 /usr/bin/dbus-launch --exit-with-session /etc/X11/Sessions/openbox     user       4962  0.0  0.0  21716  1068 ?        Ss   18:18   0:00 /usr/bin/dbus-daemon --fork --print-pid 6 --print-address 8 --session     user       4963  0.1  0.2 108152  9484 ?        S    18:18   0:00 /usr/bin/openbox --startup /usr/libexec/openbox-autostart OPENBOX     user       4973  0.0  0.0  31056  2896 ?        S    18:18   0:00 xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55     user       4974  0.0  0.0  35636  3764 ?        S    18:18   0:00 lal -c blue -s 10 -b -f %c -w 152     user       4976  0.1  0.3 330660 12916 ?        Sl   18:18   0:00 lxterminal     user       4978  0.0  0.0  14696   808 ?        S    18:18   0:00 gnome-pty-helper     user       4979  0.0  0.0  23368  2200 pts/0    Ss   18:18   0:00 /bin/bash     user       4988  0.0  0.0  23368  2200 pts/1    Ss   18:18   0:00 /bin/bash     user       4996  0.0  0.0  23368  2252 pts/2    Ss   18:18   0:00 /bin/bash     user       5003  0.4  0.0  21668  1952 pts/0    S+   18:18   0:00 htop     user       5004  0.2  0.4 300924 18704 ?        Sl   18:19   0:00 roxterm     user       5006  0.0  0.0 258980  2972 ?        Sl   18:19   0:00 /usr/libexec/at-spi-bus-launcher     user       5009  0.0  0.0  21612  1508 ?        S    18:19   0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3     user       5012  0.0  0.0 120304  3284 ?        Sl   18:19   0:00 /usr/libexec/at-spi2-registryd --use-gnome-session     user       5014  0.0  0.0  14696   780 ?        S    18:19   0:00 gnome-pty-helper     user       5015  0.0  0.0  23368  2316 pts/3    Ss   18:19   0:00 -bash     root       5027  0.0  0.0  59876  2020 pts/1    S    18:19   0:00 su     root       5030  0.0  0.0  23480  2292 pts/1    S    18:19   0:00 bash     root       5035  0.0  0.1  24904  4796 pts/1    S+   18:19   0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/grc tail -f /var/log/emerge.log     root       5036  0.0  0.0   7292   608 pts/1    S+   18:19   0:00 tail -f /var/log/emerge.log     root       5037  0.0  0.1  25180  4860 pts/1    S+   18:19   0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/grcat conf.log     root       5039  0.0  0.0  59876  2020 pts/2    S    18:19   0:00 su     root       5042  0.0  0.0  23476  2292 pts/2    S    18:19   0:00 bash     root       5047  0.0  0.1  24904  4792 pts/2    S+   18:19   0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/grc tail -f /var/log/dmesg     root       5048  0.0  0.0   7292   612 pts/2    S+   18:19   0:00 tail -f /var/log/dmesg     root       5049  0.0  0.1  25180  4856 pts/2    S+   18:19   0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/grcat conf.log     user       5051 10.6  5.7 901616 231196 ?       Sl   18:19   0:13 /opt/firefox/firefox     root       5106  0.0  0.0  59876  2020 pts/3    S    18:20   0:00 su     root       5109  0.0  0.0  23488  2380 pts/3    S    18:20   0:00 bash     root       5181  0.0  0.0  20560  1304 pts/3    R+   18:22   0:00 ps -aux


title: How to make HA Heartbeat failover when either of two NICs connection is lost?

text: I was successful in configuring a simple Heartbeat setup on Ubuntu 12.04, which will fail-over two VIPs to a second server when BOTH Ethernet links fail. What I can't figure out is how to fail-over two VIPs when either of the two NICs loses a link connection. Heartbeat will detect the link is down, but until both go down, resources will not fail-over. I'm not using any cluster management like Pacemaker. I would appreciate a point in the right direction.


title: How do I echo an expression with both single and double quotes?

text: I have tried many things, but I'm new to the shell. Is it possible to have both double and single quotes within an `echo`? I want to generate `echo "scan 'LPV',{FILTER => "(PrefixFilter ('MP1-Eq1')"}"` for system call, but I am getting an error because of the mutiple double and single quotes.               ftable="echo" " \"" "scan" " " "'LPV',{FILTER => " "\"" "\(" "PrefixFilter ""\(""'MP1-Eq1'" "\)" "\"" "\}" "\" "         echo "scan 'LPV',{FILTER => "(PrefixFilter ('MP1-Eq1')"}"     bash: syntax error near unexpected token `('      How can I write `scan 'LPV',{FILTER => "(PrefixFilter ('MP1-Eq1')"}`? The syntax is `hbase`'s and I can't change it... **EDIT** I want to call **echo** within **system call**.               ftable="echo "scan 'LPV',{FILTER => "(PrefixFilter ('MP1-Eq1')"}" "     system(ftable)     error      I have tried with $ but               ftable="echo $'scan" "\'" "LPV" "\'" ",{FILTER => " "\"" "(PrefixFilter (" "\'" "MP1-Eq1" "\'" ")" "\"" "}' '"     system(ftable)     error      Getting an error because of double quote.


title: How to back up and restore(linux mint) all softwares and files from C drive when windows 7 boots but stops at black screen

text: I have Windows7(32 bit) and Linux mint 16(64 bit) dual boot computer. Windows 7 boots but stops at the black screen. But I can boot normally from mint and can access windows7 files through mint . Now to repair I have done following process: (i)Start up repair: It could not found any problem. (ii)`Ctrl`+`Alt`+`Del` or `Ctrl`+`Alt`+`Esc` also didn't show up task manager (iii)Bootrec.exe using command prompt: and then all the things that people suggest to do. But unfortunately that destroyed grub menu. But I recovered that grub menu using "Try Ubuntu" and then installing "boot repair". Now I can again access my computer using linux mint. (iv)regedit using command prompt: I have done all things to change something to explorer.exe (v) tapping shift buttons for more than five times. But that also didn't show up any thing. None of the above method could solve the problem. I don't know whether there is any other methods to try. If any one suggests some other method I will try. If there is no other method to try, I want to back up all my installed software in C drive to mint or some external hard disk and then restore it after "custom" re-installation of windows7 . Don't bother about normal files in C drive as I can simply "cut and paste" those form windows 7 to linux mint.


title: SSH connection timed out. it's not client or server...what now?

text: I have been using a Linux server via SSH for months, it still works from other locations but for some reason, this week, it isn't working from the office. Putty says "Connection timed out" Is there a way to determine where the problem is? Can i trace route on port 22 or something like that? Just to clarify. I can SSH to my home Linux box, then SSH to the server. I just can't SSH to the server from work. I have contacted the host and I'm not blocked or blacklisted or anything like that.


title: Mounting root filesystem while booting through network

text: I have two systems, let say one is the server and the other is the client. I want to load `kernel image` from the server to the client through the network. I used `dhcp (isc-dhcp-server)` and `tftp (tftpd-hpa)`. At the server side, I made the necessary changes in `/etc/dhcp/dhcp.conf` file to assign the IP address to the client. I created the directory`/tftpboot` and I copied `pxelinux.0`from the server. Inside `/tftpboot`, I created a directory with the name `pxelinux.cfg` and inside `pxelinux.cfg` I created a file with the name default: `/tftpboot/pxelinux.cfg/default` . In that file my boot arguments are               default openwrt     label openwrt     kernel openwrt-x86-generic-vmlinuz     append boot=nfs root=/dev/nfs root=nfs:server-ipaddress:/tftpboot ip=dhcp  rw      And my question is, I am able to load the kernel but I am not able to `mount` the desired file system to the client while booting only. What have I done wrong?


title: How can I compile minix when I make changes in libraries

text: I am looking for a way to compile minix. The `make hdboot` command seems to do nothing with the directories under `/usr/src/lib`. I changed only one `.c` file in syslib. Do I have to do `make world` for this ?


title: How to terminate remotely called "tail -f" when connection is closed?

text: I just noticed that if I execute `ssh user@remote_host tail -f /some/file` , then `tail -f /some/file` keeps running on the remote_host even if ssh connection is closed! So, after several connects and disconnects, number of running `tail -f /some/file` grows. How to actually terminate `tail -f` when ssh connection is closed?


title: convert many eps files in a single pdf or ps file using shell scriptI

text: I have SSt12.OLR.1.eps, SSt12.OLR.2.eps SSt12.OLR.3.eps SSt12.OLR.4.eps ......and covert these eps files into single pdf or post script file. please suggest a shell script.


title: Learning to use ksh88 in HP-UX

text: I am just a plain Linux user who played some distros since 2-3 years. Now, in the company I work there's an HP-UX server. And when I get connected to it I really felt myself like a grandma seeing first time a computer. It is really different from bash, there's no auto-completion nor anything else to ease life. What documentation should I go through to speed my learning curve and start to administer that server?


title: How to send packets coming from a second router on a particular port back to the router, using iptables not a route

text: I have a Linux server which runs a particular service listening on a single TCP port. The Linux server connects to the internet using a PPP connection and also acts as router for a local network using an Ethernet connection. I keep a firewall running on this server and manage it using Shorewall package. Recently I got another internet link to use as a redundant IP address for my clients to connect to and use the service. This ISP gives me a modem which should connect to my LAN switch and has an IP address of `192.168.1.10`. I configured this modem to forward the service port to my server which is at `192.168.1.2`. The problem is users can not connect through the new connection to server, routing configuration on new modem is limited (I can't tell it to do SNAT) and I don't know what sort of configuration I need on the firewall on server. In simple words I need to tell the firewall on server, when packets come from `192.168.1.10` on port 1234, send the replies back to `192.168.1.10`, despite whatever destination IP address is. My best bet so far from my searches is http://www.shorewall.net/MultiISP.html which requires playing with server routes. Is there any simpler way to do this preferably using iptables and shorewall?


title: What is the difference between -m conntrack --ctstate and -m state --state

text: I'm reading this howto, and there's something like this: > We can allow established sessions to receive traffic: >   >   >     $ sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j > ACCEPT >   > > The above rule has no spaces either side of the comma in ESTABLISHED,RELATED > > If the line above doesn't work, you may be on a castrated VPS whose provider > has not made available the extension, in which case an inferior version can > be used as last resort: >   >   >     $ sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT >   Is there a significant difference in working between `-m conntrack --ctstate` and `-m state --state`? They say that one may not work, but they don't say why. Why should I prefer one over the other?


title: Using wget over ssh with a terminated session

text: I have a RaspberryPi. I want to download a big file with `wget` but the problem is that once I log into the Pi and use `wget` to download the file, it will abort the download when I close the session. How can I force wget to continue the download after the session is terminated?


title: dd to clone to smaller sdcard

text: One of my Raspberry Pi's is using a 4GB SDcard for the root/boot filesystem. As seen when mounted on another system:               Disk /dev/sdc: 3904 MB, 3904897024 bytes     121 heads, 62 sectors/track, 1016 cylinders     Units = cylinders of 7502 * 512 = 3841024 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000714e9             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1               2          17       57344    c  W95 FAT32 (LBA)     /dev/sdc2              17         800     2938880   83  Linux      This shows that I'm only (and deliberately) using 3GB of the available 4GB and that the cyclinders in use are aligned to the beginning (if flash memory even works that way). In the past I have used the `cp` command to migrate an existing filesystem to a smaller (already formatted) target filesystem but I prefer the simplicity of the `dd` command. Q1: Can I safely use `dd` to clone this disk to another, slightly smaller (44MB smaller to be precise) 4GB SDcard? If the source disk had a second partition that filled up the entire remaining disk space but had a filesystem that was only partially used, I'm pretty confident that over time I could end up with scattered bits of files even near the end of the partition (potentially overwriting the boundaries of the physical target disk). Q2a: is there perhaps a move-files-to-beginning-kinda-defrag command that I can run to make sure the end of the partition was unused? Q2b: if I knew the end of the partition was unused, could I safely truncate the partition with `dd` to the smaller target disk and correct the misalignment afterwards with a simple `fsck`?


title: How to set custom default size for new XFCE terminal windows?

text: I use XFCE 4.8. I'd like new terminal windows to be wider by default (when I start a new terminal instance), but can't find where to configure this. Do you happen to know?


title: How is file owner and group remembered for an external drive?

text: I formatted an external hard drive with an ext4 partition and subsequently mounted it. So that I could use the new partition, I did: `sudo chown me:me /mount/directory` to change the file owner and group from root to me, which worked fine. This change is persistant, so I wonder where this information is stored. If I detach the hard drive then mount it to a different directory, I'm still set as the file owner and group, so the information can't be stored in the mount directory's inode. So does the whole partition have its own inode where this sort of information is stored, and if so, is there a way to view it? Or is there perhaps another place where the information gets stored?


title: Kconfig - compiling kernel module

text: I stumbled over this site about USB video grabber under Linux, I'm trying to compile the code found here. I have read about makefiles but this one confuses me, cause it's so short:               usbtv-y := usbtv-core.o \         usbtv-video.o          obj-$(CONFIG_VIDEO_USBTV) += usbtv.o      I wanted to write now my own makefile. What I want to know now is, what the `Kconfig` file is for and how to use it. I have a hard time finding more information about how to use it. Can someone enlighten me please? Here's the Kconfig file:               config VIDEO_USBTV             tristate "USBTV007 video capture support"             depends on VIDEO_V4L2             select VIDEOBUF2_VMALLOC                  ---help---               This is a video4linux2 driver for USBTV007 based video capture devices.                    To compile this driver as a module, choose M here: the               module will be called usbtv


title: What is meant by interrupt remapping in Linux?

text: Can anyone explain what the interrupt remapping is? Would turning this feature off in the Linux kernel cause any problems, or bring any benefits?


title: Disabling/enabling language specific mappings in Vim

text: I have `:set keymap=russian-jcukenwin`. In this keyboard mapping ``` maps to `ё`. I want to unmap this backtick.               :lmap `     l  `           *@ё     :lunmap `     E31: No such mapping      Why `lunmap `` gives an error? How can I unmap it?


title: Mint 15 frozen at startup, don't know why

text: yesterday I installed Mint 15 MATE on my laptop. Everything worked perfectly, so I installed some packages (python-django, mysql-server, and some other python modules). I also made an apt-get update && apt-get upgrade. Finally I selected a NVIDIA propietary driver recomended by Mint, and changed the desktop icons. I did nothing else, and everything worked. Until today. I powered the laptop, and the first thing I see is an "old-fashined" way of asking for the encryption password at startup, almost console stylish, when yesterday was a little Mint logo and a window for the input. After that, login screen appears. And then it gets frozen. Sometimes it happens at the login screen (even when I'm writting the password, so it gets stuck when I have written only a few chars), and sometimes I'm fast enough to login and see the desktop, but then it gets frozen anyway. I guess it's just a matter of time before some module gets loaded. I can move the mouse, but anything else works. What can I do to fix this? I am willing to give you more information if you explain me how. I tried to pause booting sequence to see if there is something wrong (I have been able to see 2 FAILES, one realtive to the avahi daemon, but I don't know how to pause the sequence in order to read it).


title: Stop netcat when VirtualBox closes

text: Using netcat to redirect print output from DOS program in VirtualBox under OSX.               #!/bin/bash     VBoxManage startvm FreeDOS     while :     do         nc -l 1235 | lpr     done      This works except that when VirtualBox closes netcat keeps running. There must be a better way!


title: Adding Objective C compiler to GCC 4.7.2

text: I finished building the GCC 4.7.2 with C, C++ and Go compilers on my Ubuntu 12.04. I now want to add the Objective C compiler, is it possible to add it to the previous build? If so, how should i proceed? Thanks.


title: Is screen useful?

text: When I need to open different processes or terminals that I need to check, I just open a new tab in my terminal and use different workspaces in my machine to keep everything organized. I do some web development, using a Linux machine. I've seen that a lot of people use screen to accomplish what I'm doing, but I can't see any advantage. In fact, I thought it would be worse since now I have to remember all states in screen instead of having some terminals in a workspace named "terminals". What am I missing? How do you actually use screen?


Compiling this: http://linux.softpedia.com/progDownload/Indexed-PDF-Creator- Download-1071.html               anisha@linux-dopx:~/tarBalls/ipdf-1.0.0> ./configure --build=x86_64     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for gawk... gawk     checking whether make sets $(MAKE)... yes     checking for gcc... gcc     checking for C compiler default output... a.out     checking whether the C compiler works... yes     checking whether we are cross compiling... no     checking for suffix of executables...      checking for suffix of object files... o     checking whether we are using the GNU C compiler... yes     checking whether gcc accepts -g... yes     checking for gcc option to accept ANSI C... none needed     checking for style of include used by make... GNU     checking dependency style of gcc... gcc3     checking build system type... Invalid configuration `x86_64': machine `x86_64' not recognized     configure: error: /bin/sh ./config.sub x86_64 failed      on:               anisha@linux-dopx:~/> uname -a && cat /etc/issue     Linux linux-dopx 3.2.1-12-desktop #1 SMP PREEMPT Thu Jan 19 16:02:50 IST 2012 x86_64 x86_64 x86_64 GNU/Linux     Welcome to openSUSE 11.3 "Teal" - Kernel \r (\l).      `config.sub` is as follows:               > #! /bin/sh     # Configuration validation subroutine script, version 1.1.     #   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.     # This file is (in principle) common to ALL GNU software.     # The presence of a machine in this file suggests that SOME GNU software     # can handle that machine.  It does not imply ALL GNU software can.     #     # This file is free software; you can redistribute it and/or modify     # it under the terms of the GNU General Public License as published by     # the Free Software Foundation; either version 2 of the License, or     # (at your option) any later version.     #     # This program is distributed in the hope that it will be useful,     # but WITHOUT ANY WARRANTY; without even the implied warranty of     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     # GNU General Public License for more details.     #     # You should have received a copy of the GNU General Public License     # along with this program; if not, write to the Free Software     # Foundation, Inc., 59 Temple Place - Suite 330,     # Boston, MA 02111-1307, USA.          # As a special exception to the GNU General Public License, if you     # distribute this file as part of a program that contains a     # configuration script generated by Autoconf, you may include it under     # the same distribution terms that you use for the rest of that program.          # Configuration subroutine to validate and canonicalize a configuration type.     # Supply the specified configuration type as an argument.     # If it is invalid, we print an error message on stderr and exit with code 1.     # Otherwise, we print the canonical config type on stdout and succeed.          # This file is supposed to be the same for all GNU packages     # and recognize all the CPU types, system types and aliases     # that are meaningful with *any* GNU software.     # Each package is responsible for reporting which valid configurations     # it does not support.  The user should be able to distinguish     # a failure to support a valid configuration from a meaningless     # configuration.          # The goal of this file is to map all the various variations of a given     # machine specification into a single specification in the form:     #   CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM     # or in some cases, the newer four-part form:     #   CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM     # It is wrong to echo any other type of specification.          if [ x$1 = x ]     then         echo Configuration name missing. 1>&2         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2         echo "or     $0 ALIAS" 1>&2         echo where ALIAS is a recognized configuration type. 1>&2         exit 1     fi          # First pass through any local machine types.     case $1 in         *local*)             echo $1             exit 0             ;;         *)         ;;     esac          # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).     # Here we must recognize all the valid KERNEL-OS combinations.     maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`     case $maybe_os in       linux-gnu*)         os=-$maybe_os         basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`         ;;       *)         basic_machine=`echo $1 | sed 's/-[^-]*$//'`         if [ $basic_machine != $1 ]         then os=`echo $1 | sed 's/.*-/-/'`         else os=; fi         ;;     esac          ### Let's recognize common machines as not being operating systems so     ### that things like config.sub decstation-3100 work.  We also     ### recognize some manufacturers as not being operating systems, so we     ### can provide default operating systems below.     case $os in         -sun*os*)             # Prevent following clause from handling this invalid input.             ;;         -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \         -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \         -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \         -apple)             os=             basic_machine=$1             ;;         -hiux*)             os=-hiuxwe2             ;;         -sco5)             os=sco3.2v5             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -sco4)             os=-sco3.2v4             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -sco3.2.[4-9]*)             os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -sco3.2v[4-9]*)             # Don't forget version if it is 3.2v4 or newer.             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -sco*)             os=-sco3.2v2             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -isc)             os=-isc2.2             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -clix*)             basic_machine=clipper-intergraph             ;;         -isc*)             basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`             ;;         -lynx*)             os=-lynxos                 ;;         -ptx*)             basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`             ;;         -windowsnt*)             os=`echo $os | sed -e 's/windowsnt/winnt/'`             ;;         -psos*)             os=-psos             ;;     esac          # Decode aliases for certain CPU-COMPANY combinations.     case $basic_machine in         # Recognize the basic CPU types without company name.         # Some are omitted here because they have special meanings below.         tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \             | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \             | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \             | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \             | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \             | mips64 | mipsel | mips64el | mips64orion | mips64orionel \             | mipstx39 | mipstx39el \             | sparc | sparclet | sparclite | sparc64 | v850)             basic_machine=$basic_machine-unknown             ;;         # We use `pc' rather than `unknown'         # because (1) that's what they normally are, and         # (2) the word "unknown" tends to confuse beginning users.         i[34567]86)           basic_machine=$basic_machine-pc           ;;         # Object if more than one company name word.         *-*-*)             echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2             exit 1             ;;         # Recognize the basic CPU types with company name.         vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \               | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \               | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \               | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \               | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \               | sparc64-* | mips64-* | mipsel-* \               | mips64el-* | mips64orion-* | mips64orionel-*  \               | mipstx39-* | mipstx39el-* \               | f301-*)             ;;         # Recognize the various machine names and aliases which stand         # for a CPU type and a company and sometimes even an OS.         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)             basic_machine=m68000-att             ;;         3b*)             basic_machine=we32k-att             ;;         alliant | fx80)             basic_machine=fx80-alliant             ;;         altos | altos3068)             basic_machine=m68k-altos             ;;         am29k)             basic_machine=a29k-none             os=-bsd             ;;         amdahl)             basic_machine=580-amdahl             os=-sysv             ;;         amiga | amiga-*)             basic_machine=m68k-cbm             ;;         amigaos | amigados)             basic_machine=m68k-cbm             os=-amigaos             ;;         amigaunix | amix)             basic_machine=m68k-cbm             os=-sysv4             ;;         apollo68)             basic_machine=m68k-apollo             os=-sysv             ;;         aux)             basic_machine=m68k-apple             os=-aux             ;;         balance)             basic_machine=ns32k-sequent             os=-dynix             ;;         convex-c1)             basic_machine=c1-convex             os=-bsd             ;;         convex-c2)             basic_machine=c2-convex             os=-bsd             ;;         convex-c32)             basic_machine=c32-convex             os=-bsd             ;;         convex-c34)             basic_machine=c34-convex             os=-bsd             ;;         convex-c38)             basic_machine=c38-convex             os=-bsd             ;;         cray | ymp)             basic_machine=ymp-cray             os=-unicos             ;;         cray2)             basic_machine=cray2-cray             os=-unicos             ;;         [ctj]90-cray)             basic_machine=c90-cray             os=-unicos             ;;         crds | unos)             basic_machine=m68k-crds             ;;         da30 | da30-*)             basic_machine=m68k-da30             ;;         decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)             basic_machine=mips-dec             ;;         delta | 3300 | motorola-3300 | motorola-delta \               | 3300-motorola | delta-motorola)             basic_machine=m68k-motorola             ;;         delta88)             basic_machine=m88k-motorola             os=-sysv3             ;;         dpx20 | dpx20-*)             basic_machine=rs6000-bull             os=-bosx             ;;         dpx2* | dpx2*-bull)             basic_machine=m68k-bull             os=-sysv3             ;;         ebmon29k)             basic_machine=a29k-amd             os=-ebmon             ;;         elxsi)             basic_machine=elxsi-elxsi             os=-bsd             ;;         encore | umax | mmax)                 basic_machine=ns32k-encore             ;;         fx2800)             basic_machine=i860-alliant             ;;         genix)             basic_machine=ns32k-ns             ;;         gmicro)             basic_machine=tron-gmicro             os=-sysv             ;;         h3050r* | hiux*)             basic_machine=hppa1.1-hitachi             os=-hiuxwe2             ;;         h8300hms)             basic_machine=h8300-hitachi             os=-hms             ;;         harris)             basic_machine=m88k-harris             os=-sysv3             ;;         hp300-*)             basic_machine=m68k-hp             ;;         hp300bsd)             basic_machine=m68k-hp             os=-bsd             ;;         hp300hpux)             basic_machine=m68k-hp             os=-hpux             ;;         hp9k2[0-9][0-9] | hp9k31[0-9])             basic_machine=m68000-hp             ;;         hp9k3[2-9][0-9])             basic_machine=m68k-hp             ;;         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)             basic_machine=hppa1.1-hp             ;;         hp9k8[0-9][0-9] | hp8[0-9][0-9])             basic_machine=hppa1.0-hp             ;;         hppa-next)                 os=-nextstep3             ;;         i370-ibm* | ibm*)             basic_machine=i370-ibm             os=-mvs             ;;     # I'm not sure what "Sysv32" means.  Should this be sysv3.2?         i[34567]86v32)             basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`             os=-sysv32             ;;         i[34567]86v4*)             basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`             os=-sysv4             ;;         i[34567]86v)             basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`             os=-sysv             ;;         i[34567]86sol2)             basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`             os=-solaris2             ;;         iris | iris4d)             basic_machine=mips-sgi             case $os in                 -irix*)                 ;;                 *)                 os=-irix4                 ;;             esac             ;;         isi68 | isi)             basic_machine=m68k-isi             os=-sysv             ;;         m88k-omron*)             basic_machine=m88k-omron             ;;         magnum | m3230)             basic_machine=mips-mips             os=-sysv             ;;         merlin)             basic_machine=ns32k-utek             os=-sysv             ;;         miniframe)             basic_machine=m68000-convergent             ;;         mipsel*-linux*)             basic_machine=mipsel-unknown             os=-linux-gnu             ;;         mips*-linux*)             basic_machine=mips-unknown             os=-linux-gnu             ;;         mips3*-*)             basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`             ;;         mips3*)             basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown             ;;         ncr3000)             basic_machine=i486-ncr             os=-sysv4             ;;         news | news700 | news800 | news900)             basic_machine=m68k-sony             os=-newsos             ;;         news1000)             basic_machine=m68030-sony             os=-newsos             ;;         news-3600 | risc-news)             basic_machine=mips-sony             os=-newsos             ;;         next | m*-next )             basic_machine=m68k-next             case $os in                 -nextstep* )                 ;;                 -ns2*)                   os=-nextstep2                 ;;                 *)                   os=-nextstep3                 ;;             esac             ;;         nh3000)             basic_machine=m68k-harris             os=-cxux             ;;         nh[45]000)             basic_machine=m88k-harris             os=-cxux             ;;         nindy960)             basic_machine=i960-intel             os=-nindy             ;;         np1)             basic_machine=np1-gould             ;;         pa-hitachi)             basic_machine=hppa1.1-hitachi             os=-hiuxwe2             ;;         paragon)             basic_machine=i860-intel             os=-osf             ;;         pbd)             basic_machine=sparc-tti             ;;         pbb)             basic_machine=m68k-tti             ;;             pc532 | pc532-*)             basic_machine=ns32k-pc532             ;;         pentium | p5 | k5 | nexen)             basic_machine=i586-pc             ;;         pentiumpro | p6 | k6 | 6x86)             basic_machine=i686-pc             ;;         pentiumii | pentium2)             basic_machine=i786-pc             ;;         pentium-* | p5-* | k5-* | nexen-*)             basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`             ;;         pentiumpro-* | p6-* | k6-* | 6x86-*)             basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`             ;;         pentiumii-* | pentium2-*)             basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`             ;;         pn)             basic_machine=pn-gould             ;;         power)  basic_machine=rs6000-ibm             ;;         ppc)    basic_machine=powerpc-unknown                 ;;         ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`             ;;         ppcle | powerpclittle | ppc-le | powerpc-little)             basic_machine=powerpcle-unknown                 ;;         ppcle-* | powerpclittle-*)             basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`             ;;         ps2)             basic_machine=i386-ibm             ;;         rm[46]00)             basic_machine=mips-siemens             ;;         rtpc | rtpc-*)             basic_machine=romp-ibm             ;;         sequent)             basic_machine=i386-sequent                 ;;         sh)             basic_machine=sh-hitachi             os=-hms             ;;         sps7)             basic_machine=m68k-bull             os=-sysv2             ;;         spur)             basic_machine=spur-unknown             ;;         sun2)             basic_machine=m68000-sun             ;;         sun2os3)             basic_machine=m68000-sun             os=-sunos3             ;;         sun2os4)             basic_machine=m68000-sun             os=-sunos4             ;;         sun3os3)             basic_machine=m68k-sun             os=-sunos3             ;;         sun3os4)             basic_machine=m68k-sun             os=-sunos4             ;;         sun4os3)             basic_machine=sparc-sun             os=-sunos3             ;;         sun4os4)             basic_machine=sparc-sun             os=-sunos4             ;;         sun4sol2)             basic_machine=sparc-sun             os=-solaris2             ;;         sun3 | sun3-*)             basic_machine=m68k-sun             ;;         sun4)             basic_machine=sparc-sun             ;;         sun386 | sun386i | roadrunner)             basic_machine=i386-sun             ;;         symmetry)             basic_machine=i386-sequent             os=-dynix             ;;         tx39)             basic_machine=mipstx39-unknown             ;;         tx39el)             basic_machine=mipstx39el-unknown             ;;         tower | tower-32)             basic_machine=m68k-ncr             ;;         udi29k)             basic_machine=a29k-amd             os=-udi             ;;         ultra3)             basic_machine=a29k-nyu             os=-sym1             ;;         vaxv)             basic_machine=vax-dec             os=-sysv             ;;         vms)             basic_machine=vax-dec             os=-vms             ;;         vpp*|vx|vx-*)                    basic_machine=f301-fujitsu                    ;;         vxworks960)             basic_machine=i960-wrs             os=-vxworks             ;;         vxworks68)             basic_machine=m68k-wrs             os=-vxworks             ;;         vxworks29k)             basic_machine=a29k-wrs             os=-vxworks             ;;         xmp)             basic_machine=xmp-cray             os=-unicos             ;;             xps | xps100)             basic_machine=xps100-honeywell             ;;         none)             basic_machine=none-none             os=-none             ;;          # Here we handle the default manufacturer of certain CPU types.  It is in     # some cases the only manufacturer, in others, it is the most popular.         mips)             if [ x$os = x-linux-gnu ]; then                 basic_machine=mips-unknown             else                 basic_machine=mips-mips             fi             ;;         romp)             basic_machine=romp-ibm             ;;         rs6000)             basic_machine=rs6000-ibm             ;;         vax)             basic_machine=vax-dec             ;;         pdp11)             basic_machine=pdp11-dec             ;;         we32k)             basic_machine=we32k-att             ;;         sparc)             basic_machine=sparc-sun             ;;             cydra)             basic_machine=cydra-cydrome             ;;         orion)             basic_machine=orion-highlevel             ;;         orion105)             basic_machine=clipper-highlevel             ;;         *)             echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2             exit 1             ;;     esac          # Here we canonicalize certain aliases for manufacturers.     case $basic_machine in         *-digital*)             basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`             ;;         *-commodore*)             basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`             ;;         *)             ;;     esac          # Decode manufacturer-specific aliases for certain operating systems.          if [ x"$os" != x"" ]     then     case $os in             # First match some system type aliases             # that might get confused with valid system types.         # -solaris* is a basic system type, with this one exception.         -solaris1 | -solaris1.*)             os=`echo $os | sed -e 's|solaris1|sunos4|'`             ;;         -solaris)             os=-solaris2             ;;         -svr4*)             os=-sysv4             ;;         -unixware*)             os=-sysv4.2uw             ;;         -gnu/linux*)             os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`             ;;         # First accept the basic system types.         # The portable systems comes first.         # Each alternative MUST END IN A *, to match a version number.         # -sysv* is not here because it comes later, after sysvr4.         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \               | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \               | -aos* \               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \               | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \               | -openstep*)         # Remember, each alternative MUST END IN *, to match a version number.             ;;         -linux*)             os=`echo $os | sed -e 's|linux|linux-gnu|'`             ;;         -sunos5*)             os=`echo $os | sed -e 's|sunos5|solaris2|'`             ;;         -sunos6*)             os=`echo $os | sed -e 's|sunos6|solaris3|'`             ;;         -osfrose*)             os=-osfrose             ;;         -osf*)             os=-osf             ;;         -utek*)             os=-bsd             ;;         -dynix*)             os=-bsd             ;;         -acis*)             os=-aos             ;;         -ctix* | -uts*)             os=-sysv             ;;         -ns2 )                 os=-nextstep2             ;;         # Preserve the version number of sinix5.         -sinix5.*)             os=`echo $os | sed -e 's|sinix|sysv|'`             ;;         -sinix*)             os=-sysv4             ;;         -triton*)             os=-sysv3             ;;         -oss*)             os=-sysv3             ;;         -svr4)             os=-sysv4             ;;         -svr3)             os=-sysv3             ;;         -sysvr4)             os=-sysv4             ;;         # This must come after -sysvr4.         -sysv*)             ;;         -xenix)             os=-xenix             ;;         -none)             ;;         *)             # Get rid of the `-' at the beginning of $os.             os=`echo $os | sed 's/[^-]*-//'`             echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2             exit 1             ;;     esac     else          # Here we handle the default operating systems that come with various machines.     # The value should be what the vendor currently ships out the door with their     # machine or put another way, the most popular os provided with the machine.          # Note that if you're going to try to match "-MANUFACTURER" here (say,     # "-sun"), then you have to tell the case statement up towards the top     # that MANUFACTURER isn't an operating system.  Otherwise, code above     # will signal an error saying that MANUFACTURER isn't an operating     # system, and we'll never get to this point.          c    ase $basic_machine in         *-acorn)             os=-riscix1.2             ;;         arm*-semi)             os=-aout             ;;             pdp11-*)             os=-none             ;;         *-dec | vax-*)             os=-ultrix4.2             ;;         m68*-apollo)             os=-domain             ;;         i386-sun)             os=-sunos4.0.2             ;;         m68000-sun)             os=-sunos3             # This also exists in the configure program, but was not the             # default.             # os=-sunos4             ;;         *-tti)  # must be before sparc entry or we get the wrong os.             os=-sysv3             ;;         sparc-* | *-sun)             os=-sunos4.1.1             ;;         *-be)             os=-beos             ;;         *-ibm)             os=-aix             ;;         *-hp)             os=-hpux             ;;         *-hitachi)             os=-hiux             ;;         i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)             os=-sysv             ;;         *-cbm)             os=-amigaos             ;;         *-dg)             os=-dgux             ;;         *-dolphin)             os=-sysv3             ;;         m68k-ccur)             os=-rtu             ;;         m88k-omron*)             os=-luna             ;;         *-next )             os=-nextstep             ;;         *-sequent)             os=-ptx             ;;         *-crds)             os=-unos             ;;         *-ns)             os=-genix             ;;         i370-*)             os=-mvs             ;;         *-next)             os=-nextstep3             ;;             *-gould)             os=-sysv             ;;             *-highlevel)             os=-bsd             ;;         *-encore)             os=-bsd             ;;                 *-sgi)             os=-irix             ;;             *-siemens)             os=-sysv4             ;;         *-masscomp)             os=-rtu             ;;         f301-fujitsu)             os=-uxpv             ;;         *)             os=-none             ;;     esac     fi          # Here we handle the case where we know the os, and the CPU type, but not the     # manufacturer.  We pick the logical manufacturer.     vendor=unknown     case $basic_machine in         *-unknown)             case $os in                 -riscix*)                     vendor=acorn                     ;;                 -sunos*)                     vendor=sun                     ;;                 -aix*)                     vendor=ibm                     ;;                 -hpux*)                     vendor=hp                     ;;                 -hiux*)                     vendor=hitachi                     ;;                 -unos*)                     vendor=crds                     ;;                 -dgux*)                     vendor=dg                     ;;                 -luna*)                     vendor=omron                     ;;                 -genix*)                     vendor=ns                     ;;                 -mvs*)                     vendor=ibm                     ;;                 -ptx*)                     vendor=sequent                     ;;                 -vxsim* | -vxworks*)                     vendor=wrs                     ;;                     -aux*)                     vendor=apple                     ;;             esac             basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`             ;;     esac          echo $basic_machine$os


title: How to create indexes in a pdf?

text: iPdf is rotten. Is there any other software or any other way by which an " **index** " can be created in a pdf file?


title: Confused on user and su in linux

text: How could I run a script as a specific user (non-root)? As this? `sudo su - john /usr/share/script.pl` for user john?


title: How to access the history on the fly in unix?

text: for example, if I do a               mkdir thisismyfolder912      I remember there is some easier way to switch to `thisismyfolder912` than having to do a               cd thisismyfolder912      What is that way and how does it work? Also, what are the other ways I can use this?


title: Persistent shell arguments

text: I often find myself running a series of commands on a single set of arguments. For example:               $ nmap -Pn -sS 192.168.1.5     $ ssh 192.168.1.5     $ curl 192.168.1.5     $ wget -r 192.168.1.5      This can be sped up by putting the argument(s) in a variable,               $ a=192.168.1.5     $ nmap -Pn -sS $a     $ ssh $a     $ curl $a     $ wget -r $a      and sped up even more by using a couple of functions such as the following.               $ more .zshrc     ...     paa() { PERSIST_ARGS+=("$@"); }     pa() { eval "$@" "${PERSIST_ARGS[@]}"; }     ...     $ paa 192.168.1.5     $ pa nmap -Pn -sS     $ pa ssh     $ pa curl     $ pa wget -r      Is there a way to speed this up even more? For example,               $ <start special mode> 192.168.1.5     $ nmap -Pn -sS     $ ssh     $ curl     $ wget -r     $ <exit special mode>      I am looking for `bash` or `zsh` solutions. The solution has to work with an arbitrary set of commands.


title: shell saves ip address that you ping?

text: I was once shown a shortcut that I can't recall/ find. After pinging an ip, then attempting to ssh into it - the ip was saved into to a variable automagically. Something like:                   ping 10.1.23.4         ...         ssh root@$!      and the ip was replicated in the second line replacing $! without further ado. So does this ring a bell as to what the actual syntax is? Or was this some special configuration? I believe this was running centos if that is related. tia


title: Cloned VirtualBox CentOS disk is unbootable after cloning in GParted

text: I cloned and enlarged an existing virtual CentOS-6 disk by the following steps:   1. Create 15GB virtual disk and mount the old and the new disks in GParted.   2. In GParted copy boot, swap and ext3 partitions from the old disk to the new one.   3. Mark the new boot partition with boot flag.   4. Resize the new ext3 to bigger size. I disconnected the old disk and connected the new one. Now I cannot boot the VirtualBox. I get a black screen. What seems to be the problem here? Thanks.


title: How can I manipulate the content of a file, by duplicating and changing some parts?

text: I want to manipulate a text-file. It contains many blocks of the form               CLASS        ...some stuff ...     END      I want to duplicate each of these blocks and add and remove a line of it's content. Can I script that?


title: Mysterious write IO

text: I am just reviewing the disk IO of a XEN VM server. I stumbled across a DomU that has constant write traffic. To narrow that traffic further down I logged in to the DomU (CentOS 5, 64 Bit) and started `iostat 5`. It shows sda1 active with 130-190 Blocks written per second. Disk-layout:               sda: Whole disk (corresponds to DRBD-device in the Dom0, consist of one LV in the Dom0)     sda1: /     sda2: /var     sda3: LVM-PV for application data, contains one LV mounted as subdirectory on /var      I tried to find open file handles on /dev/sda1 by issuing `lsof /dev/sda1`. The output of that command is empty. Whereas the output for `lsof /dev/sda2` shows lots of files, pipes, ... (as is to be expected). How can I track down what is causing this IO?


title: Setup static IP in redhat 6

text: I installed Redhat 6 x86_64. I am using the Network connection screen to set a static IP address like below (I want two PC's in my house to see each other: one Redhat PC and one Mac)               192.168.0.5       255.255.255.0       192.168.0.1        When I run `ifconfig` it displays only `lo` and `virbr0` information. I don't know what these items are (I don't really know much about network settings). When I try `ifconfig -a` it displays `eth0`, `lo`, `sit0` and `virbr0`. The information for `eth0` is as follows:               Link encap : Ethernet HWaddr 90:2B:34:74:05:30     BROADCAST MULTICAST MTU:1500 Metric:1     RX packets:192 errors:0 dropped:0 overruns:0 frame:0     TX packets:6 errors:0 dropped:0 overruns:0 frame:0     collisions:0 txqueuelen:1000     RX bytes 53811 (52.5 KiB) TX bytes:468 (468.0 b)     Interrupt:29 Base address:0xc000      Could someone help me to point out if anything wrong with my setting or how to resolve this problem?


title: can I tell to useradd to execute a script? Maybe in /etc/default/useradd?

text: There are plenty of people that already answered to the question "how to execute useradd properly in a script?" My question is: "is it possible to tell to useradd to execute one script when it is called?" I am writing a script to push identities files (ssh-keys) in an HPC cluster when a user is created, but I think the "cleanest" way would be to write a script that is executed **by** useradd. The script should do something like this:               #!/bin/bash     # sshpush.sh     #     # a script to SSH without passwords around the cluster nodes          mkdir $HOME/.ssh     cd $HOME/.ssh          ssh-keygen -q          cat id_rsa.pub >> authorized_keys          cat > config <<EOF     StrictHostKeyChecking no     FallBackToRsh no     BatchMode yes     ConnectionAttempts 5     UsePrivilegedPort no     Compression no     Cipher blowfish     CheckHostIP no     EOF          cpush /etc/passwd     cpush /etc/shadow     cpush /etc/groups      notice that the /home directory is mounted as NFS on all nodes. Ideally, the script should be executed **at the end** of the user creation process, after that `$HOME`is created and that the user as a valid group and id.


title: IPSet - After installing get error message "Broken error report message received"

text: I get an error message after installation when I try to use ipset. "Broken error report message received". I am wondering what the cause of the issue is, may be some linux guru could point me into the right direction? My Linux is CentOS 6. version 2.6.18-028stab092.1 Here the steps:               yum install ipset          Installed:     ipset.x86_64 0:6.11-1.el6          Dependency Installed:     libmnl.x86_64 0:1.0.2-3.el6      try to use ipset according this link:               ipset create geoblock hash:net      error:               ipset v6.11: Broken error report message received.      My current assumption is that my kernel version is not compatible to the ipset version? or I have somehow to install a kernel module? Please refer here to my assumption Ipset installation on CentOS 6.0 Could this be the issue?


title: "Unknown terminal type" error when trying to run emacsclient

text: (I’m using emacs23; on Debian 7; Xfce.) I want to try Gilles’s recommended solution for taking quick notes with Emacs. When trying to run `emacsclient -a "" -e "(remember-other-frame)"`, I get the following error: > *ERROR*: Unknown terminal type **What is wrong?** * * * (Not really sure about what I’m doing,) I tried to start a server from within Emacs: `Ctrl`+`x` and entering `server-start`. Then it says: > Warning (server): Unable to start the Emacs server.   >  There is an existing Emacs server, named "server".   >  To start the server in this Emacs process, stop the existing   >  server or call `M-x server-force-delete' to forcibly disconnect it. When pressing `Ctrl`+`x` and entering `server-force-delete`, it says: > Connection file "/tmp/emacs1000/server" deleted When I now run `emacsclient -a "" -e "(remember-other-frame)"` from a different terminal window (having `emacs -nw` still running in the first one), I get:               emacsclient: can't find socket; have you started the server?     To start the server in Emacs, type "M-x server-start".          Warning: due to a long standing Gtk+ bug     http://bugzilla.gnome.org/show_bug.cgi?id=85715     Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.     Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.     ("emacs")     Loading 00debian-vars...     Loading 00debian-vars...done     Loading /etc/emacs/site-start.d/50a2ps.el (source)...     Loading /etc/emacs/site-start.d/50a2ps.el (source)...done     Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...     Loading debian-ispell...     Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...     Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done     Loading debian-ispell...done     Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...     Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done     Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done     Starting Emacs daemon.     Emacs daemon should have started, trying to connect again     *ERROR*: Unknown terminal type      * * * ## [Edit] Requested information Output of `echo $TERM; echo $DISPLAY`:               xterm     :0.0      * * * > Are you running this from a terminal emulator, if so which, if not where? I’m not sure what a "terminal emulator" is, but the _terminal thing_ I’m using identifies itself (in the "Info" menu) as: **Xfce Terminal-Emulator** (Terminal 0.4.8). It’s the default one that came with installing Debian 7 + Xfce. * * * > What do you have in `~/.emacs` and `~/.emacs.d`?   * `~/.emacs` does not exist.   * `~/.emacs.d` contains only a sub folder `auto-save-list` (which contains an empty file whose name starts with `.saves`).


title: Looking for meta-recipe for installing homebrew recipes under BSD

text: Is there a way to install homebrew recipes under BSD? (NetBSD, to be more precise.) (To make matters worse, I don't have write access to `/usr/local` in this system, so I'd be installing `homebrew` itself under `$HOME/homebrew` or somesuch. The `homebrew` documentation discourages, but does not entirely rule out, installing `homebrew` anywhere else other than under `/usr/local`. In this case I'd have no choice on the matter.)


title: Can't install python because of zypper conflict

text: I have a virtual machine I just set up. I'm running a completely fresh install of OpenSUSE (with online updates from `yast`). At the terminal I tried to run `python`:               $ python     bash: python: command not found      I tried:               $ python --version     bash: python: command not found      So then I tried:               $ zypper install python          Loading repository data...     Reading installed packages...     Resolving package dependencies...          Problem: patterns-openSUSE-minimal_base-conflicts-12.3-7.10.1.x86_64      conflicts with python provided by python-2.7.3-10.1.1x86_64      The terminal then offers two solutions, to either uninstall the minimal base conflicts business or to not install python. I don't want to uninstall anything because I don't know what it will. I suppose I could if I had a better understanding of it, but perhaps there is a problem someone else can see here? * * * **Edit** : Don't know if this will help, but I did not install any GUI on my virtual machine.


title: Dealing with GNU Stow conflicts

text: What is the recommended way of dealing with GNU Stow conflicts? I tried to stow `readline-6.2` and got the following warning:               > stow readline-6.2     Loading defaults from /home/josh/.stowrc     WARNING! stowing readline-6.2 would cause conflicts:       * existing target is stowed to a different package: share/info/dir =>       ../../../stow_dir/stow_2.2.0_canonical_paths/share/info/dir     All operations aborted.      The clash is with the package `stow_2.2.0_canonical_paths` which is the package dir for `stow` (this is because I bootstrapped stow). Here is is what that conflicting target contains:               > cat ~/local/share/info/dir      This is the file .../info/dir, which contains the     topmost node of the Info hierarchy, called (dir)Top.     The first time you invoke Info you start off looking at this node.          File: dir,      Node: Top       This is the top of the INFO tree            This (the Directory node) gives a menu of major topics.       Typing "q" exits, "?" lists all Info commands, "d" returns here,       "h" gives a primer for first-timers,       "mEmacs<Return>" visits the Emacs manual, etc.            In Emacs, you can click mouse button 2 on a menu item or cross reference       to select it.          * Menu:          System administration     * Stow: (stow).                 GNU Stow.      What would be the recommended way of resolving this conflict?


title: How to demonstrate invalid PID assumptions?

text: It seems many programmers are happy with saving a PID to a file, and then later read and use the PID as if it was guaranteed to be the same process. It seems the general idea is that the odds are good enough to ignore. How can I simply demonstrate this problem? Ideally in such a way that existing shell scripts can be adapted to demonstrate this with the minimum of trial and error.


title: How to find from what computer I connected to a current server

text: I often work on one of available to me Linux/HP-UX servers (let's say it is server1) and then do `ssh server2` ((let's say it is server2)) and start working on another Linux/HP-UX server. Then I can connect another server ((let's say it is server3) and start working on it. While working on server3 how to get in command line information from what server I came from? So on server3 I want to get information that I came from server2 and on server2 I want to get information that I came from server1? What is a command or utility for it?


title: help for shared web hosting in lan

text: I have this senario and what i am doing is.   1. Emulating Web hosting service and Internet (in LAN)   2. I have Linux Server which is in private LAN network   3. and other clients in other Lan network connected to router and using NAT like internet   4. What i want is i want to make shared webhosting like 000webhost.com or godaddy.com so that clients go to the site e.g www.company.com and they see my hosting site and they can signup for hosting and register there domains and have cpanel and all services like professional hosting. **What I Know already** I have setted up LAMP in ubunutu server Bind in ubuntu server for DNS and already have one site created i.e www.hosting.com what i need is cpanel for web hosting provider administration ,I choosed VHCS for that. I can now create users asign them domains, quotas etc BUT, **What i dont understand** how users can register through www.hosting.com and get there panel automatically ?


title: Second monitor detected but not receiving signal?

text: I'm at my wit's end trying to figure this one out. I have an ATI Radeon X1600 (DMS-59 connector with DMS-59 to dual-DVI adapter). I'm trying to get dual monitors working properly. So far, I've tried a few different Debian-based distributions. The only one I can get to properly display on both monitors is Backtrack 5 R3. The problem: both monitors are detected by xrandr, and all settings look exactly the same. However, one monitor will not come out of standby. It doesn't appear to ever receive a signal. I've even changed the display layout in the System Settings. The screen size is correct, and the positioning is correct. I can even move the mouse to the second monitor, but it just stays in standby mode. Any ideas? _**EDIT_**   Output of xrandr follows:                 ~# xrandr     Screen 0: minimum 320 x 200, current 2880 x 900, maximum 8192 x 8192     DVI-0 connected 1440x900+1440+0 (normal left inverted right x axis y axis) 408mm x 255mm        1440x900       59.9*+   75.0          1280x1024      75.0     60.0          1280x960       60.0          1366x768       60.0          1360x768       60.0          1280x800       74.9     59.9          1152x864       75.0          1280x768       74.9     60.0          1024x768       75.1     70.1     60.0          1024x576       60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          848x480        60.0          640x480        72.8     75.0     66.7     60.0          720x400        70.1       S-video disconnected (normal left inverted right x axis y axis)     DVI-1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 408mm x 255mm        1440x900       59.9*+   75.0          1280x1024      75.0     60.0          1280x960       60.0          1366x768       60.0          1360x768       60.0          1280x800       74.9     59.8          1152x864       75.0          1280x768       74.9     59.9          1024x768       75.1     70.1     60.0          1024x576       60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          848x480        60.0          640x480        72.8     75.0     66.7     60.0          720x400        70.1      And the monitor is a Dell SE198WFPv.


title: Possible to source a file in .i3config

text: I want to extract the default keybindings from my `.i3config` file and source it from another file I did that like this:               #~/.i3config     ...     #source default keybindings     . ~/.path_to_other_file      But this doesn't work. Restarting i3 causes an error "you have a syntax error in your config file!" I can't think why this wouldn't be possible, but `. ~/path_to_other_file` and `source ~/path_to_other_file` both don't work.


title: systemctl start depending on tty

text: I would like to start Apache automatically on my machine, but only if I login from TTY1 (I do not run a display manager). If I log in from any other TTY, it should not start. I tried this in my `bash_profile`:               [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && systemctl start httpd      But this does not work. Other commands DO work like this, so I assume the issue is permission related (only `su` can run `systemctl`). Is there another way to start the httpd server that is TTY dependent? I am running Arch (see this page for how X is start upon login without a display manager, for instance).


title: Telnet on Linux Server

text: I want to know if it is necessary to have telnet enabled on both sides of machines to get telnet connection. Here's the issue: I am trying to telnet some public IP on port 80 from a Linux web server (Red Hat). This public IP has got HTTP (80) enabled on it. I'm not sure if telnet is enabled but the owner says it is. On my Linux server, HTTP (80) is enabled but not telnet. Instead SSH is enabled. When I telnet from my Linux server: `telnet PublicIP 80` it says:               Trying "PublicIP"...     Connected to "PublicIP" ("PublicIP").     Escape character is '^]'.     Connection closed by foreign host Do is have to enable telnet on my server for it to work? Because there's no issue at the other end as confirmed by other sources. Public IP: 220.226.190.180 Please explain how can I make it work. If I have to enable telnet on my Linux server, please share the command and method to do so.


title: br0 causes to drop multicast connection after 5 minutes

text: I have these interfaces set up on the router (Linux machine):               br0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500             inet 192.168.0.3  netmask 255.255.255.0  broadcast 192.168.0.255          bridge name bridge id       STP enabled interfaces     br0     8000.00156d8591ec   no      eth0                                 wlan0          eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet6 fe80::7271:bcff:feb1:d9cf  prefixlen 64  scopeid 0x20<link>          eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet 10.200.44.147  netmask 255.255.255.128  broadcast 10.200.44.255          wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet6 fe80::215:6dff:fe85:91ec  prefixlen 64  scopeid 0x20<link>      In br0 there are two interfaces (eth0 - local home network and wlan0 - wireless home network). eth1 is internet connection interface and is not part of the br0. I use mumudvb for sending multicast IPTV with IP group 239.100.0.1 (udp/1234) and receiving this multicast traffic on a different machine on LAN using VLC player. When I configure it to send multicast over eth0 all works well on home LAN but I can't join the multicast group from the router itself. That's why I configured it to send multicast over br0 (makes more sense - then I can join the multicast group from the LAN eth0 as well as router itself) but after about 5 minutes since join, LAN multicast connection drops (without sending any IGMP message). But I can join again and it will work for next 5 minutes again, then drop. Why is it dropping when sending multicast over br0 and not dropping when sending directly through eth0? Am I missing some configuration on the bridge? What can expire during this period? For example STP is disabled for the bridge but it shouldn't affect this? When I join the br0 multicast group from the router itself, it won't drop. Only when subscribed from a machine connected to the br0 through eth0.


title: NetBSD: /etc/man.conf man search path does not work

text: I've added a new man page directory               /usr/local/share/man/man1b      which contains files like e.g.               troff.1b      In /etc/man.conf I added               _subdir ...some names... man1b     _default /usr/{share,X11R7,X11R6,pkg,local,local/share}/man/     local /usr/local/share/man/     1b {cat,man}1b      _man -p_ prints               ...     /usr/local/share/man/man1b      But if I input               man 1b troff      I get the error message               man: no entry for troff in the manual.      (I can't use _man troff_ since _groff_ is installed too with a man page elsewhere in cat1.) How can I add the man path correctly? PS: If I rename the file to _troff.1_ then _man 1b troff_ works. But I thought that the category can also be the file name extension. Could it be a bug of NetBSD (file name _troff.1b_ works in OpenBSD and Linux)?


title: Unable to install CentOS in VirtualBox

text: I am trying to install CentOS 5.6 in My VirtualBox but I got this error on boot screen. `Your CPU Does not support long mode : use a 32 bit Distribution` My CPU is 64 bit I checked that using `uname -a` command and the output is `Linux localhost.localdomain 2.6.43.8-1.fc15.x86_64 #1 SMP Mon Jun 4 20:33:44 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux` As per my knowledge I need to enable 32 bit support to my VirtualBox but I don't know from where I can enable that. If you have any idea regarding this then please suggest me.


title: Xubuntu 13.10 on Dropbox

text: I have a Mac OS X 10.5.8, and I would like to use Linux on a virtual machine. I use Dropbox, and the most modern version I can run on my PC is Version 4.1.8. I created a virtual machine running Xubuntu 13.10, and everything works fine except for the following problem. My display is 1280x800, but for some reason Xubuntu cannot have a higher resolution than 1024x768. I don't think it's a problem related to Dropbox itself. I have read many posts of people having the same problem, but nothing seems to work. Please note that I'm really new to all this. I can barely use the basic commands in the Terminal.


title: Changing user to root when connected to a linux server and copying files

text: My script is coded in a way that doesn't allow you to connect to a server directly by root. This code basically copies files a server to my computer and it works but I don't have access to many files because only root can access them. How can I connect to a server as a user and then copy its files by switching to root? Code I want to change:               sshpass -p "password" scp -q -r username@74.11.11.11:some_directory copy_it/here/      In other words, I want to be able to remotely copy files which are only accessible to root on a remote server, but don't wish to access the remote server via ssh/scp directly as root. Is it possible through only ssh and not sshpass?


title: tmux: Keep scroll position when changing session

text: Sometimes I'm scrolling up a log file and need to switch sessions, so open the session menu with prefix-s. This causes tmux to forget the window's scroll position, so that when I return it's at the bottom of the log file. Is there any way to keep scroll position when switching session?


title: How to get start time for a defunct process on AIX?

text: When I run the following commands on AIX:               22:root@SERVER:/root # ps -ef | head -1          UID      PID     PPID   C    STIME    TTY  TIME CMD     22:root@SERVER:/root # ps -ef | grep defunct | head -1          foo  9364552  7975688   0                  0:00 <defunct>      I came across this process that was in a state of `<defunct>`. Bringing up the kernel debugger, `kdb`, if I poke inside this process' PID:               22:root@SERVER:/root # kdb     WARNING: Version mismatch between unix file and command kdb            START              END <name>     0000000000001000 0000000004160000 start+000FD8     F00000002FF47600 F00000002FFDF9C8 __ublock+000000     000000002FF22FF4 000000002FF22FF8 environ+000000     000000002FF22FF8 000000002FF22FFC errno+000000     F1000F0A00000000 F1000F0A10000000 pvproc+000000     F1000F0A10000000 F1000F0A18000000 pvthread+000000     read vscsi_scsi_ptrs OK, ptr = 0x0     (0)> tpid -d 9364552                 SLOT NAME     STATE    TID PRI   RQ CPUID  CL  WCHAN          pvthread+05FE00 1534 <zombie> ZOMB  5FE00AD 03C    5         0        Noting which `SLOT` it was occupying, looking at the `start` of this process:               (0)> u 1534 | grep -i start     (0)> where 1534     thread F1000F0A1005FE00 not loaded          (0)>      (0)> exit      Looking, there isn't any `STIME` associated with the process. Here's additional information about my system:               22:root@SERVER:/root # oslevel -s     6100-08-03-1339     22:root@SERVER:/root # uname     AIX      AS well as additional information about my `<defunct>` process:               22:root@SERVER:/root # procstack 9364552     procstack: 9364552 is a kernel process     22:root@SERVER:/root # proctree 9364552     7975688    /foo/foobinary        9364552          **My question** : there is no STIME in "ps" command for the defunct processes. Are there any ways to get the start time of them?


title: double-quoting parameter (representing filename) doesn't help if spaces are contained

text: When iterating over some filenames double-quoting the parameter does not prevent the filename from being broken:               $ mkdir temp     $ cd temp/     $ touch a\ b     $ for f in $(find .) ; do echo "$f" ; done     .     ./a     b


title: Can I safely delete ~/Trash file?

text: My Uni account is over disk quota and requesting more quota takes time. Unfortunately, I need disk space _now_ and I noticed that the `Trash` file in my home directory is quite a large file. Now I’m a total postfix noob but I’m assuming that this somehow relates to my mail inbox? (I do have some doubts, since although his file clearly contains email messages, `tail Trash` reveals that the last message is from 2006). Furthermore, my mail client (connected via IMAP) reveals that my trash folder is empty. **Can I just delete the Trash file** or do I need to fear dire consequences? The very first message in that file reads as follows:               From MAILER-DAEMON Sun Dec  3 13:40:15 2006     Date: 03 Dec 2006 13:40:15 +0100     From: Mail System Internal Data <MAILER-DAEMON@human>     Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA     Message-ID: <1165149615@human>     X-IMAP: 1135694114 0000000927 $NotJunk $Junk JunkRecorded     Status: RO          This text is part of the internal format of your mail folder, and is not     a real message.  It is created automatically by the mail system software.     If deleted, important folder data will be lost, and it will be re-created     with the data reset to initial values.      Furthermore, there’s another file in my home folder called `Deleted Messages` – what’s the difference between the two?


title: Arch Linux pacman specifying package version

text: I know that I can define wanted package version in `pacman` like shown in its manual `pacman -S "bash>=3.2"`. But how do I know what versions are available? I also know that `pacman` is creating copy of mirrors upon syncing in .db files in `/var/lib/pacman/sync/`, but those files are not human-readable. And what if I want to install some version `virtualbox` for example, that I hope is in mirrors somewhere, that wouldn't require newer version of `linux` (set as `IgnorePkg` in `pacman.conf`) than I have installed (because of `nvidia` drivers)? How do I know what version that is and if it is available?


title: inotify and rsync on large number of files

text: I am using inotify to watch a directory and sync files between servers using rsync. Syncing works perfectly, and memory usage is mostly not an issue. However, recently a large number of files were added (350k) and this has impacted performance, specifically on CPU. Now when rsync runs, CPU usage spikes to 90%/100% and rsync takes long to complete, there are 650k files being watched/synced. Is there any way to speed up rsync and only rsync the directory that has been changed? Or alternatively to set up multiple inotifywaits on separate directories. Script being used is below. UPDATE: I have added the --update flag and usage seems mostly unchanged               #! /bin/bash          EVENTS="CREATE,DELETE,MODIFY,MOVED_FROM,MOVED_TO"          inotifywait -e "$EVENTS" -m -r --format '%:e %f' /var/www/ --exclude '/var/www/.*cache.*' | (     WAITING="";     while true; do         LINE="";         read -t 1 LINE;         if test -z "$LINE"; then             if test ! -z "$WAITING"; then                     echo "CHANGE";                     WAITING="";                     rsync --update -alvzr --exclude '*cache*' --exclude '*.git*' /var/www/* root@secondwebserver:/var/www/             fi;         else             WAITING=1;         fi;     done)


title: Cannot delete File on Fedora

text: I have a file with following permission:               -rwSr-s---. 1 1634630331 1818884080 118784 Jun 29 1970 DailyUpdateClass.class      If I try to delete this file with root login, I get error.               rm: cannot remove ‘model/DailyUpdateClass.class’: Operation not permitted      I cannot change ownership nor I can do anythig else. I posted it on StackOverflow and tried few things but no help so far. I was recommended that I should try this on Unix Stack Exchange so requesting your assistance.


title: kill all process of executables in a folder

text: I need to kill all the child process. The main process in lmbench               pkill -9 lmbench       is not killing it, but               kill -9 <pid>      kills the parent process, but even after killing the parent process some process from /usr/lib/lmbebch/bin keeps running, **How to kill all process or executables located inside /usr/lib/lmbench ?** or kill lmbench with its children. I cannot use ctrl + c as I start it from a shell script and use pipe to control lmbench * * * Solved the problem by using               busybox killall -9 lmbench     busybox pkill -P $lmbenchPID      but is there any single command way? lmbenchDriver.sh is the shell script that calls lmbench so after lmbenchDriver exits, I still can see process > lmbenchDriver, lembench, mem, line,


title: Why does my Fedora 14 system with an Intel Mobile GME965/GLE960 Integrated Graphics Controller come up with the wrong aspect ratio?

text: I have a:      Compaq 610 VC275EA 15,6" WXGA i CELERON T1500      and I installed Fedora 14 on it. Everything is great, except one: the aspect ratio of the screen is not very good :\      http://bit.ly/e18LgF   http://pastebin.com/raw.php?i=dCbg5qNt   http://pastebin.mozilla.org/1165203                    00:02.0 VGA compatible controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)     00:02.1 Display controller: Intel Corporation Mobile GME965/GLE960 Integrated Graphics Controller (rev 0c)         Can someone please say, that it cannot be fixed, or say: yes, it could be fixed, do xy, read xy, etc. :\ This is an issue for me for months now.. :\ Please help


title: Recursively create directories for all letters

text: I want to create a directory in such a way that I need to label the directories from `a` to `z`. Inside each of these directories, I need to create sub-directories so that they are labelled as `aa`, `ab` etc. So, for instance, for the directory `m`, my sub-directories will be labelled as `ma`, `mb` upto `mz`.


title: Get driver location for particular printer via command line

text: This is on OS X 10.8. I want to be able to arbitrarily pull the configuration for a particular printer, so I can use it in a package-creation script. The script (not mine) uses               /usr/sbin/lpadmin -p "$printername" -L "$location" -D "$gui_display_name" -v "$address" \     -P "$driver_ppd"      to set up a new printer. If I supply `$printername` on the system I'm pulling from, I can get `$location` and $address from `lpoptions`. But I can't seem to find a command that will give me `$driver_ppd` (which takes the form `/Library/Printers/PPDs/Contents/Resources/HP LaserJet P4010_P4510 Series.gz`). I know it's available to the system because I can see it in the CUPS web interface under that printer.


title: Why does ssh -g say that address is already in use?

text: I setup an SSH connection with port forwarding that allows remote hosts to connect to the local forwarded ports like this:               ssh -g -L 5115:localhost:5115 <server>      The connection works fine even though I get this error message:               bind: Address already in use      I get this message no matter what ports I choose. I'm wondering why I get this message even though the connection appears to work flawlessly. Am I doing something wrong? Thanks in advance for your help


title: How to open a PDF file using PuTTY as a terminal?

text: I connected to a Linux system using the `putty` SSH client on my Windows PC. Now it's unable to open a PDF document in `putty`. The error message:               gnome-open .pdf          (gnome-open:4137): GConf-WARNING **: Client failed to connect to the D-BUS daemon:     Unable to autolaunch a dbus-daemon without a $DISPLAY for X11     GConf Error: No D-BUS daemon running      How can I open this document for viewing?


title: Internal Server Errors with CUPS

text: Recently, I get internal server errors with CUPS.               > sudo lpinfo -m     lpinfo: Internal Server Error      Here is my `/etc/cups/cupsd.conf`. I’m not even sure where to start. I tried commenting out suspicious lines, but to no success. How can I fix this? I run CUPS `1.7.2-1` on debian wheezy/sid. If you need any more information, please let me know. Any help is greatly appreciated.


title: Can I overwrite LUKS partition with it's decrypted content?

text: I have HDD with my data (partial backup of most important data available on other HDD), currently it's formatted as Ext4 over LVM over LUKS. I want to remove LUKS layer, but reformatting and data restore from backup is too long/no fun. Is there any possibility/chance to overwrite LUKS partition with it's content without using big buffer and without data corruption?


title: How does `shutdown -k` disable logins?

text: This is the `-k` option's documentation in `man shutdown` (at least on Ubuntu):                -k   Only send out the warning messages and disable            logins, do not actually bring  the  system down.      I initially assumed that this will use `pam_nologin` to lock out logins. However, I tested it out and do not see `/etc/nologin` created after running `shutdown -k`.   1. How does `shutdown -k` disable logins?   2. How can you re-enable logins after a `shutdown -k`?


title: Adding www-data to /etc/sudoers dos not work for PHP shell_exec() to run a command

text: I'm running the webserver lighttpd on Raspbian (Debian based) on a Raspberry Pi. The server runs as user www-data (checked with `ps aux`). I added the following line to `/etc/sudoers`:               www-data ALL=NOPASSWD:/opt/vc/bin/vcgencmd      to be able to run the `vcgencmd` tool from the Raspberry Pi that gives status information from within a PHP file with               <? echo shell_exec('vcgencmd version'); ?>      All it prints is "VCHI initialization failed" (instead of the supposed version information that appears when I run it on my user even without `sudo`) which appears when vcgencmd is run with wrong permissions. Running for example               <? echo shell_exec('cat /sys/class/thermal/thermal_zone*/temp'); ?>      works fine without any `/etc/sudoers` change, so there's no problem with PHP (like forbidden `shell_exec` or something). What else needs to be set in order to execute a command?


title: Is it OK to use "." to run files instead of source - in .bashrc in Ubuntu and OS X?

text: OK, so `source` runs the script in the current shell and `.` separately, as detailed in running script with ". " and with "source " for example, but, specifically, in my **`.bashrc`** file, I have:               [ -f ~/.bash_aliases ] && source ~/.bash_aliases     [ -f ~/.git-completion.bash ] && source ~/.git-completion.bash     [ -s ~/.autojump/etc/profile.d/autojump.sh ] && source ~/.autojump/etc/profile.d/autojump.sh      Can I replace this with:               [ -f ~/.bash_aliases ] && . ~/.bash_aliases     [ -f ~/.git-completion.bash ] && . ~/.git-completion.bash     [ -s ~/.autojump/etc/profile.d/autojump.sh ] && . ~/.autojump/etc/profile.d/autojump.sh      Will that work on OS X - is that the "POSIX" issue? I tried it and the above still seem to work on Ubuntu (so they actually work with both `source` and `.`, that is, they give me the desired functionality in the shell). Should I choose one over the other, or am I missing something? FWIW, on OS X, I source my `.bashrc` from my `.bash_profile`.


title: How can I use `sudo` with a command, but still "be myself"?

text: My SysAdmin is requiring me to use `sudo` to run a certain script. This script (depending on which subcommand you pass in as an argument) connects to another machine using ssh keys, but this is failing, presumably because it is run as root and not as me. How can I still use `sudo` (which my sysadmin requires and which I don't have the power to change) to gain the privileges to run the script, and yet make the command run with access to my ssh keys?