How to enable Virtualization AMD-V Aspire one AO725 from BIOS or otherwise

I'm try to use the virtualbox to visualizer the system of 64bits but the error that get is:               La aceleración VT-x/AMD-V ha sido habilitada, pero no es funcional. Su sistema invitado de 64-bit fallára al detectar una CPU de 64-bit y no podrá arrancar.     Compruebe que VT-x/AMD-V están habilitadas en la BIOS de su computadora anfitrión.      _For the ones not knowing Spanish, google translate gives:_               VT-x/AMD-V acceleration has been enabled but is not functional.      Its system of 64-bit guest will fail to detect a 64-bit CPU and will not boot.     Check VT-x/AMD-V are enabled in the BIOS of your host computer.      I've checked the AMD V CPU Virtualization Extensions with the following command:               grep --color svm /proc/cpuinfo      The output is:               flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat              pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb              rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid perfmperf              pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm extapic              cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt arat cpb              hw_pstate npt lbrv svm_lock nrip_save pausefilter     flags  : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat              pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb              rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid              aperfmperf pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm              extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt              arat cpb hw_pstate npt lbrv svm_lock nrip_save pausefilter      Running the command `lscpu`               Architecture:          x86_64     CPU op-mode(s):        32-bit, 64-bit     Byte Order:            Little Endian     CPU(s):                2     On-line CPU(s) list:   0,1     Thread(s) per core:    1     Core(s) per socket:    2     Socket(s):             1     NUMA node(s):          1     Vendor ID:             AuthenticAMD     CPU family:            20     Model:                 2     Stepping:              0     CPU MHz:               800.000     BogoMIPS:              1996.36     Virtualization:        AMD-V     L1d cache:             32K     L1i cache:             32K     L2 cache:              512K     NUMA node0 CPU(s):     0,1      **Update** Run the command:               grep -o "^flags\s*:.*\ssvm\(\s\|$\)" /proc/cpuinfo      the output is:               flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm      flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm       so, It's possible fixed it's from the bios or otherwise. How to fix the mistake? Is it possible at all?


Where is CONFIG_APM in kernel - 2.6.38.8

From here: http://www.xenomai.org/documentation/xenomai-2.6/TROUBLESHOOTING > Q: Which CONFIG_* items are latency killers, and should be avoided ?   >  ...   >  APM: The APM model assigns power management control to the BIOS, and BIOS > code is never written with RT-latency in mind. If configured, APM routines > are invoked with SMI priority, which breaks the rule that adeos-ipipe must > be in charge of such things. DISABLE_SMI doesnt help here (more later). **The problem is that I am not able to find this APM thing anywhere.** ![enter image description here](http://i.stack.imgur.com/11SK9.png) ![enter image description here](http://i.stack.imgur.com/CXIv4.png) **"ACPI (Advanced Configuration and Power Interface) Support"** results in the following menu:                --- ACPI (Advanced Configuration and Power Interface) Support     [*]   Deprecated /proc/acpi files     [*]   Deprecated power /proc/acpi directories      <M>   ACPI 4.0 power meter      < >   EC read/write access through /sys/kernel/debug/ec (NEW)     [*]   Deprecated /proc/acpi/event support     <M>   AC Adapter     <M>   Battery     {M}   Button     {M}   Video     <M>   Fan     [*]   Dock     <M>   Processor     < >   IPMI (NEW)     <M>   Processor Aggregator     <M>   Thermal Zone     -*-   NUMA support     ()    Custom DSDT     Table file to include     [*]   Debug Statements     [ ]   Additionally enable ACPI function tracing     <M>   PCI slot detection driver     {M}   Container and Module Devices (EXPERIMENTAL)     <M>   Memory Hotplug     <M>   Smart Battery System     < >   Hardware Error Device (NEW)     [ ]   ACPI Platform Error Interface (APEI) (NEW)      Please help.


Filtering the Xth element in a row?

For example, I want to get **only the 3rd element** in each row when I call:               xinput --list --short|grep "slave  pointer"      I get the output:               ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]     ⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]     ⎜   ↳ MCE IR Keyboard/Mouse (ite-cir)           id=12   [slave  pointer  (2)]     ⎜   ↳ Logitech Unifying Device. Wireless PID:101a   id=14   [slave  pointer  (2)]      I would like to get only the names like "SynPS/2 Synaptics TouchPad", ... I saw somewhere a solution with awk and print somehow, but isn't there a simpler solution to achieve that **without** `awk` or `perl` or such?


How can I configure all dependencies before installation?

I'm new for FreeBSD and currently I'm installing many ports and many of them have a long list of dependencies, I'm tired of wait to finish the installation of one dependency to configure the installation of the next dependency. Is there a way to facilitate this task ?


Know which directory is "mount -o bind" by asking the kernel (Linux)

If I do `mount -o bind /my/dir /mnt/tmp`, I can see the content of `/my/dir` within `/mnt/temp`. However, if I type `cat /proc/mounts`, I get the following output:               /dev/sda7 /my ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0     /dev/sda7 /mnt/tmp ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0      As you can see, I know that `sda7` is the underlying device, but I don't know which directory within that filesystem is "mount bound" in `/mnt/temp`. How can I know that without typing `mount` which doesn't rely on the kernel but on `/etc/mtab`? **I'd like to get the information from the kernel itself.** **EDIT:** it would be nice if the solution could also work for directories bound _at mount time_ from `/etc/fstab` with this kind of line: `/my/dir /mnt/temp none bind 0 0`


vsftpd limit users to /home/user/minecraft

So using vsftpd I want to lock a user to `/home/theirname/Minecraft`. I can't change their home directory because a program I'm using(McMyAdmin) will try to reinstall itself but I don't want them having access to the programs configs.


Create release version using tar

I have a project with the usual stuff (source code, yadda, yadda) and I want to have a command to Scons (but it could be whatever build system to be honest) that will do the following:   1. Build the system -- this is easy.   2. Create a tar ball of the system -- this is easy.    3. When the content of the tar ball are extracted, they extract in a `fubar-VERSION/` directory -- this is the tricky part. I can do the latter manually by creating a symlink, then `tar`ing from one directory above the project one but that feel inelegant. Any idea? To clarify, I want to be able to do this:               ; pwd     ~/project     ; scons release     [...]     ; cp project-X.Y.Z.tbz /tmp     ; cd /tmp     ; tar jxvf project-X.Y.Z.tbz     ./project-X.Y.Z/[...]      Thus the archives extracts in a directory named after the project with the right version number.


Uninstall the Encrypted LVM function to remove the prompted password entry during Ubuntu Boot

When I installed Ubuntu 11.04 and I was offered the option of enabling "encrypted LVM" for my hard drive. After choosing that option, I am prompted for my password during boot to decrypt the LVM. Now, I am thinking about cancell/uninstall/remove "encrypted LVM' function as I don't want to input the "encrypted LVM" password every time when the system reboot. I know that you can setup a SSH to decrypt the LVM but that requires the installation of other programs. Is there a better/clean way to solve this problem like just uninstall the "encrypted LVM"? How to do it and this question is NOT specific to Ubuntu. Thanks.


How do I log into my Linux laptop if I have forgotten both the login and password?

How do I log into my Linux laptop if I have forgotten both the username and password?


Store passwords of Linux users in plain text - on purpose

I want to reset passwords temporarily to log in as root at least one time to change passwords. I have access to the hard drive and I can run a live distro to gain root access. I did think it would be enough to change for each user the `x` in the second column of `/etc/passwd`, but this does not work.


How to make user passwords shown as a clear text in Linux?

We know that users' passwords are saved in `/etc/passwd`, but in an encrypted way, so even the root can't see them:               jane:x:501:501::/home/jane:/bin/bash     fred:x:502:502::/home/fred:/bin/bash      As shown above, `:x:` represents the password. Is there a way (possible configuration) to save the password in the `/etc/passwd` in clear text and such that the root can see them?


Can't install 'MFC42.DLL'

I tried this:               winetricks mfc42      and got the following result:               Executing w_do_call mfc42     Executing load_mfc42     Executing wine /home/sajjad/.cache/winetricks/vcrun6/vc6redistsetup_deu.exe /T:C:\windows\Temp\_mfc42 /c     wine: Unhandled page fault on read access to 0x00000001 at address 0x7bc493a0 (thread 0067), starting debugger...     err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7bc493a0     ------------------------------------------------------     Note: command 'wine /home/sajjad/.cache/winetricks/vcrun6/vc6redistsetup_deu.exe /T:C:\windows\Temp\_mfc42 /c' returned status 5.  Aborting.


Why are Unity and GNOME so graphics-intensive?

Sure, the desktops are very detailed now, but I see that they appear to be fairly simple, especially the GNOME shell. Why is the 'simple-looking' Gnome shell so 'graphics-intensive'?


Solaris: Script for finding the physical device path of all installed fiber cards

I have a number of systems (with quite varying type, generation and architecture unfortunately). I need to create a list of fiber cards on these varying systems. I am able to use prtconf -v, and correlate with prtdiag -v, and if need be luxadm or fcinfo to find this info, but with a large number of systems ahead of me, I am wondering two things. 1, if anyone has a script they've already made for themselves that finds this info. 2, If someone knows a super nifty one liner that would get the info I need out of the above command(s) so I can just script a wrapper on it and not spend a week logging into 4000 boxes. Again, not so much looking to learn how to find them, (although as always with unix, TMTOWTDI, so your input is welcome), but rather seeking a script that will hopefully take some work off me.


When adding a user to a new group when does the user group permissions become active when its a /nologin user?

I have a service level account to run my webserver, and this user is setup with `/sbin/nologin`. Normally when you add a user to a group you must logout and login to use the new group permissions. I'd like to add this user to another group to extend some of its permissions but since my webserver user never logs in, when or how will the user gain access to the new group permissions?


How do I get a long listing for a single directory?

I want to see a long listing for a single directory. When I type `ls -lha`, I see this:               drwxrwxr-x  4 username groupname 4.0K 2010-08-05 09:55 files     drwxrwxr-x  7 username groupname 4.0K 2010-08-05 14:25 trunk     drwxrwxr-x  8 username groupname 4.0K 2010-08-05 16:02 phpincludes     drwxrwxr-x 11 username groupname 4.0K 2010-07-26 12:31 phpMyAdmin-3.3.5-english      However, when I type `ls -lha phpMyAdmin-3.3.5`, I get a listing of the contents of the directory. How do I type the command so that I see only               drwxrwxr-x 11 username groupname 4.0K 2010-07-26 12:31 phpMyAdmin-3.3.5-english      ? I want to do this with symlinked directories, so I can see where they're linked to, not their contents.


Apt/Aptitude: how to filter packages that are impossible to install?

Especially when running Sid, there are many packages that become non- installable as the dependencies change ABI versions, or the dependencies themselves may have been dropped. It'd be good to know how to filter these packages so that a potential maintainer can check what problematic packages are there on the repo. So far I came up with:               #!/bin/sh     apt-cache pkgnames|xargs apt-get -s install\     |sed "/ : /h;/installable/{x;/ .* :/{s/ \(.*\) :.*/\1/;b}};d" | sort      It does not recursively mark packages which depend on package "not going to be installed" X, where X is package that is marked because one of the dependecies is "not installable". E.g in the following:               foo : Depends on bar but not going to be installed     bar : Depends on baz but not installable      `bar` will be marked but `foo` will not. And I shouldn't just mark all packages that has the line "not going to be installed" because it could be bar is a package that exists but breaks another installed package.


parsing process ID/names from /proc, thread IDs

When I'm parsing process IDs from /proc, obviously each thread of a process gets its own ID. And I realize that all the threads in that same process can be gathered from `/proc/${pid}/task/`. But my question is, can I assume that the first ID in the list (the lowest numbered one?) is the main thread of the process? The goal I'm ultimately trying to do is write a quick `ps` script in python without using a subprocess or invoking the shell.


Disabling mirror option in preseed.cfg

I am installing Debain Weezy (netinstall) in VirtualBOX using `preseed.cfg`. I'm trying to create a `preseed.cfg` that would skip/not set Debian mirror in the `Configure the package manager` step. I am not installing any additonal packages (`tasksel tasksel/first multiselect none`) therefore "a very minimal base system" If I use `d-i mirror/country string manual` I get               Please enter the hostname of the mirror from which Debian will be downloaded      I then have to manually select `Go back` and select `Yes` when asked `Continue without a network mirror?`. Setting `d-i mirror/country string boolean false` gives the same dialogue. Additionally something like `d-i mirror/confirm boolean true` needs to be added too I think since it's a two-step dialogue.


Preseed.cfg ignoring host setting

I am installing Debian Wheezy (netinstall) in VirtualBox using `preseed.cfg`. I tried both `d-i netcfg/get_hostname string somehost` and `d-i netcfg/get_hostname string somehost`, but in both cases the host gets set as "debian". I tried both at the same time but still the host is set as "debian". Excerpt from Debian's guide about preconfiguration file: > If you want to force a hostname, regardless of what either the DHCP server > returns or what the reverse DNS entry for the IP is, uncommentand adjust the > following line > > d-i netcfg/hostname string somehost Is this a bug or am I just unlucky?


Why is "uname gcc" not working in Ubuntu

I know that `uname -a` shows the full machine name and details, etc. But I did `uname gcc` to see what the version of gcc I am running, and it returned `Linux` - **What does that mean?**               Ubuntu86: $ uname gcc     Linux      This is the machine I am on (I know it is old):               Ubuntu86: $ uname -a     Linux ubuntu86 2.6.8.1-3-386 #1 Tue Oct 12 12:41:57 BST 2004 i686 GNU/Linux      How can I check the version of gcc running on this machine? I installed it by typing:               Ubuntu86: $ sudo apt-get install gcc      So I know it has installed a version of gcc, but no idea what version.


libfaketime and Mac OS, LD_PRELOAD

Running Mac OS 10.7.2 and trying to run libfaketime and nothing happen. I installed and ran exactly as directed only the time and date stay exactly as are set in the system? Is anyone else able to successfully run this on OSX?               $ date     Mon Jan 30 21:05:09 CST 2012     $ LD_PRELOAD=./libfaketime.so.1 FAKETIME="-15d" date     Mon Jan 30 21:05:32 CST 2012


How to restore a DD image file in my primary disk on new debian server

I have a dedicated Debian server at Online.net and I want to change the server by a more powerful (always Debian OS). For that, I have made an image on my old hard disk with this command:               dd if=/dev/sda | gzip -c > /backup/sda1_image.gz       In my 2 machines, I don't have partitions and I have just one hard disk. My question : How I can to restore my image in my new Debian server, on his primary disk? It's possible to make it in ssh:               gzip -cd /backup/sda1_image.gz | dd of=/dev/sda      Question: I have to unmount my primary disk before the restoration ? Question: If I unmount the primary(boot) disk by ssh, it not freeze ? Because I just can access to my server in ssh (no phisical).


What is the .gitignore pattern equivalent of the regex (Big|Small)(State|City)-[0-9]*\.csv

I have a regex I stuck in my `.gitignore` similar to:               (Big|Small)(State|City)-[0-9]*\.csv      It didn't work so I tested it against RegexLab.NET. I then found the gitignore man page which led me to learn that gitignore doesn't use regexes, but rather fnmatch(3). However, fnmatch it doesn't seem to have an equivalent of the capture groups. Is this feasible or do I need to break this into three lines?


Remap keypad keys to modifiers

I did some research but I couldn't find a working solution: How can I make my keyboard buttons: `KP_1`, `KP_2`, `KP_3` to work exactly the same as `Shift_L`, `Alt_L` and `Control_L`? I use Linux Mint 17 Cinnamon. I want the new keys to work in game Dota 2 (but i don't mind if they will work globally). I tried different things but none of it worked as expected: ### `xmodmap` I run in terminal:               xmodmap -e "keycode 87 = Shift_L"     xmodmap -e "keycode 88 = Alt_L"     xmodmap -e "keycode 89 = Control_L"      Results:   * OS: `KP_1` and `KP_2` work as they should (as `Shift` and `Alt`), but somehow `kp_3` doesn't work as `Ctrl`     * Dota 2: none of the `kp_1`, `kp_2`, `kp_3` work as `Shift`/`Alt`/`Ctrl` (why?) ### `remap.inc` file I added the following lines to `/etc/console-setup/remap.inc`               keycode  79 = Shift     keycode  80 = Alt     keycode  81 = Control      and then run               sudo dpkg-reconfigure console-setup -phigh      Results: doesn't work anywhere. I don't know why these keycodes are different than what "xev" returns, but that's what I found using dumpkeys:               sudo dumpkeys | egrep "^keycode.*KP_[123]"     keycode  79 = KP_1                 keycode  80 = KP_2                 keycode  81 = KP_3       ### `xbindkeys` + `xte` I addedd these lines to `~/.xbindkeysrc`:               "xte 'key Shift_L'"         Mod2 + KP_End      and ran "xbindkeys" in terminal.   Results: doesn't work anywhere (probably because `Shift_L` is pressed only once - I would like it to be kept pressing when I keep pressing `KP_1`, just like the normal `Shift` button).


How can I tell what woke my laptop from suspend?

On other operating systems, there are ways to see what process or event woke them from suspend. I leave my laptop often for multiple days in suspend, sometimes to find that it has woken itself up and is heating whatever surface it is resting on :) Is there a way to find out what woke it up so that I can prevent that thing from happening again? On Ubuntu 12.04 (elementary Luna).


Not able to deny selected local user to login ftp server

I added the below 2 lines in the end of the configuration file `/etc/vsftpd.conf` so as to deny a local user named 'tentenths' from loggin in the ftp server. I restarted the vsftpd service after the change. But still the user was permitted to login. Where am I mistaken!               userlist_deny=YES     userlist_file=/etc/vsftpd.denied_users      The content of the above file is:               ravbholua@ravi:~$ cat /etc/vsftpd.denied_users     tentenths     ravbholua@ravi:~$      I am referring this link for the same. Have a look at the whole conf. file:               # Example config file /etc/vsftpd.conf     #     # The default compiled in settings are fairly paranoid. This sample file     # loosens things up a bit, to make the ftp daemon more usable.     # Please see vsftpd.conf.5 for all compiled in defaults.     #     # READ THIS: This example file is NOT an exhaustive list of vsftpd options.     # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's     # capabilities.     #     #     # Run standalone?  vsftpd can run either from an inetd or as a standalone     # daemon started from an initscript.     listen=YES     #     # Run standalone with IPv6?     # Like the listen parameter, except vsftpd will listen on an IPv6 socket     # instead of an IPv4 one. This parameter and the listen parameter are mutually     # exclusive.     #listen_ipv6=YES     #     # Allow anonymous FTP? (Disabled by default)     anonymous_enable=YES     #     # Uncomment this to allow local users to log in.     local_enable=YES     #     # Uncomment this to enable any form of FTP write command.     write_enable=YES     #     # Default umask for local users is 077. You may wish to change this to 022,     # if your users expect that (022 is used by most other ftpd's)     #local_umask=022     #     # Uncomment this to allow the anonymous FTP user to upload files. This only     # has an effect if the above global write enable is activated. Also, you will     # obviously need to create a directory writable by the FTP user.     anon_upload_enable=YES     #     # Uncomment this if you want the anonymous FTP user to be able to create     # new directories.     #anon_mkdir_write_enable=YES     #     # Activate directory messages - messages given to remote users when they     # go into a certain directory.     dirmessage_enable=YES     #     # If enabled, vsftpd will display directory listings with the time     # in  your  local  time  zone.  The default is to display GMT. The     # times returned by the MDTM FTP command are also affected by this     # option.     use_localtime=YES     #     # Activate logging of uploads/downloads.     xferlog_enable=YES     #     # Make sure PORT transfer connections originate from port 20 (ftp-data).     connect_from_port_20=YES     #     # If you want, you can arrange for uploaded anonymous files to be owned by     # a different user. Note! Using "root" for uploaded files is not     # recommended!     #chown_uploads=YES     #chown_username=whoever     #     # You may override where the log file goes if you like. The default is shown     # below.     #xferlog_file=/var/log/vsftpd.log     #     # If you want, you can have your log file in standard ftpd xferlog format.     # Note that the default log file location is /var/log/xferlog in this case.     #xferlog_std_format=YES     #     # You may change the default value for timing out an idle session.     #idle_session_timeout=600     #     # You may change the default value for timing out a data connection.     #data_connection_timeout=120     #     # It is recommended that you define on your system a unique user which the     # ftp server can use as a totally isolated and unprivileged user.     #nopriv_user=ftpsecure     #     # Enable this and the server will recognise asynchronous ABOR requests. Not     # recommended for security (the code is non-trivial). Not enabling it,     # however, may confuse older FTP clients.     #async_abor_enable=YES     #     # By default the server will pretend to allow ASCII mode but in fact ignore     # the request. Turn on the below options to have the server actually do ASCII     # mangling on files when in ASCII mode.     # Beware that on some FTP servers, ASCII support allows a denial of service     # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd     # predicted this attack and has always been safe, reporting the size of the     # raw file.     # ASCII mangling is a horrible feature of the protocol.     #ascii_upload_enable=YES     #ascii_download_enable=YES     #     # You may fully customise the login banner string:     #ftpd_banner=Welcome to blah FTP service.     #     # You may specify a file of disallowed anonymous e-mail addresses. Apparently     # useful for combatting certain DoS attacks.     #deny_email_enable=YES     # (default follows)     #banned_email_file=/etc/vsftpd.banned_emails     #     # You may restrict local users to their home directories.  See the FAQ for     # the possible risks in this before using chroot_local_user or     # chroot_list_enable below.     chroot_local_user=NO     #     # You may specify an explicit list of local users to chroot() to their home     # directory. If chroot_local_user is YES, then this list becomes a list of     # users to NOT chroot().     # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that     # the user does not have write access to the top level directory within the     # chroot)     #chroot_local_user=YES     chroot_list_enable=YES     # (default follows)     chroot_list_file=/etc/vsftpd.chroot_list     #     # You may activate the "-R" option to the builtin ls. This is disabled by     # default to avoid remote users being able to cause excessive I/O on large     # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume     # the presence of the "-R" option, so there is a strong case for enabling it.     #ls_recurse_enable=YES     #     # Customization     #     # Some of vsftpd's settings don't fit the filesystem layout by     # default.     #     # This option should be the name of a directory which is empty.  Also, the     # directory should not be writable by the ftp user. This directory is used     # as a secure chroot() jail at times vsftpd does not require filesystem     # access.     secure_chroot_dir=/var/run/vsftpd/empty     #     # This string is the name of the PAM service vsftpd will use.     pam_service_name=vsftpd     #     # This option specifies the location of the RSA certificate to use for SSL     # encrypted connections.     rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem     # This option specifies the location of the RSA key to use for SSL     # encrypted connections.     rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key     userlist_deny=YES     userlist_file=/etc/vsftpd.denied_users


Mixing 4k/512 drives with ZFS (FreeNAS)

I have the following drives:   * Seagate Barracuda ST3200054AS   * WDC WD20EADS-00S2B0   * Samsung HD204UI As far as I understand, the first are ordinary 512 drives while the last is 4096 (Advanced format). Together with a new 2TB drive, I want to create a 6TB RAIDz1 with ZFS in FreeNAS. The new drive must most likely be also Advanced format because the old 512 are becoming rare/expensive. So I will effectively have two 512-byte-block and two 4096-byte-block drives. What special things must I take care in order to not **decrease** performance? When I chose "Force 4096 bytes sector size" in the volume manager, will I make sure that I will get the same performance if all block sizes were equal?


mount failed to process probably corrupted CD

I wanted to check a CD from my drawer. I inserted it into my drive and issued mount. I got               mount: block device /dev/sr0 is write-protected, mounting read-only      mount command did not exit. I checked its state in top:               4640 root      20   0 27088 1280 1060 R  99,8  0,0   1:36.90 mount      99,8% CPU usage what was not true because usage of all my cores is almost 0,0%. I tried to kill it - no success (both signals KILL and TERM fail to stop the mount programme). I tried reboot -f and reboot got into D state. fuser helped neither. /dev/sr0 is my cdrom and it was not present in mount output               umount  /media/cdrom           umount: /media/cdrom0 is not mounted (according to mtab)      fstab:               /dev/sr0       /media/cdrom0   udf,iso9660 user,noauto     0       0      Don't know what to do with that. All what works is to cut power and start again. System doesn't reboot or shutdown.


Is '-9' a flag to kill command?

**What does`-9` do?** It does not show up in the syntax:               $ kill     kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]     $


ACL mask does not work as expected

If I copy a file with a base ACL of:               u::rw-,g::r--,o::r--      into a directory with a default ACL of:               u::rwx,g::r-x,g:users:rwx,m::rwx,o::r-x      I obtain a file with mask of `m::r--`. I would have expected the union of the permissions of the two group entries (i.e. `m::rwx`). Why it is so? Does it depend on the `mode` parameter used by `cp` in the creation of the file?


Pluggin a bunch of USB hard drives into a Linux system?

I've got a Linux system with two USB 2.0 ports and one USB 3.0 port, and I would like to know how many USB hard drives I could plug into it. On the performance side, what would the I/O access be like as I add more and more drives? I expect I will have to have multiple levels of fan-out by plugging hubs into hubs to maximize the number of devices on each USB port. Would a tool like iostat tell me if all the disks share roughly the same bandwidth?


Good distribution for Gnome shell

With Ubuntu pushing Unity, what distribution would you recommend if I just want to run Gnome 3 with the new Gnome shell? Personally, I'm interested in distributions which have the polish and support of Ubuntu, but feel free to recommend anything that makes it easy to run Gnome shell.


Clipboard for images

I often read some text with images and often happens that the text talks about an image that is on the next page and next page and previous page and I have to go back and forward and usually forget where I paused reading.   I got an idea to save the images to image clipboard which is able to contain about 5 images (e.g. with making small screenshot of the screen area). While reading when the text talks "see picture 10.4 (on page 42)" and in a few seconds "compare it to picture 10.2 (on page 40)" I could press only keyboard shortcut and select the desired picture without browsing through the text.   Is this possible in X Window System? Or with some script?


What's the reason that "rm -rf a/b" says "a/b is not empty"?

The following script _sometimes_ gives me things like `can't remove a/b as it's not empty`               ssh -T user@host <<EOF       cd somewhere       rm -rf a/b         EOF      But I log in to the server and execute `rm -rf a/b` then I never had the problem. There are other processes that are generating files to `a/b`, is that related? Anyway, how to make a script that will ensure "a/b" will be deleted?


Is there a way to find all X resources an application uses?

I'm looking for a way to automatically list all X resources that are used in an application. To give you an example, for `xterm` I'd expect a list similar to the following but with _all_ the resources that are used by `xterm`.                background      foreground      cursorColor      vt100.geometry      scrollBar      scrollTtyOutput      ...      The method can work on the source code of the application but if it is possible to do it with only the application binary that would also be interesting.


Slow down the CPU

I tried to slow down my CPU with `powernowd` and `cpufreq-selector`. I hoped that with lower frequency it will be less hot and I won't hear my fan every time I will run internet radio. I used the following commands               sudo cpufreq-selector -f 800000      and               sudo powernowd -m 0 -l 40 -u 60      but this wasn't sufficient for more quiet laptop. My CPU is > Intel(R) Pentium(R) M processor 1.60GHz Could you advise me on how to make it run cooler / quieter? I solved it yesterday with `sudo cpufreq-selector -g powersave`


Can two hosts have the same IP address in /etc/hosts?

can two hosts share the same IP Address without a conflict. This is how my /etc/hosts looks like :-               $ cat /etc/hosts     127.0.0.1   localhost     127.0.1.1   debian     127.0.1.1       mini      Now as can be seen both mini and debian share the same IP Address. Now debian is my hostname.               $ hostname     debian      while mini is a virtual host for an apache site.               /etc/apache2/sites-available$ head minidebconfindia.conf      <VirtualHost mini:80>     ServerAdmin webmaster@localhost      This is in Apache 2.4. I am just not sure whether this is good or not. A friend of mine has the same setup (with a different hostname) on Apache 2.2 and that works without issue. Looking forward to know if this is valid or should I be doing any changes ?


AIX open() : file descriptor is zero (!?)

A daemon process, on detecting the presence of a text file in a particular directory then launches an executable file which opens the aforementioned text file in order to read and then transmit its data over a TCP socket. The number of the file descriptor of the opened text file is logged along with other information about the processing of the file. It has been noticed that from time to time, the file descriptor returned by the open() call is zero (normally this is reserved for stdin). No error is detected and all works well. The source code in C does nothing more that open() and later close() - there is no redirection, duplication or any other wizardry performed on the returned file handle. Under what circumstances could a process's file descriptor 0 be available for general use (and not attributed to stdin) ? Platform is AIX 5.2.


Why does the "du" command count in 4KB steps?

> **Possible Duplicate:**   >  Directory size calculation difference I don't understand how the `du` command under Linux works. I wanted to count the overall size of a few hundred, small files and `du -sh` returned something along the lines of 150MB. I didn't question it until I realized my file manager displayed only around 50MB for the same set of data and I got confused. Here's what I then tried:               fkochem@WK-6:~/temp$ cat test      a     fkochem@WK-6:~/temp$ du -sh test      4.0K    test      So, now this must be a mistake? I looked at `du -sh *` of my original data and found the following:               4.0K    NCO-0.9.9.9.json     4.0K    NCO-0.99.9.json     4.0K    NCO-0.9.9.json     8.0K    NCO-0.99.json     8.0K    NCO-0.9.json      Why does `du` seem to count in 4KB steps? What am I missing here?


apt-get purge <packages> works fine, aptitude still has <packages> marked as installed and reinstalls them

I've created a Rubygem to help with removing old kernels that have built up over years and are eating disk space. (My laptop had 19 kernels on it alone, and on a small SSD...) I want to use apt-get or dpkg as the uninstaller since some people will not have aptitude installed and I do not want users of the gem to have to install anything. The problem comes when _some_ users do use `aptitude` for other things. Scenario:   1. User uses my gem which successfully `apt-get purge`'s the kernel packages.   2. User starts `aptitude` in interactive mode for any reason,   3. User presses the 'g' key (Download/Install/Remove Pkgs) immediately without marking any changes, -->   4. `aptitude` re-downloads and re-installs the packages that `apt-get` had purged. Currently, the gem uses `apt-get purge <packages>` to purge the kernel packages. (Seen here.) I also tried with `dpkg --purge <packages>`, but the result is the same, aptitude still wants to reinstall them. I've read through the entire `aptitude` manual and googled many things, no dice. _Maybe_ I could programmatically manage `aptitude`'s marked/unmarked packages list if I could find where it is (although I'd prefer a cleaner solution.) I assume it's not `/var/lib/dpkg/status` or else there would be no disparity? dpkg-query shows the package `status` as `Not` and the `desired` state as `Unknown`.               deKernel$ dpkg-query -l linux-image-3.2.0-39-generic     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     +++-==========================================-==========================================-====================================================================================================     un  linux-image-3.2.0-39-generic               <none>                                     (no description available)     deKernel$      It's possible to go into aptitude and manually un-mark those kernel packages and the problem disappears, however this is obviously quite impractical.


git tab-completion does not work on Debian Wheezy but works on Squeeze

My question is about git command tab-completion, i.e. when I type `git stat` and hit Tab, it completes the command line to `git status`. (Where applicable, this also works with remote names and branch names.) What confuses me is that without additional configuration on any of the boxes, on the machine with older git and stable Debian it works, while on the laptop it does not. Shouldn't that be the _other way around_? Shouldn't the fancy things tend to rather be in testing than stable? On my VPS, where:               aloism@srv:~$ git --version     git version 1.7.2.5     aloism@srv:~$ lsb_release -a     No LSB modules are available.     Distributor ID:     Debian     Description:        Debian GNU/Linux 6.0.5 (squeeze)     Release:            6.0.5     Codename:           squeeze      and on my laptop:               lennycz@laptop:~$ git --version     git version 1.7.10.4     lennycz@laptop:~$ lsb_release -a     No LSB modules are available.     Distributor ID:     Debian     Description:        Debian GNU/Linux testing (wheezy)     Release:            testing     Codename:           wheezy     lennycz@laptop:~$       There's nothing interesting in ~/.gitconfig on any of the boxes. Can anybody explain it? A bug in git? Any more research ideas?


Help configuring a custom log file for iptables

I'm trying to log dropped packages to a custom file instead of `/var/log/messages`. To achieve this, I have added these two lines at the end of my configuration file:                   -A INPUT -m limit --limit 5/min -j LOG --log-prefix "IPTables-INPUT-Dropped: " --log-level 4         -A OUTPUT -m limit --limit 5/min -j LOG --log-prefix "IPTables-OUTPUT-Dropped: " --log-level 4      This works because I have configured the INPUT and OUTPUT chains as DROP by default, so if the package does not meet any previous rule, it will be logged and dropped. However, I cannot log them to a custom file. They log successful to `/var/log/messages`, but I want them to be logged on `/var/log/iptables.log`. I've created the file `/etc/rsyslog.d/iptables.conf` with the following content:                   :msg, contains, "IPTables-INPUT-Dropped: " - /var/log/iptables.log         & ~      then I restarted rsyslog, `/etc/init.d/rsyslog restart` and sent some packages I knew were going to be dropped.However, they are not logged in iptables.log, they are still being logged on `/var/log/messages`. Which configuration is missing? **SOLVED** The problem is that there shouldn't be an space between **-** and **/**


Not able to lock /var/lib/dpkg/lock (read only)

I was trying to install ruby on my remote server(this is a vm machine(debian) in a esxi server . ) I got this error: The Command: sudo apt-get install ruby1.8 Error :               W: Not using locking for read only lock file /var/lib/dpkg/lock     E: Unable to write to /var/cache/apt/     E: The package lists or status file could not be parsed or opened.      then I tried :               sudo dpkg --configure -a       Output:               dpkg: unable to access dpkg status area: Read-only file system       UPDATE: output of mount               /dev/sda3 on / type ext4 (rw,errors=remount-ro)     tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)     proc on /proc type proc (rw,noexec,nosuid,nodev)     sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)     udev on /dev type tmpfs (rw,mode=0755)     tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)     devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)     /dev/sda1 on /boot type ext4 (rw)     /dev/sdb1 on /home type ext4 (rw)          mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).            It's possible that information reported by mount(8) is not            up to date. For actual information about system mount points            check the /proc/mounts file.      UPDATE2:               cat /proc/mounts               rootfs / rootfs rw 0 0     none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0     none /proc proc rw,nosuid,nodev,noexec,relatime 0 0     none /dev devtmpfs rw,relatime,size=1553128k,nr_inodes=216450,mode=755 0 0     none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0     /dev/disk/by-uuid/cf4fb4ae-6d12-407b-bf43-3b0daaaaaf74 / ext4 ro,relatime,errors=remount-ro,barrier=1,data=ordered 0 0     tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0     tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0     /dev/sda1 /boot ext4 rw,relatime,barrier=1,data=ordered 0 0     /dev/sdb1 /home ext4 rw,relatime,barrier=1,data=ordered 0 0      **UDPDATE 3** output of `dmesg`(some last part)               [1968636.237601] JBD2: Detected IO errors while flushing file data on sdb1-8     [1968772.229102] JBD2: Detected IO errors while flushing file data on sdb1-8     [1968789.799409] IPv6 addrconf: prefix with wrong length 56     [1968990.325125] IPv6 addrconf: prefix with wrong length 56     [1969190.801848] IPv6 addrconf: prefix with wrong length 56     [1969192.245363] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969197.698223] IPv6 addrconf: prefix with wrong length 56     [1969223.105506] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969349.119764] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969398.205686] IPv6 addrconf: prefix with wrong length 56     [1969598.713179] IPv6 addrconf: prefix with wrong length 56     [1969607.241633] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969799.220758] IPv6 addrconf: prefix with wrong length 56     [1969825.462909] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969831.231049] JBD2: Detected IO errors while flushing file data on sdb1-8     [1969999.728348] IPv6 addrconf: prefix with wrong length 56     [1970200.247944] IPv6 addrconf: prefix with wrong length 56     [1970221.321558] JBD2: Detected IO errors while flushing file data on sdb1-8     [1970253.105491] JBD2: Detected IO errors while flushing file data on sdb1-8      `/var/log/syslog` output: ![enter image description here](http://i.stack.imgur.com/cZASw.png)


Why does nagios stops sending alerts to the server? (Debian Squeeze)

I have a client machine and a server; I configured nagios on client to send alert on server to monitor that everything is working fine but suddenly the client stops sending alerts to the server -- on the server side everything is ok but when I checked on client logs I found this:                   Local time is Thu Jun 28 01:55:21 EDT 2012     [1340862921] LOG VERSION: 2.0     [1340862921] Finished daemonizing... (New PID=11496)     [1340863401] Warning: comment_file variable ignored.  Comments are now stored in the status and retention files.     [1340863401] Warning: downtime_file variable ignored.  Downtime entries are now stored in the status and retention files.     [1340863401] Warning: aggregate_status_updates directive ignored.  All status file updates are now aggregated.     [1340863401] Nagios 3.2.1 starting... (PID=11783)     [1340863401] Local time is Thu Jun 28 02:03:21 EDT 2012     [1340863401] LOG VERSION: 2.0     [1340863401] Finished da^C               Local time is Thu Jun 28 01:55:21 EDT 2012     [1340862921] LOG VERSION: 2.0     [1340862921] Finished daemonizing... (New PID=11496)     [1340863401] Warning: comment_file variable ignored.  Comments are now stored in the status and retention files.     [1340863401] Warning: downtime_file variable ignored.  Downtime entries are now stored in the status and retention files.     [1340863401] Warning: aggregate_status_updates directive ignored.  All status file updates are now aggregated.     [1340863401] Nagios 3.2.1 starting... (PID=11783)     [1340863401] Local time is Thu Jun 28 02:03:21 EDT 2012     [1340863401] LOG VERSION: 2.0     [1340863401] Finished da^C      Can anybody tell me what the problem might be? I also find               STIGTERM shutting down      What does that mean?


Linux: How to find the device driver used for a device?

If my target has one device connected and many drivers for that device loaded, how can I understand what device is using which driver?


Stop ZSH from trying to correct command

$ knife cookbook download recipe     zsh: correct 'cookbook' to 'cookbooks' [nyae]?      How can I get zsh to stop trying to correct cookbook to cookbooks?? cookbooks is a directory where I run the command so I understand why it's doing it, but cookbook is a valid part of the command line.


How to stop a infinite running process (ztail) started by a ssh session after that session is closed

I have a peculiar problem. My server supports multiple ssh session simultaneously, so that multiple admins can manage (via command line interface) it simultaneously. We have a command which calls `ztail` to show the compressed log files. Now when the current ssh session is closed (without pressing `Ctrl`-`C`, to stop the `ztail` command), this command should ideally stop working. But what I observed when I start a new ssh session that, the process (`ztail`) is still running in background and consuming my CPU, even though the previous session was closed. Now how can I know when the session was closed, so that I can use that variable/flag to close/stop any commands initiated by that previously closed session?


Is the linux directory structure obsolete and obtuse?

I genuinely feel that the Linux directory system presents an obstacle for users migrating from other systems as well as being a bottleneck for the evolution of Linux itself. Rest assured I am not here to start trolling. I am a huge fan of Linux as an alternative to increasingly bloated and expensive competitive operating systems, but rarely have I seen such stranded evolution in the core of an operating system. I realize that Linux and Unix professionals are firmly focused on providing stability and reliability, and abandoning working solutions in favor of new ideas isn't always the way to go. However, even as a computer professional with considerable experience using windows, I find that the cryptic and repetitive nature of the Linux directory structure constrains my efforts to use the OS in earnest. Windows finally shed its 8.3 names a few years ago, and few users would argue that things were better before. Instead we have seen a steady evolution towards less ambiguous file and folder names and improved structure (at least in some parts of the overall hierarchy). Of course Windows takes it too far by constantly changing storage location for all kinds of things. A windows user profile is a moving target if ever there was one. Nobody wants to keep up with something like that. My question is this. Would it harm Linux if the folder structure would evolve towards the human side of things by starting to remove some of its ambiguity and cryptical nature so that advanced users from other worlds could start to wrap their brains around the excellence of Linux. Is it really harmful if we would start to see:   * Binaries   * Libraries   * Drivers   * Users      * User1        * Binaries       * Libraries     * User2        * Binaries       * Libraries   * Devices   * Help In my world I prefer even more catagorized top level folders:   * Applications   * System   * User Data Don't take the above directory outlines too literally. They are just meant to illustrate a point.


Disable touchpad pointer moving, only tap click

I installed CentOS 6.4 on my laptop, a Lenovo E431. This laptop has the trackpoint that is so cool to move mouse pointer, so I want to disable pointer moving with touchpad dragging. Can this be? And I have one more question. My touchpad button is under the pad, like apple products. But it's Clicking sound is so loud, and too thick to click. So I want to set tap to click area. Like set half of left is left button down and another side is right click.(right edge and left edge is scrolling) Can this also be?


Keyboard is not responsive on xorg-server-1.13.1

When I've upgraded to xorg-server-1.13.1 keyboard stopped functioning. I then downgrade to xorg-server-1.12.4 and xorg-drivers-1.12 and it works now. My USE flags for both xorg-server and xorg-drivers below:               $ equery u xorg-server     [ Legend : U - final flag setting for installation]     [        : I - package is installed with flag     ]     [ Colors : set, unset                             ]      * Found these USE flags for x11-base/xorg-server-1.12.4:      U I      - - dmx         : Build the Distributed Multiheaded X server      - - doc         : Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally      - - ipv6        : Adds support for IP version 6      - - kdrive      : Build the kdrive X servers      - - minimal     : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)      + + nptl        : Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)      - - static-libs : Build static libraries      - - tslib       : Build with tslib support for touchscreen devices      + + udev        : Enable sys-fs/udev integration (device discovery, power and storage device support, etc)      + + xnest       : Build the Xnest server      + + xorg        : Build the Xorg X server (HIGHLY RECOMMENDED)      - - xvfb        : Build the Xvfb server      archer@capitan ~ $ equery u xorg-drivers      [ Legend : U - final flag setting for installation]      [        : I - package is installed with flag     ]      [ Colors : set, unset                             ]      * Found these USE flags for x11-base/xorg-drivers-1.12:      U I      - - input_devices_acecad      : INPUT_DEVICES setting to build driver for acecad input devices      - - input_devices_aiptek      : INPUT_DEVICES setting to build driver for aiptek input devices      - - input_devices_elographics : INPUT_DEVICES setting to build driver for elographics input devices      + + input_devices_evdev       : INPUT_DEVICES setting to build driver for evdev input devices      - - input_devices_fpit        : INPUT_DEVICES setting to build driver for fpit input devices      - - input_devices_hyperpen    : INPUT_DEVICES setting to build driver for hyperpen input devices      - - input_devices_joystick    : INPUT_DEVICES setting to build driver for joystick input devices      + + input_devices_keyboard    : INPUT_DEVICES setting to build driver for keyboard input devices      + + input_devices_mouse       : INPUT_DEVICES setting to build driver for mouse input devices      - - input_devices_mutouch     : INPUT_DEVICES setting to build driver for mutouch input devices      - - input_devices_penmount    : INPUT_DEVICES setting to build driver for penmount input devices      - - input_devices_synaptics   : INPUT_DEVICES setting to build driver for synaptics input devices      - - input_devices_tslib       : INPUT_DEVICES setting to build driver for tslib input devices      - - input_devices_vmmouse     : INPUT_DEVICES setting to build driver for vmmouse input devices      - - input_devices_void        : INPUT_DEVICES setting to build driver for void/dummy input devices      - - input_devices_wacom       : INPUT_DEVICES setting to build driver for wacom input devices      - - video_cards_apm           : VIDEO_CARDS setting to build driver for apm video cards      - - video_cards_ark           : VIDEO_CARDS setting to build driver for ark video cards      - - video_cards_ast           : VIDEO_CARDS setting to build driver for ASpeedTech video cards      - - video_cards_cirrus        : VIDEO_CARDS setting to build driver for cirrus video cards      - - video_cards_dummy         : VIDEO_CARDS setting to build driver for dummy video cards      - - video_cards_epson         : VIDEO_CARDS setting to build driver for epson video cards      - - video_cards_fbdev         : VIDEO_CARDS setting to build driver for fbdev video cards      - - video_cards_fglrx         : VIDEO_CARDS setting to build driver for fglrx video cards      - - video_cards_glint         : VIDEO_CARDS setting to build driver for glint video cards      - - video_cards_i128          : VIDEO_CARDS setting to build driver for Number 9 I128 video cards      - - video_cards_intel         : VIDEO_CARDS setting to build driver for Intel video cards      - - video_cards_mach64        : VIDEO_CARDS setting to build driver for mach64 video cards      - - video_cards_mga           : VIDEO_CARDS setting to build driver for mga video cards      - - video_cards_modesetting   : VIDEO_CARDS setting to build driver for unaccelerated modesetting      - - video_cards_neomagic      : VIDEO_CARDS setting to build driver for neomagic video cards      - - video_cards_nouveau       : VIDEO_CARDS setting to build reverse-engineered driver for nvidia cards      - - video_cards_nv            : VIDEO_CARDS setting to build driver for nv video cards      + + video_cards_nvidia        : VIDEO_CARDS setting to build driver for nvidia video cards      - - video_cards_qxl           : VIDEO_CARDS setting to build driver for qxl (QEMU virtual GPU)      - - video_cards_r128          : VIDEO_CARDS setting to build driver for ATI r128 video cards      - - video_cards_radeon        : VIDEO_CARDS setting to build driver for ATI radeon video cards      - - video_cards_s3            : VIDEO_CARDS setting to build driver for s3 video cards      - - video_cards_s3virge       : VIDEO_CARDS setting to build driver for s3virge video cards      - - video_cards_savage        : VIDEO_CARDS setting to build driver for savage video cards      - - video_cards_siliconmotion : VIDEO_CARDS setting to build driver for siliconmotion video cards      - - video_cards_sis           : VIDEO_CARDS setting to build driver for SiS video cards      - - video_cards_tdfx          : VIDEO_CARDS setting to build driver for tdfx video cards      - - video_cards_tga           : VIDEO_CARDS setting to build driver for tga video cards      - - video_cards_trident       : VIDEO_CARDS setting to build driver for trident video cards      - - video_cards_v4l           : VIDEO_CARDS setting to build driver for v4l video cards      - - video_cards_vesa          : VIDEO_CARDS setting to build driver for vesa video cards      - - video_cards_via           : VIDEO_CARDS setting to build driver for via video cards      - - video_cards_virtualbox    : VIDEO_CARDS setting to build driver for virtualbox emulation      - - video_cards_vmware        : VIDEO_CARDS setting to build driver for vmware video cards      What's the problem?


Unsure about the behaviour of my script when writing to log file

I have a very simple ksh script and at certain points I want to write to a log file. I use the following commands in two places...               print "Directory listing 1:\n" > ${LogFile}     ll >> ${LogFile}      (Note: The second time this command is used print Directory listing 2) My problem is, when I view the log file afterwards, only the second execution of these commands work! So there's no "Directory listing 1" and accompanying "ll" output. I have tested and tested the script to ensure that there's nothing wrong my logic. I've added print test commands just before each so I know they get executed. Is there something I've done wrong or I'm not realising?


Any ideas to simplify the awkward rsync expression below?

Here is expression:               rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa  vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head -1"` .      It looks for one fresh SQL file on remote host **some.host** in **/remote/source/dir** with user **vivek** and copies to current dir on localhost, it uses `/where/is/my/id_dsa` key for `ssh` and `rsync` authorization. So this backquoted `ssh -i ...` frightens me a lot. But I don't see other way to find necessary file. How can I simplify it?


How to display the complete address with curl in searching?

I need to display the complete address with curl, when it find results with '301' status code. This is my variable.               search=$(curl -s --head -w %{http_code} https://launchpad.net/~[a-z]/+archive/pipelight -o /dev/null | sed 's#404##g')           echo $search     301      The above works, but only display if the site exists with '301' status code. **I want**               echo $search     https://launchpad.net/~mqchael/+archive/pipelight      * * * **UPDATE** This is my new variable, maybe can explain what I need. This variable will help me to search and install a ppa in Ubuntu o similar.               ppa=$(curl https://launchpad.net/ubuntu/+ppas?name_filter=$packagename | grep '$packagename<" )          echo $ppa      **Example:** `ppa=$(curl https://launchpad.net/ubuntu/+ppas?name_filter=Pipelight | grep '<td><a href="/~' | grep ">Pipelight<" )`               echo $ppa           Pipelight	      The problem here is I can't extract `mqchael` (this name is variable), also pipelight is only a example. **This is the format final when I will apply my variable.**               ppa:mqchael/pipelight


Change the color of tcsh output for any command

I want a different color for terminal returns: Example:               $ pwd                //when return key is hit      $ /home/user/tools   //return value printed in different color, say: grey color      This requirement is not specific to `pwd`, command but for any command thrown to the terminal, my log will:   * $black //input   * $grey //output hope it is clear.


What information do I need to solve an APT dependency issue?

I've seen several times people with unmet dependencies, which apt-get doesn't tells straightforward what's the problem, like this one:               The following packages have unmet dependencies:      libgl1-mesa-dri:i386 : Depends: libdrm-intel1:i386 (>= 2.4.38) but it is not going to be installed                             Depends: libdrm-nouveau2:i386 (>= 2.4.38) but it is not going to be installed                             Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not going to be installed                             Depends: libdrm2:i386 (>= 2.4.38) but it is not going to be installed                             Depends: libglapi-mesa:i386 but it is not going to be installed      libgl1-mesa-glx:i386 : Depends: libdrm2:i386 (>= 2.3.1) but it is not going to be installed                             Depends: libglapi-mesa:i386 (= 9.2.1-1ubuntu3) but it is not going to be installed                             Depends: libx11-6:i386 (>= 2:1.4.99.1) but it is not going to be installed                             Depends: libxcb-dri2-0:i386 (>= 1.8) but it is not going to be installed                             Depends: libxcb-glx0:i386 (>= 1.8) but it is not going to be installed                             Depends: libxcb1:i386 but it is not going to be installed                             Depends: libxdamage1:i386 (>= 1:1.1) but it is not going to be installed                             Depends: libxext6:i386 but it is not going to be installed                             Depends: libxfixes3:i386 but it is not going to be installed                             Depends: libxxf86vm1:i386 but it is not going to be installed      I know that walking through all dependencies `apt-get install libgl1-mesa- dri:i386 libdrm-intel1:i386` until I hit something is available, but in this case it will be a painful job due the amount of packages. Is there an easier way to do this?


For loop not getting executed correctly over ssh

I have a script in which I am reading from a csv file where it contains `SourceIp, DestinationIP,Source Ports, Destination Ports`. First I am reading the sourceIp and trying to do ssh over it (I am able to do it successfully), here I am trying to get a pseudo terminal and want to execute a for loop that will iterate over the sourcePorts(hyphen separated) and destinationPorts. **Input File Content :**               10.X.X.9,10.X.X.23,8140-61613,1521-1524-1525-1526-1530-1531-8140-61613      **Script :**               export lastSourceIP=""     export lastDestinationIP=""     export fqdn=""     export sourceFqdn=""     x=0     export username="sjain";     export location="/home/sjain/poc";     export baseLocation="10.X.X.9"     while IFS="," read f1 f2 f3 f4     do             x=$(($x+1))             TMP=$(mktemp)             TMP2=$(mktemp)             echo "Source IP        : $f1"                    echo "Destination IP   : $f2"             echo "Source Ports             : $f3"             echo "Destination Ports             : $f4"     export sourceIP=$f1     export destIP=$(echo "$f2" | tr -d '\n')     export port=$(echo "$f3" | tr -d '\n')     export destinationPorts=$(echo "$f4" | tr -d '\n')     ssh -t -t $username@$sourceIP 'bash -s' <<ENDSSH     (IFS='-'; for sourceP in $port; do       (for destinationP in $destinationPorts; do         echo "$sourceP" - "$destinationP"      done;)      done;)     exit      ENDSSH          done < ipaddress.csv      But when I am executing this script , it is not printing sourceIP - DestinationIp values. Here , is the output that I am getting on console. **Output:**                   Source IP        : 10.X.X.9         Destination IP   : 10.X.X.23         Source Ports             : 8140-61613         Destination Ports             : 1521-1524-1525-1526-1530-1531-8140-61613         tcgetattr: Inappropriate ioctl for device         (IFS='-'; for sourceP in 8140-61613; do          (for destinationP in 1521-1524-1525-1526-1530-1531-8140-61613; do             echo "" - ""          done;)         done;)         exit         [sjain@XXX.SERVER ~]$ (IFS='-'; for sourceP in 8140-61613; do         >  (for destinationP in 1521-1524-1525-1526-1530-1531-8140-61613; do         >     echo "" - ""         >  done;)         > done;)          -         [sjain@XXX.SERVER ~]$ exit         exit         Connection to 10.X.X.9 closed          .      **Expected Output :**               8140-1521     8140-1524     .... and so on      Please help where I am doing wrong.


How to compare two dates in a shell

How to compare two dates in a shell script? For example something like               todate=2013-07-18     cond=2013-07-15          if [ $todate -ge $cond ];     then         break     fi                                 It doesn't work. How can I achieve the desired result?


Install debian without gnome

I would like to install debian with another desktop than Gnome. In this case I can't use tasksel but have to install every package with apt-get. What do I need to run debian with Windowmaker?


Remove directory in ftp

This is probably very simple, but I really can't get it to work. I have an old directory with a symlink in it. I need to delete the directory, but it says it is not empty when I try:               rm -f dirname        (I have also tried `-r`, and `-rf`) I get: "`usage: rmdir directory-name`" So then I try `rmdir -f dirname`, but I get the same response. I am a newb to the command line and would really appreciate if someone could help.


Fedora 16 Screen Issue

I have installed Fedora 16 recently, at first time login it was working fine. But when I restarted and after I gave user name and password, the home screen comes but its shaking rapidly and I am unable to work, again I restarted but the same problem. Unable to resolve, kindly help me on this. Thanks.


pmount not working on Debian wheezy

"Not working" might be slightly inaccurate, since it still seems to `mount` and `umount` things properly, but it's inaccessible to users other than the `root` user, which defeats the purpose entirely. It's still installed on the system, and works fine from the `root` account, but my regular user accounts don't have sufficient privileges to use it. I'm not aware of having changed any permissions relating to mounting, and `remove --purge pmount`ing followed by a re-install does nothing (both with `apt-get` and with `aptitude`. Any idea what I kicked over by accident?


EXT3 file system pre digest material

I am looking for understanding EXT3 filesystem source code. I think I need a little pre-digestion to fully understand the code. Can anyone please suggest some material(blog etc.) where I can get some basic understanding of the source code.


Improve sed command to replace first instance of character and all following characters?

Input:               <e1 name="file1" id="id1" anotherId="id2">      Desired output:               file1      I can get what I need with this:               echo '<e1 name="file1" id="id1" anotherId="id2">' | sed 's/\(.*name="\)\(.*\)\(".*\)/\2/' | sed 's/".*//'      Output: `file1` I would like to improve the set of commands and remove the last pipe to sed if possible. If I remove the last pipe to sed, I cannot get what I want:               echo '<e1 name="file1" id="id1" anotherId="id2">' | sed 's/\(.*name="\)\(.*\)\(".*\)/\2/'      Output:               file1" id="id1" anotherId="id2      As you can see sed is picking up the last quotation mark and not the first after file1. Can someone help improve this command?


How to align fstab entries easily

Editing /etc/fstab with my text editor makes all the spacing go out of alignment. I could go through the file and insert/delete spaces to line everything up, but I'm looking for a more automated solution. Ideally, there would be an online javascript page that I could put my fstab into, and have it "pretty" align everything. Then I could copy/paste the final result back into the file. Is there a similar or better solution to this available? EDIT:   I use Linux on my desktop, and I'm not seeking to join the religion of vi or emacs just to edit my fstab. Emacs might be a better solution for some people, but for some other people it's not a better solution. EDIT2:   Here is an example snippet of my fstab using tabs. The columns are not in alignment.               proc    /proc   proc    nodev,noexec,nosuid 0   0     /dev/disk/by-label/Linux    /   ext4    errors=remount-ro   0   1     /dev/disk/by-label/Home /home   ext4    defaults    0   0      I want it to be automatically formatted with spaces and look more like the following.               proc                        /proc   proc    nodev,noexec,nosuid 0   0     /dev/disk/by-label/Linux    /       ext4    errors=remount-ro   0   1     /dev/disk/by-label/Home     /home   ext4    defaults            0   0


Only output printable chars OpenWrt

perl is not a very good idea, because it's an OpenWrt router, so not enough space for it.   "cat -v" doesn't works, because it doesn't supports the "-v" option      Any ideas? :\      Here's a bad text:   http://pastebin.com/raw.php?i=zjMGHNq5      Between the "review" and the "kde" word, theres a non-printable char. For example i need to remove these kind of chars for texts :\   Thank you!


Oracle: ORA-01089: immediate shutdown in progress - no operations are permitted

I have Oracle XE 10.0.2 installed on my development system. Recently I have been unable to restart it:               $ sudo /etc/init.d/oracle-xe stop     Shutting down Oracle Database 10g Express Edition Instance.     Stopping Oracle Net Listener.          $ sudo /etc/init.d/oracle-xe start     Starting Oracle Net Listener.     Starting Oracle Database 10g Express Edition Instance.          $ sqlplus           SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 4 19:54:53 2014          Copyright (c) 1982, 2005, Oracle.  All rights reserved.          Enter user-name: hr     Enter password:      ERROR:     ORA-01089: immediate shutdown in progress - no operations are permitted      So I tried killing off all oracle processes by hand:               $ sudo killall oracle tnslsnr      This kills the processes (they are no longer listed in `ps`). I then try starting Oracle again:               $ sudo /etc/init.d/oracle-xe start     Starting Oracle Net Listener.     Starting Oracle Database 10g Express Edition Instance.      SQL*Plus gives the same error. /usr/lib/oracle/xe/app/oracle/admin/XE/bdump/alert_XE.log says:               Starting Oracle Database 10g Express Edition Instance.     Tue Feb  4 19:59:30 2014     Starting ORACLE instance (normal)      I have not reconfigured Oracle recently, but I have shut it down hard (power off), so it may be in a inconsistent state that I need to force it to recover from.


how to type “smart quotes” (U+201C, U+201D)

It's like this: `“` (U+201C) `”` (U+201D).


Compiling Linux kernel for a router

I want to make an installable linux kernel that has routing enabled already. So anyone can install it on their machine, do some configuration as required, and machine will work fine for their routing needs. This is what I did so far.   1. Downloading and decompressing a vanilla linux kernel.   2. placing a ".config" file in that kernel directory.   3. Ready to make kernel.... I want to ask what options do I need to enable or disable in .config to make this a bootable software router (I don't need any other functionality)? Note: I don't want to use any already built router, I want to create my own so I can manipulate and test it further.


Why Putty inserting ~ into my Fedora bash shell

Recently while working in Putty logged into my Fedora system I have started getting random ~ characters on my shell. Additionally, while I am editing in VIM I'll have characters randomly change to upper case. This only happens while I am logged int using Putty. I've never had this happen before so I am wondering if an update to Fedora has turned on some sort of keep alive feature in SSH that is causing this. I re-installed putty and trashed my preferences just to be sure. I'm not sure where to start digging to find the culprit. Any pointers?


Adding useraccount as root using "usermod -G root useraccount"?

I'm on CentOS. I try to add an useraccount as root using "usermod -G root useraccount". But this does not seem to work. Any way to fix this without having to use visudo?


Hopelessly stuck on making Nvidia Driver work on Debian

Before I posted question here, I'd been hacking around for the solution for my problem, but none of them worked. Here is my situation. I had a Win7 OS before I put a Debian Squeeze on it, now I got a dual-boot. However, I tried both ways to install driver for my Nvidia Quadro 1000M card on this machine, Debian ways,               http://wiki.debian.org/NvidiaGraphicsDrivers       and the Nvidia driver script from its website, both yielded the same result.               "failed to initialize the nvidia graphic device, none of the screen has been configured."(From var/log/Xorg.log)      and one thing I realized was that after tweaking the linux version of Nvidia driver from above, my windows Navidia driver broke as well when I logged into windows, and I had to reinstall to get it back working again. This seemed odd because they are on different partitions and filesystems. Does it mean that I can't get two drivers on the same machine even there are for different OSs and are in different partition? Or those above solutions only worked for standalone linux machine? Sorry about my incomplete knowledge for drivers, but please help cuz I am going nuts here. Thank you ini advance.


VNC from host PC to Android phone running Ubuntu

While I know how to do this from my phone itself, where it loads the GUI on Ubuntu and I have a desktop environment, it's not as useful for what I'm trying to accomplish, which is to have a development environment for writing ARM assembly code. So, I was hoping to see if anyone would be able to offer some suggestions/advice or point to resources where I could use my desktop PC to VNC into my Android phone while it's running Ubuntu.


cat corrupts serial port data

I have an application which writes some bytes to a serial port. When I do `cat /dev/ttyS0` to see what is being transferred, I find that the data is corrupted by the `cat` command. Is there any other way to see what is being sent on the serial port? Does anyone know why `cat` changes the data? **Edit** : There is another application on the other side and I want to intercept the data in order to check its content but the application must continue to work.


Terminal emulators and btsync behavior

I've downloaded the BitTorrent Sync binary. The program only provides a Web UI interface. I'm trying to create a window for the daemon, using a terminal emulator, because I don't need an always online `btsync`. When I execute:               cd ~/.btsync/; konsole -e "./btsync --nodaemon"      the `btsync` daemon EXITS when i CLOSE the konsole window clicking the X button. When I run:               cd ~/.btsync/; uxterm -e "./btsync --nodaemon"      the `xterm` window STILL RUNS when I click the window close button. When I execute:               cd ~/.btsync/; urxvt -e "./btsync --nodaemon"      and I close the `rxvt` window, the `btsync` DAEMON STILL RUNS in background. I was trying to use `urxvt` to assign an icon and a title to the "daemon window" and my only solution was execute this script:               #!/bin/sh     cd ~/.btsync/     echo BitTorrent Sync Web UI: http://127.0.0.1:8888/gui/en/index.html     echo     exec ~/.btsync/btsync --log ~/.btsync/sync.log --nodaemon      using this command line in a `.desktop` file:               Exec=/usr/bin/urxvt -fn "xft:Inconsolata" -icon ~/.btsync/btsync.png -iconic -title "BitTorrent Sync" -e btsync; /bin/kill $(cat ~/.btsync/.sync/sync.pid)      using `/bin/kill` to close the daemon when the `rxvt` window closes. My question is: somebody knows why `konsole`, `xterm`, `rxvt` doesn't share the same behavior in this case? I can't use `x-terminal-emulator` to generalize my code for this reason, and I have multiple clients with different Linux desktop environments in use.


Move files to multiple folders

I've searched for this function, and there are lots of answers, but I haven't been able to find anything that works for me. I have a folder with about 30,000 files, and I want a terminal command or bash script that will move these files into different folders. About 3000 files for each folder. Some of the filenames have underscores, spaces and hyphens, so the command should allow me to move those files as well as the files without underscores, spaces, and hyphens. The files are .jpgs, but I'd like a command that I can customize for any file type and file amount, in case I need to use it in the future for different formats and quantities. **UPDATE:** I found a bash script that answers my needs. It will move files in a folder into subfolders. It works with any type of file. The number "3001" represents the number of files you want moved to each subfolder. This number can be changed. So if you have a folder with 20000 files and you want the 20000 files divided into batches of 500 and moved to subfolders then you would replace "3001" with "500". You can also modify the script to only move particular file types, e.g.: to move only .jpg files, change "for file in *" to "for jpg_file in *.jpg". Also change "$file" to "$jpg_file".               #!/bin/bash          c=1; d=1; mkdir -p dir_${d}          for file in *     do             if [ $c -eq 3001 ]             then                     d=$(( d + 1 )); c=0; mkdir -p dir_${d}             fi             mv "$file" dir_${d}/             c=$(( c + 1 ))     done


How to package software in Funtoo/Gentoo?

I am new in Funtoo/Gentoo. Where do I start learning how to create my own "packages"? For example, I have done the following to get the source code of Bespin, a _Style for Qt4, derived from the Style for the Oxygen project_ and compile it:   1. `svn checkout svn://svn.code.sf.net/p/cloudcity/code/ cloudcity-code`   2. `cd cloudcity-code/` and `less INSTALL`, `q` when done with reading   3. `mkdir build` && `cd build`   4. Configure Bespin using ccmake: `ccmake ../`   5. Press `c` for a general configuration -- _assuming all requirements are satisfied_   6. Optionally, adjust some paths to your wishes   7. Press `c` for the final config run   8. Press `g` to generate makefiles   9. Run the compiler: `make` At this point, I am hesitant to execute (as root) `sudo make install`. In other distributions I'd use checkinstall to create a .deb package, for example, which I could easily remove anytime. What is the right way to do this in Gentoo? ebuilds?


Man folders and MANPATH

This thread What do the numbers in a man page mean? answers the question of the significance of the **numbers between parentheses within a man page**. My question is related. I have a local installation of a package called `ffmpeg`. The build folder has the typical `bin`, `lib`, etc. and then the folder: **`man/man1/`** with the following files:               ffmpeg-bitstream-filters.1  ffmpeg-scaler.1  libavdevice.3     ffmpeg-codecs.1             ffmpeg-utils.1   libavfilter.3     ffmpeg-devices.1            ffmpeg.1         libavformat.3     ffmpeg-filters.1            ffplay.1         libavutil.3     ffmpeg-formats.1            ffprobe.1        libswresample.3     ffmpeg-protocols.1          ffserver.1       libswscale.3     ffmpeg-resampler.1          libavcodec.3      My questions are:   1. Why is there a subfolder under `man` called `man1`? Why not just in `man`? And why the suffix `1`?   2. Which path should I add to `MANPATH`? The one pointing to `man` ? or `man/man1`?   3. What do the suffices in the files above mean? Are they the same numbers within parentheses described in the thread I mentioned above?


Arch Linux failed to install libproxy for invalid signature

The following message is from my terminal:               resolving dependencies...     looking for inter-conflicts...          Targets (1): libproxy-0.4.7-2          Total Installed Size:   0.29 MiB          Proceed with installation? [Y/n]      (1/1) checking package integrity                                                                  [###############################################] 100%     error: libproxy: signature from "Evangelos Foutras<evangelos@foutrelis.com>"  is invalid     error: failed to commit transaction (invalid or corrupted package (PGP signature))     Errors occurred, no packages were upgraded.      How can I fix this problem?


Using wget, download a website translated by google translate

I want to download(recursively) http://e-maxx.ru/algo , after it has been translated to english using Google translate.


Setup ntp client with embedded device

I need to run an NTP client on a very limited embedded device. `ntpd` is available but I do not see anything like `rc.conf`, or `ntp.conf`, or `xntp.conf`? Can someone advise on how to setup NTP? I ran `ntpd`, but the date and time haven't updated.


Set permissions not to change permissions

Consider an example `File1.txt`, t3dev and ttuser own this file actually but When I use my id(user1) and edit this file, the file user and group are changed to my id(user1). I want to set the permissions where t3dev/ttuser will always be the user but user1 should be able to change/edit the files without changing the permissions... How can I do this?


How to efficiently create (read-only) both a snapshot and a diffshot at the same time?

I use `rsync` to regularly create snapshots of some directories via               PAR="-aP --chmod=a-w --no-owner"     # Create diffshot     rsync $PAR --compare-dest=$CURRENT_SNAPSHOT $SOURCE/ $DEST.changeset.incomplete     find $DEST.changeset.incomplete -type d -empty -delete     mv $DEST.changeset{.incomplete,}     # Create actual snapshot     LNK="--link-dest=$PREVIOUS --link-dest=$DEST.changeset"     rsync $PAR $LNK $SOURCE/ $DEST.incomplete     mv $DEST{.incomplete,}      such that `$DEST` contains a snapshot (hard-linking to the previous snapshot at `$PREVIOUS`) and `$DEST.changeset` contains a rudimentary diffshot, i.e. only the files which have been modified or created (but no information on simple `mv`s or file removal). To make the snapshots read-only I simply have `rsync` use `\--chmod=a-w` - the original permissions are not that important, since it's basically always `ug+w`, but I wonder if there are other, more efficient means to achieve read-only status. Anyway, my main question is > How can the two calls `rsync` be combined into one / sped up?


How can I use Synergy when connected through different routers?

I use synergy to control my laptop from my desktop when I have my laptop docked at my workstation. Currently, I need to keep my laptop wired to the same router that my desktop is connected to in order to use synergy. However, I will also take my laptop and work from other parts of the house. I'd like to use just wireless on the laptop, so I don't have to switch connections to get up and move around. My desktop has a wired connection to a router. When I'm using wireless on my laptop, I'm connecting through a different router. Is there a way to set up synergy to connect from the wireless router `192.168.17.*` to the wired network `192.168.250.*`? I don't know much about network set up or terminology, so if I'm not including any pertinent details, please ask.


How does the shell filename expansion delimit items within a ( * ) list?

I don't understand shell expansion fully yet (hopefully, one day soon I will)...   I saw this comment to a superuser question, but I think I'm still parked at the kerb... > Using Linux without the shell is like driving a Ferrari at 50 km/h through > city traffic. All fun will just go away ... I don't understand the following example.. What heirarchy, or whatever, is causing the 2nd example "array item count:" to be different to the 1st example? What happened to the shell introduced "space"?. or is it the `echo` which is introducing the space, and the shell is (perhaps) using \0?               #!/bin/bash     # Make a couple of files whose names contain a space.     junkd=$HOME/junkd     mkdir $junkd # || exit 1     cd $junkd     touch f\ {1..2}     #     echo -n * |xxd         # This shows a space between the two names.     names=$(echo -n * )     echo -n "$names" |xxd  # This shows a space between the two names.     #     # So far, it seems that the shell is inserting a space between each filename.     #     array=( $names )     echo "array item count: ${#array[@]}"      # 4 items... This shows that a space is the delimiter char ....     #     array=( * )     echo "array item count: ${#array[@]}"      # 2 items... What happened to the shell introduced space?     #


Is it possible to run a Vim clientserver instance over SSH+tmux

I've been a vim junkie for a year or so now and I've got some great little tricks burnt in to my memory. I do a lot of development (at the office) in a terminal on Ubuntu. One of the things I value most is having tmux taking care of my sessions so that if Gnome, or anything else, decides to kirk out then I haven't lost a thing. Additionally, I run a vim clientserver (C-b :neww 'vim --servername d') as one of my tmux windows and use it to receive any files I want to work with while I have my other tmux windows doing various jobs. It means I can have one vim open with no confusion about what I'm editing. When I'm working remotely (via SSH,) I connect to my tmux session and carry on but I have one problem: vim won't start a client-server instance. I presume it is X related but I can't seem to find the difference between a local tmux and a tmux via ssh.


Share files via bluetooth

I'd like to transfer files located on the harddrive of my laptop `Acer Travelmate 4002 WLMi` to my smartphone via bluetooth. My system is `Ubuntu 12.04`. I tried so far.               $ sudo service bluetooth start     bluetooth start/running, process 3315          $ sudo hcitool inq     Inquiring ...     Inquiry failed.: No such device          $ sudo rfkill list     0: phy0: Wireless LAN             Soft blocked: no             Hard blocked: yes      When I press the switch on the picture it won't turn on (yellow color). It's still turned off. In `Windows` OS it was possible to turn it on. ![enter image description here](http://i.stack.imgur.com/4nV9K.jpg) Here, I have stuck. Do you know how to succeed in transferring files?


Xfce sound level applet works wrong

I have installed Xfce4 on Debian testing. I'm using ALSA for sound driver. If I decrease volume level by using sound control applet in Xfce panel, there is no problem till "zero level". If I decrease volume to zero, I can not increase. (I can increase, but there is no sound). After digging a bit, I found out that if I decrease master channel volume to zero level, suddenly speaker channel mutes (and vice-versa). How can I fix the issue? ## Edit: I changed theme and stuff (I don't know what I did exactly) but now it works as expected. There is no problem right now.


Can you recommend a GUI text editor for a developer (features needed are inside)?

F-cked up with all IDE bloatware (for my purposes they are all overcomplicated and inconvenient), I came to an idea, that I'd probably better use a good editor than an IDE. I DON'T need projects, I don't need build management (I'd prefer to build manually, from command line, and write build scripts myself), I don't need perspectives, workspaces, modules, etc. I need (in importance descending order)   1. Nice GUI. (I am sorry to say this to be the first priority, but that's my taste, without it I feel uncomfortable and go unproductive). Please don't offer VIM (with no GUI) or [X]EMACS (with ugly GUI). No weird key scheme (like VIM has), no command modes (or optionally enablable and unimportant in the editor's usage), etc.   2. **Manually-definable foldable regions (like in c#)** (defined by special macroses, escaped by (any language's) comments) **in any language**. This is the most important requirement. If I find an editor meeting this point alongside with 1st one, I'd be happy already. In Windows, as far as I can remember, UltraEdit used to have this facility, but I am not sure (update: now I've installed UEx anc couldn't find such a feature there).   3. Simple, but swiss-clockwork-reliable refactoring, better to say sort of "multifile search-and-replace on steroids".   4. Syntax highlighting.   5. Corresponding open/close parentheses/braces/tags/quotes/etc. pairs highlighting.   6. Autocompletion. Probably simple, dictionary-based. Would be very nice if it could wok as an IDE, showing me class members after I put a dot and press Ctrl+Space, but I can afford lack of this feature if 1-4 features are there.   7. Code snippets / macrosses. **Explanation of point 2:** Those who are familiar with C# possibly know of #region/#endregion directives. I can place them anywhere in code, and the editor will offer an option to fold the block delimited into one line (with a title specified as the starting directive argument) and unfold it on demand (much as most of modern editors can do with language blocks, like function bodies for example, but I'd like to be able to do this with any particular block of code I want). IMHO it could be pretty easily implemented (in editors, that have already implemented code folding for language blocks) for ANY language, no language syntax analysis required. A region defining directives syntax can be provided by an editor, escaping those directives by a language's comment line syntax. For example, NetBeans IDE has this functionality for Java, it is well described here: http://wiki.netbeans.org/FaqCustomCodeFolds But in NetBeans this, unfortunately, works only with Java (and, maybe, some other) language, and doesn't work, for example, with Scala. I mostly code Scala, but, as I wrote, I'd wish, and can't see any reasons why couldn't be it made available as a language-agnostic feature - if the line contains "(whatever) #region" - this is a foldable region start, if there's something after "#region" in the line - this is the region title, if the line contains "(whatever) #endregion" - this is the region finish. Just find a start and a corresponding finish and fold it. User can replace "(whatever)" with any particular's language comment sign. **UPDATE: answer found** (just to summarize and share an answer in a more informative form, I'll include it here): There vere many good suggestions (I am going to experiment with SciTE and try learning EMACS and VIM when I'll have a proper mood). Googling myself I've also find an interesting E-TextEditor (an open-source wxWidgets-based (means cross-platform, there were successful efforts to build and install it on Fedora 10 and on Ubuntu 9.04) Mac's TextMate clone for Windows). But the answer for now, found thanks to fschmitt's suggestion, is Kate. To get my point #2 (above, in the question) for Scala (easily adaptable for any other language the way I've explained), I had only to add 2 lines in "/usr/share/kde4/apps/katepart/syntax/scala.xml":                    <RegExpr attribute="Decimal" context="#stay" String="//#region.*$" beginRegion="Region1"/>     <RegExpr attribute="Decimal" context="#stay" String="//#endregion.*$" endRegion="Region1"/>           I've taken the idea from C# syntax definition file, cs.xml. The only trick is that for this comment-aided hack to work these lines are to be placed before lines which define the language's comments. And a pleasant surprise there: Kate does not depend on tons of KDE libraries as I used to suppose - in classic (Gnome) Ubuntu 10.10 "apt-get install kate" has only downloaded one humble (less than a MiB) package.


Samba permissions don't apply

All groups exist and the users are in their belonging defined group.               [homes]     comment = Home Directories     admin users = @admin     browseable = no     read only = no     create mask = 0750      (Users can't write in their homes. Why?)               [pi]     comment = pi Home Folder     valid users = @admin     write list = @admin     path = /home/pi     read only = no     browseable = yes      (Users from admin group have no write rights. Why?)               [personal]     comment = files     valid users = danny     path = /home/danny/personal     read only = no     browseable = no      (User danny has no write access.)               [downloads]     comment = Download Folder     valid users = @users     write list = @admin     path = /home/danny/downloads     read only = no     guest ok = no      (Admins should have write access but they haven't got it.) Could you help me analyze the problem here?


Not able to set password in ArchLinux

I logged in as root and created a new account:               # useradd -d /home/onie -m onie     # su onie      Now I try to set the password for `onie` myself using the `passwd` command, but it's asking for my current password when I don't have one!


802.11ac Support in Fedora 20 (or any latest linux distro)

I bought a new HP Envy jt100 laptop (with an upgraded wireless card -- 802.11ac). The default OpenSUSE distro doesn't recognize the wireless card! I'm going crazy trying to figure out how to fix it, but meanwhile I want to ask the following: Do you know which Linux distro supports 802.11ac out of the box? Wireless Card: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)


Autocompletion and coloring not working, when using ssh in emacs shell

I'm connecting to remote server using `emacs shell`. Emacs shell displays directory listings with proper coloring and auto completion when working with local machine. But when I use `ssh` the autocompletion and coloring are gone. Same holds for `eshell`. Is there a way to fix this without resorting to `M-x term`? Because emacs keys don't work in `term` which is a real productivity killer. There is a similar question here. But that is rather about emacs in SSH instead of SSH in emacs.


File ID that doesn't change upon rename

I am trying to write a system utility script that will run as a cron job and capture file system statistics and environment settings in order to track as many changes as possible. Consider the following timeline               T0: there is a file /dir/fileX.txt     T1: job runs and captures every file and its stats (permissions, size, checksum etc), including /dir/fileX.txt     T2: mv /dir/fileX.txt /dir/fileY.txt     T3: job runs again and recaptures the file system.  But all it can tell is that fileX.txt was deleted and fileY.txt created      Is there some file ID that won't change if I rename the file that I can key all the files by rather than the name? That way, at T1 I would key the file but that ID and not the name and the file name would be just another attribute. At T3, I will be able to tell it is the same file but the name changed because the ID remains the same.


.Xauthority file is empty

I have been trying to `ssh -X` to my cluster running OpenSUSE 11.2. It used to work well for me. But now I get this message:               X11 connection rejected because of wrong authentication.     Failed to open the X11 display!      So I tried to check the ownership and permission of the `.Xauthority` file using               sudo ls -al .Xauthority      and I get to see that the file is empty with size 0:               -rw------- 1 <my-user-name> users 0 2014-07-31 10:03 .Xauthority      When I log in with `ssh -Xv` I get the following when i try to open `xlock`               debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384     debug1: client_request_x11: request from ::1 53267     debug1: channel 1: new [x11]     debug1: confirm x11     X11 connection rejected because of wrong authentication.     debug1: channel 1: free: x11, nchannels 2     Error: Can't open display: localhost:10.0      How would I fix this?


Overwriting a Disk

Should I use:   * `find / -type f -exec shred -uvz -nX` or just good old   * `dd if=/dev/urandom of=/dev/sda` Is one faster or more secure than the other?


VPN on Fedora Linux?

I'm looking to install and setup a VPN on my Linux installation which is Fedora 14. At the moment the only one I know of is OpenVPN but I'm wondering if this the best option for Fedora or if Fedora offers other options that are better? EDIT: Definitely looking for free solutions :)


How to make RHEL Workstation to boots up faster?

I am using RHEL 6.4. Problem is it takes too much time to boots up? Can you say, what can I do to be out of this situation?


How to permanently swap esc and caps lock in xfce / xubuntu?

I followed some post a while ago, and it said to make an `~/.xmodmap` file like so:               ! Swap caps lock and escape     remove Lock = Caps_Lock     keysym Escape = Caps_Lock     keysym Caps_Lock = Escape     add Lock = Caps_Lock      I did, and it now I can swap `esc` and `caps lock` by doing `xmodmap ~/.xmodmap`. I wanted this to be permanent, so I added that command to my `~/.bash_profile`, but it doesn't seem to work; I still have to manually `xmodmap`. As an EEng dropout, I am tempted to just rewire my keyboard }:-) but I know there must be a better way. How can I make this work, permanently?


How do I add a custom package to debian repository?

I run my own debian apt repository server. I have a .deb file that i would like to add into the repository (Adaptec Storage Manager deb). I need the ability to manage that package independent of the rest of the repo. Question: How can I add the .deb file to the repo so that I can do a 'apt-get storman' on the client machines and have it installed?


Can't install dpkg on Linux 2.6.18

I have a virtual machine that I am trying to use. It doesn't seem to have dpkg or apt-get, so I downloaded the source from http://packages.debian.org/sid/dpkg-dev. If I run ./configure followed by make I get               $ make     make  all-recursive     make[1]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8'     Making all in lib     make[2]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib'     Making all in compat     make[3]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat'       CC     empty.o     cc1: error: unrecognized command line option "-Wvla"     make[3]: *** [empty.o] Error 1     make[3]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat'     make[2]: *** [all-recursive] Error 1     make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8'     make: *** [all] Error 2      I tried $ ./configure --disable-compiler-warnings $ make to get ...                 CC     trigproc.o       CC     update.o       CCLD   dpkg     archives.o: In function `tar_writeback_barrier':     /home/dbadmin/temp/dpkg-1.16.8/src/archives.c:1139: undefined reference to `sync_file_range'     archives.o: In function `fd_writeback_init':     /home/dbadmin/temp/dpkg-1.16.8/src/archives.c:77: undefined reference to `sync_file_range'     collect2: ld returned 1 exit status     make[2]: *** [dpkg] Error 1     make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/src'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8'     make: *** [all] Error 2      This is my machine               $ uname -a     Linux server.name.domain.tld 2.6.18-194.26.1.el5xen #1 SMP Fri Oct 29 14:30:03 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux      How should I go about getting a functional package manager on this? **Update:** $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)


How to supress the display of previous job details?

When I run a process in the background the process ID gets displayed in the command prompt. For example:               $ gvim 1 &          [3] 9584      Now when I run another process the state of the previous one also gets displayed. For example:               $ gvim 2 &          [4] 9500          [3]   Done                    gvimBackground 1       Is there any way I can suppress displaying the current PID and the data related to previous processes?