Questions tagged [session]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
137 views

Processes in a session in an interactive shell vs in a script

If I run this command in a script it doesn't produce output except header from the ps: # Taken from Advanced Bash Usage on youtube: echo "$(echo "$(echo "$(echo "$(ps wwf -s $$)")")")" This is ...
0
votes
0answers
51 views

How to prevent $TMOUT from timing out interactive shell session when it's set as readonly and exec or env trick won't work

Linux Redhat 7 platform, with bash-4.1.2-48.el6.x86_64. The interactive shell timeout value on my servers is ridiculous. $ echo $TMOUT 900 So I've read the great post below, but unfortunately it ...
1
vote
0answers
21 views

XFCE Session & Startup Application terminal command to turn on and off

In XFCE4 I can create my own custom start-up commands at Settings Manager > Session & Startup > Application Startup and turn them on or off by clicking on the command's check-box. Is there a ...
0
votes
0answers
28 views

Logout button reboots the machine

On CentOS 7.4 running XFCE, most of the time if I click the Logout button, it will reboot/poweroff the machine. It does the same thing if I use the Logout button in the xfce panel or in the ...
0
votes
0answers
28 views

Problem starting session Debian 9

I'm working with Debian 9. My computer has two partitions, so I have Debian alongside W10. I needed to install a Windows program (STAMP), so I decided to install Wine instead to do it in the Windows ...
0
votes
1answer
15 views

Unable to login for graphical session on Mint + Not available space on filesystem

I've been trying to start a graphical session with all users on my system but I've been always reverted to the login screen. After initiating a terminal with (Ctrl+Alt+F1) from there, I've been able ...
0
votes
1answer
25 views

logname / who -u / how to get the pid of the current session

The command "logname" gives me the name of the login user irrespective of subsequent "su"-calls. E.g. in current mint, the command "logname" is broken und gives no logname. I want to get its ...
0
votes
0answers
26 views

New session freeze after internet disconnected during a session

When I am forgetting a X2go session opened and the internet is disconnecting then X2go closes automatically and when opening X2go session it is stuck and not working. I tried to reboot X2go server ...
12
votes
2answers
1k views

Exit shell with shortcut (not typing exit) that closes session properly

I use a ProxyJump command for a number of ssh sessions I use daily, and also switch users a lot on these sessions and having to type exit 3 or 4 times in a row isn't too fun. I am aware of newline + ~...
0
votes
3answers
59 views

Seeing user two times

Consider I have created a user 'test' during Installation which I use to login to my system. My root user is 'root'. I further open two terminal sessions for each of the users respectively. Now the ...
0
votes
0answers
8 views

How to open just one app and block any other thing on session opened via xrdp

I'm using linux mint 19. I'm trying to config a computer to some people will be able to connect to it and use only one app. I mean, I'd like that when any people that connects to this computer via ...
1
vote
0answers
72 views

Manually restore saved session files on KDE using qdbus command

At times, i have multiple konsole terminal open with multiple tabs. I would like to save and restore it manually, just in case i accidentally close the window. In KDE there is a command to save the ...
0
votes
1answer
266 views

How to attach to a tmux session after deleting it's session file? [duplicate]

tmux keeps track of active sessions in a file, on my system this is in /tmp/tmux-1000/default. Recently I manually cleared everything in the /tmp directory, removing this session file. Normally, you ...
0
votes
0answers
32 views

How to login and Download the file in the same session in R language?

I am trying to do login and download the file with using a package httr and jsonlite in R language. I write the following code : library(data.table) library(jsonlite) library(httr) library(properties)...
0
votes
1answer
76 views

How can start multiple tmux autoscript?

This is in my TmuxHome.sh Script with I can start One Only Tmux Session: # tmux Start Script Need To Work!! if which tmux >/dev/null 2>&1; then #if not inside a tmux session, and ...
1
vote
1answer
69 views

Can a (non-)controlling process detach its controlling terminal by closing its file descriptor?

In a process session with a controlling terminal, if the controlling process closes the file descriptor of the controlling terminal, does the process session become detached from the controlling ...
1
vote
1answer
96 views

Exporting $PULSE_SERVER at start up

In order to run flatpak applications (like Discord or Spotify) I currently have to export the $PUSLE_SERVER in my ~/.zshrc or ~/.bashrc like so: export PULSE_SERVER=unix:/tmp/pulse-PKdhtXMmr18n/...
0
votes
1answer
275 views

Can attaching to tmux sessions be password protected, similar to gnu screen?

I've been using gnu screen for many years, and I've been looking into switching to tmux. I can't figure out how to make tmux require a password when attaching to a session. In gnu screen, I use ...
0
votes
0answers
47 views

What is the “login session” of a process? [duplicate]

In the manpage of ps lsession SESSION displays login session identifier of a process. What does the "login session" of a process mean? ps has other fields cgname and cgroup for the cgroup ...
0
votes
1answer
50 views

Why do some programs' processes exist after forking a child, without the child starting a new process session?

Here are some of the steps for creating a daemon process from a given process, the given process exists soon after forking a child, the child calls start a new session and also a new group, by ...
10
votes
1answer
1k views

Prevent Logoff from Killing tmux Session

I have noticed that a logoff (log out) from my X user session will kill any tmux session I have initiated, even sessions I had run with sudo tmux and similar commands. I am sure that this formerly did ...
0
votes
2answers
67 views

Get time of the last session in seconds

I'm getting the time of the last session of an specific user using the last command like below: last -aiF -n 1 fakeuser The output of this command is something like: fakeuser pts/0 Tue Nov 27 11:...
3
votes
0answers
255 views

Fedora 28: Generate kerberos ticket on login

I'm trying to generate kerberos ticket when I login on my computer(Fedora 28). I want to achieve it using PAM. my /etc/pam.d/system-auth looks like this: auth required ...
2
votes
3answers
109 views

Are there any practical reasons for setting a maxlogins limit for users in limits.conf? What are the benefits?

Why should I set a maxlogins limit in /etc/security/limits.conf? In other words, are there any performance-related and security-related benefits to be gained? I have only three users on my machine, ...
1
vote
1answer
117 views

linux/xfce4: How to get rid of “choose session name”?

I've been running xcfe4 for a long time with no problems under linux. Today I was making some changes to grub and doing some reboots to test it. Now, every time I enter my login password via the ...
3
votes
1answer
445 views

Is there a way to change the process group of a running process?

Is there a way to change PID, PPID, SID of a running process? It would make sense for the answer to be no, but I'd like to make sure.
1
vote
1answer
49 views

Is it possible to log into all 6 terminal sessions at once?

If I press Ctrl+Alt+F1 to switch to the 1st terminal session, I have to give my username and password to log in. If I press Ctrl+Alt+F2, I have to repeat this process. Same for F3, F4, F5, and F6. Is ...
0
votes
1answer
308 views

How can I launch a new session of tmux in iTerm2 on a separate window?

I would like to start a tmux session on a separate window in iTerm2. Now I'm writing my own configuration script to launch the session. tmux new-session -s dev -n main -d tmux send-keys -t dev "cd $...
3
votes
1answer
221 views

Execute script prior to cinnamon logout (unsing MDM or other display manager)

I'm using cinnamon as desktop environment on my Linux Mint system. I want to automate a backup using unison: Unison shall be executed prior to each logout off my session. So I was looking for a ...
0
votes
0answers
46 views

Viewing history of echo'd text on terminal

I detached gits head using git checkout 4037ec1702bd2fa6a5a15f7413f4ccccb59d356e . and lost all my work. I still have the terminal open. Not that long ago, I did a git diff, so my changes were all ...
1
vote
1answer
790 views

Is it possible to automate clicks with xdotool to control a different GUI session from the one being currently used?

The xdotool command allows us to create scripts controlling the graphical user interface of the system very easily. I can e.g. open my Chrome browser in the following desktop by executing xdotool ...
18
votes
5answers
2k views

Screen, or similar, for automatically resuming a flaky ssh connection

I often have to connect to a server over ssh in an unreliable wifi environment. On the server, I run screen, so if I get disconnected, I can reconnect and resume the screen session, and pick up where ...
0
votes
1answer
80 views

When a session leader acquires a controlling terminal, how would the other existing processes in the session also acquire the controlling terminal?

Suppose there is a session with multiple processes in it and without a controlling terminal. When the session leader creates a connection to a controlling terminal, how would the other processes ...
1
vote
2answers
691 views

How to write a systemd user service that requires an active session

I've created a systemd user service to run a duplicity backup job once a day at 17:00 broadly based on an article in Fedora Magazine. I'm running Fedora 28 with the Gnome desktop. My systemd timer ...
3
votes
2answers
173 views

Is a session leader the only process in its group?

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process? Any process created by ...
2
votes
1answer
362 views

Switching user with gdmflexiserver from i3

Apparently, when using gdm3 (the default of Ubuntu 18.04) we should be able to run gdmflexiserver to get a new greeter and log in with resp. switch to another user. When running the command in my i3 ...
0
votes
2answers
334 views

w command doesn't show all pseudo-terminal sessions

If I open terminal and execute w command then it will show: user tty7 :0 12:04 39:56 36.87s 0.06s /sbin/upstart - Now if open terminator or xterm and execute w command then ...
1
vote
0answers
54 views

Unable to find tmux session but it shows up as a file?

Yesterday I had started a tmux session, but when I logged into the computer today, I cannot find it, i.e. tmux ls cannot find the session. But when I run top I can see that the following tmux ...
0
votes
1answer
529 views

Save/restore desktop session [closed]

My Linux session got saved somehow and every time I restart, it's restoring the same saved session (a terminal and a particular program). I am not able to find the setting or the saved file to ...
1
vote
1answer
639 views

Running bash -v or bash --v by mistake to know bash version compared to bash -v varname

A few times I mistook bash -v or bash --v to represent bash --version which they do not, as of Bash 4.3.48(1). From man bash, bash -v is equivalent to bash --verbose; although it returns a large ...
0
votes
1answer
173 views

.xsession exec not recognise $HOME or arguments?

The basic scenario is that I'm sharing my dot files across multiple machines and want to have my session definitons synced as well. Since I use different laptops and monitors with significantly ...
6
votes
2answers
7k views

Linux Mint 18.3 Cinnamon cannot start a session

As of today, I cannot login into my account. I start the computer, get to the login screen, login and then this following error appears: Your session only lasted less than 10 seconds, if you... And ...
1
vote
2answers
70 views

Can I combine ksh/zsh and other shells with Bash in the same workflow?

Can I combine ksh/zsh and other shells with Bash in the same workflow (shell session)? I am used to Bash but I might need some behavior available either in ksh or zsh. Could I use Bash with them, in ...
1
vote
1answer
602 views

`sudo setsid command` does not spawn new process group?

I am looking at a scenario where I want to run a program / command with sudo as part of a software test. The commands are launched from a Python script based on the subprocess module. I am attempting ...
1
vote
1answer
309 views

SSH session and ClientAlive problem

I have a question about ssh configuration. In a test machine I've set: # TCPKeepAlive yes Protocol 2 ClientAliveInterval 60 ClientAliveCountMax 0 And if I wait a minute, session does not close. I'...
3
votes
0answers
276 views

Save GNU Screen session layout after reboot

I would like to retain/restore the following properties of a GNU Screen after reboot: Name and number of screen sessions Name and number of windows inside every screen Screen splitting (i.e., ...
0
votes
1answer
288 views

Echo something from a tmux session to base session

I have a script with this code: #!/bin/bash tmux new-session -d bash sleep 1d echo 1 day passed tmux kill-session AFAIU, the echo will appear after 24 hours in the tmux session's stdout ...
0
votes
1answer
31 views

Does each process in a session get its input from and send its output to the terminal the session is connected to?

This tutorial says the following: Every session is tied to a terminal from which processes in the session get their input and to which they send their output. I think that this statement is ...
0
votes
1answer
216 views

Using session command from a cron job (linux)

I need to be able to start a named "session" from within a cron job and run a job within that named session. The job I need to run MAY cause my appliance to not run properly if problem exist and I ...
5
votes
1answer
1k views

Save xfce4 session from the command-line

I usually save the session with the graphical app xfce4-session-settings (Session -> Save Session). Can this be also done from the command-line? How?