title: Error about agpgart during startup on Fedora 20?

text: I have started to notice a strange error quickly flash across my screen every time I boot my laptop running Fedora 20. I'm not sure what it means or how it may be affecting my system, but I figured it would be best to address it ASAP before I have problems that could be because of this. Here's what flashes across the screen during startup:               Booting 'Fedora (3.12.6-300.fc20.x86_64) 20 (Heisenbug)'     [    1.887874] [drm:drm_pci_agp_init]  =ERROR= Cannot initialize the agpgart module.     [    1.887932] DRM: Fill_in_dev failed.      My question is, **what all does this mean and how can I fix it?**


title: Why is my wlan0 interface on Angstrom (Beagleboard) "Not Associated"?

text: I'm installing a Angstrom (custom build, not the default build) on a Beagleboard XM. I can scan for wireless networks using `iwlist` and see the neighborhood wireless devices. I have set my SSID and Key (a 10-digit hex code using lowercase) in `/etc/network/interfaces` When I do a `ifup wlan0`, it goes through the process of `DHCPDISCOVER` and then says > No DHCPOFFERS received. The device is an Alfa USB with a Realtek rtl8187 chipset. (which works fine when used under Debian on my laptop). Why isn't my SSID displayed properly under `iwconfig`, and why won't the interface get an IP via DHCP?


title: Is it possible to display a static image on VNC connections?

text: Recently, I've been getting semi-regular VNC connection attempts on my computer. It's most likely from the domain I set up a while back, but it appears to be mostly individual connection attempts, as opposed to a bot or similar. (For example, something in Beijing is trying to log into SSH as Root 24/7.) Since this is most likely some punk script kiddie who heard that "VNC lets you remotely control computers", and immediately used his super-leet `nslookup` to begin "collecting IPs to hack", I'd like to know if there's any way to configure a VNC server to display a static image (e.g., a "No Tresspassing" sign, a shock image, etc.) instead of the usual desktop. I'm thinking something built into the VNC server itself, as opposed to, for example, a bare-bones window manager that displays nothing but a wallpaper, in case I need to start a graphical session on the computer in question.


title: Why are certain menus unreadable when using a new GTK+ theme with Nautilus?

text: I installed a new GTK theme for both GTK 2.0 and 3.0, and now there are certain windows that have unreadable text in Nautilus. The text color is black on a light background, I made sure of this with the color manager in Gnome Tweak. For example, I can't see anything in the file properties dialog, or in the popups that occur when doing file operations, etc. If I highlight the invisible text it shows up. This also happens in Gnome Mplayer, I can't see any text when trying to change my preferences, so I know it isn't an issue with Nautilus. I can see my files and the text in the pane of nautilus just fine. If I switch to one of the themes that was installed by default, everything works fine. I'm using Crunchbang with the Fleche GTK+ theme https://github.com/hdni/Fleche ![screenshot](http://i.imgur.com/pbI8MyC.png)


title: Cannot remove /log/var/snort as root

text: I am using Ubuntu 11.10 Gnome. I uninstalled snort in order to install a more recent version. The new installation initially failed because the system would not let be rm or modify /var/log/snort even as root.               sudo chattr -i /var/log/snort/*      enabled me to remove the contents of /var/log/snort although the i attribute did not appear to have been set. However `sudo chattr -i /var/log/snort` did not allow me to remove `/var/log/snort` itself although only the e attribute was set. I was able to change ownership of `/var/log/snort` but that does not help               peter-Inspiron-620:/var/log$ ls -ld /var/log/snort     drwxrws--- 2 root adm 4096 2013-05-20 23:22 /var/log/snort     peter-Inspiron-620:/var/log$ sudo rmdir /var/log/snort     [sudo] password for peter:      rmdir: failed to remove `/var/log/snort': Operation not permitted     peter-Inspiron-620:/var/log$ sudo rm -rf /var/log/snort     rm: cannot remove `/var/log/snort': Operation not permitted     peter-Inspiron-620:/var/log$ sudo chown peter /var/log/snort     peter-Inspiron-620:/var/log$ ls -ld /var/log/snort     drwxrws--- 2 peter adm 4096 2013-05-20 23:22 /var/log/snort     peter-Inspiron-620:/var/log$ rmdir /var/log/snort     rmdir: failed to remove `/var/log/snort': Permission denied     peter-Inspiron-620:/var/log$ rm -rf /var/log/snort     rm: cannot remove `/var/log/snort': Permission denied     peter-Inspiron-620:/var/log$      I tried rebooting the computer and going into the root shell in restore mode but was still unable to remove this directory.


title: logrotate custom "rotate" action equivalent for upstart?

text: In lots of online posts regarding how to rotate your `iptables` log files, for example here `rsyslog` config files get reloaded by the `postrotate` option of `logrotate`, presumably in order to stop `rsyslog` from writing to the old (now compressed or renamed logfile) and to the new logfile. Usually this looks like                postrotate                 invoke-rc.d rsyslog rotate > /dev/null      endscript      I believe this is now outdated, since `rsyslog` has been converted to `upstart`, and is no longer `Sys V Init` so something along the lines of               service rsyslog reload > /dev/null      is probably the way to go. But what about the "rotate" action? (I think it was a `logrotate` custom action...somehow set via `policy-rc.d` perhaps..). I presume for `Sys V Init` this was somehow superior to a simple reload/restart (although I don't know exactly why), is it possible or desired in the new `upstart` framework to get `logrotate` use a "rotate" action to restart `rsyslog` rather than just doing a reload?


title: Insert single successive numbers at the beginning of each line in a text file with Vim

text: Assume I have a text file containing some strings:               string_g     string_r     string_qqwer     string_p     string_f     string_3qw     string_e     string_qw      And I need to insert increasing or decreasing numbers before the strings:               001 string_g     002 string_r     003 string_qqwer     004 string_p     005 string_f     006 string_3qw     007 string_e     008 string_qw      Just to avoid confusion: I do not want line numbers to be displayed. I know how that works. What I want is an actual number at the beginning of each string within the text. Is there a way to do this automatically with `vim`? I can mark the beginning of each string with `CTRL`-`V` then type `:` to enter the execute mode, which will allow me to execute command on the selection via `:'<,'>` but I’m stuck there.


title: Comparing file times in ksh

text: I have developed a script which will compare two dates.               #!/bin/ksh          ####################################################################     #     #DECLARING ALL THE VALUES AND PATHS     #     ####################################################################          LOG_FOLDER=/user/sba-appl/test/sscr/ramu     TARGET_DIR=/user/sba-appl/test/sscr/ramu          ###################################################################     #     #GETTING THE TIME STAMP OF THE FILE     #     ####################################################################          cd $TARGET_DIR     DEFAULT_DATE=`ls -l /$TARGET_DIR/default.txt| awk '{print $6,$7,$8}'`     printf "$DEFAULT_DATE \n"     for f in *.xml         do             echo "Processing $f"             FILE_DATE=`ls -l /$TARGET_DIR/$f|awk '{print $6,$7,$8}'`             printf "$FILE_DATE \n"             echo "dafault filedate is $DEFAULT_DATE"             if [ $FILE_DATE -gt $DEFAULT_DATE ]             then                 echo "Call the Jar for the file $f"             else                 echo "Do not call the Jar for the file $f"             fi     done      Here I'm facing two problems: **1.** In this we have a default file and this file timestamp should be set to old time ie for eg 1990. I know this can be done with the help of `touch -t` with the timestamp. I am using a ksh and stat is not present here. So I'm using `ls -l`. But if i am using `ls -l` command then it will list the year 1990 (because it will always list the year if the file is 6 months older). In this case my default_date value will have year. So I think my if condition is failing as year is coming here. **2.** I changed the timestamp of the files including `default.txt` within 6 months and I checked now but still it is not executing the if part and it is executing the else part. I'm also getting unknown test operator. Can anyone tell me where it is going wrong. It will be great help if anyone can check this. I am facing two problems here:   1. In this comparison the if condition is not correctly working.   2. Always it is printing the else part only.


title: Identify Tasks/Process which are 7 days old in linux

text: How can I identify the processes running since 7 days in Linux?


title: Some sort of X.org memory leak using nvidia proprietary driver

text: Could please anybody help me identify what is the source of problem? The problem is that after some time or after opening a window of some application in X, it seems like I suddenly lost 2d acceleration. Because the process `/usr/bin/X`and all its operations ( window resizing, scrolling) suddenly eats 60% to 150% of CPUs runtime when scrolling window for instance. I'm using twinview, but it happens even without it, but not so much. I'm not using any composition in KDE or xfce. The nvidia driver installation logs looks there was no problem during the installation. I tried various different kernel versions, 2 different Xorg version, 2 versions of nvidia driver and even different window managers. It only happens in particular time frames, if I open some specific www page or application in browser or it comes from nowhere. It is possible that it could be triggered by some flash animation, gif animation, javascript scrolling text or other effects in browser, but it is really hard to say, because it usually appears suddenly (when reading something in browser for instance). As far as `xorg.conf`, I have the default one from nvidia-settings. I also tried various possible configurations and modules. I have glxgears 2.241 FPS and after the problem is gone I have 6267.623 FPS.               Slackware-current - kernel 2.6.35.11 , 2.6.35.10 , 2.6.36.x 2.6.37     X.Org X Server 1.9.4     KDE 4.5.5   or   xfce-4.6.2     NVIDIA-Linux-x86_64-260.19.36  + twinview     Geforce 8400 GS      APPS:               google-chrome-8     XChat 2.8.8     eclipse-3.6


title: Read files after running ddrescue

text: I have run ddrescue on a hard disk, and got all data (2 partition) to another disk named part1.img and part2.img. How to proceed to read (list) the files in part2.img? I use fedora 14, 32 bit


title: How to mark dates which are in the past?

text:
From the answers I updated the question: Now, it's:               $ date "+%F %H:%M"     2014-06-04 11:26      This is the input:               $ cat input.txt
2014-04-24 14:01	2014-06-04 11:30	2014-06-04 11:23
      This is the current perl script (that is working GREAT!, only hours/minutes missing)               $ cat a.txt      perl -MTime::Piece -pe '         BEGIN {$today = localtime->ymd}         @days = $_ =~ /(.+?)<\/td>/g;         for $d (@days) {           $_ =~ s!$d!$d!g if $d lt $today;           }' input.txt      And now, it produces this output:               $ bash a.txt
2014-04-24 14:01	2014-06-04 11:30	2014-06-04 11:23
      **Our question** : How can we mark the past dates - the hours:minutes too! - as red? The current perl solution need to be updated since it doesn't marks the "2014-06-04 11:23" red, but it's a past date! p.s.: - several dates could be in one line - that is working   - past days marked as red - that is working   - I tried to use the "datetime" instead of "ymd" ( http://perldoc.perl.org/Time/Piece.html ) - but it didn't worked, probably because of that in the input.txt there are " " instead of "\t"? - +just a note (if it helps), I already found out how to mark tomorrow:                sed -i "s/\(`date +%F -d '+1 day'`\)/\1<\/font>/g" in.txt


title: Using eval and sed to perform counting and script control

text: Following the original issue described here:- Rip chapters of a DVD to separate files ..would someone help us understand what the following code is doing:-               # count Titles, and count Cells per title.      # eg. ${cell[1]}      is the Count of Cells for the first title     #     ${cell[titles]} is the Count of Cells for the last title      eval $(lsdvd | sed -n 's/Title: \([0-9]\+\), .* Chapters: \([0-9]\+\), Cells: .*/cells[$((10#\1))]=$((10#\2));/p')     titles=${#cells[@]} title_num=2 from_cell=1 to_cell=${cell[title_num]}      We'd like to do the same thing and have tried to use the code. Unfortunately it doesn't work for us and because our understanding is limited we are unable to debug it. We understand the basic idea of using sed but can't understand how it is managing to:-   1. Resolve any pattern to in order to substitute.   2. Produce any pattern to substitue with. Also, its coupling here with eval() is beyond us. Plus there are three uses of # that we just don't get either. Please help. Thanks.


title: moving columns across rows

text: I am dealing with a txt file and trying to keep the first column/field in place, but shift the 2nd column down by 1 row. I tried this, but it gave the error unmatched .'s.               awk  '{for(i=1; i<NR; i++) FNR==i {print i, $(i+1)}}’ filename


title: udev: How do you identify the physical device that a sys device belongs to?

text: I have several USB modems that each have several endpoints: lot of TTYs, a network interface, a cdc-wdm port, and some other things. I'm trying to group them together so that I know, for instance, ttyUSB3, ttyUSB4, wwan1, and cdc- wdm1 all belong to the same physical USB device. I thought `$id` was supposed to identify the physical device, so I tried adding `$id` to the environment with `ENV{id}=$id`. This seems to work for the network interfaces and serial ports, but not the cdc-wdm ports (id is unset for these ports). Here is some example data after adding the `ENV{id}=$id` rules: rule: `SUBSYSTEM=="net", ATTRS{idVendor}=="106c", ATTRS{idProduct}=="3718", ENV{id}="$id"`               # udevadm info --query=all --path=/devices/platform/atmel-ehci/usb1/1-1/1-1.3/1-     1.3:1.5/net/wwan0     P: /devices/platform/atmel-ehci/usb1/1-1/1-1.3/1-1.3:1.5/net/wwan0     E: DEVPATH=/devices/platform/atmel-ehci/usb1/1-1/1-1.3/1-1.3:1.5/net/wwan0     E: DEVTYPE=wwan     E: ID_BUS=usb     E: ID_MODEL=PANTECH_UML290     E: ID_MODEL_ENC=PANTECH\x20UML290     E: ID_MODEL_ID=3718     E: ID_REVISION=0000     E: ID_SERIAL=Pantech__Incorporated_PANTECH_UML290     E: ID_TYPE=generic     E: ID_USB_DRIVER=qmi_wwan     E: ID_USB_INTERFACES=:020201:0a0000:ffffff:fffdff:fffeff:fff1ff:     E: ID_USB_INTERFACE_NUM=05     E: ID_VENDOR=Pantech__Incorporated     E: ID_VENDOR_ENC=Pantech\x2c\x20Incorporated     E: ID_VENDOR_ID=106c     E: IFINDEX=5     E: INTERFACE=wwan0     E: SUBSYSTEM=net     E: USEC_INITIALIZED=174833330     E: id=1-1.3      rule: `SUBSYSTEM=="usb", KERNEL=="*cdc-wdm*", ENV{id}="$id"`               # udevadm info --query=all --path=/devices/platform/atmel-ehci/usb1/1-1/1-1.3/1-     1.3:1.5/usb/cdc-wdm0     P: /devices/platform/atmel-ehci/usb1/1-1/1-1.3/1-1.3:1.5/usb/cdc-wdm0     N: cdc-wdm0     E: DEVNAME=/dev/cdc-wdm0     E: DEVPATH=/devices/platform/atmel-ehci/usb1/1-1/1-1.3/1-1.3:1.5/usb/cdc-wdm0     E: MAJOR=180     E: MINOR=176     E: SUBSYSTEM=usb     E: USEC_INITIALIZED=174788259


title: Is there any way to resize scale application GUI window?

text: Is there any way to run an application scaling its GUI window? (Well, I'm using MATE but hope for universal solution). For example, up scale small window of an old game running under wine on high-resolution display or shrink windows that doesn't fit low-resolution display and so on. I'm not looking for any way of changing running Xorg resolution. I'm looking for a way to scale specific program. I'm not looking for any type of VM solution. However there might be an X server displaying and scaling applications inside a window. Magnifying part of the screen to whole screen might be acceptable solution also. But screen magnifiers like kmag is not suitable since it makes duplicate of picture and do magnify its own windows too disabling be full-screen expanded and doesn't support mouse clicks on magnified area. P.S. Well, if there is no such way, is there a way to force application running full screen?


title: Unable to access CentOS setup Network Configuration after attempting Python update

text: I attempted to update Python on my CentOS 5.6 VM and have encountered some issues afterward. Initially, `yum` wouldn't work, but I have resolved that. However, now I am unable to access the Network Configuration section under `setup`. When I do select this option, I see this at the command line:               [root@crmpicco ~]# setup     Traceback (most recent call last):       File "/usr/sbin/system-config-network-tui", line 9, in <module>         from snack import *     ImportError: No module named snack      Line 9 on that file is this: `from snack import *` I'm not familiar with Python (I'm a PHP developer), so I'm not sure where to go with this or how to fix it. This is what I have installed relating to Python:               [root@crmpicco ~]# yum list installed | grep python     MySQL-python.x86_64                      1.2.1-1                       installed     audit-libs-python.x86_64                 1.7.18-2.el5                  installed     dbus-python.x86_64                       0.70-9.el5_4                  installed     gamin-python.x86_64                      0.1.7-8.el5                   installed     gnome-python2.x86_64                     2.16.0-1.fc6                  installed     gnome-python2-bonobo.x86_64              2.16.0-1.fc6                  installed     gnome-python2-canvas.x86_64              2.16.0-1.fc6                  installed     gnome-python2-gnomevfs.x86_64            2.16.0-1.fc6                  installed     libselinux-python.x86_64                 1.33.4-5.7.el5                installed     libxml2-python.x86_64                    2.6.26-2.1.2.8.el5_5.1        installed     libxslt-python.x86_64                    1.1.17-2.el5_2.2              installed     mod_python.x86_64                        3.2.8-3.1                     installed     python.x86_64                            2.4.3-43.el5                  installed     python-devel.i386                        2.4.3-43.el5                  installed     python-devel.x86_64                      2.4.3-43.el5                  installed     python-elementtree.x86_64                1.2.6-5                       installed     python-iniparse.noarch                   0.2.3-4.el5                   installed     python-libs.x86_64                       2.4.3-43.el5                  installed     python-numeric.x86_64                    23.7-2.2.2                    installed     python-sqlite.x86_64                     1.1.7-1.2.1                   installed     python-urlgrabber.noarch                 3.1.0-6.el5                   installed     python26.x86_64                          2.6.8-2.el5                   installed     python26-libs.x86_64                     2.6.8-2.el5                   installed     rpm-python.x86_64                        4.4.2.3-22.el5                installed      Also, it would seem I am now on Python 2.6.8. `python --version` gives me `Python 2.6.8`


title: How to find out the reason a command/code was executed on Linux?

text: I have a complex embedded Linux software running on a gentoo derivative, on which a certain piece of code gets executed regularly every ~84 minutes. Sweeping through the main code to find places where this code might get executed was unsuccessful, and `crontab` also seems no possible explanation. My question: Is it possible, by modifying the code in question, to find out which other process/code/file/service started it in the first place? Are there some information in the `/proc` directory I can use? Or is it impossible to find out the process that executed the given code?


title: GCC not runnable on FreeBSD

text: I'm trying to run GCC on FreeBSD and I get this error:               % gcc     ar: unrecognized option `--plugin'     usage:  ar -d [-Tjsvz] archive file ...             ar -m [-Tjsvz] archive file ...             ar -m [-Tabijsvz] position archive file ...             ar -p [-Tv] archive [file ...]             ar -q [-TcDjsvz] archive file ...             ar -r [-TcDjsuvz] archive file ...             ar -r [-TabcDijsuvz] position archive file ...             ar -s [-jz] archive             ar -t [-Tv] archive [file ...]             ar -x [-CTouv] archive [file ...]             ar -V      I have installed the following version of GCC using the binary pkg:               % pkg info gcc     gcc-4.7.3_1     Name           : gcc     Version        : 4.7.3_1     Installed on   : Wed Jun 25 15:22:58 CEST 2014     Origin         : lang/gcc     Architecture   : freebsd:10:x86:64     Prefix         : /usr/local     Categories     : lang java     Licenses       : GPLv3RLE and GPLv3     Maintainer     : gerald@FreeBSD.org     WWW            : http://gcc.gnu.org/     Comment        : GNU Compiler Collection 4.7     Options        :             BOOTSTRAP      : off             JAVA           : on      I have installed the port version as well with the same results. What can possibly be wrong?


title: How do I make strace "decode" AF_NETLINK comminucation like with ioctl?

text: `strace` usually "deciphers" `ioctls`, showing what do they mean, even resolving network interface names and so on. But the same operation performed using AF_NETLINK stays opaque in `strace`. How to teach `strace` to look into `AF_NETLINK` things? Are there patches or forks with this feature?               sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\32\0\1\0\323K\255S\0\0\0\0\n\200\0\0\0\0\0\0\0\0\0\0\24\0\1\0"..., 48}], msg_controllen=0, msg_flags=0}, 0) = 48     recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\224\0\0\0\30\0\0\0\323K\255S\3674\0\0\n\200\200\0\0\2\0\7\0\0\0\0\10\0\17\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 148      Example of "cooked" strace output with `ioctl`               ioctl(4, SIOCGIFFLAGS, {ifr_name="veth0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_ALLMULTI}) = 0      ### Background on AF_NETLINK _excerpt fromWikipedia_ > The `AF_NETLINK` family offers multiple protocol subsets. Each interfaces to > a different kernel component and has a different messaging subset. The > following protocol is referenced in the field below: >   >   >       int socket(AF_NETLINK, SOCK_DGRAM or SOCK_RAW, protocol) >   > > Lacking a standard, `SOCK_DGRAM` and `SOCK_RAW` are not guaranteed to be > implemented in a given Linux (or other OS) release. Some sources state that > both options are legitimate, and the reference below from Red Hat states > that `SOCK_RAW` is always the parameter, however iproute2 uses both > interchangeably.


title: ElementaryOS Software Center Won't Open

text: I haven't been able to get Elementary OS's software center to open for a while. I've restarted the computer, removed and installed the software center again. All I've done is add a new icon pack, a new dock and that's it. I'm assuming the icon pack screwed up the software center since it changed the software center's icon. When I try to run it from terminal I get:               alex@ElementaryOSServer:~$ software-center      2014-01-16 21:34:00,049      - softwarecenter.ui.gtk3.app      - INFO      - setting up proxy 'None' 2014-01-16 21:34:00,052      - softwarecenter.db.database      - INFO      - open() database: path=None use_axi=True use_agent=True        Traceback (most recent call last):          File "/usr/bin/software-center",            line 142, in app =            SoftwareCenterAppGtk3(datadir, xapian_base_path, options, args)          File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py",            line 387, in init self.datadir)          File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/historypane.py",           line 78, in init self._get_emblems(self.icons)          File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/historypane.py",           line 192, in _get_emblems pb = icons.load_icon(emblem, self.ICON_SIZE, 0)         File "/usr/lib/python2.7/dist-packages/gi/types.py",            line 43, in function return info.invoke(*args, **kwargs)        gi._glib.GError: Icon 'package-install' not present in theme       How can I get `software-center` to work?


title: Screen status bar multiple lines

text: I am using screen with several tabs open to separate my projects between them. However, when I open too many tabs they just appear off screen and I can no longer see them in my "screen status bar". I can still switch to them, but not see them in my list of windows. How can I make it so that my "screen status bar" will expand to two lines when necessary? I've gotten a `.screenrc` from a friend to start with which put me where I'm at, but I'd like to customize it to afford me this option.


title: Change default for Nautilus (file_manager) from "Forget password immediately"?

text: When opening a tab which needs to mount a Samba share, Nautilus 2.30.1 displays a window:               Password required for share xxx on localhost          Password: [           ]          (*) Forget password immediately     ( ) Remember password until you log out     ( ) Remember forever                         [Cancel] [Connect]      How can one set the default to something other than "Forget password immediately"?


title: How to invoke an Openoffice macro from the Linux command line

text: I have an OpenOfice macro that I want to use to process the contents of an OpenOffice file. I am able to do this by opening the file with OpenOffice and then running the macro. How do I invoke the macro from the Linux command line without using the GUI? Something like:               $ oowriter -headless -o MyDocument.odt -RUNMACRO MyLittleMacro


title: RealTek 8101E ethernet card or similar doesn't work on FreeBSD

text: I'm trying to install FreeBSD on my netbook using an usb sitck but I'm running into a major problem, my ethernet card doesn't work.               ifconfig -a      only returns me               lo0 …      but               dmesg | grep re0      gives me:               re0: <RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX> ...     re0: Using 1 MSI messages     re0: Chip rev. 0x24000000     re0: MAC rev. 0x00000000     re0: Unknown H/W revision rev. 0x24000000     device_attach: re0 attach returned 6      The installer crashes when I try to setup the network on FreeBSD 8.1 amd64 or 8.2RC3 amd64 on usb stick. Same dmesg messages with 9.0 CURRENT but it doesn't crash nor find re0. The network works fine with NetBSD 5.1 amd64 or OpenBSD 4.8 i386 using re.


What are you using instead of DCE Distributed File System? How does it compare? Or are you still using it? Note that DCE/DFS is not Microsoft Distributed File System


title: I shouldn't use root on my new ubuntu cloud instance, right?

text: I am playing with ubuntu on my new Rackspace cloud instance. However, the information they give me is for root access -- that doesn't seem like a best practice for doing development on this thing. What is the best practice for setting up a cloud instance for development? Should I create another user that allows me to install my rails


title: How do I install additional modules when building an Apache RPM?

text: We've been compiling and installing Apache under `/usr/local/apache2` and in turn would tar the folder up to distribute to our other servers. I would like to convert this into an RPM package for easier maintenance. I'll be using `fpm` to handle the package creation, but I'm running into an issue when including additional modules. Once the `make install` completes, we have a couple of additional modules to compile and install using `apxs`. For example, to install `mod_qos` we would run the following command once the package is uncompressed. `/usr/local/apache2/bin/apxs PATH_TO_MOD_OAS_DIRECTORY` That installs the `mod_qos.so` file into Apache's module directory. But let's say my `make install` turns into `make install DESTDIR=/opt/buildbot` I mean I really don't want to install Apache on my build server. I want to stage it so that i can use `fpm` to create the rpm package.


title: No sound in webex player in wine

text: I am using Fedora Core 10. I have installed wine with both `wine-alsa` and `wine-oss` sound drivers. I am able to hear test sounds by running `winecfg`, but when I run the webex player there is no sound, and the option to increase volume is disabled. I am not sure whether the problem is with wine or with webex; how can I debug/fix this?


title: How to redirect Tomcat logs back to catalina.out instead of syslog?

text: In the release notes for `openSUSE 13.1`, developers proudly stated that `Tomcat` logs are no longer being written into `catalina.out`, but rather written to `syslog`. I saw similar behaviour with new distributions, but now it's my problem also. I really don't know why it is considered as improvement. And that's why,   1. My Tomcat installation is used as a playground for several developers, and I hardly want to share my syslog with them.   2. The webapp under `Tomcat` is pretty verbose with logs (since it is under development) and I don't want to put all these garbage in to the syslog. There are a plenty of tutorials on how to redirect Tomcat log into syslog, but I need to perform reverse operation. Any ideas? **UPD:** Here is my `tomcat.conf`, nothing suspicious there: > JAVA_HOME="/etc/alternatives/jre" > > CATALINA_HOME="/usr/share/tomcat" CATALINA_BASE="/usr/share/tomcat" > CATALINA_TMPDIR="/var/cache/tomcat/temp" > > SECURITY_MANAGER="false" > > SHUTDOWN_WAIT="30" > > SHUTDOWN_VERBOSE="false" > > CLEAR_WORK="false" > > CATALINA_OPTS="-Xms2G -Xmx8G -XX:PermSize=256m -XX:MaxPermSize=4G"


title: How to talk to geoclue through its dbus interface?

text: I'm trying to better understand what `geoclue` does, and how to gain information from it. From my understanding, it can be accessed through it's `dbus` interface to find geographic information about the user. The problem is finding the right `dbus` command to gain this information. I've searched all over the internet and checked all the documentation I could find, but still can't seem to find an easy answer other than obscure information about it's `dbus` properties, which I lack the knowledge to properly piece together. Is there a `dbus` command I could use to gain this information from `geoclue`, and perhaps an example of what that command should look like? I do not have the information required to put together the documentation from it to gain this.


title: sudo service errors out with JAVA_HOME not found

text: I've used visudoer to set the keep_env for JAVA_HOME:               $ sudo printenv | grep -i JAVA_HOME     JAVA_HOME=/opt/java          $ ls $JAVA_HOME     bin        db       jre  LICENSE  README.html  src.zip                             THIRDPARTYLICENSEREADME.txt     COPYRIGHT  include  lib  man      release      THIRDPARTYLICENSEREADME-JAVAFX.txt      I've also created symlink from usr/bin to my java executable:               $ ls -al /usr/bin/java     lrwxrwxrwx. 1 root root 18 Aug  7 07:09 /usr/bin/java -> /opt/java/bin/java      I can even do:               $ sudo java -version     java version "1.7.0_65"     Java(TM) SE Runtime Environment (build 1.7.0_65-b17)     Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)      However when I run               $ sudo service hadoop-hdfs-namenode start     Starting Hadoop namenode:                                  [  OK  ]     Error: JAVA_HOME is not set and could not be found.      Until a few hours ago, on this machine, in addition to my own installation of the JDK, I had the open-jdk installation that came with Centos-7...and everything was working. When I realized that there was an open-jdk installation, I removed it using:               $ sudo yum remove sudo yum remove java-1.7.0-openjdk-headless-1.7.0.65-2.5.1.2.el7_0.x86_64      And then I started getting the JAVA_HOME not found issue. I'm a newbie and totally at a loss! Please let me know if you need more info...


title: Sharing Mac Snow Leopard directory via NFS

text: I am running a Mac Pro using Snow Leopard (not server). I would like to share a directory with a linux machine. I have edited /etc/exports on the Mac to:               /Volumes/mstore/home/sdavis -maproot=root -rw      When I try to mount this from a linux machine, I get:                sudo mount gale.nci.nih.gov:/Volumes/mstore/home/sdavis /tmp/abc     mount.nfs: access denied by server while mounting gale.nci.nih.gov:/Volumes/mstore/home/sdavis      Also, this is what I get for showmount -e on the Mac:               % showmount -e     Exports list on localhost:     %       In other words, the mount is not seen, apparently. Any suggestions? I have not found much good documentation on sharing via NFS on the Mac, particularly for later OS versions.


title: Straightforward Linux Clustering

text: We have many unused PC machines and we would like to use them to set up educational lab for high performance computing applications. Which Linux distribution is the most convenient to set up and easy to manage in educational environment? I would be thankful if someone provides me with a list of advantages and disadvantages of different Linux clustering distributions.


title: Make an alias that does an alias command

text: I have to make an alias that will do the alias command. It has to "replace" the alias command and the user has to feel no difference..


title: Diacritics do not work in GTK+ applications running on Mac OS X Snow Leopard

text: I am using some GTK+ applications in Mac OS X Snow Leopard. My MacBook is configured for using the Brazilian layout, which allows it to enter diacritics as dead keys (so I can write á typing ' and then a, for example). However, it does not work in some GTK+ applications - in this case, Gedit and GnuCash. In other ones, such as Inkscape and Dia, I can enter diacritics as dead keys. It is valid to note that Dia and Inkscape runs through X11 but Gedit and GnuCash (at least my versions) do not. Does anybody have such problem? Has someone solved it? How could I configure the keyboard layout for GTK+? Do I do it in some ~/.gconf* or ~/.gnome file? Thanks in advance?


title: Script to take username and password

text: I need to stop few services. whenever we entred the command to stop the service it'll prompt for username and password. We need to automate this whole scenario to take username and password directly from script or from file. Kindly help to get it solved.


title: Quote a variable in shell script "if" statement

text: e.g.               if [ "$FOO" = "true" ]; then      vs               if [ $FOO = "true" ]; then      What is the different? Seems both of two statements also works.


title: programs hang due to /etc/localtime timeout

text: On my server, suddenly most programs stopped working (they just hang). For example midnight commander. When I debug mc with strace, I see it hangs on `stat("/etc/localtime")` When I try to `cat /etc/localtime` it hangs indefinitely. Can somebody please help ? Following is the output of `strace cat /etc/localtime`               execve("/bin/cat", ["cat", "/etc/localtime"], [/* 29 vars */]) = 0     brk(0)                                  = 0x2530000     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd02fe08000     access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)     open("/etc/ld.so.cache", O_RDONLY)      = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=21338, ...}) = 0     mmap(NULL, 21338, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd02fe02000     close(3)                                = 0     access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)     open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3     read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\357\1\0\0\0\0\0"..., 832) = 832     fstat(3, {st_mode=S_IFREG|0755, st_size=1595408, ...}) = 0     mmap(NULL, 3709016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd02f861000     mprotect(0x7fd02f9e1000, 2097152, PROT_NONE) = 0     mmap(0x7fd02fbe1000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x180000) = 0x7fd02fbe1000     mmap(0x7fd02fbe6000, 18520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd02fbe6000     close(3)                                = 0     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd02fe01000     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd02fe00000     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd02fdff000     arch_prctl(ARCH_SET_FS, 0x7fd02fe00700) = 0     mprotect(0x7fd02fbe1000, 16384, PROT_READ) = 0     mprotect(0x60b000, 4096, PROT_READ)     = 0     mprotect(0x7fd02fe0a000, 4096, PROT_READ) = 0     munmap(0x7fd02fe02000, 21338)           = 0     brk(0)                                  = 0x2530000     brk(0x2551000)                          = 0x2551000     open("/usr/lib/locale/locale-archive", O_RDONLY) = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=1534672, ...}) = 0     mmap(NULL, 1534672, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd02fc88000     close(3)                                = 0     fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0     open("/etc/localtime", O_RDONLY)        = 3     fstat(3, {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0     fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0     read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 32768) = 1892     write(1, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 1892


title: Run CentOS 6 from a USB flash drive

text: I have a 16 GB USB flash drive that I would like to install CentOS 6 on so that I can boot into it on other computers. The reason for this is because I am going to be upgrading to VPS hosting and I would like to recreate the environment so that I can have a production website and simply sync it to live site. However, for various reasons, I don't want to be tied to one computer. I have tried using LinuxLive USB Creator, which worked absolutely perfectly, apart from even though I set the persistent file to the maximum when I installed packages they weren't there after a reboot. I did install CentOS on an old laptop, if that will allow me to install CentOS on the flash drive somehow? Alternatively, would it install on an external hard drive? Do computers boot from external harddrives?


title: How to install oald8 in linuxmint 16?

text: Hello I tried to install oald8 in linux mint 16 petra 64 bits using the following command ~/Desktop/Oxford/linux $ linux32 sh ./setup.sh. during the installation I got these error massages at the last: "Install fonts cp: cannot stat ‘setup.data/AWLPhonetics3U.TTF’: No such file or directory ./fonts.scale: fopen(w): Permission denied ./fonts.dir: fopen(w): Permission denied Install desktop shortcut Installation complete." Now I can open oald8 but with no sound and a pop of massage "This page contains information of a type (application/x-shockwave-flash) that can only be viewed with the appropirate plug-in "


title: Command line error in OpenSUSE (old version)

text: I'm using an old version of OpenSUSE and when I try to update some package via the command line, e.g.               Zypper update firefox      it shows the message listed below. > System management is locked by the application with pid > 2181(/usr/sbin/packagekitd).   >  Close this application before trying again.


title: What is the encryption function in Encfs?

text: I'm a newbie at Encfs. After I read a paper about Encfs, I figured out there is a Encryption layer in Encfs. So I tried to find exact encryption function. but I couldn't find that because there are many functions. Does anyone have any idea or advice?


title: GPIO User Space App

text: GPIO User Space App describes user space application to test the GPIO. Another related link is Linux GPIO Driver. This would be running on a xilinx zynq board having an ARM Cortex A 9 processor. I am unable to understand why they are asking to compile this source code using gcc:               // the following bash script to toggle the gpio is also handy for     // testing     //     // while [ 1 ]; do     //  echo 1 > /sys/class/gpio/gpio240/value     //  echo 0 > /sys/class/gpio/gpio240/value     // done          // to compile this, use the following command     // gcc gpio.c -o gpio      Should it not be ARM-linux-gcc. instead of gcc? Or these commands are to be typed on the target once the kernel boots?


title: Using mintty as default terminal on Cygwin and default shell as bash

text: There is already one answered the question at Best way to use a shell with Cygwin in Windows 7. That is to start Cygwin with `C:\cygwin\bin\mintty.exe -` With that `$SHELL = /bin/sh` How can I launch mintty with `/usr/bin/bash` as default shell?


title: Kolab behind Nginx Reverse Proxy: Connection to Storage Server failed

text: I am trying to setup a Kolab 3.2 instance in a virtualized environment, i can add users via /kolab-webadmin/ but i cannot login via /roundcubemail/ The error message shows the following: Connection to Storage Server failed. Here my setup: ## VM-Host Ubuntu 12.04 routed networking with NAT to guests Guest network: 172.16.99.0/24 nginx 1.4.1 as reverse proxy Nginx_Config               server {         listen XXX.XXX:XXX.XXX:443;         server_name kolab.example.org;         access_log  /var/log/nginx/log/kolab-access.log;         error_log  /var/log/nginx/log/kolab-error.log;         root   /usr/share/nginx/html;         index  index.html index.htm;         client_max_body_size 200m;              ssl on;         ssl_certificate        /etc/ssl/nginx/server.crt;         ssl_certificate_key    /etc/ssl/nginx/server.key;         keepalive_timeout    60;              ssl_ciphers            HIGH:!ADH:!MD5;         ssl_protocols            SSLv3 TLSv1;         ssl_prefer_server_ciphers    on;              proxy_buffers 16 64k;         proxy_buffer_size 128k;              location / {                 proxy_pass  https://kolab;                 proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;                 proxy_redirect off;                 proxy_set_header        Host            $host;                 proxy_set_header        X-Real-IP       $remote_addr;                 proxy_set_header        X-Forwarded-For                 $proxy_add_x_forwarded_for;                 proxy_set_header X-Forwarded-Proto https;         }     }      ## Kolab Guest: CentOS 6.5 IP 172.16.99.3 Kolab installed via yum and kolab-setup tail -f /var/log/roundcubemail/userlogins shows:               []: Failed login for user@example.org from 172.16.99.1(X-Real-IP: XXX.XXX.XXX.XXX,X-Forwarded-For: XXX.XXX.XXX.XXX) in session 1as8555b02l80j3173btahkj45 (error: -2)      I am not too familiar with CentOS but it is the reference distro for kolab, so I choosed to give it a shot. Another Point is: I was able to login on an Ubuntu 14.04 Host but then was stopped by several strange errors due to bad debian packaging.


title: Problems installing MELT plug in

text: I'm trying to install MELT plug-in on my linux machine, and I encounter some errors. Following the readme file, I run:               apt-get install gcc-4.7 g++-4.7 make texinfo texi2html autogen gawk     apt-get build-dep gcc-4.7     apt-get install libppl-dev libppl-c-dev gcc-4.7-plugin-dev       This command finished running with only the few following comments:               Note, selecting 'libppl0.11-dev' instead of 'libppl-dev'     Note, selecting 'libppl0.11-dev' instead of 'libppl-c-dev'      when I run `make all` I get the following errors:               melt/generated/meltrunsup.h:168: unidentified type `operator'     melt/generated/meltrunsup.h:172: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:196: unidentified type `operator'     melt/generated/meltrunsup.h:200: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:224: unidentified type `operator'     melt/generated/meltrunsup.h:228: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:252: unidentified type `operator'     melt/generated/meltrunsup.h:256: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:280: unidentified type `operator'     melt/generated/meltrunsup.h:284: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:308: unidentified type `operator'     melt/generated/meltrunsup.h:312: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:336: unidentified type `operator'     melt/generated/meltrunsup.h:340: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:364: unidentified type `operator'     melt/generated/meltrunsup.h:368: parse error: unmatched ''}'' while scanning for ',' or ';'     melt/generated/meltrunsup.h:392: unidentified type `operator'     melt/generated/meltrunsup.h:396: parse error: unmatched ''}'' while scanning for ',' or ';'     _melt-runtime.c:971: unidentified type `std'     _melt-runtime.c:971: parse error: expected '(', 'GTY', or an identifier, have ':'     _melt-runtime.c:13698: unidentified type `Melt_CallFrameWithValues'     _melt-runtime.c:13698: parse error: expected '(', 'GTY', or an identifier, have '<'     _melt-runtime.c:13732: unidentified type `Melt_CallFrameWithValues'     _melt-runtime.c:13732: parse error: expected '(', 'GTY', or an identifier, have '<'     make: *** [gt-melt-runtime.h] Error 1      Why do I get this errors? How do I fix them? **edit** full log of commands I run can be found here: log


title: sudo apt-get install g++-4.8-multilib not working on Mint?

text: I've got the latest version of Linux Mint 16 (64 bit) and in Netbeans I am compiling a project in 32 bit mode. I get the error that I am missing `bits/config.h`. I think this is because I am in 32-bit mode for compiling. I tried installing: > sudo apt-get install g++-4.8-multilib but after a few lines it said: > E: unable to locate package multilib Could someone please help? This line worked for a gcc 4.7 problem: http://stackoverflow.com/questions/4643197/missing-include-bits-cconfig-h- when-cross-compiling-64-bit-program-on-32-bit


title: Merging content of two files with comparing content of column

text: I have a problem trying to merge content of two files : file 1 :               873 1.1.1.1      1033 99.99.99.10     1108 78.2.204.174     1257 78.2.8.181      file 2:               test1 78.2.8.181 p6     test2 99.99.99.10 p9     test7 1.1.1.1 p10     test8 78.2.204.174 p4      I want to merge the two file into one file like this, taking in consideration that the shared columns is the second one, & it must be compared to fit the line in question:               873  1.1.1.1      test7 p10     1033 99.99.99.10  test2 p9     1108 78.2.204.174 test8 p4     1257 78.2.8.181   test1 p6      I've tried several things using `awk` but without success.


title: Cannot SSH to localhost - host key verification failed

text: I'm new to Linux. I have 2 Debian Squeeze hosts running. Let's call them _SqueezeOne_ and _SqueezeTwo_. After logging into _SqueezeOne_ , I ran `ssh- keygen` and added the resulting public key to my authorized key file:               cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys      I also added a public key generated by `puttygen` from my Windows desktop to the same key file. I can `ssh` in from my putty just fine without being asked for my password. However, if I type in either of the following commands:               ssh localhost      ssh One      I get the following error.               The authenticity of host 'localhost (127.0.0.1)' can't be established.     RSA key fingerprint is 75:56:33:22:c3:da:43:72:11:33:ec:50:f4:d0:dd:c7.     Are you sure you want to continue connecting (yes/no)?     Host key verification failed.      If I go to _SqueezeTwo_ , and try to `ssh` to _SqueezeOne_ , I receive the same message. On _SqueezeTwo_ , there is a `~/.ssh/known_host` file, which I know did not create on my own. However, I am not seeing the same `known_hosts` file on _SqueezeOne_. On _SqueezeTwo_ , I can `ssh` to localhost and itself with no problem. What am I doing wrong?


title: Configure rm command

text: I want to configure `rm` command. When one types `rm` to delete a file, then instead of deleting it right away, the file has to be transferred to the .trash of home folder. Can someone help me ?


title: Why does bash variable expansion retain quotes?

text: > echo "hi"     hi     > VAR='echo "hi"'     > $VAR     "hi"      Why is the output of the above commands different? A similar thing occurs with single quotes:               > VAR="echo 'hi'"     > $VAR     > 'hi'


title: Something like pwgen-win for linux?

text: Is there some kind of pwd generator for Linux that has a nice GUI and options like this one for Windows? I know that there is `pwgen`, but as far as I know it does not support mouse/keyboard entropy and it does not have any kind of front end GUI's... or does it?


title: the slash (/) after a directory name on shell commands

text: I have a little question here. If I have two files, say `filea` and `fileb`, `mv filea fileb` would   * delete `fileb`   * rename `filea` to `fileb` Then if I have two directories, say `dira` and `dirb`, `mv dira dirb` would   * move `dira` into `dirb` (it will become `dirb/dira`) Noting that in both cases there are no notice or message, then this is pretty inconsistent to me. I think `mv dira dirb` should just overwrite `dirb` with the contents of `dira` (or merge the two directories under a directory named `dirb`). I remember reading somewhere that a directory name with a slash (like `dira/`) is treated like a directory, and name with no slash (like `dira`) is treated like a file (to certain extents, of course). Anyway now I want to make the shell (zsh and possibly bash) respect my notation of a directory by using a slash. Is there a terminal option which enable me to enforce that? To clarify, here is my desired behaviour:   * `mv dira dirb` results in `dirb` being overwritten with the contents of `dira`   * `mv dira dirb/` results in `dira` being moved into `dirb` (in `dirb/dira`) Has anyone thought the same way as me? Or am I just weird?


title: Easy/simple input method package that works with minimal window manager?

text: I am trying out minimalist window managers such as, but not limited to, Xmonad, ScrotWM, ratpoison, etc. Since I occasionally need to enter Traditional Chinese characters, how do I install an input manager that lets me switch between input methods easily, such as through a hotkey combo? Any instructions would be appreciated.


title: Is it possible to compile a code from within target?

text: I have a target in which i have the toolchain installed with the RFS image.   If i have the kernel source code in some PC in the network which i can mount via NFS, is it possible to compile the source code from the target? If yes, could you explain how or what different techniques are available for it. EDIT : The Scenario I wish to Execute -   When my board boots up it will mount my root file system(RFS) which has the toolchain and the binutils present within it. After the RFS has been mounted successfully, it will connect to the NFS location where my kernel source is present and using the binutils in my RFS, it will try to compile that source code.   Once the compilation is successful the new executable (for eg. vmlinux.bin) will be flashed to the ROM and board will be restarted with the new image. I just want to know if this scenario can be realized. If Yes, how can it be done in a more technical way?


title: Is there a way to store Firefox passwords in a local encrypted database in Linux?

text: I want Firefox to "remember" my passwords so I don't have to type them in; unfortunately, the built-in password manager stores them in plain text, which is too high a security risk. I'd like to find a secure way for Firefox to do basically the same thing. Though I've heard good things about LastPass and other such services, I'm not too comfortable entrusting them with my data; any of those companies could suddenly change their terms, start charging, or just go under. I love the idea of KeeFox, but alas, it's not available for Linux. Any ideas?


title: Seeking command-line example for adding images to MP3 files

text: > **Possible Duplicate:**   >  Searching for a command line tagging tool for mp3 and ogg that supports > pictures Anyone have a command-line example illustrating how to properly embed an image (for instance, cover art) in an mp3 file? I use Ubuntu, but I'm hoping the answer will run on any POSIX-compatible system, preferably in the Bash shell.


title: Motd doesn't show up

text: I'd like to set a custom motd ("message of the day") on my machine (currently Mac OS X 10.6.5 using Bash with Terminal.app). In `/etc/` there was no **motd** file so I created one with some sample text. But the message doesn't show up when I restart Terminal. I've tried to `logout` and then `login` but it still doesn't seem to kick in. If I do `ls -l /etc/motd` I get (if it's any clue): `-rw-r--r-- 1 root wheel 30 7 Dec 11:58 /etc/motd` Am I missing something?


title: Cannot start Apache server with Bugzilla installed

text: Linux noob here... I've installed Bugzilla following the guide here, however, when I restart my Apache server (so I can login to the Bugzilla system), I get the following error...               Jun 27 16:10:30 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...     Jun 27 16:10:30 localhost.localdomain httpd[3519]: AH00526: Syntax error on line 354 of /etc/httpd/conf/httpd.conf:     Jun 27 16:10:30 localhost.localdomain httpd[3519]: Can't locate /var/www/html/bugzilla/mod_perl.pl in @INC (@INC contains: /var/www/html/bugzilla /var/www/html/bugzilla/li...) line 1.\n     Jun 27 16:10:30 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE     Jun 27 16:10:30 localhost.localdomain httpd[3521]: AH00526: Syntax error on line 354 of /etc/httpd/conf/httpd.conf:     Jun 27 16:10:30 localhost.localdomain httpd[3521]: Can't locate /var/www/html/bugzilla/mod_perl.pl in @INC (@INC contains: /var/www/html/bugzilla /var/www/html/bugzilla/li...) line 1.\n     Jun 27 16:10:30 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1     Jun 27 16:10:30 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.     Jun 27 16:10:30 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.      This is despite the fact that the /var/www/html/bugzilla/mod_perl.pl file is present and has sufficient file permissions. Any ideas on how to fix this? (I'm working on Fedora v16 if that helps) Edit: Seemed like the SELinux tags were the problem, server starts now and I can access the bugzilla page, however the cgi file isn't executing it's just displaying at text. Thoughts?


title: PAM login permission denied

text: I have an OpenSuSE 12.3 machine and can't login to the box either on `tty` or via `ssh`. As soon as the user logs in the session terminates and in the message "login [1234] permission denied" is printed. The machine was set to autologin on KDE so that user autologs-in. Any Ideas? **Update:**   I am not sure what has changed on the system, I am not the only one who has access to the box and according to everybody nothing has changed.   The only thing that went wrong on the system was that it takes a backup of a DB on a different machine and there wasn't any space on it. I cleared all the space after some googling updated PAM, that solved the problem.   But then the problem repeated when I check the system there wasn't any space again, cleared the system re-installed PAM to no avail. Upgraded the system from 12.1 to 12.3 but didn't help. There isn't a `/var/log/secure` log. The only relevant message is permission denied. Users are not locked on KDE I can login with any user but not on `tty` or `ssh`, can su/sudo. There are lot of files in `/etc/pam.d/` which one do I need to check


title: How to get smartd to ignore an HDD?

text: I have an external HDD which does not report SMART information properly (it gives nonsense results). As such, the `smartd` daemon (part of `smartmontools`) keeps giving false alarms on how the device might be failing. In `/etc/smartmontools/smartd.conf` (I'm using the default, here) I see a bunch of options but none that relate to my need (ignoring the alarms for a specific hard drive - I would like to be able to refer to it e.g. by USB ID, since the entry in `/dev` will vary if I have more devices connected). I could edit `/usr/libexec/smartmontools/smartdnotify` (the script that `smartd` calls when an event happens) and manually force it to shut up about that specific device, but I'd like to know if there's a less ugly way to do that. How to get `smartd` to not report any warnings for a specific HDD? I would **not** like to disable the daemon; I would like it to just not care about this specific HDD.


title: new distros cause segmentation fault of old binary

text: I have an elderly (~1999) and unfortunately commercial graphic program that runs perfectly OK on systems with gcc up to 3.4.6 (CentOS 4.8). However, in all distributions based on gcc 4.* that I've tried, the program fails with "Segmentation fault" (I tried different versions of CenOS, Sebian and SUSE). There are newer versions of this software (we even have a license) with plenty of new options, so for daily work we're well served. However the old one has this nice option to export a graphic as an x-graphic, whereas the newer versions are only PpenGL-based. Even if x-graphic is ugly (sorry for this adjective) it's much faster if you work over a DSL-line. The only libraries that were missing during installation were: libXp.so.6, libXmu.so.6 and mesa3. I've installed them without any problems using the standard repository. I've tried to `strace` the fault but after loading all of the required libraries the program just stops without giving me too much info:               open("/lib/libuuid.so.1", O_RDONLY)     = 3     read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\17\0\0004\0\0\0"..., 512) = 512     fstat64(3, {st_mode=S_IFREG|0755, st_size=15200, ...}) = 0     mmap2(NULL, 17828, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff7464000     mmap2(0xf7468000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xfffffffff7468000     close(3)                                = 0     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff7463000     mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff7462000     set_thread_area(0xff8de9b4)             = 0     mprotect(0xf746c000, 4096, PROT_READ)   = 0     mprotect(0x439000, 8192, PROT_READ)     = 0     mprotect(0xf74dc000, 4096, PROT_READ)   = 0     mprotect(0xf763f000, 1032192, PROT_READ|PROT_WRITE) = 0     mprotect(0xf763f000, 1032192, PROT_READ|PROT_EXEC) = 0     --- SIGSEGV (Segmentation fault) @ 0 (0) ---     +++ killed by SIGSEGV +++     Segmentation fault      Does anybody have any ideas how to get this program running on the newer distros? p.s. I do not have sources for it. The advise _Use the source, Luke!!_ will not work for me. p.s.s. For curious people - the software is called gaussview v2


title: How do I prevent system information from being displayed on a terminal?

text: I'm working on a curses GUI that is supposed to start up automatically on boot-up in the default linux terminal (I have no X server installed). I have this working great, but I have a problem where shortly after my curses application starts, the OS will dump some information to the terminal, which messes up my GUI. Something about "read-ahead cache" pops up every time. I have also seen messages displayed when I insert a USB flash drive or some other device. Is there a way to prevent these messages from being sent to /dev/tty1?


title: Using Modifiers of Perl-compatible Regex (PCRE) in grep

text: According to `grep --help` and `man grep`, we can use the `-P` option in order to interpret the pattern as a Perl regular expression (PCRE, to be precise), instead of the default POSIX basic regular expressions (BRE). In Perl language, various **Modifiers** can be added to the expression, in order to adjust the pattern interpretation (in the syntax of `/pattern/modifiers`). So, **how can someone add modifiers** to the grep's Perl regular expression? I tried some variations like `grep -P "/^got.it$/ms" [FILE]` but the search results were wrong. However, about the PCRE interpretation, the manual points out that: > _This is highly experimental and **grep -P** may warn of unimplemented > features._ Is it possible that the grep tool **does not support modifiers at all**? By the way, I noticed that one can perform case-insensitive pattern matching by using the `-i` option, which is an example of a modifier.


title: How to setup wine for networking in linux

text: How to setup wine for networking? Unless i have linux access to my windows network, i can't do wine discover the windows network. How to do it?, also wine hasnt cmd line utility so i can't use commands like `net use`, `ping` etc this is the question too.


title: Invoking pushd in a shell script

text: I have a simple script that I want to invoke 'pushed' followed by another command. But the 'pushd' command inside the script doesn't seem to stick past the script. What's a way to make this execute in the shell terminal?               #!/bin/sh          pushd $1     time      What I really want to accomplish is invoke `pushd` followed by `other-command` with one command.


title: What is the use of "magic arguments" in Linux reboot system call?

text: As I was reading Linux source code, and more specifically the system calls code, I came across `sys_reboot` implementation: http://lxr.free- electrons.com/source/kernel/reboot.c#L199.               199 SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd,     200                 void __user *, arg)     201 {     202        ...     ...         286 }      In the middle, there is this specific piece of code:               209      210         /* For safety, we require "magic" arguments. */     211         if (magic1 != LINUX_REBOOT_MAGIC1 ||     212                         (magic2 != LINUX_REBOOT_MAGIC2 &&     213                         magic2 != LINUX_REBOOT_MAGIC2A &&     214                         magic2 != LINUX_REBOOT_MAGIC2B &&     215                         magic2 != LINUX_REBOOT_MAGIC2C))     216                 return -EINVAL;      I wonder what kind of "safety" it actually provides. I mean, is it to prevent misuse? In this case, as the parameters are public, any library or application could misuse the system call even though they are required to pass the parameters. What did I miss?


title: kdialog --getsavefilename target/directory?

text: When I use `kdialog --getsavefilename /path/to/specific/folder/`, it opens `folder/`'s parent directory, not `folder/` itself. How do I get it to start where I want it to?


title: Where on the Web can I find a comprehensive list of rolling-release Linux distros?

text: I'm asking as I've looked for such & can't find a comprehensive list. Feel free to post any less-well-known rolling distros, but I'm really looking for a comprehensive list. I'm thinking of creating a Wikipedia page "List of rolling-release Linux distributions". If there's already a good list somewhere then would help produce a draft of the Wikipedia page. If there isn't such a list on the Web it highlights the need of gathering that information on a site where most people would look for it. Wikipedia seemed to me like the obvious choice but suggestions of a better site [preferably, but not necessarily, a wiki] are welcome. Please don't post Dev.-branches: eg Fedora-Rawhide, Mandriva-Cooker, OpenSuSE- Factory etc. Also, please don't post the following rolling-distros as I'm already aware of them: Aptosid, LMDE, AnitX; OpenSuSE-Tumbleweed; Yoper; Foresight; PCLinuxOS; Unity; Arch, ArchBang, Chakra, Kahel; Gentoo & Sabayon; Lunar, Sorcerer, SourceMage. If any I've mentioned aren't rolling do correct me. I know some might not call AntiX & LMDE rolling as Debian-Testing "cycles". I also know PCLOS & Sabayon can need to be reinstalled (eg when PCLOS re-forks the Mandriva base). BTW I know there's a similar question asking "What distributions have rolling releases?" that was asked in August -- however it seems "inactive" and I'm really after a comprehensive list not the usual suspects. [Please leave a comment if you want to help create such a list or email my user-name at gmail.] PS If anyone objects to the question please post a comment so the moderator can choose whether to close it. I'm happy to re-edit the question if anyone wants so please let me know. :-)


title: not able to run vsftpd by executing the binary file as ./vsftpd

text: To configure vsftpd for virtual users, I followed this link. Though I succeeded in making the virtual users log into the system but it didn't work exactly the way mentioned in the document I followed. The document mentions to run the vsftpd by executing the binary file as ./vsftpd But when I ran, it showed error as below:               ravbholua@ravi:/usr/sbin$ which vsftpd     /usr/sbin/vsftpd     ravbholua@ravi:/usr/sbin$ sudo ./vsftpd     500 OOPS: could not bind listening IPv4 socket     ravbholua@ravi:/usr/sbin$       Please see below the content of the document mentioned in the link(my issue is at step 5 below):(I have mentioned the content below for your ease so that you may not need to go to link)               This example shows how to set up vsftpd / PAM with "virtual users". A virtual user is a user login which does not exist as a real login on the system. Virtual users can therefore be more secure than real users, beacuse a compromised account can only use the FTP server.          Virtual users are often used to serve content that should be accessible to untrusted users, but not generally accessible to the public.          Step 1) Create the virtual users database. We are going to use pam_userdb to authenticate the virtual users. This needs a username / password file in "db" format - a common database format. To create a "db" format file, first create a plain text files with the usernames and password on alternating lines. See example file "logins.txt" - this specifies "tom" with password "foo" and "fred" with password "bar". Whilst logged in as root, create the actual database file like this:          db_load -T -t hash -f logins.txt /etc/vsftpd_login.db (Requires the Berkeley db program installed). NOTE: Many systems have multiple versions of "db" installed, so you may need to use e.g. db3_load for correct operation. This is known to affect some Debian systems. The core issue is that pam_userdb expects its login database to be a specific db version (often db3, whereas db4 may be installed on your system).          This will create /etc/vsftpd_login.db. Obviously, you may want to make sure the permissions are restricted:          chmod 600 /etc/vsftpd_login.db          For more information on maintaing your login database, look around for documentation on "Berkeley DB", e.g. http://www.sleepycat.com/docs/utility/index.html               Step 2) Create a PAM file which uses your new database.          See the example file vsftpd.pam. It contains two lines:          auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login account required /lib/security/pam_userdb.so db=/etc/vsftpd_login          This tells PAM to authenticate users using our new database. Copy this PAM file to the PAM directory - typically /etc/pam.d/          cp vsftpd.pam /etc/pam.d/ftp          (Note - if you set pam_service_name to e.g. vsftpd instead, you'll need to copy to /etc/pam.d/vsftpd).               Step 3) Set up the location of the files for the virtual users.          useradd -d /home/ftpsite virtual ls -ld /home/ftpsite (which should give): drwx------    3 virtual  virtual      4096 Jul 30 00:39 /home/ftpsite          We have created a user called "virtual" with a home directory "/home/ftpsite". Let's add some content to this download area:          cp /etc/hosts /home/ftpsite chown virtual.virtual /home/ftpsite/hosts               Step 4) Create your vsftpd.conf config file.          See the example in this directory. Let's go through it line by line:          anonymous_enable=NO local_enable=YES          This disables anonymous FTP for security, and enables non-anonymous FTP (which is what virtual users use).          write_enable=NO anon_upload_enable=NO anon_mkdir_write_enable=NO anon_other_write_enable=NO          These ensure that for security purposes, no write commands are allowed.          chroot_local_user=YES          This makes sure that the virtual user is restricted to the virtual FTP area /home/ftpsite we set up above.          guest_enable=YES guest_username=virtual          The guest_enable is very important - it activates virtual users! And guest_username says that all virtual users are mapped to the real user "virtual" that we set up above. This will also determine where on the filesystem the virtual users end up - the home directory of the user "virtual", /home/ftpsite.          listen=YES listen_port=10021          This puts vsftpd in "standalone" mode - i.e. not running from an inetd. This means you just run the vsftpd executable and it will start up. This also makes vsftpd listen for FTP requests on the non-standard port of 10021 (FTP is usually 21).          pasv_min_port=30000 pasv_max_port=30999          These put a port range on passive FTP incoming requests - very useful if you are configuring a firewall.          Copy the example vsftpd.conf file to /etc:          cp vsftpd.conf /etc/               Step 5) Start up vsftpd.          Go to the directory with the vsftpd binary in it, and:          ./vsftpd          If all is well, the command will sit there. If all is not well, you will likely see some error message.               Step 6) Test.          Launch another shell session (or background vsftpd with CTRL-Z and then "bg"). Here is an example of an FTP session:          ftp localhost 10021 Connected to localhost (127.0.0.1). 220 ready, dude (vsFTPd 1.1.0: beat me, break me) Name (localhost:chris): tom 331 Please specify the password. Password: 230 Login successful. Have fun. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd 257 "/" ftp> ls 227 Entering Passive Mode (127,0,0,1,117,135) 150 Here comes the directory listing. 226 Transfer done (but failed to open directory). ftp> size hosts 213 147 ftp>          Comments: The password we gave was "foo". Do not be alarmed by the "failed to open directory". That is because the directory /home/ftpsite is not world readable (we could change this behaviour if we wanted using anon_world_readable_only=NO but maybe we want it this way for security. We can see that we have access to the "hosts" file we copied into the virtual FTP area, via the size command.      Why it didn't run as above thought the document mentions this way to run. So, I had to run vsftpd as:               ravbholua@ravi:/usr/sbin$ sudo service vsftpd restart      Now, it works and the virtual users created are able to log into the common directory that I had set.


title: testing sites on current Internet explorer on mint 16

text: I need a reliable way to perform compatibility testing for websites on IE 9+. I'm running Mint 16 and have attempted WINE emulation but it doesn't appear to have a current version. I would prefer a local solution but have not found one yet. Is there a way to run IE 9+ on Linux Mint? Thank you!


title: Unable to install Linux Mint 17 on hardware that uses AMD APU (A5800k) with MSI motherboard

text: I and many other users of Linux Mint are not able to install Mint 17 on hardware that uses AMD APU (A5800k) with MSI mobo. I understand that the issue has been noted but I cannot find a fix to this problem. Linux Mint 16, however, installed without issue on the same hardware. The Mint 17 installation almost installed, but the pc rebooted after just a few seconds as it began to display the first screen shot of the installation process. So near yet so far! Any suggestions when a remedy may be forthcoming?


title: How do I control ip routing in the new firewalld?

text: I have the following scenario: Our fedora server is connected to the internet on `eth0` and has a second nic, `wlan0` acting as an access point. The purpose of the access point is to provide a connection for mobile users to the services running on the server. We do NOT want users connecting on that access point to use the internet connection on the other NIC. If it had been an older version of Fedora, I would do this in iptables:               iptables -P FORWARD DROP      **The new network manager doesn't use`iptables` any more, so how do I establish the same effect?**


title: Long line wrapping in Nano

text: When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of `cat authorised_keys` So, I hit `Esc + L` which is the meta key for enabling long line wrapping on my platform and I see the message to say long line wrapping has been enabled but the lines do not wrap as I expect. I'm using Terminal on OSX 10.8.5


title: Focusrite Scarlett on Linux input mapping?

text: Does anyone use these interfaces on Linux? If so, how do the inputs map (e. g. with ALSA/PulseAudio)? E. g. the Scarlett 6i6 has the following connections. Inputs:   * 2x symmetric XLR inputs (one for each channel)   * 2x symmetric phone connector inputs (one for each channel)   * 1x coaxial SPDIF input (stereo signal over a single wire) Outputs:   * 4x symmetric phone connector output   * 1x coaxial SPDIF output (stereo signal over a single wire) Each input has its own ADC and each output has its own DAC, so there's nothing that goes "through" to another channel. Now my question is: How does this map onto audio channels under Linux?   1. Output-wise: Is it recognized as a single 6-channel card, so e. g. phone connector 1 is "front left", phone connector 2 is "front right", phone connector 3 is "rear left", phone connector 4 is "rear right", SPDIF channels are front and LFE or similar, "awkward" situation? Or is it recognized as three separate stereo audio cards? Or is even each output a single mono audio card? Or how?   2. Input-wise: Do the 2x symmetric XLR inputs form a "stereo pair", so that when I plug a microphone into one, then record, I only get signal on, say, left channel, and the right one is silent? Or do they act as two separate mono inputs? What with the other inputs? Would be great if someone had this interface running under Linux and could give me some insights. I plan plugging a condenser mic into the interface via XLR and would be interested if the two XLRs act as a "stereo input" and when I record, I get signal on one channel but not on the other or how this would turn out.


title: Bash globbing hidden files

text: I'm trying the following globs in a bash shell:               $ ls -d .*     .  ..  .a  .ab     $ ls .a*     .a  .ab     $ ls .[!.]*     .a  .ab     $ ls .[!.]?*     .ab      Shouldn't the last expression mean "a dot followed by exactly one non-dot followed by zero or more characters"? Why does it fail to match `.a`?


title: Why does boot fail with my custom kernel at the mknod step?

text: I want to build a custom kernel under Ubuntu. I configured and built the new kernel. The new kernel hasn't initrd and comes from vanilla source. I build this new monolithic kernel only with drivers it needs. When I try to boot the new kernel I'm stuck at the `mknod` step. It tries to `mknod` new devices like `/dev/sda1` `/dev/vca4`. It fails because the root partition is mounted read-only. I think the problem is that I've lost something about my hardware. If I boot with the default Ubuntu kernel, I haven't got any problems. Could anyone help me to understand why this happens?


title: How to expire a password? (For inital account creation)

text: I've often created temporary passwords for users for my own development machine for initial id creation. For other environments, I've seen admins have the ability to have a password show as expired immediately, forcing me to change my password on first login. How does one do this? (In this specific case I am using RHEL, but I'm hoping this information is universal across all/most linux distros)


title: What's the "Unix way" for a CLI app to report no arguments specified?

text: I'm developing an application which I'd like to follow the "Unix way." What should I program it to do in case it is called with no arguments (which makes no practical sense):   * display an error message   * display help, or    * exit silently returning `0` considering the task specified (which is nothing to do) was successfully accomplished?


title: adding system calls to kernel without recompiling during implementation

text: Could anyone tell me if it is possible to add several system calls to the linux kernel (version 2.6.35) and not have to recompile the kernel each time I change one of their implementations (i.e. method body). For example add to syscall_table, unistd.h, ... and then make stubs for the system calls, recompile, then implement/test the method bodies without having to recompile the entire kernel (takes like 4 hours). I have looked it up but haven't found anything online with an answer. The reason I ask is if I have to compile for 4+ hours each time I change something its really inefficient UPDATE: Thanks for all the responses I solved my problem I was receiving some faulty advice from my TA which led me to this issue but have since resolved the issue. I appreciate everyone's comments and help on the issue if anyone one else reads this and is running into the same problem after the inital kernel compilation when I added system calls I just recompiled the kernel using make bzImage then make install and rebooted and things worked fine


title: tmux and Powerline: working configuration

text: # Background I found very interesting the Powerline project. After several attempts, I managed to get it to work correctly for _Vim_. Then I did proceed with enabling it for _tmux_ , by pasting the following line in my `~/.tmux.conf`.               source '{repository_root}/powerline/bindings/tmux/powerline.conf'      It doesn't work as expected. This is the way it looks at the moment (plus the line above I pasted in the configuration file). ![tmux and Powerline](http://i.stack.imgur.com/GiUXb.png) # Question How can I get it to work as expected? > Expectation: basically, date and time on the right side. > > ![left side of tmux](https://raw.github.com/erikw/tmux- > powerline/master/img/left-status.png) ![right side of > tmux](https://raw.github.com/erikw/tmux-powerline/master/img/right- > status_weather_battery.png) > > These screenshots come from another project, tmux-powerline, which evolved > to Powerline. Therefore I expect the new plugin to have a similar status > line organisation. Furthermore, this "expectation" is _supported_ by this > configuration file for _tmux_. # Rewording the question I'm trying to get _Powerline_ work correctly for _tmux_. The left part (`13 > 1 > bash > 2 > vim >`) is fine, the right one (`< Sat < 2012-06-16 < 18:51`) is missing. About _tmux_ 's alternative status bars, I do have already mine, nicely polished ;) My question, here, is only about getting _Powerline_ working properly, otherwise I believe vim-airline would do a better job as a even lighter plug-in. # Further information _Vim_ version: `VIM - Vi IMproved 7.4`   _tmux_ version: `tmux 1.8`


title: fstab not mounting a disk on boot

text: I'm running Arch Linux on a Macbook. I want to automatically mount my Macintosh partition when booting Arch, so I added the following to `/etc/fstab`:               /dev/sda2   /media/Machintosh hfsplus defaults 1 2      After rebooting, the partition was not mounted, but I could mount it with the following command:               sudo mount /dev/sda2      How can I make Arch Linux automatically mount the partition?


title: Is there any alternative to grep's -A -B -C switches (to print few lines before and after )?

text: grep -A 2 -B 3       prints 2 lines after the grep string and prints 3 lines before.               grep -C 3      prints 3 Lines before and 3 lines after Unfortunately, the `grep` I'm using does not support these options. Are there any alternative commands or script available to simulate this? Using `sed`/`awk`/`perl`/shell scripts?


title: splitting the array and send the values to hashset in awk

text: I am getting var as argument from shell script to awk               awk -v var = "blah1|blah2|blah3" -f awk_script.awk      I need to put each blah's into a hashset, currently, I am doing it like this. I am getting it into an array and looping through the array and putting it into a hashset. **Can I do better like getting the var and putting the variables directly into a hashset instead of parsing the var into an array first?**                   split(var,arr,"|");         for ( i = 1; i <= length(arr); i++ )         {                 dest = arr[i];                 exclusion_destinations[dest];         }      down the line, I check               if ( dest in exclusion_destinations )     {     // do something     }


title: Load module from the boot menu

text: Is there a way to insert/load a module at the boot menu in Suse? I'm referring to the menu in the screenshot below (this isn't from my machine, just a similar screenshot I took from the web). I know you add modules to boot via INITRD_MODULES in /etc/sysconfig/kernel, but I'm unable to get into my root partition, even in rescue mode. I did an in-place upgrade to SLES 11 SP2 and this new service pack seems to have an issue with booting my iSCSI HBA. The proper qla4xxx driver loads fine, but no disks are found. I've been through hours of troubleshooting and found that two drivers need to be loaded in SP2 that I previously never needed: iscsi_boot_sysfs and libiscsi. I want to see if I can specify these two at the main menu and force them to load during boot. Thanks. ![SLES Boot menu](http://i.stack.imgur.com/amylh.jpg)


title: Why is this make file not working?

text: I have tried to simplify this makefile to the bare minimum, but cannot get it to use an executable to convert one type of file to another if the timestamps have changed. I'm sure there is a stupidly simple answer but cannot find it:               %.pvr : %.bmp             $(toolpath) -i"$<" -fOGLPVRTC4 -r2 -x512 -y512 -m -o$@          all : 01.pvr          01.pvr : 01.bmp      I am attempting to convert all .bmp files specified to .pvr 01.pvr does not exist. 01.bmp does exist. However i always get               make: Nothing to be done for `all'.      Edit: ok, this was not the exact makefile I was using, in fact the files were not called 01.pvr and 01.bmp, they were foo.pvr and bar.bmp This seems to make a difference. What could that be?


title: Does GNOME 3 support desktop zoom?

text: GNOME 3 is not compatible with Compiz, so I cannot use the desktop zoom feature from Compiz. I googled for a long time, and it seems GNOME still does not support desktop zoom -- does it? I am using GNOME 3.2.1


title: What mysql command can show me the tables in a database and how many rows there are?

text: is there a mysql command that will show me the tables and how many rows they have in them?


title: lpr printing wrong ASCII characters

text: Since upgrading to Ubuntu 12.04, the printing of plain text files with lpr on my HP LaserJet 2420 printer malfunctions in a very specific way: for each character that is supposed to be printed, the character that is actually printed is the one whose ASCII code is precisely 2 plus the ASCII code of the correct character. For instance `echo "A" | lpr` prints the letter C and `echo "Z" | lpr` prints the symbol \ and so forth. I have installed the standard hplip library. Does anyone know what might be causing this weird problem, and how to fix it?


title: How can I get notified by everything that happens in a specific channel in irssi?

text: (Be it hilight/highlight or a beep). I have a small channel that I need to know all the info of. I couldn't get trigger.pl to work. I could do "/hilight -mask every_single_nick" but that's not efficient enough.


title: Can't add a resolution in Mint 14 Nadia (ATI RV516 X1350)

text: I just got a bootable USB w/ Linux Mint 14 Nadia installed and I ran into some problems with my laptop's graphic drivers. Computer is fairly old, it's HP Compaq 6820s from around 2008. Problem actually is that when I go to `Menu > Preferences > Display` (in Cinnamon), there's only three options for resolution: 1152x864, 1024x768, 800x600, all of them 4:3. I need to have 1440x900 for my display and I could not find any way to do this. I tried several approaches and I will tell what I have tried. First of all, if I type `~ $ inxi -G` following output is shown                Graphics:  Card: Advanced Micro Devices [AMD] nee ATI RV516 [Mobility Radeon X1350]         X.Org: 1.12.4 drivers: (unloaded: fbdev) FAILED: vesa Resolution: 1152x864@60.0hz         GLX Renderer: Gallium 0.4 on llvmpipe (LLVM 0x301) GLX Version: 2.1 Mesa 9.0.2      I tried using both, `xrandr` and `xorg.conf` manual setup but failed. According to tutorial by Thinker at http://community.linuxmint.com/tutorial/view/877 I went through all the steps, however an error was shown in both cases offered. When I give a command xrandr following error occurs: `xrandr: Failed to get size of gamma for output default` That is, I am unable to run `xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync` So, I moved to a second approach where I needed to make xorg.conf file and put it into /etc/X11/. I did it with correct options entered, similar to what was shown in a tutorial I referred, replaced with my own values. Unfortunately, while booting (before login screen) an error came out saying that xorg.conf was mis-configured and system required fixing (i.e. deleting) it. I tried installing drivers for ATI Mobility Radeon X1350, those were .run files that I needed to execute with root permissions, I tried about 6 different versions and none of them worked (terminal would close after a message about invalid version). Then, I tried installing AMD Catalyst program, which did not work either, a message said there was no appropriate driver on system. This program destroyed my Mint panel (bottom panel with menu, window list and taskbar) and it became visually and funciontally different. Somehow, I uninstalled this program and after logout/login a panel got to its place. My question is if there is a way I can set my screen to 1440x900 because eyes hurt and can't work in such environment.


title: 403 Forbidden on Sub-Folders

text: I am a Linux newbie and decided to do a LAMP install to start getting more familiar with it (as our company is moving more towards nix these days). Everything went great and PHPMyAdmin, MySQL, Apache/PHP all seem to be running fine. The test `.php` files I uploaded to the `/var/www/html` directory worked fine, but after extracting a tarball with a folder inside of it to that directory, I receive a `403 Forbidden` error when attempting to access it. I have tried...   * Setting SELinux to permissive mode   * CHMOD directory to 777 for testing. It fixes the 403 error but all the php files in it are just white pages   * Setting a in the Apache configuration The httpd error_log reports (before I set it to permissive)...               SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0     suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)


title: How to delete the oldest file over FTP using CURL?

text: I am trying to write a script that will use CURL to FTP to a folder on a file server, then count the files in that folder. If there are more than 5 files, delete the oldest one. I know how to delete files over FTP with CURL, however the counting and getting oldest file name is where I am lost.


title: I have a route to the network but from the traceroute output it doesn't leave the server

text: I have an HP-UX box and I'm trying to determine why a host can't be reached. I'm trying to reach the host 10.32.13.146               root@hp-ux:/root # traceroute -I 10.32.13.146          traceroute to 10.32.13.146 (10.32.13.146), 30 hops max, 40 byte packets      1  * * *      2  * * *      3  * * *      I already have a route to the network as seen below - 10.32.13.128/255.255.255.128 10.32.32.1.               root@hp-ux:/root # netstat -rnv Routing tables Dest/Netmask                Gateway            Flags Refs Interface  Pmtu     127.0.0.1/255.255.255.255       127.0.0.1          UH    0    lo0       32808     10.32.32.25/255.255.255.255     10.32.32.25        UH    0    lan901    32808     142.40.216.27/255.255.255.255   142.40.216.27      UH    0    lan900    32808     142.40.216.0/255.255.255.128    142.40.216.27      U     2    lan900     1500     10.32.32.0/255.255.255.128      10.32.32.25        U     2    lan901     1500     10.32.33.0/255.255.255.128      10.32.32.1         UG    0    lan901     1500     10.32.37.0/255.255.255.128      10.32.32.1         UG    0    lan901     1500     10.32.46.128/255.255.255.128    10.32.32.1         UG    0    lan901     1500     10.106.132.128/255.255.255.128  10.32.32.1         UG    0    lan901     1500     10.32.13.128/255.255.255.128    10.32.32.1         UG    0    lan901     1500     10.106.129.0/255.255.255.0      10.32.32.1         UG    0    lan901     1500     127.0.0.0/255.0.0.0             127.0.0.1          U     0    lo0       32808     default/0.0.0.0                 142.40.216.1       UG    0   lan900     1500      Does anybody can explain what's wrong with this server and how to fix this situation? Edit: No problems reaching 10.32.32.25               root@hp-ux:/root# ping 10.32.32.25 -n 1     PING 10.32.32.25: 64 byte packets     64 bytes from 10.32.32.25: icmp_seq=0. time=0. ms          ----10.32.32.25 PING Statistics----     1 packets transmitted, 1 packets received, 0% packet loss     round-trip (ms)  min/avg/max = 0/0/0      Here is the /etc/rc.config.d/netconf               root@hp-ux:/root# grep -v ^# /etc/rc.config.d/netconf          HOSTNAME="hp-ux"     OPERATING_SYSTEM=HP-UX     LOOPBACK_ADDRESS=127.0.0.1                         ROUTE_DESTINATION[0]="default"     ROUTE_MASK[0]=""     ROUTE_GATEWAY[0]="142.40.216.1"     ROUTE_COUNT[0]="1"     ROUTE_ARGS[0]=""     ROUTE_SOURCE[0]=""               GATED=0     GATED_ARGS=""               RDPD=0               RARPD=0               DEFAULT_INTERFACE_MODULES=""     INTERFACE_NAME[1]="lan900"     IP_ADDRESS[1]="142.40.216.27"     SUBNET_MASK[1]="255.255.255.128"     BROADCAST_ADDRESS[1]="142.40.216.127"     INTERFACE_STATE[1]="up"     DHCP_ENABLE[1]="0"     INTERFACE_MODULES[1]=""     INTERFACE_NAME[2]="lan901"     IP_ADDRESS[2]="10.32.32.25"     SUBNET_MASK[2]="255.255.255.128"     BROADCAST_ADDRESS[2]="10.32.32.127"     INTERFACE_STATE[2]="up"     DHCP_ENABLE[2]="0"     INTERFACE_MODULES[2]=""     ROUTE_DESTINATION[1]="net 10.32.33.0"     ROUTE_GATEWAY[1]=10.32.32.1     ROUTE_COUNT[1]=1     ROUTE_MASK[1]=255.255.255.128     ROUTE_ARGS[1]=     ROUTE_DESTINATION[3]="net 10.32.46.128"     ROUTE_GATEWAY[3]=10.32.32.1     ROUTE_COUNT[3]=1     ROUTE_MASK[3]=255.255.255.128     ROUTE_ARGS[3]=     ROUTE_DESTINATION[2]="net 10.32.37.0"     ROUTE_GATEWAY[2]=10.32.32.1     ROUTE_COUNT[2]=1     ROUTE_MASK[2]=255.255.255.128     ROUTE_ARGS[2]=     ROUTE_DESTINATION[4]="net 10.106.129.0"     ROUTE_GATEWAY[4]=10.32.32.1     ROUTE_COUNT[4]=1     ROUTE_MASK[4]=255.255.255.0     ROUTE_ARGS[4]=     ROUTE_DESTINATION[5]="net 10.106.132.128"     ROUTE_GATEWAY[5]=10.32.32.1     ROUTE_COUNT[5]=1     ROUTE_MASK[5]=255.255.255.128     ROUTE_ARGS[5]=     ROUTE_DESTINATION[6]="net 10.32.13.128"     ROUTE_GATEWAY[6]=10.32.32.1     ROUTE_COUNT[6]=1     ROUTE_MASK[6]=255.255.255.128     ROUTE_ARGS[6]=


title: tc on bridge port

text: I have a 4 port bridge:               root@Linux-Switch:~# brctl show     bridge name bridge id       STP enabled interfaces     br0     8000.000024cd2cb0   no      eth0                                 eth1                                 eth2                                 eth3      My goal is to limit the upload speed of the eth2 interface. (eth0 is the uplink interface to the upstream switch). I've been trying to do this via tc and iptables.               # tried in both the filter table and mangle table     iptables -A FORWARD -t mangle -m physdev --physdev-in eth2 -j MARK --set-mark 5           tc qdisc add dev eth0 root handle 1:0 htb default 2     tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1mbit ceil 1mbit     tc class add dev eth0 parent 1:0 classid 1:2 htb rate 5mbit ceil 5mbit     tc filter add dev eth0 parent 1:0 handle 5 fw flowid 1:1      I can see that the `iptables` rule is matching-               root@Linux-Switch:~# iptables -vL -t mangle     ...          Chain FORWARD (policy ACCEPT 107K packets, 96M bytes)      pkts bytes target     prot opt in     out     source   destination              38269   11M MARK       all  --  any    any     anywhere anywhere     PHYSDEV match --physdev-in eth2 MARK set 0x5           ...     root@Linux-Switch:~#       But the tc config is not reading the fw mark; all traffic in port eth2 is being limited to the 5Mb default, not the 1Mb I'm attempting to configure.               root@Linux-Switch:~# tc -s class show dev eth0     class htb 1:1 root prio 0 rate 1000Kbit ceil 1000Kbit burst 100Kb cburst 100Kb       Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)       rate 0bit 0pps backlog 0b 0p requeues 0       lended: 0 borrowed: 0 giants: 0      tokens: 200000 ctokens: 200000          class htb 1:2 root prio 0 rate 5000Kbit ceil 5000Kbit burst 100Kb cburst 100Kb       Sent 11465766 bytes 39161 pkt (dropped 0, overlimits 0 requeues 0)       rate 6744bit 3pps backlog 0b 0p requeues 0       lended: 39161 borrowed: 0 giants: 0      tokens: 2454400 ctokens: 2454400          root@Linux-Switch:~#       What am I doing wrong?


title: KDE icon stuck top of left sidebar

text: I have gotten this icon stuck on top of the left sidebar (I circled it with red, just below the menu and there doesn't seem to be a way to remove it. When I right click on the icons below, it's the Task Manager and there's a close icon but when I right click this one I get Icon settings and Panel settings and nothing more. ![stuck icon](http://i.stack.imgur.com/Mkcjj.png)


title: Linux Shell Script - Send command over TCP to Sharp Aquos

text: I'm writing a shell script that needs to send an 8 character string terminated with a x0d to a Sharp Aquos TV. An example is `'POWR1 \x0d'` (POWR1 followed by three spaces and LF) The documentation is poor. it says protocol TCP/IP (nothing about UDP or TCP) and service: nothing: do not select telnet or SSH. In the past, for similar projects I've been able to use socat and something like:               echo -e -n 'POWR1   \x0d' | socat - tcp4:192.168.1.88:10002      However, all I get is `"socat[3875] E connect(3, AF=2 192.168.1.88:10002, 16): Connection refused"` Anyone got any ideas


title: Why are my system preferences not saved when changing file associations?

text: Every time I open a .csv file it tries to open in LibreOffice Calc which I don't want it to, so I changed the default program to Kate, and it updates the system preferences. But then the next time I open a .csv file (even the same one) it goes back to trying to open it in LibreOffice. Is there a better way to update the file associations, or to stop LibreOffice overriding my preferences? I'm running Linux Mint 15, Olivia. Thanks.


title: Emacs not showing filename

text: Where once was the filename of the file now there is a black stripe, preventing me to see what I'm editing. ![enter image description here](http://i.stack.imgur.com/OC10z.png) To clarify a bit, it's that black stripe between "F1" and "All", when I did the screenshot I was editing my .emacs file. I'm running GNU Emacs 23.2.1 (with the `-nw` flags) on Ubuntu 11.04. I've tried executing `emacs -q`, the graphical interface pops up and the file name is correctly readable. Here is my .emacs:               (defconst user-init-dir '~/Dropbox/emacs)     (add-to-list 'load-path "~/Dropbox/emacs")          (add-to-list 'load-path "~/Dropbox/clojure/clojure-mode")     (require 'clojure-mode)          (eval-after-load "slime"        '(progn (slime-setup '(slime-repl))))          (add-to-list 'load-path "~/Dropbox/emacs/slime")     (require 'slime)     (slime-setup)          ;;line numbers     (global-linum-mode)     ;;parens highlight     (show-paren-mode 1)          (require 'package)     (add-to-list 'package-archives       '("marmalade" . "http://marmalade-repo.org/packages/"))          ;;steve yegge's js mode http://code.google.com/p/js2-mode/wiki/InstallationInstructions     (setq load-path (append (list (expand-file-name "~/Dropbox/emacs/js2")) load-path))     (autoload 'js2-mode "js2" nil t)     (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))          ;;save how the session was when i exited http://www.gnu.org/s/libtool/manual/emacs/Saving-Emacs-Sessions.html     (desktop-save-mode 1)      EDIT: Sadly this seems to be bigger than I thought, seems to be a wider configuration of colors which somehow I changed, I'm almost certain of this because now `man` does not show flags letters for the switches in its pages and completions in emacs are not shown. Anyway, this just for the sake of completeness, maybe I'll open a new question on this after I've searched a bit more...


title: Disable the display of "terminated xxx" info of bash

text: For example, when I kill a background process, then bash weil display `terminated xxx`, How to disable this info?               $ ping g.cn >/dev/null &     [1] 25123     $ pkill ping     [1]  + 25123 terminated  ping g.cn > /dev/null