GNU Screen can't find applications after log out [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I recently installed Ubuntu 12.04 sever on a new box. I ssh in, run a command (a do loop iterating over a perl script that forks off several processes each running an application [blastn] on the provided data), and detach using Ctrl-a d. When I run screen -r to resume, no problem, the loop is running happily. When I log out of my ssh session and log back on, I can still resume the screen session with screen -r, but now the loop has terminated with error messages stating that the application can't be found and/or the perl script can't be found. I've tried giving the full path to the perl script to my perl command (i.e. not using tilde), but no dice. Still gets lost after ssh logout / logon.
It seems this is particular to my Ubuntu server. Running the exact same loop / perl script forking off processes / applications through ssh into my Mac OS X box, it finishes happily even after logging out from ssh, so I wonder if this has something more to do with my Ubuntu server than GNU screen. Much searching online has yielded no answer, however, so I would appreciate any help that you may be able to offer.

I can only guess you may have an encrypted home directory which as decrypted version is mounted during your login time. As soon as the last login terminates, the decrypted version gets unmounted and your running processes have no access anymore to the files in your home directory.
You can check this by typing mount | grep ^/home/. If this shows ecryptfs as type of the mount, then this is the case.
If this shows nothing (or a file system type like ext3 or similar), then my guess is wrong.

Related

Recently installed Linux Bash Shell (Ubuntu installed) not showing my files on my windows computer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
Improve this question
I've ran into a problem when trying to use an installed Linux bash shell instead of my Windows command prompt. I can't get my computer files to show on my Ubuntu terminal, even though when I repeat the same actions on my windows command prompt they seem to work.
I'm thinking there must be an issue with my installation, possibly I need to do a few more steps to get it to work like my regular command prompt terminal, but I'm not sure how to do this currently. I've added some screenshots above for additional context of me not finding my files in Ubuntu but being able to find them through windows command prompt.
It's because your linux home directory is most likely located outside of your windows user's home directory.
Use windows search to look for one of your ubuntu files (for example git_101) to determine where is your ubuntu home directory in relation to windows file system.
This can vary depending on how you installed ubuntu, but you might be able to access your windows filesystem via the /mnt directory as well. You can check that by running ls -lah /mnt.

Start a long-running program over SSH [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a Virtual Machine that is running Ubuntu, and I can SSH into the Virtual Machine just fine. I can even start my python program over SSH using the following:
python foldername/app.py
I am on a Windows machine, using Git Bash to SSH. If I start my python program this, way I have to leave the Git Bash window open. How can I start the python program without having to leave the Git Bash open on my Windows machine? Any help is much appreciated!
you can use nohup:
nohup python foldername/app.py &
now you can close your connection and the program will keep running. You can find more information here and here.
Another option would be to use a virtual terminal, e.g:
screen
tmux
Both of them should be available via the ubuntu package manager.
Then (after logging in via ssh) issue the following commands:
screen
python myprog.py
CTRL+A D
or for tmux
tmux
python myprog.py
CTRL+B D
Then you can close your ssh connection and look at the output when you return later by typing screen attach or tmux attach
I'd personally recommend using tmux.
Two main approaches come to my mind, depending on what you are up to:
Make the program run as a daemon (a program that runs in the background, not connected to any terminal); if appropriate (and logistically feasible), configure the system-wide init system to start it.
Alternatively, just run the program under a terminal multiplexer program (like GNU screen) that implements a persistent virtual terminal that you can attach to/detach from as needed.

VNC4Server/vncserver – always use desktop number 1 after starting of the vnc server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am using vncserver on a Ubuntu 14.04.3 LTS server machine to connect remotely and perform administrative tasks. I do not automatically start VNC. I first connect over SSH and call "vncserver -geometry 1024x800 &" to start it.
However normally vncserver always created desktop 1. Only if I had forgotten about a already running desktop it used 2 or 3 for the second session. But as soon as I killed all processes it started clean at desktop 1 again.
Now since I did some changes in startup by running multiple sessions for testing at a time and also after I changed the hostname of the server it always keeps starting with desktop 2 meanwhile 3. While 1 and 2 is definitively not running. I also removed all logs in my vnc home dir of previous sessions.
Well I'm wondering why and out of what reason it keeps increasing the desktop number sometimes. Also I would like to get it back to desktop 1 and fix it somehow. So that I can easily save the server Ip (IP:1) in my Remote-Profile without the need of changing it from time to time because vnsserver starts from an higher number.
Any ideas why it won't take desktop 1 any more?
:(
Thanks
vncserver will take the first available port from 5901 and onwards. There can be a few reasons why this does not work, like the port already being taken for something else. Or that vncserver is actually still running. Check out the file specified as log file for a clue.
You can check whether there still are vncserver processes running with:
vncserver -list
Without more information it's difficult to answer your question to the fullest. The various vnc implementations also behaves differently.
You can try to force it to open on display :1 by specifying it on the command line
vncserver :1 -geometry 1024x800

Getting IO privileges in Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have installed flashrom software. When i try to run sudo flashrom command it gives me "Could not get I/O privileges (Operation not permitted). You need to be root" error. Also I tried su command to switch root and run again. I also tried sudo -i command to login as root. However any of them did not work
#if defined (__OpenBSD__)
msg_perr("If you are root already please set securelevel=-1 in /etc/rc.securelevel and\n"
"reboot, or reboot into single user mode.\n");
#elif defined(__NetBSD__)
msg_perr("If you are root already please reboot into single user mode or make sure\n"
"that your kernel configuration has the option INSECURE enabled.\n");
#endif
Reading this from the FlashRom.org pastebin site should give some insight.
This is the only file in Flashrom that contains the line, "You must be root"
Therefore, in my opinion, this is the only place the error can be coming from.
I changed secure boot option in bios settings as disabled. So I can run the flashrom program. But it gives this output.
WARNING! You seem to be running flashrom on an unsupported laptop.
Laptops, notebooks and netbooks are difficult to support and we
recommend to use the vendor flashing utility. The embedded controller
(EC) in these machines often interacts badly with flashing. See the
manpage and http://www.flashrom.org/Laptops for details.
If flash is shared with the EC, erase is guaranteed to brick your
laptop and write may brick your laptop. Read and probe may irritate
your EC and cause fan failure, backlight failure and sudden poweroff.
You have been warned.
So there is nothing to do. I have to search another tool to flash my bios

PuTTY: Change default SSH login directory [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
In Windows, I use PuTTY to log in a Linux-based remote server via SSH.
Is is possible to change the default directory entry point I get to after I connect and login? (That would be a nice time saver.)
e.g. from server/home/ to server/home/subdir/subdir/
You can also change the directory within PuTTY itself:
Configuration → Connection → SSH
Fill in the "Remote command" field with the following:
cd subdir/subdir ; /bin/bash
Add cd subdir/subdir to ~/.bashrc or ~/.bash_profile, or
change the home directory of the user.
You could use screen to keep your current directory by always logging into the same screen session.
Add the screen command with parameters to your putty saved session under SSH>Remote Command.
See the screen documentation for which parameters to use.
screen -R -O -t mysession -S mysession -f
Depends on a lot of things. Mainly the server operating system. Most SSH servers run Linux or Unix of some flavor. When you connect via any method of remote text login (as SSH is one member of this category) such a system will automatically spawn a shell process to talk to you. That's probably "bash", and it runs various things on startup. Check out
man bash
to learn more. One of the many things you can do is cd to a subfolder.

Resources