What makes the Linux scheduler seem unpredictable?

The question refers to the output of a multi-threaded application, where each thread merely prints its ID (user assigned number) on the standard output. Here all threads have equal priority and compete for CPU quota in order to print on the standard output. However, running the same application a sufficiently large number of times will result in different order of IDs being printed on the screen. This order is due to the OS scheduler which is a piece of software and therefore deterministic. Nonetheless, its behavior seems non- deterministic, which brings me back to the initial question.


Brute force access to a Firebird database?

Ok, so here's the deal. When migrating a certain product with terrible documentation to another database type, my Firebird database was deleted. I then proceeded to recover it from the filesystem using a recovery tool. Now, I need to get into it to be able to dump the data and transfer it to MySQL, the new database. The problem is that the company who makes the software won't give me the username and password to the Firebird database so I can migrate it. The client is justifiably upset as we've had downtime for over a week on this service. What can I use to get the username and password for the database?


Can executables from a mounted distro's disk be run without booting into it?

This question, "Figuring out what OS is on which partition?", got me into thinking if you could run the executables from a mounted distro without actually having booted into said distro. The answer to this question, "How to recover from a chmod -R 000 /bin?", got me into thinking that perhaps you could call the loader from the mounted distro's partition. Is this possible? ### Example When I tried it, it didn't work, but I'm thinking I might be missing some other bits. The command I was trying this with was `lsb_release`. I'm on a 64-bit Fedora 14 installation at the moment, if that matters.               $ sudo /lib/ld-2.13.so /usr/bin/lsb_release     /usr/bin/lsb_release: error while loading shared libraries: /usr/bin/lsb_release: invalid ELF header


Why don't find and locate search /bin?

What gives? Normal `find` and `locate` commands don't turn up the verify program that lives at `/bin/verify`. In fact, it seems they don't turn up anything that lives in `/bin`               [jake@jace]/bin% "find" /bin/ -iname "verify" 2>/dev/null     /bin/verify     [jake@jace]/bin% "find" /bin -iname "verify" 2>/dev/null      [jake@jace]/bin% "find" / -iname "verify" 2>/dev/null      /home/jake/android/cts/tools/vm-tests-tf/src/dot/junit/verify     /usr/share/cmake/Modules/FortranCInterface/Verify     /usr/bin/verify      .               [jake@jace]/bin% locate "verify" | grep "bin"     /usr/bin/db_log_verify     /usr/bin/db_verify     /usr/bin/fprintd-verify     /usr/bin/json_verify     /usr/bin/ldns-verify-zone     /usr/bin/rpmverify     /usr/bin/verify     /usr/bin/verifytree      .               [jake@jace]/bin% "ls" -lh /bin/verify     -rwxr-xr-x. 1 root root 32K May 22  2012 /bin/verify


How to automate Linux server configuration?

Is there any way to automate Linux server configuration? I'm working on setting up a couple of new build servers, as well as an FTP server, and would like to automate as much of the process as possible. The reason for this is that the setup and configuration of these servers needs to be done in an easily repeatable way. We figured that automating as much of this process as possible would make it easiest to repeat as needed in the future. Essentially, all the servers need is to install the OS, as well as a handful of packages. There's nothing overly complicated about the setups. So, is there a way to automate this process (or at least some amount of it)? EDIT: Also, say I use Kickstart, is there a way to remove the default Ubuntu repositories, and just install the packages from a collection of .deb files we have locally (preferably through apt, rather than dpkg)?


How to limit administrative privileges to various config files?

I want one administrator to be able to edit the /etc/fstab file but one administrator to not be able to edit the fstab file. Both administrators need access to all other administrative tasks. Is this possible? I am assuming I would need to somehow setup what files "sudo" gives them access to. Or possible just make non administrative accounts and then create a group called fstab-access and add one of the users to that and setup privileges for that group... ? Am I on the right track?


Linux 2.6.32, busybox, Identify physical SD device

I have a USB card reader with two SD card interfaces and two USB ports (so it can also act as a USB hub) all on the same device. I am running an embedded Linux device that is unsupervised in its use and intend to use 2 SD cards in the reader for storing data collected over several hours of operation. Each card is meant to hold specific data and the two data types cannot be mixed. Using mdev's ability to fire off a script when a USB SCSI device (either an SD card or a USB flash disk) is mounted, I can note the physical location of the USB device so that I can identify which disk is which, but there is one exception to this. The card reader reports that both of the SD cards in the reader are physically located on port 1 of the reader. This means that I'm unable to (with my current knowledge) identify in my custom-written programs the physical card that data is being written to. I can't bring the user into the loop to tell the system which card is which (the user simply plugs 2 fresh cards in, turns the device on, and walks away). How can I determine which filesystem belongs to which physical disk by using tools compatible with Busybox? Thank you.


Git based package manager/installer for Linux

Is there any linux distro that has a git based package manager/installer. I want something similar to FreeBSD Ports (which is CVS based, I think) or Mac OS X Homebrew (git based).


Where is iptables script stored on DD-WRT filesystem?

I have an **ASUS RT-N16 router** that I've flashed with the open-source **DD- WRT** firmware. According to my `ssh` login, I'm running:               DD-WRT v24-sp2 mega (c) 2010 NewMedia-NET GmbH     Release: 08/07/10 (SVN revision: 14896)      I'd like to be able to customize the iptables rules, but before I do that, I'd like to see the output of the built-in rules that get configured when manipulating the browser/GUI interface settings. I am aware of the firewall script tab in the browser interface for entering custom firewall rules, but I can't find someplace to see the output. **On a full-blown Linux system, the iptables rules would be stored somewhere like`/etc/sysconfig/iptables`. Where would I find these on a DD-WRT filesystem?** I can do               iptables -L -vn --line-numbers      and _see_ them output, but what I'm looking for is more of what the `iptables- save` command might output... so that I can incorporate the appropriate rules into my custom script. I understand that this build does not have an `iptables-save` command. I don't necessarily want the command itself, just output that it generates. If there was something like `/etc/sysconfig/iptables`, I wouldn't care about having `iptables-save`. I've seen that there may be different builds of DD-WRT that give something like `iptables-save`, but I'm not at the point where I'm ready or willing to flash the router again. Maybe as a last resort. **EDIT:** The _usual_ Linux locations for startup scripts and the like, (e.g., `/etc/init.d`, `/etc/rc`, ...) do not seem to have anything useful (at least in the build of DD-WRT that I have installed). For example, taking a look in `/etc/init.d`:               [/etc/init.d]# ll     -rwxr-xr-x    1 root     root           84 Aug  7  2010 rcS     -rwxr-xr-x    1 root     root           10 Aug  7  2010 S01dummy     [/etc/init.d]# cat rcS     #!/bin/sh     for i in /etc/init.d/S*; do       $i start 2>&1     done | logger -s -p 6 -t '' &     [/etc/init.d]# cat S01dummy     #!/bin/sh


How do I specify arguments to return all dot files, but not . and ..?

Normally dot files are not included for wildcard expansion:               % echo *     Applications Desktop Documents Downloads Library Movies Music Pictures Public bin      If I explicitly ask for dot files, I get them:               % echo * .*     Applications Desktop Documents Downloads Library Movies Music Pictures Public bin . .. .CFUserTextEncoding .DS_Store .Trash .adobe .bash_history .cups .gitconfig .gnupg .history .lesshst .netbeans .scanview.cfg .sqlite_history .ssh .swt .systemmodeler .tcshrc .viminfo      However I _also_ get `.` and `..`. I don't want those, for example if I'm passing to `du -s` where I want the size of every item in the directory. Is there some pattern that gives me just what's in the current directory, and everything in the current directory without `.` and `..`? I use tcsh. _(With regard to the "This question may already have an answer here:" note above: no this question doesn't have an answer there, since that answer only works for bash.)_


Providing /bin and /lib inside a chroot jail

I need to be able to provide the /bin and /lib directories inside a chroot jail so that programs can dynamically link properly. Is there a way to accomplish this without making a copy of the /bin and /lib dirs to the chroot jail? I've tried symlinks, and they don't work from inside chroot jails, and directories can not be hardlinked.


Uniquely identifying a drive (not a partition)

I'm writing some automation scripts for full disk backups and I'd like to be _fairly_ precise with which devices are used. I know that one can uniquely identify a partition using UUIDs and `blkid`, but is there a way to uniquely identify a disk? My use case is that I'm not entirely sure which order disks will be mounted on the Clonezilla distribution, and I'd like to make sure that my backups are targeting the right (whole) disk for backup. Is there a way to find the device identifier (`/dev/sdX`) for a given disk by certain criteria?


Can't obtain the connected forms of some unicode grapheme clusters with combining diacritical marks

In Arabic and some other languages a character has two or three forms which will find its appropriate one automatically when you type a word (according to its previous and next characters). How can one change or add these automatic rules? For example there's no rule for this character and so if I set a key for this character, it will not find its appropriate form in a word, unless I set different keys for different forms . How can I add/program a mapping rule for this character? or set the same rule as this character for it? * * * I want to know which script, program, etc finds the appropriate form of character (ه) and how can I set the same thing for character (ۀ). there's a key for the first one and if I select Arabic language layout then press the key several times: هههه but for the second: ۀۀۀۀۀ. something is missing for the second character. I want to bridge the gap.


Bluetooth Device not working debian wheezy

i just installed debian wheezy on msi cx640dx. my bluetooth device not working. here is some information. Kernel version:               $uname -r     3.2.0-4-amd64      when i use `hcitool dev` it don't show any device.               $ hcitool dev     Devices:      and with scanning it says that i don't have that device:               $ sudo hcitool scan     Device is not available: No such device      i think following information is may be helpful.               $lsmod | grep -i blue     bluetooth             119455  12 btusb,ath3k,rfcomm,bnep     rfkill                 19012  5 cfg80211,bluetooth     crc16                  12343  2 ext4,bluetooth      and.               $ lspci      00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)     00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)     00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)     00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)     00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)     00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)     00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)     00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)     00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)     00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)     00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)     00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)     00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)     00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)     01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev a1)     03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)     04:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)     05:00.0 Ethernet controller: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet (rev c0)      and this is kernel ring buffer:               $ dmesg  |grep -i blue     [    7.408956] Bluetooth: Core ver 2.16     [    7.408977] Bluetooth: HCI device and connection manager initialized     [    7.408980] Bluetooth: HCI socket layer initialized     [    7.408982] Bluetooth: L2CAP socket layer initialized     [    7.408987] Bluetooth: SCO socket layer initialized     [    7.460972] Bluetooth: Generic Bluetooth USB driver ver 0.6     [    7.485478] Bluetooth: Atheros AR30xx firmware driver ver 1.0     [    7.537981] Bluetooth: Error loading firmware     [   22.886593] Bluetooth: RFCOMM TTY layer initialized     [   22.886602] Bluetooth: RFCOMM socket layer initialized     [   22.886605] Bluetooth: RFCOMM ver 1.11     [   23.042310] Bluetooth: BNEP (Ethernet Emulation) ver 1.3     [   23.042316] Bluetooth: BNEP filters: protocol multicast


After printing the previous line where the file contains a single token now need to traverse through the result to meet the requirement

I have used the below code to print the previous line where the file contains a single token               #! /bin/ksh          file=input.txt     while read line     do     awk 'NF == 1 { print LAST } { LAST=$0 }'     done < "$file"      Now I need to traverse through the result and need to check 9th position, 11th, 13th, etc. till the end of the line with the consecutive odd positions and if those positions are not matching with any of the mentioned numerics:               201      230      197      193      229      200      215      226      001      198       It should print the error as `CORRUPTED`, if not `AVAILABLE` should be printed. Here is the example of my file :               59 6 18 2014 169 7 14 2 7671912 7849744 201 4     60 6 19 2014 170 5 49 2 7671912 7849744 201 5     61 6 20 2014 171 6 8 2 7671912 7849744 201 6     62 6 23 2014 174 5 3 2 7671912 7849744 201 7     63 6 23 2014 174 7 17 2 7671912 7849744 201 8     64 6 24 2014 175 16 13 2 7671912 7849744 201 9     65 6 25 2014 176 8 20 2 7671912 7849744 201 10     10     1 1 49 6 16 2014 7 39 201 1 0 1043 <au_launchpad_back.gif> 201 gif <SIZE> 871     1 2 49 6 17 2014 13 15 201 1 0 1043 <au_launchpad_back.gif> 201 gif <SIZE> 871     1 3 49 6 18 2014 1 38 201 1 0 1043 <au_launchpad_back.gif> 201 gif <SIZE> 871     1 4 49 6 18 2014 7 14 201 1 0 1043 <au_launchpad_back.gif> 201 gif <SIZE> 871     1 5 49 6 19 2014 5 49 201 1 0 1043 <au_launchpad_back.gif> 201 gif <SIZE> 871      If we consider this as example 9th position is 7671912 NOTE : The code should be feasible at any other file as well.


How do I set the preferred wireless network in Linux Mint 17?

I'm currently in an environment with two wireless networks: `OrganizationFoo`, which is present pretty much everywhere I go, and `OrganizationFooSubset`, which is only present in a certain location. When possible, I'd like to connect to `OrganizationFooSubset` because it's a faster, more reliable network. If this is out of range, I'd like to connect to `OrganizationFoo`. ![Network connections dialog](http://i.stack.imgur.com/fwK6o.png) How can I configure this from within Linux Mint 17 Cinnamon (64-bit)? I've found the network connections configuration dialog, but there are no "Move Up" or "Move Down" buttons, and drag-and-drop has no effect. In the actual `/etc/NetworkManager/system-connections/` directory, each connection gets its own file, and I don't see a master list where I could reorder them. Thoughts?


What does the "rc" stand for in /etc/rc.d?

Does anybody have an idea about the full form of rc.d in, for example, `/etc/rc.d`? It contains scripts to used to control the starting, stopping and restarting of daemons. But what exactly is the meaning of **rc** here?


Getting information about a process' memory usage from /proc/pid/smaps

For a given process in `/proc/<pid>/smaps`, for a given mapping entry what are:   1. Shared_Clean   2. Shared_Dirty   3. Private_Clean   4. Private_Dirty Is `Shared_Clean` + `Shared_Dirty` the amount of memory that is shared with other processes? So it is like shared RSS? Similarly is `Private_Clean` + `Private_Dirty` the amount of memory that is **available for only one process**? So it is like private RSS? Is the PSS value = PrivateRSS + (SharedRSS / number of processes sharing it)? _**Some more questions after reading this link:LWN**_ _Now lets talk about the process as a whole, whose smaps entry we are looking at._ I noticed that if I do `Shared_Clean` + `Shared_Dirty` + `Private_Clean` + `Private_Dirty` for every smaps entry for the process I get the RSS of the process as reported by `ps`, which is pretty cool. For e.g.               ps -p $$ -o pid,rss      Will give me the (approx) same value for rss as the sum of every `Shared_Clean` , `Shared_Dirty` , `Private_Clean` , `Private_Dirty` entry in /proc/$$/smaps. **But what about PSS** for the entire process? So, from the example above how do I get the PSS for $$ ? Can I just add the PSS entry for every smaps mapping and arrive at PSS for $$ ? **And what about USS** for the entire process? Again taking the example above I am guessing that I can arrive at the USS for $$ by summing up only the Private_* entries for every smaps entry for $$..right? Notes:   PSS= Proportional set size.   USS= Unique set size.


Open Character Device without creating a Device Node

I'm having an issue where a 3rd party application is opening a device node it shouldn't. I wrote a SPI Slave device driver that does some processing of messages. When the driver loads its in "Initialize Mode" which only replies to a specific message. To re-initialize communications I must unload and reload the driver. The problem is that the system has a 3rd party application, running as root, that opens all character devices. The only way to make this all work is to stop the app and unload which causes a huge problem with the over all project. Is it possible to open a connection to a Character Device without actually having a device node? Right now I use fopen('/dev/spi') and everything works fine until I need to reload and the above issue ensues. Is there any sort of system call that can be made that would result in a file descriptor to a specific Major/Minor node number without having the actual /dev/spi file?


Strange kind of "stealth" directory on Linux

I am in a Linux machine and am working with a directory that is aptly named "stealth", because it runs and hides! Take a look at this behavior:               bash-3.2$ ls /net     bash-3.2$ ls -la /net     total 4     drwxr-xr-x  2 root root    0 Jun 19 16:10 .     drwxr-xr-x 29 root root 4096 Jun 15 09:51 ..     bash-3.2$ ls /net/stealth     dir1  dir2  SERVER_LINK     bash-3.2$ ls /net     stealth     bash-3.2$ ls -la /net     total 4     drwxr-xr-x  3 root root    0 Jun 19 16:59 .     drwxr-xr-x 29 root root 4096 Jun 15 09:51 ..     dr-xr-xr-x  6 root root    0 Jun 19 16:59 stealth     bash-3.2$ uname -a     Linux cfnyps1u 2.6.18-348.18.1.el5 #1 SMP Fri Sep 6 12:37:18 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux      (Note the difference between the output of ls /net before and after the contents of the stealth directory are listed) What is the name of this type of directory, and why would it "hide" until it is "found"? I eventually figured out what was going on, but I'd never seen this behavior before and it definitely makes the directory's contents harder to find using standard approaches.


Pipe system sound to another computer

I have no speakers in my PC (Cent-OS 5.5) but there is a stereo speaker connected to the computer next to my computer (also Cent-OS 5.5). Both computers are networked. Is there any way to pipe my system sounds to that computer's speaker?


Create and set custom keyboard layout

I want to create and set a custom keyboard layout with setxkbmap. I created a file in `~/.xkb/prog` with this content:               partial default alphanumeric_keys     xkb_symbols "basic" {          include "latin(type4)"          name[Group1]="es for developers";          key <AE01> {[           1,           exclam,    exclamdown,          bar   ]};         key <AD03> {[           e,                E,      EuroSign,     sterling   ]};     key <AB06> {[           n,                N,        ntilde,       Ntilde   ]};         key <AB07> {[           m,                M,            mu,           mu   ]};         key <AB10> {[       slash,         question,  questiondown,    dead_hook   ]};          include "level3(ralt_switch)"     };       And I tried to load it with `setxkbmap -I$HOME/.xkb "prog"`, but I get a 'Error loading new keyboard description' I also tried it with `setxkbmap -I$HOME/.xkb "prog" -print | xkbcomp -I$HOME/.xkb - $DISPLAY`, but I get this error: 'Can't find file "prog" for symbols include'


How do I setup two or more IPv6 address on one NIC in FreeBSD?

How can I assign two or more IPv6 address on one NIC. I tried Google but no luck. I've done it with ipv4 but ipv6 can not.


How to emphasize active tab in Tilda?

I'm using `Tilda`. It's hard to say which tab is currently active by a glance. Is there way to make it clear which tab is active. For example ,can I emphasize tab by changing it's background color?


How to stop `apt-get` complaining about unmet dependencies?

I have been installing some applications onto my Debian system. Now there are some that have dependencies that I do not want installed with the applications at the moment. I have managed this by using `dpkg` in some cases. The installed applications work fine without them at the moment. But now, every time I use `apt-get`, it complains about unmet dependencies. How do I cheat `apt-get` into thinking that all dependencies (2-3) are installed? Is there some file I can edit?


Unable to play protected (DRM) content on Chrome (Linux Mint 17)

I upgraded to Linux Mint 17 a couple weeks ago. Prior to that, I was running on LM 16 and had an issue playing protected content on Google Chrome. I fixed that issue after installing hal and disabling Chrome's flash player in favour of Adobe's. But since I'm on LM 17, that problem reared its ugly head again. I recently installed hal and since Chrome no longer gave me the option to disable/enable specific flash plug-ins, I renamed Adobe's to libpepflashplayer and moved it to opt/google/chrome/PepperFlash. Unfortunately, the problem still persists and it's worse now since I know get the notice "Could not load Shockwave Flash." Linux Mint 17 (64) Google Chrome Version 35.0.1916.114 Sites attempted to access: Espn3.com, Video.adultswim.com/watch-live Also, I can't get this video (http://drmtest2.adobe.com:8080/Content/anonymous.f4v) to run in Adobe's demo video player (http://drmtest2.adobe.com:8080/SVP/SampleVideoPlayer_FP.html). Since swaping Chrome's built-in plug in for Adobe's, I can't make use of the site due to the plug-in crashing.


How can I update my dynamic DNS under OpenWRT?

I have an OpenWrt 10.03, and I need to update my dynamic DNS account (e.g., OpenDNS or DYNDNS) when my IP changes. How can I do this from the terminal?


What does "mounting fs with errors" mean in dmesg and what to do after that?

I run dmesg and this is what I see:               EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended     EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:       Here is the stuff in context               EXT3-fs (sdd1): using internal journal     EXT3-fs (sdd1): mounted filesystem with ordered data mode     EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended     EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:      EXT4-fs (sdb1): warning: maximal mount count reached, running e2fsck is recommended     EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts:      EXT4-fs (sdc1): warning: maximal mount count reached, running e2fsck is recommended     EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts:      Adding 4194296k swap on /dev/sdd2.  Priority:-1 extents:1 across:4194296k SSD     kjournald starting.  Commit interval 5 seconds     EXT3-fs (loop0): warning: maximal mount count reached, running e2fsck is recommended     EXT3-fs (loop0): using internal journal     EXT3-fs (loop0): mounted filesystem with ordered data mode      what is e2fsck anyway? How to run it?


"Unable to initialize SDL" error when trying to play games

When I run one of my games I get: > Unable to initialize SDL: No available video device I think that this is due my built-in SIS graphics card, which doesn't have a driver. However, flash games play normally. Here is my X configuration file if it can help (self edited):               Section "Device"         Identifier  "Configured Video Device"         Driver      "vesa"     EndSection          Section "Monitor"         Identifier "Generic Monitor"         Option "DPMS"         HorizSync 27-149         VertRefresh 43-172     EndSection          Section "Screen"         Identifier "Default Screen"         Device "Generic Video Card"         Monitor "Generic Monitor"         DefaultDepth 24             SubSection "Display"             Depth 24             Modes "1280x1024" "1024x768" "800x600" "640x480"             EndSubSection     EndSection      Is there a way to fix this without getting a dedicated graphics card?


bulk rename (or correctly display) files with special characters

I have a bunch of directories and subdirectories that contain files with special characters, like this file:               robbie@phil:~$ ls test�sktest.txt      test?sktest.txt      Find reveals an escape sequence:               robbie@phil:~$ find test�sktest.txt -ls      424512 4000 -rwxr--r-x   1 robbie   robbie    4091743 Jan 26 00:34 test\323sktest.txt      The only reason I can even type their names on the console is because of tab completion. This also means I can rename them manually (and strip the special character). I've set LC_ALL to UTF-8, which does not seem to help (also not on a new shell):               robbie@phil:~$ echo $LC_ALL     en_US.UTF-8      I'm connecting to the machine using ssh from my mac. It's an Ubuntu install:               robbie@phil:~$ cat /etc/lsb-release      DISTRIB_ID=Ubuntu     DISTRIB_RELEASE=7.10     DISTRIB_CODENAME=gutsy     DISTRIB_DESCRIPTION="Ubuntu 7.10"      Shell is Bash, TERM is set to xterm-color. These files have been there for quite a while, and they have not been created using that install of Ubuntu. So I don't know what the system encoding settings used to be. I've tried things along the lines of:               find . -type f -ls | sed 's/[^a-zA-Z0-9]//g'      But I can't find a solution that does everything I want:   1. Identify all files that have undisplayable characters (the above ignores way too much)   2. For all those files in a directory tree (recursively), execute mv oldname newname   3. Optionally, the ability to transliterate special characters such as ä to a (not required, but would be awesome) OR   1. Correctly display all these files (and no errors in applications when trying to open them) I have bits and pieces, like iterating over all files and moving them, but identifying the files and formatting them correctly for the mv command seems to be the hard part. Any extra information as to why they do not display correctly, or how to "guess" the correct encoding are also welcome. (I've tried convmv but it doesn't seem to do exactly what I want: http://j3e.de/linux/convmv/)


Where are the mount points defined in CentOS?

There is a mount point at /mnt/mountname and it goes to a large SAN with lots of storage but it's mounted as a read-only filesystem. I want to add a mount point with a different name that's read-write. I've looked in /etc/fstab and /etc/vfstab (which doesn't exist) and there is nothing there that mentions /mnt/mountname. Where else can I look?


How to install libesedb? Build error

I'm trying to build the libesedb package so I can read edb files. I went to: http://code.google.com/p/libesedb/wiki/Building and found the following:               tar xfv libesedb-alpha-<version>.tar.gz     cd libesedb-<version>     ./configure     make      So I extracted the files into the folder `libesedb-20120102` I then cd to the folder and used `./configure` - it returned the following:               si@siMint ~/Desktop/libesedb-20120102 $ ./configure     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for a thread-safe mkdir -p... /bin/mkdir -p     checking for gawk... gawk     checking whether make sets $(MAKE)... yes     checking build system type... x86_64-unknown-linux-gnu     checking host system type... x86_64-unknown-linux-gnu     checking for style of include used by make... GNU     checking for gcc... gcc     checking whether the C compiler works... no     configure: error: in `/home/si/Desktop/libesedb-20120102':     configure: error: C compiler cannot create executables     See `config.log' for more details.      I ran `make` anyway, and got this:               si@siMint ~/Desktop/libesedb-20120102 $ make     make: *** No targets specified and no makefile found. Stop.      I'm using Linux Mint (16, Cinnamon). Can anyone tell me what's going wrong?


Use of O_DIRECT on Linux

If this question is too programmer oriented, let me know. I wonder if there are people familiar with the O_DIRECT flag for the open() system call on Linux 2.6? Linus disparages its use, however high performance file writing seems to indicate its use. I would like to know of any real world experience and recommendations. More info: The application that I am using _does_ maintain its own cache, and in so doing attains an average of 5x or more speed up by doing so. When writing to file, the contents of the cache must be written out to the filesystem cache, which seems redundant and a performance concern.


restore filesystem after fdisk

I split a partition in two with `fdisk`, but after rebooting I've got partition in FAT filesystem (was ext4). What's can be wrong? And how to fix it or get data from bad partition? I hope this is possible. List of commands what I did:               resize2fs /dev/sda3 300G     fdisk /dev/sda     //here I remove sda3 partition and create 2 new for sda3 and sda4.     //w and reboot...          //...and I've got this structure:     Disk /dev/sda: 750.2 GB, 750156374016 bytes     255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x3e74fdb8          Device Boot      Start         End      Blocks   Id  System     /dev/sda1           16065      626534      305235   de  Dell Utility     /dev/sda2          626535     6924014     3148740   82  Linux swap / Solaris     /dev/sda3   *     6924015   636069614   314572800   83  Linux     /dev/sda4       636069615  1465149167   414539776+  83  Linux      `mount` say me what he cannot read superblock so I've use `e2fsck` for start with some alternate superblock and try to use all superblocks from `mke2fs` output. Also I've try `mount -f -t ext4 /dev/sda3 tempdir`. `testdisk` found all needed partition, but only in `[none]` search mode. As I understand, they output can use for fixing size of filesystem or for recovering data, but I don't understand her output.               Disk /dev/sda - 750 GB / 698 GiB - CHS 91202 255 63               Partition                  Start        End    Size in sectors             P ext3                     1   0  1    38 254 57     610464        P FAT32                  431   0  1   561 254 63    2104515 [NO NAME]        P ext4                   431   4 20 39593 132 25  629145600        P ext4                 39593 128  5 91201  80 60  829079552          Write isn't available because the partition table type "None" has been selected.      Can someone tell me how to use this data for manually restore partition filesystem or move data to another partition?


Understanding colors in zsh

In this thread, yoda suggests the following solution for using colors in `zsh`               #load colors     autoload colors && colors     for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do         eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}'  #wrap colours between %{ %} to avoid weird gaps in autocomplete         eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}'     done     eval RESET='$reset_color'      Correct me if I am wrong, but if I understand correctly, `autoload colors && colors` allows you to call colors by their name, while the rest of the script just wraps them in `${ $}`. This made me think about the following questions:   1. Is there a way to know what colors are loaded by calling `autoload colors && colors`?    2. How do I know what colors are supported by my terminal?


Location of application files?

Does Linux/Unix have a unified location for Application files, like "~/Library/Application Support" on Mac OS X? I'm making a Python script that will need to store permanent but changing data, and I want it to work universally.


Choppy sound with flashpayer

After a number of updates, including upgrading to flashplayer 11 and kernel 3.8.2 sound from flashplayer and skype has become choppy. **Setup** In my setup I have .ascoundrc set up to use pulseaudio (copied from somewhere, because I have no clue about the syntax of .asoundrc)               pcm.pulse {         type pulse     }     ctl.pulse {         type pulse     }     pcm.!default {         type pulse     }     ctl.!default {         type pulse     }      Pulseaudio is setup to use jack as source and sink. Jack uses a firewire mixing console as soundcard. And in case it matters, I have an nvidia graphics card (GeForce 8800 GT) with the proprietary drivers from nvidia (NVIDIA-Linux-x86-310.40) . **Symptoms** Sound from vlc or celementine works flawlessly. I believe these talk to pulseaudio directly. Using mplayer I can choose between `-ao` `alsa` `pulse` and `jack` and all work okay.So I have no reason to believe there is anything wrong on the tail end of the chain, i.e. pulse->jack->firewire. But also aplay works fine, which I believe, must go through the alsa layer to access pulse. Skype and especially flashplayer produce choppy sound, as if the samplerate were not right and the system has to jump a number of samples back or forth every half second or so. Flash shows this behavior not just in Firefox, but also in Chrome. Skype sometimes works okay, i.e. when I kill and restart it I can get it to work. **Analyses so far** I have compared the output of `pactl list` when playing from aplay, firefox or skype and could not see any clues. My sample-rate seems to be 44100 and Skype comes in with 44800 so pactl shows that a `speex-float-3` resampling is happening. But I can aplay wave files with 44100 and 48000, so my original hunch, that resampling is causing the problems is probably not right. I also compared the `ldd` output of aplay and skype and skype uses the same shared libraries as aplay, plus of course some more. I have tried to use the alsa jack plugin, such that alsa talks directly to jack, bypassing pulse, but then flash playback stops producing sound after a few seconds. CPU usage is high when playing flash               16494 23.6 478m     1 martin    1000 1 S  20   0   58 firefox     14797  4.7  95m  4097 root         0 1 S  20   0   11 xorg     15979  5.1 103m 15806 martin    1000 1 S  20   0    7 jackd     25561  8.5 172m     1 martin    1000 0 S   9 -11    5 pulseaudio     25534  4.1  82m 17830 martin    1000 0 S  20   0    2 skype      `dmesg` occasionally shows               pulseaudio[15996]: segfault at 0 ip b256416a sp bfe34d40 error 4 in module-jack-sink.so[b2562000+4000]      This is certainly "not good", but pulseaudio gets restarted okay when needed There is nothing in /var/log/messages or .xsession-error or on stdout/stderr of firefox or chrome. Any help would be much appreciated. I would also be happy about pointers, where to look next or what to google. The strange thing is, that not many seem to have this problem.


Configuring Apache to Require a Client Certificate

I want to implement mutual authentication (two - way ) with apache web server. **References** :   1.Failed to sign CSR with the CA root key   2.Firefox error message when adding client certificate signed by CA after many steps :   1. Configuring Apache 2.0 SSL to accept https by editing ssl.conf .   2. Creating a Certificate Authority using OpenSSL & importing it to the web browser [link]   3. Creating a Web Server Certificate & sign it by CA & put it as apache certificate.[link]   4. Creating a Client Certificate & sign it by CA & export it as PKCS#12 format [link]& import it to web browser  I now have an access with https to the server but for all users .   I want just the authorized users who I gave them a signed certificate by CA to access to web pages on my server . I needed to edit ssl.conf in `/etc/httpd/conf.d/ssl.conf` following this tutorial , I did this to ssl.conf :               SSLVerifyClient require     SSLVerifyDepth 2      **Update#1 :** and of course I had set the certificate to the signed one by CA :               #   Server Certificate:     #SSLCertificateFile /etc/pki/tls/certs/localhost.crt     SSLCertificateFile /var/www/sslConf/server.crt     #   Server Private Key:     #SSLCertificateKeyFile /etc/pki/tls/private/localhost.key     SSLCertificateKeyFile /var/www/sslConf/server.key      and as a result I got this message and after pressing ok this message (in firefox). what's the mistake I had committed ?


Failed to boot a fresh FreeBSD 8.2 installation on an Intel SS4200-EHW

I've installed FreeBSD on an Intel SS4200-EHW which has four hard disks and a flash DOM (Disk On Module) disk through an IDE interface. I want to install FreeBSD on the Flash DOM. In order to get the FreeBSD installer to find the Flash DOM, I've used the hints from here - by adding the following "hints" before "booting" the installer:               set hint.ata.0.at="isa"     set hint.ata.0.port="0x1F0"     set hint.ata.0.irq="14"      The installer finds the correct disk and installs without any issues. I also made sure the disk/partition is set with the bootable flag. When I boot from the Flash DOM, I get the following error message: "No ufs" and end up with a prompt starting with "boot:". Not sure why this is. Might be that I wasn't able to persist the hint information to any configurations files during the install. Anyone knowing how I can ensure that this get persisted. Any other way to get further to diagnose this issue? **Update** Based on feedback I've included the boot image I am stranded at:![Boot screen image](http://i.stack.imgur.com/wrO9A.jpg) The "tab" key doesn't work. Also I booted PC-BSD to try to edit the files from there and I'm able to mount all other partitions except the boot partition. The image below shows error message when trying to access the MBR partition: ![PC-BSD file browser which shows mounted partitions and the failed partition](http://i.stack.imgur.com/Ph0OP.png)


Whole program name not visible in nethogs

I'm using the command `sudo nethogs` to watch network traffic. I have a problem in that the name of the program is too long (it doesn't fit in the PROGRAM column). I haven't found any nethogs configuration switch dealing with this issue. Do you know how to see the whole name of the process?


Using grep with symbolic link

I don't know how to ask this, but let me explain. I have a text file (named `bla`) in my `~/user/Dropbox` folder. I would like to `grep` on it from any folder in terminal. For example, I'd like just type `grep 'foo' bla` instead of going to `~/user/Dropbox` to look for. I believe that some symbolic link could help. Any idea?


File manager multifunction on openbox

I've just installed ArchLinux with only OpenBox, I need a file manager and a programme to manage the icons on the desktop. I read that PacManFM can do that, which other filemanager can do each task together?


How can I replace text after a specific word using sed?

I have a file named `.ignore`. In need to replace the `projdir`. For example:               ignore \..*     ignore README     projdir Snake      I need to replace Snake with, for example, "PacMan". I read the man page, but I have no idea what to do.


I installed the Python bindings of VTK 5.1 correctly. In Python, `import vtk` worked, but `import itk` did not work yet. So I wanted to install the Python bindings of ITK 4.2. I needed to install SWIG 2.0.7, and from the error message which arose during `./configure` in the SWIG source directory, I understood I needed to install `pcre`. So I chose the version 8.31 of pcre. Here is a summary of the process: > (VTK + Python) ---> This works. > > (ITK + Python) ---> SWIG needed ---> pcre needed **Now that pcre is installed, my problem is yum has stopped working:**               [root@wok build]# yum     There was a problem importing one of the Python modules     required to run yum. The error leading to this problem was:             libvtkIOPythonD.so.5.10: cannot open shared object file: No such file or directory          Please install a package which provides this module, or     verify that the module is installed correctly.          It's possible that the above module doesn't match the     current version of Python, which is:     2.7 (r27:82500, Sep 16 2010, 18:02:00)      [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)]          If you cannot solve this problem yourself, please go to      the yum faq at:       http://yum.baseurl.org/wiki/Faq      * * * **I wonder if I should add variables to the PATH.** Maybe it is related to a problem I had with SWIG: it worked as a user but not as root.               wok ~ $ swig -swiglib     /usr/local/share/swig/2.0.7          [root@wok home]# swig -swiglib     swig: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory      I had to add one line to .bashrc of the root user to make swig work with both the user and the root:               export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/      * * * **There could be something with the Python path.** In Python, I noticed I could `import vtk` as a user, but not as root.               wok ~ $ python     Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)      [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2     Type "help", "copyright", "credits" or "license" for more information.     >>> import vtk     >>>       but:               [root@wok ~]# python     Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)      [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2     Type "help", "copyright", "credits" or "license" for more information.     >>> import vtk     Traceback (most recent call last):       File "<stdin>", line 1, in <module>       File "/user/wok/home/Softwares/VTK_5.1/build/Wrapping/Python/vtk/__init__.py", line 41, in <module>         from vtkCommonPython import *     ImportError: libvtkCommonPythonD.so.5.10: cannot open shared object file: No such file or directory      * * * PCRE seems to me to be installed correctly:               [root@wok build]# pcretest -C     PCRE version 8.31 2012-07-06     Compiled with       8-bit support only       No UTF-8 support       No Unicode properties support       No just-in-time compiler support       Newline sequence is LF       \R matches all Unicode newlines       Internal link size = 2       POSIX malloc threshold = 10       Default match limit = 10000000       Default recursion depth limit = 10000000       Match recursion uses stack      and               [root@wok build]# locate libpcre     /lib64/libpcre.so.0     /lib64/libpcre.so.0.0.1     /usr/lib64/libpcrecpp.so.0     /usr/lib64/libpcrecpp.so.0.0.0     /usr/lib64/libpcreposix.so.0     /usr/lib64/libpcreposix.so.0.0.0


How can I track who SSH'es into my linux machine?

I'm running Ubuntu 10.04. Is there a way I can get a daily report of who has logged onto the box, what time, and even - this may be asking too much - a report of the commands they used? This is a low-usage box and so I think this would be a nice way to see what activity is happening on it. Along these same lines, I heard it was not possible to track when things are done on the box via non-interactive shells, such as rsync or just remotely executing single commands via ssh. Is that true, or is there a way to log and track this as well?


Unable to uninstall libglib2.0-0 from Software Center

I have a fresh install of Debian 6.0.5 (i386) on VMware Player. I was trying to install libglib2.0-0 using this command:               sudo aptitude install libglib2.0-0      Unfortunately, I don't remember the exact output from the terminal but I remember there were 0 bytes installed or something. I'm guessing it didn't install correctly, so I want to remove it and try installing from the Software Center instead. However, when I click on remove, it just "greys out" and nothing happens. How do I uninstall it? Is there a command that could remove it from the terminal? EDIT: The output of:               dpkg -l 'libglib2.0-0'          root@vmware:/home/mohamed# dpkg -l 'libglib2.0-0'     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name           Version        Description     +++-==============-==============-============================================     ii  libglib2.0-0   2.24.2-1       The GLib library of C routines     root@vmware:/home/mohamed#


ArchLinux how to setup English Language with german keyboardlayout

Can anyone explain me how to setup up ArchLinux to be completely in English except for the KeyboardLayout? (it should be de-latin1-nodeadkeys)


How do I scan grayscale with simple-scan?

I really like `simple-scan` because:   1. It's really simple   2. It has an interface that fits with GNOME setup on Debian (unlike Skanlite)  However, I can't seem to be able to set it to scan in grayscale. How can I do this? The two options, `photo` and `text` seem to serve as _colour_ and _B &W_ respectively, which is a problem when I want to scan documents with a high level of detail but without colour (I scan a lot of documents and storage becomes an issue). Anyway, I realise that the ideal solution would be to use a proper scanning tool, but since I'm really just after exactly what `simple-scan` offers with one tiny extra feature I thought I'd ask in case someone knew how to set this up (maybe I can add a "grayscale" profile to the list?)


dual boot solaris with ubuntu?

I have installed Solaris on my x86 machine (taking 100gb of 500gb). Now I have installed Ubuntu on the system (in another 100gb). I want to make primary OS as Solaris. I know setting have to be done in `/boot/grub/menu.lst`, but what is the actual command to be updated? When I restart the system after updating the menu file it shows only Solaris menu and no Ubuntu options.


How to enable quotas in the fstab file?

I want to enable quotas. My fstab currently has:               # <file system> <mount point>   <type>  <options>       <dump>  <pass>     proc            /proc           proc    nodev,noexec,nosuid 0       0     # / was on /dev/sda1 during installation     UUID=97439827-cdb6-4406-8403-76ab1de7a3b0 /               ext4    errors=remount-ro 0       1     # swap was on /dev/sda5 during installation     UUID=194bd177-cba0-415d-b45d-bd87b7bf446e none            swap    sw              0       0     durrantm:~/Dropbox/96_2013/work/code     $       If I want to add `usrquota,grpquota` to enable user and group quotas, do I put them after `errors=remount-rov`, e.g. `errors=remount-rov,usrquota,grpquota`


Remote for-loop over SSH

I have the following in a script               for server in ${servers[@]}; do      echo ${server}      ssh user@${server} "for i in /tmp/foo* ; do echo ${i}; done"     done      But it doesn't work. Weird thing, I see $I amount of return lines. So if I have ten files, I see ten blank lines.


How to keep upstart installed-always, don't be replaced by sysvinit?

Each time I do `apt-get dist-upgrade`, the package `sysvinit` comes back and replaced `upstart`. Well, I have some scripts written for upstart, and I need to reinstall it every time (typing the annoying confirmation `Yes, do as I say!`) How can I flag it as a solid rock choice, so it won't be replaced forever?


Raspberry Pi, serial console, minicom, and gnome-terminal

I'm trying to access my raspberry pi via its serial console on the gpio pins. It's working fine through a USB-3.3v serial dongle. However, there's a problem with long lines and long screens not displaying correctly. I'm running minicom in a gnome-terminal which is not set to 24x80 columns (and gnome-terminal's Terminal/1 (24x80) option) doesn't help. It's as if minicom completely ignores the sigwinch it must be getting, and/or has no way to send that over the serial line to change the terminal type.


What Windows-related files are valueless to *nix users?

I have accumulated, from my time using Windows a good quantity of held-over filesystem copies and archives of system and data drives. I am trying to distill them down to the usable parts while discarding everything that is likely to be valueless. From watching a bunch of said files scroll by while copying, once again, from a holding drive to a work drive I think I've got a starter list of "good" and "useless" files started, but I was wondering if there is any authoritative kind of list of files (coming from a previously Windows environment) that should be discarded immediately as unuseful? **Winners:** (I know this list would likely turn into a mess if any effort were made to make it comprehensive, so these aren't what I'm looking for, unless they would likely be surrounded by crap that might get them destroyed inadvertently) ( _edit: If the ONLY way is a super-comprehensive white-list- based method, so be it. I'd prefer if that weren't the case, but beggars can't be choosers... most of the time._ )               *.tar.*, *.rar, *.zip     *.mp(e)g, *.avi, *.mkv, *.wmv, *.asf      **Losers:** (These are what I'm really looking for)               *.exe, *.bat, *.dll, *.com, *.lnk      I also know there will be exceptions. Like installer .exe files, used to install something in Wine. For purposes of this question, this concern isn't one. All the files in question are copies (of copies, possibly of even more copies), so the installers I really want to keep are somewhere nice, safe, and probably write-protected.


Allowing a domain name in my IP Tables

I have a Linux server that gets a time offset for some strange reason. I set up cron job to run and update the time using the following command:               /usr/sbin/ntpdate pool.ntp.org      The problem is the command would not run because I have a firewall (iptables). I have always used IP to allow traffic in my network:               iptables -A INPUT -p tcp -m tcp -i eth0 -s 11.11.11.11 --dport 5060 -j ACCEPT      I would like to know how to do it using a domain name in this case would be `pool.ntp.org`, or maybe someone could tell me a better way to keep the clocks in sync.


Show human readable file size in du

I'm using this command to determine which directory is eating my disk.               du -sk * | sort -n      How can I get human readable result form `du` for file sizes? I've checked `man` and all it have is `-k` flag which turns byte results to kilobyte results. I need results in gigabytes


Permissions in Ext4 Truecrypt Drive

I just used the Truecrypt GUI to encrypt my entire USB hard drive (currently /dev/sdb). I formatted it to ext4. Now, I can mount it in my home directory with the command > truecrypt --mount /dev/sdb USB-Device For some reason I don't have read/write permission. So my question is: How do I get read/write permission? Is it a drive-specific issue, or a system issue? It wouldn't surprise me if there was just a group I had to add my user account to. Additionally, I'm running Arch Linux, but I'm pretty sure that's not entirely relevant.


How to re-size virtual disk with installed Linux system?

I've got hard system configuration there and I don't want to re-install it again but I need more space now. Current system space is 30GB. Seems like it's not possible to re-size disk so what I need is to re-init my system on new disk and here I have some questions.   * I will copy all the data to host machine first (windows), is it safe, can I lost data (break symlinks) by doing this?   * I just make same partitions with same filesystems and move data there - is it enough?   * grub:2 is installed on special partition (EF02 GPT code) - is it movable?   * Is there another ways to make such transfer or virtual drive re-size?


How to tell xfce (or an application) where to put the window when starting?

I have a number of different boxes, all running debian and xfce. When I launch multiple applications (specifically xterm windows) on one machine, they end up all in the center of the desktop, and they are laid out next to each other on some other machines. I prefer them to be put next to each other when I launch them. ... but I haven't been able to figure out if and where I can configure what happens. Reading this makes me think I should be able to set an appropriate option - but what is it? Note: On the particular box that annoys me by launching each xterm window right in the center of the desktop, mouspad (the editor) gets launched in all four corners of the screen (better than center, but not as good as the windows being next to each other).


Making CodeBlocks work with Terminator?

I want to make the programs compiled by Codeblocks, run the shell program 'Terminator'. So I went into Environment Settings > Terminal to launch console programs, the default value is `xterm -T $TITLE -e` so I replaced it with `/usr/bin/terminator -T $TITLE -e` but when I compile the program doesn't run... How can I do it?


Mount a folder on a drive in fstab. Move?

I'd like to make a temporary change to my `fstab` file so that my `/home` is on another drive. However, I don't want the whole partition to be mounted, but just a folder ("home") on that partition. I'm OK with the rest of the data being unavailable. What's the canonical way of expressing this in `fstab`? I can't think of a way to do it in one command (as I can't reference a folder on a filesystem I haven't mounted). I think I should do a first mount and then move the folder to `/home`. But I don't know if I can do a move in `fstab`, haven't found it in `man` (and I don't feel like trying blindly because I only have ssh access to the machine right now). For now I have a bind mount in `fstab`:               /dev/sdd1 /mnt/temphome ntfs defaults,errors=remount-ro 0 2     /mnt/temphome/home /home none bind      However this leaves `/dev/sdd1` mounted in both points. To summarize:   * can I do a move mount operation in `fstab` and if yes, then how?   * is that the right approach and if not, what is? Thanks in advance.


if an exploit is affecting MS office does it affect also LibreOffice?

This question is really annoying me a lot and I want a reasonable, certain, logical... response for it


Kill all descendant processes

I'm writing an application. It has the ability to spawn various external processes. When the application closes, I want any processes it has spawned to be killed. Sounds easy enough, right? Look up my PID, and recursively walk the process tree, killing everything in sight, bottom-up style. Except that this doesn't _work_. In one specific case, I spawn `foo`, but `foo` just spawns `bar` and then immediately exits, leaving `bar` running. There is now _no record_ of the fact that `bar` was once part of the application's process tree. And hence, the application has no way of knowing that it should kill `bar`. I'm pretty sure I can't be the first person on Earth to try to do this. So what's the standard solution? I guess really I'm looking for some way to "tag" a process in such a way that any process it spawns will unconditionally inherit the same tag. (So far, the best I can come up with is running the application as a different user. That way, you can just indescriminently kill all processes beloning to that user. But this has all sorts of access permission problems...)


Linux-compatible 56k modem

I have a client who wants to set up a fax server in their office. I'd like to use HylaFAX under Ubuntu, but I'm a little shy to spend money on hardware for Linux, particularly a modem given the whole Winmodem issue. So to ask two different questions in the same post: First, **what are the most reliable ways to tell if a modem is supported in modern releases of Linux?** It's nice when a manufacturer specifically mentions Linux support. Failing that, do you check the kernel docs? Chipset type? Other keywords on the modem's spec sheet? Second, **what specific modem would you recommend?**


How to Mount Western Digital external hard drive

I am using Debian. I cannot mount Western Digital My Passport Ultra on my system. I have tried `sudo mount /dev/sdbx /media/hdd`. It worked fine for me. But the problem is that I have to repeat this process every time I restart my system. And it is hard for my friends to mount it on their Linux machine as well. _(works fine on Windows!)_ Why is it not mounting automatically even after reformatting the drive to `NTFS` from Linux? What is the permanent solution?


How to redirect sqlite3 output to a file

I installed `sqlite3` and want to use it to recover information from `stylish.sqlite` which is located in my Firefox profile folder and is generated by the Stylish extension:               $ cd ~/.mozilla/firefox/w4wcp85s.default     $ sqlite3 stylish.sqlite     SQLite version 3.7.17 2013-05-20 00:56:22     Enter ".help" for instructions     Enter SQL statements terminated with a ";"     sqlite> .tables     style_meta  styles     sqlite> SELECT * FROM styles;     6||||YouTube|/* AGENT_SHEET */      /* ▓▓ NIGHTSHIFT - eye care:                                 ▓▓        ▓▓_http://userstyles.org/styles/18192/nightshift-eye-care_▓▓ */          @namespace url(http://www.w3.org/1999/xhtml);     @-moz-document regexp("https?://www.youtube.com/.*")  {     body,html {min-height: 100%!important; }     html, body{background-color:#111!important}     body>*:not(:empty){background-color:#222!important}     body>*>*:not(:empty){background-color:#222!important}     body>*>*>*:not(:empty){background-color:#282828!important}     ...       My question is this: how can I capture the output of `sqlite> SELECT * FROM styles;` to a file? (I know I can select the output in the terminal and copy it to a file.)


vim spell checker?

Is there a way to spell check a file using vim?


Vim: Exit single character replace mode with <C-C> when using `nnoremap <C-C> <silent> <C-C>`

I've become far too trained to use `<C-C>` to return to normal mode. I understand there is a difference between `<C-C>` and `<ESC>` but that's beside the point of this question. I use the mapping `nnoremap <C-C> <silent> <C-C>` so I don't see the message "Type :quit<Enter> to exit vim" when pressing `<C-C>` in normal mode. When in normal mode and pressing `r` I can't cancel with `<C-C>`, instead it will just insert the non printable character. Is there a way to change this behavior?


Possible to Host LAMP VirtualBox for Internet Site

Can someone explain briefly, or point me to, how to host a LAMP server on a Linux-based VirtualBox (Oracle) such at the web site on the VB are accessible to the outside world? The Host itself would be a windows machine that is connected to the internet through cable modem. I'm already familiar with using VirtualBox as a development LAMP. But, the networking aspects of how this works are what I am asking about.


Count in real time the output lines from another output command

I think what I want to do is very easy, but I can not find a way to do that: If I put this command:               [root@:Active] tmp # tcpdump -i any -s 65535 host 192.168.1.110 and port 1645 or port 1813 -v     -X | grep -o 'Start'     Start     Start     ...     ...     ...     Start     Start     10047 packets captured     10046 packets received by filter     0 packets dropped by kernel      I got a lot of Start coincidence, but I only want to count how many "Start" is actually showing in the shell (meanwhile the tcpdump command is running). I try adding wc -l:               [root@:Active] tmp # tcpdump -i any -s 65535 host 192.168.1.110 and port 1645 or port 1813 -v     -X | grep -o 'Start' | wc -l     tcpdump: listening on any, link-type EN10MB (Ethernet), capture size 65535 bytes      But still nothing, I don't want to save a file with the output of tcpdump and then count, just count the output lines that already is showing, in real time. Also I try some combination with xargs, but still fail counting. I think "wc -l" "grep -c" and similar commands needs a file to point and count, but I don't know where in the memory the output from tcpdump is storage. If you have any clever ideas will be appreciate it :D. I still think that I'm missing some silly things, the lines already are showing in the shell, I just need to count how many are they, without saving any file or stopping the tcpdump. Meanwhile I will keep trying, some friend told me with AWK language I can do this. Greetings to all.


Wildcards in aptitude

I want to do something like               aptitude -P install mypackage*      which should install all packages which start with "mypackage". How can I do this with `aptitude`?


Backup selinux system running strict

I have a cron job that is backing up a SELinux system running in strict mode. The problem is that SELinux wants to deny access to to the backup script since it wants access to every single file on the filesystem (and all the contexts on those files). I'm running in permissive mode right now so the script works, but I would like to turn permissive mode off.               kernel: [1491196.754521] type=1400 audit(1325232096.275:12572): avc:  denied  { read open } for  pid=24642 comm="xfsdump" name="init.d" dev=dm-1 ino=268794309 scontext=root:sysadm_r:cronjob_t tcontext=system_u:object_r:initrc_state_t tclass=dir      Running the script as unconfined_t doesnt work as it seems unconfined_t is not allowed when running the strict policy. The backup is being performed by taking an LVM snapshot of root, mounting that snapshot, and then doing an xfsdump. It also backs up the /boot partition (ext2) into a tarball. What is the proper way to perform such a backup?   Is there a way to mount the filesystem where the file contexts can be backed up, but will not be enforced? But also for academic purposes, if I want to back up a system where such a mount isnt possible (already mounted and not possible to remount), how would that be accomplished?


What FreeBSD should I install if I use Intel Pentium 4

I have Pentium 4 and I want to install FreeBSD with Xfce. What distribution should I download?


How can I see dmesg output as it changes?

I'm writing a device driver that prints error message into _ring buffer_ dmesg output. I want to see the output of `dmesg` as it changes. How can I do this?


Can a file be retrieved by its inode?

Run command like the following:               $ln a b     $ls -i a b     523669 a 523669 b     $rm -f a     $ls -i b     523669 b      I concluded from this test that command `rm` actually removes the filename (`a` in this test) only instead of the file, as the inode still exists and could be retrieved through another filename ( `b` ). My question is, if a file is harded linked to only one filename, when `rm` is executed to the file, is the real file ( ie, the inode ) removed thoroughly. And if not, can a file inode be retrieved without a filename and only though the inode?


xDebug compatible PHP editor/IDE for LXDE

Which PHP editor/IDE supports line by line debugging using xdebug on LXDE?


working with filenames in a different encoding over ssh

I'm ssh'ing to a remote system where a different encoding for the filenames (and for the users' locales) has been used. And this causes some problems. ### Problems solved by matching the locale settings Before I move to the problems with filenames, I want to say that some encoding problems with such an ssh session are solved by setting the remote locale so that it matches the local locale, namely,   * the problems with editing the command line (I pressed Backspace trice, but since on my host the encoding is UTF-8, and on the remote end -- KOI8-R, or perhaps CP1251, some 8-bit Cyrillic encodings, this didn't affect my Cyrillic string correctly):               [imz@localhost ~]$ locale     LANG=ru_RU.UTF-8     LC_CTYPE="ru_RU.UTF-8"     LC_NUMERIC="ru_RU.UTF-8"     LC_TIME="ru_RU.UTF-8"     LC_COLLATE="ru_RU.UTF-8"     LC_MONETARY="ru_RU.UTF-8"     LC_MESSAGES="ru_RU.UTF-8"     LC_PAPER="ru_RU.UTF-8"     LC_NAME="ru_RU.UTF-8"     LC_ADDRESS="ru_RU.UTF-8"     LC_TELEPHONE="ru_RU.UTF-8"     LC_MEASUREMENT="ru_RU.UTF-8"     LC_IDENTIFICATION="ru_RU.UTF-8"     LC_ALL=     [imz@localhost ~]$ echo привет     привет     [imz@localhost ~]$ echo при     при     [imz@localhost ~]$ ssh -vv ivan@example.com     Last login: Fri Nov 25 13:44:56 2011 from NN.NN.NN.NN     [ivan@dell ~]$ locale     LANG=ru_RU.KOI8-R     LC_CTYPE="ru_RU.KOI8-R"     LC_NUMERIC="ru_RU.KOI8-R"     LC_TIME="ru_RU.KOI8-R"     LC_COLLATE="ru_RU.KOI8-R"     LC_MONETARY="ru_RU.KOI8-R"     LC_MESSAGES=POSIX     LC_PAPER="ru_RU.KOI8-R"     LC_NAME="ru_RU.KOI8-R"     LC_ADDRESS="ru_RU.KOI8-R"     LC_TELEPHONE="ru_RU.KOI8-R"     LC_MEASUREMENT="ru_RU.KOI8-R"     LC_IDENTIFICATION="ru_RU.KOI8-R"     LC_ALL=     [ivan@dell ~]$ echo привет     привет     [ivan@dell ~]$ echo при        привÐ     [ivan@dell ~]$ export LANG=ru_RU.UTF-8     [ivan@dell ~]$ echo привет     привет     [ivan@dell ~]$ echo при     при     [ivan@dell ~]$         * the problem with correct understanding of case-insensitivity for the strings processed; now it would work, after I set the locale:               [ivan@dell ~]$ echo привет | fgrep -i ВЕТ     привет     [ivan@dell ~]$       but this wouldn't work before. ### Minor problems with filenames The utilities that print out filenames (which, as you remember, are stored remotely in a different encoding) wouldn't print them verbatim, but they susbstitute question marks for the foreign characters:               [ivan@dell ~]$ find ~mama/Desktop/ -iname '*.xls'     /home/mama/Desktop/????????? ????????.xls     /home/mama/Desktop/???????? ??? ???????????? (1).xls     /home/mama/Desktop/???????? ??? ???????????? (2).xls     /home/mama/Desktop/???????? ??? ???????????? (3).xls     /home/mama/Desktop/???????? ??? ????????????.xls     [ivan@dell ~]$ find ~mama/Desktop/ -iname '*.xls' -print     /home/mama/Desktop/????????? ????????.xls     /home/mama/Desktop/???????? ??? ???????????? (1).xls     /home/mama/Desktop/???????? ??? ???????????? (2).xls     /home/mama/Desktop/???????? ??? ???????????? (3).xls     /home/mama/Desktop/???????? ??? ????????????.xls     [ivan@dell ~]$       The same problem is exhibited by `ls`, and so on. But this can be easily overcome by passing them as strings to printing commands (that are not aware of the issue with non-matching encodings of the filenames and of the terminal --or for whatever reason, but it works):               [ivan@dell ~]$ find ~mama/Desktop/ -iname '*.xls' -print0 | xargs -0 -n 1 echo      /home/mama/Desktop/Êðåäèòíûé ïîðòôåëü.xls     /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (1).xls     /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (2).xls     /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (3).xls     /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé.xls     [ivan@dell ~]$       Also, the fact that they are unreadable wasn't very annoying, because I could always append an `| recode -f cp1251..utf-8` at the end of the command. ## The annoying problem The essential problem is that selecting (with a mouse) the filenames in the terminal and pasting them doesn't work:               [ivan@dell ~]$ diff '/home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (1).xls' '/home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (3).xls'     diff: /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (1).xls: No such file or directory     diff: /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (3).xls: No such file or directory     [ivan@dell ~]$       I've noticed an escaped representation of the filenames in the output of `stat`, so I was able to select and paste it (inside `$''` in _bash_ ):               [ivan@dell ~]$ diff '/home/mama/Desktop/\300\304\320\305\321\300\322\333 \344\353\377 \357\356\347\344\360\340\342\353\345\355\350\351 (1).xls' '/home/mama/Desktop/\300\304\320\305\321\300\322\333 \344\353\377 \357\356\347\344\360\340\342\353\345\355\350\351 (3).xls'     diff: /home/mama/Desktop/\300\304\320\305\321\300\322\333 \344\353\377 \357\356\347\344\360\340\342\353\345\355\350\351 (1).xls: No such file or directory     diff: /home/mama/Desktop/\300\304\320\305\321\300\322\333 \344\353\377 \357\356\347\344\360\340\342\353\345\355\350\351 (3).xls: No such file or directory     [ivan@dell ~]$ diff $'/home/mama/Desktop/\300\304\320\305\321\300\322\333 \344\353\377 \357\356\347\344\360\340\342\353\345\355\350\351 (1).xls' $'/home/mama/Desktop/\300\304\320\305\321\300\322\333 \344\353\377 \357\356\347\344\360\340\342\353\345\355\350\351 (3).xls'     Files /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (1).xls and /home/mama/Desktop/ÀÄÐÅÑÀÒÛ äëÿ ïîçäðàâëåíèé (3).xls differ     [ivan@dell ~]$       So, the question is: > How to conveniently work with remote filenames (over _ssh_ ), which are in a > different encoding? It would be nice if they were readable, and selectable and pastable (and also typable by me from the keyboard and then completable by Tab in _bash_ ; to be typable by me conveniently, they must be readable, of course). I'm working in _urxvt_ in _X.org_ on _Linux_ on the local host, and it's _bash_ on _Linux_ at the remote end.


How long system has been awake / running / since restart

First and foremost I want to know how long my laptop (unix, apple, OSX 10.9 mavericks) has been 'awake' (i.e. how long its been open, or since it last 'slept'). I' also be interested in how long since the last restart, and time since the last shutdown (if those two things can be differentiated). I've tried the `who` and `w` commands, which seem to show me time for the whole system, and for individual processes (terminals?) since the system last restarted. Is there a way to tell how long the system has been awake, explicitly?   Does the reported process times include sleep-time (i.e. when my laptop is closed)?   Is there a way to distinguish between restart and shutdown?


Can we change packages in Linux from scratch?

I've tried to compile Linux through Linux from scratch Version 7.5 and I can't compile some packages because as I realize and googled them, they have some bugs, for example I couldn't compile gcc 4.8. 2 but gcc 4.9. 1 compiled just fine so my questions are: Can I replace some of the packages with older or newer packages? Does it cause some issue in future?


Out-of-the-box openSUSE 12.3: Package webkit-sharp-devel not found

I installed openSUSE 12.3 and now want to install the package `gtk- sharp2-devel`:               $ sudo zypper install webkit-sharp-devel     Package 'webkit-sharp-devel' not found.      Strange since a Google request seems to show that this package is not unheard of on openSUSE. I am new to openSUSE, do I have to somehow "enable" devel packages?   Or has the package changed name? By the way, `sudo zypper search webkit | grep devel` does not return any sharp-related result, even though package `webkit-sharp` exists.


SELinux and samba

I have to set SELinux `setenforce Permissive` in order to give access to my samba share. I wonder if there is proper way to configure SELinux policy for fedora 17 as good admins do.


Run metacity without gnome-shell (gnome 3)

Hi how can i use metacity with composite manager without gnome-shell. I'm trying to do so in my custom xsession               #!/bin/bash     if test -z "$DBUS_SESSION_BUS_ADDRESS"; then     eval `dbus-launch --sh-syntax --exit-with-session`     fi          metacity --replace ccp & wmpid=$!     xsetroot -solid white &     sleep 1     if [ -f ~/.metacity-session ]; then     source ~/.metacity-session &     else     xterm &     fi     # Wait for WM     wait $wmpid      But I've got this in my ~/.xsession_errors               GNOME_KEYRING_CONTROL=/run/user/rumkin/keyring-Ar8I4j     SSH_AUTH_SOCK=/run/user/rumkin/keyring-Ar8I4j/ssh     GNOME_KEYRING_CONTROL=/run/user/rumkin/keyring-Ar8I4j     SSH_AUTH_SOCK=/run/user/rumkin/keyring-Ar8I4j/ssh     GNOME_KEYRING_CONTROL=/run/user/rumkin/keyring-Ar8I4j     SSH_AUTH_SOCK=/run/user/rumkin/keyring-Ar8I4j/ssh     GPG_AGENT_INFO=/run/user/rumkin/keyring-Ar8I4j/gpg:0:1     GNOME_KEYRING_CONTROL=/run/user/rumkin/keyring-Ar8I4j     SSH_AUTH_SOCK=/run/user/rumkin/keyring-Ar8I4j/ssh     GPG_AGENT_INFO=/run/user/rumkin/keyring-Ar8I4j/gpg:0:1     Initializing tracker-miner-fs...     Tracker-Message: Setting up monitor for changes to config file:'/home/rumkin/.config/tracker/tracker-miner-fs.cfg'     Starting log:       File:'/home/rumkin/.local/share/tracker/tracker-miner-fs.log'     Initializing tracker-store...     Tracker-Message: Setting up monitor for changes to config file:'/home/rumkin/.config/tracker/tracker-store.cfg'     Tracker-Message: Setting up monitor for changes to config file:'/home/rumkin/.config/tracker/tracker-store.cfg'     Starting log:       File:'/home/rumkin/.local/share/tracker/tracker-store.log'          (tracker-store:7825): Tracker-CRITICAL **: D-Bus service name:'org.freedesktop.Tracker1' is already taken, perhaps the daemon is already running?     Failed to play sound: File or data not found          ** (gnome-screensaver:7804): WARNING **: Config key not handled: disable-application-handlers          ** (gnome-screensaver:7804): WARNING **: Config key not handled: disable-command-line          ** (gnome-screensaver:7804): WARNING **: Config key not handled: disable-log-out          ** (gnome-screensaver:7804): WARNING **: Config key not handled: disable-print-setup          ** (gnome-screensaver:7804): WARNING **: Config key not handled: disable-printing          ** (gnome-screensaver:7804): WARNING **: Config key not handled: disable-save-to-disk          ** (seapplet:7809): WARNING **: Error showing notification: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `org.freedesktop.Notifications' on object at path /org/freedesktop/Notifications     Starting Dropbox...** Message: applet now removed from the notification area     Done!          (gnome-shell:7796): folks-WARNING **: Failed to find primary PersonaStore with type ID 'eds' and ID 'system'.     Individuals will not be linked properly and creating new links between Personas will not work.     The configured primary PersonaStore's backend may not be installed. If you are unsure, check with your distribution.     ** Message: applet now embedded in the notification area     Window manager warning: CurrentTime used to choose focus window; focus window may not be correct.     Window manager warning: Got a request to focus the no_focus_window with a timestamp of 0.  This shouldn't happen!     ** Message: Stopping applet secret agent because GNOME Shell appeared     Initializing nautilus-open-terminal extension     Initializing nautilus-dropbox 1.4.0          (rhythmbox:8172): GLib-GObject-CRITICAL **: g_value_get_uint: assertion `G_VALUE_HOLDS_UINT (value)' failed     Window manager warning: Log level 8: meta_window_raise: assertion `!window->override_redirect' failed     Window manager warning: Log level 8: meta_window_focus: assertion `!window->override_redirect' failed          (rhythmbox:8172): GLib-GObject-CRITICAL **: g_value_get_uint: assertion `G_VALUE_HOLDS_UINT (value)' failed     [8304:8329:0212/111557:ERROR:object_proxy.cc(608)] Failed to get name owner. Got org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.chromium.Mtpd': no such name     [8304:8329:0212/111557:ERROR:object_proxy.cc(608)] Failed to get name owner. Got org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.chromium.Mtpd': no such name     Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2800051 (linux - Ho)     Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.     Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2800051 (linux - Ho)     Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.     [8304:8304:0212/111558:ERROR:object_proxy.cc(513)] Failed to call method: org.chromium.Mtpd.EnumerateStorage: object_path= /org/chromium/Mtpd: org.freedesktop.DBus.Error.ServiceUnknown: The name org.chromium.Mtpd was not provided by any .service files     Created new window in existing browser session.          (rhythmbox:8172): GLib-GObject-CRITICAL **: g_value_get_uint: assertion `G_VALUE_HOLDS_UINT (value)' failed      Run on Fedora 17. What i've missed?


Del key in AIX ksh over PuTTY telnet

At the place where I work we're developing under AIX with ksh and connecting to it via `telnet`. Most people use ArcTel to connect, while I prefer PuTTY. The only problem I have with PuTTY is that the `Del` key isn't working - it prints `[3~` instead. The funny thing is that in ArcTel it _is_ functioning correctly. I tried looking at the ArcTel settings and there it only has one switch, called "Backspace and Delete": it can be either "normal" or "VNS-style". I have normal turned on (and Del works as expected). In PuTTY I tried playing around with the keyboard settings and couldn't find a combination that'd make `Del` do what I want it to do. Is there a way to make this work in PuTTY? Maybe remapping the `[3~` character in my `.profile`? I don't want to switch from Vi-mode in KSH though.


Unable to add ubuntu to windows domains? using centrify

I'm using this guide to add my linux (10.04 lucid) ubuntu machine to domain. First I tried using likewise, but couldn't do this apparently due to some compatibility issues with 10.04 kernel. I had downloaded the 25 Mb size centrify agent. I run the command using this command: `./install-express.sh` Everything works fine. As i stumble on these sets of input               Active Directory domain to join  : example.com     Active Directory authorized user : administrator     computer name                    : dev     container DN                     : Computers     domain controller name           : domain-controller.example.com      In container DN name i have found a vbscript on the internet which allows me to retrieve given user name DN. E.G.: DN: CN=George Jetson, OU=Vehicles, OU=Engineering, DC=YOURDOAMIN,DC=COM I enter Vehicles since this is the most specific of the OU definition. I'm doing this fine? Or i need to add like Vehicles.Engineering. ? Do i have to goto node level or just parent-node or sub-parent node. However, as I enter the domain user/password and I accept Y at the end. It goes through couple of checks it says (PASS) to all of them until i'm echohed with the error. Its related to krb5 or some kind of authentication. This error is also seen in `var/log/centrify.log` with error code 26. This is not an authentication error because I have tried it with giving wrong credentials and the output given then is of incorrect user/password. I want to know if I need to add some other packages of kerberos. Since I'm using backtrack 5 its not what you call a standard/Off the shelf ubuntu installation. Its most customized and built for security products integration. Please guide me in troubleshooting this problem.


Realize a multiseat system with a polarized 3D-monitor

Besides playing 3D-material, modern 3D-TV-sets (using polarization technology) offer the possibility of dual-play. While 3d-playback works with different polarization for the left and the right eye, with dual play 2 users can watch completely different 2d-material at the same time on the same screen. To make it work, each of the 2 users gets different glasses: one is horizontally polarized on both eyes, the other is only vertically polarized. By now, this technology is primarily used for 2 player games, to replace split screens. My idea is to use this technology for a multiseat system (I would prefer using Debian). For a multiseat-setup, one usually needs 2 keyboards, 2 mice, 2 video-cards and two screens, but when using a 3D-TV-set, one video card (and of course just one screen) should be sufficient. Therefore, apart from the "normal" setup of a multiseat system, the major difficulty would be to get the two different video-signals to the TV-set like if they were just one stereoscopic signal. One possibility would be to send the two signals side-by-side or over-under. So basically, the goal could be achieved with a setup like in this video but with display settings for a 3D-TV (and with a modern operating system, best would be debian with gnome 3). Finally, I want to add that I don't own a 3D-TV yet, therefore I cannot verify your answer. Still I would be glad if somebody could discuss the feasibility of such a system.


Broken libglib on debian 6

So, some time ago I wanted to update mpd from 1.5 to 1.6 which required a newer version of libglib( >= 2.31.8) on amd64, so I compiled them from source as I was on debian oldstable and couldn't find an easier way of doing that. For various reasons I didn't have access to that system again until now. When I tried to run mpd it gave me the following error:               mpd/usr/bin/mpd: symbol lookup error: /usr/bin/mpd: undefined symbol: g_malloc_n failed!      I tried reinstalling mpd but to no result, so then I tried to install the old libglib from the package manager this time. The installation didn't do much as it reported libglib to be the newest version and then when it tried to install some additional packages (such as libglib2.0-dev or libglib2.0-doc) it failed giving this error:               * Installing 1 assembly from libglib2.0-cil into Mono     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n     Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 144.     Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 113.     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n      So then I tried my luck with apt-get --reinstall libglib2.0 and the output was this:               Reading package lists... Done     Building dependency tree     Reading state information... Done     Note, selecting 'libglib2.0-0' for regex 'libglib2.0'     Note, selecting 'libglib2.0-dev' for regex 'libglib2.0'     Note, selecting 'libglib2.0-doc' for regex 'libglib2.0'     Note, selecting 'libglib2.0-cil' for regex 'libglib2.0'     Note, selecting 'libglib2.0-0-dbg' for regex 'libglib2.0'     Note, selecting 'libglib2.0-dbg' for regex 'libglib2.0'     Note, selecting 'libglib2.0-0-refdbg' for regex 'libglib2.0'     Note, selecting 'libglib2.0-data' for regex 'libglib2.0'     Note, selecting 'libglib2.0-cil-dev' for regex 'libglib2.0'     0 upgraded, 0 newly installed, 8 reinstalled, 0 to remove and 0 not upgraded.     7 not fully installed or removed.     Need to get 0 B/6,964 kB of archives.     After this operation, 0 B of additional disk space will be used.     (Reading database ... 55452 files and directories currently installed.)     Preparing to replace libglib2.0-0 2.24.2-1 (using .../libglib2.0-0_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-0 ...     Preparing to replace libglib2.0-data 2.24.2-1 (using .../libglib2.0-data_2.24.2-1_all.deb) ...     Unpacking replacement libglib2.0-data ...     Preparing to replace libglib2.0-dev 2.24.2-1 (using .../libglib2.0-dev_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-dev ...     Preparing to replace libglib2.0-doc 2.24.2-1 (using .../libglib2.0-doc_2.24.2-1_all.deb) ...     Unpacking replacement libglib2.0-doc ...     Preparing to replace libglib2.0-0-dbg 2.24.2-1 (using .../libglib2.0-0-dbg_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-0-dbg ...     Preparing to replace libglib2.0-0-refdbg 2.24.2-1 (using .../libglib2.0-0-refdbg_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-0-refdbg ...     Setting up mono-gac (2.6.7-5.1) ...     * Installing 1 assembly from libglib2.0-cil into Mono     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n     Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 144.     Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 113.     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n     E: installing Assembly /usr/lib/cli/glib-sharp-2.0/glib-sharp.dll failed     E: Installation of libglib2.0-cil with /usr/share/cli-common/runtimes.d/mono failed     dpkg: error processing mono-gac (--configure):      subprocess installed post-installation script returned error exit status 9     configured to not write apport reports                                           dpkg: dependency problems prevent configuration of mono-runtime:      mono-runtime depends on mono-gac (= 2.6.7-5.1); however:       Package mono-gac is not configured yet.     dpkg: error processing mono-runtime (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of libmono-corlib2.0-cil:      libmono-corlib2.0-cil depends on mono-runtime (>= 2.6.7); however:       Package mono-runtime is not configured yet.      libmono-corlib2.0-cil depends on mono-runtime (<< 2.6.8); however:       Package mono-runtime is not configured yet.     dpkg: error processing libmono-corlib2.0-cil (--configure):      dependency problems - leaving unconfigured     configured to not write apport reports                                           configured to not write apport reports                                                                                dpkg: dependency problems prevent configuration of libmono-system2.0-cil:      libmono-system2.0-cil depends on libmono-corlib2.0-cil (>= 2.6.3); however:       Package libmono-corlib2.0-cil is not configured yet.      libmono-system2.0-cil depends on mono-runtime (>= 2.6.7); however:       Package mono-runtime is not configured yet.      libmono-system2.0-cil depends on mono-runtime (<< 2.6.8); however:       Package mono-runtime is not configured yet.     dpkg: error processing libmono-system2.0-cil (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of libmono-posix2.0-cil:      libmono-posix2.0-cil depends on libmono-corlib2.0-cil (>= 2.6.3); however:       Package libmono-corlib2.0-cil is not configured yet.      libmono-posix2.0-cil depends on libmono-system2.0-cil (>= 2.6.3); however:       Package libmono-system2.0-cil is not configured yet.      libmono-posix2.0-cil depends on mono-runtime (>= 2.4); however:       Package mono-runtime is not configured yet.     dpkg: error processing libmono-posix2.0-cil (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of libglib2.0-cil:      libglib2.0-cil depends on libmono-corlib2.0-cil (>= 1.2.2.1); however:       Package libmono-corlib2.0-cil is not configured yet.      libglib2.0-cil depends on libmono-system2.0-cil (>= 2.4.3); however:       Package libmono-system2.0-cil is not configured yet.     dpkg: error processing libglib2.0-cil (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuraconfigured to not write apport reports                                                                                configured to not write apport reports                      configured to not write apport reports                                                            configured to not write apport reports                                                                                tion of libglib2.0-cil-dev:      libglib2.0-cil-dev depends on libglib2.0-cil (= 2.12.10-1); however:       Package libglib2.0-cil is not configured yet.     dpkg: error processing libglib2.0-cil-dev (--configure):      dependency problems - leaving unconfigured     Setting up libglib2.0-0 (2.24.2-1) ...     Setting up libglib2.0-data (2.24.2-1) ...     Setting up libglib2.0-dev (2.24.2-1) ...     Setting up libglib2.0-doc (2.24.2-1) ...     Setting up libglib2.0-0-dbg (2.24.2-1) ...     Setting up libglib2.0-0-refdbg (2.24.2-1) ...     Errors were encountered while processing:      mono-gac      mono-runtime      libmono-corlib2.0-cil      libmono-system2.0-cil      libmono-posix2.0-cil      libglib2.0-cil      libglib2.0-cil-dev     E: Sub-process /usr/bin/dpkg returned an error code (1)      apt-get check didn't find any broken deps so it didn't really help. Thankfully, nothing major seems to be broken. As I said, because there was quite some time since I compiled libglib I don't really remember what I did, and I'm not sure how to revert it.


Bash script to detect when my server is down or offline

Background : I need to receive an alert when my server is down. When the server is down, maybe the Sysload collector will not be able to send any alert. To receive an alert when the server is down, I have an external source (server) to detect it. Question : Is there any way (i prefer bash script) to detect when my server is down or offline and sends an alert message (Email + SMS)?


Shall I upgrade my OS from Ubuntu13.04 to Ubuntu13.10?

I am working on Ubuntu13.04. Now Ubuntu13.10 is available. So, I wanted your advice on what added features and advantages I may expect from the latest version. I read this link to know about the latest version. Below is an excerpt from the link: > The most important is, of course, the new Linux kernel 3.11.x, which is now > the latest stable version available at the time of the launch. It comes with > support for more devices and hardware components, better power management, > and a ton of other improvements. I had been getting error messages from Ubuntu13.04 and Ubuntu12.10 that my system has encountered an unexpected error. I wasn't ever able to get rid of this error message although I kept my system up-to-date by updating regularly. If I upgrade my system, this should be of my concern to check whether I'm able to get rid of this. Also the above link says that one can expect better performance from the latest release. Is there any time limit within which I can upgrade & post which my OS (Ubuntu13.04) can't be upgraded? Also I would like to ask if there is any advertisement or post from the company that would focus clearly on the performance of the latest release in contrast with the previous releases?


at and daylight saving time

Suppose I have added a task via `at -t` specifying the next day in my timezone. The next day my timezone changes as of daylight saving time. The question is whether the task will be executed correctly at expected time.


How do I stop bash from hanging when trying to start programmes while NFS is disrupted

I am currently experiencing a bug in Ubuntu 13.10 which means that when I resume my machine after a suspend, the network connections do not come back up. I have a couple of NFS mounts and because they are in a hung state, any time I try to run anything on the command line (eg. the workaround in that bug report: `nmcli cli sleep false`) the shell hangs. By "hang" I mean they are unresponsive to any signals (Ctrl-C, Ctrl-Z, kill, etc). When I use absolute paths (ieeg. `/usr/bin/nmcli`) it runs fine as expected. When I resume the network connection, all the hung processes come back to life and complete their execution. I'm confused as to why this happens. My current suspicion is that bash is attempting to search in one of the NFS mounted directories for the command I am trying to run. My `PATH` does not include any of the NFS mounted directories though. So my question is twofold: Why does the shell hang in this way and how can I stop it?


New webserver: What all user accounts should I create and permissions to provide for

This is a followup on my question here. I am setting up the first webserver and am fumbling with what user accounts to create and permissions to provide for better security. Below is what I have. For 2 developers, I have 2 accounts (and they are added to the supplementary group `devs`) and only they are allowed to ssh to the server. For the web application (Django based), I have created 1 normal user, `app` (haven't configured it as `\--system` user and belongs to group `app`) with shell access. The 2 developers, after ssh to the server, will su to `app` for any updates and starting/stopping the application. User `app` is not allowed to perform `su` (blocked by not adding to the group setting in `/etc/pam.d/su` using `pam_wheel.so`). I also have a 3rd account with no `su` capabilities for backup related tasks where a cron job will ssh and fetch log files, status, etc. Let me know if security aspects need to be made better. (PS: I am a novice here)


Can I connet to internet with one PC and give over LAN (switch) internet to other PC?

I currently have one computer (it's called `pc08` with Linux Mint 15) that is connected to the internet via WLAN. Now I want to install Arch Linux on another computer (lets call it `archiso`). I only have WLAN, but it seems to be quite difficult install Arch Linux with WLAN only. So I thought I could possibly provide a LAN internet connection like this:                -----------------------     | pc08                  |     | has internet by WLAN  |      -----------------------                 |                 |         --------------         | Switch      |          -------------                 |      -------------------------      | archiso               |      | has WLAN, but I cannot|      | connect               |       -----------------------      Is it possible to get an internet connection like this? If it is possible: What do I have to do on both computers? ## What I've done so far I think I have to set up a DHCP server on `pc08` while using the provided DHCP server from WLAN.   * I've installed isc-dhcp-server.   * Set `INTERFACES="eth0″` in `/etc/default/isc-dhcp-server`   * It seems as if I have to edit `/etc/dhcp/dhcpd.conf`, but I have no idea what are good options.


find does not work on symlinked path?

If I run this command `find $HOME/MySymlinkedPath -name "run*.sh"` nothing happens, and gives no error ('MySymlinkedPath' is a symlinked path to another hard drive other then my $HOME one). These also fails:               find ~/MySymlinkedPath -name "run*.sh"     find /home/MyUserName/MySymlinkedPath -name "run*.sh"      And just to make it sure, this non existant path fails (of course) `find $HOME/MySymlinkedPathDUMMYTEST -name "run*.sh"` so the path is being found (because that error does not happen) but `find` doesnt perform the search on it, and I am a lot clueless now... It only works if I `cd $HOME/MySymlinkedPath` first and remove the path reference like this `find -name "run*.sh"` but that is not good for my scripts... **An additional info** :   this command works as usual `ls $HOME/MySymlinkedPath/run*.sh`, and if I go there `cd $HOME/MySymlinkedPath` and run this `ls ..` the result is not what I was expecting; the list of the path where the symlinked path is located.. it returns the list of the real path on the another media/harddrive!!!               pwd -P     /media/MediaIdentifier/RealPath     pwd     /home/MyUser/MySymlinkedPath      **Re-thinking** :   Is this a problem with `find` and `ls`, or with my system? or it is expected and not a problem at all?? I am on Ubuntu 12.10. It fails on all terminals I tested so doesnt seems a terminal "problem".


Count the number of rows in each column of a text file

I have a text file with the following format: 5 3 1   2 3 4   .....   .....   i.e. space separated 3 columns of numbers/ However, some of the rows may be like:   2   3 1   So, I want to detect if the text file has any such inconsistencies and to print them out. How do I do this?


How can I make a shared directory accessible by SFTP?

I have set up an sftp account in `/home/sam`, created a group `sftp`, and added the user `sam` in it. i gave `chown sam:sftp /home/sam` for the user to perform operations in that directory. Now I have created another sftp account `tom` and I have to make him share the directory `/home/sam`. i.e., both `sam` and `tom` has to share the same directoy for common files. Now I can't give `chown tom:sftp on /home/sam`. How do I make the directoy `sam` shareable to both users?


Using exec and tee to redirect logs to stdout and a log file in the same time

In a bash script, how can I redirect all standard outputs to a log file and `tee` the output on the screen using `exec` ?               log_file="$HOME/logs/install.txt-`date +'%Y-%m-%d_%H-%M-%S'`"     [ -f "$log_file" ] || touch "$log_file"     exec 1>> $log_file 2>&1      This code redirect all the log to the log file but not to the screen .