You can look at the $STY
variable (a variable set by the screen command). If it is not “” then you are in a screen session.
I am in screen
$ echo $STY
29624.pts-1.iain-10-04
$
I am not in screen
$ echo $STY
$
Related Posts:
- Sudo as different user and running screen
- How to reload screenrc without restarting screen?
- When is K 1024 and when is it 1000?
- Dial pad to get phone number (with Android button images)
- Why is it not possible to fake an IP address?
- Authentication versus Authorization
- What is tail recursion?
- Visual List of iOS Fonts?
- How to get rid of the “No bootable medium found!” error in Virtual Box? [closed]
- ‘git’ is not recognized as an internal or external command
- How can I write a `try`/`except` block that catches all exceptions?
- How do I decompile a .dll file?
- What’s the purpose of git-mv?
- How to write trycatch in R
- how to use proxy on youtube-dl?
- SSH -X “Warning: untrusted X11 forwarding setup failed: xauth key data not generated”
- LINQ equivalent of foreach for IEnumerable
- How to do vlookup and fill down (like in Excel) in R?
- Using “super” in C++
- What is the difference between application server and web server?
- Were jprobes removed from kernel v4?
- ldap_sasl_bind(SIMPLE): Can’t contact LDAP server(-1)
- PHP – Failed to open stream : No such file or directory
- How to extract the substring between two markers?
- Code-first vs Model/Database-first
- How to resolve git’s “not something we can merge” error
- Even though JRE 8 is installed on my MAC -” No Java Runtime present,requesting to install ” gets displayed in terminal
- What fonts can I use with pygame.font.Font?
- CSS Box Shadow Bottom Only
- How to squash all git commits into one?
- how to fix Javac invalid flag error?
- PHP & MySQL: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
- “Insert if not exists” statement in SQLite
- Web API Error – This request has been blocked; the content must be served over HTTPS
- how to print a string to console in c++
- How can I delete all of my Git stashes at once?
- How to create temp table using Create statement in SQL Server?
- Error while trying to retrieve text for error ORA-01019
- What is meant by diameter of a network?
- What is the “N+1 selects problem” in ORM (Object-Relational Mapping)?
- HTML Best Practices: Should I use ’ or the special keyboard shortcut?
- What is runtime in context of Python? What does it consist of?
- mount.nfs: requested NFS version or transport protocol is not supported
- How do you get the file size in C#?
- how to use svm in Weka Classsifier?
- MIPS ‘nor’ usage in code
- How can I center
- into a div?
- Popup window in PHP?
- How to use the console within Sublime Text
- Multiplying a register value by a constant in MIPS?
- What’s the use of the staging area in Git?
- Getting DOM element value using pure JavaScript
- What is the difference between lemmatization vs stemming?
- Instagram how to get my user id from username?
- Procedural and non-procedural query language difference
- COM object that has been separated from its underlying RCW cannot be used
- Swift 2: !, ? -” Value of optional type “…” not unwrapped”
- R: NaNs produced
- What is a .meta file and why does Unity create them for all of my assets?
- Center div on the middle of screen [duplicate]
- Which function grows faster, exponential or factorial?
- How to calculate Internet checksum?
- Where can I read the Console output in Visual Studio 2015
- Brackets.io in built support for TypeScript
- XML Error: Extra content at the end of the document
- Error: You need to include some adapter that implements __karma__.start method
- ggplot facet_wrap: At least one layer must contain all variables used for facetting
- Child theme on style.min.css
- Refresh admin page after woocommerce order received
- jquery anchor effect does not work properly
- Import local site to WordPress.com
- How can I debug what is wrong ? Featured images stopped showing
- Add link to php field text on wordpress form
- Bootstrap theme embedded iframes are distorted [closed]
- To remove rendering of menus and header, plugin or theme?
- How do I deal with a compromised server?
- Something is burning in the server room; how can I quickly identify what it is?
- Can I nohup/screen an already-started process?
- Finding out what user Apache is running as?
- Do systemd unit files have to be reloaded when modified?
- What is a glue record?
- How do I convert a .cer certificate to .pem?
- Run Oracle SQL script and exit from sqlplus.exe via command prompt
- Show full process name in top
- How do you do load testing and capacity planning for web sites?
- How to re-order windows, change the scroll shortcut, and modify the status bar contents in GNU Screen?
- What is a good SSH server to use on Windows? [closed]
- In systemd, what’s the difference between After= and Requires=?
- Should a wildcard SSL certificate secure both the root domain as well as the sub-domains?
- Why can’t MX records point to an IP address?
- How to show all banned IP with fail2ban?
- How can I get diff to show only added and deleted lines? If diff can’t do it, what tool can?
- Adding a user to an additional group using ansible
- Best system administrator accident [closed]
- Reread partition table without rebooting?
- Storing a million images in the filesystem
- How to keep rsync from chown’ing transferred files?
- How to view connected users to open vpn server?
- Can I specify a port in an entry in my /etc/hosts on OS X? [duplicate]
- How to check for modified config files on a Debian system?