Installing ia32 Libs Need to Downgrade Packages

I've been trying to install ia32 libs for ADB and fastboot through apt-get but I get a message stating I have held broken packages. So I have tried Aptitude and instead Aptitude keeps telling me that I need to downgrade a whole bunch of packages and uninstall a further four; Is this a safe operation to perform? I am running Linux Mint 16 "Petra" Cinnamon edition. > >                 Remove the following packages:   >            1)     gcj-4.8-jre   >            2)     gcj-4.8-jre-headless   >            3)     gcj-jre   >            4)     gcj-jre-headless   >   >                 Install the following packages:   >            5)     lib32asan0 [4.8.1-10ubuntu8 (saucy)]   >            6)     lib32atomic1 [4.8.1-10ubuntu8 (saucy)]   >            7)     lib32gcc-4.8-dev [4.8.1-10ubuntu8 (saucy)]   >            8)     lib32gcc1 [1:4.8.1-10ubuntu8 (saucy)]   >            9)     lib32gomp1 [4.8.1-10ubuntu8 (saucy)]   >           10)     lib32itm1 [4.8.1-10ubuntu8 (saucy)]   >           11)     lib32quadmath0 [4.8.1-10ubuntu8 (saucy)]   >           12)     lib32stdc++-4.8-dev [4.8.1-10ubuntu8 (saucy)]   >           13)     lib32stdc++6 [4.8.1-10ubuntu8 (saucy)]   >           14)     libc6-dev-i386 [2.17-93ubuntu4 (saucy)]   >           15)     libc6-dev-x32 [2.17-93ubuntu4 (saucy)]   >           16)     libc6-x32 [2.17-93ubuntu4 (saucy)]   >           17)     libkms1 [2.4.46-1 (saucy)]   >           18)     libstdc++-4.8-dev [4.8.1-10ubuntu8 (saucy)]   >           19)     libx32asan0 [4.8.1-10ubuntu8 (saucy)]   >           20)     libx32atomic1 [4.8.1-10ubuntu8 (saucy)]   >           21)     libx32gcc-4.8-dev [4.8.1-10ubuntu8 (saucy)]   >           22)     libx32gcc1 [1:4.8.1-10ubuntu8 (saucy)]   >           23)     libx32gomp1 [4.8.1-10ubuntu8 (saucy)]   >           24)     libx32itm1 [4.8.1-10ubuntu8 (saucy)]   >           25)     libx32quadmath0 [4.8.1-10ubuntu8 (saucy)]   >           26)     libx32stdc++-4.8-dev [4.8.1-10ubuntu8 (saucy)]   >           27)     libx32stdc++6 [4.8.1-10ubuntu8 (saucy)] >   >                 Downgrade the following packages:   >           28)     cpp-4.8 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 (saucy)]   >           29)     gcc-4.8 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 (saucy)]   >           30)     gcc-4.8-base [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           31)     libasan0 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           32)     libatomic1 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           33)     libdrm-intel1 [2.4.46-1ubuntu1 (now) -> 2.4.46-1 (saucy)]   >           34)     libdrm-nouveau2 [2.4.46-1ubuntu1 (now) -> 2.4.46-1 > (saucy)]   >           35)     libdrm-radeon1 [2.4.46-1ubuntu1 (now) -> 2.4.46-1 (saucy)]   >           36)     libdrm2 [2.4.46-1ubuntu1 (now) -> 2.4.46-1 (saucy)]   >           37)     libgcc-4.8-dev [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)] >           38)     libgcc1 [1:4.8.1-10ubuntu9 (now) -> 1:4.8.1-10ubuntu8 > (saucy)]   >           39)     libgfortran3 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           40)     libgomp1 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           41)     libitm1 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 (saucy)]   >           42)     libquadmath0 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           43)     libstdc++6 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >           44)     libtsan0 [4.8.1-10ubuntu9 (now) -> 4.8.1-10ubuntu8 > (saucy)]   >   >   >   >     Accept this solution? [Y/n/q/?] >   Here is a full console log: http://pastebin.com/sj0fS8n2


What handles notifications in a pure Openbox environment?

I'm running Debian and logging in straight to Openbox. I'm sure that I sometimes receive notifications, which I can actually theme and modify through Xfce's notification settings manager, but what is actually running in the background and displaying these notifications? Is it a part of Xfce?


Get the number of files that match a pattern in a directory and delete the oldest one

I'd like to do the following:   1. Get the number of files in a given directory that match a given pattern, for example: `ExtractBackup_{date}.tar.gz`   2. If that number is 2 or higher, delete the oldest file which matches that pattern. How do I go about doing this using a Korn Shell (`.ksh`) script?


Swapping <esc> and <caps lock> in a way that persists with external keyboards

I have a file called ~/.speedswapper which contains the following:               ! Swap caps lock and escape     remove Lock = Caps_Lock     keysym Escape = Caps_Lock     keysym Caps_Lock = Escape     add Lock = Caps_Lock      ...when I run `xmodmap ~/.speedswapper`, this switches the `esc` and `Caps Lock` keys. I have this line in my ~/.profile, so that whenever I log in these keys are switched. **However** , if I plug in an external USB keyboard, this setting doesn't seem to persist. My laptop's keyboard works perfectly well, but I have to run the command again in order for the external keyboard to switch the two keys. Fortunately, doing so doesn't seem to affect my laptop's keyboard -- they seem to synchronise. One solution would be to find some way to run that xmodmap command whenever an external keyboard is plugged in, but I'd be open to another keyswapping solution, if it would be more robust. OS is Ubuntu 13.04. Given justbrowsing's comment, it looks like this can be achieved by writing a udev rule -- I think I have to use the RUN option, and that it should be triggered on /dev/hidraw0 or /dev/hidraw1, which are the devices that appear when I plug my keyboard in... but I'm still trying to wrap my head around the concept, so I'd appreciate any help from someone who knows what they're doing with udev.


How can I set up byobu to use a second screen session on login?

**tl;dr:** I have an irssi proxy screen session running in the background. I'm running `byobu -R -S byobu;exit` in `~/.bash_profile` to start a second session instead of reconnecting to the irssi session, but it starts a third session when I log in twice (e.g. once through the local terminal and once through SSH). How can I make the secon login reconnect to the first? I had previously enabled byobu on login for my server. This worked fine, and I would get the same underlying screen session no matter where I logged in from. However, then I added a second screen session to the server's boot:               [alex@alex-ubuntu-server ~]$ cat /etc/rc.local     #!/bin/sh -e     # [clipped out default ubuntu rc.local header]          # run an irssi proxy under screen as user alex     sudo -H -u alex screen -d -m -S irssi-proxy irssi          exit 0     [alex@alex-ubuntu-server ~]$       From then on, this command (which was put in my `~/.bash_profile` by byobu configuration):               _byobu_sourced=1 . /usr/bin/byobu-launch -S byobu      would connect to the already existing irssi screen session, instead of creating a new session. This was obviously not ideal, so eventually I settled on the following command:               byobu -R -S byobu;exit      Then intention was to name the screen session, thus allowing a reconnect to the same name when I logged in again through e.g. SSH. However, when I login again, I get a fresh screen session instead of the existing one (as you can see in the example below, this has already happened once).               [alex@alex-ubuntu-server ~]$ screen -ls     There are screens on:             18036.byobu     (07/07/2013 04:26:44 PM)        (Attached)             3869.byobu      (07/05/2013 07:45:37 PM)        (Attached)             1319.irssi-proxy        (07/04/2013 05:01:54 PM)        (Detached)     3 Sockets in /var/run/screen/S-alex.          [alex@alex-ubuntu-server ~]$ ssh localhost     Ubuntu 13.04     alex@localhost's password:     # at this point the screen redrew because of the new byobu session,     # so these weren't really one after another, as shown here     alex@alex-ubuntu-server:~$ screen -ls     There are screens on:             6216.byobu      (07/07/2013 05:17:38 PM)        (Attached)             18036.byobu     (07/07/2013 04:26:44 PM)        (Attached)             3869.byobu      (07/05/2013 07:45:37 PM)        (Attached)             1319.irssi-proxy        (07/04/2013 05:01:54 PM)        (Detached)     4 Sockets in /var/run/screen/S-alex.          alex@alex-ubuntu-server:~$       I'd prefer not to switch to `tmux`. How can I construct a byobu/screen command that reconnects to the existing second screen session if possible, but otherwise starts a new (second) session?


Unable to install any programs

I'm trying to install programs but no matter what program I try installing I get the following error. For example I downloaded skype 'skype- debian_4.2.0.11-1_i386.deb' and ran the command:               $ cd downloads      And then:               $ sudo apt-get install skype-debian_4.2.0.11-1_i386      And I get the following error:               Reading package lists... Done     Building dependency tree     Reading state information... Done     E: Unable to locate package skype-debian_4.2.0.11-1_i386     E: Couldn't find any package by regex 'skype-debian_4.2.0.11-1_i386'      I'm running CrunchBang. In the `sources.list` file it says:               ## CRUNCHBANG     ## Compatible with Debian Wheezy, but use at your own risk.     deb http://packages.crunchbang.org/waldorf waldorf main     #deb-src http://packages.crunchbang.org/waldorf waldorf main          ## DEBIAN     deb http://http.debian.net/debian wheezy main contrib non-free     #deb-src http://http.debian.net/debian wheezy main contrib non-free          ## DEBIAN SECURITY     deb http://security.debian.org/ wheezy/updates main     #deb-src http://security.debian.org/ wheezy/updates main          And in the folder there is one file called google-chrome.list and it says in it          ### THIS FILE IS AUTOMATICALLY CONFIGURED ###     # You may comment out this entry, but any other modifications may be lost.     deb http://dl.google.com/linux/chrome/deb/ stable main      ### EDIT #1 When I try to run the command:               $ sudo gdebi skype-debian_4.2.0.11-1_i386.deb      I get this:               Reading package lists... Done     Building dependency tree         Reading state information... Done     Building data structures... Done      This package is uninstallable     Wrong architecture 'i386'


Piping periodic data between Python scripts

> How to receive data from the environment e.g. bash I am trying to launch two Python scripts in `bash` and pipe `stdout` from one of them to `stdin` of the other. The first script outputs a single number every second.               ./script1 | ./script2     ./script1 > ~/file &; tail -f ~/file      I tried those, but can't get it working. `script1` outputs via Python's `print`, while script2 is tested with `echo "21.11 22.23 33.233" | ./script2` and is known to work. If I terminate `script1` ofter some time, and then `cat ~/file`, I see the actual data. However, at the time of execution, neither of the above examples work. How do I make this work? I would like to be able to work both with and without intermediate file.


Looking for simple photo organizing software for Linux

I am looking for a simple Linux software to organize photos. What exactly I want to do with this application is the following: I want to view all images in a given folder and just tag/star/mark some of them with by simple key pressing or a simple mouse click. No menu, not complicated 10-mouse click journey, just ONE key pressing/mouse click and on to the next image. After I have selected a couple of images that way, I want them moved to another directory. Is there such a simple application? I just want to simply organize my photos in different folders, as simple as that. No tagging which is software-dependent, as I want to view those images on differrent OS, like Linux, Windows, on TV, ... Therefore, no special tagging format, just simple reorganizing photos on the touch of a simple keystroke...


thoroughly find all links (hard and symlinks, and any combination thereof) leading to a file/dir

I read "most" of the proposed questions, but I believe they all miss the complexity of the right answer. I want, only using "basic" commands (for maximum portability) (i.e., something that would work on AIX / Linux / etc., not just something using a recent nicety ^^), to find **all** the files (symlinks, hardlinks and combinations thereof) pointing to a specific file/dir. Be careful to not rush to answer `find / -ls | grep ....` : it will miss many cases. See my links below, mixing hardlinks, symlinks, relative-and-absolute paths (and also play with symlinks "././././." possibilities) ie   * hardlinks and symlinks can be "nested", ad-inifinitum...   * some symlinks could be with the full path, others with a relative path,    * those paths (relative or absolute) could be very complex (ex: /tmp/././../etc/file )   * a symlink could lead to a file, which hardlink to another, which is a symlink to a third, which ends up [after some more iteration] to the final destination... In the end, I "just" need to find out a way to know **what is the "final destination" of any file/link** (ie, which inode will be accessed in the end?). But it's _really_ tough (unless some magical function will tell me "the final destination inode is : ...". That's what I need!) I thought I could simply use '-H' or '-L' options of find, but (I'm probably dumb...) it didn't work... yet. Any info welcomed (but please, using find/ls/etc, not some "nice utility only available on linux") Try to create some different links to the "/tmp/A" directory, and find a way to find and list them all:               mkdir /tmp/A    /tmp/B     ln -s /tmp/A/   /tmp/B/D  #absolute symlink, with a training "/"     ln -s ../A      /tmp/B/E     #relative symlink     ln -s /tmp/A/.  /home/F  #absolute symlink, with a trailing "/."     ln -s ../tmp/A/./.  /var/L  #let's get craaaaaaazy! symlinks are "fun"...     ln    /tmp/B/D  /etc/G    #Hard-link to the symlink file /tmp/B/D, which itself symlink to /tmp/A/ witch ends up being the same as "/tmp/A" in most cases.     ln    /etc/G    /etc/G2   #and a duplicate of the previous one, just to be sure [so /etc/G, /etc/G2, and /tmp/B/D have same inode, but it's a different inode from the final destination... :(     ln -s etc/G /thatsenough   #symlink again, for further chaining      and then some tries:               find -H / -ls   # show inodes of the links and symlinks, not of the "final" directory     find -L / -ls   # same thing (I do try that on an OLD AIX ...)     find -H / -inum 123456 -ls  #if /tmp/A/. has inode 123456. This lists *only* hardlinks to /tmp/A, ie will only print a subset (and /tmp/A have to be a file in that case)      I expected to see the final inode (123456) in front of all the paths, in one of those invocation (I also added '-follow' to both), but I always see the inodes of the links, not of the "final destination" (i.e., /tmp/A) What could I use to find out the "final inode" I end up accessing? [the OS manages it, but can a "simple" command tell me beforehand "through _that_ file, you will open _that_ final inode!"?]


What is hvc0? (appearing in "who" list)

I have an Ubuntu Server, and when I type `who`, to see who's connected, I can see that there's a user connected, and instead of being logged to a `pts/x`, he's connected to `hvc0`. Is there something to worry about?


Copy multiple files and append to end of filename

Seems like I really shouldn't need to create a script for this. I'd like to do something `cp /etc/*.conf $1.orig` or `cp /etc/{a.conf,b.conf} _firstarg_.orig` Is there a quick and painless way of doing this?


Can I create a local only guest account?

Is it possible to create a "guest" account in Linux? by "guest" account I mean an account that does not require a password to log in graphically. I want this account for when people come over and are like "can I use your computer to check my email". Then I don't have to worry about them snooping my stuff. I realize that some of this may require doing stuff specific to the login manager, since I wouldn't be surprised that this is a common problem, it'd be best to include instructions for `xdm`, `kdm`, and `gdm` and any other login managers that I haven't listed.


Extract file name from find command

I am trying to extract the file name and attaching to mail. But when I send mail the attachment is coming with path name and file name. Ex: `dir=/home/as123/bill` and `filename=abc.pdf.Z` and I am getting attachment like               homeas123billabc.pdf.Z          find $dir -ctime -1 -type f -name "abc*pdf*" -exec basename {} \; -exec uuencode {} {} \; | mailx -s "north" abc@gmail.com      `printf` not installed on my machine, without that how to write my script to get only file name as attachment?


Linux - why is kernel.shmall so low by default?

I run DB2 on Linux where I have to allocate the vast majority of memory on the machine to shared memory segments. This page is typical of the info that I've found about shmall/shmmax: http://www.pythian.com/news/245/the-mysterious-world-of-shmmax-and-shmall/ My system is running fine now, but I'm wondering if there's a historical or philosophical reason why shared memory is so low by default. In other words, why not let shmall default to the max physical memory on the machine? Or in other words, why should a typical admin need to be 'protected from himself' if an app happens to use a lot of shared memory, and have to go in and change these settings? The only thing I can think of is that it does let me set an upper bound to how much memory DB2 can use, but that's a special case.


Extensions "grayed out" on extensions.gnome.org

The site extensions.gnome.org loads OK, but all of the extensions appear to be "grayed out" (reduced opacity) as though they are not available. At the top of the site, I have "current version" selected in the _Compatible With_ drop down. According to this screenshot, I should be seeing toggle switches at the top of compatible extensions. ![enter image description here](http://i.stack.imgur.com/khhCK.png) Prior to `yum install gnome-shell-browser-plugin` I was seeing a message that Gnome couldn't determine my Gnome version. Once that was installed, I no longer see that warning - but appear to be missing the "On/Off" toggle sliders to install additional plugins. Is something else required for this to work correctly?


Installing courier-mta causes sendmail to be installed instead

My Debian workstation will not install courier-mta. The command `aptitude install courier-mta` appears to complete without error, but actually installs sendmail instead. # What I did I'll start without any packages installed which provide mail-transfer-agent:               dpkg --get-selections 'courier*' 'sendmail*' 'exim*' sensible-mda | awk '{print $1}' | xargs sudo dpkg --purge --force-depends     ...     root@treebeard:/etc/logcheck/violations.ignore.d$ dpkg -l 'courier*' 'sendmail*' 'exim*' sensible-mda     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                                            Version                      Architecture                 Description     +++-===============================================-============================-============================-===================================================================================================     un  exim4                                           <none>                                                    (no description available)     dpkg-query: no packages found matching courier*     dpkg-query: no packages found matching sendmail*     dpkg-query: no packages found matching sensible-mda      And then install courier-mta:               root@treebeard:/etc/logcheck/violations.ignore.d$ sudo aptitude install courier-mta     The following NEW packages will be installed:       courier-authdaemon{a} courier-authlib{a} courier-authlib-userdb{a} courier-base{a} courier-mta      0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded.     Need to get 0 B/1,261 kB of archives. After unpacking 2,887 kB will be used.     Do you want to continue? [Y/n/?]      Preconfiguring packages ...                   Configuring courier-base     ------------------------          Courier uses several configuration files in /etc/courier. Some of these files can be replaced by a subdirectory whose contents are concatenated and treated as a single, consolidated, configuration file.          The web-based administration provided by the courier-webadmin package relies on configuration directories instead of configuration files. If you agree, any directories needed for the web-based administration tool     will be created unless there is already a plain file in place.          Create directories for web-based administration? no               Configuring courier-mta     -----------------------          Please specify a valid email domain. Most header rewriting functions will append this domain to all email addresses which do not specify a domain, such as local accounts.          Default domain: fake.domain               Please specify a valid value for the "From" header for mail delivery notifications. These notifications cannot be sent without that setting.          "From" header for delivery notifications: noreply@fake.domain               Selecting previously unselected package courier-authlib.     (Reading database ... 249566 files and directories currently installed.)     Unpacking courier-authlib (from .../courier-authlib_0.63.0-6+b1_i386.deb) ...     Selecting previously unselected package courier-authdaemon.     Unpacking courier-authdaemon (from .../courier-authdaemon_0.63.0-6+b1_i386.deb) ...     Selecting previously unselected package courier-authlib-userdb.     Unpacking courier-authlib-userdb (from .../courier-authlib-userdb_0.63.0-6+b1_i386.deb) ...     Selecting previously unselected package courier-base.     Unpacking courier-base (from .../courier-base_0.68.2-1_i386.deb) ...     Selecting previously unselected package courier-mta.     Unpacking courier-mta (from .../courier-mta_0.68.2-1_i386.deb) ...     Adding 'diversion of /usr/bin/addcr to /usr/bin/addcr.ucspi-tcp by courier-mta'     Adding 'diversion of /usr/share/man/man1/addcr.1.gz to /usr/share/man/man1/addcr.ucspi-tcp.1.gz by courier-mta'     Processing triggers for man-db ...     Setting up courier-authlib (0.63.0-6+b1) ...     Setting up courier-authdaemon (0.63.0-6+b1) ...     [ ok ] Starting Courier authentication services: authdaemond.     Setting up courier-authlib-userdb (0.63.0-6+b1) ...     Setting up courier-base (0.68.2-1) ...     update-alternatives: using /usr/bin/deliverquota.courier to provide /usr/bin/deliverquota (deliverquota) in auto mode     update-alternatives: using /usr/share/man/man5/maildir.courier.5.gz to provide /usr/share/man/man5/maildir.5.gz (maildir.5.gz) in auto mode     update-alternatives: using /usr/bin/maildirmake.courier to provide /usr/bin/maildirmake (maildirmake) in auto mode     update-alternatives: using /usr/share/man/man7/maildirquota.courier.7.gz to provide /usr/share/man/man7/maildirquota.7.gz (maildirquota.7.gz) in auto mode     update-alternatives: using /usr/bin/makedat.courier to provide /usr/bin/makedat (makedat) in auto mode     Setting up courier-mta (0.68.2-1) ...     update-alternatives: using /usr/bin/lockmail.courier to provide /usr/bin/lockmail (lockmail) in auto mode     update-alternatives: using /usr/bin/preline.courier to provide /usr/bin/preline (preline) in auto mode     Starting Courier mail server: done.     Starting Courier mail filter: done.     Starting Courier SMTP server: done.          Current status: 0 broken [-2].      # The problem courier-mta appeared to have installed without error, and yet courier-mta is not installed. Instead, sendmail is installed:               root@treebeard:/etc/logcheck/violations.ignore.d$ dpkg -l 'courier*' 'sendmail*' 'exim*' sensible-mda     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                                            Version                      Architecture                 Description     +++-===============================================-============================-============================-===================================================================================================     ii  courier-authdaemon                              0.63.0-6+b1                  i386                         Courier authentication daemon     ii  courier-authlib                                 0.63.0-6+b1                  i386                         Courier authentication library     ii  courier-authlib-userdb                          0.63.0-6+b1                  i386                         userdb support for the Courier authentication library     un  courier-authmysql                               <none>                                                    (no description available)     un  courier-authpostgresql                          <none>                                                    (no description available)     ii  courier-base                                    0.68.2-1                     i386                         Courier mail server - base system     un  courier-debug                                   <none>                                                    (no description available)     un  courier-doc                                     <none>                                                    (no description available)     un  courier-faxmail                                 <none>                                                    (no description available)     un  courier-filter-perl                             <none>                                                    (no description available)     un  courier-imap                                    <none>                                                    (no description available)     rc  courier-mta                                     0.68.2-1                     i386                         Courier mail server - ESMTP daemon     un  couriergrey                                     <none>                                                    (no description available)     un  exim4                                           <none>                                                    (no description available)     ii  sendmail                                        8.14.4-4                     all                          powerful, efficient, and scalable Mail Transport Agent     ii  sendmail-base                                   8.14.4-4                     all                          powerful, efficient, and scalable Mail Transport Agent     ii  sendmail-bin                                    8.14.4-4                     i386                         powerful, efficient, and scalable Mail Transport Agent     ii  sendmail-cf                                     8.14.4-4                     all                          powerful, efficient, and scalable Mail Transport Agent     un  sendmail-doc                                    <none>                                                    (no description available)     un  sendmail-tls                                    <none>                                                    (no description available)     ii  sensible-mda                                    8.14.4-4                     i386                         Mail Delivery Agent wrapper      sendmail-bin (and its requirements) have been installed. Packages required by courier-mta have been installed, but courier-mta itself has not. # History This is a Debian Wheezy (stable) box. It was running Debian Jessy (testing), but I downgraded it to Wheezy by means of this /etc/apt/preferences file:               Package: *     Pin: release a=stable     Pin-Priority: 1001      and by changing /etc/apt/sources file to:               deb http://ftp.debian.org/debian wheezy main non-free contrib     deb http://security.debian.org/ wheezy/updates main contrib non-free      and by a means of a long series of apt-get/dpkg commands which I do not recall. I do recall there being much swearing. # The question **Why, when I try to install courier-mta, is sendmail-bin being installed instead?**


Execute bash commands over SSH while staying in interactive mode afterwards

Probably it is a weird thing I would like to achieve but:   I would like to SSH to a remote host and then execute some bash commands like "alias" automatically to use them afterwards in an interactive mode. The remote host does not allow the personal environment. Is this possible? Would "expect" do it? Or is there any other way to achieve this?   Basically I would like to have my bashrc without modifying any files on the remote host.


Wait until no incoming network connection for N minutes, then execute a command

I want to put my Debian Wheezy home server to sleep, if it wasn't accessed through the network for a certain amount of time. I thought of a bash script that uses netstat to count the number of active connections, sleeps for some seconds, runs netstat again, and so on. Is there any better way to achieve this without using sleeping every second? Is there any way to react to the event 'incoming network connection' and reset some kind of countdown timer?


How to change run-level for a session? (from graphics to command-line only)

When I type `init 1` the computer freezes. When I am running the 'normal' level of 2, how can I move to a command-line only running? I know that I can reach the command-line with Alt + Ctrl + F1-6, but then all programs for graphical display will still be running (and consuming the battery).


Installing Lispworks on rhel 6.5 Workstation. Error when loading application

Does anybody know what this error means and how to get Lispworks Personal edition to run on Redhat? Error:               Error during GUI startup:     Could not register handle for external module "-lgthread-2.0":     libgthread-2.0.so: cannot open shared object file: No such file or directory.      Here is the whole output: sudo /usr/bin/lispworks-personal-6-1-1-x86-linux               LispWorks(R): The Common Lisp Programming Environment Personal Edition     Copyright (C) 1987-2012 LispWorks Ltd.  All rights reserved.     Version 6.1.1     Saved by LispWorks as lispworks-personal-6-1-1-x86-linux, at 06 Dec 2012     16:51     User root on HostName     Error during GUI startup:     Could not register handle for external module "-lgthread-2.0":     libgthread-2.0.so: cannot open shared object file: No such file or        directory.          DESCRIPTION: Output Backtrace <and a simple test case, if possible>          IMPACT: Broken/Annoying/Data Loss/Missing Error/New Feature/Performance Loss          URGENCY: ASAP/Current Release/Next Release/Future Release/None                    PRODUCT CONFIGURATION:            LispWorks Personal Edition 6.1.1          Process name: /usr/bin/lispworks-personal-6-1-1-x86-linux        ID: 9597    Started at: 2014/03/20 23:04:07          Save history:          1: lispworks-6-1-0-0-x86-linux-release-base     Saved by davef as lispworks-6-1-0-0-x86-linux-release-base, at 03 Nov 2011 13:25          2: lispworks-6-1-0-0-x86-linux-release-gtk-shaken     Saved by davef as lispworks-6-1-0-0-x86-linux-release-gtk-shaken, at 03 Nov 2011 14:00          3: lispworks-6-1-1-0-x86-linux-release-gtk-shaken     Saved by davef as lispworks-personal-6-1-1-x86-linux, at 06 Dec 2012 16:51     LispWorks 6.1.1 - Personal Edition          Loaded Modules:           Public patches:      Private patches:  CAPI-GTK-DESTROY-REPRESENTATION          Foreign modules:       #<FLI::INTERNAL-MODULE :LISP : exports = 0>       #<FLI::INTERNAL-MODULE :CALLBACKS : exports = 0>       #<FLI::EXTERNAL-MODULE "-lgthread-2.0"  : handle = #x00000000; exports = 0>          Signal Handlers     2       SYSTEM::SIGINT-HANDLER     13      SYSTEM::THE-NULL-FUNCTION     17      SYSTEM::GET-CHILDREN-INF          HOST CONFIGURATION:            Zundrum (x86_64), Linux 2.6.32-431.5.1.el6.x86_64       Red Hat Enterprise Linux Workstation release 6.5 (Santiago)       Kernel \r on an \m          LWSerialNumber: Unknown          Site: Unknown          GTK+ not loaded          Backtrace:     #<The COMMON-LISP-USER package, 1/16 internal, 0/4 external>                    Call to (SUBFUNCTION 1 ENVIRONMENT:START-ENVIRONMENT) {offset 186}       SYSTEM::C : #<SIMPLE-ERROR 200C2DAB>          Binding frame:       CONDITIONS::*IN-SIGNAL-CATCH* : T          Handler frame: NIL     Call to SIGNAL {offset 1446}       CONDITIONS::DATUM     : #<SIMPLE-ERROR 200C2DAB>       CONDITIONS::ARGUMENTS : NIL          Binding frame:       CONDITIONS::*IN-SIGNAL-CATCH* : NIL          Catch frame: CONDITIONS::SIGNAL-CATCH          Binding frame:       CONDITIONS::*BROKEN-ON-SIGNALS* : NIL          Call to CONDITIONS::CONDITIONS-ERROR {offset 430}       CONDITIONS::DATUM     : "Could not register handle for external module ~S:~% ~A."       CONDITIONS::ARGUMENTS : ("-lgthread-2.0" "libgthread-2.0.so: cannot open shared object file: No such file or directory")          Call to ERROR {offset 67}       SYSTEM::ESTRING : "Could not register handle for external module ~S:~% ~A."       SYSTEM::EARGS   : ("-lgthread-2.0" "libgthread-2.0.so: cannot open shared object file: No such file or directory")          Binding frame:       FLI::*DLOPEN-FLAGS* : T          Call to FLI::CONNECT-TO-EXTERNAL-MODULE {offset 319}       FLI::MODULE : #<FLI::EXTERNAL-MODULE "-lgthread-2.0"  : handle = #x00000000; exports = 0>       TYPE        : :MANUAL       FLI::ERRORP : T          Call to FLI::CREATE-EXTERNAL-MODULE {offset 275}       FLI::NAME             : "-lgthread-2.0"       FLI::CONNECTION-STYLE : :IMMEDIATE       FLI::FILENAME         : NIL       FLI::MODULE           : #<FLI::EXTERNAL-MODULE "-lgthread-2.0"  : handle = #x00000000; exports = 0>       OPEN                  : T       FLI::LIFETIME         : :SESSION       FLI::DLOPEN-FLAGS     : FLI::DEFAULT       FLI::ADD-LIB-PATH     : NIL          Call to FLI:REGISTER-MODULE {offset 146}       FLI::NAME             : "-lgthread-2.0"       FLI::CONNECTION-STYLE : :IMMEDIATE       FLI::LIFETIME         : :SESSION       FLI::REAL-NAME        : NIL       FLI::FILE-NAME        : NIL       FLI::DLOPEN-FLAGS     : FLI::DEFAULT       FLI::ADD-LIB-PATH     : NIL          Call to LWGTK:INITIALIZE-GTK-LIBRARY {offset 999}          Call to CAPI-GTK-LIBRARY::ENSURE-GTK-INITIALIZED {offset 21}          Call to (METHOD CAPI-LIBRARY:LIBRARY-READY-TO-START ((EQL :GTK))) {offset 11}       CAPI-GTK-LIBRARY::LOOK-AND-FEEL : :DONT-KNOW          Call to CLOS::CACHE-MISS-FUNCTION {offset 311}       CLOS::ARGS                   : (:GTK)       CLOS::.CACHE-INFO.  {Closed} : #<CLOS::CACHE-INFO CAPI-LIBRARY:LIBRARY-READY-TO-START [8/2] >       CLOS::.GF.  {Closed}         : #<STANDARD-GENERIC-FUNCTION CAPI-LIBRARY:LIBRARY-READY-TO-START 217FEBA2>          Call to CAPI-INTERNALS:START-ENVIRONMENT {offset 60}       CAPI::ARGS            : (:START-FUNCTIONS ((LISPWORKS-TOOLS::START-LISPWORKS-TOOLS :TOOLS (LISPWORKS-TOOLS:LISPWORKS-ECHO-PODIUM LISPWORKS-TOOLS:LISTENER))) :ENVIRONMENT :CAPI)       CAPI::ENVIRONMENT     : :CAPI       PACKAGE               : NIL       CAPI::LIBRARY         : NIL       CAPI::START-FUNCTIONS : ((LISPWORKS-TOOLS::START-LISPWORKS-TOOLS :TOOLS (LISPWORKS-TOOLS:LISPWORKS-ECHO-PODIUM LISPWORKS-TOOLS:LISTENER)))          Call to ENVIRONMENT::START-CAPI-ENVIRONMENT {offset 24}       LISPWORKS-TOOLS::ARGS : NIL          Call to CLOS::CACHE-MISS-FUNCTION {offset 311}       CLOS::ARGS                   : (#<ENVIRONMENT::CAPI-ENVIRONMENT 21BCCF4B> NIL)       CLOS::.CACHE-INFO.  {Closed} : #<CLOS::CACHE-INFO ENVIRONMENT-INTERNALS:ENVIRONMENT-START [8/2] >       CLOS::.GF.  {Closed}         : #<STANDARD-GENERIC-FUNCTION ENVIRONMENT-INTERNALS:ENVIRONMENT-START 20979E5A>          Handler frame: ((ERROR . #<Function 1 subfunction of ENVIRONMENT:START-ENVIRONMENT 21E1A0EA>))     Call to ENVIRONMENT:START-ENVIRONMENT {offset 158}       SYSTEM::ARGS          : NIL       SYSTEM::OLD  {Closed} : #<Function ENVIRONMENT:START-ENVIRONMENT 20979E92>          Binding frame:       MP:*INITIAL-PROCESSES* : (("The idle process" (:PRIORITY -536870912 :RESTART-ACTION :CONTINUE :INTERNAL-SERVER :IDLE) MP::PROCESS-IDLE-FUNCTION))          Call to ENVIRONMENT::I-RESTART-WITH-ENVIRONMENT-AUX {offset 210}       ENVIRONMENT::TTY-LISTENER-P : NIL          Call to SYSTEM::RESTART-HOOK {offset 96}       FUNCTION : SYSTEM::%TOP-LEVEL          Restart frame: (SYSTEM::TOP-LEVEL)     Catch frame: (SYSTEM::IN-START-FUNCTION-ONCE . RESTART-CASE)          Catch frame: (SYSTEM::IN-START-FUNCTION-ONCE . 1)          Catch frame: SYSTEM::EXIT-LISPWORKS          Call to SYSTEM::IN-START-FUNCTION-ONCE {offset 421}          Catch frame: SYSTEM::START-UP          Catch frame: SYSTEM::IN-START-FUNCTION          Call to SYSTEM::IN-START-FUNCTION {offset 57}          Call to SYSTEM::CALL-IN-START-FUNCTION {offset 12}          Catch frame: (NIL)          Call to SYSTEM::START-FUNCTION {offset 50}       SYSTEM::GC-MESSAGES : :DONT-KNOW               SYSTEM::START-FUNCTION           Generation 0:  Total Size 515K, Allocated 490K, Free 17K                Segment 20090128: Total Size 507K, Allocated 490K, Free 13K                         minimum free space 64K,                            Awaiting promotion = 0K, sweeps before promotion =10               Segment 21EDE100: Total Size 7K, Allocated 0K, Free 3K                         minimum free space 0K,                            Awaiting promotion = 0K, sweeps before promotion =2      Generation 1:  Total Size 308K, Allocated 110K, Free 189K                Segment 2070F0C0: Total Size 68K, Allocated 0K, Free 64K                         minimum free space 3K,                            Awaiting promotion = 0K, sweeps before promotion =4               Segment 200540A8: Total Size 240K, Allocated 110K, Free 125K                         minimum free space 0K, static      Generation 2:  Total Size 68K, Allocated 0K, Free 64K                Segment 20F1C640: Total Size 68K, Allocated 0K, Free 64K                         minimum free space 117K,                            Awaiting promotion = 0K, sweeps before promotion =4      Generation 3:  Total Size 30387K, Allocated 30247K, Free 128K                Segment 2010F0C0: Total Size 6144K, Allocated 6139K, Free 0K                         minimum free space 3K,                            Awaiting promotion = 0K, sweeps before promotion =10               Segment 20F2D6B8: Total Size 16066K, Allocated 15934K, Free 128K                         minimum free space 0K,                            Awaiting promotion = 0K, sweeps before promotion =10               Segment 20720138: Total Size 8177K, Allocated 8173K, Free 0K                         minimum free space 0K,                            Awaiting promotion = 0K, sweeps before promotion =10          Total Size 31616K, Allocated 30848K, Free 398K      EDIT: Here is the output from yum install glib2-devel               Setting up Install Process     Package glib2-devel-2.26.1-7.el6_5.x86_64 already installed and latest version     Nothing to do      Here is libgthread*.so               sudo find /*/*/libgthread*.so     /usr/lib64/libgthread-2.0.so      Here is ldd lispworks...               ldd /usr/bin/lispworks-personal-6-1-1-x86-linux          linux-gate.so.1 =>  (0x00a8b000)         libdl.so.2 => /lib/libdl.so.2 (0x00d45000)         libpthread.so.0 => /lib/libpthread.so.0 (0x00402000)         libc.so.6 => /lib/libc.so.6 (0x0087e000)         /lib/ld-linux.so.2 (0x0085c000)      EDIT: Here the error I get on my Fedora 20 x86_64 KDE               ~]$ lispworks-personal-6-1-1-x86-linux      LispWorks(R): The Common Lisp Programming Environment Personal Edition     Copyright (C) 1987-2012 LispWorks Ltd.  All rights reserved.     Version 6.1.1     Saved by LispWorks as lispworks-personal-6-1-1-x86-linux, at 06 Dec 2012 16:51     User root on Zundrum     Error during GUI startup:       Could not register handle for external module "-lgtk-x11-2.0":      libgtk-x11-2.0.so: cannot open shared object file: No such file or directory.          DESCRIPTION: Output Backtrace <and a simple test case, if possible>          IMPACT: Broken/Annoying/Data Loss/Missing Error/New Feature/Performance Loss          URGENCY: ASAP/Current Release/Next Release/Future Release/None                    PRODUCT CONFIGURATION:            LispWorks Personal Edition 6.1.1          Process name: /home/kristjan/bin/lispworks-personal-6-1-1-x86-linux        ID: 2527    Started at: 2014/03/25 18:37:44          Save history:          1: lispworks-6-1-0-0-x86-linux-release-base     Saved by davef as lispworks-6-1-0-0-x86-linux-release-base, at 03 Nov 2011 13:25          2: lispworks-6-1-0-0-x86-linux-release-gtk-shaken     Saved by davef as lispworks-6-1-0-0-x86-linux-release-gtk-shaken, at 03 Nov 2011 14:00          3: lispworks-6-1-1-0-x86-linux-release-gtk-shaken     Saved by davef as lispworks-personal-6-1-1-x86-linux, at 06 Dec 2012 16:51     LispWorks 6.1.1 - Personal Edition          Loaded Modules:           Public patches:      Private patches:  CAPI-GTK-DESTROY-REPRESENTATION          Foreign modules:       #<FLI::INTERNAL-MODULE :LISP : exports = 0>       #<FLI::INTERNAL-MODULE :CALLBACKS : exports = 0>       #<FLI::EXTERNAL-MODULE "-lgthread-2.0"  {/lib/libgthread-2.0.so.0}: handle = #x09D30DE0; exports = 0>       #<FLI::EXTERNAL-MODULE "-lgtk-x11-2.0"  : handle = #x00000000; exports = 0>          Signal Handlers     2       SYSTEM::SIGINT-HANDLER     13      SYSTEM::THE-NULL-FUNCTION     17      SYSTEM::GET-CHILDREN-INF          HOST CONFIGURATION:            Zundrum (x86_64), Linux 3.13.6-200.fc20.x86_64       Fedora release 20 (Heisenbug)       Kernel \r on an \m (\l)          LWSerialNumber: Unknown          Site: Unknown          GTK+ not loaded          Backtrace:     #<The COMMON-LISP-USER package, 1/16 internal, 0/4 external>                    Call to (SUBFUNCTION 1 ENVIRONMENT:START-ENVIRONMENT) {offset 186}       SYSTEM::C : #<SIMPLE-ERROR 200B5DA3>          Binding frame:       CONDITIONS::*IN-SIGNAL-CATCH* : T          Handler frame: NIL     Call to SIGNAL {offset 1446}       CONDITIONS::DATUM     : #<SIMPLE-ERROR 200B5DA3>       CONDITIONS::ARGUMENTS : NIL          Binding frame:       CONDITIONS::*IN-SIGNAL-CATCH* : NIL          Catch frame: CONDITIONS::SIGNAL-CATCH          Binding frame:       CONDITIONS::*BROKEN-ON-SIGNALS* : NIL          Call to CONDITIONS::CONDITIONS-ERROR {offset 430}       CONDITIONS::DATUM     : "Could not register handle for external module ~S:~% ~A."       CONDITIONS::ARGUMENTS : ("-lgtk-x11-2.0" "libgtk-x11-2.0.so: cannot open shared object file: No such file or directory")          Call to ERROR {offset 67}       SYSTEM::ESTRING : "Could not register handle for external module ~S:~% ~A."       SYSTEM::EARGS   : ("-lgtk-x11-2.0" "libgtk-x11-2.0.so: cannot open shared object file: No such file or directory")          Binding frame:       FLI::*DLOPEN-FLAGS* : T          Call to FLI::CONNECT-TO-EXTERNAL-MODULE {offset 319}       FLI::MODULE : #<FLI::EXTERNAL-MODULE "-lgtk-x11-2.0"  : handle = #x00000000; exports = 0>       TYPE        : :MANUAL       FLI::ERRORP : T          Call to FLI::CREATE-EXTERNAL-MODULE {offset 275}       FLI::NAME             : "-lgtk-x11-2.0"       FLI::CONNECTION-STYLE : :IMMEDIATE       FLI::FILENAME         : NIL       FLI::MODULE           : #<FLI::EXTERNAL-MODULE "-lgtk-x11-2.0"  : handle = #x00000000; exports = 0>       OPEN                  : T       FLI::LIFETIME         : :SESSION       FLI::DLOPEN-FLAGS     : FLI::DEFAULT       FLI::ADD-LIB-PATH     : NIL          Call to FLI:REGISTER-MODULE {offset 146}       FLI::NAME             : "-lgtk-x11-2.0"       FLI::CONNECTION-STYLE : :IMMEDIATE       FLI::LIFETIME         : :SESSION       FLI::REAL-NAME        : NIL       FLI::FILE-NAME        : NIL       FLI::DLOPEN-FLAGS     : FLI::DEFAULT       FLI::ADD-LIB-PATH     : NIL          Call to LWGTK:INITIALIZE-GTK-LIBRARY {offset 999}          Call to CAPI-GTK-LIBRARY::ENSURE-GTK-INITIALIZED {offset 21}          Call to (METHOD CAPI-LIBRARY:LIBRARY-READY-TO-START ((EQL :GTK))) {offset 11}       CAPI-GTK-LIBRARY::LOOK-AND-FEEL : :DONT-KNOW          Call to CLOS::CACHE-MISS-FUNCTION {offset 311}       CLOS::ARGS                   : (:GTK)       CLOS::.CACHE-INFO.  {Closed} : #<CLOS::CACHE-INFO CAPI-LIBRARY:LIBRARY-READY-TO-START [8/2] >       CLOS::.GF.  {Closed}         : #<STANDARD-GENERIC-FUNCTION CAPI-LIBRARY:LIBRARY-READY-TO-START 217FEBA2>          Call to CAPI-INTERNALS:START-ENVIRONMENT {offset 60}       CAPI::ARGS            : (:START-FUNCTIONS ((LISPWORKS-TOOLS::START-LISPWORKS-TOOLS :TOOLS (LISPWORKS-TOOLS:LISPWORKS-ECHO-PODIUM LISPWORKS-TOOLS:LISTENER))) :ENVIRONMENT :CAPI)       CAPI::ENVIRONMENT     : :CAPI       PACKAGE               : NIL       CAPI::LIBRARY         : NIL       CAPI::START-FUNCTIONS : ((LISPWORKS-TOOLS::START-LISPWORKS-TOOLS :TOOLS (LISPWORKS-TOOLS:LISPWORKS-ECHO-PODIUM LISPWORKS-TOOLS:LISTENER)))          Call to ENVIRONMENT::START-CAPI-ENVIRONMENT {offset 24}       LISPWORKS-TOOLS::ARGS : NIL          Call to CLOS::CACHE-MISS-FUNCTION {offset 311}       CLOS::ARGS                   : (#<ENVIRONMENT::CAPI-ENVIRONMENT 21BCCF4B> NIL)       CLOS::.CACHE-INFO.  {Closed} : #<CLOS::CACHE-INFO ENVIRONMENT-INTERNALS:ENVIRONMENT-START [8/2] >       CLOS::.GF.  {Closed}         : #<STANDARD-GENERIC-FUNCTION ENVIRONMENT-INTERNALS:ENVIRONMENT-START 20979E5A>          Handler frame: ((ERROR . #<Function 1 subfunction of ENVIRONMENT:START-ENVIRONMENT 21E1A0EA>))     Call to ENVIRONMENT:START-ENVIRONMENT {offset 158}       SYSTEM::ARGS          : NIL       SYSTEM::OLD  {Closed} : #<Function ENVIRONMENT:START-ENVIRONMENT 20979E92>          Binding frame:       MP:*INITIAL-PROCESSES* : (("The idle process" (:PRIORITY -536870912 :RESTART-ACTION :CONTINUE :INTERNAL-SERVER :IDLE) MP::PROCESS-IDLE-FUNCTION))          Call to ENVIRONMENT::I-RESTART-WITH-ENVIRONMENT-AUX {offset 210}       ENVIRONMENT::TTY-LISTENER-P : NIL          Call to SYSTEM::RESTART-HOOK {offset 96}       FUNCTION : SYSTEM::%TOP-LEVEL          Restart frame: (SYSTEM::TOP-LEVEL)     Catch frame: (SYSTEM::IN-START-FUNCTION-ONCE . RESTART-CASE)          Catch frame: (SYSTEM::IN-START-FUNCTION-ONCE . 1)          Catch frame: SYSTEM::EXIT-LISPWORKS          Call to SYSTEM::IN-START-FUNCTION-ONCE {offset 421}          Catch frame: SYSTEM::START-UP          Catch frame: SYSTEM::IN-START-FUNCTION          Call to SYSTEM::IN-START-FUNCTION {offset 57}          Call to SYSTEM::CALL-IN-START-FUNCTION {offset 12}          Catch frame: (NIL)          Call to SYSTEM::START-FUNCTION {offset 50}       SYSTEM::GC-MESSAGES : :DONT-KNOW               SYSTEM::START-FUNCTION           Generation 0:  Total Size 515K, Allocated 260K, Free 247K                Segment 20090128: Total Size 507K, Allocated 260K, Free 243K                         minimum free space 64K,                            Awaiting promotion = 0K, sweeps before promotion =10               Segment 21EDE100: Total Size 7K, Allocated 0K, Free 3K                         minimum free space 0K,                            Awaiting promotion = 0K, sweeps before promotion =2      Generation 1:  Total Size 308K, Allocated 110K, Free 189K                Segment 2070F0C0: Total Size 68K, Allocated 0K, Free 64K                         minimum free space 3K,                            Awaiting promotion = 0K, sweeps before promotion =4               Segment 200540A8: Total Size 240K, Allocated 110K, Free 125K                         minimum free space 0K, static      Generation 2:  Total Size 68K, Allocated 0K, Free 64K                Segment 20F1C640: Total Size 68K, Allocated 0K, Free 64K                         minimum free space 117K,                            Awaiting promotion = 0K, sweeps before promotion =4      Generation 3:  Total Size 30387K, Allocated 30247K, Free 128K                Segment 2010F0C0: Total Size 6144K, Allocated 6139K, Free 0K                         minimum free space 3K,                            Awaiting promotion = 0K, sweeps before promotion =10               Segment 20F2D6B8: Total Size 16066K, Allocated 15934K, Free 128K                         minimum free space 0K,                            Awaiting promotion = 0K, sweeps before promotion =10               Segment 20720138: Total Size 8177K, Allocated 8173K, Free 0K                         minimum free space 0K,                            Awaiting promotion = 0K, sweeps before promotion =10          Total Size 31616K, Allocated 30618K, Free 628K


Execute script when hard-disk's standby state changes (i.e. it spins up/down)

How can I execute a shell script when the standby state of a hard-disk (as reported by `hdparm -C /dev/sdx`) changes? If possible, I would like to avoid polling `hdparm` for changes.


Expanding variables in zsh

The script below works in bash but not in zsh. I think it is because in the variable `OPTS`, I am "expanding" (not sure if this is the right word) the variable `$EXCLUDE`, and this syntax doesn't work in zsh. How would I replace that line to make it work on zsh?               SRC="/path_to_source"     DST="/path_to_dest"     EXCLUDE=".hg"       OPTS="-avr --delete --progress --exclude=${EXCLUDE} --delete-excluded"                                                         rsync $OPTS $SRC $DST


How to "set" this home network mesh up

I don't know much about networking security other than keeping unused ports closed is good. This is what I'm trying to accomplish: ![enter image description here](http://i.stack.imgur.com/Yg1iT.png) I need to be able to keep my server (the dotted line) with limited access to the Internet, but full access to the other devices on the network. I only want to have my home server connect to the net for updates (via `apt-get`) or for `wget`'ing some files sometimes. Is there a way to block the net off but let it by easily for software updates? I'm going to be running an apache web server from the server, but it should only be available to other devices on my network. I don't want someone being able to connect to it through the net. How can I do this securely? Basically I need a full web server accessible from my network but not from the internet (unless I specifically ask it to).


In MATE desktop, Right click context menu not as desired

I want to right click on a folder and easily open it in my favorite music player, say VLC. I have chosen "Other Application" and selected VLC and the option to "Remember" this selection. The folder then opens in VLC exactly as I would expect. But the option never sticks. It's just as seen in the screenshot: ![enter image description here](http://i.stack.imgur.com/QDXi6.png)


Shebang line with `#!/usr/bin/env command --argument` fails on Linux

I've got a simple script:               #!/usr/bin/env ruby --verbose     # script.rb     puts "hi"      On my OSX box, it runs fine:               osx% ./script.rb     hi      However, on my linux box, it throws an error               linux% ./script.rb     /usr/bin/env: ruby --verbose: No such file or directory      If I run the shebang line manually, it works fine               linux% /usr/bin/env ruby --verbose ./script.rb     hi      But I can replicate the error if I pack `ruby --verbose` into a single argument to `env`               linux% /usr/bin/env "ruby --verbose" ./script.rb     /usr/bin/env: ruby --verbose: No such file or directory      So I think this is an issue with how `env` is interpreting the reset of the shebang line. I'm using GNU coreutils 8.4 `env`:               linux% /usr/bin/env --version     env (GNU coreutils) 8.4     Copyright (C) 2010 Free Software Foundation, Inc.     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.     This is free software: you are free to change and redistribute it.     There is NO WARRANTY, to the extent permitted by law.          Written by Richard Mlynarik and David MacKenzie.      This seems really odd. Is this a common issue with this version of `env`, or is there something else going on here that I don't know?


Moving /boot and MBR to a new drive

I have a CentOS 6 server with two hard drives in it. My old 3TB drive has been giving me some issues so I'm moving things over to a new drive. Because my `/` and `/home` partition are managed by a LVM it was easy to migrate those to the new drive. Now I want to move over my `/boot` partition and the MBR that makes it all start up. I loaded up a live CD and `rsynced` over my `/boot` partition to the same size partition on my new drive. I also tried to copy over my MBR with the following commands:               dd if=/dev/sda of=mbrbackup bs=512 count=1     dd if=mbrbackup of=/dev/sdb bs=446 count=1      After doing this I rebooted, told my BIOS not to look at the old hard drive during the boot cycle and only look at the new drive but all I ended up with was a blinking cursor. Did I miss a step here? Or is there something else I need to do to make things boot so I can completely remove my old drive? EDIT: I'm starting to think rsync was not the way to copy the /boot partition from one drive to another. Based on this guide, I tried using the dump command instead. In this command I copied my old, unmounted boot partition to my new, empty, mounted boot partition.               dump -0f - /dev/sdaX | (cd /mnt/boot; restore -rf -)       I'm getting a grub error 15 on boot which is better than a blinking cursor but I don't know if that is any closer to a solution.


File damaged/lost during transfer?  Recovery possible?

I was at uni a few days ago when I attempted to cut and paste a 500Mb file (a 3gp video recording) into my H drive on one of the uni network's Linux (Debian KDE 3.5) computers. I did not see any error messages indicating the cut-and-paste job had failed, but when I looked at the resulting pasted file, it appears now as a 60Mb file (that's a 440Mb discrepancy!). My file was somehow shrunk! Did the file get broken up in the process of pasting it and this is the fragment of an incompletely copied file? I suspect what happened was the file transfer was interrupted due to H drive size-allocation limitations imposed on users by administrators. But you'd think Linux would anticipate that the file was bigger than would be possible to move to the intended destination and abort the transfer _before_ it begun, not wait till it reached some forbidden limit then cancel discretely without notifying me. Also in the event of an interrupted file transfer, one normally expects the original file to be remain intact (i.e. not deleted) the original USB drive? The file appears in the destination, but is now much smaller and is non- functional. The original file in the source location on the external drive has disappeared, suggesting the job was completed successfully. This resizing is rather bizarre and now I don't seem to have access to the original file. After cutting and pasting the original may have been removed from it's source location. The computer has mishandled this task, apparently causing me to lose my file, and I would like you to help me to retrieve my file. I have tried recovering the file on my phone's SD card using PhotoRec and Sleuthkit forensic tool. No luck. Deleted sections of the disk may have been overwritten by new data. So zero progress on the source end. Any way to recover on the destination end (i.e. my uni network)?               peter@peter-deb:/media/E0FD-1813$ cd DCIM/     peter@peter-deb:/media/E0FD-1813/DCIM$ cd ..     peter@peter-deb:/media/E0FD-1813$ cd LOST.DIR/     peter@peter-deb:/media/E0FD-1813/LOST.DIR$ ls     peter@peter-deb:/media/E0FD-1813/LOST.DIR$ ls -a     .  ..     peter@peter-deb:/media/E0FD-1813/LOST.DIR$


Launch R code from within vim-r-plugin as separate window instead of inside tmux/screen?

I use the `vim-r-plugin` to write `R` code in `vim`. It is a nice plugin and I love that the plugin lets me run code directly from within `vim`. However, the `R` prompt is opened in a console which is attached to `vim` using `tmux` and the `vim` screen plugin. This limits my choices when it comes to window management. I would prefer if the `R` console was in it's own window so that my window manager (awesome) can handle the windows separately. Is there any way to do this? I would be satisfied if it was possible to pop out a running terminal from `screen`/`tmux` to run in it's own window using some shortcut.


Ubuntu 12.04LTS becoms slow and jerky randomly for a mintue and then becomes normal by itself

I am using Ubuntu 12.04LTS on my Toshiba satellite L510 and I have only Ubuntu installed. The system becomes slow and jerky by itself after every 10minutes or so and the remains like that for less than one minute


Make diff Use Full Terminal Width in Side-by-Side Mode

Most applications are smart about using the full width of the terminal available to them. My shell does, screen, vim, etc. However, `diff` in side- by-side mode (`-y`), does not. This angers me. It uses 126 character width, which is not even half of my 270 block width terminal. Looking through the man page does not reveal anything particular about automatically adjusting the width, only manually specifying it via `-W`. Is there perhaps a "hidden feature" of `diff` to allow it to automatically expand to the full width of the terminal? Or; What is the easiest path to automatically inserting `-W <terminalsize>` into my diff command whenever I run it? I am under the assumption that automatically appending -W to everything couldn't hurt anything, because it will only ever mean "use $x columns", which is always what I want, whether I'm in side-by-side mode, or otherwise.


Reading a directory in shell script

I want to read a numbered directory which is under a path, into a variable in shell script. The paths are something like this:               .../releases/R1/...     .../releases/R2/...     .../releases/R3/...      Each time that the script is executed I want to read the latest numbered R (R3 in this case) directory into a variable and then pass this as an argument to some functions inside the script. How shall I do that?


How to mount squashfs (embedded-linux) on Ubuntu?

I have tried to mount a filesystem from a firmware (embedded-linux) but it failed on my Ubuntu 12.04 machine. Could you tell me how to mount that file system? (or possible reasons of the failure). Details are as follows. ## Details Step1) Analyzing the firmware using binwalk shows starting address of squashfs filesystem. Thus I generated squashfs filesystem using "dd" linux utility. Step2) The analysis of generated filesystem using "binwalk ./fs.img" command shows:               Squashfs filesystem, big endian, lzma signatrue, version 3.0, size: XXXXXXX bytes, XXX inodes, blocksize: XXXXX bytes, created: xxxx      Step3) "mount -o loop ./fs.img ./fs" failed. "dmesg | tail" shows:               SQUASHFS error: Can't find a SQUASHFS superblock on loop1      How can I mount that file system? FYI, I installed latest squashfs-tools with lzma support from "sourceforge.net/procjects/squashfs".


Understand file descriptors and nodejs

I'm having a bit of a confused time understanding what a file descriptor is and if I even need one! I am trying to spawn a process in nodejs and have its out put be written directly to an out put file. I understand my question is specific to a language outside the scope of the unix family but I believe my problem is coming from me not understanding some thing about the system and not the language. This is the function I am calling from my script. I assumed I could call it in such a way               require('child_process').spawn('./my_script.bash 1>out.txt')      No luck though! I know that the script is executing and that its working.


Difference in output from shell script

I am running a simple shell script which has a for loop and kicks off 16 threads in the back ground and waits for each of them to finish before moving on the next commands. ## Here is the shell:               total_threads=16              echo ""          echo "Running Web Exclusive Item updates ... "           echo "Total Number of threads = " $total_threads          for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16          do             echo "Running Thread $i ..  "             ./run_upd_web_excl_items.sh $i $total_threads &          done          wait          echo "Done."                   echo ""           echo "Committing data ... "         output_val=`$ORACLE_HOME/bin/sqlplus -S $UP <<endofsql            whenever sqlerror exit 2            whenever oserror exit 3            SET HEADING  OFF            SET FEEDBACK OFF            SET ECHO     OFF            set serverout on           commit;           /         exit         endofsql`         echo "Done."      As I was running this, the output is coming as follows:               ~> . ./run_upd_web_excl_items_mitctrl.sh          Running Web Exclusive Item updates ...     Total Number of threads =  16     Running Thread 1 ..     Running Thread 2 ..     Running Thread 3 ..     Running Thread 4 ..     Running Thread 5 ..     Running Thread 6 ..     Running Thread 7 ..     Running Thread 8 ..     Running Thread 9 ..     Running Thread 10 ..     Running Thread 11 ..     Running Thread 12 ..     Running Thread 13 ..     Running Thread 14 ..     Running Thread 15 ..     Running Thread 16 ..     Total time for Thread 3 : 0 minute(s), 22.5 second(s).     Total time for Thread 2 : 0 minute(s), 23.3 second(s).     Total time for Thread 12 : 0 minute(s), 24.3 second(s).     Total time for Thread 8 : 0 minute(s), 24.8 second(s).     Total time for Thread 7 : 0 minute(s), 29.9 second(s).     Total time for Thread 1 : 0 minute(s), 30 second(s).     [1]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [2]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [3]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [7]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [8]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [12]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 16 : 0 minute(s), 32.1 second(s).     Total time for Thread 4 : 0 minute(s), 32.8 second(s).     [4]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [16]+  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 10 : 0 minute(s), 33.2 second(s).     Total time for Thread 13 : 0 minute(s), 33.7 second(s).     Total time for Thread 5 : 0 minute(s), 33.8 second(s).     [5]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [10]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [13]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 14 : 0 minute(s), 35.6 second(s).     Total time for Thread 6 : 0 minute(s), 36.8 second(s).     [6]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [14]-  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 11 : 0 minute(s), 37.7 second(s).     Total time for Thread 9 : 0 minute(s), 37.8 second(s).     [9]   Done                    ./run_upd_web_excl_items.sh $i $total_threads     [11]-  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Total time for Thread 15 : 0 minute(s), 38.8 second(s).     [15]+  Done                    ./run_upd_web_excl_items.sh $i $total_threads     Done.          Committing data ...     Done.      Normally, I would have expected an output like this:               ~> ./run_upd_web_excl_items_mitctrl.sh          Running Web Exclusive Item updates ...     Total Number of threads =  16     Running Thread 1 ..     Running Thread 2 ..     Running Thread 3 ..     Running Thread 4 ..     Running Thread 5 ..     Running Thread 6 ..     Running Thread 7 ..     Running Thread 8 ..     Running Thread 9 ..     Running Thread 10 ..     Running Thread 11 ..     Running Thread 12 ..     Running Thread 13 ..     Running Thread 14 ..     Running Thread 15 ..     Running Thread 16 ..     Total time for Thread 1 : 0 minute(s), 26.5 second(s).     Total time for Thread 10 : 0 minute(s), 27.1 second(s).     Total time for Thread 2 : 0 minute(s), 27.5 second(s).     Total time for Thread 6 : 0 minute(s), 27.9 second(s).     Total time for Thread 3 : 0 minute(s), 27.9 second(s).     Total time for Thread 15 : 0 minute(s), 27.9 second(s).     Total time for Thread 9 : 0 minute(s), 28 second(s).     Total time for Thread 5 : 0 minute(s), 28 second(s).     Total time for Thread 16 : 0 minute(s), 28.1 second(s).     Total time for Thread 8 : 0 minute(s), 30.5 second(s).     Total time for Thread 12 : 0 minute(s), 31 second(s).     Total time for Thread 11 : 0 minute(s), 31.5 second(s).     Total time for Thread 7 : 0 minute(s), 31.9 second(s).     Total time for Thread 14 : 0 minute(s), 32 second(s).     Total time for Thread 13 : 0 minute(s), 32.7 second(s).     Total time for Thread 4 : 0 minute(s), 34.8 second(s).     Done.          Committing data ...     Done.      I am not able to figure out why the shell is printing the extra lines like :               [13]   Done                    ./run_upd_web_excl_items.sh $i  $total_threads      Any thoughts?


How does Solaris find man pages?

Initially, my MANPATH environment variable is not set. Despite this, I can use the `man` command to view most man pages as usual. `man top` can't find that particular man page, but `which man` tells me the command is in /opt/sfw/bin. There are man pages for `top` and other commands in /opt/sfw/man. I set `export MANPATH=/opt/sfw/man` and I can now see the man page with `man top`. However `man` can no longer find pages for `bash`, `cp` or any other standard command. How can I add this one directory to the list used to find man pages? I'm using SunOS 5.10 and bash 3.0.16, if it matters.


Solaris 10, Shell Script, Cursor movement

> >     #include <signal.h> >     #include <unistd.h> >     #include <stdio.h> >     #include <sys/types.h> >     #include <time.h> >   >   >     void prtime() { >             time_t rawtime; >             struct tm * timeinfo; >             char *s; >   >             signal(SIGALRM, prtime); >   >             time ( &rawtime ); >             timeinfo = localtime ( &rawtime ); >   >             alarm (1) ; //printf("Time\n"); >             printf ( "\033[s\033[6;45H %s \033[u", asctime (timeinfo) ); >     } >   >     int main() >     { >             signal(SIGALRM, prtime); >             alarm(1); >             printf("continue instructions\n"); >             while (1) { >                     pause(); >                     printf("continue instructions\n"); >             } >     } >   I just try to write the clock at a specific position in terminal, but I want to save the cursor position before writing the clock, and then restore that position after writing the clock. but the `\033[s` & `\033[u` doesn't work.


Proper way to handle FTP over SSL with restrictive firewall rules?

Without SSL, FTP works fine over a stateful Firewall, like netfilter (`iptables`) + the `nf_conntrack_ftp` kernel module like this:               # modprobe nf_conntrack_ftp     # iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT     # iptables -A INPUT -p tcp --dport 21 -j ACCEPT      The problem is that, when SSL is used, the FTP connection tracking module cannot work because it is unable to spy on the session to discover the session-port chosen for data exchange. It is thus unable to open that port dynamically. **Is there a proper way to make a SSL-enabled FTP server work, without disabling the firewall?** For information, I use `vsftpd` with the `ssl_enable=YES` configuration option.


CentOS 5.6 expand ext4 partition , have steps but parted shows as ext3

I have a Adaptec 5805 HW RAID card with a 6.3 TB RAID-6 array (partitioned via Parted GPT, all of which is formatted as ext4 on CentOS 5.6). I want to expand this to 7.5GB and from reading these are the steps I've come up with, my question is, do I have the steps right on the linux part, and why is parted showing the partition as ext3 and not as ext4? **NOTE:** I've read that Parted does not support ext4 yet and man Parted states "ext3 resizing does not currently work with Parted". I've been able to backup all 6 TB of data on this drive prior to expanding.   1. Verify with Fix Raid array in Adaptec Storage Manager   2. Expand Raid-6 Array in Adaptec Storage Manager  on Centos 5.6:   3. Unmount target drive/partition   4. Expand partition, keeping the start position the exact same as it is currently - use Sector mode if using parted (but parted says NOT to use Parted for resizing ext3 or ext4)   5. run `resize2fs` (or should I run resize4fs as it's ext4?)   6. remount Hopefully someone who has resized an ext4 drive over 2TB can chime in and state what they did to successfully resize their mount/partition. Every guide I've read says to use Parted , but `man parted` says to use `fdisk` (but `fdisk` doesn't work with partitions over 2 TB that need GPT). So my biggest issues is with the resize partition step of this process as I'm dealing with a 6 TB ext4 partition. `Parted -l` output (when unit set to Sector):                   Model: Adaptec 6tbRD6ada8 (scsi)         Disk /dev/sdb: 6979GB         Sector size (logical/physical): 512B/512B         Partition Table: gpt               Number  Start   End     Size    File system  Name     Flags          1      17.4kB  6979GB  6979GB  ext3         primary      `fdisk -l` of target drive:                   Disk /dev/sdb: 6979.3 GB, 6979309273088 bytes         255 heads, 63 sectors/track, 848519 cylinders         Units = cylinders of 16065 * 512 = 8225280 bytes                  Device Boot      Start         End      Blocks   Id  System          /dev/sdb1               1      267350  2147483647+  ee  EFI GPT      `cfdisk /dev/sdb`:                     cfdisk (util-linux 2.13-pre7)                                                                 Disk Drive: /dev/sdb                                                    Size: 6979309273088 bytes, 6979.3 GB                                           Heads: 255   Sectors per Track: 63   Cylinders: 848519            Name                 Flags               Part Type          FS Type                     [Label]                   Size (MB)       sdb1                 NC                   Primary           EFI GPT                                              2199023.26         *                                                 Pri/Log           Free Space                                           4780283.11         *


Read out pulseaudio volume from commandline? (I want: "pactl GET-sink-volume")

I want to read out the volume level I can set with               pactl set-sink-volume $SINK $VOLUME      Is there an easy way to do that? As easy as the hypothetical               pactl get-sink-volume $SINK      ? (What I'm trying to do? I use pactl to set volume and it lets me set the volume higher than 100% which is a bad idea (sound quality goes down), so I'm thinking about writing a small script that will not go over 100%. Read it out. Over some threshold? Set to 100%. Below? add 1%. If there is another way to do that, great, tell me! The cleanest solution would probably to tell pulse to just stop at 100%. But the original question remains, there must be some way..) I am on Debian if that makes any difference.


SSH to Windows 7 with cygwin openSSH freezes when remote conection

**When I SSH into Windows 7(Cygwin) from a remote, the session freezes after few seconds or up to two minutes. This can happen while I'm typing and it can happen when idle. This is still happening after cygwin has been re- installed.** I'm SSH'ing to a Windows 7 system from a Fedora 20. Fedora has also been re- intalled. And it is still happening after both Cygwin and Fedora have been re- installed. I need to do= "enter" "~" "." to get my terminal back. What is the cause of this? I'm not at the remote location now, but I can connect with ssh -vvv when I get there to give some debugging. EDIT: I was not able to reproduce the problem, the problem seems to have gone away, changing the config files did not fix the problem before, so I can't understand why the problem is gone? I just did two sessions from different ip's and it didn't freeze. Here are the debug from one of the sessions:               [UserName@HostName ~]$ ssh -X -vvv UserName@HostName -p Port     OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013     debug1: Reading configuration data /home/UserName/.ssh/config     debug1: /home/UserName/.ssh/config line 20: Applying options for *     debug1: /home/UserName/.ssh/config line 54: Applying options for *     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: /etc/ssh/ssh_config line 20: Applying options for *     debug1: /etc/ssh/ssh_config line 54: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to HostName [HostName] port Port.     debug2: fd 3 setting O_NONBLOCK     debug1: fd 3 clearing O_NONBLOCK     debug1: Connection established.     debug3: timeout: 499954 ms remain after connect     debug1: identity file /home/UserName/.ssh/id_rsa type -1     debug1: identity file /home/UserName/.ssh/id_rsa-cert type -1     debug1: identity file /home/UserName/.ssh/id_dsa type -1     debug1: identity file /home/UserName/.ssh/id_dsa-cert type -1     debug1: identity file /home/UserName/.ssh/id_ecdsa type -1     debug1: identity file /home/UserName/.ssh/id_ecdsa-cert type -1     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_6.4     debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6     debug1: match: OpenSSH_6.6 pat OpenSSH*     debug2: fd 3 setting O_NONBLOCK     debug3: put_host_port: [HostName]:Port     debug3: load_hostkeys: loading entries for host "[HostName]:34500" from file "/home/UserName/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:10     debug3: load_hostkeys: loaded 1 keys     debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received     debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit: none,zlib@openssh.com     debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit:      debug2: kex_parse_kexinit: first_kex_follows 0      debug2: kex_parse_kexinit: reserved 0      debug2: mac_setup: found hmac-md5-etm@openssh.com     debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none     debug2: mac_setup: found hmac-md5-etm@openssh.com     debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none     debug1: sending SSH2_MSG_KEX_ECDH_INIT     debug1: expecting SSH2_MSG_KEX_ECDH_REPLY     debug1: Server host key: ECDSA b5:05:1a:33:1b:44:21:ae:00:37:0f:2b:24:ae:41:26     debug3: put_host_port: [HostName]:Port     debug3: put_host_port: [HostName]:Port     debug3: load_hostkeys: loading entries for host "[HostName]:Port" from file "/home/UserName/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:10     debug3: load_hostkeys: loaded 1 keys     debug3: load_hostkeys: loading entries for host "[HostName]:Port" from file "/home/UserName/.ssh/known_hosts"     debug3: load_hostkeys: found key type ECDSA in file /home/UserName/.ssh/known_hosts:10     debug3: load_hostkeys: loaded 1 keys     debug1: Host '[HostName]:Port' is known and matches the ECDSA host key.     debug1: Found key in /home/UserName/.ssh/known_hosts:10     debug1: ssh_ecdsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: Roaming not allowed by server     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/UserName/.ssh/id_rsa ((nil)),     debug2: key: /home/UserName/.ssh/id_dsa ((nil)),     debug2: key: /home/UserName/.ssh/id_ecdsa ((nil)),     debug1: Authentications that can continue: publickey,password,keyboard-interactive     debug3: start over, passed a different list publickey,password,keyboard-interactive     debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Trying private key: /home/UserName/.ssh/id_rsa     debug3: no such identity: /home/UserName/.ssh/id_rsa: No such file or directory     debug1: Trying private key: /home/UserName/.ssh/id_dsa     debug3: no such identity: /home/UserName/.ssh/id_dsa: No such file or directory     debug1: Trying private key: /home/UserName/.ssh/id_ecdsa     debug3: no such identity: /home/UserName/.ssh/id_ecdsa: No such file or directory     debug2: we did not send a packet, disable method     debug3: authmethod_lookup keyboard-interactive     debug3: remaining preferred: password     debug3: authmethod_is_enabled keyboard-interactive     debug1: Next authentication method: keyboard-interactive     debug2: userauth_kbdint     debug2: we sent a keyboard-interactive packet, wait for reply     debug1: Authentications that can continue: publickey,password,keyboard-interactive     debug3: userauth_kbdint: disable: no info_req_seen     debug2: we did not send a packet, disable method     debug3: authmethod_lookup password     debug3: remaining preferred:      debug3: authmethod_is_enabled password     debug1: Next authentication method: password     UserName@HostName's password:      debug3: packet_send2: adding 48 (len 66 padlen 14 extra_pad 64)     debug2: we sent a password packet, wait for reply     debug1: Authentications that can continue: publickey,password,keyboard-interactive     Permission denied, please try again.     UserName@HostName's password:      debug3: packet_send2: adding 48 (len 68 padlen 12 extra_pad 64)     debug2: we sent a password packet, wait for reply     debug1: Authentication succeeded (password).     Authenticated to HostName ([HostName]:Port).     debug1: Requesting tun unit 2147483647 in mode 1     debug1: sys_tun_open: failed to configure tunnel (mode 1): Operation not permitted     Tunnel device open failed.     Could not request tunnel forwarding.     debug1: channel 0: new [client-session]     debug3: ssh_session2_open: channel_new: 0     debug2: channel 0: send open     debug1: Requesting no-more-sessions@openssh.com     debug1: Entering interactive session.     debug2: callback start     debug2: x11_get_proto: /usr/bin/xauth  list :0 2>/dev/null     debug1: Requesting X11 forwarding with authentication spoofing.     debug2: channel 0: request x11-req confirm 1     debug2: fd 3 setting TCP_NODELAY     debug3: packet_set_tos: set IP_TOS 0x10     debug2: client_session2_setup: id 0     debug2: channel 0: request pty-req confirm 1     debug1: Sending environment.     debug3: Ignored env XDG_VTNR     debug3: Ignored env DREAL_TECHNO_NAME     debug3: Ignored env MANPATH     debug3: Ignored env VH_PATSFX     debug3: Ignored env SSH_AGENT_PID     debug3: Ignored env KDE_MULTIHEAD     debug3: Ignored env TPD_GLOBAL     debug3: Ignored env XDG_SESSION_ID     debug3: Ignored env DM_CONTROL     debug3: Ignored env HOSTNAME     debug3: Ignored env IMSETTINGS_INTEGRATE_DESKTOP     debug3: Ignored env GPG_AGENT_INFO     debug3: Ignored env MBK_IN_PH     debug3: Ignored env TERM     debug3: Ignored env SHELL     debug3: Ignored env XDG_MENU_PREFIX     debug3: Ignored env XSCH_PARAM_NAME     debug3: Ignored env HISTSIZE     debug3: Ignored env XDM_MANAGED     debug3: Ignored env GTK2_RC_FILES     debug3: Ignored env KONSOLE_DBUS_SERVICE     debug3: Ignored env KONSOLE_PROFILE_NAME     debug3: Ignored env VH_MAXERR     debug3: Ignored env GTK_RC_FILES     debug3: Ignored env GS_LIB     debug3: Ignored env WINDOWID     debug3: Ignored env QTDIR     debug3: Ignored env RDS_OUT     debug3: Ignored env GNOME_KEYRING_CONTROL     debug3: Ignored env QTINC     debug3: Ignored env SHELL_SESSION_ID     debug3: Ignored env XFSM_PARAM_NAME     debug3: Ignored env ALLIANCE_TOP     debug3: Ignored env GRAAL_TECHNO_NAME     debug3: Ignored env KDE_FULL_SESSION     debug3: Ignored env TPD_LOCAL     debug3: Ignored env IMSETTINGS_MODULE     debug3: Ignored env QT_GRAPHICSSYSTEM_CHECKED     debug3: Ignored env USER     debug3: Ignored env LS_COLORS     debug3: Ignored env LD_LIBRARY_PATH     debug3: Ignored env SSH_AUTH_SOCK     debug3: Ignored env SESSION_MANAGER     debug3: Ignored env DESKTOP_SESSION     debug3: Ignored env PATH     debug3: Ignored env MAIL     debug3: Ignored env MBK_SCALE_X     debug3: Ignored env QT_IM_MODULE     debug3: Ignored env MBK_CATAL_NAME     debug3: Ignored env PWD     debug1: Sending env XMODIFIERS = @im=none     debug2: channel 0: request env confirm 0     debug3: Ignored env KONSOLE_DBUS_WINDOW     debug3: Ignored env MBK_OUT_PH     debug1: Sending env LANG = en_US.UTF-8     debug2: channel 0: request env confirm 0     debug3: Ignored env KDE_IS_PRELINKED     debug3: Ignored env GNOME_KEYRING_PID     debug3: Ignored env KDE_SESSION_UID     debug3: Ignored env GENVIEW_TECHNO_NAME     debug3: Ignored env RDS_IN     debug3: Ignored env MBK_SPI_MODEL     debug3: Ignored env KDEDIRS     debug3: Ignored env MBK_OUT_LO     debug3: Ignored env KONSOLE_DBUS_SESSION     debug3: Ignored env MBK_VSS     debug3: Ignored env HISTCONTROL     debug3: Ignored env VH_BEHSFX     debug3: Ignored env SSH_ASKPASS     debug3: Ignored env COLORFGBG     debug3: Ignored env SHLVL     debug3: Ignored env XDG_SEAT     debug3: Ignored env HOME     debug3: Ignored env KDE_SESSION_VERSION     debug1: Sending env LANGUAGE =      debug2: channel 0: request env confirm 0     debug3: Ignored env MBK_C4_LIB     debug3: Ignored env MBK_VDD     debug3: Ignored env MBK_TARGET_LIB     debug3: Ignored env XCURSOR_THEME     debug3: Ignored env RDS_TECHNO_NAME     debug3: Ignored env LOGNAME     debug3: Ignored env VH_DLYSFX     debug3: Ignored env QTLIB     debug3: Ignored env CVS_RSH     debug3: Ignored env DBUS_SESSION_BUS_ADDRESS     debug3: Ignored env XDG_DATA_DIRS     debug3: Ignored env MBK_IN_LO     debug3: Ignored env LESSOPEN     debug3: Ignored env MBK_WORK_LIB     debug3: Ignored env XPAT_PARAM_NAME     debug3: Ignored env WINDOWPATH     debug3: Ignored env PROFILEHOME     debug3: Ignored env XDG_RUNTIME_DIR     debug3: Ignored env DISPLAY     debug3: Ignored env QT_PLUGIN_PATH     debug3: Ignored env XDG_CURRENT_DESKTOP     debug3: Ignored env GTK_IM_MODULE     debug3: Ignored env ELP_TECHNO_NAME     debug3: Ignored env MBK_CATA_LIB     debug3: Ignored env CCACHE_HASHDIR     debug3: Ignored env XAUTHORITY     debug3: Ignored env _     debug2: channel 0: request shell confirm 1     debug2: callback done     debug2: channel 0: open confirm rwindow 0 rmax 32768     debug2: channel_input_status_confirm: type 99 id 0     debug2: X11 forwarding request accepted on channel 0     debug2: channel_input_status_confirm: type 99 id 0     debug2: PTY allocation request accepted on channel 0     debug2: channel 0: rcvd adjust 2097152     debug2: channel_input_status_confirm: type 99 id 0     debug2: shell request accepted on channel 0     Last login: Wed Apr 16 23:58:48 2014 from HostName           ____________________,             ______________________________________        .QQQQQQQQQQQQQQQQQQQQQQQQL_         |                                      |      .gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ__   |                                      |      gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ==   |                    _.---.)           |      QQQQQQQQQQQQQQQQQQQQQQQQQQQF=         |          (^--^)_.-"      `;          |      QQQQQQQQQ================!            |          ) ee (           |          |      QQQQQQQQ                              |         (_.__._)         /           |      QQQQQQQQ                              |           `--',        ,'            |      QQQQQQQQ     ~"jjj__,                 |            jgs )_|--')_|             |      QQQQQQQQ       "jjjjjjjjjj___         |                ""'   ""'             |      QQQQQQQQ        ~jjjjjjjjjjjjjjjjj__  |                                      |      QQQQQQQQ        _jjjjjjjjjjjjjj/~~~~  |      The Hippo says: Welcome to      |      QQQQQQQQ      .{jjjjjjj/~~~~~         |                             _        |      QQQQQQQQ     .{/~~~~`                 |  ____  _   _   ____  _ _ _ (_) ____  |      QQQQQQQQ                              | / ___)| | | | / _  || | | || ||  _ \ |      QQQQQQQQ                              |( (___ | |_| |( (_| || | | || || | | ||      QQQQQQQQQL_______________,            | \____) \__  | \___ | \___/ |_||_| |_||      QQQQQQQQQQQQQQQQQQQQQQQQQQQL___       |        (___/  (____|                 |      4QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ___  |                                      |      (=QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ====   |       -.-. -.-- --. .-- .. -.        |        (QQQQQQQQQQQQQQQQQQQQQQQQF=         |______________________________________|               UserName@HostName ~     $ ls          UserName@HostName ~     $ nano thisIsATest          UserName@HostName ~     $ gedit &     [1] 2556          UserName@HostName ~     $ debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384     debug1: client_request_x11: request from ::1 62165     debug2: fd 7 setting O_NONBLOCK     debug3: fd 7 is O_NONBLOCK     debug1: channel 1: new [x11]     debug1: confirm x11     debug2: channel 1: rcvd eof     debug2: channel 1: output open -> drain     debug2: channel 1: obuf empty     debug2: channel 1: close_write     debug2: channel 1: output drain -> closed     debug1: channel 1: FORCE input drain     debug2: channel 1: ibuf empty     debug2: channel 1: send eof     debug2: channel 1: input drain -> closed     debug2: channel 1: send close     debug3: channel 1: will not send data after close     debug3: channel 1: will not send data after close          ** (gedit:2556): WARNING **: Couldn't connect to accessibility bus: Operating system does not support abstract socket namespace          debug3: channel 1: will not send data after close     debug2: channel 1: rcvd close     debug3: channel 1: will not send data after close     debug2: channel 1: is dead     debug2: channel 1: garbage collecting     debug1: channel 1: free: x11, nchannels 2     debug3: channel 1: status: The following connections are open:       #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)       #1 x11 (t4 r3 i3/0 o3/0 fd 7/7 cc -1)          debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384     debug1: client_request_x11: request from ::1 62167     debug2: fd 7 setting O_NONBLOCK     debug3: fd 7 is O_NONBLOCK     debug1: channel 1: new [x11]     debug1: confirm x11     debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384     debug1: client_request_x11: request from ::1 62172     debug2: fd 8 setting O_NONBLOCK     debug3: fd 8 is O_NONBLOCK     debug1: channel 2: new [x11]     debug1: confirm x11     debug1: client_input_channel_open: ctype x11 rchan 5 win 65536 max 16384     debug1: client_request_x11: request from ::1 62173     debug2: fd 9 setting O_NONBLOCK     debug3: fd 9 is O_NONBLOCK     debug1: channel 3: new [x11]     debug1: confirm x11     debug2: channel 3: rcvd eof     debug2: channel 3: output open -> drain     debug2: channel 3: obuf empty     debug2: channel 3: close_write     debug2: channel 3: output drain -> closed     debug1: channel 3: FORCE input drain     debug2: channel 3: ibuf empty     debug2: channel 3: send eof     debug2: channel 3: input drain -> closed     debug2: channel 3: send close     debug3: channel 3: will not send data after close     debug2: channel 3: rcvd close     debug3: channel 3: will not send data after close     debug2: channel 3: is dead     debug2: channel 3: garbage collecting     debug1: channel 3: free: x11, nchannels 4     debug3: channel 3: status: The following connections are open:       #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cc -1)       #1 x11 (t4 r3 i0/0 o0/0 fd 7/7 cc -1)       #2 x11 (t4 r4 i0/0 o0/0 fd 8/8 cc -1)       #3 x11 (t4 r5 i3/0 o3/0 fd 9/9 cc -1)          ^C     [1]+  Done                    gedit          UserName@HostName ~     $ jobs          UserName@HostName ~     $ kill %1 %2 %3 %4     -bash: kill: %1: no such job     -bash: kill: %2: no such job     -bash: kill: %3: no such job     -bash: kill: %4: no such job          UserName@HostName ~     $ firefox     -bash: firefox: command not found          UserName@HostName ~     $ ls     thisIsATest          UserName@HostName ~     $ exit     logout     debug1: client_input_channel_req: channel 0 rtype exit-status reply 0     debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0     debug2: channel 0: rcvd eow     debug2: channel 0: close_read     debug2: channel 0: input open -> closed     debug2: channel 0: rcvd eof     debug2: channel 0: output open -> drain     debug2: channel 0: obuf empty     debug2: channel 0: close_write     debug2: channel 0: output drain -> closed     debug2: channel 0: rcvd close     debug3: channel 0: will not send data after close     debug2: channel 0: almost dead     debug2: channel 0: gc: notify user     debug2: channel 0: gc: user detached     debug2: channel 0: send close     debug2: channel 0: is dead     debug2: channel 0: garbage collecting     debug1: channel 0: free: client-session, nchannels 3     debug3: channel 0: status: The following connections are open:       #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)       #1 x11 (t4 r3 i0/0 o0/0 fd 7/7 cc -1)       #2 x11 (t4 r4 i0/0 o0/0 fd 8/8 cc -1)


.profile in SCO

Where can I find the `.profile` in my user's logon in SCO? I am needing to edit it, so I can add a `PATH` to it, so that my `PATH` loads up in start up. I have to add:               echo $PATH      ... as I have already edited the `PATH`. Any help on where to find this `.profile` file would be greatly appreciated.


Select lines using ranges in Vim?

I would like to select lines visually. Usually I'd `SHIFT-V` and select with `j` and `k` to highlight the lines. How do I do it using a colon-range command? e.g. `:10,12<?>` to select lines 10 - 12 and enter visual mode with that selection. What should I insert for `<?>` here? I'm sure it's easy but I don't know what keywords to web-search/browse help for.


what do you mean by interactive shell?

UNIX: The Complete Reference, Second Edition by Kenneth H. Rosen et al. > You can start another shell after you log in by using the name of the shell > as a command; for example, to start the Korn shell, you could type ksh at > the command prompt. This type of shell is not a login shell, and you do not > have to log in again to use it, but it is still an interactive shell, > meaning that you interact with the shell by typing in commands (as opposed > to using the shell to run a script, as discussed in Chapter 20). The > instances of the shell that run in a terminal window when you are using a > graphical interface are also interactive non-login shells. When you start a > non-login shell, it does not read your .profile, .bash_profile, or .login > file (or your .logout file), but it will still read the second shell > configuration file (such as .bashrc). This means that you can test changes > to your .bashrc by starting another instance of the shell, but if you are > testing changes to your .profile or .login, you must log out and then back > in to see the results. I was going through above lines and i dont understand what it means by interactive shell. and is it true that .profile is not read if i am using terminal. moreover, what it means when you say that bourne is not is an interactive shell while bash/csh is an interactive shell?


localization of man pages on Linux (Ubuntu)

Is there an option to output a manual page in a different language? I don't want to change the computer language completely, but only specific manual pages. For example               $ man -English man     Man is a manual program     …     $ man -Russian man     Инструцтия для Unix, BSD и Linux.     …


Can I get my iTerm key-combos working in tmux?

I have some shortcut keys defined in iTerm, and I use them for key-mappings in Vim. For example, I map `Ctrl-Enter` to send a `^[O2P` escape code, which I then use to define a `Ctrl-Enter` key-mapping in my Vim: ![enter image description here](http://i.stack.imgur.com/rUC1H.png)               set       <F13>=O2P     map       <F13> <C-CR>     inoremap <C-CR> <C-O>o      It works in a regular iTerm session, and in a screen session, but it _not_ in a tmux session. How can I fix this to work with tmux? I'm transitioning away from screen and really enjoying tmux aside from this hangup.