Questions tagged [session]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
81
votes
3answers
37k views

What are “session leaders” in `ps`?

What are session leaders, as in ps -d which selects all processes except session leaders?
64
votes
4answers
271k views

Keeping a process running after PuTTY or terminal has been closed [duplicate]

I'm running a Node.js server off of a Raspbian (Debian) machine, and I'd like to start and stop the server remotely. This for me means using PuTTY to access the shell, except when I close out of the ...
41
votes
7answers
61k views

How to recover a shell after a disconnection

Am doing some work on a remote CentOS 5.6 machine and my network keeps dropping. Is there a way that I can recover my hung sessions after I reconnect? EDIT: am doing some updating and installing with ...
39
votes
5answers
22k views

Can I launch a graphical program on another user's desktop as root?

Following are other questions which I think I need to know: From a non X Session? (meaning root isn't logged into X) If multiple people were logged in on X, could I auto-detect who was on which ...
27
votes
2answers
13k views

tmux session lost in unknown pts, cause and possible solution?

I was trying to re-attach to a long-running tmux session to check up on a python web-application. However tmux attach claims that there is no running session, and ps shows a tmux process (first line), ...
20
votes
3answers
2k views

Documentation: Architecture of Linux Session

I'm looking for a good overview documentation describing the the stack of daemons and services involved in a modern Linux session. Although having read various documentation about dbus, and systemd, ...
20
votes
1answer
5k views

Reuse D-Bus sessions across login sessions

I access a machine through multiple login sessions. The sessions' lifetimes may or may not overlap. In my case, these login sessions are currently always over SSH, but I would prefer to handle local ...
19
votes
2answers
5k views

Concept of controlling terminal in Unix

Can some one please explain in an easy to understand way the concept of controlling terminal in unix and unix like systems ? Is it related to a session ? If yes, then how ?
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 ...
17
votes
4answers
30k views

How can I run a script that starts before my login screen?

I was calibrating my touch screen, and saw that the best tool around was xinput_calibrator. So I used it. It have two options (one of which did not work), so I am here for the second. It says I should ...
16
votes
2answers
40k views

Clear Xfce4 session

How to reset Xfce session? When I start Xfce4, it always opens 2 windows of Evince, Emacs and one terminal emulator. I remember I used this configuration once a week ago, but now it starts every time ...
14
votes
1answer
9k views

How to make startx use alternate xinitrc?

I don't have a desktop manager installed (and I don't want to). After logging in through the terminal I use startx to start the GUI. I have entries in ~/.xinitrc for my GUI sessions. Right now I have ...
13
votes
1answer
2k 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 ...
13
votes
1answer
5k views

How to save a session in Yakuake

I use the Yakuake drop-down terminal and would love if it could save my session of tabs somehow. When I have 6-7 tabs open, all named and everything, it is a giant pita having to re-create that on ...
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 + ~...
11
votes
5answers
2k views

How to detect from script when the user's desktop is loaded?

I have a daemon, implemented in bash and running by means of cron and the @reboot option, that shows the desktop in inactivity. The script is as following (timings are short for testing purposes): #!/...
11
votes
4answers
2k views

Is there a way to set permissions so a process could use a specific device?

As you can read, for instance here, logind, which is a part of systemd, can set permissions to some devices for user sessions. There's also a vid showing how this kind of behavior works in practice. ...
10
votes
5answers
16k views

.ssh/config to start remote session in zsh

I would like to start a remote session without typing the following command ssh user@remoteserverip -t zsh I know that I can change the host names in the ~/.ssh/config to simply use something like ...
9
votes
1answer
6k views

Reopen Terminal windows after restarting

In Mac, if I have a few Terminal windows open and I restart the computer or quit Terminal, the windows that were open last are opened again with their working directories and command histories ...
9
votes
1answer
1k views

Save sessions to file in xmonad

Is it possible to save an xmonad session to a file and reload it on the fly? I don't want to save only the last session but to be able to save different sessions to different files and reload it if I ...
9
votes
3answers
8k views

Linux Mint 18 with Cinnamon Session Save and Restore

Is there any way to save the position / workspace and possibly state of all of my open programs so that when I restart I can restore everything to exactly where it was before without having to reopen ...
8
votes
1answer
5k views

Is it possible to find times of past user sessions?

Using the who command, I can find which users are currently logged into a machine. I would like to determine which users have logged into my machine in the past, and the length of those sessions. Is ...
7
votes
2answers
8k views

vim: how to trace back all changes done to file during the day

Does anybody know how to setup vim (the text editor) in such a way to make it possible to trace back all the changes done to a file within a day? I need it for the cases when I have accidentially ...
7
votes
3answers
28k views

How does the path environment variable work in Linux?

I'm confused how the PATH environment variable works under Linux. I'm a Linux Mint 15 user. First, I read about editing the /home/.bashrc file and doing a PATH=$PATH:/directory, but I also knew ...
7
votes
2answers
6k views

My .xsession and .xinitrc files are not executing

I have installed xmobar, xmonad on ubuntu 11.04. #!/bin/bash trayer --edge top --align right --SetDockType true --SetPartialStrut true \ --expand true --width 10 --transparent true --tint ...
7
votes
1answer
13k views

what are gnome-session and gnome-settings-daemon?

Can someone explain to me exactly what gnome-session and gnome-settings-daemon do and how they might be useful to me, as someone who doesn't use GNOME or any of its relatives as a DM (i use i3)? I've ...
7
votes
2answers
3k views

Kill user processess on logout

I have a Ubuntu server that handles remote X sessions from users. However, I don't want to allow users to run any kind of background processes - so here is my question: How do I prevent users from ...
6
votes
3answers
990 views

'dos2unix' is unable to convert a `typescript` file to Unix format

I recorded my current session using the script command, and all information was saved in a typescript file, but when I opened it using Vim there were a lot of ^Ms due to carriage returns. I tried to ...
6
votes
2answers
3k views

What effects does restarting sshd have on existing ssh sessions?

I've made some changes to the sshd_config. As I understand it, now I need to restart the sshd service. What happens to existing ssh sessions for the users? Any pointers to documentation I need to ...
6
votes
2answers
8k 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 ...
5
votes
2answers
6k views

How is ssh-agent being autostarted?

I am currently running Crunchbang Linux with Openbox, and as soon as I log in I have an ssh-agent process running and I can't for the life of me figure why it is being autostarted. Here is the ssh-...
5
votes
1answer
393 views

Key passphrases and sshd — cached authentication?

Asking a more precise question: It appears that I can complete an rsync-over-ssh, using a key that requires a passphrase, without entering the passphrase. For example, I can run the rsync from the ...
5
votes
3answers
8k views

bash: Saving aliases beyond one session

Recently, I've been fiddling around with Linux's terminal commands to try and get a better feel for the system. I was happy to know that I could give commands a different name in order to call them, ...
5
votes
2answers
14k views

How to get the list of all active X sessions and owners of them

I'm implementing USB plug/unplug notification (here's related question), and I need to execute something like notify-send "device plugged" "My Device Title". The problem is that to make this command ...
5
votes
3answers
10k views

xterm warning: Tried to connect to session manager

I am writing a quick script to read user input and put into commands of a couple different programs. I'm using xterm -e to open a terminal for each separate program. The script is working fine, but ...
5
votes
1answer
524 views

Remove alias from current session

How to remove a alias from current session without closing that session?
5
votes
1answer
2k 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?
5
votes
3answers
2k views

How to set an xmodmap file for the session manager (or at least SLiM) because of a broken physical key

I've got my laptop set up to boot directly into SLiM as the X session manager. However, the "M" key on my laptop is broken. I've gotten around this when logged in by using xmodmap to remap my ...
4
votes
1answer
382 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 ...
4
votes
2answers
575 views

Run an app with a window manager behind in a separate X server

I want to launch an app in a separate X server. It needs a window manager behind it, though. I created a script #!/bin/sh x-window-manager & my-gui-app and launched it with xinit myscript....
4
votes
3answers
662 views

SSH-like session that survives physical network disconnection

I want my SSH login session to remain connected after the computer goes to sleep and wakes up. From what I understand TCP can survive intermittent network problems, so can I change settings so that it ...
4
votes
2answers
2k views

Xscreensaver on startup, i3wm

How do I set up xscreensaver to run in the background on login? Will a simple xscreensaver & do the trick?
4
votes
1answer
3k views

Universal way to logout from terminal via dbus

I'm new with dbus, and saw different ways to log out from terminal depending on desktop env. But I'm curious is there any way to log out from any desktop env using dbus messages? On GNOME: dbus-send ...
4
votes
1answer
4k views

.xsession and .xinitrc not executed at login

This is the content of my ~/.xsession: #!/bin/bash # Tray for skype, keyboard layout, ... trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --...
4
votes
2answers
247 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 ...
4
votes
1answer
359 views

What is the purpose of abstractions, session, session leader and process groups?

I understand from Informit article that sessions and process groups are used to terminate descendant processes on exit and send signals to related processes with job control. I believe this ...
4
votes
3answers
7k views

How to find the machine from which a user logged into current machine using ssh?

In a multi server architecture, is it possible to find out from which machine a user logged into current machine using ssh? For example, user1 logged into host1. From there, the user logged into ...
4
votes
5answers
10k views

Linux Mint 17, your session lasted less than 10 seconds?

I get this message when I try to log in. /etc/mdm/Xsession: Beginning session setup... /etc/mdm/Xsession: 1: /etc/profile: id: not found /etc/mdm/Xsession: 12: [: Illegal number: /etc/mdm/Xsession: ...
4
votes
1answer
8k views

How to set an expired authentication in Apache?

Using a simple virtual host, I want to set a timeout of X minutes (same of set an expired authentication) to force the user to re-insert its credentials. [...] <Directory /home/user1/> ...
4
votes
2answers
4k views

run xmodmap commands after login

I created a file ~/.Xmodmap with my mapping commands. I thought that it will be automatically launched after login (and restart) but it's not. So I have to always run after login the command $ ...

1 2 3 4 5