file $(ls /usr/bin/* | grep zip) command gives me errors. What's wrong?

I'm a total noob when it comes to unix/linux commands and I decided to read a book. I've reached a chapter where they try to explain how to pass the output of commands as expansions to the shell. The following command `file $(ls /usr/bin/* | grep zip)` gives me the error "cannot open "file name (No such file or directory)". On the contrary, when I do `file $(ls | grep zip)` everything appears normally, no matter the folder. Why? Is it some kind of argument restriction? If I do this `file $(ls Pictures/ | grep jpg)` I get the following: `1234.jpg: ERROR: cannot open 1234.jpg (No such file or directory)` while moving right in the directory that I want to list `nassosdim@ubuntu:~$ cd Pictures/` `nassosdim@ubuntu:~/Pictures$ file $(ls | grep jpg)` prints out the result of file `1234.jpg: JPEG image data, JFIF standard 1.01` Can someone explain to me what's going on? :(


Communication with MX records

I have a short question about the topic of MX records. Let's say, we have multiple mail servers in DNS records. If someone is sending a mail, the outgoing mail server will check the MX and contact the first server with the lowest cost. Let's say that is an exchange server. If this server doesn't have the requested mail address, what happens then? Does the outgoing mailserver send the message to the second mailserver in the MX record? Or does that depends on the error message by the first mailserver? And how does exchange handle messages to "unknown addresses"?


How to exclude some commands from being stored in TCSH history?

I store my commandline history in TCSH, but I want to prevent certain frequent, simple commands like "exit", "cd" to be included in the history (the history holds only a fixed number of commands, so I want to retain only the useful commands). Is there a way to specify an "exclusion list" - a list that will contain commands that would not be added in the current history file ? That way, I can keep only the most relevant commands in history and filter out the ones I don't want to clog the history.


Installing openSUSE 12.1 on Asus Zenbook UX32VD

## Tales of woe (or, the backstory) So my boss who hates the idea of windows and virtualization had brought me his fancy new Zenbook UX32VD wanting openSUSE 12.1 to be installed on it. SO far I have hit issue after issue and cant seem to find a lot of information on the problems I have encountered and I figured what better place to start collecting it then right here. Laptop Manual First issue I ran into when installing 12.1 on a Zenbook is there is no disc drive. I solved this by making a bootable USB drive. Second issue I ran into is that the installer doesn't seem support the USB 3.0 ports on the Zenbook. Fortunately USB 3.0 is backwards compatible so I had to create another bootable USB on a 2.0 USB with openSUSE 12.1's Installation data. Third issue I hit is a black screen after the installer loads udev; screen just completely goes black and nothing comes back up. It looks like the drives are still busy and loading is going on in the background but nothing happens. I think this is the optimus technology making openSUSE choke so I figured using VESA mode would take care of it..NOPE! Instead for some reason using the installation parameter nomodeset in the openSUSE boot menu works which is strange because to my understand nomodeset is the same as selecting VESA. Maybe I'm wrong? but nomodeset works for installation. Fourth issue I ran into is that there are no drivers to support the Intel wifi in the stock installation of 12.1. In addition to this issue; there are no ethernet ports. Instead Asus has included a usb to ethernet adapter and I cant find out the spec on it; perhaps its not working because it USB 3.0 Ethernet adapter? cant find out and its not working. # The Question After my install is completed and I reboot from the KDE desktop, it boots straight in to the system BIOS! The drives are detected by the BIOS and listed in the SATA configuration but there are no boot options and no options to set boot options. All I get is delete boot options. **How can I get the newly- installed system to boot?**


BSD Virtual Private Servers

I know of a couple of VPS providers that support BSD distros (rootbsd and prgmr), but I'm wondering if anyone has any other solutions they'd recommend? Moreover, I'm very curious why BSD support in the VPS world has been lagging behind Linux. I know the supply/demand may be different for each, but is there a technical reason that it's slow to adoption?


How can I use just one unified clipboard? (even for IntelliJ's "copy path")

I don't really understand the linux clipboard/s scheme. Instead of understanding it, is there a way to simplify it into one, unified clipboard? You know, so I could copy in any app and paste in any other? The current issue that's bugging me is IntelliJ's "copy path" action seems to copy the path of the current file, but I can only paste it back into IntelliJ itself - if I try to paste it into a terminal, the content simply isn't in the clipboard.


How do I configure setfont and loadkeys properly?

I'm installing LFS and I'm struggling with this section. My locale is `sv_SE.UTF-8` and I have a Swedish keyboard. So I suppose I should enable unicode and that the keymap is `sv-latin1`:               cat > /etc/sysconfig/console << "EOF"     # Begin /etc/sysconfig/console          UNICODE="1"     KEYMAP="sv-latin1"          # End /etc/sysconfig/console     EOF      Correct? What I'm struggling with is how to set the font. The book has this example for configuring the German keymap:               cat > /etc/sysconfig/console << "EOF"     # Begin /etc/sysconfig/console          KEYMAP="de-latin1"     KEYMAP_CORRECTIONS="euro2"     FONT="lat0-16 -m 8859-15"          # End /etc/sysconfig/console     EOF      Since German and Swedish is somewhat similar I suppose I could possibly use the same font, but I don't really understand the difference between lat0-16, lat1-16 and lat2-16. Also how do I know if I'm supposed to use 8859-15 or 8859-1? > In UTF-8 mode, the kernel uses the application character map for conversion > of composed 8-bit key codes in the keymap to UTF-8, and thus the argument of > the "-m" parameter should be set to the encoding of the composed key codes > in the keymap. So I guess the -m parameter is dependent on the chosen keymap, but how do I know what application character map my keymap uses? Finally I also have a question about the font naming: The latin (I suppose that's what lat stands for) fonts have names on the following form: `latX-Y` Is it correct that X specifies what characters are supported and Y specifies the font size?


How to see mails sent by me in Evolution

I can't find a setting the makes Evolution display messages sent by me in thread view. I can find them in Sent folder, but I'd like them to be part of the normal threads.


How can I mount partitons in a full disk image (i.e. image with partition table) with fuse?

It's a bit indirect, but it's possible mount a partition with a disk image using `mount` or `losetup`'s "offset" parameter. I'm looking to be able to use fuse to do the same thing in user space ## Use Case My use case is building disk images on an autobuild server where the build job is not allowed to have root permissions, and the server should not need a custom setup for particular build jobs.


Linux Mint Live Not Saving Data

I recently used UNetBootin to install Linux Mint Live on a 2GB flash drive. However, I think the OS thinks it's a CD, and doesn't make any changes. If I install software, change settings, etc, it just erases them when I reboot (OS loaded to RAM). I'm looking for a way to either "tell" it it's a flash drive (and therefore make it writeable), or install the full desktop (not live) version on a flash drive, and still leave the machine's normal Windows HDD alone. I've been told that Live is supposed to work just as a full installation does, but with the option to install it to the computer's storage device. Is this not true? Other distros I've tried work fine, but Mint has this problem, and it seems like the one I want to keep.


Debugging a Segmentation Fault

I have an application that runs on an embedded Linux device that I am expanding with new features. The new features require GLib so, I am dynamically linking the required libraries to the application. When I do this and run the application on the device, I get a segmentation fault. This occurs when I dynamically link the new libraries. GDB's backtrace shows that the fault occurs in another custom dynamically linked library. Unfortunately I only get a partial trace with the following message: > Backtrace stopped: frame did not save the PC Note that I am only linking another shared library and not adding any new code. If I linked the custom library statically the crash goes away. I suspect a memory corruption is happening somewhere else and the conditions (i.e. memory mapping) are just right when the custom library is dynamically linked so that the segmentation occurs. Anyone know of any good tools and techniques I can use to debug further?


Is there a way to make apt report which packages in a dist-upgrade will use additional disk space?

I recently decided it was time to do the ol' dist-upgrade. Since I don't upgrade often, I got this message:               deus@machina:~/$ sudo apt-get dist-upgrade     Reading package lists... Done     Building dependency tree             Reading state information... Done     Calculating upgrade... Done     The following packages will be REMOVED:       cmap-adobe-japan1 gnuplot-nox gs-cjk-resource kdebase-data kdebase-runtime-data kdebase-workspace-data       kdebase-workspace-kgreet-plugins koffice-libs krita libept1 libgd2-noxpm libgdl-3-1 libleptonica libmlt4 libmp3splt-mp3       libmp3splt-ogg libplasmaclock4abi1 libscience4 libtaskmanager4abi1 libupnp3 octave3.2 xz-lzma     The following NEW packages will be installed:       aptitude-common avogadro-data cpp-4.7 cryptsetup-bin fonts-freefont-ttf fonts-lyx fonts-stix fonts-vlgothic g++-4.7       g++-4.7-multilib gcc-4.7 gcc-4.7-multilib gcj-4.7-base gcj-4.7-jre-lib gfortran-4.7 gstreamer0.10-ffmpeg       gstreamer0.10-gconf gstreamer0.10-plugins-good gstreamer0.10-x icedtea-7-jre-cacao kajongg kalgebra-common kate-data       katepart kde-baseapps kde-baseapps-bin kde-baseapps-data kde-runtime kde-runtime-data kde-style-oxygen kde-wallpapers       kde-wallpapers-default kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins       kdegraphics-mobipocket kdegraphics-strigi-analyzer kdegraphics-thumbnailers kmenuedit kmod ksaneplugin ktouch-data       lib32itm1 libanalitza4abi1 libanalitzagui4 libapt-inst1.5 libapt-pkg4.12 libasprintf0c2 libatk-wrapper-java       libatk-wrapper-java-jni libatlas3-base libatomicparsley0 libavahi-client-dev libavahi-common-dev libavogadro1       libbabl-0.1-0 libblas3 libboost-graph1.49.0 libboost-iostreams1.49.0 libboost-program-options1.49.0 libboost-python1.49.0       libboost-regex1.49.0 libcaca-dev libcdio-cdda1 libcdio-paranoia1 libcdio13 libcmis-0.2-0 libcryptsetup4 libcrystalhd3       libdb5.1-java-jni libdbus-1-dev libdevmapper-event1.02.1 libdirectfb-dev libdirectfb-extra libept1.4.12 libexiv2-12       libexttextcat-data libexttextcat0 libfile-fcntllock-perl libgcj13 libgd2-xpm libgdl-3-2 libgegl-0.2-0 libgettextpo0       libgusb2 libindi-data libindi0b libiso9660-8 libitm1 libkactivities-bin libkactivities6 libkasten1controllers1       libkasten1core1 libkasten1gui1 libkasten1okteta1controllers1 libkasten1okteta1core1 libkasten1okteta1gui1       libkateinterfaces4 libkdcraw-data libkdcraw20 libkdeclarative5 libkexiv2-10 libkexiv2-data libkipi-data libkiten4abi1       libkmod2 libksane-data libktorrent4 libkwineffects1abi3 libkwinglutils1 libkworkspace4abi1 liblapack3 liblensfun-data       liblensfun0 liblept3 libmagickcore5 libmagickcore5-extra libmagickwand5 libmarblewidget13 libmediastreamer1 libmlt5       libmp3splt0-mp3 libmp3splt0-ogg libmtdev1 libnova-0.14-0 libnspr4 libnss3 libokteta1core1 libokteta1gui1 libopenbabel4       libopus0 libplasmaclock4abi3 libpoppler-glib8 libprison0 libpulse-dev libqalculate5-data libqrencode3 libqt4-dev-bin       libqtlocation1 libslang2-dev libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoup-gnome2.4-1 libsox2 libspnav0       libstdc++6-4.7-dev libsystemd-daemon0 libsystemd-login0 libtaskmanager4abi3 libtbb2 libtokyocabinet9 libts-dev libupnp6       libusbredirparser0 libvirtodbc0 libvisio-0.0-0 libvorbisidec1 libwebrtc-audio-processing-0 libwireshark2 libwiretap2       libwsutil2 libxcb-glx0 libxz-java linux-headers-3.2.0-3-amd64 linux-headers-3.2.0-3-common odbcinst odbcinst1debian2       python-avogadro python-dbus-dev python-openssl python-pam python-qt4-sql python-serial python-twisted-bin       python-twisted-core python-zope.interface sharutils svgpart valgrind-dbg virtuoso-minimal virtuoso-opensource-6.1-bin       virtuoso-opensource-6.1-common     The following packages will be upgraded:       acl acpi-fakekey acpi-support acpi-support-base acpid adduser akonadi-backend-mysql akonadi-server akonadiconsole       akregator alsa-utils amor anacron anjuta-common apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apbs apt       apt-listchanges apt-utils aptitude ark at autopoint autotools-dev avahi-autoipd base-files base-passwd bash       bash-completion bind9-host binutils blinken blogilo bluetooth bluez bluez-alsa bluez-cups bluez-gstreamer bomber bovo       bridge-utils bsdmainutils bsdutils bsnes busybox bzip2 ca-certificates ca-certificates-java cabal-install camlp4 cantor       cantor-backend-kalgebra cdbs cdrdao cervisia chocolate-doom cmake cmake-data colord console-setup console-setup-linux       consolekit coreutils cpio cpp cpp-4.6 cpufrequtils cron cuneiform cuneiform-common cups cups-bsd cups-client cups-common       cups-driver-gutenprint cups-filters cups-ppdc curl cvs cvsservice darcs dash db5.1-util dbus dbus-x11       dconf-gsettings-backend dconf-service debconf debconf-i18n debhelper debian-archive-keyring debianutils default-jre       default-jre-headless desktop-base dictionaries-common diffutils dirmngr discover djview-plugin djview4 djvulibre-bin       djvulibre-desktop dkms dmidecode dmsetup dnsmasq-base dnsutils docbook-xml dolphin dosfstools dpkg dpkg-dev dragonplayer       dvdauthor e2fslibs e2fsprogs ed edict eject emacsen-common espeak espeak-data exim4 exim4-base exim4-config       exim4-daemon-light exiv2 fakeroot fdupes festival ffmpeg ffmpegthumbs file filelight flashplugin-nonfree fontconfig       fontconfig-config fonts-droid fonts-liberation fonts-opensymbol foo2zjs foomatic-db foomatic-db-engine foomatic-filters       freeglut3 freespacenotifier ftp fuse g++ g++-4.6 g++-4.6-multilib g++-multilib gawk gcc gcc-4.4-base gcc-4.6 gcc-4.6-base       gcc-4.6-multilib gcc-4.7-base gcc-multilib gcj-4.6-base gcj-4.6-jre-lib gconf-service gconf2 gconf2-common gdb gdb-doc       gdbserver geoip-database get-flash-videos get-iplayer gettext gettext-base gfortran gfortran-4.6 ghc ghostscript       ghostscript-cups gimp gimp-data gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-pango-1.0 git git-man glib-networking       glib-networking-common glib-networking-services gnome-icon-theme gnupg gnupg-agent gnupg2 gnuplot gnuplot-x11 golang       golang-doc golang-go golang-src google-chrome-stable google-gadgets-common google-gadgets-gst google-gadgets-qt gpgsm       gpgv gpsd granatier grep groff groff-base grub-common grub-pc grub-pc-bin grub2-common gsettings-desktop-schemas       gstreamer0.10-plugins-bad gstreamer0.10-pulseaudio gtkpod gtkpod-data gvfs gvfs-common gvfs-daemons gvfs-libs gwenview       gzip hdparm host hpijs hpijs-ppds hplip hplip-cups hplip-data hyphen-en-us icedtea-6-jre-cacao icedtea-6-jre-jamvm       icedtea-7-jre-jamvm icedtea-netx icedtea-netx-common iceweasel iceweasel-l10n-en-gb idle idle-python2.7 ifrit ifupdown       imagemagick imagemagick-common info initramfs-tools initscripts insserv install-info installation-report iproute iptables       ipython isc-dhcp-client isc-dhcp-common iso-codes iw jackd2 jackd2-firewire java-common jovie juk k3b k3b-data       kaccessible kaddressbook kalarm kalgebra kalzium kalzium-data kamera kanagram kanjidic kapman kapptemplate kate katomic       kbattleship kbd kblackbox kblocks kbounce kbreakout kbruch kcachegrind kcalc kcharselect kcolorchooser kde-config-cddb       kde-config-cron kde-full kde-icons-mono kde-l10n-engb kde-plasma-desktop kde-plasma-netbook kde-standard       kde-window-manager kdeaccessibility kdeadmin kdeartwork kdeartwork-emoticons kdeartwork-style kdeartwork-theme-window       kdebase-apps kdebase-bin kdebase-runtime kdebase-workspace kdebase-workspace-bin kdeedu kdeedu-kvtml-data kdegames       kdegames-card-data kdegames-mahjongg-data kdegraphics kdegraphics-libs-data kdegraphics-strigi-plugins kdelibs-bin       kdelibs5-data kdelibs5-plugins kdemultimedia kdemultimedia-kio-plugins kdenetwork kdenetwork-filesharing kdenlive       kdenlive-data kdepasswd kdepim kdepim-groupware kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepim-wizards       kdepimlibs-kio-plugins kdeplasma-addons kdesdk kdesdk-dolphin-plugins kdesdk-kio-plugins kdesdk-misc kdesdk-scripts       kdesdk-strigi-plugins kdetoys kdeutils kdewallpapers kdewebdev kdf kdiamond kdm kdoctools keyboard-configuration       kfilereplace kfind kfourinline kgamma kgeography kgeography-data kget kgoldrunner kgpg khangman khelpcenter4 kig kigo       killbots kimagemapeditor kinfocenter kiriki kismet kiten kjots kjumpingcube kleopatra klettres klettres-data klibc-utils       klickety klines klinkstatus klipper kmag kmahjongg kmail kmines kmix kmousetool kmouth kmplot kmtrace knetwalk knode       knotes kolf kollision kolourpaint4 kommander kompare konq-plugins konqueror konqueror-nsplugins konquest konsole       konsolekalendar kontact kopete korganizer kpartloader kpat kppp krb5-locales krdc kremotecontrol kreversi krfb krita-data       krosspython kruler kscd kscreensaver kscreensaver-xsavers kshisen ksirk ksnapshot kspaceduel ksquares kstars kstars-data       ksudoku ksysguard ksysguardd ksystemlog kteatime ktimer ktimetracker ktorrent ktorrent-data ktouch ktron ktuberling       kturtle ktux kubrick kuiviewer kuser kwalletmanager kwordquiz kwrite laevateinn lame latex-beamer latex-xcolor       leptonica-progs less lib32asound2 lib32bz2-1.0 lib32gcc1 lib32gomp1 lib32ncurses5 lib32quadmath0 lib32stdc++6 lib32tinfo5       lib32v4l-0 lib32z1 libaa1 libaacs0 libacl1 libaio1 libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4       libakonadi-kmime4 libakonadiprotocolinternals1 libanjuta-3-0 libao-common libao4 libapr1 libaprutil1       libaprutil1-dbd-sqlite3 libaprutil1-ldap libarchive12 libarpack2 libart-2.0-2 libasound2 libasound2-dev       libasound2-plugins libatasmart4 libatk1.0-0 libatk1.0-data libatlas3gf-base libattr1 libaudio2 libaudiofile1 libav-tools       libavahi-client3 libavahi-common-data libavahi-common3 libavahi-glib1 libavcodec53 libavdevice53 libavfilter2       libavformat53 libavutil51 libbind9-80 libblas-dev libblas3gf libblkid1 libbluetooth3 libbluray-bdj libbluray1       libbrlapi0.5 libbsd-dev libbsd0 libbz2-1.0 libbz2-dev libc-ares2 libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev       libc6-dev-i386 libc6-i386 libcaca0 libcairo-gobject2 libcairo-script-interpreter2 libcairo2 libcairo2-dev       libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcap-ng0 libcdaudio1 libcdt4 libcfitsio3 libcgraph5       libck-connector0 libcln6 libcolord1 libcomerr2 libcommons-beanutils-java libcommons-compress-java libconfig++9       libconfig-inifiles-perl libcpufreq0 libcroco3 libcrypto++9 libcuneiform0 libcups2 libcupscgi1 libcupsdriver1       libcupsfilters1 libcupsimage2 libcupsmime1 libcupsppdc1 libcurl3 libcurl3-gnutls libcwidget3 libdatetime-perl libdb-java       libdb5.1 libdb5.1-java libdb5.1-java-gcj libdbus-1-3 libdbus-glib-1-2 libdc1394-22 libdconf0 libdevmapper1.02.1       libdirectfb-1.2-9 libdiscover2 libdjvulibre-text libdjvulibre21 libdlrestrictions1 libdmtx0a libdns81 libdpkg-perl       libdrm-intel1 libdrm-nouveau1a libdrm-radeon1 libdrm2 libdvdnav4 libdvdread4 libedit2 libespeak1 libestools2.1       libevent-2.0-5 libexif12 libexpat1 libexpat1-dev libfaad2 libffado2 libfftw3-3 libflite1 libfltk1.1 libfontconfig1       libfontconfig1-dev libfontenc1 libfreetype6 libfreetype6-dev libfribidi0 libfs6 libftdi1 libfuse2 libgadu3 libgail-3-0       libgail18 libgavl1 libgc1c2 libgcc1 libgcj-bc libgcj-common libgcj12 libgconf-2-4 libgconf2-4 libgdbm3 libgdk-pixbuf2.0-0       libgdk-pixbuf2.0-common libgdl-3-common libgeoip1 libgfortran3 libggadget-1.0-0b libggadget-qt-1.0-0b libghc-dataenc-dev       libghc6-dataenc-dev libgif4 libgimp2.0 libgirepository-1.0-1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx       libglapi-mesa libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglibmm-2.4-1c2a libglu1-mesa libglu1-mesa-dev       libgmp-dev libgmp10 libgmpxx4ldbl libgnome-keyring-common libgnome-keyring0 libgnutls-dev libgnutls-openssl27 libgnutls26       libgnutls28 libgnutlsxx27 libgomp1 libgpgme++2 libgphoto2-2 libgphoto2-l10n libgphoto2-port0 libgpm2 libgps20 libgraph4       libgraphicsmagick++3 libgraphicsmagick3 libgraphite2-2.0.0 libgs9 libgs9-common libgsm1 libgssapi-krb5-2 libgssglue1       libgssrpc4 libgstreamer-plugins-bad0.10-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin       libgtk2.0-common libgtkpod1 libgutenprint2 libgvc5 libgvpr1 libhdf5-7 libhogweed2 libhpmud0 libhtml-form-perl       libhtml-parser-perl libhtml-tree-perl libhttp-date-perl libhyphen0 libical0 libice-dev libice6 libicu48 libid3-3.8.3c2a       libidn11 libilmbase6 libimobiledevice2 libio-socket-ssl-perl libisc83 libisccc80 libisccfg82 libiscsi1 libjack-jackd2-0       libjavascriptcoregtk-1.0-0 libjavascriptcoregtk-3.0-0 libjim0debian2 libjline-java libjpeg62 libjs-jquery libjs-sphinxdoc       libjson0 libjtidy-java libk3b6 libk3b6-extracodecs libk5crypto3 libkabc4 libkadm5clnt-mit8 libkadm5srv-mit8       libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 libkcalutils4 libkcddb4 libkcmutils4 libkdb5-6 libkde3support4       libkdecorations4 libkdecore5 libkdeedu-data libkdegames5a libkdepim4 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4       libkeduvocdocument4 libkemoticons4 libkephal4abi1 libkeyutils1 libkfile4 libkggzgames4 libkggzmod4 libkggznet4       libkholidays4 libkhtml5 libkidletime4 libkimap4 libkimproxy4 libkio5 libkipi8 libkjsapi4 libkjsembed4 libkldap4 libkleo4       libklibc libkmahjongglib4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4       libkonq-common libkonq5-templates libkonq5abi1 libkonqsidebarplugin4a libkontactinterface4 libkopete4 libkparts4       libkpathsea6 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 libkrb5-3       libkrb5support0 libkresources4 libkrosscore4 libkrossui4 libksane0 libkscreensaver5 libksgrd4 libksieve4       libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libkunitconversion4 libkutils4 libkxmlrpcclient4       liblapack-dev liblapack3gf liblcms1 liblcms2-2 libldap-2.4-2 libleptonica-dev liblockfile-bin liblockfile1 liblqr-1-0       libltdl7 liblua5.1-0 liblvm2app2.2 liblwres80 liblzma5 libmagic1 libmailtools-perl libmailtransport4 libmessagecore4       libmessagelist4 libmicroblog4 libmimelib4 libmlt++3 libmlt-data libmodplug1 libmount1 libmouse-perl libmozjs10d       libmp3lame0 libmp3splt0 libmpcdec6 libmpfr4 libmpg123-0 libmsn0.3 libmtp-common libmtp-runtime libmtp9 libmusicbrainz3-6       libmysqlclient18 libncurses5 libncurses5-dev libncursesw5 libneon27-gnutls libnepomuk4 libnepomukquery4a libnepomukutils4       libnet-http-perl libnet-ssleay-perl libnetfilter-conntrack3 libnetpbm10 libnettle4 libnewt0.52 libnfsidmap2 libnl-3-200       libnl-genl-3-200 libnl-route-3-200 libnm-glib-vpn1 libnm-glib4 libnm-util2 libnotify-bin libnotify4 libnspr4-0d       libnss3-1d libnuma1 libofa0 libogg-dev libogg0 libokularcore1 libopenal-data libopenal-dev libopenal1 libopencore-amrnb0       libopencore-amrwb0 libopencv-calib3d2.3 libopencv-contrib2.3 libopencv-core2.3 libopencv-features2d2.3 libopencv-flann2.3       libopencv-highgui2.3 libopencv-imgproc2.3 libopencv-legacy2.3 libopencv-ml2.3 libopencv-objdetect2.3 libopencv-video2.3       libopenexr6 libopenjpeg2 libopenmpi1.3 libopenraw1 liborc-0.4-0 libortp8 libotr2 libpam-ck-connector libpam-modules       libpam-modules-bin libpam-runtime libpam0g libpango1.0-0 libpango1.0-dev libpaper-utils libpaper1 libpari-gmp3       libparpack2 libparted0debian1 libpathplan4 libpcap0.8 libpci3 libpciaccess0 libpcre3 libpcre3-dev libpcrecpp0       libpcsclite1 libperl5.14 libphonon4 libpipeline1 libpixman-1-0 libpixman-1-dev libplasma-geolocation-interface4       libplasma-ruby libplasma3 libplasmagenericshell4 libpng12-0 libpng12-dev libpolkit-agent-1-0 libpolkit-backend-1-0       libpolkit-gobject-1-0 libpoppler-qt4-3 libpopt0 libpostproc52 libpq5 libprocesscore4abi1 libprocessui4a libprocps0       libproxy0 libptexenc1 libpulse-mainloop-glib0 libpulse0 libpython2.7 libpython3.2 libqalculate5 libqca2       libqca2-plugin-ossl libqgpgme1 libqt4-dbus libqt4-declarative libqt4-designer libqt4-dev libqt4-help libqt4-network       libqt4-opengl libqt4-opengl-dev libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql       libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtassistantclient4 libqtcore4 libqtcore4-perl       libqtgui4 libqtgui4-perl libqtruby4shared2 libqtwebkit-dev libqtwebkit4 libquadmath0 libquicktime2 librados2 libraptor1       libraptor2-0 librasqal3 libraw1394-11 librbd1 librdf0 libreoffice libreoffice-base libreoffice-base-core libreoffice-calc       libreoffice-common libreoffice-core libreoffice-draw libreoffice-emailmerge libreoffice-filter-binfilter       libreoffice-filter-mobiledev libreoffice-help-en-gb libreoffice-help-en-us libreoffice-impress libreoffice-java-common       libreoffice-l10n-en-gb libreoffice-math libreoffice-report-builder-bin libreoffice-style-galaxy libreoffice-style-oxygen       libreoffice-writer libroar-compat2 libroar2 librpcsecgss3 librsvg2-2 librsvg2-common libruby1.8 libsamplerate0 libsane       libsane-common libsane-hpaio libsasl2-2 libsasl2-modules libschroedinger-1.0-0 libscim8c2a libsdl-gfx1.2-4       libsdl-image1.2 libsdl-net1.2 libsdl-ttf2.0-0 libsdl1.2-dev libsdl1.2debian libselinux1 libsemanage-common libsemanage1       libsensors4 libsepol1 libservlet2.5-java libsigc++-2.0-0c2a libslang2 libslv2-9 libsm-dev libsm6 libsmbclient libsmi2ldbl       libsmokebase3 libsmokekdecore4-3 libsmokekdeui4-3 libsmokekfile3 libsmokekhtml3 libsmokekio3 libsmokeknewstuff2-3       libsmokeknewstuff3-3 libsmokekparts3 libsmokektexteditor3 libsmokekutils3 libsmokenepomuk3 libsmokeplasma3       libsmokeqtcore4-3 libsmokeqtdbus4-3 libsmokeqtgui4-3 libsmokeqtnetwork4-3 libsmokeqtopengl4-3 libsmokeqtsql4-3       libsmokeqtsvg4-3 libsmokeqtwebkit4-3 libsmokeqtxml4-3 libsmokesolid3 libsndfile1 libsndfile1-dev libsnmp-base libsnmp15       libsolid4 libsoprano4 libsoundtouch0 libsoup2.4-1 libsox-fmt-all libsox-fmt-alsa libsox-fmt-ao libsox-fmt-base       libsox-fmt-ffmpeg libsox-fmt-mp3 libsox-fmt-oss libsox-fmt-pulse libspandsp2 libspectre1 libspeex1 libspeexdsp1       libspice-server1 libsqlite3-0 libss2 libssh2-1 libssl-dev libssl-doc libssl1.0.0 libstdc++6 libstdc++6-4.6-dev       libstreamanalyzer0 libstreams0 libsvga1 libsvn1 libswscale2 libswt-cairo-gtk-3-jni libswt-gnome-gtk-3-jni       libswt-gtk-3-java libswt-gtk-3-jni libswt-webkit-gtk-3-jni libsyndication4 libsysfs2 libtag1-vanilla libtag1c2a libtar0       libtasn1-3 libtasn1-3-dev libtdb1 libthai-data libthai0 libtheora0 libthreadweaver4 libtiff4 libtinfo-dev libtinfo5       libts-0.0-0 libupower-glib1 liburi-perl libusb-1.0-0 libustr-1.0-1 libuuid1 libv4l-0 libv4lconvert0 libva-x11-1       libvcdinfo0 libvdpau1 libvisual-0.4-0 libvisual-0.4-plugins libvlc5 libvlccore5 libvncserver0 libvo-aacenc0       libvo-amrwbenc0 libvorbis-dev libvorbis0a libvorbisenc2 libvorbisfile3 libvpx1 libvtk5.8 libwavpack1 libwbclient0       libweather-ion6 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libwireshark-data       libwpd-0.9-9 libwps-0.2-2 libwrap0 libwxbase2.8-0 libwxgtk2.8-0 libx11-6 libx11-data libx11-dev libx11-doc       libx11-protocol-perl libx11-xcb1 libx86-1 libxapian22 libxau-dev libxau6 libxcb-composite0 libxcb-dri2-0 libxcb-keysyms1       libxcb-randr0 libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shm0 libxcb-shm0-dev libxcb-xfixes0 libxcb-xv0       libxcb1 libxcb1-dev libxcursor1 libxdmcp-dev libxdmcp6 libxdot4 libxerces2-java libxext-dev libxext6 libxfont1 libxft-dev       libxft2 libxi6 libxine1 libxine1-bin libxine1-ffmpeg libxine1-misc-plugins libxine1-plugins libxine1-x libxinerama1       libxkbfile1 libxml-libxml-perl libxml-sax-perl libxml-simple-perl libxml2 libxml2-utils libxmuu1 libxrender-dev       libxrender1 libxslt1.1 libxss1 libxt-dev libxt6 libxtst6 libxv1 libxvidcore4 libxvmc1 libxxf86dga1 libzbar0       libzvbi-common libzvbi0 linux-base linux-headers-amd64 linux-kbuild-3.2 linux-libc-dev locales login logrotate lokalize       lsb-base lsb-release lskat lsof luatex lynx lynx-cur make man-db manpages manpages-dev marble marble-data marble-plugins       mawk mednafen melt mesa-common-dev mgltools-geomutils mgltools-gle mgltools-opengltk mgltools-pyglf mgltools-utpackages       mgltools-vision mgltools-visionlibraries mobile-broadband-provider-info modemmanager module-init-tools mount mp3splt       mpg123 mpg321 mplayer mtools multiarch-support mutt myspell-en-gb myspell-en-us mysql-client-5.5 mysql-common       mysql-server mysql-server-5.5 mysql-server-core-5.5 mythes-en-us nano ncurses-base ncurses-bin ncurses-term netbase       netcat-traditional netpbm network-manager network-manager-openvpn network-manager-pptp network-manager-vpnc nfs-common       nfs-kernel-server notification-daemon ntfs-3g ntfsprogs ocaml ocaml-base ocaml-base-nox ocaml-interp ocaml-nox okteta       okular openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib openjdk-7-jre openjdk-7-jre-headless       openjdk-7-jre-lib openprinting-ppds openssh-client openssl openvpn os-prober oss-compat oxygen-icon-theme oxygencursors       palapeli palapeli-data pari-doc pari-gp parley parley-data passwd pciutils pcmciautils pdf2djvu perl perl-base       perl-modules phonon phonon-backend-vlc php5 plasma-containments-addons plasma-dataengines-addons       plasma-dataengines-workspace plasma-desktop plasma-desktopthemes-artwork plasma-netbook plasma-runners-addons       plasma-scriptengine-googlegadgets plasma-scriptengine-javascript plasma-scriptengine-python plasma-scriptengine-ruby       plasma-scriptengine-superkaramba plasma-scriptengine-webkit plasma-scriptengines plasma-wallpapers-addons       plasma-widget-folderview plasma-widget-lancelot plasma-widget-networkmanagement plasma-widgets-addons       plasma-widgets-workspace policykit-1 poppler-data poppler-utils powertop poxml ppp pptp-linux preview-latex-style       printer-driver-foo2zjs printer-driver-gutenprint printer-driver-hpcups printer-driver-hpijs printer-driver-postscript-hp       printer-driver-ptouch procmail procps psmisc psutils pulseaudio pulseaudio-esound-compat pulseaudio-module-x11       pulseaudio-utils pymol python python-apt python-apt-common python-beautifulsoup python-configobj python-crypto       python-dateutil python-dbus python-debianbts python-decorator python-dev python-feedparser python-gi python-gobject       python-gobject-2 python-kde4 python-libxml2 python-minimal python-numpy python-pexpect python-pip python-qt4       python-qt4-dbus python-reportbug python-simplegeneric python-simplejson python-simpy python-simpy-doc python-simpy-gui       python-sip python-support python-sympy python-tk python-uno python2.6 python2.6-minimal python2.7 python2.7-dev       python2.7-minimal python3.2 python3.2-minimal qdbus qemu-keymaps qemu-kvm qemu-utils qjackctl qt4-linguist-tools       qt4-qmake r-doc-html reportbug rocs rpcbind rsync rsyslog ruby-kde4 ruby-plasma ruby-qt4 ruby-qt4-webkit ruby1.8       sane-utils scdaemon seabios sed sensible-utils sgml-base sgml-data shared-desktop-ontologies shared-mime-info       soprano-daemon sox ssl-cert step subversion sudo sweeper system-config-printer-kde systemsettings sysv-rc sysvinit       sysvinit-utils task-british task-british-desktop task-british-kde-desktop task-desktop task-laptop tasksel tasksel-data       tcc tcl-vtk tcl8.5 tcpd tcpdump tex-common texinfo texlive-binaries texlive-latex-extra texlive-latex-extra-doc       texlive-pstricks time tipa tk8.5 traceroute translate-toolkit transmission transmission-cli transmission-common       transmission-gtk tsconf ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ttf-freefont ttf-kochi-gothic ttf-liberation ttf-lyx       ttf-sazanami-gothic ttf-wqy-zenhei tzdata tzdata-java ucf udisks ufraw-batch umbrello uno-libs3 unp unrar-free unzip       update-inetd upower ure usb-modeswitch-data usbutils util-linux util-linux-locales valgrind vavoom vcdimager vgabios       vim-common vim-tiny visualboyadvance vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse vpnc w3m wget whiptail whois       wireshark wireshark-common wpasupplicant x11-apps x11-common x11-utils x11-xfs-utils x11-xkb-utils x11-xserver-utils       x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev xauth xchat xchat-common xclip xfonts-mathml       xfonts-utils xinit xml-core xorg xscreensaver xscreensaver-data xscreensaver-data-extra xscreensaver-gl       xscreensaver-gl-extra xscreensaver-screensaver-bsod xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all       xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-all       xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati xserver-xorg-video-chips xserver-xorg-video-cirrus       xserver-xorg-video-fbdev xserver-xorg-video-i128 xserver-xorg-video-intel xserver-xorg-video-mach64       xserver-xorg-video-mga xserver-xorg-video-neomagic xserver-xorg-video-nouveau xserver-xorg-video-openchrome       xserver-xorg-video-r128 xserver-xorg-video-radeon xserver-xorg-video-rendition xserver-xorg-video-s3       xserver-xorg-video-s3virge xserver-xorg-video-savage xserver-xorg-video-siliconmotion xserver-xorg-video-sis       xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident xserver-xorg-video-tseng       xserver-xorg-video-vesa xserver-xorg-video-vmware xserver-xorg-video-voodoo xterm xtrans-dev xulrunner-10.0 xz-utils       youtube-dl zip zlib1g zlib1g-dev     1568 upgraded, 183 newly installed, 22 to remove and 0 not upgraded.     Need to get 2,433 MB of archives.     After this operation, 853 MB of additional disk space will be used.     Do you want to continue [Y/n]? n     Abort.      It could be that a lot of those packages are not really necessary for me, so if 853 MB is needed to upgrade those, then it's about 853 MB too large. However, I have no way to ascertain this currently. Of course `apt` should theoretically be able to print that information verbosely, if it can do the two sums in the first place.


Linux distribution geared towards developers

I am looking for the best flavor of Linux that would appeal to the developer's side of me. I am a lover of open source and use several different languages. Is there such a thing as a Linux geared towards developers?


Arch Linux and xfce4 working strange after system upgrade

I'm having a hard time trying to figure this out. I've been running Arch Linux and Xfce4 smoothly for several months but suddenly after a full system upgrade in which the system asked me to replace some Python packages, things got weird. For instance, I can't see see the mouse pointer after booting and when I actually see it, it's not the pointer you normally see. I can't see the top bar of any application on which you can minimize / maximize / close it. Some programs seem to open on the top left region of my screen and I can't move them. I can't use `Alt`+`Tab` to switch between applications, etc. I took a couple of screenshots: ![enter image description here](http://i.stack.imgur.com/ixoEO.png) ![enter image description here](http://i.stack.imgur.com/JPuCe.png) * * * **Edit:** Looking at the Xorg log file I found this warnings and errors:               [    18.930] (II) LoadModule: "intel"     [    18.970] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so     [    19.071] (II) Module intel: vendor="X.Org Foundation"     [    19.071]    compiled for 1.13.0, module version = 2.20.12     [    19.071]    Module class: X.Org Video Driver     [    19.071]    ABI class: X.Org Video Driver, version 13.0     [    19.071] (II) LoadModule: "vesa"     [    19.084] (WW) Warning, couldn't open module vesa     [    19.084] (II) UnloadModule: "vesa"     [    19.084] (II) Unloading vesa     [    19.084] (EE) Failed to load module "vesa" (module does not exist, 0)     [    19.084] (II) LoadModule: "modesetting"     [    19.085] (WW) Warning, couldn't open module modesetting     [    19.085] (II) UnloadModule: "modesetting"     [    19.085] (II) Unloading modesetting     [    19.085] (EE) Failed to load module "modesetting" (module does not exist, 0)     [    19.085] (II) LoadModule: "fbdev"     [    19.085] (WW) Warning, couldn't open module fbdev     [    19.085] (II) UnloadModule: "fbdev"     [    19.085] (II) Unloading fbdev     [    19.085] (EE) Failed to load module "fbdev" (module does not exist, 0)     [    19.085] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,


How can a single thread use 200% CPU usage?

![enter image description here](http://i.stack.imgur.com/yhdAT.png) From the screenshot above of `htop` output you can see that mysql is apparently using 204% of CPU usage (this is a CentOS server with dual quad- core Intel Xeons). However only one core (8) is doing much work, and it says 100%. One of these is presumably incorrect, what's going on here?


Make USB modem work on Puppy Linux 5.28

I have an Alcatel Modem, when I plug it on my old dell c600 with Puppy Linux. **This is the log from my Puppy Linux 5.28 on my dell laptop:**               tail -f /var/log/messages | grep usb          user.err kernel:usb 1-1: device not accepting address 9, error -71     user.info kernel:usb 1-1: new full speed USB device using uhci_hcd and address 10      What can I do to make it work?... It also happends with my opensuse on my laptop but when I plug it off and in again it "fixex itself". **This is the log from my OpenSuSe 12.2 on my acer laptop: (to compare)**               ~ # tailf /var/log/messages | grep usb     Oct 28 13:01:10 acer dbus-daemon[537]: modem-manager[656]: <info>  (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1 claimed port ttyUSB1     Oct 28 13:01:10 acer modem-manager[656]: <info>  (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:12.0/usb3/3-1 claimed port ttyUSB1      where can I find some info? Can anyone give me a hand?.


Is it possible to set different resolution between console and X when Kernel Mode Setting is enabled?

My LCD monitor is dying. It has white screen issue: when power on, it's black screen (power LED is flashing), after a while (maybe one hour), it turns to white screen. Then I need switch to different resolutions many many times (hundreds, maybe) to get the LCD monitor to work. Currently, I'm using VNC to connect to my fedora 17 desktop from an Android phone, and switch resolutions from System Setting -> Display. It's difficult to switch resolutions in this way. So, I think if the console has a different resolution to the X Window resolution, then I can simply use `Ctrl`+`Alt`+[`F1``F2`...] hotkeys to switch resolutions. If I disabled Kernel Mode Setting by passing `nomodeset` parameter to kernel, then the console resolution is different to X Window resolution. However, the X Windows does not get the native/best resolution (1680x1050) of the monitor, it only get 1280x1024 resolution which is listed in vesa modes (`vga=ask` kernel parameter). So, before I buy a new monitor or fixed this monitor, is it possible to set different resolution between console and X when Kernel Mode Setting is enabled ? * * * **Edit (2012-11-28)** I've sent LCD monitor to electrical appliance service shop and finally got it fixed, it was because of some capacitors failed. And now I realize I can also change to a different lower resolution in X environment, then use `Ctrl`+`Alt`+[`F1``F2`...] hotkeys to switch resolutions. This can let me get lower resolution but same X:Y ratio as native/best resolution. The answer for this question is still wanted.


Configure Postfix to send emails "via" a server

This is a question related to postfix and WordPress (but is more of a postfix question). To give some background, on a professional WordPress host (like WP Engine) when I receive WordPress Mail Notifications (comments, form submissions, new users, etc...) it will say in gmail sent from "predefined wordpress admin email" via email.wpengine.com. This is not blocked by Google's spam filters or anything. I have a cloud server set up and a WordPress site installed on it. When I send email from zach@wptemple.com it gets sent to spam and when I send email as zach@protechig.com (me) it fails to send completely. This does, however send fine on WordPress. This goal of this it so send all emails via mail.wptemple.com and have them not get caught by spam filters. How can I accomplish this?


tc show output explanation

I've found useful run watch along tc, for example:               [root@router ~]# watch  -dc  tc -p -s -d  qdisc show dev eth0              Every 2,0s: tc -p -s -d qdisc show dev eth0                                             Sat Oct 19 21:22:26 2013          qdisc prio 1: root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1      Sent 130714882 bytes 1107132 pkt (dropped 20379, overlimits 0 requeues 0)      rate 0bit 0pps backlog 0b 0p requeues 0     qdisc sfq 30: parent 1:2 limit 127p quantum 1514b flows 127/1024      Sent 775116 bytes 1466 pkt (dropped 0, overlimits 0 requeues 0)      rate 0bit 0pps backlog 0b 0p requeues 0     qdisc tbf 20: parent 1:3 rate 100000bit burst 1600b/8 mpu 0b lat 70.0ms      Sent 30679 bytes 119 pkt (dropped 170, overlimits 0 requeues 0)      rate 0bit 0pps backlog 0b 0p requeues 0      I've wonder why rate in all cases is 0.... why? Please could you recommend me some documentation that explains tc show output? Also, the show output is somewhat cryptic, please could you recommend me some documentation that explain something like: backlog,


Can any user account in Linux invoke command chmod?

Since permissions are sensitive, is it vital to be clear whether a specific user is or not allowed to run command `chmod`?


How to use a variable as part of an array name

I have two arrays:               arrayA=(1 2 3)     arrayB=(a b c)      and I want to print out one of them using a command line argument, i.e., without any `if else`. I tried a few variations on the syntax with no success. I am wanting to do something like this:               ARG="$1"          echo ${array${ARG}[@]}      but I get a "bad substitution" error. How can I achieve this?


Is it possible to export env variable via Upstart?

I need to export a variable `FOO=stringhere` so that system processes could use it. And the place I would like to do this, is Upstart job. Unfortunately, I tried as per Upstart manual to do `env FOO=stringhere` http://upstart.ubuntu.com/cookbook/#environment-variables But after the system is booted, `echo $FOO` returns nothing. Am I trying to do something impossible, or are there any gotchas I should know?


What to use for firewall testing (port opened or not)

so... we know that we can test that if a port is open on the firewall with:               telnet SERVERIP PORT      ..but afaik there are services that can't be tested with telnet, because ex.: telnet doesn't know that protocol that the service is using, and telnet will report that the port is closed, but in reality the service is up&running. Q: first: was I correct about telnet? second: What to use for testing that a port is opened on a server? (so it's not blocked by a firewall) - are there any unix tools for this?


How can I resolve a hostname to an IP address in a Bash script?

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.


How can I test the system footprint of applications?

I am about to develop a piece of software and I want to ascertain the impact it has on my system. The main things I am look for are load times, memory and CPU usage and shutdown time, although I would like to get as much information as possible. I know I can use my distro's system monitor to get some of this stuff, but I need precise data as I am going to be doing some before and after tests during my project. Is there anything out there (preferably open source) that will suffice?


Need to find a cronjob

I have a problem, some user ,and I'm not sure who, on one of my servers wrote a cronjob that executes every night at midnight. The cronjob creates a sql dump of a database which is then grabbed by another server and gzipped. The problem that I'm experiencing is that once that has occurred the file on the local system is no longer needed and I'd like to remove it in an hour or so. Which in, and of itself is not an issue but I don't know where to go to find the crontab for the person in question. Can anyone think of a way to find the cronjob from all the potential places that one could store a cronjob?


WHOIS over SSH via specific port

Is it possible to issue WHOIS requests via my local machine over a port other than 43 to a remote box to execute? Ideally, I'm using Jsch and I'd like to be able to round-robin these requests. I've looked in /etc/services, didn't learn much. Anytime I specify a port other than 43, the whois request hangs (whois -p 4999 74.125.224.72). I know about the RIR's and their various limits, and I realize that I could pay somewhere like DomainTools. But let's be honest, that wouldn't as much fun, would it?


Assign value to a variable in bash, coming from another commands

Doing this in bash, makes SUFFIX variable holding /dev/fd/[fd],               SUFFIX=<( echo "&*645\[]}#@name" | sed -r 's/[^[:alnum:]]+/_/g' )      What should I do to assign the actual result, of commands being executed in between parenthesis? So in this case SUFFIX should be assigned a value of `_645_name`?


How do I switch to Linux (Ubuntu) on Chromebook?

For reference, the Chromebook model is `SNOW FREMONT A-E 0878` I used `Crouton` to install `Ubuntu` on my `Chromebook`. In doing so, I had my computer in _developer mode_ and wasn't able to save anything that was on my computer prior to doing so. As a result, I switched back to `Chrome OS` with the command `Ctrl+Alt+Forward/Back` to try and download a python script I was interested in playing around with from my class. I signed into my Google account, and from then on I haven't been able to access `Ubuntu`. I tried putting the computer in `recovery mode` again and going through the steps once more (albeit I see it as a wasted effort since it's already ON my computer, but I digress). Since trying to put it in recovery mode, I'm left with the yellow exclamation mark saying `Chrome OS is missing or damaged`; I put in the USB I used originally when going through the entire process. Another screen shows up that says `the device I inserted does not contain Chrome OS` (no duh). `Ctrl+D` is the next attempt, but to no prevail as I'm stuck with the yellow exclamation mark.


How to setup a RAID system using USB sticks as storage media

I want to create an **inexpensive self-hosted private git server with redundant storage**. To that end I have bought a Raspberry Pi and configured both `git` and `ssh` on the Pi. I can access the Pi both from a LAN and remotely (by forwarding a port on my router to the Pi). So the git server is already up and running. The last thing to do is redundant storage. Because I have a 7-port USB hub attached to my Pi, I would like to set up a **RAID system using multiple identical USB sticks**. I have only conceptual knowledge of RAID. Therefore I do not know how to set it up and more importantly, whether it is possible with USB sticks connected to a hub. So these are basically my questions   * Can you set up a RAID system using USB sticks as the storage media   * What software should I use   * Where can I find good tutorials / manuals for RAID systems   * In case RAID is impossible, how can I synchronize data across multiple USB sticks


NFS Shares (Windows using FreeNFS but connecting on Linux)

I am using a "FreeNFS" on a Windows 8.1 machine and I set up a share `I:\Library`. I am currently allowing all clients and using ANSI encoding. My Linux box is actually a Raspberry Pi, using Raspbmc. I am currently SSHing into the machine and trying to mount the share with no success. I created a directory to mount: `sudo mkdir /nas` and here is the command I am using to mount it: `sudo mount -t nfs 192.168.1.2:/Library /nas` I've checked my windows firewall (turned it off completely while attempting this) and the error I am getting is: `mount.nfs: access denied by server while mounting 192.168.1.2:Library` I am not really sure where to move on from here, FreeNFS can't be blocked by a firewall because there is none, and that mount command is as basic as it gets. I'm kind of stuck at the moment. I even tried `sudo mount -t nfs 192.168.1.2:/Library /nas -o nfsvers=3` because I _think_ FreeNFS uses version 3.


How to send SIGKILLs to entire pipeline?

while true; do          # process substitution instead of usual pipeline to avoid waiting for all programs         handle_input_with_timeout < <( prog1 | prog2 | prog3 )         echo "Data stopped flowing. Trying again"         # perminate stuck programs in previous pipeline, then try again         sleep 5     done      How to reliably get rid of prog1, prog2 and prog3 that can get stuck and hold resources necessary to try again? Can it be done in Bash alone or I need to use cgroups?


Tile logfile into pieces and search for errors

I want to tile a logfile into pieces and then search in this pieces for errors. If there is an error, I want to put the relevant logfile-piece into another file. Little example: Logfile looks like this: > STARTLOG1   >  blabla   >  more_blabla   >  ENDLOG1   >  STARTLOG2   >  ERROR: Errortext   >  This is an Error   >  from user XYZ   >  ENDLOG2   >  STARTLOG3   >  blabla   >  more_blabla   >  ENDLOG3 I want to tile logfile into pieces. All lines between STARTLOG and ENDLOG should be 1 piece. When an error appears in a piece, extract the whole piece to a file. The file should look like this: > STARTLOG2   >  ERROR: Errortext   >  This is an Error   >  from user XYZ   >  ENDLOG2


Repeated filesystems and mount points in df output

when I type `df -h` to see the storage of my system the following is the result               root@kch-rsp:/home/pi# df -h     Filesystem      Size  Used Avail Use% Mounted on     rootfs           13G  2.4G   10G  20% /     /dev/root        13G  2.4G   10G  20% /     devtmpfs        215M     0  215M   0% /dev     tmpfs            44M  228K   44M   1% /run     tmpfs           5.0M     0  5.0M   0% /run/lock     tmpfs            88M     0   88M   0% /run/shm     /dev/mmcblk0p5   60M  9.4M   50M  16% /boot      there are several questions about this result:   1. why are there multiple `tmpfs`? I know that this is a swap space but when I executed `swapon -s`, I only see one swap space.              root@kch-rsp:/home/pi# swapon -s     Filename                                Type            Size    Used    Priority     /var/swap                               file            102396  0       -1        2. the `rootfs` and `/dev/root` looks like to be indicating the same thing but why express them as these two entries?


Turn on PC speaker after resume

After resuming from suspend my PC speaker becomes silent. I need to run `alsamixer` and arbitrarily adjust its volume either up or down for it to come back again. But if I suspend and then resume a second time the same problem happens again. Any ideas what might be making it silent? I have already checked the following:   1. `lsmod | grep pcspkr`   2. `~/.xinitrc`   3. `~/profile`   4. `/etc/profile`   5. `/etc/inputrc`   6. `/etc/X11/Xsession` As suggested below, a useful workaround is to create a hook `/etc/pm/sleep.d/alsa` to run `alsactl restore` upon resuming from sleep. But I still don't know what the problem is. Thanks.


Linux collect only the modified logs every day

Linux collect the modified logs every day I want collect the log files from `/var/log/` directory every day. My script will zip all the files in the directory and store it separately. But the problem is i am getting all the log files zipped every day and size keeps increasing. So how to zip only the modified files(only modified contents) every day. How go get Modified contents of a file after a particular point of time. i.e, For First time we can collect entire logs. On Next Day onwards we should collect only the current day logs.. On Next Day .... ....


netcdf installation and usr/local... folders

I need to install netcdf on a SuSE Linux machine but I am having a few problems understanding the usr/local/ folders and my the myusername/local/ folders. What I think I need to do is go into the uncompressed netcdf folder and do               ./configure --prefix=/usr/local/netcdf-gfortran      However I need to create this folder, right? and why in usr/local and not in my username/local ...? Any help would be welcome. Also if you knew a place where the usr vs myusername folder are explained easily for dumb people like me, it would be much appreciated.


Ajax-y sites load sloooowly or not at all. [Ubuntu/Mint]

About two months ago I reinstalled Ubuntu onto my desktop machine. Since doing so I've had a lot of problems with certain websites and very slow or complete loading. It _seems_ to be related to use of AJAX -- gmail is heavily affect, general stackexchange pages generally not (but submitting forms to stackexchange can be), slashdot/wired/torontoist/duckduckgo not much, various gov of canada form-heavy website: terribly so. I don't believe it's hardware related as this issue emerged only after reinstalling Ubuntu, and I have a win7 partition on this machine that also works fine. The Mint partition on this box suffers the same issue. I've googled for this (which was, yes, slow), and found very little: this posting has very similar symptoms to what I'm experiencing, but a totally different network setup: I'm on a home network behind a home router, and already using auto DHCP addresses. I'm not sure what my next steps for diagnosing this problem should be, any help would be totally appreciated.


I'm trying to make a very simple shell script to run as a CGI on a uhttpd server running on an OpenWRT install. The file is called `/www/cgi-bin/first.cgi` and looks like...               #!/bin/sh     echo "Content-type: text/html"     echo ""     echo "<title>Bash as CGI"     echo "</title>"     echo "
Hello world
"     echo "Today is $(date)"     echo ""      ...and I did a               chmod +x first.cgi      on the file. When I try to pull up...               http://192.168.15.1/cgi-bin/first.cgi      ...the browser gets...               Unable to launch the requested CGI program:     /www/cgi-bin/first.cgi: Text file busy"      I can `cat` and `vi` the file from a shell prompt, so not sure how the file is busy or even how I would find out. What am I doing wrong?


Is there a way to push shell config information when SSHing to a host?

I know how to set the GNOME-terminals (or xterms!) prompt to green/red regarding the last exit code:               vi .bashrc          export PROMPT_COMMAND='PS1="`     if [[ \$? = "0" ]];     then echo "\\[\\033[0;32m\\]";     else echo "\\[\\033[0;31m\\]";     fi`[\u@\h \w]\[\e[m\] "'          export PS1      in picture: ![enter image description here](http://i.stack.imgur.com/Qb2De.png) but if I log in to a remote server then these color settings doesn't work! How can I set it to work on remote terminals too? Unfortunately, I can't append the mentioned lines to the remote servers `.bashrc`.


Using sched_rt_period_us for setting maximum time between task calls of order of 10ms

I realize `sched_rt_period_us` and `sched_rt_runtime_us` are meant to prevent freezing the system in case of runaway RT task. I wonder though, if it's possible to use a small value of `sched_rt_period_us` to assure the task is running smoothly. I have a simple job that requires no more than a millisecond or so of CPU time per call - say, driving a stepper motor over GPIO pins. I'd like to achieve no less than 100 cycles per second though, sustained. That's no more than 10% of the CPU time - discounting pre-emption and scheduler overhead. I've read "very small values in sched_rt_period_us can result in an unstable system"1 but it wasn't said what order of magnitude counts for "a very small value". Can I reliably count on no more than 0.01s delay between calls to my program if I set `sched_rt_period_us` to 10000 and return control (`sched_yield()`) in timely manner? The underlying CPU would likely be 850MHz ARM with a number of other tasks than said control, but none of them realtime or even required to "feel responsive", still, unlike with defaults of `sched_rt_period_us` and `sched_rt_runtime_us` (95% out of 1s) I can't allow the RT task to sleep whole 0.05s at a time.


Turning off mailing in psad

The `psad` monitoring tool keeps on sending lots of mail to my localhost admin account. I use my ubuntu server as a NAT router, and psad warned me to enable logging in iptables. After I did so, it sarted filling my mailbox with loads of messages. Within few days the size of mail box has grown to 3.4 GB. How can I completely turn off mailing on psad?


Fedora 15 :Twitter on Google Chrome

It's been almost 15 days since I installed Fedora 15 on my laptop. And since day 1, Twitter seems to be having some issue opening up. Whenever I try to load twitter.com, it loads an "Aw Snap" page. From the answers here, I did `sudo setenforce 0` and Twitter started working fine. But turning off SELinux doesn't seem to be a good thing to me. I tried disabling all extensions and removing all the apps from Google Chrome. Still the problem persists. Can someone please provide some solution to this irritating problem?


boot without failing services

I'm using Debian testing. I want to configure wifi on my netbook, but failed to do so and when the system boots I get the following message:               INFO: task wpa_supplicant:1634 blocked for more than 120 seconds.     "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.      I have come across info that this is a new feature that informs that a service is failing. The service in my case is `/etc/init.d/networking`. The problem is this: Booting process hangs and prints every 120 seconds the message above and that is it. I can't use my netbook any more. Is there any way to boot without this service? PS. What I'm doing right now is booting from a rescue USB disk to fix the issue but I wonder if there is any boot options I could use in circumstances like this?


mkdir based on input from other directories

I have a directory full of albums I've ripped to FLAC format. Folders are named "Artist - Album [flac]" I need to create matching directories named "Artist - Album [mp3]" but only for certain folders... So "ls | grep Pantera" gives me the list of directories I want to work with... How can do I do this via command line?


SSH inside SSH fails with "stdin: is not a tty"

I'm trying to connect to machine one with ssh and then connect to another machine two with ssh, but I get this error.               ssh user@computerone.com 'ssh otheruser@computertwo.com'          stdin: is not a tty      Why?


Does Linux have support for network interfaces over an AT-Command serial modem?

I've got a Telit GM862-GPS module, which is a GPRS modem with a serial interface and uses the standard Hayes AT command set (with some extensions). What I'd like to do is to be able to connect this up to a Linux device so that existing software (such as wget, ftp etc) can connect to the internet through it. In my limited Linux experience, I would imagine that this would require the modem to be configured as a regular network interface device, but I could be wrong. Is this something that is supported in the Linux kernel/are there existing drivers to do this?


How universal is sudo?

I was writing some instructions on how to install something (TeX-related - if you don't ask, I won't ruin your day by supplying more details) and used `sudo` to install system-wide. Someone commented that they didn't think that `sudo` was available on all Linux (or Unix) distributions. Are there Unix distributions that don't have `sudo`, and if so what are they? Is there a universally acknowledged "Get me superuser privileges" command that _is_ on all systems?


How to decrypt an encrypted container via ssh without entering a passphrase while requiring some client authentication?

I log in to a server via public key authentication and then mount a container (using e.g. LUKS/dm-crypt or truecrypt). At the moment, I have to enter the container password manually. Is there a way to secure that container using e.g. the ssh agent? Or if that is not possible directly, can I encrypt the container password (or probably better, keyfile) with the ssh public key and use ssh agent to decrypt it temporarily?


Instant search in less command? (Similar to incsearch in VIM)

Is there a way to search, while I'm typing in `less`? Just like the vim option, `set incsearch`. As I didn't find a proper way to do it, is there any similar tool that can do it?


How can I get a new Fedora 19 install to boot on Intel NUC

I have a newly installed Fedora 19 on an Intel NUC computer. During installation, I selected the "reclaim all space" option and took the default partitioning. The install created an EFI boot partition, but the BIOS on the computer does not seem to recognize it. I can boot Fedora Live from a USB stick and mount the partitions without issue. If the UEFI boot and Legacy boot options are both selected, the BIOS displays               Reboot and Select proper Boot device     or Insert Boot Media in selected Boot device and press a key.      If either of the options are unchecked:               A bootable device has not been detected.     Please refer to the Product Guide at http://support.interl.com/support/motherboards/desktop      I did not find any helpful info at the URL above... Here is the partition table:               Number  Start (sector)    End (sector)  Size       Code  Name        1            2048          411647   200.0 MiB   EF00  EFI System Partition        2          411648         1435647   500.0 MiB   0700          3         1435648       234440703   111.1 GiB   8E00       And the details on partition 1:               Partition number (1-3): 1     Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System)     Partition unique GUID: C81832BE-6B66-474C-99B3-8C4DF9654B93     First sector: 2048 (at 1024.0 KiB)     Last sector: 411647 (at 201.0 MiB)     Partition size: 409600 sectors (200.0 MiB)     Attribute flags: 0000000000000000     Partition name: 'EFI System Partition'      I've been unsuccessful in finding details that match this particular scenario Here is the output from efibootmgr after booting from the USB stick.               # efibootmgr     BootCurrent: 0004     Timeout: 1 seconds     BootOrder: 0001,0002,0003,0004,0000     Boot0000* Fedora     Boot0001* SATA : PORT 0 : Crucial_CT120M500SSD3 : PART 0 : Boot Drive     Boot0002* USB : Generic SD/MMC/MS/xD 1.07     Boot0003* USB : Generic MicroSD/M2 1.08 : PART 1 : Boot Drive     Boot0004* UEFI : USB : Generic MicroSD/M2 1.08 : PART 0 : OS Bootloader      Ideally, I'd like to be able to boot directly from the SATA drive, but at this point, I'd also be open to a solution that has a multi-stage boot using a USB stick -- as long as the root partition is on the SATA drive.


How can I use sed to replace a multi-line string?

I've noticed that, if I add `\n` to a patter for a substitute using `sed`, it does not match. Example:               $ cat > alpha.txt     This is     a test     Please do not     be alarmed          $ sed -i'.original' 's/a test\nPlease do not/not a test\nBe/' alpha.txt          $ diff alpha.txt{,.original}          $ # No differences printed out      How can I get this to work?


Thunar: "Unable to find or create wastebasket directory" on samba share

I have a samba share directory that is mounted on my machine as:               //xxx/home_private  /media/home_private cifs rw,noperm,credentials=/home/xx/samba_perm.txt 0 0      When I tried to delete file using Thunar I get an error:               "Unable to find or create wastebasket directory"      I found some ideas in internet that I should create .Trash-UID folder in the root directory of the mounted share, where UID should corresponds to the UID of the user. I have assumes that it should correspond to the UID of samba user. Unfortunately it does not work. Below part of my smb.conf file:               [home_private]         comment =Home Private Server         path = /media/xxx/private         valid users = @home_users         force user = pi         read only = No      Any ideas how to fix it? P.S. shift+Delete works fine.


USB DVD device type, /dev designation

What is the device type of an external USB DVD player to use when using the Linux mount command? ISO9660 is the type for the internal CDROM. What is the corresponding type for a DVD drive? Are there different types is the DVD is read only or read-write? Within /dev, SR0 appears to be the internal CD drive. What is the /dev designation of the external USB DVD drive?


Emacs complains: font 'serif 10' is not defined

I am running Linux Mint 12 and trying to start emacs but keep getting this error: > font 'serif 10' is not defined It seems obvious to me that I don't have the correct font. However, I cannot for the life of me figure out how to upgrade `fontconfig` to either re- validate itself and acquire the font anew or find another way to get this font. Does anyone know what I need to do to fix this font issue?


Boot desktop from laptop connected by USB

1. Would it be possible to have laptop with some Linux, that I would be able to connect to any desktop with USB-USB cable, and boot something from that laptop? (its actual OS or something different dedicated to this kind of activity - with more generic configuration for hardware)   2. If yes, how would you achieve this? I think it should be possible considering you can boot system from USB device, so you theoretically should be able to trick desktop to think that you are actually a boot device - am I wrong? Also, Ubuntu for Android seems to be something like that. But how hard would it be to achieve with custom OS and custom device that runs Linux?


Templates for startup script?

I need to write a couple of Linux (Debian) startup scripts. Are there any accurate templates available?


ext2/3/4 reserved blocks percentage purpose

I know that this feature dates back 20 years but I still would like to find out **What is the purpose of the reserved blocks in ext2/3/4 filesystems?**


Partially overwrote /dev/sda, can I recover anything?

I was messing around with my new hard drive, which only contains some personal files, and to check its write speed, I typed: `sudo dd if=/dev/zero of=/dev/sda`, `/dev/sda/` being the new 2 TB connected to my Raspberry Pi. Hopefully, I cancelled the command and only 11 MB have been written. Now disk content can't show up, and now `parted` tell me that the partition tree is like this:               |--- unallocated 8.00 MB     |--- unknown 1.82 TB     |--- unallocated 9.08 MB      Before, it was like this:               |--- ext4 1.82 TB      I don't know if `dd` did overwrite the first 11 MB of the disk, which means that the partition table have been totally overwritten, or random bits of the hard drive have been overwritten. Now the hard drive is connected to my Xubuntu 14.04 laptop as `/dev/sdb`. I've tried `gpart` which is still running, and also `testdisk` without success. Knowing that the whole disk was `ext4` and that sector size was 4096, is it possible to recover the partition table without re-formating and make me able to access my files again (even if some have been corrupted/deleted)? Or the only solution I have is to use a file recovery tool, which would be tiresome because of the amount of data to copy stored on this drive?


Image HDD in Linux (functionality like Norton Ghost)

I am looking to use an embedded Linux distro such as Tiny Core as a automated recovery type tool. Basically, the user would choose to boot into Tiny Core from the boot menu, then if a USB is plugged in containing a ghost type image of the drive (it would contain a unique UUID that udev rules would detect and only then would it start imaging), it would restore the entire hard drive. Now my problem is finding a utility like Ghost for Linux that will do the imaging. The best part about Ghost is that   1. it does a file-by-file copy so it's very fast and the resulting compressed image is small, and    2. it dynamically resizes the drive so if you are imaging a 10 GB drive onto a 20 GB drive, it will image the drive and then resize it automatically, fixing the partition table if necessary.  `dd` is obviously not an option for this reason, it copies every sector of the drive and it does not have the ability to dynamically resize so if for some reason the destination drive is even 1 byte smaller than the source, it will fail. `partimage` has similar issues. CloneZilla is the only tool for Linux that I've seen powerful enough to do something like this, but it's obviously it's own distro and not able to be integrated into a Linux distribution. Since CloneZilla is just a collection of low level tools though, anyone know how it actually clones a hard drive? What would be the best way to do something like this? I've been searching for an answer on this for years and still have not found a solid solution. 'Til this day, we use an ancient version of Ghost because it images whatever we need flawlessly, but we'd like to get away from proprietary tools and DOS and head towards an open source solution.


makefile uses same receipe for multiple targets

i love this makefile but if i call 'all' or 'lab4' it will -o the name 'lab4' but build using the dbug receipe. if i call 'dbug' it will -o 'dbug' and use dbug receipe. what am i doing wrong? i stole this from wiki.osdev.org/Makefile btw               CC := gcc     CFLAGS := -c -Wall -Werror     DBCFLAGS := $(CFLAGS) -DDEBUG -g     LDFLAGS :=     LAB := lab4          PROJDIRS := .     SRCFILES := $(shell find $(PROJDIRS) -maxdepth 1 -type f -name "*.c")     HDRFILES := $(shell find $(PROJDIRS) -maxdepth 1 -type f -name "*.h")     OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))     DEPFILES := $(patsubst %.c,%.d,$(SRCFILES))     TSTFILES := $(patsubst %.c,%_t,$(SRCFILES))     AUXFILES := makefile README     ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES)          -include $(DEPFILES) $(TSTDEPFILES)          .PHONY: all clean dist check testdrivers todolist          all: $(LAB)          $(LAB): $(OBJFILES)         $(CC) $(LDFLAGS) $(OBJFILES) -o $@          %.o: %.c makefile         $(CC) $(CFLAGS) $< -o $@          dbug: $(OBJFILES)         $(CC) $(LDFLAGS) $(OBJFILES) -o $@          %.o: %.c makefile         $(CC) $(DBCFLAGS) $< -o $@          todolist:         -@for file in $(ALLFILES:makefile=); do grep -H -e TODO -e FIXME $$file;     done; true          dist:         @tar czf /mnt/backup/cis27/$(LAB)-`date +%m%d%y.%H%M`.tar.gz $(ALLFILES)          clean:         -rm *.o *~ *.d


Accessing Linux server from Windows machine in graphical mode via SSH

I need to access one of my school Linux servers from my home computer that runs Windows. And I need to access graphical desktop (X server) on them remotely, not only shell. The problem includes 3 Linux servers with different settings. I don't have admin privileges on any of them and cannot change those settings. The 3 servers are called Aisa, Lethe and Aura (somebody loves Greek mythology here). All of them are part of school's local network. I need to access graphical interface on either Lethe or Aura, any of them would be fine. Here is what I have found out:   * ports for services like VPN are not available on any of the 3   * SSH is allowed on Lethe and Aisa, not on Aura. I can still access Aura when I SSH to Aisa or Lethe using Putty and then `ssh aura`.   * I have tried Xming program that allows graphical connection from windows to Linux via SSH. I was only able to connect to Aisa this way (why not to Lethe?! Putty works there). So what can I try to get graphical connection to either Lethe or Aura from my Windows computer? Any suggestions are very much welcome. **edit** Here is the code showing how I get disconnected from Aura back to Aisa after running `vncserver`:               aisa:/home/user>$ ssh aura     Last login: Sat Oct 13 00:00:00 2012 from aisa.domain.com     aura:/home/user>$ module add vnc     aura:/home/user>$ vncserver          New 'aura.domain.com:1 (user)' desktop is aura.domain.com:1          Starting applications specified in /home/user/.vnc/xstartup     Log file is /home/user/.vnc/aura.domain.com:1.log          aura:/home/user>$ Connection to aura closed by remote host.     Connection to aura closed.     aisa:/home/user>$       **edit 2** Content of file `/home/user/.vnc/aura.domain.com:1.log` after executing command `vncserver`:               aura:/home/user>$ cat /home/user/.vnc/aura.domain.com:1.log     /packages/run/vnc-4.1.2/Xvnc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory     /home/user/.vnc/xstartup: line 4: xsetroot: command not found     /home/user/.xsession: line 15: xset: command not found     vncconfig: unable to open display "aura.domain.com:1"     /home/user/.xsession: line 42: xmodmap: command not found     Module xv     Module modules     Module viewers     Module WindowMaker-0.80.2     Module mozilla     ModuleCmd_Load.c(199):ERROR:105: Unable to locate a modulefile for 'mozilla'     stty: standard input: For this device invalid ioctl     wmaker: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory      Note: I have translated some strings that were displayed in czech (Aura is running czech version of Red Hat)


Make part of read-only filesystem writable

I have a filesystem on flash using jffs2. I would like to mount this filesystem read-only, except for a single folder that I would like to be writable. Is this possible without resorting to something like unionfs and the likes?


How to whitelist a url/site in privoxy?

I'm using Fedora 14 with `privoxy-3.0.16-3.fc14.i686`! These sites are blocked by Privoxy:   * http://somewhere.com/user/11111/track?page=1   * http://www.somewhere2.org/popup.asp?pid=114645006&pnr=10001&foto=1 How can I whitelist these two sites/urls? I want to be able to visit these sites without being blocked (but e.g.: still block the ads on it)


Tag a client to multiple screens

Using `Awesome Window Manager`, I am trying to tag one client to multiple screens. I tried to use the following configuration in my `rc.lua`, but it does not work:               { rule = { class = "<the class>" },     callback = function(c) c:tags({ tags[1][2], tags[2][2] }) end },      Am I missing something?


How to properly launch a program and make possible to redirect its running output (stdout and stderr) at a later stage?

The problem is quite simple: I find useful to have the possibility to _switch on (and off)_ the output of some running program in each moment I need. To be more precise I want to be free to redirect their standard output (and error) from the current shell to another one, to `/dev/null`, to a file or back to the original shell. I search for something direct (and safe) that takes advantage from the fact I know **in advance** that I will switch the outputs on and off. I post an answer too. * * * Below my first attempt. Let's suppose I work in the shell number 35.               $ who am I                     # the command line to ask where am I     myuser  pts/35  ...            # The answer       My try starts with a symbolic link to that terminal               ln -s /dev/pts/35  MyOutput  # The command to link      The idea is to launch the program with the redirection set to that link               ./Execute_program > MyOutput      It works, it redirects the output to my terminal, but when I give the command to change the link,               ln -sf  /dev/null  MyOutput      the link changes, **but the redirection doesn't change** how I hoped. It doesn't change for the running process. If I launch a new program in the same way, the redirection follows the new prescription of the link.   If I start again and I set the link to `/dev/null` the output is suppressed as expected, but again when I change the link the redirection doesn't change.   If I do a link to a link I get the same result. The use of `hard link` doesn't change the situation. _Sadly_ the shell expands the command line at launch time. Is there any possibility to do the job in a similar way or have I to find how to communicate to the process (or the PPID ones) that the link is changed? * * * Notes: This is a question of the series "How to redirect the output of a running process?", but it doesn't start from the point "Ops I launched the program and I forget to redirect the output. Now I want to do it", but from the opposite: "How can I launch a program with the explicit aim to redirect elsewhere the output at a later stage?". I intend to use a such procedure when it is not possible (or convenient) to modify the source code of the program.   I read that it is possible to `disown` the process, use `screen` and transfer form a screen to another... or to use a debugger, to intercept the process... All those solutions could function with a good amount of experience and effort, but some of them present a percentage of risk too.


Working with the option -x in zip

I can't manage to figure out the `-x` option in the command zip. I want to compress a working folder to save it as a backup, but I have some files and a directory that contains huge files that I don't need to save. Therefore I would like to compress the whole directory except for the one listed above. Here is my script:               #!/bin/bash     clear     echo "Saving all work directory in the backup"          now=$(date +'%Y_%m_%d')     filename=($(echo "backup_"$now))     cd /local00/home/F48174/Documents/scripts_eprou_aster/     echo "... removing /base because it's huge ..."          zip -9 -r /local00/home/F48174/Documents/backup/$filename.zip  -x /local00/home/F48174/Documents/scripts_eprou_aster/base/      Sorry for the really poor code quality, I'm only beginning to learn shell scripting.


DHCP lease acquired , yet no ping, not even to default gateway

I've just installed Debian Wheezy on my PC using netinstall. I can only use its wifi. My interface has been recognize by the system, and I've used:               iwconfig wlan0 essid MY_HOME_AP      (I've switched off router's security in order to ease the pain of getting a first connection to the internet) then I used:               dhclient wlan0 -v       to get an IP address. I now have a valid local IP. I can also see it on my router DHCP clients list. However, I can't ping anywhere, not even the default gateway. My routing tables is:               default  192.168.2.1 0.0.0.0       UG 0 0 0 wlan0     localnet *           255.255.255.0 U  0 0 0 wlan0      where do I have it wrong? **ADDED:** 1. The entire output of 'netstat -rn' is attached above. 2. the output of 'ifconfig' (copied by hand..):               wlan0 Link  encap:Ethernet HWaddr 00:1f:1f:a6:29:ba           inet  addr:192.168.2.101 Bcast:192.168.2.255 Mask:255.255.255.0           inet6 addr: fe80::21f:1fff:fea6:32da/64 Scope:Link           UP BROADCAST MULTICAST MTU:1500 Metric:1           RX packets:53 errors:0 dropped:0 overruns:0 frame:0           TX packets:37 errors:0 dropped:0 overruns:0 carrier:0           collisions:0  txquelen:1000           RX bytes:18334 (17.9 KiB) TX bytes:4172 (4.0 KiB)


Change desktop wallpaper from terminal

I am running Mint 13 with Cinnamon 1.6. I would like my desktop wallpaper to automatically change depending on the time of day. So, the first thing that comes to mind is setting up a cron job to do it for me. Problem is, I don't know how to change the wallpaper from script / terminal. What I would like to know:   1) How would one change the background from terminal?   2) Is the there already a built-in way of doing this?


Pretty print in VIM?

I have few lines that each of them are colon separated values, `abc:def:3` Now I could do the reformat with printf plus IFS variable, `while read line; do IFS=":" printf "%-20s %-16s %5d\n" ${line[0]} ${line[1]} ${line[2]}; done < XX` but is it possible to do it within VIM?


Can Linux programs be sent a SIGXXX command they can respond to in the UI?

I am trying out the timeout command and would like to know if there is a kill signal that a GUI program, whether a graphics desktop or a terminal program will treat as the user terminating the program from the UI, like a `File| Exit` command or clicking the `X` button on the window, thus prompting the use to save any open files. `kill -l` displays over 64 options. Are any of them either alone in combination equivalent to a GUI option to terminate? I have tried with `nano` as an example, but the options I have tried so far don't work except SIGTERM.


Fix terminal title after SSH remote logging to another machine

right now I am using an one-line perl code to change titles of my terminal bars,               print("\e]0;@ARGV\7");      but every time after I ssh to another remote machine, the title will be modified by the host (by which I'm not particularly bothered). But after I exit from the connection, the modified title remains. Is there a way to fix this? essentially I want a fixed title for my terminals when operating locally. I primarily use xfce terminal and terminator under either CentOS or Debian. Thanks. **EDIT** Another subtlety is that, rather having all terminals the same name, I would prefer to have the freedom to edit their titles on-the-fly but only forbid SSH session from modifying what I edited.


Linux error:No such file or directory

I have written a script `abc.sh` and saved it in a place called `generallstuff`. I navigate to this folder with:               cd ~ /generallstuff      when i try to run the script with:               chmod 755 abc.sh      i get the error `"no such file or directory"` But the script is in this place, why is this. Previously i had no problem running scripts


Bash Linux random CLI Password generator and `<`

I recently discovered this method for generating a 9 character password from the linux prompt in bash:               < /dev/urandom tr -dc A-Za-z0-9_ | head -c9      What is `<` doing?


How to monitor only the last n lines of a log file?

I have a growing log file for which I want to display **only** the last 15 lines. Here is what I know I can do:               tail -n 15 -F mylogfile.txt      As the log file is filled, `tail` appends the last lines to the display. I am looking for a solution that only displays the last 15 lines and get rid of the lines before the last 15 after it has been updated. Would you have an idea?


BIOS Update within Linux

I want to enable PXE boot of current system's BIOS from Linux. If modifying the BIOS content is not possible then is there any way to take the back up of current BIOS setting and dump it on identical other machine ? So that changes made on first machine's BIOS settings will be effective on Second identical machine's BIOS Settings EDIT: I came across an utility flashrom, which is allowing me dump the previously recorded file. But is there any way to modify only single option of BIOS (without dumping)


How to create an initrd image on OpenSuSE linux?

/usr/src/linux-3.2.1 # make install     scripts/kconfig/conf --silentoldconfig Kconfig     sh /usr/src/linux-3.2.1/arch/x86/boot/install.sh 3.2.1-12-desktop arch/x86/boot/bzImage \                     System.map "/boot"     You may need to create an initial ramdisk now.      --               /boot # mkinitrd initrd-3.2.1-12-desktop.img 3.2.1-12-desktop          Kernel image:   /boot/vmlinuz-2.6.34-12-desktop     Initrd image:   /boot/initrd-2.6.34-12-desktop     Kernel Modules: <not available>     Could not find map initrd-3.2.1-12-desktop.img/boot/System.map, please specify a correct file with -M.     There was an error generating the initrd (9)      **See the error during mkinitrd command. What's the point that I am missing?**   What does this mean? `Kernel Modules: <not available>` **OpenSuse 11.3 64 bit** ## EDIT1: I did "make modules".   I copied the `System.map` file from the `/usr/src/linux-3.2.1` directory to `/boot`, now running `initrd` command gives the following error:               linux-dopx:/boot # mkinitrd initrd-3.2.1.img 3.2.1-desktop          Kernel image:   /boot/vmlinuz-2.6.34-12-desktop     Initrd image:   /boot/initrd-2.6.34-12-desktop     Kernel Modules: <not available>     Could not find map initrd-3.2.1.img/boot/System.map, please specify a correct file with -M.          Kernel image:   /boot/vmlinuz-3.2.1-12-desktop     Initrd image:   /boot/initrd-3.2.1-12-desktop     Kernel Modules: <not available>     Could not find map initrd-3.2.1.img/boot/System.map, please specify a correct file with -M.          Kernel image:   /boot/vmlinuz-3.2.1-12-desktop.old     Initrd image:   /boot/initrd-3.2.1-12-desktop.old     Kernel Modules: <not available>     Could not find map initrd-3.2.1.img/boot/System.map, please specify a correct file with -M.     There was an error generating the initrd (9)


Move to the beginning of a line in screen

> **Possible Duplicate:**   >  Shell: how to go to the beginning of line when you are inside a screen? Normally to get to the beginning of a line in a terminal the command is `Ctrl`+`a`. While using GNU screen the `Ctrl`+`a` is the escape sequence to enter a screen command. Is there a default way to move to the beginning of a line while in screen?


What is going wrong with this theme when running Eclipse?

Please see this video to understand what I'm describing: Weirdness in Eclipse - YouTube. Essentially, when I use the "Ambiance Evolution" theme with Eclipse, it starts wiggling and doesn't stop, as weird as that sounds. I really like the theme, so I'd like to be able to use it, but this is kind of unacceptable. How can I fix this strange issue?


Using ABI_X86 in Gentoo

For one reason or another (I've been busy, I guess), it's been months since I've updated my Gentoo system. And, as you can imagine, this means there's a lot of packages (and USE changes) I need to go over. My system is "amd64" (multilib), but I have a lot of (manually keyworded) packages from "~amd64". Anyway, in this update, I keep seeing "ABI_X86" USE flags. What is this? This is new. There's nothing in "eselect news list" about it. Being the Gentooer I am, I did my research, and found this topic: http://forums.gentoo.org/viewtopic-t-953900-start-0.html. That seemed to show how to use it, but, are there any "real" docs for this? What does it do? What am I _supposed_ to set "ABI_X86" to? I have a multilib system. I assume I want "64", but then what are "32" and "x32"? I'm confused at what I need to do here. Emerge is yelling a lot about slot conflicts, and they seem to be related to "ABI_X86" (I forget the errors exactly, but I remember one was zlib). So, is there any "official" docs about what "ABI_X86" is and how to use it? From the thread I linked, I found this page: http://kicherer.org/joomla/index.php/en/blog/liste/29-transition-of-emul- packages-to-true-multilib, but I want to know what I'm doing before I go keyword a bunch of stuff and edit my make.conf. P.S. I have most of the "app-emulation/emul-linux-x86" packages (the ones I seemed to need at the time) in my "package.keywords" file.


How to add a line in many files

I have many **.html** files and I need to add a meta tag after < **head** >'s start tag in each file. How I can do that? Can `vim` help me?


How can I confirm the identity of the remote SSH host I'm trying to connect to?

I'm trying to debug a problem I have when trying to connect to an SSH host over WAN. I'm looking for a way to confirm that my client is reaching the correct host, and is not routed somewhere else along the way. I have access to both the client and he host. Maybe there a way to monitor every SSH connection request on the host's side to confirm that my request is actually reaching it? The host is a Raspberry Pi running Raspbian, SSH version is OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013.


ncmpcpp character problem

This was really wired! All `=` became `q` on my xfce4-terminal app, what's wrong with it? Any ideas? ![enter image description here](http://i.stack.imgur.com/69N3x.png)               %> set | grep LANG     LANG=en_US.utf8     LANGUAGE=en_US.utf8


How to create themes for MATE?

I'm looking for information on the basic structure of a theme for MATE (in order to build my own). I took an existing theme and renamed it, but I have been unable to get it to show up in Appearance Preferences. (It claimed to have imported but does not show in the theme chooser). Is there some guide or documentation that covers the basic structure of a theme? A. Can you edit it live in `~/.themes` or do you have to repackage and import to test changes? B. How does it get it's name? C. What files are required for it to work? D. How do you set a screen shot? E. Many themes have gtk-2.0,gtk-3.0,metacity-1,xfwm4, etc subfolders. How do I know which one I'm using? F. I'm not even sure what type of theme MATE uses. Is it metacity? GTK? It's own format? Also, documentation on the structure of the file(s) would be good. It appears similar too, but not the same as, css. It should go without saying, but I already tried Googleing for this, and found next to nothing in the way of a simple "My First MATE Theme" tutorial.


Using notify-send with a non-interactive ssh connection

I want to be able to use `notify-send` to send popup messages from one server to be displayed on another. I'm sure this is possible with SSH, but how can I automate it to a one-line command that doesn't ask me for a password so I can include it into a script?


how to change partitioning?

I have a hdd with /, /home. I just got new SSD and I need to change my partitions without any reinstalling. I would like to create a separate /var partition (which is currently under /) and leave it on hdd. Rest of the / (including /boot) I would like to move to ssd. How should I do it in ubuntu 12.04?               cat /etc/fstab     proc            /proc           proc    nodev,noexec,nosuid 0       0     UUID=4f614ad4-8b21-4e21-b6fc-13ba7f489a88 /               ext4    errors=remount-ro 0       1     UUID=dba112c1-1647-4e73-b907-0117ad3a058e /home           ext3    defaults        0       2     UUID=01CB6A18FD7DF1C0 /windows/c      ntfs    defaults,umask=007,gid=46 0       0     UUID=01CB6A18E6F42370 /windows/d      ntfs    defaults,umask=007,gid=46 0       0     UUID=48d5b437-91c9-4304-9bde-ee661779089d none            swap    sw              0       0      I have also some lvm partitions but they are irrelevant for this problem


How to request a specific IP address from DHCP server?

I'm running Angstrom Linux on an embedded device (BeagleBoard-xM). I managed wireless connection via a Wi-Fi adapter. When I load its driver using `modprobe`, BB-xM requests an IP address from router running DHCP server. The IP address assignment varies from 192.168.1.100-192.168.1.200. Can BB-xM request a specific IP address? _**Attention:_** _The solutions I found, are referring to settings on the router. However, I'm looking if this is possible on the BB-xM side._ Any ideas? `wpa_supplicant.conf`               ctrl_interface=/var/run/wpa_supplicant     eapol_version=1     network={             ssid="SSID"             scan_ssid=1             proto=RSN             pairwise=CCMP TKIP             key_mgmt=WPA-PSK             psk="password"     }


Which directory MUST exist in / to qualify an OS as Linux

Studying the lpic wikibook for the lpic exam 1, I encountered the following question.                Which directory MUST exist in / to qualify this OS as Linux      I've searched google and the wikibook but can't find which folder in / makes a 'unix' classified as a 'linux'. Here is the output of a linux box               vagrant@precise64:~$ ls /     bin              boot        dev        etc             home        initrd.img       initrd.img.old   lib         lib64      lost+found      media       mnt       opt              proc        root       run             sbin        selinux       srv              sys         tmp        usr             vagrant     var      vmlinuz          vmlinuz.old      Here is the output of / in Mac OSX               ls /     Applications Network      Users        bin          dev          home          net          sbin         usr          Library      System       Volumes           cores        etc          mach_kernel  private      tmp          var      Any other information about what makes a unix into linux is appreciated.


GPS Device Attached to Linux Mint 15

I purchased a Silvercrest GPS device from Lidl recently, but the software that came with it is a tad "underpowered" to say the very least and has no Linux support. I'm attempting to get at the raw data on the device myself to write something which I can use in Linux and not have to rely on my Windows machine and the exe that came with it, but I'm not too sure where to start to get access to the device. As far as I can see it's a rebranded Targa device but can't find any more information on the web. (It's not a laptop GPS module or anything, its a simple outdoor GPS unit that I need to get the data off via USB after a trip out with it). When I plug it in I get the following from `dmesg`, I hope someone can point me in the right direction as to how to interact with this thing.               [ 156.076046] usb 2-1: new high-speed USB device number 3 using ehci-pci     [ 156.208903] usb 2-1: New USB device found, idVendor=10d6, idProduct=1101     [ 156.208907] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [ 156.208910] usb 2-1: Product: Media Player     [ 156.208912] usb 2-1: Manufacturer: USB      [ 156.208913] usb 2-1: SerialNumber: \xffffffe8\xffffffa7\xffffff9b\xffffffa7\xffffff9b \xffffffe8\xffffffbf\xffffffa6\xffffffbf\xffffffa6 \xffffffe7\xffffff83\xffffffb6\xffffff83\xffffffb6 \xffffffe8\xffffffa7\xffffff93\xffffffa7\xffffff93 \xffffffec\xffffff87\xffffff8d\xffffff87\xffffff8d \xffffffe2\xffffff88\xffffff8f\xffffff88\xffffff8f \xffffffe1\xffffff84\xffffffa4\xffffff84\xffffffa4 \xffffffe2\xffffffac\xffffffa2\xffffffac\xffffffa2 \xffffffee\xffffffb4\xffffff91\xffffffb4\xffffff91 \xffffffe4\xffffffb9\xffffff93\xffffffb9\xffffff93 \xffffffee\xffffffb4\xffffff91\xffffffb4\xffffff91 \xffffffe5\xffffff95\xffffff93\xffffff95\xffffff93 \xffffffe3\xffffffa8\xffffff91\xffffffa8\xffffff91 \xffffffe2\xffffff94\xffffff9c\xffffff94\xffffff9c \xffffffec\xffffff8a\xffffffb7\xffffff8a\xffffffb7 \xffffffe2\xffffff91\xffffffb8\xffffff91\xffffffb8     [ 156.212270] scsi5 : usb-storage 2-1:1.0     [ 157.213333] scsi 5:0:0:0: Direct-Access USB Media Player 2.00 PQ: 0 ANSI: 0 CCS     [ 157.214101] sd 5:0:0:0: Attached scsi generic sg2 type 0     [ 157.226457] sd 5:0:0:0: [sdc] Attached SCSI removable disk


wget failing when I enter variable name in command

I have a small bash script to download a file from my webserver. I pass the $File variable through the command line and then insert it into the wget command as follows:               File=${1}          wget -a /home/wgetlog.txt -nH -nd --accept=txt "http://192.168.1.21/files/$File/$File.txt"      If I run the command ./download.sh media - It gives the following in the log file:               --2014-04-07 17:44:36--  http://192.168.1.21/files//.txt     HTTP request sent, awaiting response... 404 Not Found      Is it due to me passing the variable side by side? Is the syntax correct? Or is there a better way of doing this :)


Difference between the sshd open & close entries in /var/log/secure and the log in & out entries in /var/log/wtmp

I have been trying to write a program to execute many commands during one ssh connection. My current way is (1) create SSH connection; (2) create SSH command tunnel/channel whenever needed; (3) close SSH connection. As expected, I see only two entries in /var/log/secure, corresponding to the ssh open & close event. My problem is that there are many entries in /var/log/wtmp, corresponding to the log in & out event. Could you help to comment on the relationships between these two file, in the context of recording SSH connections? Any insight is appreciated! Sorry for the trouble if the terminology is not appropriate!


Bash script : help file inside the script or in a different file?

I'm writing a script that has the vocation to be a fully featured program at the end. As far as I know, BASH is enough for his purpose (manage PPA's, kinda like Y-PPA). I would like to know how to output the help `myscript --help`. Currently, help is written with `echo -e` directly inside the script and called with a `if [ "$1" == "--help" ] || [ "$1" == "-h" ]` (I plan on switching that to getopts soon). But what's better ? To leave the `help` section inside the script or to just write a line to call another file containing the help ? In my opinion, leaving it inside the script could be better because :   * My program will remain a one text-file script   * It saves space on the hard-drive   * It avoids having an error with displaying another file that could be corrupted or in a different location But having a different text-file containing the help could also be better because :   * The main script called with `myscript` command would be lighter   * It simplifies the human-reading of the script   * It allows to update the help page separately if needed   * It could even allow to display only the help page with a GUI, and/or print it. So you see, I don't know what's the "usual" way of doing this. Thank you ! _PS : please also note that since I'm planning to release a complete program, a man-page would be great so I would anyway have to provide more than 1 file, maybe simply a .deb_