Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What does your desktop look like?

Off-Topic discussions about science, technology, and non Debian specific topics.
Message
Author
ruffwoof
Posts: 298
Joined: 2016-08-20 21:00

Re: What does your desktop look like?

#5416 Post by ruffwoof »

Head_on_a_Stick wrote:^ Nice tips, thanks!

I use this stanza in my shell configuration to autostart tmux if it is not already running and to attach to the first available session if it is running:

Code: Select all

if [ -z "$TMUX" ]; then
	ID="$(tmux ls 2>/dev/null | awk -F':' '!/attached/{print $1}' | sed q)"
	if [ -z "$ID" ]; then
		tmux new-session
	else
		tmux attach-session -t "$ID"
	fi
fi
This results in "unkillable" terminal sessions so my work isn't ruined when I accidentally close a window :mrgreen:
Nice tip. (Up until now) I've just been using [ -z $TMUX ] && tmux

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: What does your desktop look like?

#5417 Post by None1975 »

Head_on_a_Stick wrote:^ This results in "unkillable" terminal sessions so my work isn't ruined when I accidentally close a window :mrgreen:
Forgive me for a stupid question. How do you close this session? Do you use the exit command?
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: What does your desktop look like?

#5418 Post by Head_on_a_Stick »

None1975 wrote:How do you close this session? Do you use the exit command?
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.
deadbang

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: What does your desktop look like?

#5419 Post by None1975 »

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 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

ruffwoof
Posts: 298
Joined: 2016-08-20 21:00

Re: What does your desktop look like?

#5420 Post by ruffwoof »

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.

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: What does your desktop look like?

#5421 Post by Nili »

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.
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: What does your desktop look like?

#5422 Post by Head_on_a_Stick »

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
deadbang

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: What does your desktop look like?

#5423 Post by None1975 »

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 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github


User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: What does your desktop look like?

#5425 Post by Nili »

^Icewm brings back some cool memories playing with it.
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

User avatar
@ttila
Posts: 139
Joined: 2017-12-13 16:57
Has thanked: 2 times
Been thanked: 13 times

Re: What does your desktop look like?

#5426 Post by @ttila »

Debian testing with Lxqt and changeble wallpapers

Image

http://i64.tinypic.com/15s77kx.jpg

User avatar
esp7
Posts: 177
Joined: 2013-06-23 20:31
Has thanked: 2 times
Been thanked: 4 times

Re: What does your desktop look like?

#5427 Post by esp7 »

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

Image

Seems like you are using lots of RAM for something without eye candy and only 4 terminal windows open ?
ThinkPad X220: i5-2520M CPU 2.5GHz - 8GB RAM 1333 MHz - SSD 860 EVO 250GB - Debian - ME_cleaned
ThinkPad X230: i5-3320M CPU 3.3GHz - 8GB RAM 1600 MHz - SSD 860 EVO 500GB - Debian - ME_cleaned

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: What does your desktop look like?

#5428 Post by Head_on_a_Stick »

esp7 wrote:Seems like you are using lots of RAM for something without eye candy and only 4 terminal windows open ?
Firefox is open in the "web" tag, here's a clean scrot:

Image

I do like systemd-{network,resolve}d but it is a bit of a memory hog... :roll:
deadbang

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: What does your desktop look like?

#5429 Post by Nili »

Head_on_a_Stick wrote:I do like systemd-{network,resolve}d but it is a bit of a memory hog... :roll:
systemd services are multiplied so much that i have to zoom out my eyes then start counting :)

7 so far, I believe the trend is ever in rising rather than falling.

Well atleast Club 100 is there. So, good job for keeping memory tightened tightly.
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: What does your desktop look like?

#5430 Post by Head_on_a_Stick »

Nili wrote:systemd services are multiplied so much that i have to zoom out my eyes then start counting :)
Yes, I know what you mean but the functionality on offer is very impressive, for example querying my DNS stats:

Code: Select all

empty@hegel:~ $ systemd-resolve --statistics                          
DNSSEC supported by current servers: yes

Transactions
Current Transactions: 0
  Total Transactions: 70973

Cache
  Current Cache Size: 117
          Cache Hits: 27779
        Cache Misses: 45791

DNSSEC Verdicts
              Secure: 8653
            Insecure: 42095
               Bogus: 0
       Indeterminate: 0
empty@hegel:~ $
Note that DNSSEC is enabled :cool:

It would be possible to run my rig with just `wpa-supplicant` & `ip` but I like the integration of systemd's userland tools.
deadbang

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: What does your desktop look like?

#5431 Post by Nili »

I do not deny that there are many useful features on systemd as long i used it in Debian 8.
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

User avatar
freek
Posts: 74
Joined: 2007-04-03 01:36
Location: Netherlands

Re: What does your desktop look like?

#5432 Post by freek »

Found my old Dell Vostro 1720 laptop and spend some quality time with her .. :lol:

New install: Debian testing net-install, some necessaries, some configs from terminalforlife (https://github.com/terminalforlife) and bspwm (love it!)

Image

Just having fun !
there's no business like .. your own business ..

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: What does your desktop look like?

#5433 Post by Nili »

Image Image
Wallpaper: Pokemon-Trainer-Selene
Edit: I mistakenly posted the image here, though Devuan within the family i see it.
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

langsholt
Posts: 1
Joined: 2016-08-20 15:04

Re: What does your desktop look like?

#5434 Post by langsholt »

Image
Debian Strech

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1387
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 64 times

Re: What does your desktop look like?

#5435 Post by None1975 »

After much thought, I decided to try out the window manager-Afterstep. I installed it and was dumbfounded. Desktop of the nineties;) But I liked it. And even very much. After the fuss with Xmonad, constant config file modification, etc. i decided to tear it all to hell, and stay on Afterstep. So far it looks like this (an empty desktop)

Image
Busy:

Image

Busy with menu:

Image
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

Post Reply