How can I manually set a partition as my primary one in Debian 6.0?

While installing Debian 6.0 I went with manual partitioning and apparently messed up. The OS only loads if I start the computer in recovery mode and fdisk output doesn't have primary partition. AFAIK - I must have at least 1 primary partition for PC to boot - right? Is there a way to convert a partition from extended to primary? Currently my partition table looks like this:                  cme@cmehost:~$ sudo fdisk -c -l /dev/sda              Disk /dev/sda: 500.1 GB, 500107862016 bytes         255 heads, 63 sectors/track, 60801 cylinders         Units = cylinders of 16065 * 512 = 8225280 bytes         Sector size (logical/physical): 512 bytes / 512 bytes         I/O size (minimum/optimal): 512 bytes / 512 bytes         Disk identifier: 0x00010629             Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1        1216     9764864   82  Linux swap / Solaris     /dev/sda2            1216       60802   478618625    5  Extended     /dev/sda5   *        1216        6091    39158784   83  Linux     /dev/sda6            6092       60802   439458816   83  Linux      Here is my `/boot/grub/grub.cfg` file:               # DO NOT EDIT THIS FILE     #     # It is automatically generated by grub-mkconfig using templates     # from /etc/grub.d and settings from /etc/default/grub     #          ### BEGIN /etc/grub.d/00_header ###     if [ -s $prefix/grubenv ]; then       load_env     fi     set default="0"     if [ "${prev_saved_entry}" ]; then       set saved_entry="${prev_saved_entry}"       save_env saved_entry       set prev_saved_entry=       save_env prev_saved_entry       set boot_once=true     fi          function savedefault {       if [ -z "${boot_once}" ]; then         saved_entry="${chosen}"         save_env saved_entry       fi     }          function load_video {       insmod vbe       insmod vga       insmod video_bochs       insmod video_cirrus     }          insmod part_msdos     insmod ext2     set root='(hd1,msdos5)'     search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73     if loadfont /usr/share/grub/unicode.pf2 ; then       set gfxmode=640x480       load_video       insmod gfxterm     fi     terminal_output gfxterm     insmod part_msdos     insmod ext2     set root='(hd1,msdos5)'     search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73     set locale_dir=($root)/boot/grub/locale     set lang=en     insmod gettext     set timeout=5     ### END /etc/grub.d/00_header ###          ### BEGIN /etc/grub.d/05_debian_theme ###     insmod part_msdos     insmod ext2     set root='(hd1,msdos5)'     search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73     insmod png     if background_image /usr/share/images/desktop-base/spacefun-grub.png; then       set color_normal=light-gray/black       set color_highlight=white/black     else       set menu_color_normal=cyan/blue       set menu_color_highlight=white/blue     fi     ### END /etc/grub.d/05_debian_theme ###          ### BEGIN /etc/grub.d/10_linux ###     menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {         insmod part_msdos         insmod ext2         set root='(hd1,msdos5)'         search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73         echo    'Loading Linux 2.6.32-5-amd64 ...'         linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=19b27164-6e7a-4d55-89be-9986c2a5fe73 ro  quiet         echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-2.6.32-5-amd64     }     menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {         insmod part_msdos         insmod ext2         set root='(hd1,msdos5)'         search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73         echo    'Loading Linux 2.6.32-5-amd64 ...'         linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=19b27164-6e7a-4d55-89be-9986c2a5fe73 ro single          echo    'Loading initial ramdisk ...'         initrd  /boot/initrd.img-2.6.32-5-amd64     }     ### END /etc/grub.d/10_linux ###          ### BEGIN /etc/grub.d/20_linux_xen ###     ### END /etc/grub.d/20_linux_xen ###          ### BEGIN /etc/grub.d/30_os-prober ###     ### END /etc/grub.d/30_os-prober ###          ### BEGIN /etc/grub.d/40_custom ###     # This file provides an easy way to add custom menu entries.  Simply type the     # menu entries you want to add after this comment.  Be careful not to change     # the 'exec tail' line above.     ### END /etc/grub.d/40_custom ###          ### BEGIN /etc/grub.d/41_custom ###     if [ -f  $prefix/custom.cfg ]; then       source $prefix/custom.cfg;     fi     ### END /etc/grub.d/41_custom ###      I checked `/var/log/boot` and it is empty. Are there some other files I should check? :) **UPDATE** Well - I'm sort of beginning to believe that this might be some hardware issue. Since setup never even gets to grub menu. Anyway, I'll just nuke it and reinstall, no biggie. :) **UPDATE 2 - RESOLUTION** Ok - sorted! The problem as I found out was my honest belief that unetbootin was designed to allow us to install various OS'es from usb drives onto computers - which ...umm...was totally wrong. Unetbootin is a piece of software to create live usb drives so you can boot your PC from them. So, I simply had to recreate my install thumb drive like this:               cat image.iso > /dev/sdb1     sync      or               dd if=image.iso of=/dev/sdb1      And of course everything installed just fine and easily after that. Sorry for confusion everyone. ;)


Cannot load tun module

I cannot manage to load the tun module in my archlinux box. I'm trying to connect with openvpn, but the log says > nm-openvpn[6662]: Note: Cannot open TUN/TAP dev /dev/net/tun: No such device > (errno=19)               lsmod | grep tun      returns nothing. If I run               sudo modprobe tun      it returns failure, but no error message, and lsmod still has no tun. The module seems to exist, as there is a tun.ko.gz in /lib/modules/....... I really dont know what else to try. Thanks in advance


Linux installation to LiveCD?

I currently have a few VM images of both Debian and Ubuntu. I was thinking it might be nice to burn them as a live CD on DVD-media and carry it around with me in case I need it whatever reason. Is it possible to take my current Linux installation and burn it as a LiveCD or USB? The problem I thought I may have is the fact its on read only media. I'm using Debian and I may want to do this with Ubuntu as well.


Xubuntu 13.10 no login screen

I am using the android app so I may not format the question properly. I'm using xubuntu 13.10 64 bit. I had a problem recently with var permissions and I solved it like so http://askubuntu.com/q/431080/116070 It worked. Now I have another issue that just popped up, maybe it's caused by var maybe not. I can't see the login screen. Xubuntu keeps loading, you know that blue loading screen. Three services failed to start ![enter image description here](http://i.stack.imgur.com/VZRiR.jpg) How to debug and fix the problem?


OpenSUSE: Find all Packages without a repository

I just upgraded to OpenSUSE 12.2 from OpenSUSE 12.1 by changing all of my repositories to target 12.2 (instead of 12.1). Now that I've upgraded, I've found a bunch of packages that have no repository*, which the **YaST Software Manager** marks with red text in the version column. I can scroll through these and remove every single one, but I'm wondering if the **zypper** search (`zypper se`) or the **Software Manager** has any way to target/select all of these at once. *- These packages had a repository (OpenSUSE 12.1 something), but since I replaced those repositories with the 12.2 repositories, they no longer have a repository association. This doesn't create a problem, because the 12.2 repositories should contain everything I need to run my system.


subversion 1.6 file svn:externals help

Can someone please point out how I could do svn:externals for a single file? I know how to use svn:externals for directories, having used it for a while now under svn 1.4 but I can't seem to figure out how to do file externals in 1.6. I can't also figure out the documentation in the svn redbook here http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html. Thank you so much in advance. Ismael :)


In OS X Darwin, why can I interfere with text input across user sessions using cat?

# OS X Darwin: Disrupting Terminal Sessions Across User Identities * * * ## How, in Brief: with `cat < /dev/ttys_`, in Terminal. ## My Question This OS X 10.9.2 Darwin behaviour seems odd to me, and I would like to understand why it is happening, and whether or not it is an actual OS or Application bug. ## Steps to Reproduce Behavior   1. open two Terminal windows.    2. Note their device paths, i.e. "`/dev/ttys001`", "`/dev/ttys002`"   3. In one Terminal window (i.e. `/dev/ttys001`), execute `sudo -u [some other user] sh`.   4. In the other Terminal window (i.e. `/dev/ttys002`), execute `cat < /dev/ttys001` (or whatever the device path is.)   5. Back in the first window, type text. ## Unexpected Behavior When I type text in the relevant Terminal window, there is a noticeable lag; additionally, the characters do not appear reliably in either window. Some characters are echoed to the second window, some appear in the first window, and some seem to vanish. ## Unexpected Consequences The reason this concerns me is that it appears that a simple command executed by one unprivileged user can completely disrupt the session of another user. ## Anticipated Possible Causes   1. A text input bug in Terminal 2.4 (326)   2. A user privledges bug in OS X 10.9.2 Darwin


How to find unmatched brackets in a text file?

Today I learned that I can use `perl -c filename` to find unmatched curly brackets {} in arbitrary files, not necessarily Perl scripts. The problem is, it doesn't work with other types of brackets () [] and maybe <>. I also had experiments with several Vim plugins that claims to help finding unmatched brackets but so far not so good. I have a text file with quite a few brackets and one of them is missing! Is there any program / script / vim plugin / whatever that can help me identify the unmatched bracket?


Why does sh display an error when bash does not?

Why does the following script display an "unexpected operator" message and fail when run with SH, but not with BASH.               !/bin/sh     if [ $UID -ne 0 ]     then             echo "You must be root."             exit 1     else             echo "Open sesame."             exit 0     fi


Wine + uTorrent invisible text torrent name column

Is there any solution/workaround for missing name text column on uTorrent 3.4.30635-1 under Wine 1.7.14-1 ? i've tried to change preferences > advanced > sys.enable_wine_hacks, but it does nothing.. ![](http://i.stack.imgur.com/EFvNt.png)


How can I use Adwaita Dark for all applications (Gnome 3.4)?

I noticed that some applications use the Adwaita Dark theme, while others use the light one. Is there a way to make all applications use the Dark one?


View all user's printing jobs from the command line

I'm running Fedora 17, Gnome (3?), and using bash from terminal. Whenever I run `lpstat` I only get a list of my jobs, but every time I go to retrieve my jobs from the printer, somebody else is printing and mine hasn't even started! What gives? I want to view a list of all users' jobs, not just mine. I tried `lpq` to no avail. I've also tried `lpstat -t` and same result -- just my jobs, not anyone else's. What am I doing wrong here?


Show the time as well as the date that a file was modified?

How can I allow the file browser, in Ubuntu 14.04, to show the time as well as the date that a file was modified? For example, the image shows the day the files were Modified...but I cannot find an option to also show the time the files were modified. ![enter image description here](http://i.stack.imgur.com/MKzBz.png)


Single command to check if file exists, and print (custom) message to stdout?

Hope it's OK to note this, now that I've encountered it: I'm already aware that one can test for file existence using the `test` (`[`) command:               $ touch exists.file     $ if [ -f exists.file ] ; then echo "yes" ; else echo "no" ; fi     yes     $ if [ -f noexists.file ] ; then echo "yes" ; else echo "no" ; fi     no      ... but that's a bit of typing there `:)` So, I was wandering if there is a "default" single command, that will return the file existence result to `stdout`? I can also use `test` with the exit status `$?`:               $ test -f exists.file ; echo $?     0     $ test -f noexists.file ; echo $?     1      ... but this is still two commands - and the logic is also "inverse" (0 for success, and nonzero for failure). The reason I'm asking is that I need to test for file existence in `gnuplot`, whose " _`system("command")` returns the resulting character stream from stdout as a string._"; in `gnuplot` I can do directly:               gnuplot> if (0) { print "yes" } else { print "no" }     no     gnuplot> if (1) { print "yes" } else { print "no" }     yes      so I'd basically like to be able to write something like this (pseudo):               gnuplot> file_exists = system("check_file --stdout exists.file")     gnuplot> if (file_exists)  { print "yes" } else { print "no" }     yes      ... unfortunately, I cannot use that directly via `test` and `$?`:               gnuplot> file_exists = system("test -f exists.file; echo $?")     gnuplot> if (file_exists)  { print "yes" } else { print "no" }     no      ... I'd have to invert the logic. So, I'd basically have to come up with sort of a custom script solution (or writing a script inline as one-liner) ... and I thought, if there is already a default command that can print 0 or 1 (or a custom message) to stdout for file existence, then I don't have to do so `:)` (note that `ls` may be a candidate, but it's stdout output is far too verbose; and if I want to avoid that, I'd have to suppress all output and again return exist status, as in               $ ls exists.file 1>/dev/null 2>/dev/null ; echo $?      0     $ ls noexists.file 1>/dev/null 2>/dev/null ; echo $?      2      ... but that's again two commands (and more typing), and "inverted" logic...) So, is there a single default command that can do this in Linux?


Why doesn't rsync take advantage of the mv command when --remove-source-files is specified?

Assume I want to move a tree in the filesystem, e.g.               /path/to/a       a.txt       b.txt      to another location with `rsync` (3.0.9 protocol version 30), e.g. with `rsync -a --remove-source-files /path/to/a/ /path/to/b/`, why does `rsync` not find out that /path/to/a and /path/to/b are on the save filesystem (`rsync` is definitely capable of doing that, otherwise there would be no `-x` argument - the functionality would have to be made available without specification of `-x`) and uses the `mv` command which will probably profit from filesystem level manipulation, like changing links and inodes instead of reading, wrting and deleting all files in the tree? **EDIT 1:** I experienced reading and writing instead of usage of `mv` on an ext4 and a reiserfs file system. I'm not looking for inputs like "it simply doesn't, patches welcome", but whether there're some explicit and possibly documented or discussed decisions regarding the design or use cases (like e.g. Gilles' answer).


How to list all the installed package in fedora with the time of the installation

I can list them use > sudo yum list installed but how to make them display when each were installed?


Bodhi Issue with Nautilus as SU

I am unsure how to run Nautilus with superuser privilieges on Bodhi, or if this is just a bad idea altogether. I am looking for a file manager that can browse my local network, and can be run as superuser. Nautilus works in these respects, but has side-effects. If I need to make adjustments, and want to browse my network, what can I be doing better? When I run `sudo nautilus` I get a big blue window covering my desktop and the following output in LXTerminal:               (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:81:18: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:111:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:117:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:121:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:127:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:134:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:141:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:145:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:156:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:163:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:170:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:177:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:186:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:196:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gnome-applications.css:87:24: 'px' is not a valid color name          (nautilus:3690): Gtk-WARNING **: Theme parsing error: gnome-applications.css:108:18: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: granite-widgets.css:167:28: 'px' is not a valid color name          (nautilus:3690): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:18:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:38:23: Horizontal and vertical offsets are required          (nautilus:3690): Gtk-WARNING **: Theme parsing error: lightdm-gtk-greeter.css:57:23: Horizontal and vertical offsets are required          ** (nautilus:3690): WARNING **: Can not calculate _NET_NUMBER_OF_DESKTOPS          ** (nautilus:3690): WARNING **: Can not calculate _NET_NUMBER_OF_DESKTOPS          ** (nautilus:3690): WARNING **: Can not get _NET_WORKAREA          ** (nautilus:3690): WARNING **: Can not determine workarea, guessing at layout


ifconfig not showing changed ip address

I'm trying to configure IP settings on my Raspberry Pi running Rasperian. I edited /etc/networks/interfaces to be:               auto lo          iface lo inet loopback     iface eth0 inet static     address 110.76.71.106     netmask 255.255.255.0     network 110.76.71.0     broadcast 110.76.71.255     gateway 110.76.71.1     dns-nameserver 143.248.1.177          allow-hotplug wlan0     iface wlan0 inet manual     wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf     iface default inet dhcp      after that, I came back to bash and types 'ifconfig' and the result was like this:               eth0      Link encap:Ethernet  HWaddr b8:27:eb:e0:70:ca                 UP BROADCAST MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)          lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      as far as I know, beneath the 'Link encap:Ethernet HWaddr b8:27:eb:e0:70:ca' line, there should be something like 'inet addr:110.76.71.106 Bcase:110.76.71.255 ...blahblah'. What could I have done wrong? * * * P.S. when I'm doing this, I'm not yet plugging the LAN cable to the raspberry pi. Could this be a reason why the correct 'ifconfig' result doesn't show up?


Better way to copy multiple directories to new directory

Is there a better way on the command line to essentially accomplish the following but with a single command               cp -r css/ ar/     cp -r images/ ar/     cp -r js/ ar/     cp -r backups/ ar/      I've just been stringing them together with a semicolon.


Can we use history file for auditing purpose

We have a common testing environment on AIX for all 15-20 persons. There might be chances that somebody deleted the files mistakenly. In such scenarios, it is very difficult to know who deleted files from a specific location. I would like to generate a report for that same so that we can trace it. In fact, I am looking for following information : < ExecutedCmd> How can we do that by using shell script ? Please suggest.


Mount /etc from disc into squashfs

I've created a gentoo-live system which should be booted from a CF-card. The whole file-system is in a squashfs. I've created a custom initrd which first mounts the CF-card and from there the squashed filesystem into what will become `/`. I'd like `/etc` to be writable so I've copied it to the CF-card added a bind. This however does not seem to work. The system boots but /etc is not mounted. I'd like to know if my approach is right and what I can do to fix it or if not what would be the right way to achieve this. Here's the `init-script` from my `initrd`:               #!/bin/busybox sh     mount -t proc none /proc     mount -t sysfs none /sys          mount /dev/sda1 /mnt/flash     mount -o loop /mnt/flash/filesystem.squashfs /mnt/root     mount -B /mnt/flash/etc /mnt/root/etc     mount -o remount,rw /mnt/root/etc          umount /proc     umount /sys          exec switch_root /mnt/root /sbin/init      This is the shortened output of `cat /proc/mounts`:               rootfs / rootfs rw 0 0     /dev/sda1 /mnt/flash ext2 rw,relatime,errors=continue,user_xattr,acl 0 0     /dev/loop0 / squashfs ro,relatime 0 0     ...


script failing with "chmod: ... Operation not permitted"

A script of mine works fine when I run it, but fails when run by a different user, with an error of the form               chmod: changing permissions of `/A/B/C/D/E': Operation not permitted      (Here `/A/B/C/D/E` is a directory. FWIW, the script resides in `/A/B/C/D`.) In case it matters, the permissions structure of the directory in question and all its ancestors is as follows:               drwxrwsrwx kjo11 proj1 /A/B/C/D/E/     drwxrwsrwx cwr8  proj1 /A/B/C/D/     drwxrwsr-x root  proj1 /A/B/C/     drwxrwsr-x root  proj1 /A/B/     drwxr-xr-x root  root  /A/     drwxr-sr-x root  root  /      (In this listing, `kjo11` is my `$USER` name. As it happens, `cwr8` is the `$USER` name of the user for which the script fails. In any case, we are both in the `proj1` group.) The output of `uname` is `Linux`. I'm stumped. The only detail that catches my attention is that the error is `Operation not permitted`, as opposed to `Permission denied`, but I can't make anything more out of this. What conditions can cause such errors on running `chmod`?


Follow a moved file to its destination directory

Is there a way to move a file from a directory to another and then cd into the latter in one command? Something like `mv /a/file /another/dir && cd _` but without typing second time the directory path.


How do you omit "./" when running scripts on current directory

On some tutorials over the internet they can run a script on the current directory without doing: `./script` How do you omit this? I am using CentOS 5.6 x64. I want to run it this way `script`


Detecting monitors on machine over local ssh connection

I need to write a script to check on video related things on machines in the local network, e.g.   * Is a monitor plugged in?   * Are the video drivers up to date and appropriate for the hardware?   * Is Xorg running? However I am having trouble finding a reliable way of telling if a monitor is plugged in across a local ssh connection. For instance, if I ssh from machine A into another machine B that's on the same subnet, the `xrandr` tool returns information about the monitor plugged into machine A instead of machine B. I have tried a number of other tools, but all give the same effect. How can I be sure that I'm probing the monitor plugged to the machine that I'm connected to rather than the machine where I'm running the shell session?


gvim pipes not reading zshrc when started from desktop

I'm using `zsh` as my default shell and using `.zshrc` to modify my environment variables. When I start `gvim` from terminal everything is fine however if I start gvim with the desktop icon, my env variables are gone. (Just to clear it out, `:shell` is fine but `:!` commands are not) I have tried to move my environment variables to `.zprofile` but it didn't work. If I move them to `.profile` it works but then again I need to duplicate my variables as `zsh` does not read `.profile` I don't know much about the internal handling of shells in `gvim`. Is it possible read `.zshrc` or `.zprofile` for `:!` commands? **Note:** I'm using an `ubuntu` system. Any elegant solution involving the OS are also welcome.


How to access GNOME header in Qt project

I'm working on developing a Qt/C++ application for Linux distros which has a module which deals with icon overlays. I need icon overlays exactly like in svn or dropbox. First I'm starting with GNOME environment. I found that I need to access APIs provided by nautilus, for example for icon overlay, I need to use the API - **nautilus_file_info_add_emblem()** which is part of **nautilus-file-info** Link - https://developer.gnome.org/libnautilus-extension/stable/libnautilus- extension-nautilus-file-info.html How do I access the nautilus file managers' headers in my Qt/C++ project ? Thank you.


rsync "skipping non-regular file" when cloning my Aperture library

I am trying to use rsync to maintain a backup copy of my Aperture library. When I run the sync command to see what would happen this is the outcome:               rsync --dry-run -r "/Volumes/Data/Aperture Library.aplibrary" "/Volumes/Backup"          skipping non-regular file "Aperture Library.aplibrary/Database/BigBlobs.apdb"     skipping non-regular file "Aperture Library.aplibrary/Database/Faces.db"     skipping non-regular file "Aperture Library.aplibrary/Database/History.apdb"     skipping non-regular file "Aperture Library.aplibrary/Database/ImageProxies.apdb"     skipping non-regular file "Aperture Library.aplibrary/Database/Library.apdb"     skipping non-regular file "Aperture Library.aplibrary/Database/Properties.apdb"      The "file" command says that at least the ".db" file is a "SQLite 3.x database". How can I sync these files with rsync?


epiphany plugin for password storage

I am looking for a keepass plugin for epiphany. Something like PassIFox for Firefox: PassIFox "behaves" like a new password storage for firefox - and redirects all queries (fetch/store etc..) to keepass. Since I am not sure whether such a plugin exists for epiphany I'd also take every hint on how to create a similar plugin for epiphany...


What are ways to encrypt a password inside an environment variable

I have this file I use to set my username and password before exporting the value.               #!/bin/bash     echo -n "User:";     read user     echo -n "Password:";     read -s password          export http_proxy=http://$user:$password@$domain:$portnum          if curl -silent http://www.google.com | grep authentication_failed;     then             echo NO CONNECT             unset http_proxy     else             echo OK     fi      in `history`, `printenv`, and `export -p` I'm able to see the value that I have set furthermore, I'd like an encrypted form of my password inside $password, versus that value containing my password verbatim. I'm familiar with using openssh to salt passwords, or printing hash using perl's crypt(), but for my purpose, I cannot see it's usage? any tips will be appreciated?


Is there a way to empty the trash/wastebasket from the command line?

This would be great especially considering the latest version of Ubuntu is very slow when displaying directories on my PC...


How to mount removable media in /media/<LABEL> automatically when inserted, without any desktop environment?

I have a Debian sid system (Wheezy) (and same for arch), without any desktop environment (and no Xorg at all). I can mount my SD-cards, USB sticks, external HDD by label into a specified directory in `/media/` manually with `mount` / `umount` and the suitable entries in `/etc/fstab`, or automatically at boot time, but this is compelling, to restrictive and not dynamic enough for my needs: if I want them to be mounted in `/media/<LABEL>`, each device with a different `<LABEL>` needs its own entry, and each `<LABEL>` subdirectory needs to be created / removed manually in `/media/` as well). So, what is the best way to mount them **automatically** in `/media/<LABEL>` **at insertion** (and to unmount them from the filesystem as soon as they are unplugged **no matter how risky it is for the data** )? The ideal solution would:   1. detect when a removable media is plugged-in (i.e. when added in `/dev/` as `sdax`, `sdbx`, ... by `udev`)    2. create a directory in `/media/` according to its label (label of the removable media)   3. mount it in the directory `/media/<LABEL>` in `RW` mode (if it's filesystem supports that) with `flush` option (for a `vfat`)    4. detect if the media has been unplugged   5. if then, unmout it from the filesystem   6. remove the corresponding directory from `/media/` (the devices should be mounted in synchronous mode oviously, to avoid any data loss when hot unplugged because of caching **edit:** `sync` is way too much for `vfat` removable media so `flush` has been created as a compromise, less secure than `sync`, but less risky according to the life-cycles of flash memories) I found some info about `autofs`, `HAL`, `udisks`, `udisks2`, `usbmount` etc., but it's unclear which one is deprecated or preferred, and anyway, I haven't figured out how to configure them easily on my system to do that, up to now ...


Forcing a fullscreen game to run windowed?

I'm having some issues with fullscreen games ruining my display and forcing me to reboot. I'm wondering if there's a way to trick the game into thinking its going in fullscreen, when really I've restricted it to a window. Is this possible? Here is the output of `ldd`:               linux-gate.so.1 =>  (0xffffe000)     libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xf76d7000)     libfltk.so.1.1 => not found     libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xf7636000)     libSDL_ttf-2.0.so.0 => not found     libSDL_image-1.2.so.0 => not found     libGL.so.1 => /usr/lib/libGL.so.1 (0xf75ce000)     libGLU.so.1 => /usr/lib/libGLU.so.1 (0xf755a000)     libCg.so => not found     libCgGL.so => not found     libopenal.so.0 => not found     libalut.so.0 => not found     libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf746a000)     libm.so.6 => /lib/libm.so.6 (0xf7440000)     libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7422000)     libc.so.6 => /lib/libc.so.6 (0xf72b4000)     libpthread.so.0 => /lib/libpthread.so.0 (0xf7299000)     libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xf726e000)     libogg.so.0 => /usr/lib/libogg.so.0 (0xf7266000)     libasound.so.2 => /usr/lib/libasound.so.2 (0xf7181000)     libdl.so.2 => /lib/libdl.so.2 (0xf717c000)     libX11.so.6 => /usr/lib/libX11.so.6 (0xf703e000)     libXext.so.6 => /usr/lib/libXext.so.6 (0xf702c000)     libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xf7028000)     libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xf7022000)     libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xf701c000)     libdrm.so.2 => /usr/lib/libdrm.so.2 (0xf700e000)     /lib/ld-linux.so.2 (0xf770c000)     librt.so.1 => /lib/librt.so.1 (0xf7004000)     libxcb.so.1 => /usr/lib/libxcb.so.1 (0xf6fe4000)     libXau.so.6 => /usr/lib/libXau.so.6 (0xf6fe0000)


Identify remote windows server from shell script

I need a way to Identify a windows SBS server, I have a script that mounts a file share on a SBS server, I need the script to positivity identify the server before mounting. It doesn't need to be secure, My setup is like this : My machine is on 192.168.5.17, the server is on 192.168.0.3, Because were on different subnets I cannot simply check the arp table for the machines mac address. running Nmap against the server reveals these open ports               Starting Nmap 6.00 ( http://nmap.org ) at 2012-08-01 09:01 BST     Nmap scan report for host.somewhere.local (192.168.0.3)     Host is up (0.12s latency).     Not shown: 979 closed ports     PORT      STATE SERVICE     21/tcp    open  ftp     80/tcp    open  http     119/tcp   open  nntp     135/tcp   open  msrpc     139/tcp   open  netbios-ssn     443/tcp   open  https     445/tcp   open  microsoft-ds     563/tcp   open  snews     1025/tcp  open  NFS-or-IIS     2002/tcp  open  globe     2301/tcp  open  compaqdiag     2381/tcp  open  compaq-https     2910/tcp  open  tdaccess     3389/tcp  open  ms-wbt-server     4443/tcp  open  pharos     6129/tcp  open  unknown     8192/tcp  open  sophos     8193/tcp  open  sophos     8194/tcp  open  sophos     9000/tcp  open  cslistener     10000/tcp open  snet-sensor-mgmt          Nmap done: 1 IP address (1 host up) scanned in 20.70 seconds      The Nmap results show > Nmap scan report for host.somewhere.local (192.168.0.3) How did it reslove the name i've tried dig and host but cannot get the name from the IP The machine runs https can I somwhow check the cert from a bash script? Or is their another way to check the host is actually who I expect it to be? Thanks.


How to define a Compose Key in terminal (no desktop environment)?

I would like to define a `compose` key on my system (Debian Sid "Wheezy"). I have no Xorg (and don't want any desktop environment). Only in terminal. I would like to set it up on my `Alt-Gr` key (right `Alt`). I've tried for a while but I can't figure out how to set it up. I've been investigating and found some directions:   * `$ showkey` gives me the keycode of my `Alt-Gr` key (#100)   * `$ dumpkeys` and `$ dumpkeys --compose-only` output "the current contents of the keyboard's driver", in the format specified by `keymaps`, according to the `man` page   * `$ loadkeys` load a keyboard translation table I'm sure it's not that difficult but I miss how to deal with that ...


Understanding IFS

The following few threads on this site and StackOverflow were helpful for understanding how `IFS` works:   * What is IFS in context of for looping?   * How to loop over the lines of a file   * Bash, read line by line from file, with IFS But I still have some short questions. I decided to ask them in the same post since I think it may help better future readers: **Q1.** `IFS` is typically discussed in the context of "field splitting". Is **field splitting** the same as **word splitting** ? **Q2:** The POSIX specification says: > If the value of IFS is null, no field splitting shall be performed. Is setting `IFS=` the same as setting `IFS` to null? Is this what is meant by setting it to an `empty string` too? **Q3:** In the POSIX specification, I read the following: > If IFS is not set, the shell shall behave as if the value of IFS is > `<space>, <tab> and <newline>` Say I want to restore the default value of `IFS`. How do I do that? (more specifically, how do I refer to `<tab>` and `<newline>`?) **Q4:** Finally, how would this code:               while IFS= read -r line     do             echo $line     done < /path_to_text_file      behave if we we change the first line to               while read -r line # Use the default IFS value      or to:               while IFS=' ' read -r line


Fluxbox Sytem Tray adding more and more whitespace

My problem is, that some apps seem to remove their needed space in the system tray after remving the icon. For example, when plugging/unplugging my AC, the xfce-powermanager icon changes and adds whitespace to the tray. Is there a way to configure the System Tray, so it notices the empty space? Restarting Fluxbox works, but that seems a very hackish way. ![Fluxbox System Tray Whitespaces](http://i.stack.imgur.com/UATry.png)


Using sed to convert newlines into spaces

Say I have a shell variable `$string` that holds some text with several newlines, e.g.:               string="this     is      a test"      I would like to convert this string into a new string `new_string` where all line breaks are converted into spaces:               new_string="this is a test"      I tried:               print $string | sed 's/\n/ /g'      but it didn't work I'm also wondering if there is a way of doing this using `perl -0777 's/\n/ /g'` or maybe the command `tr` ?


Pipe zsh auto completion list to file or less

> zsh: do you wish to see all 923 possibilities (462 lines)? Yes please, but in a file or less.


What are stripped and not-stripped executables in Unix?

From man file,               EXAMPLES        $ file file.c file /dev/{wd0a,hda}        file.c:   C program text        file:     ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),                  dynamically linked (uses shared libs), stripped        /dev/wd0a: block special (0/0)        /dev/hda: block special (3/0)        $ file -s /dev/wd0{b,d}        /dev/wd0b: data        /dev/wd0d: x86 boot sector        $ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10}        /dev/hda:   x86 boot sector        /dev/hda1:  Linux/i386 ext2 filesystem        /dev/hda2:  x86 boot sector        /dev/hda3:  x86 boot sector, extended partition table        /dev/hda4:  Linux/i386 ext2 filesystem        /dev/hda5:  Linux/i386 swap file        /dev/hda6:  Linux/i386 swap file        /dev/hda7:  Linux/i386 swap file        /dev/hda8:  Linux/i386 swap file        /dev/hda9:  empty        /dev/hda10: empty             $ file -i file.c file /dev/{wd0a,hda}        file.c:      text/x-c        file:        application/x-executable, dynamically linked (uses shared libs),        not stripped        /dev/hda:    application/x-not-regular-file        /dev/wd0a:   application/x-not-regular-file      What does executable stripping mean? Why are some of the executables stripped while others are not?


What problem have I caused to eth1 by resetting my ubuntu machine?

I am using ubuntu 10.04 (Bio-linux 6.0). Last night I tried leaving my system in hibernate mode because there appears to be a bug in this version of ubuntu such that if I do a straight shut-down, the machine will boot up by itself some time overnight. This morning I could not bring the system back up from hibernate so had to hold down the power button to reset. Upon restarting I found my network connections (wired) had disappeared. I eventually found the following code online:               sudo service network-manager stop     sudo rm /var/lib/NetworkManager/NetworkManager.state     sudo service network-manager start      Fortunately running this code returned my auto eth0 connection. However, I used to also have a connection called auto eth1, and this appears no longer to be present. My question therefore has three parts:   * What is auto eth1?   * Do I need to get it back?   * How do I get it back?


How come sed is so fast?

I thought about whether this question is suitable for SE or not, I hope you agree it is. Some time ago I asked on SE how to find text in files and leave the file with only the matching lines that contain the text I was searching for. The question is here: How to find text in files and only keep the respective matching lines using the terminal on OS X? While the answer worked perfectly I now wonder, how come `sed` is so fast? In my use case, I had quite a lot of files which in total were about 30 Gb in size. The `sed` command ran in about 12 seconds which I never would have believed (working with a normal HDD). Within 12 seconds the command read through 30 Gb of text, truncating each file to only keep the respective lines I was filtering for. **How does this work?** (or: what is this sorcery?) The actual command was:               find . -type f -exec sed -i'' '/\B\/foobar\b/!d' {} \;


Why is exim4 listening on port 25?

Am I misinterpreting the results of `netstat -anp --tcp --udp | grep LISTEN` wrong, or does the output mean, that the process exim4 is listening to the outside on port 25:               tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1960/exim4                 tcp6       0      0 ::1:25                  :::*                    LISTEN      1960/exim4          Could this be considered a security risk in a default Debian installation?


Dual Boot and encrypting Linux?

I have Windows and want to install encrypted Ubuntu (Home + Swap + System) - it giving me that option during installation when I'm choosing partitions so my question is will I be able to boot both Windows and Ubuntu when I encrypt Ubuntu or will it break Dual Boot ?


How can I test the current carrier state for an ethernet adapter in Linux?

In Arch Linux, how can I check if a network device (say `eth0`) has a carrier signal present?


How to setup a simple email daemon with autorespond and mail forwarding?

Since my mail provider unfortunately offers neither an autoresponder nor forwarding mail to others during vacancy, I'd like to setup e.g. a RaspberryPi to regularly check my mail account (via POP3 or IMAP), and react on new email by sending an autoreply à la "I'm currently on vactation" to the sender (maybe with some smart only-once-per-week-and-recepient mechanism) and redirecting (not forwarding; i.e. resending the original mail) the mail to someone else (without deleting it of course). What's the simplest way to achieve this? Solutions that do not require me to set up my own mailserver would be appreciated... **edit** Sending should simply use SMTP on the same account the mail is retrieved from, i.e. basically the solution should simply automate what I can locally already do using Thunderbird, without requiring any mailserver setup **edit2** Could a simple cronjob involving `mutt` suffice for this?


Filter a list of strings using math

I have a directory with files listed like so:               abc201303130110.txt     abc201303140511.txt     abc201303150112.txt      As you can see, the filename contains a datetime stamp. I want to return all files with the value `201303140000` or higher in the filename. I can get use grep to grab the datetime portion of the filename, but I don't know how to pipe through a filter that can do something like `X > 201303140000`.


Races when piping two commands to a named pipe

I want to have one process reading from a named pipe that receives data from multiple sources:               $ mkfifo /tmp/p      But I can't figure out how to get it to work consistently. ## First Scenario - this works **tty1** : Set up two processes to write to my fifo; both of these will block:               $ echo 'first' > /tmp/p; echo 'second' > /tmp/p      **tty2** : Read from the pipe:               $ cat /tmp/p     first     second      This still works if I execute the above in reverse order My problem comes when I have two separate commands that I want to come out of the pipe: ## Second Scenario - does not work **first.sh**               #!/bin/sh     echo 'first' > /tmp/p      **second.sh**               #!/bin/sh     echo 'second' > /tmp/p      **tty1**               $ sh first.sh; sh second.sh      **tty2**               $ cat /tmp/p     first      The execution of `sh second.sh` from my first tty will block indefinitely, until something else reads from the named pipe. ## What I think is happening From http://linux.die.net/man/7/pipe: > If all file descriptors referring to the write end of a pipe have been > closed, then an attempt to read(2) from the pipe will see end-of-file > (read(2) will return 0) So when `echo` exits in `first.sh`, the shell executing it closes the file descriptor for `/tmp/p`, which means that `cat` in my second TTY sees EOF. How do I get around this with the shell? Is there a way to keep a reference to the read end of the named pipe around in my main controlling script, so that it doesn't get closed when sub-shells exit? In practise, I will be passing the path to the named pipe to the sub-shells. Do I need to just make my subshells output to their own stdout and perform a redirection on them? I feel like there's something I'm missing here. Using named pipes has been simple and straightforward for everything I've tried to do aside from this case.


Does Linux have ways to cache IO with memory

My server has a large amount of memory. However, the amount of IO (each of which is small) is very high. Is there a way to make a virtual drive out of portion of the memory? I realize I can also use SSD, but those are expensive. I need both speed and size. So memory only won't work. Data not often accessed should be in hdisk.


If I have an SSD and a hard disk in a system, can the SSD act as cache for the hard disk?

Say I have some partitions; one on a SATA drive and one on an SSD. I want to create a "virtual" hybrid disk. Is this possible?


mpirun with ssh and X11

At present we're trying to write a program which uses mpirun to launch multiple X11 clients. If the programs are text-only, then using the following command, we can run proceses on a list of computers:               mpirun -np 4 --hostfile hostlist date      Here hostlist is a file of mpi-configured computers. The computers are set up to authenticate automatically using public keys. We can also run X11 programs on the local computer only, for instance:               mpirun -np 4 xclock      shows four xclocks as expected. However, if we try to run X11 programs using a hostfile:               mpirun -np 4 --hostfile hostlist xclock      then two xclocks launch but the remote computer reports:               Error: can't open display:      However, we have configured _.ssh/config_ with               ForwardX11 Yes      And we can verify that the following command sequence works:               ssh 10.0.0.2     # connect to mpi cluster node     xclock     # xclock appears on screen      Furthermore, if we set a DISPLAY variable with mpirun's -x as follows:               mpirun -np 4 --hostfile hostlist -x DISPLAY=10.0.0.1:0.0 xclock          Then we get another error:               Error: can't open display: 10.0.0.1:0.0      We tried to disable any access control with:               xhost +      To summarize, we'd like some help with mpirun and X11 Forwarding. We're running on Ubuntu 12.10 and openmpi 1.4.5.


Awesome & youtube

I run Awesome WM on Ubuntu. Recently when I try to watch youtube videos in full screen they have been playing in a small letter box - They have not 'full screened'. In the other hand, Vimeo & Dailymotion videos work correctly. NOTICE! This is NOT the problem of a youtube video appearing 'behind' the browser. I already have that fix in my rc.lua:                -- Fix for youtube fullscreen in chrome:     {       rule = {         instance = "exe"       },       properties = { floating = true }     },      This applies to Chrome and Firefox. How can I fix the issue so I can view youtube videos in full screen mode again?


Copying only differences?

I want to recursively copy one directory over another, however I only want to copy differences. The reason is that I'm doing this on Solaris on a volume which is snapshot, i.e. if I'm copying 100gig across to a directory that already contains 100gig but only 5gig is different I don't want the whole 100gig to be copied across as that will fill the disk with 200gig of data (100gig of new data and 100g of old data held by the snapshot). I want the final result to only take 105gig of space (i.e. 5 gig of new data and 100 gig of old data). Removing the snapshot isn't an option as we need a quick rollback option. It would great to only copy differences on a block basis, but even copying entire files only if they're different would be ok. The `-u` of `cp` won't work as the files at the destination may have newer timestamps. Also, I should note that the source and destination directories are on different volumes. How can I do this?


How to add another OS entry in Wubi grub

I am trying to install another linux distro besides ubuntu. However, I want to retain my existing windows based loader. Currently, as per my knowledge, MsDos loads grub which then loads Ubuntu (with loop back trick). Now, I have a new linux distro installed on /dev/sda8 (/boot for new distro) where as /root for that OS is installed on /dev/sda9. I tried following steps 1. Add entry into 40_custom of ubuntu grub 2. update grub But upon booting via that entry, it is not able to load the new OS and shows me blank screen. What could be the problem? Additional data:   1. grub.cfg file of ubuntu > >     menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu > --class os $menuentry_id_option 'gnulinux-simple- > fc296be2-8c59-4f21-a3f8-47c38cd0d537' { >       gfxmode $linux_gfx_mode >       insmod gzio >       insmod ntfs >       set root='hd0,msdos5' >       if [ x$feature_platform_search_hint = xy ]; then >         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 > --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  01CD7BB998DB0870 >       else >         search --no-floppy --fs-uuid --set=root 01CD7BB998DB0870 >       fi >       loopback loop0 /ubuntu/disks/root.disk >       set root=(loop0) >       linux   /boot/vmlinuz-3.5.0-19-generic root=UUID=01CD7BB998DB0870 > loop=/ubuntu/disks/root.disk ro   quiet splash $vt_handoff >       initrd  /boot/initrd.img-3.5.0-19-generic >     } >     submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux- > advanced-fc296be2-8c59-4f21-a3f8-47c38cd0d537' { >       menuentry 'Ubuntu, with Linux 3.5.0-19-generic' --class ubuntu --class > gnu-linux --class gnu --class os $menuentry_id_option > 'gnulinux-3.5.0-19-generic-advanced-fc296be2-8c59-4f21-a3f8-47c38cd0d537' > { >           gfxmode $linux_gfx_mode >           insmod gzio >           insmod ntfs >           set root='hd0,msdos5' >           if [ x$feature_platform_search_hint = xy ]; then >             search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 > --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  01CD7BB998DB0870 >           else >             search --no-floppy --fs-uuid --set=root 01CD7BB998DB0870 >           fi >           loopback loop0 /ubuntu/disks/root.disk >           set root=(loop0) >           echo    'Loading Linux 3.5.0-19-generic ...' >           linux   /boot/vmlinuz-3.5.0-19-generic root=UUID=01CD7BB998DB0870 > loop=/ubuntu/disks/root.disk ro   quiet splash $vt_handoff >           echo    'Loading initial ramdisk ...' >           initrd  /boot/initrd.img-3.5.0-19-generic >       } >       menuentry 'Ubuntu, with Linux 3.5.0-19-generic (recovery mode)' > --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option > 'gnulinux-3.5.0-19-generic-recovery-fc296be2-8c59-4f21-a3f8-47c38cd0d537' { >           insmod gzio >           insmod ntfs >           set root='hd0,msdos5' >           if [ x$feature_platform_search_hint = xy ]; then >             search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 > --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  01CD7BB998DB0870 >           else >             search --no-floppy --fs-uuid --set=root 01CD7BB998DB0870 >           fi >           loopback loop0 /ubuntu/disks/root.disk >           set root=(loop0) >           echo    'Loading Linux 3.5.0-19-generic ...' >           linux   /boot/vmlinuz-3.5.0-19-generic root=UUID=01CD7BB998DB0870 > loop=/ubuntu/disks/root.disk ro recovery nomodeset >           echo    'Loading initial ramdisk ...' >           initrd  /boot/initrd.img-3.5.0-19-generic >       } >     } >   >     ### END /etc/grub.d/10_lupin ### >   >     menuentry 'Linux, with Linux core repo kernel' --class arch --class gnu- > linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo > kernel-true-0f490b6c-e92d-42f0-88e1-0bd3c0d27641'{ >       load_video >       set gfxpayload=keep >       insmod gzio >       insmod part_msdos >       insmod ext2 >       set root='hd0,msdos8' >       if [ x$feature_platform_search_hint = xy ]; then >         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 > --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 > 0f490b6c-e92d-42f0-88e1-0bd3c0d27641 >       else >         search --no-floppy --fs-uuid --set=root > 0f490b6c-e92d-42f0-88e1-0bd3c0d27641 >       fi >       echo  'Loading Linux core repo kernel ...' >       linux /boot/vmlinuz-linux > root=UUID=0f490b6c-e92d-42f0-88e1-0bd3c0d27641 ro  quiet >       echo  'Loading initial ramdisk ...' >       initrd  /boot/initramfs-linux.img >     } >     menuentry 'Linux, with Linux core repo kernel (Fallback initramfs)' > --class arch --class gnu-linux --class gnu --class os $menuentry_id_option > 'gnulinux-core repo kernel-fallback-0f490b6c-e92d-42f0-88e1-0bd3c0d27641' { >       load_video >       set gfxpayload=keep >       insmod gzio >       insmod part_msdos >       insmod ext2 >       set root='hd0,msdos8' >       if [ x$feature_platform_search_hint = xy ]; then >         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 > --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 > 0f490b6c-e92d-42f0-88e1-0bd3c0d27641 >       else >         search --no-floppy --fs-uuid --set=root > 0f490b6c-e92d-42f0-88e1-0bd3c0d27641 >       fi >       echo  'Loading Linux core repo kernel ...' >       linux /boot/vmlinuz-linux > root=UUID=0f490b6c-e92d-42f0-88e1-0bd3c0d27641 ro  quiet >       echo  'Loading initial ramdisk ...' >       initrd  /boot/initramfs-linux-fallback.img >     } >     2. lsblk > >     NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT >     sda       8:0    0 931.5G  0 disk >     ├─sda1    8:1    0  39.2M  0 part >     ├─sda2    8:2    0  19.8G  0 part >     ├─sda3    8:3    0 205.1G  0 part >     ├─sda4    8:4    0     1K  0 part >     ├─sda5    8:5    0 333.7G  0 part /host >     ├─sda6    8:6    0 233.4G  0 part >     ├─sda7    8:7    0 100.4G  0 part >     ├─sda8    8:8    0   100M  0 part >     ├─sda9    8:9    0  14.7G  0 part >     ├─sda10   8:10   0  21.4G  0 part >     └─sda11   8:11   0     3G  0 part >     sr0      11:0    1  1024M  0 rom   >     loop0     7:0    0    29G  0 loop / >     1. blkid > >     /dev/loop0: UUID="fc296be2-8c59-4f21-a3f8-47c38cd0d537" TYPE="ext4" >     /dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="5450-4444" > TYPE="vfat" >     /dev/sda2: LABEL="RECOVERY" UUID="78C4FAC1C4FA80A4" TYPE="ntfs" >     /dev/sda3: LABEL="OS" UUID="DACEFCF1CEFCC6B3" TYPE="ntfs" >     /dev/sda5: UUID="01CD7BB998DB0870" TYPE="ntfs" >     /dev/sda6: UUID="01CD7BB99CA3F750" TYPE="ntfs" >     /dev/sda7: LABEL="Windows 8" UUID="01CDBFB52F925F40" TYPE="ntfs" >     /dev/sda8: UUID="cdbb5770-d29c-401d-850d-ee30a048ca5e" TYPE="ext2" >     /dev/sda9: UUID="0f490b6c-e92d-42f0-88e1-0bd3c0d27641" TYPE="ext2" >     /dev/sda10: UUID="2e7682e5-8917-4edc-9bf9-044fea2ad738" TYPE="ext2" >     /dev/sda11: UUID="6081da70-d622-42b9-b489-309f922b284e" TYPE="swap >   Any help is appreciated. Please let me know if you need any extra data.


is there a way to reset a linux machine should the primary disk fail?

I have a small embedded Linux device where the root filesystem is mounted over a USB connection the device can handle a reset quite well (it'll wait for the USB disk to arrive should it be unplugged at boot) however should the disk be unplugged the device tends to wedge, I'd prefer if it just reset? is there a kernel option that would get the kernel to reset should the primary disk disappear?


Block keyboard on debian

I would like to block the keyboard for a kiosk-based application implemented on Linux. The keyboard could be blocked with "nohup cat /dev/tty0" on some Linux distributions, but it's not working on Debian. How can I resolve this?


How can I tell why I have permissions to read a file?

Here's what I just noticed on my CentOS SSH account: _stat output_               $ stat /dev/kvm          File: `/dev/kvm'       Size: 0               Blocks: 0          IO Block: 4096   character special file     Device: 5h/5d   Inode: 39768216    Links: 1     Device type: a,e8     Access: (0666/crw-rw-rw-)  Uid: (    0/    root)   Gid: (    0/    root)     Access: 2014-07-12 13:50:33.015216048 +0200     Modify: 2014-07-12 13:50:33.015216048 +0200     Change: 2014-07-12 13:50:33.015216048 +0200      _id info_               $ id     uid=502(jacek) gid=502(jacek) groups=502(jacek)      _strace output_               $ strace -e open cat /dev/kvm     open("/etc/ld.so.cache", O_RDONLY)      = 3     open("/lib64/libc.so.6", O_RDONLY)      = 3     open("/usr/lib/locale/locale-archive", O_RDONLY) = 3     open("/dev/kvm", O_RDONLY)              = 3     cat: /dev/kvmopen("/usr/share/locale/locale.alias", O_RDONLY) = 4     open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     : Invalid argument      _ACL info_               $ getfacl /dev/kvm     getfacl: Removing leading '/' from absolute path names     # file: dev/kvm     # owner: root     # group: root     user::rw-     group::rw-     other::rw-      Why did `open` succeed here? What mechanisms other than ACL can be used to tell whether a user can open a file or not? What are the commands I can use to query them?


Dead keys not working in Java Swing applications

I'm currently using Ubuntu 10.10 and Netbeans 7.0 and I can't type accented letters with dead keys any more. It's not a version specific problem seems it's related with Swing since I've got the same problem with older version of Netbeans and OS... When I type `'`+`a` on any app on Linux I get a `á` vowel. All Linux apps are working fine, but Netbeans doesn't. When I type `'`+`a` on Netbeans I get a `a` vowel (no accent). I cant type quotes and double quotes either. But I got accents on Netbeans using the right `Alt` key. (that's not what I want) At terminal I got the following locale:               LANG=en_US.utf8     LC_CTYPE="en_US.utf8"     LC_NUMERIC="en_US.utf8"     LC_TIME="en_US.utf8"     LC_COLLATE="en_US.utf8"     LC_MONETARY="en_US.utf8"     LC_MESSAGES="en_US.utf8"     LC_PAPER="en_US.utf8"     LC_NAME="en_US.utf8"     LC_ADDRESS="en_US.utf8"     LC_TELEPHONE="en_US.utf8"     LC_MEASUREMENT="en_US.utf8"     LC_IDENTIFICATION="en_US.utf8"     LC_ALL=


share existing tmux session

I have a tmux session already running. I have created it just with               tmux      now I can leave the session and re-enter with               tmux a -t 0      how can I share this session with other users? Usually one has to create the session with `-S` option, but I haven't. Is there a way to share my session?


What is the correct form of the HostnameSuffixes SSH keyword?

I came across an SSH configuration setting that I've never seen before while following a discussion on an OpenSSH developers' mailing list archive. The particular setting is this:               Host *      HostnameSuffixes foo.com ext.foo.com      I would find this very useful. The problems are   1. It doesn't work, instead giving me `line 36: Bad configuration option: HostnameSuffixes`   2. I cannot find it documented in the `ssh_config` man page, or _anywhere_ on the web. Since several people in the thread--all clearly very knowledgable about OpenSSH--discuss it as though it is real, and the discussion is more than a year old (so it could not very well only exist in an alpha version), I'm assuming that it is real. Did one of them mistakenly misspell or mis-remember the keyword, and the others just repeat the mistake? What is the correct keyword? And where can I find documentation?


Gnome 3 Software Center

Just installed Fedora 15 with Gnome 3. Is there like a software center like in Ubuntu?


loop curl get request bash

I'm trying to automate a curl script and eventually make it loop also. I found that I can't use any loop like:               for i in `cat authors`     do         curl *line here*   "www.test.com/autors?string="$i"&proc=39"     etc      or even env glob variables for CURL Is there a way to loop a get request on curl for one variable?               curl -H "Host: www.test.com" -G "www.test.com/autors?string="author+name"&proc=39"      All I get is the traffic graph CURL has and no good result. I'm using bash


Is it possible to obtain OS X versions of Unix tools on modern Linux distributions (like Ubuntu or RedHat)?

I have observed that there are often subtle and often annoying differences between the default versions of certain command line tools like `paste` and `sed` on modern distributions of Linux versus `OSX`. This leads to answers that do not work on `OS X` even though they will work on almost any Linux distribution. So I wonder, is there a standard way to get the full set of `OS X` versions of the standard Unix tools on modern Linux distributions so we can test solutions for correct functionaity on OSX, without having a copy?


Reset password for regular user who is locked out

I'm a complete noob in Linux and I'm stuck in a situation where I'm logged in an Linux box from putty but on of my colleague, who was trying to login on same machine from his machine blocked my user by entering wrong password for more than 3 times. Now, I'm logged in but not able to reset the password as while trying Linux is asking for (LDAP) password after asking for UNIX password BUT, not accepting my user's LDAP password ( I'm just hoping it's same password which is used for outlook i.e. used with-in organization ) Is there any way to reset my password or we need to wait for the root user to do it?


How can I forward emails from a POP3 account to another SMTP or IMAP account?

I have an email address that I can access via POP3, but which I rarely use. Though it receives quite a bit of email. I cannot use a forwarding feature for this account. Yet I want to forward incoming mail to my iCloud account. I do have a dedicated root server running somewhere, which for example could run fetchmail to collect mail from the POP3 server and do something with it. The question is, can fetchmail -- or some other program -- directly forward that email to my iCloud account?


How to configure Alias in Apache 2.4?

I need to config a Alias in Apache 2.4 and work how phpmyadmin works in my Ubuntu AWS server. I created a site-enable file and add the following lines for it                   Alias /admin1/ "/var/www/html/admin"         <Directory "/var/www/html/admin">             Order allow,deny             Allow from all         </Directory>      but when I hit /admin1 it redirect to the 404 page,


What are the difference between SLED and RHEL WorkStation? What are the advantages over community supported distros?


how to find and then delete files older than specific days in unix including files in subdirectores not touching folder structure

I have got one folder for log with 7 folders in it. Those seven folders too have subfolders in them and those subfolders have subfolders too. I want to delete all the files older than 15 days in all folders including subfolders without touching folder structrure, that means only files.               mahesh@inl00720:/var/dtpdev/tmp/ > ls     A1  A2  A3  A4  A5  A6  A7          mahesh@inl00720:/var/dtpdev/tmp/A1/ > ls     B1 B2 B3 B4 file1.txt file2.csv


avconv error: av_interleaved_write_frame

I use avconv to cut a video and to remove subtitles. Depending on the length of the output video, I get a success or and error. The input video has the following information:               avconv -i video.mkv      > Metadata: > > Duration: 00:02:07.01, start: 0.000000, bitrate: 15559 kb/s >   >   >     Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 > DAR 16:9], 15000 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc (default) >     Stream #0.1(fre): Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s (default) >     Stream #0.2(ger): Audio: mp2, 48000 Hz, stereo, s16, 112 kb/s (default) >     Stream #0.3(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default) >     Stream #0.4(qaa): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default) >     Stream #0.5(fre): Subtitle: [0][0][0][0] / 0x0000 (default) >     Stream #0.6(fre): Subtitle: [0][0][0][0] / 0x0000 (default) >     Stream #0.7(ger): Subtitle: [0][0][0][0] / 0x0000 (default) >     Stream #0.8(ger): Subtitle: [0][0][0][0] / 0x0000 (default) >   > > At least one output file must be specified For a duration of 40s of video, this works properly: `avconv -i video.mkv -vcodec copy -acodec copy -ss 00:02:30 -t 00:00:40 -sn test3.mkv` For a duration of 2min30s, an error is raised: `avconv -i video.mkv -vcodec copy -acodec copy -ss 00:02:30 -t 00:10:40 -sn test3.mkv` Output: > Application provided invalid, non monotonically increasing dts to muxer in > stream 0: 308600 >= 308600 av_interleaved_write_frame(): Invalid argument Has anyone an idea of the reason of this problem?


Fedora 8 recently extreamly slow with frequent freeze ups

Over the last few weeks my Fedora 8 machine has been running extremely slow. Applications like Firefox constantly freeze up and I am seeing sustained spikes in CPU activity while carrying out typical tasks (browsing the web, compiling Java programs, running subversion operations etc). This all started happening suddenly, the machine was running fine for the past year and now it is frequently crawling. I am looking for suggestions as to what may have happened to cause this. Maybe a list of possible explanations that I can look into?


Install to usb drive

I'm thinking about to install Debian Wheezy or CentOs 6.5 ( **not** the live version) on an USB drive. I think this shouldn't be a problem as long as my computer can boot from USB. But will this work well with the bootloader?


How can I send spoofed packets in Linux

In order to test a firewall, I want to send malformed packets to its interface, regardless of my routing table. Is there a way to ask linux "send this exact tcp package, to this MAC address, regardless of any network configuration on the system"? I assume I'll need root acccess, but that's OK.


Documentation: Architecture of Linux Session

I'm looking for a good overview documentation describing the the stack of daemons and services involved in a modern Linux session. Although having read various documentation about `dbus`, and `systemd` (not enough reputation to post links), I still don't get the big picture. In particular, I'm looking for answers to these questions (don't answer the questions, they should only clarify what kind of documentation I'm looking for):   * After logging in, which process is the root of the user's session?   * Which processes should be started, and why? I'm looking for a Desktop-agnostic answer, no matter whether Gnome, KDE, FVWM, or a simple shell is started.   * What role do all these daemons play? Which of them would run alone, which depend on others? Which one should be started by whom, why, and for how long? And who should maintain that zoo? I'm asking, because I found that I have a whole zoo of daemons running right after booting: `systemd-journald`, `systemd-udevd`, `dbus-daemon`, `systemd- logind`. But not enough: Apart from these, Running ultra-lightweight PDF- viewer `zathura` _further_ populates my session with `dbus-launch`, `dbus- daemon`, `at-spi2-registryd`, and `at-spi-bus-launcher`, the latter launching yet another `dbus-daemon`. None of them have been there before, none has been invited, but they will stay around the house, giving me a creepy feeling, until I log out. I'm sure I'm missing something here... Another example: After login, I have a `systemd` running with my users UID, but I have no idea what it should do (since version 206 I think I'm not supposed to use that as session manager, right?). It has a child process `(sd- pam)`, which I failed to find documentation about. What do they do? What is the idea behind this setup? To clarify my perspective: In “the old days” it was enough to know that `login` would launch my login shell (`bash`, executing `~/.profile`), and from that point I could continue building a session, depending on circumstances, maybe launching `screen`, or `startx`.


Nginx Ubuntu PHP5 - not found php-fastcgi.pid

I was setting-up Nginx with PHP5 on Ubuntu 10.04.4 TLS Server, and follow this instructions - http://library.linode.com/web-servers/nginx/php-fastcgi/ubuntu-10.04-lucid Everything is fine before I run /etc/init.d/php-fastcgi start, the php-fastcgi is a script -               #!/bin/bash          PHP_SCRIPT=/usr/bin/php-fastcgi     FASTCGI_USER=www-data     FASTCGI_GROUP=www-data     PID_DIR=/var/run/php-fastcgi     PID_FILE=/var/run/php-fastcgi/php-fastcgi.pid     RET_VAL=0          case "$1" in         start)           if [[ ! -d $PID_DIR ]]           then             mkdir $PID_DIR             chown $FASTCGI_USER:$FASTCGI_GROUP $PID_DIR             chmod 0770 $PID_DIR           fi           if [[ -r $PID_FILE ]]           then             echo "php-fastcgi already running with PID `cat $PID_FILE`"             RET_VAL=1           else             $PHP_SCRIPT             RET_VAL=$?           fi       ;;         stop)           if [[ -r $PID_FILE ]]           then             kill `cat $PID_FILE`             rm $PID_FILE             RET_VAL=$?           else             echo "Could not find PID file $PID_FILE"             RET_VAL=1           fi       ;;         restart)           if [[ -r $PID_FILE ]]           then             kill `cat $PID_FILE`             rm $PID_FILE             RET_VAL=$?           else             echo "Could not find PID file $PID_FILE"           fi           $PHP_SCRIPT           RET_VAL=$?       ;;         status)           if [[ -r $PID_FILE ]]           then             echo "php-fastcgi running with PID `cat $PID_FILE`"             RET_VAL=$?           else             echo "Could not find PID file $PID_FILE, php-fastcgi does not appear to be running"           fi       ;;         *)           echo "Usage: php-fastcgi {start|stop|restart|status}"           RET_VAL=1       ;;     esac     exit $RET_VAL      and it give me this message -               spawn-fcgi: opening PID-file '/var/run/php-fastcgi/php-fastcgi.pid' failed: No such file or directory      Apparently there is no php-fastcgi.pid in the folder, even strange, there is no php-fastcgi folder in /var/run, I installed php by this command -               apt-get install php5-cli php5-cgi spawn-fcgi psmisc      So is there anything wrong? Thanks.


cryptdisks_start: precheck failed: the device contains a filesystem type crypto_LUKS

I'm trying to use `cryptdisks_start` to open a LUKS device that is defined in my `/etc/crypttab`. Unfortunately, the command fails with the following error message:               martin ~ # cryptdisks_start luks-01a2e5d8-9211-40ce-b160-d3f973d1a155      * Starting crypto disk...      * luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 (starting)..      * luks-01a2e5d8-9211-40ce-b160-d3f973d1a155: the precheck for '/dev/disk/by-uuid/01a2e5d8-9211-40ce-b160-d3f973d1a155' failed:  - The device /dev/disk/by-uuid/01a2e5d8-9211-40ce-b160-d3f973d1a155 contains a filesystem type crypto_LUKS.      * luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 (failed)...        ...fail!      A rather strange error, because of course that device has to contain a `crypto_LUKS` filesystem! The relevant line from `/etc/crypttab`, as set up by GNOME Disks:               luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 UUID=01a2e5d8-9211-40ce-b160-d3f973d1a155 /etc/luks-keys/luks-01a2e5d8-9211-40ce-b160-d3f973d1a155 nofail


Problem sending email from Wordpress form throught EC2 Linux

I have an Amazon EC2 Linux box (it's an Amazon Linux AMI basically a Centos) I have a bunch wordpress sites on them, most of them have contact web form. I believe they are using sendmail. I had an issue, several email sent to a specific Italian ISP got rejected because my server was not reliable, I started googling and I found out that I had to take some extra action:   * add something to `/etc/hosts`:              XXX.XXX.XXX.XX   mydomain.it        * change the host name to reflect mydomain.it That solved the issue, email started to work even with Aruba ISP (the ISP that wasn't receiving email from my server). Now the problem is with my company website out mailboxes are on Gmail for Business (not on our server) and they look like @mydomain.it...as you can imagine if I send an email from my company website contact form (which is hosted on my server) I don't receive the email, because my server think is convinced to be mydomain.it.... I can't find the guide that I've followed to fix the issue, but as soon as I find the link I'll post it here...


Please explain the output from the jobs command

When I ran `jobs` command I see the following output :               [1]  - Suspended                     ./startWebLogic.sh     [2]  + Suspended (signal)            top        1. What does -/+ indicate in the second column ?   2. What is the difference between Suspended and Suspended(signal) ?


What happens to suspended jobs in unix?

We can issue `CTRL+Z` to suspend any jobs in Unix and then later on bring them back to life using `fg` or `bg`. I want to understand what happens to those jobs that are suspended like this ? Are they killed/terminated ? In other words what is the difference between killing and suspending a process ?


Error converting a bash function to a csh alias

I am writing a csh alias so that I can use the following bash function in my csh :               function up( )     {         LIMIT=$1         P=$PWD         for ((i=1; i <= LIMIT; i++))         do             P=$P/..         done         cd $P         export MPWD=$P     }      (I stole the above bash function from here) I have written this:               alias up 'set LIMIT=$1; set P=$PWD; set counter = LIMIT;  while[counter!=0] set counter = counter-1; P=$P/.. ; end cd $P; setenv MPWD=$P'      However, I am getting the following error:               while[counter!=0]: No match.     P=/net/devstorage/home/rghosh/..: Command not found.     end: Too many arguments.      and my script is not working as intended. I have been reading up on csh from here. I am not an expert in csh and what I have written above is my first csh script. Please let me know what I am doing wrong.


Multi-line PATH in tcsh

Inspired by the accepted answer to this thread, I am trying to replicate a similar construction in tcsh (version 6.14.00) with no luck:               setenv new_PATH (     /some/path     /some/other/path          # Some comments     /foo/path          # Another group     /bar/path          $PATH) # Attach $PATH at the end in case we had previous declarations          setenv PATH `sed -e '/^#/'d -e '/^$/'d << EOF | paste -d ":" -s $new_PATH`      I get the error "`Too many ('s`" . What am I doing wrong?


Logitech M325 mouse horizontal scrolling

Out of the box, this Logitech M325 mouse works great with one issue: cannot use the scroll wheel for horizontal scrolling. It acts as forward or back in the browsers or does nothing in other windows.


How to install Linux distro to a second hdd from within a running Linux Desktop Environment?

The title says it all! More specifically, I am running Fedora18 on my main HDD. I have a second HDD in the "UltraBay" slot of my ThinkPad W520--eSata connection. **Is there a possibility to avoid creating a LiveCD/USB, etc, and, perhaps, to directly write the extracted ISO contents of a different distro (Ubuntu) to the second drive; or to use a virtual system as a means of facilitating a "non-live/non-virtual"/REAL installation of an OS?** There's got to be a better solution than having to deal with the annoying media-creation! I'm not too familiar with PXE booting, but it seems that even that adds an extra step of preparing the network server/system for allowing access, etc. Thanks for any and all comments and answers. * * * ## Docs and Resources >   * Fedora 19: Hard Drive Installation >   * Ubuntu: ISO Boot >   * ArchWiki - Category: Getting and Installing Arch >     * Archlinux: _Archboot_ method >


Desktop Manager doesn't start with xorg

I've just installed Arch and I have installed gnome, but when I type `startx` I have the following problem                  waiting for X server to shut down Server terminated successfully (0). Closing log file.c: xterm: not found /etc/x11/xinit/xinitrc: line 55: xterm: command not found      What should I do?


Switching to another shell without copying environment variables

From tcsh, if I try:               exec /home/path/to/my/zsh      it works (I enter a Zsh shell) but if I try               exec -c /home/path/to/my/zsh      I get:               -c Command not found      How do I switch to my Zsh shell and start it from a "blank slate"? (i.e. with no environment variables carried over from `tcsh` ).


Vagrant: failed to mount nfs shared folder (mount.nfs: Operation not permitted)

Vagrant throws error message:               ==> default: Mounting NFS shared folders...          mount -o 'vers=3,udp' 192.168.33.1:'/home/xxx/vagrant/www' /home/www     mount.nfs: Operation not permitted      ssh to the guest and run               root@debian:~# mount -o 'vers=3,udp' 192.168.33.1:'/home/xxx/vagrant/www' /home/www -v     mount: no type was given - I'll assume nfs because of the colon     mount.nfs: timeout set for Tue Jul 15 22:26:56 2014     mount.nfs: trying text-based options 'vers=3,udp,addr=192.168.33.1'     mount.nfs: prog 100003, trying vers=3, prot=17     mount.nfs: trying 192.168.33.1 prog 100003 vers 3 prot UDP port 2049     mount.nfs: prog 100005, trying vers=3, prot=17     mount.nfs: trying 192.168.33.1 prog 100005 vers 3 prot UDP port 54188     mount.nfs: portmap query failed: RPC: Program/version mismatch     mount.nfs: Operation not permitted      `mount.nfs: portmap query failed: RPC: Program/version mismatch` Could be a lead but didn't have luck with googling. The host (nfs server) supports nfs4 and nfs3. * * * Please feel free to ask for more information.


Why is Debian hangs after DHCP?

This is my `/etc/networking/interfaces` file:               auto eth0     allow-hotplug eth0     iface eth0 inet dhcp     iface eth0 inet6 auto      And here is a picture of where it is hanging:     ![ss of problem](http://i.stack.imgur.com/41IR1.jpg) _Source:http://imgur.com/s8xoE6f_ The cursor is blinking and I can type, but I'm fairly certain that commands don't work here. Please help!


Update Manager tells me my system up to date but

Update Manager told me my 'system is up to date', but when I clicked 'Refresh' a list of recommended packages appeared. I presumed Linux Mint automatically updated when the system boots up; does it not? I had been surfing the web for 20 minutes before opening Update Manager so Mint had plenty of time to check for updates. Why didn't the list appear initially?


Help with diagnosing a mdm/Cinnamon freezing problem?

I use Linux Mint 16 64-bit Cinnamon. I've just deployed it on two computers and (again) suffer from spontaneous freezing of the graphics terminal. Fortunately the rest of the system seems to be running OK, and I can switch to another virtual terminal and do stuff to diagnose the problem. Logs (syslog, Xorg.0.log, mdm/:0.log) don't reveal anything except for `AIGLX: Suspending AIGLX clients for VT switch` which is normal when you switch to another virtual terminal. Unfortunately, this log entry never gets coupled with the entry that tells it is `resuming`... Symptoms:   * Freezing happen spontaneously, ca once per 8 hours. So far I cannot find anything that can correlate with the freezing event.   * No screen update under the graphical terminal.   * I can still switch between virtual terminals with Alt+Ctrl+Fx   * All applications still work; music plays, and I can still interact with running applications, like VirtualBox (if it is currently running). I didn't test `xdotool` and `wmctrl`   * Mouse cursor icon is visible and you can control it with the mouse. Clicks are ignored.   * **Mouse cursor icon changes while hovering under different zones of windows drawn on the screen, just like it would if the system was working normally**.   * It looks like the keyboard is ignored too; except for Ctrl+Alt+Backspace (if a correct script is loaded which intercepts this key combination). Ctrl+Alt+T (to display terminal), Alt + F2 (to show "Run command..." dialog) are ignored. The problem is concerning only the Linux Mint 16 (I never experienced anything like that on Linux Mint 15). I am able to reproduce these symptoms on two computers: desktop PC with ASUS 990FX motherboard, and on ASUS N56VZ notebook. **The previous installation of Linux Mint 16 on the notebook was free from the problem.** Unfortunately I decided to expand the hard drive and reinstalled the system. I still posses the HDD with the previous installation, so I can theoretically I can do some form of diff between them. But both installations should be the same - the only thing I really changed was a bigger hard drive, but unless you use some form automation (like Puppet), you are never able to install two systems identically. * * * Edit: This specific problem seems to be related to the event of desktop change. It can be reproduced by:   1. Install the Linux Mint 16 with Cinnamon 2.0 64 bit   2. Install a program that changes wallpaper (tested on variety, and wallch) and set it to start changing wallpaper as the background task.   3. Wait for background to change several times. The bug doesn't kick in on the first background change, you need to wait a moment.    4. On the .xsession.errors you will see something like that.


Determine the intel CPU family for C compiler?

I am checking the CPU information on a Linux server, and tuning options of the Intel C compiler `icc` for my C code running on the server's specific architecture. I am thinking about choosing the value for the option `-march` in `icc`. The following is part of the content of `/proc/cpuinfo/` for one core (same for the other cores), and which value should I give to `-march` for `icc`? Or should I use a different option than `-march`?               -march=<cpu> (i32, i64em only)               Generate code exclusively for a given cpu.  For  this  release,               the  <cpu>  values of pentiumii and pentiumiii have been depre-               cated.  For a given cpu, <cpu> is one of the following:                   core2 -- Intel(R) Core(TM)2 processor family                   pentium4 -- Intel Pentium 4 processors                   pentium3 -- Intel Pentium III processors      The following is the output of `cat /proc/cpuinfo` on a Linux server               processor   : 0     vendor_id   : GenuineIntel     cpu family  : 6     model       : 26     model name  : Intel(R) Xeon(R) CPU           E5504  @ 2.00GHz     stepping    : 5     cpu MHz     : 1994.956     cache size  : 4096 KB     physical id : 1     siblings    : 4     core id     : 0     cpu cores   : 4     apicid      : 16     initial apicid  : 16     fpu     : yes     fpu_exception   : yes     cpuid level : 11     wp      : yes     flags       : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm dts tpr_shadow vnmi flexpriority ept vpid     bogomips    : 3989.91     clflush size    : 64     cache_alignment : 64     address sizes   : 40 bits physical, 48 bits virtual     power management:


What is the equivalent of FreeNAS for SAN?

Does there exist a SAN emulator with FCOE emulation under unix or linux? For example, when I want to emulate a NAS for testing I use FreeNAS or a solution based on CentOS. Is there something equivalent for SAN?


How can I install Fedora with a newer kernel?

I want to install Fedora on my computer with a netinstall, but it seems that the kernel doesn’t support my ethernet chip (Intel I218V). I tested Ubuntu 14.04 and Arch Linux and the ethernet chip worked (both have a newer kernel version). So, how can I install Fedora with a newer kernel?


Frequency of words in non-English language text: how can I merge singular and plural forms etc.?

I'm sorting _French_ language words in some text files according to _frequency_ with a focus on _insight_ rather than statistical significance. The challenge is about preserving accented characters and dealing with the article forms in front of vowels(`l'`, `d'`) in the context of shaping word tokens for sorting. The topic of the most frequent words in a file takes many shapes( 1 | 2 | 3 | 4). So I put together this function using _GNU_ utilities:               compt1 () {     for i in *.txt; do         echo "File: $i"         sed -e 's/ /\     /g' <"$i" | sed -e 's/^[[:alpha:]][[:punct:]]\(.*\)/\1/' | sed -e 's/\(.*\)/\L\1/' | grep -hEo "[[:alnum:]_'-]+" | grep -Fvwf /path_to_stop_words_file | sort | uniq -c | sort -rn      done     }      ...which trades spaces for newlines; trims a character followed by punctuation that's at the beginning of the line; then converts everything to lowercase; uses this compact `grep` construct which matches word constituent characters to create tokens; then removes the stop words, and finally there is the usual sorting. The stop file contains a segment with individual characters so you have to be careful with how it's used, but the analysis provided on how to create stems for words in different languages is really interesting! Now when I compare the frequency of a significant word with the output of `grep -c` directly on the files, I think it's close enough within some margin of error. * * * _Questions_ :   * How could I modify this to merge the frequency of plurals with their singular forms i.e. words sharing a common prefix with a varying 1 character suffix?   * I'm trying to assess whether the `grep` part in particular would work with what's on _OSX_? * * * 1. I cannot provide source data but I can provide this file as an example. The words _heure_ and _enfant_ in the text provide an example. The former appears twice in the text including once as "l'heure", and helps validating if the command works or not. The latter appears in both singular and plural forms( _enfant_ / _enfants_ ) and would benefit from being merged here.


cheese doesnt work in beagleboneblack installed with angstrom, using chipsee LCD

I am using chipsee LCD + beaglebone black and Logitech Webcam C270. I am using angstrome OS distribution provided by Chipsee.   I wanted to use Cheese and see if webcam works fine or not.   When i open cheese it opens and shows waiting animation and then closes without any error messages or something. Any suggestions/pointers for debugging this issue? Adding `journalctl -a -f` output when i run cheese                Jul 19 16:01:05 beaglebone-exp kernel: usb 2-1: reset high-speed USB device number 14 using musb-hdrc     Jul 19 16:01:05 beaglebone-exp kernel: usb 2-1: USB disconnect, device number 14     Jul 19 16:01:06 beaglebone-exp kernel: usb 2-1: new high-speed USB device number 15 using musb-hdrc     Jul 19 16:01:06 beaglebone-exp kernel: usb 2-1: New USB device found, idVendor=046d, idProduct=0825     Jul 19 16:01:06 beaglebone-exp kernel: usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2     Jul 19 16:01:06 beaglebone-exp kernel: usb 2-1: SerialNumber: FD382030     Jul 19 16:01:06 beaglebone-exp kernel: uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)     Jul 19 16:01:06 beaglebone-exp kernel: input: UVC Camera (046d:0825) as /devices/ocp.3/47400000.usb/musb-hdrc.1.auto/usb2/2-1/2-1:1.0/input/input17


Grepping a variable

I've written a simple init script to start and stop a Python script as a service. I have to be explicit about the version of Python I'm running, because this is on a CentOS 5 box with Python 2.4 & 2.6 installed (both via yum). Here's what I have so far:               #!/bin/sh     # chkconfig: 123456 90 10          workdir=/usr/local/bin/Foo          start() {         cd $workdir         /usr/bin/python26 $workdir/Bar.py &         echo "FooBar started."     }          stop() {         pid=`ps -ef | grep '[p]ython26 /usr/local/bin/Foo/Bar.py' | awk '{ print $2 }'`         echo $pid         kill $pid         sleep 2         echo "FooBar stopped."     }          case "$1" in       start)         start         ;;       stop)         stop         ;;       restart)         stop         start         ;;       *)         echo "Usage: /etc/init.d/foobar {start|stop|restart}"         exit 1     esac     exit 0      Two things I need help with: 1) I want to be "smarter" about the filename and directory name management, and set some variables up to so that anything repeated later in the script (like workdir). My main problem is the grep statement, and I haven't figured out how to deal with the variables inside the grep. I'd love any suggestions of a more efficient way to do this. 2) I want to add "status" support to this init script and have it check to see if the Bar.py is running.


How to boot Linux

I have a Linux box that I used to write my dissertation. I have used the Linux box for composition and email for a number of years. Unfortunately, for the past couple of years I have been in a nursing home. I haven't needed the Linux box for anything in here. Now I need to get on the Linux box to retrieve some documents I have on there. I cannot remember how to boot Linux. I turn the box on and I get a blank screen with a single cursor. I used to hit something like `ctrl`-`alt`-`delete` (all at once) to boot Linux. But I tried that and it doesn't work. What is the character sequence/combination I need to boot Linux?


error caused by undefined symbol: glXGetProcAddress

After my last dist-upgrade of my testing debian system, X refuses to start. I can see the following error (which shows up when gnome-session is started): > symbol lookup error: /usr/lib/i386-linux-gnu/libcairo.so.2: undefined > symbol: glXGetProcAddress Besides, even texlive refuses to upgrade, with the same error (caused by luatex). I don't know how to fix this issue: is it possibile that one crucial library is missing? If not, what else could cause this problem?


How to apply updates on OpenBSD, NetBSD, and FreeBSD?

I'm using OpenBSD for quite a while now. All I do, however is go from one release to the next, always just doing an update. I configured the system so it works as my router and firewall, and it works quite good like that. But, I never update packages. All I do, I just move on to the next release. Coming from the Linux world, I'm used to apply updates a few times a week, but how do I do that on *BSD? - Or is this not part of the *BSD philosophy?


Bash Sudo Command Not Found

I have set up a VM using turnkey linux redmine and I'm trying to SSH into the server to install some more items. It doesn't appear to be recognizing the sudo command. Every time I try to sudo something I get an error saying:                -bash: sudo: command not found      I read somewhere else to type 'whereis sudo' and the output was:                sudo:      Not sure what that does, but im hoping it might help in the diagnostic :-) Thanks for your help, Adam


Can't install any version of Linux

So I was trying to install #! (Crunchbang) and downloaded the 64 bit version and tried installing it. Everything would work until it was time to install grub. The grub installation would fail every time. I then tried installing the 32bit version (note I am on a 64 bit machine) and everything would install including the grub. I would then   * Start Computer   * Press `F9` (I have legacy boot enabled) I then see these options: ![http://i.imgur.com/7DPX0ER.jpg](http://i.stack.imgur.com/WOacc.jpg) **Note:** I do **not** have Ubuntu installed. And that these options would show even before I had #! installed. There was no option to load #! even thought the grub had apparently installed. When I'd select the Ubuntu options I would get: ![i.imgur.com/Xjf3qqS.jpg](http://i.stack.imgur.com/bJv2V.jpg) That error, and would have to power off my computer and turn it on to get out of that screen. After this I downloaded EasyBCD and tried removing Ubuntu from the boot menu but there would be no Ubuntu options, it would just be these. ![gyazo.com/45325ec57f0c69e31af1559bb9d3cca8.png](http://i.stack.imgur.com/sESRb.png) I then went to CMD and typed > bcdedit And this information came up (note I'm trying to provide as much information as I can. ![gyazo.com/94fcf2e09dfa5c6bbda0a642afdd0dca.png](http://i.stack.imgur.com/Kq3qv.png) Lastly I tried installing a different OS (Manjaro) and when I started it up I got ![i.imgur.com/ntcjVdL.jpg](http://i.stack.imgur.com/L4lF6.jpg) **Some information about my PC and things you should know**   * Windows 8   * Intel i3, 6GB RAM, 750 HDD   * Partitions look like http://i.stack.imgur.com/9pEpR.png right now.    * I currently have nothing linux related installed but the Ubuntu still shows in the boot loader.   * I had Ubuntu a long time ago, don't know why it's still there. EDIT: I am now getting the grub error an any Linux version I try, I just tried Ubuntu.


How to start subsequent shells as root?

I run my local testing server inside a VM. I often have to open up multiple windows in it, and all have to be logged in root. Usually this is accomplished by writing `su` on every tab, a total of 7-8 times. Is there a way that I have to enter the root password only once, and the next terminal tab/window that I open has be logged in as root? Sort of like it maintains the current working directory?


Back button to middle mouse button

I would like to map "Back" button (xev shows it as "button 7") of my mouse (A4Tech X-7) to act as a middle mouse button. Is there a way to do this? I'm lost in google, finding only how to map buttons to keyboard shortcuts with xbindkeys and etc.   * OS: Centos 6.3 (x86_64)   * DE: KDE 4.3.4 P.s. I can switch (with xmodmap) "Back" button with middle button with no problems, but is there a way to have both them act as a middle mouse button?


How to block loading kernel module only in single user boot when blacklist fails?

On a "Linux debian 2.6.32-5-amd64 #1 SMP" installation where loading a kernel module (mpt2sas) is desired to be delayed to be loaded after starting sshd and users can remotely login, the mpt2sas module was disabled from loading in single user boot, by:               $ echo 'blacklist mpt2sas' >> /etc/modprobe.d/mpt2sas.conf; depmod -aeF /boot/System.map-2.6.32-5-amd64; update-initramfs -u -k $(uname -r)      Later on a `modeprobe -v mpt2sas` will be run in /etc/rc.local. **After installing a newer mpt2sas driver** , using `dpkg -i mpt2sas-15.00.00.00-3_Debian6.0.5.amd64.deb` the result is that the old driver is renamed from `/lib/modules/2.6.32-5-amd64/kernel/drivers/scsi/mpt2sas/mpt2sas.ko` to `/lib/modules/2.6.32-5-amd64/kernel/drivers/scsi/mpt2sas/mpt2sas.ko.orig` and the new driver is installed at `/lib/modules/2.6.32-5-amd64/weak- updates/mpt2sas/mpt2sas.ko`. The side effect is that the line **blacklist mpt2sas** in `/etc/modprobe.d/mpt2sas.conf` **no longer has any effect** , when modules are loaded in the single user boot process, mpt2sas is loaded as first kernel module. Regression:   * I know that /etc/modprobe.d/mpt2sas.conf is still being loaded, because when entering a faulty line in this file, a warning is display at console during boot (4 times).   * Running `depmod -aeF /boot/System.map-2.6.32-5-amd64; update-initramfs -u -k -t $(uname -r); reboot` doesn't improve.   * Adding kernel boot parameter `modprobe.blacklist=mpt2sas` doesn't improve. How can I block loading the new mpt2sas kernel module during the single user boot phase? (I still want to load mpt2sas using `modprobe` in /etc/rc.local).


Linux OS running a single application

I want to build a Linux based OS which is custom made for only one application and is totally light-weight and uses minimum system resources. How do I go about this? Would stripping down an already existing OS such as Ubuntu be a good idea?


Difference between initramfs.cpio and rootfs.cpio

What are the differnces between the two? Can I just use initramfs.cpio or do I need to use both? Actually my rootfs.cpio file is 7 Mb and initramfs.cpio is just 0.5mb, so I was thinking if I can use initramfs.cpio only or not


How to detect aspect ratio of monitor?

How do you detect the `aspect ratio` of your monitor? I tried:               root@malou-laptop:/home/liv# xrandr -q     xrandr: Failed to get size of gamma for output default     Screen 0: minimum 640 x 480, current 1680 x 1050, maximum 1680 x 1050     default connected 1680x1050+0+0 0mm x 0mm        1680x1050      60.0*         1280x1024      61.0          1280x800        0.0          1024x768       61.0          800x600        61.0          640x480        60.0        And figured out that you can compute it by `1680:1050 = 1.6 = 16:10`, or by checking the Display resolution list on Wikipedia. But is there a command that nicely outputs this? I already tried `lshw` and `hardinfo`, with no luck.


Why do some commands 'hang' the terminal until they've finished?

Sometimes you run a program from the terminal, say, `lxpanel`†. The terminal won't drop you back to the prompt, it'll hang. You can press `Ctrl`+`C` to get back to the prompt, but that will kill `lxpanel`. However, pressing `Alt`+`F2` (which pops up a window to take a command) and running `lxpanel` works gracefully. Why is this? What is different between running a command from the terminal and from the 'run' window that appears when you press `Alt`+`F2`? † lxpanel here was just used as an example. I have experienced this with multiple programs