title: How to "correctly" start an application from a shell

text: I find it hard to phrase the question precisely but I will give my best. I use `dwm` as my default window manager and `dmenu` as my application launcher. I hardly use GUI applications aside from my browser. Most of my work is done directly from the command line. Furthermore, I'm a great fan of minimalism regarding operating systems, applications etc. One of the tools I never got rid of was an application launcher. Mainly because I lack a precise understanding of how application launchers work/what they do. Even extensive internet search only shows up vague explanation. What I want to do is get rid even of my application launcher because apart from actually spawning the application I have absolutely no use for it. In order to do this I would really like to know how to "correctly" start applications from the shell. Whereby the meaning of "correctly" can be approximated by "like an application launcher would do". I do not claim that all application launchers work the same way because I do not understand them well enough. I know about the following ways to spawn processes from the shell:   1. `exec /path/to/Program` replace shell with the specified command without creating a new process   2. `sh -c /path/to/Program` launch shell dependent process   3. `/path/to/Program` launch shell dependent process   4. `/path/to/Program 2>&1 &` launch shell independent process   5. `nohup /path/to/Program &` launch shell independent process and redirect output to `nohup.out` * * * Update 1: I can illustrate what e.g. `dmenu` does reconstructing it from repeated calls to `ps -efl` under different conditions. It spawns a new shell `/bin/bash` and as a child of this shell the application `/path/to/Program`. As long as the child is around so long will the shell be around. (How it manages this is beyond me...) In contrast if you issue `nohup /path/to/Program &` from a shell `/bin/bash` then the program will become the child of this shell BUT if you exit this shell the program's parent will be the uppermost process. So if the first process was e.g. `/sbin/init verbose` and it has `PPID 1` then it will be the parent of the program. Here's what I tried to explain using a graph: `chromium` was launched via `dmenu`, `firefox` was launched using `exec firefox & exit`:               systemd-+-acpid             |-bash---chromium-+-chrome-sandbox---chromium-+-chrome-sandbox---nacl_helper             |                 |                           `-chromium---5*[chromium-+-{Chrome_ChildIOT}]             |                 |                                                    |-{Compositor}]             |                 |                                                    |-{HTMLParserThrea}]             |                 |                                                    |-{OptimizingCompi}]             |                 |                                                    `-3*[{v8:SweeperThrea}]]             |                 |-chromium             |                 |-chromium-+-chromium             |                 |          |-{Chrome_ChildIOT}             |                 |          `-{Watchdog}             |                 |-{AudioThread}             |                 |-3*[{BrowserBlocking}]             |                 |-{BrowserWatchdog}             |                 |-5*[{CachePoolWorker}]             |                 |-{Chrome_CacheThr}             |                 |-{Chrome_DBThread}             |                 |-{Chrome_FileThre}             |                 |-{Chrome_FileUser}             |                 |-{Chrome_HistoryT}             |                 |-{Chrome_IOThread}             |                 |-{Chrome_ProcessL}             |                 |-{Chrome_SafeBrow}             |                 |-{CrShutdownDetec}             |                 |-{IndexedDB}             |                 |-{LevelDBEnv}             |                 |-{NSS SSL ThreadW}             |                 |-{NetworkChangeNo}             |                 |-2*[{Proxy resolver}]             |                 |-{WorkerPool/1201}             |                 |-{WorkerPool/2059}             |                 |-{WorkerPool/2579}             |                 |-{WorkerPool/2590}             |                 |-{WorkerPool/2592}             |                 |-{WorkerPool/2608}             |                 |-{WorkerPool/2973}             |                 |-{WorkerPool/2974}             |                 |-{chromium}             |                 |-{extension_crash}             |                 |-{gpu-process_cra}             |                 |-{handle-watcher-}             |                 |-{inotify_reader}             |                 |-{ppapi_crash_upl}             |                 `-{renderer_crash_}             |-2*[dbus-daemon]             |-dbus-launch             |-dhcpcd             |-firefox-+-4*[{Analysis Helper}]             |         |-{Cache I/O}             |         |-{Cache2 I/O}             |         |-{Cert Verify}             |         |-3*[{DOM Worker}]             |         |-{Gecko_IOThread}             |         |-{HTML5 Parser}             |         |-{Hang Monitor}             |         |-{Image Scaler}             |         |-{JS GC Helper}             |         |-{JS Watchdog}             |         |-{Proxy R~olution}             |         |-{Socket Thread}             |         |-{Timer}             |         |-{URL Classifier}             |         |-{gmain}             |         |-{localStorage DB}             |         |-{mozStorage #1}             |         |-{mozStorage #2}             |         |-{mozStorage #3}             |         |-{mozStorage #4}             |         `-{mozStorage #5}             |-gpg-agent             |-login---bash---startx---xinit-+-Xorg.bin-+-xf86-video-inte             |                               |          `-{Xorg.bin}             |                               `-dwm-+-dwmstatus             |                                     `-xterm---bash-+-bash             |                                                    `-pstree             |-systemd---(sd-pam)             |-systemd-journal             |-systemd-logind             |-systemd-udevd             |-wpa_actiond             `-wpa_supplicant      * * * Update 2: I guess the question can also be boiled down to: What should be the parent of a process? Should it e.g. be a shell or should it be the `init` process i.e. the process with `PID 1`?


title: How to create a promptless Linux GUI shutdown script?

text: I want to shutdown my Linux system using a script from GUI:               shutdown.sh     #!/bin/bash     init 0      This script asks me a question. I need a shutdown script without asking any question. Note that my GUI login is `root` user.


title: yum Damaged repomd.xml file

text: I'm having trouble doing anything with yum on Fedora 16. Here is the output I'm getting:               [user@mycomputer yum-3.4.3]$ sudo yum update     [sudo] password for user:      Loaded plugins: langpacks, presto, priorities, refresh-packagekit     adobe-linux-x86_64                                                                                |   39 B     00:00 ...      http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for adobe-linux-x86_64: Damaged repomd.xml file     Trying other mirror.     fedora                                                                                |   39 B     00:00 ...      http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for fedora: Damaged repomd.xml file     Trying other mirror.     YumRepo Error: All mirror URLs are not using ftp, http[s] or file.      Eg. Protocol mismatch./     removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-free/mirrorlist.txt     YumRepo Error: All mirror URLs are not using ftp, http[s] or file.      Eg. Protocol mismatch./     removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-free-updates/mirrorlist.txt     YumRepo Error: All mirror URLs are not using ftp, http[s] or file.      Eg. Protocol mismatch./     removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-nonfree/mirrorlist.txt     YumRepo Error: All mirror URLs are not using ftp, http[s] or file.      Eg. Protocol mismatch./     removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-nonfree-updates/mirrorlist.txt     updates                                                                                |   39 B     00:00 ...      http://download.fedoraproject.org/pub/fedora/linux/updates/16/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for updates: Damaged repomd.xml file     Trying other mirror.     adobe-linux-x86_64                                                                                |   39 B     00:00 ...      http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for adobe-linux-x86_64: Damaged repomd.xml file     Trying other mirror.     Error: failure: repodata/repomd.xml from adobe-linux-x86_64: [Errno 256] No more mirrors to try      And here are the contents of my /etc/yum.conf:               [user@mycomputer yum-3.4.3]$ cat /etc/yum.conf                                                                                [main]                                                                                cachedir=/var/cache/yum/$basearch/$releasever                                                                                keepcache=0                                                                                debuglevel=2                                                                                logfile=/var/log/yum.log                                                                                exactarch=1                                                                                obsoletes=1                                                                                gpgcheck=1                                                                                plugins=1                                                                                installonly_limit=3                                                                                proxy=http://xx.xx.xx.xx:xxxx     PROXY_USERNAME=user     PROXY_PASSWORD=password      And here are the contents of /etc/yum.repos.d/fedora.repo:               [user@mycomputer yum-3.4.3]$ cat /etc/yum.repos.d/fedora.repo      [fedora]     name=Fedora $releasever - $basearch     failovermethod=priority     #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch     enabled=1     metadata_expire=7d     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch          [fedora-debuginfo]     name=Fedora $releasever - $basearch - Debug     failovermethod=priority     #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch     enabled=0     metadata_expire=7d     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch          [fedora-source]     name=Fedora $releasever - Source     failovermethod=priority     #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/     mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch     enabled=0     metadata_expire=7d     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch      Does anyone have any ideas for how to fix this?


title: Why is ls command slow to interrupt on NFS directory with lots of files?

text: I noticed in directories with lots of files on NFS if I do               ls *      then hit Ctrl-C it can take a while ( say 20 seconds ) before ls comes back. Why? Can ls command be fixed to be more responsive?


title: How to tail multiple files using tail -0f in Linux/AIX

text: I tried tailing two files using the option:               tail -0f file1.log -0f file2.log      In Linux I see an error "tail : can process only one file at a time". In AIX I see the error as "Invalid options". This works fine when I use:               tail -f file1 -f file 2      in Linux but not in AIX. I want to be able to tail multiple files using `-0f` or `-f` in AIX/Linux `multitail` is not recognized in either of these OS.


title: How can you tell if GStreamer plugins are installed correctly

text: I've installed GStreamer plugins for Fedora 14 using yum. However, when running a qt-phonon application with the GStreamer backend, I get the error "Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled" Is there a good baseline test to determine if this is a Phonon problem? Does anybody know where yum installs the GStreamer plugins and how GStreamer resolves plugins?


title: Symbolic links with ls, mv: forcing the functions to utilize "logical" addresses (remembering the original path)

text: It seems that for many basic functions operating on symbolic links, the physical path is used by default. However, cd works fine. When moving into a symbolic link, cd remembers where I came from so it is utilizing the logical address for the symbolic link (see related post for an example: symlinks and cd). Functions like ls only partially work this way. If I list the directory contents by hitting tab ($ ls ../ {tab}) it will list the contents of the directory where the symbolic link is located but if execute the command ($ ls ../ {enter}) the directory contents listing is from the physical path. Is there a way to get commands like ls, mv, rm, etc to operate like cd and remember the logical path for the symbolic link? Thanks for any advice.


title: A lot of errors on ext4, however smart doesn't show any errors

text: I have a Debian box with additional ( it is not a system disk ) 1.5Tb sata hdd (wd caviar green). There is only one partition on the whole disk. Disk is used for backups from remote system (with `rsnapshot`, backup update runs every 4 hours) and rtorrent for some files. So disk is permanently in use. Everything was perfect, until some filesystem errors appeared and I couldn't delete a lot of files due to filesystem read/write error. `fsck` saved me, within one month errors appered several times. Every time I need to umount partition and run `fsck` to fix all errors. During `fsck` different fs block read/write were fixed, also appeared some messages like:               Inode 61477311 ref count is 3, should be 2.  Fix? yes     Block bitmap differences:  -(246948483--246948494) -(246987843--246987871) -(246988756--246988758) -(246989103--246989109). Fix? yes      `smartctl` doesn't show any errors at all. So, should I backup the whole data and format it or hard is dying or maybe there is another way to fix the issue? ps. Here is smartctls output:               smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)     Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net          === START OF INFORMATION SECTION ===     Model Family:     Western Digital Caviar Green (Adv. Format) family     Device Model:     WDC WD15EARS-00Z5B1     Serial Number:    WD-WMAVU1111103     Firmware Version: 80.00A80     User Capacity:    1,500,301,910,016 bytes     Device is:        In smartctl database [for details use: -P show]     ATA Version is:   8     ATA Standard is:  Exact ATA specification draft version not indicated     SMART support is: Available - device has SMART capability.     SMART support is: Enabled          === START OF READ SMART DATA SECTION ===     SMART overall-health self-assessment test result: PASSED          General SMART Values:     Offline data collection status:  (0x82) Offline data collection activity                                             was completed without error.                                             Auto Offline Data Collection: Enabled.     Self-test execution status:      (   0) The previous self-test routine completed                                             without error or no self-test has ever                                              been run.     Total time to complete Offline      data collection:                 (33000) seconds.     Offline data collection     capabilities:                    (0x7b) SMART execute Offline immediate.                                             Auto Offline data collection on/off support.                                             Suspend Offline collection upon new                                             command.                                             Offline surface scan supported.                                             Self-test supported.                                             Conveyance Self-test supported.                                             Selective Self-test supported.     SMART capabilities:            (0x0003) Saves SMART data before entering                                             power-saving mode.                                             Supports SMART auto save timer.     Error logging capability:        (0x01) Error logging supported.                                             General Purpose Logging supported.     Short self-test routine      recommended polling time:        (   2) minutes.     Extended self-test routine     recommended polling time:        ( 255) minutes.     Conveyance self-test routine     recommended polling time:        (   5) minutes.     SCT capabilities:              (0x3031) SCT Status supported.                                             SCT Feature Control supported.                                             SCT Data Table supported.          SMART Attributes Data Structure revision number: 16     Vendor Specific SMART Attributes with Thresholds:     ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE       1 Raw_Read_Error_Rate     0x002f   197   197   051    Pre-fail  Always       -       36297       3 Spin_Up_Time            0x0027   206   177   021    Pre-fail  Always       -       4658       4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       267       5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0       7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0       9 Power_On_Hours          0x0032   084   084   000    Old_age   Always       -       12335      10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0      11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0      12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       265     192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       57     193 Load_Cycle_Count        0x0032   142   142   000    Old_age   Always       -       176547     194 Temperature_Celsius     0x0022   120   087   000    Old_age   Always       -       30     196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0     197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0     198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       3     199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0     200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       3          SMART Error Log Version: 1     No Errors Logged          SMART Self-test log structure revision number 1     Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error     # 1  Short offline       Completed without error       00%     12335         -          SMART Selective self-test log data structure revision number 1      SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS         1        0        0  Not_testing         2        0        0  Not_testing         3        0        0  Not_testing         4        0        0  Not_testing         5        0        0  Not_testing     Selective self-test flags (0x0):       After scanning selected spans, do NOT read-scan remainder of disk.     If Selective self-test is pending on power-up, resume after 0 minute delay.


title: Display ZSH brace expansion

text: Is there a way to show the expanded version of a brace expansion statement? For example, I have:               $ bundle exec rake db:{drop,create,migrate}      Does the expanded version expand to this?               $ bundle exec rake db:drop     $ bundle exec rake db:create     $ bundle exec rake db:migrate


title: How to configure pfsense to NAT servers?

text: How can I configure `pfsense` so it will NAT servers so they can be accessed outside of the company? I tried to play around with the NAT settings, but didn't get anywhere. I want to be able to access them remotely using HTTP, SSH, and RDP if I can.


title: oh-my-zsh completion on home directory names

text: I recently switched to zsh from bash, and I'm using oh-my-zsh. There's a completion behaviour I don't want: in any directory, the list of autocompletion candidates seems to include the names of all users' home directories. I wasn't able to find the right zsh option to disable this behaviour out of the hundreds that exist.


title: vi setting for new window

text: I'm using Terminator for my terminal emulator. Whenever I open it, the initial workspace comes with the setting I defined in the config file. But whenever I split the workspace, the new workspace comes with the default setting. Here is part of my config file:               [global_config]       enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler       focus = mouse       title_transmit_fg_color = "#000000"       sticky = True     [keybindings]       new_tab = <Ctrl>n       next_tab = <Ctrl>Right       split_vert = <Ctrl>v       split_horiz = <Ctrl>h       prev_tab = <Ctrl>Left     [profiles]       [[default]]       [[solarized-light]]         palette = "#073642:#d30102:#859900:#b58900:#6c71c4:#d33682:#2aa198:#839496:#586e75:#cb4b16:#859900:#b58900:#268bd2:#dc322f:#2aa198:#93a1a1"         use_system_font = False         cursor_color = "#002b36"         foreground_color = "#002b36"         show_titlebar = False         background_color = "#eee8d5"       [[solarized-dark]]         palette = "#073642:#d30102:#859900:#b58900:#6c71c4:#d33682:#2aa198:#839496:#586e75:#cb4b16:#859900:#b58900:#268bd2:#dc322f:#2aa198:#93a1a1"         use_system_font = False         cursor_color = "#eee8d5"         foreground_color = "#eee8d5"         show_titlebar = False         background_color = "#002b36"       [[Noor]]     [layouts]       [[default]]         [[[child]]]           type = Terminal           parent = window0           profile = solarized-dark         [[[window0]]]           type = Window           parent = ""           profile = solarized-light     [plugins]     ~


title: Why does abrt take over log output for a process that didn't crash?

text: **Short version:**   1. I have a long-running process (web proxy) that logs (verbosely) to syslog    2. _Something_ bad happens, and abrt steps in _somehow_   3. The process continues to run...   4. ...but all log messages to syslog are now tagged "abrt:" instead of "xfcproxy[1234]:"   5. Any idea why? **Long version:** Here is an example of what we see from a log point of view, as "something happens" and the process continues to log but with the process name in syslog changing. Note how all messages from the proxy start "uuid=...", and we can see such messages logged at the top of this snippet under "xfcproxy[4808]:" and at the bottom of this snippet under "abrt:"               Aug 27 07:02:55 proxy1 xfcproxy[4808]: uuid=63e63d9e connection=Open client_ip=192.168.3.21 client_port=40973     Aug 27 07:02:55 proxy1 xfcproxy[4808]: uuid=63e63d9e connection=Information method=CONNECT path=www.example.com port=443     Aug 27 07:02:55 proxy1 xfcproxy[4808]: uuid=63e63d9e rule=Destination message="Match made" rule=monitoring uri=www.example.com     Aug 27 07:02:55 proxy1 rsyslogd-2177: imuxsock begins to drop messages from pid 4808 due to rate-limiting     Aug 27 07:02:55 proxy1 abrtd: New client connected     Aug 27 07:02:55 proxy1 abrtd: Directory 'pyhook-2014-08-27-07:02:55-4808' creation detected     Aug 27 07:02:55 proxy1 abrt-server[27032]: Saved Python crash dump of pid 4808 to /var/spool/abrt/pyhook-2014-08-27-07:02:55-4808     Aug 27 07:02:55 proxy1 abrtd: Executable '/var/lib/xfcProxy/bin/xfcProxy.py' doesn't belong to any package and ProcessUnpackaged is set to 'no'     Aug 27 07:02:55 proxy1 abrtd: 'post-create' on '/var/spool/abrt/pyhook-2014-08-27-07:02:55-4808' exited with 1     Aug 27 07:02:55 proxy1 abrtd: Deleting problem directory '/var/spool/abrt/pyhook-2014-08-27-07:02:55-4808'     Aug 27 07:03:37 proxy1 rsyslogd-2177: imuxsock lost 1642 messages from pid 4808 due to rate-limiting     Aug 27 07:03:37 proxy1 abrt: uuid=06bc7247 connection=Open client_ip=192.168.3.21 client_port=40976     Aug 27 07:03:37 proxy1 abrt: uuid=06bc7247 connection=Information method=CONNECT path=www.example.com port=443     Aug 27 07:03:37 proxy1 abrt: uuid=06bc7247 rule=Destination message="Match made" rule=monitoring uri=www.example.com      Using 'ps' I can see that the PID 4808 that had been running is still running:               [root@proxy1 log]# ps 4808       PID TTY      STAT   TIME COMMAND      4808 ?        S      1:34 python /var/lib/xfcProxy/bin/xfcProxy.py     [root@proxy1 log]#      The 'imuxsock begins to drop messages' is somewhat normal - this daemon is very chatty (I've only shown a small sequential subset of messages here) and a flurry of messages can trigger rate limiting completely aside from this problem with rate limiting. While my knowledge of abrt is limited, it doesn't seem to have crash info but does think that this process crashed correlated to the timing of the logs:               [root@proxy1 abrt]# pwd     /var/spool/abrt     [root@proxy1 abrt]# ls -l     total 4     -rw-r--r--. 1 root root  0 Mar 18 15:45 abrt-db     -rw-------  1 root root 33 Aug 27 07:02 last-via-server     [root@proxy1 abrt]# echo `cat last-via-server `     /var/lib/xfcProxy/bin/xfcProxy.py     [root@proxy1 abrt]#      The process in question is a multithreaded python process - I'm certainly open to the idea I'm not cleaning up threads properly and thus triggering this behavior. It's just odd behavior. **Clarifications for @Mikel:**   * Yes, RHEL 6   * /var/log/messages via rsyslog. I haven't tried journald, and would need to reproduce on a non-production server before I could try a change like that. **Update following bounty period:** I'm afraid I cannot award the bounty for the existing answer by E Carter Young, for the following reasons:   1. The imuxsock rate-limiting does not, so far as I can tell from reviewing rsyslog sources, trigger any sort of change to the process or involve abrtd in any way. It simply discards the flow for a little while, then resumes reading later.   2. A process writing excessively to syslog is not in any way a buffer overflow situation. Resource utilization, yes; maybe even denial of service, but just because it's a buffer and just because it's very full doesn't mean it's a buffer overflow.   3. The steps as described don't match the situation; specifically in step 6 rsyslog is not fetching from the abrt process, it's fetching from the original process; the mystery is why it's using abrt's name for that.   4. I also am not convinced there's any race condition here. (Filling the log buffer fast is not a race condition) I think this question is too complex and lacking data, and that it boils down to multiple simpler questions which could be asked with more data:   * Why does abrtd trigger on a process that doesn't exit, if by definition it triggers on processes that crash? What represented enough of a crash to get abrtd involved? I think the answer lies in the missing logs, but I don't think the missing logs themselves are the answer. There's no evidence rsyslog invokes abrtd.   * Why does rsyslog start using abrt as the process name once abrtd is triggered on a process (in a provable manner as answered by the previous question)? Alas, without more data, I'm not comfortable pushing these questions today. While I cannot accept this answer, I believe there's definitely value in it:   * Description of the abrtd blacklist   * Clear and concise discussion of my options      * Increase or remove rate limit and clutter logs     * Change process verbosity     * blacklist process with abrt so that it never steps in As such, I'm happy that half the bounty will go to E Carter Young's answer as the highest-voted answer when the bounty expires.


title: PHP on NetBeans IDE

text: I have installed `netbeans` on my laptop running elementary os luna.   I installed `netbeans` with this command:               sudo apt-get install netbeans      After few minutes the software was successfully installed in my system.   But, when i try to create a new project, it shows only Java and PHP is not available there. ![enter image description here](http://i.stack.imgur.com/CjysR.png) Now, how i can enable PHP here? Thanks


title: ndiswrapper freezes system (sis163u)

text: I'm trying to get the WLAN (most probably sis163u) of a AMILO La 1703 working under Debian wheezy. I'm using ndiswrapper and downloaded the driver from the location pointed from here. I'm able to install the driver (by doing `sudo ndiswrapper -i sis163u_w98mod.inf`), but when I try to load it (with `sudo modprobe ndiswrapper`) the whole computer freezes and doesn't work until I reboot the system (with ctrl+alt+{r,e,i,s,u,b}). Has anyone an idea how I can get the driver working? I found some suggestions to compile ndiswrapper myself, but since dkms already does that when installing through apt I don't think that will help. ndiswrapper-version:               ndiswrapper -v      utils version: '1.9', utils version needed by module: '1.9'     module details:     filename:       /lib/modules/3.2.0-4-486/updates/dkms/ndiswrapper.ko     version:        1.57     vermagic:       3.2.0-4-486 mod_unload modversions 486


title: HDA Realtek and Auto-Sensing Disable

text: I have a couple different devices using Realtek audio chipsets (one is ALC269VC, another is ALC262). On both devices (laptop/tablet type devices, with internal speakers and a headphone jack) when I have a headphone jack in, the speakers cut-out. Disabling Auto-Mute has no effect. What I desire is to be able to either play both simultaneously, or at least be able to control which one is active via software. Apart from trying the auto-mute setting in alsamixer, I've tried hdajackretask as well with no luck. Any advice on how to proceed next?


title: Building from SRPMs on CentOS 6.5

text: NOTE: I'm very new to `yum`/`rpm`, but am familiar with Linux. I'm trying to compile Awesome on CentOS 6.5 using `rpmbuild`. I found SRPMs for Fedora Core and am trying to rebuild them on my CentOS install but am running into dependency issues I was hoping someone better versed with `yum` and `rpm` might be able to help me with. Basically, while I've installed newer versions of packages, `rpmbuild` doesn't seem to detect them. Here is an example:               $ rpmbuild --rebuild xcb-util-image-0.3.9-2.fc19.src.rpm           Installing xcb-util-image-0.3.9-2.fc19.src.rpm     warning: InstallSourcePackage at: psm.c:244: Header V3 RSA/SHA256 Signature, key ID fb4b18e6: NOKEY     warning: user mockbuild does not exist - using root     warning: group mockbuild does not exist - using root     warning: user mockbuild does not exist - using root     warning: group mockbuild does not exist - using root     error: Failed build dependencies:         pkgconfig(xcb-util) >= 0.3.8 is needed by xcb-util-image-0.3.9-2.el6.x86_64      But as you can see here, I clearly have `xcb-util` > 0.3.8 installed:               $ sudo yum list installed | grep xcb-util                       xcb-util.x86_64                        0.3.6-1.el6               @UIedited_0/6.5     xcb-util.x86_64                        0.3.9-2.el6               installed      I tried removing the older version of `xcb-util` but there are too many packages that depend on that. Similar issue with building awesome when it comes to `cmake`:               $ rpmbuild --rebuild awesome-3.5.1-2.fc18.src.rpm     Installing awesome-3.5.1-2.fc18.src.rpm     warning: user mockbuild does not exist - using root     warning: group mockbuild does not exist - using root     warning: user mockbuild does not exist - using root     warning: group mockbuild does not exist - using root     warning: user mockbuild does not exist - using root     warning: group mockbuild does not exist - using root     error: Failed build dependencies:         cmake >= 2.8.0 is needed by awesome-3.5.1-2.el6.x86_64         lua-ldoc is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(libev) is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(xcb-util) >= 0.3.8 is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(xcb-keysyms) >= 0.3.4 is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(xcb-icccm) >= 0.3.8 is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(xcb-image) >= 0.3.0 is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(cairo-xcb) is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(libstartup-notification-1.0) >= 0.10 is needed by awesome-3.5.1-2.el6.x86_64         pkgconfig(libxdg-basedir) >= 1.0.0 is needed by awesome-3.5.1-2.el6.x86_64         lua-lgi is needed by awesome-3.5.1-2.el6.x86_64     $ which cmake     /usr/bin/cmake     $ cmake --version     cmake version 2.8.11.2     $ sudo yum list installed | grep cmake     cmake28.x86_64                         2.8.11.2-1.el6            @dell-epel      So any `yum`/`rpm` gurus out there who can point me in the right direction? I'd rather not have to build everything from source, so I was hoping to get `rpmbuild` working with the SRPMs.


title: Implement ProFTPd server without chroot

text: Can I use ProFTPd without using a `chroot` jail (thereby preventing access to anything outside of the FTP root)? I have a requirement to have symlinks in my FTP source that point to locations outside of the directory where I root my FTP service. All of the docs and discussion I've read on ProFTPd talk about how to use the chroot functionality (even within StackExchange), but I'm wondering if I can bypass using that and use a different method to serve my FTP root. Since the symlinks must remain as symlinks, mounting the directories as a way of bypassing the chroot restriction (the clever "solution" to the problem) does not work.


title: Are *.conf files with ~ ending (emacs backup files) interpreted?

text: Are configuration files with ~ ending (emacs backup files) interpreted when they are in conf.d directory ?


title: How does the set-user-ID mechanism work in Unix?

text: Can someone please explain the set-user-ID mechanism in Unix ? What was the rationale behind this design decision? How is it different from effective user id mechanism ?


title: OpenLDAP Password Policy overlay error while loading

text: I'm trying to load the password policy overlay but i'm having the following error               ldapadd  -Wx -D "cn=Manager,cn=config"  -f overlay.ldif      Enter LDAP Password:      adding new entry "olcOverlay=ppolicy,olcDatabase={0}bdb,cn=config"     ldap_add: No such object (32)         matched DN: cn=config      This is the content of the file               dn: olcOverlay=ppolicy,olcDatabase={0}bdb,cn=config     olcOverlay: ppolicy     objectClass: olcOverlayConfig     objectClass: olcPPolicyConfig     olcPPolicyDefault: cn=default,ou=Policies,dc=site,dc=com     olcPPolicyHashCleartext: TRUE     olcPPolicyUseLockout: FALSE      In the log I found:               config_add_internal: DN="olcOverlay=ppolicy,olcDatabase={0}bdb,cn=config" not child of DN="cn=config"      I'm using centos 6.3 and openldap-servers-2.4.23-26.el6_3.2.x86_64


title: Extending history search in zsh

text: How to extend `Ctrl+R` search in zsh? It cannot find entry despite it is in history file. **Edit:** My `.zsh`:               setopt AUTO_CD     setopt CORRECT_ALL     setopt EXTENDED_GLOB     # History     SAVEHIST=10000     HISTFILE=~/.zsh/history     setopt APPEND_HISTORY     setopt EXTENDED_HISTORY     setopt INC_APPEND_HISTORY     setopt HIST_FIND_NO_DUPS     setopt HIST_IGNORE_SPACE     setopt NO_HIST_BEEP     setopt SHARE_HISTORY     # Keys     autoload zkbd     [[ ! -d ~/.zkbd ]] && mkdir ~/.zkbd     [[ ! -f ~/.zkbd/$TERM-${DISPLAY:-$VENDOR-$OSTYPE} ]] && zkbd     source  ~/.zkbd/$TERM-${DISPLAY:-$VENDOR-$OSTYPE}     [[ -n ${key[Home]}    ]]  && bindkey  "${key[Home]}" beginning-of-line     [[ -n ${key[End]}     ]]  && bindkey  "${key[End]}"     end-of-line     [[ -n ${key[Insert]}  ]]  && bindkey  "${key[Insert]}"  overwrite-mode     [[ -n ${key[End]}     ]]  && bindkey  "${key[End]}"     end-of-line     [[ -n ${key[Insert]}  ]]  && bindkey  "${key[Insert]}"  overwrite-mode     [[ -n ${key[Delete]}  ]]  && bindkey  "${key[Delete]}"  delete-char     [[ -n ${key[Up]}      ]]  && bindkey  "${key[Up]}" up-line-or-history     [[ -n ${key[Down]}    ]]  && bindkey  "${key[Down]}" down-line-or-history     [[ -n ${key[Left]}    ]]  && bindkey  "${key[Left]}"    backward-char     [[ -n ${key[Right]}   ]]  && bindkey  "${key[Right]}"   forward-char     # Auto completion     autoload -U compinit promptinit     compinit     promptinit     prompt clint     zstyle ':completion::complete:*' use-cache 1     # MIME     autoload -U zsh-mime-setup     zsh-mime-setup     # Calc     autoload -U zcalc     # Editor     export EDITOR=vim     # Useful     alias background="schedtool -B -e"     alias lowprio="nice -n 20 ionice -c 3"     alias blowprio="ionice -c 3 schedtool -B -e nice -n 20"      `cave resolve -c` should find `blowprio cave resolve -c world -C a -R w --resume-file resume-world` which is in `.zsh/history` (at least `grep` says so) but it finds no match.


title: RAM and Flash directories in embedded system based on linux

text: There are various directories in linux. Example /root,/var,/etc,/proc,/usr. In embedded system, during boot up, it will copy image from flash to RAM. Questions:   1. How can i know, which directory goes to RAM and which resides on FLASH?


title: Visually-transparent & Input-transparent Windows

text: I'm a Java programmer who's rather new to Linux. I'm on Suse / Gnome and I need to create a window which:   * Is visually translucent/transparent. This is the usual alpha blending that composes a foreground image with a background image, while allowing the background image to be visible "through" the foreground image.   * Is transparent to mouse events, in other words the window accepts no mouse events and all such event are passed through to whatever lies underneath. I successfully got the visual transparency but not the mouse event transparency. When I test the environment translucency capabilies with Java I got that:                - TRANSLUCENT = false      - PERPIXEL_TRANSPARENT = true      - PERPIXEL_TRANSLUCENT = true      The compositing is activated. I changed compositing type from OpenGL to XRender and vice versa. But it didn't change anything. Do I have to change of Window Manager or activate some options?


title: curly braces and subshell

text: I can't figure it out. As I read in documentaion, `{}` doesn't create a subshell. However, looks like that sometimes it does:                 $ unset T; echo "T_bfr=$T"; echo $$; { echo $$; export T=1; }; echo "T_afr=$T"     T_bfr=     4874     4874     T_afr=1           $ unset T; echo "T_bfr=$T"; echo $$; { echo $$; export T=1 ; }|cat; echo "T_afr=$T"     T_bfr=     4874     4874     T_afr=      What is the difference? Why T is missing in the second case?


title: Is there any difference between use driver from ati.amd.com or download fglrx package from repositories?

text: I'm wondering if both are the same or one is better than the other.


title: Logged into ubuntu via VNC. Windows key seems stuck

text: I have an ubuntu server running vnc4server and gnome-session. When i log in remotely using VNC, it appears that the windows key is stuck. This occurs with multiple VNC clients (ultraVNC/realVNC on windows) and I have tried from other boxes. Having the windows key stuck effectively disables using up/down, since windows key+up and windows key+down are bound to maximizing and minimizing whatever window you are on.


title: How to copy a very large video file with error in it?

text: I have a very large video file on a USB external HDD. It is about 13GB. I can play the video directly, and it seems there's no problem. But if I try to copy the file to other places, I got a strange error and the USB device is disconnected automatically, then connect back again. I tried copying from KDE, using _cp_ , or _rsync_ , no luck. I am running out of ideas...I have never seen this kind of problem before. P.S.   * The file is on a LVM partition.   * I dont have the error message now. But I remember it was some like > Failed to read block ...


title: Is there a way to limit the amount of memory a particular process can use in Unix?

text: I need to test a process for memory management.   * I do not have the source, so I need to do all the testing from the OS side.   * I want to be able to say something like **`limitmemory 400k -p<pid>`** Is there a way to do this in unix? Any common unix utility would be excellent.


title: Pattern Matching Exclude Duplicate Characters

text: Is there a regular expression for the following that matches characters in a character set but only once? In other words, once a character is found, remove it from the set. If grep cannot do this, is there a built-in utility which can? Example:               Characters to match only once:   spine      Input:                 spine     spines     spin     pine     seep      spins      Output:               spine     spin     pine      **EDIT:**   There are many ways to achieve this output (one example below), but I'm looking for a way to do this without having to customize the command for each pattern I want to match. `grep '[spine]' input_file | grep -v 's.*s' | ... | grep -v 'e.*e'`


title: Bash Script getting stuck during execution

text: I have a bash script that is reading a `CSV` file , that contains `source IP` address , `destination IP` address and `destination port`. My script is basically doing 2 tests: 1 Performance 2 Connectivity. Under performance test, I am copying files from `source` to `destination` (using `scp`) to calculate the the network IO. After that, copying the same file from one location of Destination server to other location on destination server to calculate Disk I/O. Under connectivity test I am doing `nc` from `source` to `destination` to check whether `port` is open or not. **Problem :** Sometime while execution of script, it get stuck at some point and then I have to press `Ctrl+C` to kill that process to continue the further execution. Here , i am not able to figure it out why it is getting stuck, and even behavior is not consistent , every time it's stuck at different location in the script. Please help me in resolving this issue. If required I can post my complete script here. **Update :** **Observation :** Other thing that i observed , if i don't press Ctrl+C , then script resume automatically after 5 mins. Part of the actual script , where it is getting stuck.               #Connectivity Test     TMP=$(mktemp)     nc -z -v -n $lastDestinationIP $port >\$TMP     if grep -q "succeeded" <<< cat echo \$TMP;then        echo $x','$lastSourceIP','$lastDestinationIP','$sourceFqdn','$fqdn','$port',Connectivity,NA,NA,NA,Pass,'$(date) | ssh $username@$baseLocation 'cat >> report.txt'     else       echo $x','$lastSourceIP','$lastDestinationIP','$sourceFqdn','$fqdn','$port',Connectivity,NA,NA,NA,Fail,'$(date) | ssh $username@$baseLocation 'cat >> report.txt'     fi     rm $TMP     fi     exit     ENDSSH      **Most of the time it stuck while calling exit.** Here is the snippet where it stuck most of the time (from the console).               21 14:48:16 EDT 2014 | ssh puppet-admin@10.X.X.9 'cat >> report.txt','Fri Mar     > fi     >     > #rm KB_33.txt     > #rm MB_10.txt     > #rm MB_100.txt     > rm -rf dummy     > else     > #Connectivity Test     > nc -z -v -n -w 2 10.X.X.17 1524 >/tmp/tmp.GJ1knZF5Jn     > if grep -q "succeeded" <<< cat echo /tmp/tmp.GJ1knZF5Jn;then      21 14:48:16 EDT 2014 | ssh puppet-admin@10.X.X.9 'cat >> report.txt','Fri Mar     > else     21 14:48:16 EDT 2014 | ssh puppet-admin@10.X.X.9 'cat >> report.Fail,'Fri Mar     > fi     > fi     > exit     >


title: Is it possible to remove "ssh://" from git remote's URLs?

text: I'm used to create some manually-made repositories to push code to my pet server or share code inside my company. I use the URL `ssh://user@ip/folder.git` to add as remotes to my workspaces. I was wondering how services like GitHub set repository URLs without the protocol spec, like `git@github.com:igorsantos07/Restler.git`.


title: How to run custom scripts upon USB device plug-in?

text: What is the state-of-the-art method for automatically executing custom scripts upon USB device plug-in under current Linux distributions like Debian/CentOS/Fedora? For example if you want to automatically mount/copy some files/umount a USB mass storage device based on its UUID (or device ID etc.).


title: How can I find what is interfering with CTRL+F?

text: I'm running LinuxMint12 with Gnome with Cario-Dock and I have a logitech G15 keyboard. I set up a bash script with the extra keys to take the active window, resize it, and move it to a specific location on one of my screens. But after a few days of usage when I restarted my computer the CTRL+F shortcut stopped working in applications like FireFox, chrome, or any other program I try. A lot of things changed between restarts so I'm not even sure where to start looking. At first it was launching the folder stack from Cairo-Dock so I disabled that shortcut. Now it does nothing. I've gone through the configuration editor->apps->metacity->global_keybinding and nothing is conflicting. I also went through system settings->Keyboard->Shortcuts and found no conflicts there. I don't know of any other places to look. Other shortcuts do run, like CTRL+F6 in netbeans to run unit tests. Is there a way to find what might be interfering with my CTRL+F shortcut? Where else should I look to find possible conflicts? Thanks. --update-- Rev 2: since the original xev doesn't help, I removed it. When I do keep xev focused it does register CTRL+F               ...         KeyPress event, serial 32, synthetic NO, window 0x4400001,             root 0x19f, subw 0x0, time 136672187, (1120,275), root:(1122,1415),             state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,             XLookupString gives 0 bytes:              XmbLookupString gives 0 bytes:              XFilterEvent returns: False              FocusOut event, serial 32, synthetic NO, window 0x4400001,             mode NotifyGrab, detail NotifyAncestor              FocusIn event, serial 32, synthetic NO, window 0x4400001,             mode NotifyUngrab, detail NotifyAncestor              KeymapNotify event, serial 32, synthetic NO, window 0x0,             keys:  2   0   0   0   32  0   0   0   0   0   0   0   0   0   0   0                       0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0                 KeyRelease event, serial 32, synthetic NO, window 0x4400001,             root 0x19f, subw 0x0, time 136672827, (1120,275), root:(1122,1415),             state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,             XLookupString gives 0 bytes:              XFilterEvent returns: False              ClientMessage event, serial 32, synthetic YES, window 0x4400001,             message_type 0x10a (WM_PROTOCOLS), format 32, message 0x108 (WM_DELETE_WINDOW)


title: usb kernel module does not load on demand but works fine with insmod and modprobe from the shell

text: I have a USB Linux Kernel module that compiles and builds. Running `insmod` loads my module and `dmseg` and `tail -f /var/log/debug` shows me it works as expected. Running `depmod -a` then `modprobe` from the terminal loads the module and `modprobe -r` unloads and I see - `tail -f /var/log/debug` output as expected. When I plug in my USB keyboard though it does not trigger and load on-demand as expected. I have investigated `/etc/udev/rules.d` with no success. Any workarounds or guidance is most welcome. Am running `Ubuntu 12.04.4 LTS` with a Custom Linux Kernel `3.14.0`               #include <linux/module.h>     #include <linux/kernel.h>     #include <linux/usb.h>     #include <linux/usb/input.h>     #include <linux/hid.h>          MODULE_LICENSE("GPL");     MODULE_AUTHOR("Aruna Hewapathirane");     MODULE_DESCRIPTION("A USB Keyboard Driver Kernel Module");          static struct usb_device_id usb_kbd_id_table[] = {         { USB_INTERFACE_INFO(             USB_INTERFACE_CLASS_HID,             USB_INTERFACE_SUBCLASS_BOOT,             USB_INTERFACE_PROTOCOL_KEYBOARD) },         { } /* Terminating entry */     };          MODULE_DEVICE_TABLE(usb, usb_kbd_id_table);          static int __init kbd_init(void)     {         printk(KERN_DEBUG "USB Keyboard Plugged In.. \n");         return 0;     }          static void __exit kbd_exit(void)     {         printk(KERN_DEBUG "USB Keyboard Removed.. \n");         return ;     }          module_init(kbd_init);     module_exit(kbd_exit);


title: What multimedia support should I use in centOS 7

text: I have recently installed Cent OS7. Its looks very nice at first.   But soon realized it has a horrible multimedia support. Its own player cannot install the codecs it requires, which was much easier in Debian OS.   When I tried to manually install VLC using `yum install vlc`, it just showed a list of dependency problems:               --> Finished Dependency Resolution     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libopenjpeg.so.2()(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libgnutls.so.26()(64bit)     Error: Package: libcddb-1.3.2-8.el6.x86_64 (linuxtech-release)                Requires: libcdio.so.10()(64bit)     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libgme.so.0()(64bit)     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libdc1394.so.22()(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libcdio_paranoia.so.0()(64bit)                Available: libcdio-0.77-1.el5.rf.x86_64 (rpmforge)                    libcdio_paranoia.so.0()(64bit)                Installed: libcdio-0.92-1.el7.x86_64 (@anaconda)                    Not found     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libudev.so.0()(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libcdio_cdda.so.0(CDIO_CDDA_0)(64bit)                Available: libcdio-0.77-1.el5.rf.x86_64 (rpmforge)                    libcdio_cdda.so.0(CDIO_CDDA_0)(64bit)                Installed: libcdio-0.92-1.el7.x86_64 (@anaconda)                    Not found     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libcelt0.so.1()(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libcdio_paranoia.so.0(CDIO_PARANOIA_0)(64bit)                Available: libcdio-0.77-1.el5.rf.x86_64 (rpmforge)                    libcdio_paranoia.so.0(CDIO_PARANOIA_0)(64bit)                Installed: libcdio-0.92-1.el7.x86_64 (@anaconda)                    Not found     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libproxy.so.0()(64bit)     Error: Package: libcddb-1.3.2-8.el6.x86_64 (linuxtech-release)                Requires: libcdio.so.10(CDIO_10)(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libcdio_cdda.so.0()(64bit)                Available: libcdio-0.77-1.el5.rf.x86_64 (rpmforge)                    libcdio_cdda.so.0()(64bit)                Installed: libcdio-0.92-1.el7.x86_64 (@anaconda)                    Not found     Error: Package: librtmp-2.3-3.el6.x86_64 (linuxtech-release)                Requires: libgnutls.so.26(GNUTLS_1_4)(64bit)     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libtiger.so.5()(64bit)     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libmtp.so.8()(64bit)                Available: libmtp-0.3.7-1.el5.rf.x86_64 (rpmforge)                    libmtp.so.8()(64bit)                Installed: libmtp-1.1.6-3.el7.x86_64 (@anaconda)                   ~libmtp.so.9()(64bit)     Error: Package: ffmpeg-libs-0.10.11-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libdc1394.so.22()(64bit)     Error: Package: librtmp-2.3-3.el6.x86_64 (linuxtech-release)                Requires: libgnutls.so.26()(64bit)     Error: Package: vlc-core-2.0.10-1.el6.x86_64 (rpmfusion-free-updates)                Requires: libgnutls.so.26()(64bit)      You could try using --skip-broken to work around the problem      You could try running: rpm -Va --nofiles --nodigest      Is it possible at all to install it in Cent OS 7?   So far I can only find some solutions for Cent OS 6 or lower, which is hardly helpful for me.


title: Adding RPM's to SLES installation DVD

text: For a custom installation, I need to add a few rpms from the SDK dvd that comes with the main SLES dvd, onto the main SLES installation dvd. This is because my superiors want 1 single dvd to install SLES from, without the need of extra dvds or ftp-repositories. As such, I've been trying to accomplish just that. What I've done is   * extracted the files from the dvds for both the main installation and the SDK   * copied the 3 rpms in question from the SDK to the main installation (/suse/x86_64/)   * added the rpms to packages.*.gz (/suse/setup/descr/packages.*.gz)   * re-calculated the SHA1 sum for the packages.*.gz and entered them in content (/content) After this, I recreated an ISO image from this modified image. However, when testing the ISO on a virtual machine, the installation gave me an error saying: `cd:/ Invalid signature Installation aborted`. In order to fix this, I added `insecure=1` to isolinux.cfg (/boot/x86_64/loader/isolinux.cfg). This worked, but now I get another error, see the screenshot below. ![Installation signature verification failed](http://i.stack.imgur.com/oSkA0.png) Any suggestions on how to solve this? I've seen people mention adding a custom gpg-key to the initrd, but that is generally for an add-on product. I'm unsure of what to do next with this. :/ * * * I've added the following to my autoyast xml file:               <scripts>       <post-scripts config:type="list">         <![CDATA[           rpm -i extra/*.rpm > /tmp/extra.log         ]]>       </post-scripts>     </scripts>      As such, I've added my extra rpm's in a folder called `extra` in my ISO. However, now the installation just fails: ![Installation general failure](http://i.stack.imgur.com/hB9tR.png) * * * As per Nils' suggestion, I've added the rpm's to a separate folder on the ISO and install them via the post-script section in an AutoYast profile. The issue I reported with the script above was the result of the `<script><source>...</source></script>` elements missing around the `CDATA`. Adding the part below fixed my problems.               <scripts>       <post-scripts config:type="list">         <script>           <source>             <![CDATA[               mount /dev/dvd /mnt;               cd /mnt/extra;               rpm -i <rpms>;               cd;               umount /mnt;             ]]>           </source>         </script>       </post-scripts>     </scripts>


title: How to set Internet Protocol properties using terminal?

text: When I set up a Virtual Machine with windows (using VMPlayer), I set the Network Connection properties from the VM settings from NAT to bridged. Then I proceed to set the following IP Properties in the OS (see image below) so that the Virtual Windows OS becomes part of my network. How do I set the same IP Properties on a Linux machine (I use CentOS) using terminal? If its any file that needs to be edited please let me know which. I wish to set up the virtual Linux machine similar to how my Virtual Windows machines are set up. ![enter image description here](http://i.stack.imgur.com/C3Hh2.jpg)


title: Chrooted drivers

text: 1. If the host has the kernel drivers properly loaded, would the chrooted enviroment be able to use them (ex. wireless, power)?    2. Does the chrooted enviroment need its Xorg drivers to be configured or does it just need Xorg drivers from the host?


title: Disable Keyboard & Mouse input on unix (under X)

text: How can one programmatically "freeze" the Keyboard & Mouse temporarily, so that no one could mess with the system? There are several possibilities where this is useful. For instance, I have a laptop and I want to make sure no one uses it while I leave, even if somebody knows the password or can guess it (like wife or children), as well as depressing thieves' appetite (as it seems dis-functioning). or I'm doing something remotely so I want to make sure the user at the computer doesn't disturb.


title: iptables drop all incoming ICMP requests except from one IP

text: Currently, I have something like:                   iptables -A INPUT -p ICMP --icmp-type 8 -j DROP         iptables -A INPUT -s x.x.x.x -p ICMP --icmp-type 8 -j ACCEPT      However, when I run the second command, it looks as if iptables just stops. I have to break out of it to get back to terminal. Perhaps I am doing it all wrong, but some insight would be helpful. Thanks!


title: Getting "cpio: Bad magic" when trying to rpm install into a mounted Logical Volume

text: I need some help with this. I am trying to follow the Xen guide to provision a domU using package installation of the Fedora 15 release (the dom0 is CentOS 5.6). Ive run the rpm install command with an alternate root to a mounted root LV, but I keep running into this issue:               # rpm -ivh --nodeps --root /mnt/fedRoot fedora-release-15-1.noarch.rpm      warning: fedora-release-15-1.noarch.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 069c8460     Preparing...                ########################################### [100%]        1:fedora-release         ########################################### [100%]     error: unpacking of archive failed: cpio: Bad magic      Im not sure where to begin with troubleshooting this. As I understand it, rpm reads the "root" filesystem (which Ive designated to the mounted drive) and bases its verification and install directory structure based on the "root" system. What is the `cpio: Bad magic` bit? Any recommendations for making this rpm install work? let me know if more information is needed...


title: Can one use a md-type raid-0 as a drive for zfs pool

text: I want to play with ZFS at my CentOS. At the moment I have two 750Gb drives and two 400Gb spare drives that I could use. Of course the simplest solution would be to take all of them and use only 400Gb from the bigger one ( _i.e._ 4 drives in ZFS pool), however as it's only fooling around (nothing in production environment), I asked my self is it doable to define from 400Gb drives a RAID-0 md-device with 800Gb and make then the raid-z using /dev/sdb-c and /dev/md0.


title: Connection reset by peer using sshfs

text: I am using a fuse/sshfs mount which worked fine so far. Now I had to reinstall the server system and suddenly getting the classic `read: Connection reset by peer` error. I am using public key authentication and copied my key to the newly installed system. Normal ssh login works fine. I changed the log to debug but sadly this doesn't give me any useful information:               sshd[2077]: debug1: Forked child 2198.     sshd[2198]: Set /proc/self/oom_score_adj to 0     sshd[2198]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8     sshd[2198]: debug1: inetd sockets after dupping: 3, 3     sshd[2198]: Connection from 192.168.1.6 port 47991     sshd[2198]: debug1: Client protocol version 2.0; client software version OpenSSH_6.1p1 Debian-4     sshd[2198]: debug1: match: OpenSSH_6.1p1 Debian-4 pat OpenSSH*     sshd[2198]: debug1: Enabling compatibility mode for protocol 2.0     sshd[2198]: debug1: Local version string SSH-2.0-OpenSSH_6.1p1 Debian-4     sshd[2198]: debug1: permanently_set_uid: 103/65534 [preauth]     sshd[2198]: debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth]     sshd[2198]: debug1: SSH2_MSG_KEXINIT sent [preauth]     sshd[2198]: debug1: SSH2_MSG_KEXINIT received [preauth]     sshd[2198]: debug1: kex: client->server aes128-ctr hmac-md5 none [preauth]     sshd[2198]: debug1: kex: server->client aes128-ctr hmac-md5 none [preauth]     sshd[2198]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]     sshd[2198]: debug1: SSH2_MSG_NEWKEYS sent [preauth]     sshd[2198]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]     sshd[2198]: Connection closed by 192.168.1.6 [preauth]     sshd[2198]: debug1: do_cleanup [preauth]     sshd[2198]: debug1: monitor_read_log: child log fd closed     sshd[2198]: debug1: do_cleanup     sshd[2198]: debug1: Killing privsep child 2199      Does anyone have an idea what I am missing here? **UPDATE** The `auth.log` with debug level 3:               sshd[2455]: debug3: fd 5 is not O_NONBLOCK     sshd[2455]: debug1: Forked child 2456.     sshd[2455]: debug3: send_rexec_state: entering fd = 8 config len 751     sshd[2455]: debug3: ssh_msg_send: type 0     sshd[2455]: debug3: send_rexec_state: done     sshd[2456]: debug3: oom_adjust_restore     sshd[2456]: Set /proc/self/oom_score_adj to 0     sshd[2456]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8     sshd[2456]: debug1: inetd sockets after dupping: 3, 3     sshd[2456]: Connection from 192.168.1.6 port 50037     sshd[2456]: debug1: Client protocol version 2.0; client software version OpenSSH_6.1p1 Debian-4     sshd[2456]: debug1: match: OpenSSH_6.1p1 Debian-4 pat OpenSSH*     sshd[2456]: debug1: Enabling compatibility mode for protocol 2.0     sshd[2456]: debug1: Local version string SSH-2.0-OpenSSH_6.1p1 Debian-4     sshd[2456]: debug2: fd 3 setting O_NONBLOCK     sshd[2456]: debug2: Network child is on pid 2457     sshd[2456]: debug3: preauth child monitor started     sshd[2456]: debug3: privsep user:group 103:65534 [preauth]     sshd[2456]: debug1: permanently_set_uid: 103/65534 [preauth]     sshd[2456]: debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth]     sshd[2456]: debug1: SSH2_MSG_KEXINIT sent [preauth]     sshd[2456]: debug1: SSH2_MSG_KEXINIT received [preauth]     sshd[2456]: debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]     sshd[2456]: debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]     sshd[2456]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]     sshd[2456]: debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]     sshd[2456]: debug2: kex_parse_kexinit:  [preauth]     sshd[2456]: debug2: kex_parse_kexinit:  [preauth]     sshd[2456]: debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]     sshd[2456]: debug2: kex_parse_kexinit: reserved 0  [preauth]     sshd[2456]: debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss [preauth]     sshd[2456]: debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]     sshd[2456]: debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]     sshd[2456]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 [preauth]     sshd[2456]: debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]     sshd[2456]: debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]     sshd[2456]: debug2: kex_parse_kexinit:  [preauth]     sshd[2456]: debug2: kex_parse_kexinit:  [preauth]     sshd[2456]: debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]     sshd[2456]: debug2: kex_parse_kexinit: reserved 0  [preauth]     sshd[2456]: debug2: mac_setup: found hmac-md5 [preauth]     sshd[2456]: debug1: kex: client->server aes128-ctr hmac-md5 none [preauth]     sshd[2456]: debug2: mac_setup: found hmac-md5 [preauth]     sshd[2456]: debug1: kex: server->client aes128-ctr hmac-md5 none [preauth]     sshd[2456]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]     sshd[2456]: debug3: mm_key_sign entering [preauth]     sshd[2456]: debug3: mm_request_send entering: type 5 [preauth]     sshd[2456]: debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN [preauth]     sshd[2456]: debug3: mm_request_receive_expect entering: type 6 [preauth]     sshd[2456]: debug3: mm_request_receive entering [preauth]     sshd[2456]: debug3: mm_request_receive entering     sshd[2456]: debug3: monitor_read: checking request 5     sshd[2456]: debug3: mm_answer_sign     sshd[2456]: debug3: mm_answer_sign: signature 0x7f9b687c7680(100)     sshd[2456]: debug3: mm_request_send entering: type 6     sshd[2456]: debug2: monitor_read: 5 used once, disabling now     sshd[2456]: debug2: kex_derive_keys [preauth]     sshd[2456]: debug2: set_newkeys: mode 1 [preauth]     sshd[2456]: debug1: SSH2_MSG_NEWKEYS sent [preauth]     sshd[2456]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]     sshd[2456]: Connection closed by 192.168.1.6 [preauth]     sshd[2456]: debug1: do_cleanup [preauth]     sshd[2456]: debug3: PAM: sshpam_thread_cleanup entering [preauth]     sshd[2456]: debug1: monitor_read_log: child log fd closed     sshd[2456]: debug3: mm_request_receive entering     sshd[2456]: debug1: do_cleanup     sshd[2456]: debug3: PAM: sshpam_thread_cleanup entering     sshd[2456]: debug1: Killing privsep child 2457      **UPDATE** I tried a manual `sshfs` mount and I also get `read: Connection reset by peer`. I then added the debuging options and also got `Permission denied (publickey).`. This is strange since the public key is in place and works fine otherwise. I also use my user for the ssh connection and manually specify the private key file. Could this be an issue with the root account not beeing able to access the correct public key on the server somewhere? I'm executing               sudo sshfs myuser@myserver:/mnt/foo /mnt/foo -o IdentityFile=/home/myuser/.ssh/id_rsa      and the relevant log part is               debug1: Authentications that can continue: publickey     debug1: Next authentication method: publickey     debug1: Offering RSA public key: /home/myuser/.ssh/id_rsa     debug1: Authentications that can continue: publickey     debug1: No more authentication methods to try.     Permission denied (publickey).     read: Connection reset by peer


title: How do I check out the OpenBSD web site via CVS?

text: I recently read this on the OpenBSD misc mailing list:               "John Darrah" writes:     > Hi. Would it be possible to get SSL on the OpenBSD website(s)?     > It would be just a couple lines to change in nginx.conf/httpd.conf.     > SSL certificates are free from Startcom and cheap from other vendors.     > It would be really nice to have, even if it's not the default. I feel naked     > viewing the site over plain http. Thanks.          If you want encrypted access to the OpenBSD web site, do a CVS checkout and     view it locally...      I'm not a programmer, so that hint doesn't tell me how I can do this.


title: Updating kernel versions when booting from rEFInd

text: I'm booting from EFI using the awesome rEFInd bootloader. I've so far had to configure boot myself by manually copying over my EFI-compatible linux boot image to my EFI partition and writing a configuration file to define a rEFInd menu entry and link to the specific kernel image on the EFI volume. GRUB, on the other hand, adds new kernel versions as they're installed and I always boot into the new kernel on next boot. It accomplishes this via the `update-grub` script, I believe. Is there another script I can call into to automatically deploy new kernel images to my EFI partition and ensure they're available on next boot? I'd like to automate this process as much as possible so I'm always getting the latest kernel security updates.


title: Determine what java applications are running within the java process name

text: I am writing a Built System for Sublime Text 3 for JavaScript unit testing. I am using   js-test-driver as my testing framework. Sublime Text can only execute one command, so I am using a bash script to do the work. js-test-driver is a java application, and I would like to be able to test if it is already running. As far as I can tell, the process name is just `java`. Is there any way to figure out what java applications are running inside the `java` process? If not, how can I test if a specific java application is running?


title: How can I list all *.doc files in a Zip archive, including files in subdirectories?

text: I have Zip files, that might look like this:               $ zipinfo -1 zip.zip     doc.doc     dotx.dotx     xls.xls     ppt.ppt     txt.txt     c.c     subdir/subdir2/doc.doc     subdir/xls.xls     subdir/ppt.ppt     subdir/c.c     subdir/txt.txt     subdir/subdir2/     subdir/      I want it to print all the *.doc files, but `zipinfo -1 zip.zip *.doc` only prints the .doc files in the root directory of the Zip file. How can I print all the .doc files, in all the subdirectories?


title: Replace columns using a shell

text: How could I replace column 1 in `File1` with column 2 in `File2`, when a match is found?               File1     id1 36987     id2 75685     id3 12345     id4 12896          File2     id1 ID1     id2 ID2     id3 ID3     id5 ID5      I'd like to write this on another `File3`, that should look like:               File3     ID1 36987     ID2 75685     ID3 12345     id4 12896      I'm currently (unsuccessfully) trying:               sed `File2.txt | awk '{print "-e s/"$1"/"$2"}'`<<< "File1.txt"


title: Debian(amd64) Wheezy downgrading libsqlite3-0

text: benben@debian:~/goagent$ sudo apt-get install sqlite3     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:     sqlite3 : Depends: libsqlite3-0 (= 3.7.13-1+deb7u1) but 3.7.17-1~bpo70+1 is to be installed     E: Unable to correct problems, you have held broken packages.      How may I use `sqlite3`? * * *               benben@debian:~$ sudo dpkg -l | grep bpo | grep libsqlite     ri  libsqlite3-0:amd64                    3.7.17-1~bpo70+1                   amd64        SQLite 3 shared library      * * * Here is the output of dependencies. It seems a lot of common packages depend on it. I'm not sure about this, but I think maybe once I tried to install some package in unstable, which updated the `libsqlite3-0` package automatically. How may I rescue?               benben@debian:~$ apt-cache --installed rdepends libsqlite3-0     libsqlite3-0     Reverse Depends:       libnss3       iceweasel       libyelp0       libwebkitgtk-3.0-0       libtracker-sparql-0.14-0       telepathy-salut       telepathy-logger       libtelepathy-logger2       telepathy-gabble       libseed-gtk3-0       python3.2       python2.7       python2.6       packagekit       libpackagekit-glib2-14       libnss3       libsoup-gnome2.4-1       libgpod4       libchamplain-0.12-0       iceweasel       gnome-settings-daemon       gnome-packagekit       glchess       libedataserverui-3.0-1       libedata-book-1.2-13       libebook-1.2-13       libebackend-1.2-2       libcamel-1.2-33       evolution-data-server       colord       aptitude       libaprutil1-dbd-sqlite3


title: merge csv files by first column

text: I have 3 csv files like this. csv 1:               1,aaaa,bbb,2014-04-01     2,qwe,rty,2014-04-03     3,zxc,cvb,2014-04-05      csv 2:               2,j,k,2014-04-01     3,a,s,2014-04-04     5,g,h,2014-04-08      csv 3:               2,a,s,d,f,g,2014-04-01     3,d,f,g,h,j,2014-04-06     4,c,v,b,n,m,2014-04-09      **How can I merge all by the first column?**               SELECT * FROM csv1     JOIN csv2 where csv1[0]= csv2[0] --[0] is the position of the first column      The output should be:                csv1 fields     | csv2 fields |  csv4 fields           2,qwe,rty,2014-04-03,a,s,2014-04-04,a,s,d,f,g,2014-04-01      3,zxc,cvb,2014-04-05,g,h,2014-04-08,d,f,g,h,j,2014-04-06


title: can I get a list of the debian packages I installed AFTER the OS installation?

text: Extending this question, I would like to ask, if there is a general term that groups all the packages that I have installed POST debian installation? Mind you that for clarity purposes, I refer to the packages that I decided to install (meta-packages included), not their dependencies and suggested updates (like security etc). One way in that direction is to check the `/var/log/dpkg.log` for the dates of the installation of the packages. But this is obviously not ideal as all packages are registered there as well as half-installed and others. What would be a better solution to this?


title: Open another file with split windows, and switch between them

text: If I open vim with: `$ vim -o a.ext b.ext` I get a window that looks like this               +----------------------+     |           a          |     |                      |     | a.ext ---------------+     |           b          |     |                      |     + b.ext ---------------+      Say I want to open another file, `c.ext`. So I do something like `:e c.ext` on the top panel.               +----------------------+     |           c          |     |                      |     | c.ext ---------------+     |           b          |     |                      |     + b.ext ---------------+      But now the `a.ext` file is inaccessible, and I can't get back to it using `:n`. What is the proper way to open `c.ext` so I can get back to `a.ext` using `:n`?


title: Determine the USB port to which my Mobile is connected?

text: I tried the following commands, but couldn't find the name of USB port               $ lsusb     Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 002 Device 002: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0     Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 001 Device 003: ID 04e8:6818 Samsung Electronics Co., Ltd      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub          $ cat /etc/fstab     proc /proc proc nodev,noexec,nosuid 0 0     # / was on /dev/sda1 during installation     UUID=8e93f00d-0154-495b-9c82-d9c485681cda / ext4 errors=remount-ro 0 1     # swap was on /dev/sda5 during installation     UUID=14fe526f-2b5c-429f-87dd-8ab40f4b5093 none swap sw 0 0          $ dmesg | grep tty     [ 0.000000] console [tty0] enabled     [ 1.900695] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A     [ 2.257708] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A      None of the above commands gave the name of the USB port, I want the output as `/dev/sdax` or `ttysax` or something like that. Any other commands and suggestions would be helpful.


title: Route to LAN subnet via OpenVPN client

text: I am trying to route to a LAN subnet that is connected via an OpenVPN client. I am having trouble with the `route` command - I cannot make sense of it. The OpenVPN link is established and I can `ping` the client. When I try to add a route to the LAN subnet on the VPN server, I get this error:               # route add -net 192.168.0.0 netmask 255.255.255.0 gw 10.9.0.6 dev tun0     SIOCADDRT: No such process      The routing table for the **OpenVPN server** has `10.9.0.0/24` in it, so I'm not sure what the problem is.               # route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         ve108.csr2.lga1 0.0.0.0         UG    0      0        0 eth0     10.9.0.0        10.9.0.2        255.255.255.0   UG    0      0        0 tun0     10.9.0.2        *               255.255.255.255 UH    0      0        0 tun0     204.145.81.0    *               255.255.255.0   U     0      0        0 eth0      More information:               # ip ad sh     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 00:0e:cf:20:c1:24 brd ff:ff:ff:ff:ff:ff         inet 204.145.81.11/24 brd 204.145.81.255 scope global eth0         inet6 fe80::20e:cfff:fe20:c124/64 scope link             valid_lft forever preferred_lft forever     3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100         link/none          inet 10.9.0.1 peer 10.9.0.2/32 scope global tun0      Considering that I can `ping` the VPN client I am trying to route to, I don't understand why I am having this problem. As far as I know I should just be able to add the route.               # ping -c 1 10.9.0.6     PING 10.9.0.6 (10.9.0.6) 56(84) bytes of data.     64 bytes from 10.9.0.6: icmp_req=1 ttl=64 time=24.0 ms          --- 10.9.0.6 ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 24.008/24.008/24.008/0.000 ms      Here is the details from the **OpenVPN client** , which is connected to the VPN server. The network I am trying to route to is on this client.               # route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     default         greece-gw.secus 0.0.0.0         UG    2      0        0 eth0     10.9.0.1        10.9.0.5        255.255.255.255 UGH   0      0        0 tun0     10.9.0.5        *               255.255.255.255 UH    0      0        0 tun0     loopback        localhost       255.0.0.0       UG    0      0        0 lo     192.168.0.0     *               255.255.255.0   U     0      0        0 eth1     198.50.241.0    *               255.255.255.0   U     0      0        0 eth0      It can reach the VPN server fine:               # ping -c 1 10.9.0.1     PING 10.9.0.1 (10.9.0.1) 56(84) bytes of data.     64 bytes from 10.9.0.1: icmp_seq=1 ttl=64 time=24.0 ms          --- 10.9.0.1 ping statistics ---     1 packets transmitted, 1 received, 0% packet loss, time 0ms     rtt min/avg/max/mdev = 24.017/24.017/24.017/0.000 ms      It has IP forwarding enabled:               # sysctl -a | grep forwarding     net.ipv4.conf.all.forwarding = 1      I've set `iptables` to allow forwarding:               # iptables -nvL FORWARD     Chain FORWARD (policy DROP 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                  0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED         0     0 ACCEPT     all  --  tun0   eth1    0.0.0.0/0            0.0.0.0/0      Here is the config for the interfaces on the client:               # ip ad sh     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo            valid_lft forever preferred_lft forever         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 08:00:27:5f:f2:1e brd ff:ff:ff:ff:ff:ff         inet 198.50.241.113/24 brd 198.50.241.255 scope global eth0            valid_lft forever preferred_lft forever         inet6 fe80::a00:27ff:fe5f:f21e/64 scope link             valid_lft forever preferred_lft forever     3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 08:00:27:c6:b8:fd brd ff:ff:ff:ff:ff:ff         inet 192.168.0.2/24 brd 192.168.0.255 scope global eth1            valid_lft forever preferred_lft forever         inet6 fe80::a00:27ff:fec6:b8fd/64 scope link             valid_lft forever preferred_lft forever     4: sit0: <NOARP> mtu 1480 qdisc noop state DOWN          link/sit 0.0.0.0 brd 0.0.0.0     5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100         link/none          inet 10.9.0.6 peer 10.9.0.5/32 scope global tun0            valid_lft forever preferred_lft forever


title: How to add newlines into variables in bash script

text: When I do               str="Hello World\n===========\n"      I get the `\n` printed out too. How can I have newlines then?


title: Capture textual snapshot of pseudo terminal

text: My question is related to Keyboard and Console, but I want to do it for an arbitrary pseudo terminal, and not just the built-in Linux ones. Also, I'm not interested in a stream, I just want the current state. I'd imagine that if I `cat` the resulting file with the cursor at 0x0 and same terminal settings, the screen would look exactly like it did when the snapshot was taken.


title: How to paste an HTML table into Libre Office Calc without losing structure

text:
I want to paste an HTML table into Libre Office Calc. The HTML table rows contain images (in column 1) that should stay with their appropriate row. However, when I paste my HTML into Calc, the images are not pasted into rows but are free floating on the sheet. That prevents me from sorting the rows and doing the other spreadsheet operations I need to do on the table. How can I get Calc to accept HTML table data structured like shown below and keep the table structure fully intact? Example of a table (partial):

      	     Item

             	      Super     Duper Item


title: page up in gnu screen with Shift-PageUp

text: In the Linux terminal the key sequence Shift-PageUp can often be used to scroll up. However, this key sequence doesn't seem to work in gnu screen when ssh'ing to particular machines. I have two questions. 1) Where is this key sequence defined? 2) What can I change in my screen settings to always allow this? Does this have something to do with the termcap entries? I am currently using three machines. Two of which will scroll the buffer up when pressing Shift-PageUp. One machine will not respond to the key press at all. Working Machines:   * Centos 6.5   * Centos 5.9 Not working machine:   * Centos 5.9 Here is my .screenrc which I am using on all three machines               termcapinfo xterm|xterms|xs|rxvt ti@:te@          term screen-256color          hardstatus on     hardstatus alwayslastline     hardstatus string "%{= wb}%-w%{.yb}%n %t%{-}%+w %=%{b r} %H %{..b}[%l] %{..K}%C%a "          startup_message off          # turn off visual bell     vbell off          # Autodetach session on hangup instead of terminating screen completely     autodetach on           # give more scroll back     defscrollback 20000          # turn on alternate screen support      altscreen on          # bash will be replaced by the running command      shelltitle " $ |bash"          screen 3     screen 2     screen 1      I'm not sure if it matters, but I am using ROXTerm as my terminal emulator. Note: I know that Ctrl-A [ can be used to enter screen's copy mode scroll-back buffer. However I don't want to use this. I am interested as to why Shift- PageUp in screen works on some machines as expected, but is completely ignored on other machines. Edit: I was able to solve this on the one machine it was not working on by changing the termcapinfo line in .screenrc to the following:               termcapinfo xterm*|xs|rxvt ti@:te@      On the one machine that didn't work, my $TERM environment variable was set to xterm-256color, so is it possible that there is no termcap/terminfo entry for "xterm-256color"?


title: Sorted HTML table

text:
I need a very quick and easy way to sort HTML tables. The table rows contain images that should stay with their appropriate row. I tried pasting my HTML into Libre Office calc, but the images are not pasted into rows, so sorting is not possible. BTW, I do not want a _sortable_ table. I want a sorted table. When done, I just want a plain HTML table that I can paste into a blog page, but I want the items in the table sorted. I want to start with my clean HTML table, paste it into an app, sort the table and get the new HTML source without any added styling or junk having been added. It seems simple, but I can't find a solution. Example of a table I wish to sort:                         <meta content="text/html; charset=ISO-8859-1"     http-equiv="content-type">     <title></title>

         	     a

        	     f

        	     c

        	     b


title: Setting up nginx on Fedora 19

text: So I had nginx set-up with the default site. I decided I wanted to change because my website is at `/var/www/server.nyro.net/`... so before I changed again, I went to `127.0.0.1` to see if everything worked. I did. I got the `This page is run by nginx!` and then I decided to edit the conf file.... and now I get 403 forbidden. I did the chmodd correctly... I don't know what is wrong... Here is my nginx.conf: http://pastebin.com/cbmvguW1 Here is my nginx.conf **.default** : http://pastebin.com/aWdhv9JR What am I doing wrong?


title: How to install software to a multi-boot live CD

text: Okay, so I am creating a multi-boot live cd with various linux distributions including Debian and Mint. Each distribution will be used to focus on diagnosing and/ o repairing a specific issue best suited to the specific distribution. However, there will be no persistent storage enabled on this drive following the installation of the ISOs. As a result, I will need to install the necessary software to each distribution's ISO prior to writing the images to the flash drive with `YUMI`. Is there a way to do this? All methods must be compatible with windows because that is the primary operating platform that I am limited to at this moment. I am not interested in tools that work to create custom live CDs for Ubuntu linux distributions as I will not be using any Ubuntu ISOs and I am not willing to compromise in this respect.


title: ls command - list files containg speccific string in file name and belong to specific type

text: I am new to linux. Is it possible for a ls command to return a list of files containing "PRO" in its file name and belong to pli file type. I have researched and identified that `ls -c -lt *.PLI` will return a files of ".pli" type and `ls -c -lt *PRO*` will return file which has PRO in its file name. Example: If folder contain _`aaaaaPROaaaaa.PLI, aaaaaPROaaaaa.PSO, aaaaaPROaaaaa.txt, bbbbbPRObb.PLI and bbbbbPRObb.txt`_ , then I need to ls command to return only _`aaaaaPROaaaaa.PLI and bbbbbPRObb.PLI`_ If it is not achievable through **ls** command can we achieve it through **find** command ?


title: rsyslog using short hostname

text: I'm using CentOS 6.5 and `rsyslogd`:               Name        : rsyslog     Arch        : x86_64     Version     : 5.8.10     Release     : 8.el6      In rsyslog.d's conf file I have:               $PreserveFQDN on      and               $ActionFileDefaultTemplate RSYSLOG_SyslogProtocol23Format      No matter what I do, apps like `ntpd` still log with the short hostname and not the fdqn. Even 'logger -t test this' still shows the short name.                  [root@web-01 ~]# hostname -s        web-01        [root@web-01 ~]# hostname -f        web-01.productA.internal      Even explicitly setting the hostname in rsyslog doesn't seem to work. Using the `RSYSLOG_DebugFormat` template _Logger_                   [root@web-01 ~]# logger -t test 456         [root@web-01 ~]# tail /var/log/messages         Debug line with all properties:         FROMHOST: 'web-01', fromhost-ip: '127.0.0.1', HOSTNAME: 'web-01',          PRI: 13, syslogtag 'test:', programname: 'test', APP-NAME: 'test',          PROCID: '', MSGID: '-', TIMESTAMP: 'Feb 20 21:50:12',          STRUCTURED-DATA: '-', msg: ' 456' escaped msg: ' 456'         inputname: imuxsock rawmsg: '<13>Feb 20 21:50:12 test: 456'      _Restart rsyslog_                   Debug line with all properties:         FROMHOST: 'web-01', fromhost-ip: '127.0.0.1', HOSTNAME:         'web-01.productA.internal', PRI: 43,         syslogtag 'rsyslogd-2026:', programname: 'rsyslogd-2026', APP-NAME:          'rsyslogd-2026', PROCID: '', MSGID: '-',         TIMESTAMP: 'Feb 20 21:53:19', STRUCTURED-DATA: '-',      Why would those be different?


title: how to run recursively "touch empty" if a folder is empty?

text: I want to maintain a folder structure that contains empty folders when I add a project to Git. As everyone knows, Git doesn't track empty folders. So you need to add some kind of placeholder inside of an empty folder. So far I have managed to find out recursively empty folders with this command:               find ./* -type d -empty      How do I continue? So after a command every empty folder contains a file called "empty"?


title: How to fix make error "No rule to make target 'menuconfig'" when building a kernel for Beagleboard?

text: The aim is to build and install the USB Video Class (UVC) module, via `make modules_install`. I'm trying to configure the kernel via `make menuconfig` on Angstrom distribution, running on BeagleBoard-xM. Angstrom image (console only) was build on Narcissus online image builder. Angstrom kernel is 2.6.32. I receive the following error: `make: *** No rule to make target 'menuconfig'. Stop.` It seems that there are no kernel sources because `usr/src` contains nothing. Should I have to download Linux kernel 2.6.32 from kernel.org and what should be my next steps in order to configure the kernel?


title: CFLAGS in Linux kernel makefiles: which one is used when?

text: I'm not familiar with Makefiles, I can kinda understand them, but with the Linux Kernel I have a question. (Using 3.7.1, Patched with BFS so line numbers may be a bit off) On line 248               HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer      Is this passed to all the Makefiles? Then on Lines 349 and 352 Respectively               CFLAGS_MODULE   =     ....     CFLAGS_KERNEL   =     ....     CFLAGS_GCOV = -fprofile-arcs -ftest-coverage      I'm guessing `CFLAGS_MODULE` is passed to things built as a module, and the next is specific to the kernel itself? And `CFLAGS_GCOV` is for debugging and profiling? Then there are a bunch of KBUILD_CFLAGS               KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)      I'm guessing the previous line removes those options, and the next line adds?               KBUILD_CFLAGS   += -fno-omit-frame-pointer -fno-optimize-sibling-calls      I haven't found a good tutorial about this either.


title: Why does the same sed regex (after grep) fail when run in a bash script vs bash command line?

text: Here's the script. It is successful when I run it from the _BASH prompt_ , but not in the script. Any ideas? * * * When I say "fails," I mean the `sed regex` doesn't match anything, so there is no replaced text. When I run it on the command line, it matches. Also, I might have an answer to this. It has to do with my `grep` alias and `GREP_OPTIONS` having a weird interplay. I'll post back with the details on those.               #!/bin/bash          for ((x = 101; x <= 110; x++)); do         urls="${urls} www$x.site.com/config"     done;          curl -s ${urls} | grep -i "Git Commit" | sed -r "s/.*Git Commit<\/td><td>([^<]+).*/\1/g"


title: Networking looks OK, but does not work at all

text: I am trying to get networking to work on Sabayon X KDE Edition. I have configured wireless networking using the NetworkManager applet and networking looks OK. However, I can't connect to the Internet, I cannot ping my gateway and I cannot even ping localhost. I have never seen this behaviour on Linux. I am using a manually-configured kernel because I have to boot using UEFI. If you suspect any specific Kernel options, I can check them against the config. Also, networking worked fine in the Sabayon live environment. Does anybody have an idea what is going on here?               # ifconfig     lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536             inet 127.0.0.1  netmask 255.0.0.0             inet6 ::1  prefixlen 128  scopeid 0x10<host>             loop  txqueuelen 0  (Lokale Schleife)             RX packets 66  bytes 5208 (5.0 KiB)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 66  bytes 5208 (5.0 KiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500             inet 192.168.178.36  netmask 255.255.255.0  broadcast 192.168.    178.255             inet6 fe80::c685:8ff:fe30:b77c  prefixlen 64  scopeid 0x20<link>             ether c4:85:08:30:b7:7c  txqueuelen 1000  (Ethernet)             RX packets 402  bytes 44048 (43.0 KiB)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 169  bytes 73070 (71.3 KiB)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          # netstat -r     Kernel IP Routentabelle     Ziel            Router          Genmask         Flags   MSS Fenster irtt     Iface     default         192.168.178.1   0.0.0.0         UG        0 0          0     wlan0     loopback        localhost       255.0.0.0       UG        0 0          0     lo     192.168.178.0   *               255.255.255.0   U         0 0          0     wlan0          # ping -c3 192.168.178.36     PING 192.168.178.36 (192.168.178.36) 56(84) bytes of data.          --- 192.168.178.36 ping statistics ---     3 packets transmitted, 0 received, 100% packet loss, time 2007ms          # ping -c3 localhost     PING localhost (127.0.0.1) 56(84) bytes of data.          --- localhost ping statistics ---     3 packets transmitted, 0 received, 100% packet loss, time 2005ms


title: How to connect through sftp to a non-standard port on Midnight Commander?

text: In Midnight Commander one can make an SFTP connection to a remote machine using:               cd #sh:yourusername@example.com:/home/username/      How can this be done when the remote machine is using a non-standard port?


title: What are the proper tools to setup a remote compilation and running (something like ideone)?

text: I'm trying to achieve similar functionality in a server for community programming and I've drafted this to wrap up another take on oneide's functions: From a Perl CGI I build a script like this (not even pseudocode):               compiler_response = timeout (params) compiler (params)     result = timeout compiledprogram (params)     save result in database      I think timeout is the tool I need to restrain the program from executing or compiling more than X seconds, The problem I have is that I need to limit the compiled program from writing to anything other than STDOUT or reading from anything other than STDIN. Also I need to limit the size of the program to a certain limit, 128KB for example, and the ammount of RAM it can use, 64 MB for example. What are the proper tools to do this from bash? Thanks in advance.


title: Getting list of installed apps (NOT packages)

text: How can I get list of installed apps (based at files in /usr/share/applications/) without writing own parser? I need just app name, path to app icon and path to launch app. I'm using C++ with Qt libraries. Of course, you can write me shell command or something else like it.