I have Matlab running in a Linux session for almost 2 days, and afraid to lose the computations if my network connection fails. Will moving Matlab to the background and starting 'screen' be the answer for that?
15366
I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back.  One way I thought of doing that was to transfer its ownership to a screen shell, thus keeping it running in there.  Is there a different way to proceed?
91135
For example, in X session, I can use Ctrl-Alt-L to lock the screen, so it would ask for password to unlock and prevent somebody from messing with mine computer.  But if I have an open terminal session on one of the tty's (which I can access with Ctrl-Alt-F1, for example) - then it is not locked, and somebody can still use it to do some harm. Is there a way to 'lock' that command line (with some background processes running in it, maybe)?
24883
This question arised in , but since it is of general interest, I add a separate question and my answer here.  Suppose you have a matlab figure which needs to be converted to pgfplots. The matlab figure contains a 2d function f(x,y) which is typically visualized as a matrix.  Suppose it is given as  [X,Y] = meshgrid( linspace(-1,1,3), linspace(4,5,5) ); Z = X + Y; surf(X,Y,Z) shading interp   such that  octave:7&gt; Z Z =     3.0000   4.0000   5.0000    3.2500   4.2500   5.2500    3.5000   4.5000   5.5000    3.7500   4.7500   5.7500    4.0000   5.0000   6.0000   and the outcome is    I would like to reproduce that in pgfplots. To this end, I saved the Z matrix as ascii and imported it into an \addplot3 table statement:  \documentclass{standalone}  \usepackage{pgfplots}  \pgfplotsset{compat=1.9}   \begin{document}  \begin{tikzpicture}     \begin{axis}     \addplot3[surf] table {   3.0000   4.0000   5.0000    3.2500   4.2500   5.2500    3.5000   4.5000   5.5000    3.7500   4.7500   5.7500    4.0000   5.0000   6.0000      };     \end{axis} \end{tikzpicture} \end{document}   which leads to the unexpected result    How can I reproduce my intented surface plot?
100990
I am trying to run a detached screen under a specific user in rc.local on boot. The code below is what I have so far, but it is not working for me. The su part seems to be giving me an error.  su - username -c /usr/bin/screen -dmS test bash -c '/var/www/path/to/script/script.sh; exec bash'
27816
When I tried to install Matlab using the Software Center, it prompted me for the Location of MATLAB installation(s). Since I am trying to install it, I don't know what to do.
100144
I have a strange problem: When I'm using PuTTY with SSH connecting to a Linux server hosted in  on my local Windows&nbsp;7, I often get the error saying "Network error: Software caused connection abort" and then the PuTTY SSH window is inactive. Usually I can login in the server with PuTTY and do something, but after a random time (about one or two minutes) I get that error. And sometimes I even can't login, getting an error saying timeout.   I guess there's something wrong with my VMware Player, because I have another Ubuntu desktop hosted in VMware as a code repository server, and it more often than not has a timeout error when I do an SVN update/commit. However, I also guess Windows&nbsp;7 has some quirk because the same Ubuntu server hosted in VMware as a code repository works very well when on Windows&nbsp;Vista! It seems all the bad things happen after I moved from Windows&nbsp;XP to Windows&nbsp;Vista and then Windows&nbsp;7!  What could be the reason for this problem and how can it be fixed?  Supplement:  I did a Google search and applied all methods to help, including:   Enable sshd TCPKeepAlive Set sshd ClientAliveInterval to 900 and ClientAliveCountMax to 3 Set the PuTTY connection setting 'seconds between keepalives' to 5.    But these all don't work! And the SSH session in PuTTY still breaks after sometime!  I turned off both the Linux server firewall and Windows&nbsp;7 client firewall, but login still times out! It is really annoying!  It seems sometimes I can log in, but sometimes login times out! I really don't know why. It drives me crazy!  One thing I have to mention is that when I'm using PuTTY SSH connecting to a remote server, and it's all OK!  When I failed to log in, ping failed too! But, how can that happen? I use VMware player to host the Linux server on my local machine!
54734
I make heavy use of screen's "log" command to log the output of a session to a file, when I am making changes in a given environment. I searched through tmux's man page, but couldn't find an equivalent. Is anyone aware of a similar feature in tmux, or do I have to write my own wrapper scripts to do this?  EDIT: I'm aware of 'script' and other utilities that allow me to log a session. The reason that screen's functionality is so useful is the ability to define a logfile variable which uses string escapes to uniquely identify each session.  e.g. I have a shell function which, given a hostname, will SSH to that host in a new screen window and set the window title to the hostname. When I start a log of that session, it is prefixed with the window title.  If this functionality doesn't exist in tmux, I'll have to create a new set of shell functions to set up 'scripts' of sessions I want to log. This isn't hugely difficult, but it may not be worth the effort given that screen does exactly what I need already.
58368
I have a strange issue where Matlab stubbornly refuses to appear in Spotlight search results.  I'm not sure what information to provide besides the fact it clearly exists in Applications:    It even appears in Launchpad just fine:    I don't have anything blocked from being indexed by Spotlight:    And yet, even searching for the exact name in Spotlight only yields some crash log.    The Spotlight search also works just fine for anything else / any other apps, and it updates fine (for example, I just searched it for the screenshots I made, and it found them) so it is not just "stuck".  Any ideas?
90376
I am using Ubuntu 12.04. Is there any way to lock the screen or session from a terminal command or script?
49345
I was wondering if it's possible to run an Ubuntu virtual machine using VirtualBox in background, I mean, without any window open.  The idea is to connect via SSH to the Linux host, that would be running in background.  Has anyone ever done something like this? Is it possible?
96238
I'm unable to uninstall MATLAB;  sandeep@sandeep-VPCEH28FN:~$ sudo rm /var/tmp/lm_TMW* [sudo] password for sandeep:  rm: cannot remove '/var/tmp/lm_TMW*': No such file or directory sandeep@sandeep-VPCEH28FN:~$ sudo apt-get purge matlab E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? sandeep@sandeep-VPCEH28FN:~$ sudo apt-get purge matlab-support E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? sandeep@sandeep-VPCEH28FN:~$
33171
I'm having some periodic issues running a particular application, XBMC. If I use XBMC regularly I don't seem to have any issues but if I leave it unattended for more than about 12 hours I need to reboot to get it working again.  I know a scheduled reboot is NOT the answer but until I can figure out the problem I need to schedule a reboot each morning so my wife can use it if I'm away and it doesn't get thrown out the window :)  Any takers?
57286
I know that I can append &amp; to a command to run the process in the background.   I'm SSH'ing into an Ubuntu 12.04 box and running a python program with $python program.py &amp; -- but when I go to close the terminal window I get a message saying that closing the terminal will kill the running process.   Why is this? I am using the ampersand to run the process in the background. How can I get it to run regardless of if I am SSH'ed in?
103003
I'm trying to force GNU screen to create a "virtual" terminal, without attaching to it, execute script inside and NOT terminate session once script ends.  I tried many combinations, including:  screen -dmS udplistener /share/Sys/autorun/start_udp_listeners.sh   or  screen -S udplistener -X /share/Sys/autorun/start_udp_listeners.sh   and none of them worked. I either get session without executed script, script executes, but session is terminated once it finishes or I'm getting "No screen session found" error.  What I'm basically trying to do is to run UDP listener, written in PHP and make it work in infinte loop (don't break listening). Yes -- I could run PHP script with &amp; at the end, forcing PHP CLI to run as daemon. The problem is, that I'm using a piece of junk called server (QNAP -- never, ever buy this junk!) which does seems to be ignoring this. As soon as I logoff SSH session, scripts stops.  So screen seems to be the only option. But I can't understand, why it terminates session once executed command or script ends?  EDIT: I've also tried example found in the Internet:  screen -dmS name screen -S name -p windowname -X stuff 'mc '   No lack! After attaching to it (screen -R name) I see that Midnight Commander HASN'T been executed. Though example author said, it will be.
120107
I have created a ruby script file that checks the connection present or not. For example checking port 22 is opened or not.  Firstly I tried with cron job as follows  @reboot find ${HOME}/my_app/check_conn.rb   But it is executing immediately after starting the system.  Now I have to run this script after 5 or 10 min.  How can I do this. Is there any other way for doing this.  Thanks in advance.
87946
I'm connecting to a Linux machine through SSH, and I'm trying to run a heavy bash script that makes filesystem operations. It's expected to keep running for hours, but I cannot leave the SSH session open because of internet connections issues I have.  I doubt that running the script with the background operator, the ampersand (&amp;), will do the trick, because I tried it and later found that process was not completed. How can I logout and keep the process running?
42220
XBMC occasionally crashes on my media server.  It's a pain to bring down the media server because I have to manually restart a number of services each time.  I'd like to be ablle to start XBMC from an SSH session and have it continue to run after I disconnect.  How can this be achieved?