What does your desktop look like?

If it doesn't relate to Debian, but you still want to share it, please do it here

Re: What does your desktop look like?

Postby None1975 » 2018-08-08 18:08

Head_on_a_Stick wrote:Yes, either `exit` or <Ctrl>-D will close tmux if it is the only session running or `pkill tmux` will kill everything.
I prefer to keep the session running though, mainly because I don't use a persistent history file with my shell.

I understood. Thanks for the explanation.
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 559
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: What does your desktop look like?

Postby ruffwoof » 2018-08-08 23:02

None1975 wrote:How do you close this session? Do you use the exit command?

The standard tmux control key is ctrl-b if you press that combination, release the keys and then press d that will detatch you from the session, but it keeps running in the background. You can then log back in again later to the same server and run tmux attach ... to get back into that original session, even from a different device (such as a smartphone with ssh that you login to the server with).

Other tmux commands are ctrl-b c to create a new tmux window. ctrl-b n to step between the windows, ctrl-b " and ctrl-b % to split a current window (horizontally/vertically), ctrl-b arrow keys to step between them, ctrl-b z to zoom/unzoom a pane

You can set tmux to start and load a number of windows via a script such as

Code: Select all
#!/bin/sh
# create a tmux session called work, and detach so we can send keys to it
# send keys to rename the first window to diary and load diary
# (as root, as my diary is owned by root)
tmux new -s work -d
tmux rename-window -t work diary
tmux send-keys -t work 'su - root -c "vi /home/user/bin/diary"' C-m

# Add another tmux window, rename it to mc and load mc
tmux new-window -t work
tmux rename-window -t work mc
tmux send-keys -t work 'mc' C-m

# and finally select which window to show first and attach to the tmux work session
tmux select-window -t work:0
tmux attach -t work


Another 'trick' is that two of you can ssh into the same box using the same userid and create/attach to the same tmux session, a simple collaboration method where either of you can type things and both of you see the same display outputs.

Set the console up appropriately and it can be quite colourful (PS1 prompt) and run tmux (so multiple windows, scrolling, cut/paste ...etc.) and if you run mc in one window that has a nice inbuilt editor as well as being a reasonable file manager (I set my left pane to show a tree, right pane to show files and set lynx type navigation so up and down arrows steps you through a directory, left and right arrows takes you up or down through directories). Nice for when working on remote systems.

Personally I don't like the ctrl-b control key sequence so I map that to the backtick (execute) key instead. When I want to type a execute/backtick in a file such as a shell script I have to press it twice ... i.e. my .tmux.conf contains ...

unbind C-b
set-option -g prefix `
bind ` send-prefix

I also set F11 and F12 to create a new tmux window and step through the windows

# mc uses F1 to F10, so moved up to F11 and F12
bind-key -n F12 next-window
bind-key -n F11 new-window

" and % for splitting a window into panes isn't nice IMO either so I map them to the | and - keys ...

# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %

So for me for instance, I can split a window by pressing the backtick (exec) key (instead of having to key in ctrl-b) and then | for a vertical splitting of the window. F12 to step onto the next tmux window ...etc. Generally I avoid splitting tmux window myself and prefer to run each program full screen i.e. I most create new tmux windows using F11 and step between them using F12.

So you might have one tmux window that you've used to ssh into another box, another tmux window running mc, another running perhaps calcurse (calendar), another running htop (system monitor), irc, email ....etc. and you can detatch, from that ... and return later and reattach back in again. Ctrl-Alt-Fn and you can flip between that console and your X session (browser with tabs ...etc.).

Sorry for the wall of words, hope it was more helpful than annoying.
Was dual booting Debian and OpenBSD, but solely OBSD now.
Acer Aspire M3201 (2GB), Radeon HD3200, AMD Phenom X4
ruffwoof
 
Posts: 258
Joined: 2016-08-20 21:00

Re: What does your desktop look like?

Postby Nili » 2018-08-09 06:39

This thread is turned into tmux config, so I'm posting too this little script found on Arch Wiki years ago.
Code: Select all
exec x-terminal-emulator -e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session 'ranger /media' \; split-window -h ranger \; split-window -v \;"

Note: you may change "x-terminal-emultar" with your terminal name eg: stterm or xterm
Also: you may change "ranger" / "ranger /media" with your apps name like rTorrent, newsbeuter, mutt etc...

I find the above command useful, because, keeps sessions open in tmux even if i close the console window or if the tmux is running on desktop, it open back where i left it.
OS: Devuan
WM: Openbox (maximized:true|decor:no|focus:yes)
-
Android: S8+/S9+ Audio Hi-Res (24-bit) WAV/FLAC @ mora.jp (awesome cleanliness)
User avatar
Nili
 
Posts: 329
Joined: 2014-04-30 14:04
Location: $HOME/♫♪

Re: What does your desktop look like?

Postby Head_on_a_Stick » 2018-08-09 13:26

Big changes for my Debian desktop: I've slightly reduced the size of the panel font :mrgreen:

Image

Also changed from ifupdown to systemd-networkd using systemd's native DHCP server with automatic switching from wireless to wired connections[1] and systemd-resolved providing the DNS via Google:
Code: Select all
# ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf

The resolv.conf file then shows a nameserver of 127.0.0.53, which is a bit weird, but it works:
Code: Select all
empty@hegel:~ $ systemd-resolve forums.debian.net
forums.debian.net: 217.196.43.138

-- Information acquired via protocol DNS in 2.6ms.
-- Data is authenticated: no
empty@hegel:~ $

I really do love the integrated user space provided by all the systemd tools, it is very Unix-like :twisted:

[1] https://wiki.archlinux.org/index.php/Sy ... me_machine
E Pluribus Unix
User avatar
Head_on_a_Stick
 
Posts: 7785
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: What does your desktop look like?

Postby None1975 » 2018-08-09 13:41

Thank you, ruffwoof very much for the detailed description of tmux. Very useful information. I will tailor something for my own needs. Thanks again.
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 559
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius


Re: What does your desktop look like?

Postby Nili » 2018-08-12 13:36

^Icewm brings back some cool memories playing with it.
OS: Devuan
WM: Openbox (maximized:true|decor:no|focus:yes)
-
Android: S8+/S9+ Audio Hi-Res (24-bit) WAV/FLAC @ mora.jp (awesome cleanliness)
User avatar
Nili
 
Posts: 329
Joined: 2014-04-30 14:04
Location: $HOME/♫♪

Re: What does your desktop look like?

Postby @ttila » 2018-08-13 07:06

Debian testing with Lxqt and changeble wallpapers

Image

http://i64.tinypic.com/15s77kx.jpg
@ttila
 
Posts: 9
Joined: 2017-12-13 16:57

Previous

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable