midenok / stuff-linux Goto Github PK
View Code? Open in Web Editor NEWLinux-related setup and utilities stuff: scripts, instructions, etc.
Linux-related setup and utilities stuff: scripts, instructions, etc.
In line 1087 of swap.c, there is a line like this:
-------------------
nr_threads = clamp_val(nr_threads, 1, LZO_THREADS);
-------------------
Please change it to:
-------------------
nr_threads = 3;
-------------------
From here:
you can edit file usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml line 34 : property int itemSize: Math.min(Math.min(width, height), units.iconSizes.medium) change value units.iconSizes. "small", "smallMedium", "medium", "large", "huge", "enormous" smallMedium is good for me
add-apt-repository ppa:webupd8team/atom
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 91, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/saucy
base-files
must depend on proper version of python-apt-common
!
Install network-manager-gnome
Run nm-applet
Preserve: indicator-cpufreq
root@lian:bind# mount --bind /home home
root@lian:bind# mount --bind / root
root@lian:bind# mount --bind /var var
root@lian:bind# mount --bind /usr usr
root@lian:bind# mount --bind /storage storage
root@lian:bind# rshost . /mnt/1
Rotating filesystem
PS1 may contain subshell execution like $(echo something)
which are processed by debug trap. Looks like bug report should be submitted to bash.
See this:
class ContinueUntilSource(gdb.Command):
def __init__(self):
super().__init__(
'cus',
gdb.COMMAND_BREAKPOINTS,
gdb.COMPLETE_NONE,
False
)
def invoke(self, argument, from_tty):
argv = gdb.string_to_argv(argument)
if argv:
gdb.write('Does not take any arguments.\n')
else:
done = False
thread = gdb.inferiors()[0].threads()[0]
while True:
message = gdb.execute('si', to_string=True)
if not thread.is_valid():
break
try:
path = gdb.selected_frame().find_sal().symtab.fullname()
except:
pass
else:
if os.path.exists(path):
break
ContinueUntilSource()
from here.
https://help.ubuntu.com/community/Grub2/Troubleshooting
set
, it says prefix where it searches for normal.mod
;ls
for that prefix
value, check the contents of partition, find correct partition;insmod /boot/grub/x86_64-efi/normal.mod
;normal
.--- debian/rules~ 2017-09-22 20:56:30.000000000 +0300
+++ debian/rules 2018-02-24 00:16:33.344582975 +0300
@@ -42,15 +42,17 @@
--enable-ifupdown \
--enable-config-plugin-ibft \
--enable-introspection \
- --enable-gtk-doc \
+ --disable-gtk-doc \
--enable-concheck \
--disable-teamdctl \
--enable-json-validation \
--enable-bluez5-dun \
--enable-vala \
--with-selinux=yes \
- --with-tests \
- --with-libaudit=yes
+ --enable-tests=no \
+ --with-libaudit=yes \
+ CFLAGS=-O0 \
+ CXXFLAGS=-O0
override_dh_missing:
find debian/tmp -name '*.la' -print -delete
debian/rules build-arch
/etc/initramfs-tools/update-initramfs.conf:
update_initramfs=no
Need to talk with EXT4 guys.
As was said here:
Good question and any suggested resolutions are not handy. I want to automatically change file group ownership to track down changes I do in /etc. Group ownership is not very useful when it have g=r,o=r
. And with updated ownership I will be able to track my own changes with command:
find /etc -type f -group my_group
Screwing VCS to /etc is tedious and boring (to commit and comment each change). It is not usable.
Figuring out changes through packaging system like Debian does is not 100% reliable and not handy (requires slow run).
I would say, group ownership is perfect for this task!
Filesystem automatically hardlinks all duplicates
NVidia doesn't support framebuffer. See ls /dev/fb*
: only fb0
exists. So it is impossible to have dual-head mode for single nvidia card.
fbcon=rotate:1
fbcon=rotate:3
Install fbset
.
TODO:
Number Start End Size File system Name Flags
1 2048s 4095s 2048s grub
2 4096s 208895s 204800s fat16 efi boot, esp
3 208896s 823295s 614400s boot
4 823296s 2097151s 1273856s reserved
5 2097152s 505462783s 503365632s lvm
6 505462784s 1258291199s 752828416s ext4 storage
7 1258291200s 1392508927s 134217728s linux-swap(v1) swap
Number Start End Size File system Name Flags
1 0.00GiB 0.00GiB 0.00GiB grub
2 0.00GiB 0.10GiB 0.10GiB fat16 efi boot, esp
3 0.10GiB 0.39GiB 0.29GiB boot
4 0.39GiB 1.00GiB 0.61GiB reserved
5 1.00GiB 241GiB 240GiB lvm
6 241GiB 600GiB 359GiB ext4 storage
7 600GiB 664GiB 64.0GiB linux-swap(v1) swap
root@lian:midenok# dmraid -rD
/dev/sda: isw, "isw_bjedijgech", GROUP, ok, 937703086 sectors, data@ 0
/dev/sdb: isw, "isw_bjedijgech", GROUP, ok, 937703086 sectors, data@ 0
root@lian:midenok# dmraid -s
*** Group superset isw_bjedijgech
--> Subset
name : isw_bjedijgech_Vortex
size : 1875397120
stride : 256
type : stripe
status : ok
subsets: 0
devs : 2
spares : 0
vgcreate vg0 /dev/md126p5
lvcreate -L122884m vg0 -n lv0
vgcreate vg1 /dev/vg0/lv0
lvcreate -L6g vg1 -n root
lvcreate -L40g vg1 -n usr
lvcreate -L14g vg1 -n var
lvcreate -L60g vg1 -n home
cd /dev/vg1
for d in *; do
# mkfs.ext4 -L vortex-$d $d
mkdir -p /mnt/dst-$d
mount $d /mnt/dst-$d
done
Sent two letters into mailing list. Yet no answer. I need to persuade KZak that this feature is important.
There is 3 variants of format:
FORMAT is one of:
ln left justified, no leading zeros
rn right justified, no leading zeros
rz right justified, leading zeros
Add fourth option 'nn' to turn off numbering at all. This is useful for prefixing lines with -s option.
https://github.com/jonas/tig/blob/master/doc/tigrc.5.adoc#color-command
All 256 colors for terminal:
https://jonasjacek.github.io/colors/
Colors example:
/usr/share/doc/tig/examples/chocolate.theme.tigrc
Posted bug.
.pam_environment is pam.conf
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh_auth_sock"
[Unit]
Description=ssh-agent
[Service]
ExecStart=/usr/bin/ssh-agent -d -a %t/ssh_auth_sock
ExecStartPost=/bin/sh -c "export SSH_AUTH_SOCK=%t/ssh_auth_sock; cd %h/.ssh; if [ -f .session-keys ]; then /usr/bin/ssh-add $$(cat .session-keys); else true; fi"
SuccessExitStatus=2
[Install]
WantedBy=default.target
USER: disable ssh-agent in startkde since it is started by systemd
See ~/.config/systemd/user/ssh-agent.service
diff --git a/X11/Xsession.options b/X11/Xsession.options
index fc45bf9..3c1ff13 100644
--- a/X11/Xsession.options
+++ b/X11/Xsession.options
@@ -5,5 +5,5 @@
allow-failsafe
allow-user-resources
allow-user-xsession
-use-ssh-agent
+# use-ssh-agent
use-session-dbus
Need TODO:
/proc/cmdline
and get iso-scan/filename
param value;Linux dull 5.0.0-8-lowlatency #9-Ubuntu SMP PREEMPT Tue Mar 12 22:38:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10
DISTRIB_CODENAME=cosmic
DISTRIB_DESCRIPTION="Ubuntu 18.10"
Probably, move this issue to better place.
There are some suggestions:
Configurable options should be corrected accordingly.
Uninstall ntp, ntpdate
Install systemd-timesyncd
https://sourceware.org/bugzilla/show_bug.cgi?id=23439
Reproduces on any version of GDB (starting from 8) with latest git rr (cbab5f75)
Script: bram-mount
Inspired by:
https://superuser.com/questions/1343119/linux-ramdisk-sync-to-disk
dd if=/dev/zero of=/mnt/2/test.tmp bs=10485760 oflag=dsync count=50
Write-behind attempt failed:
write-behind has no measurable effect?
kswapd
with blkio
kswapd0
kernel helper.
Limit CPU and IO bandwidth to say 50%.
Note: swappiness=0
lock happens faster
swappiness
This control is used to define how aggressive the kernel will swap
memory pages. Higher values will increase aggressiveness, lower values
decrease the amount of swap. A value of 0 instructs the kernel not to
initiate swap until the amount of free and file-backed pages is less
than the high water mark in a zone.
The default value is 60.
When checked filenames becomes duller. That should be reverse: non-project files duller, project files brighter.
This due to wrong locale setting. Set it to UTF8 (konsole also should detect it in Edit Profile -> Advanced -> Encoding).
in ui.cc
:
cw::menu_info(cw::menu_info::MENU_ITEM, N_("New ^Flat Package List"), NULL,
N_("View all the packages on the system in a single uncategorized list"),
sigc::ptr_fun(do_new_flat_view_with_new_bar)),
replace NULL
with "NewFlatView"
,
for
cw::menu_info(cw::menu_info::MENU_ITEM, N_("New Package ^View"), NULL,
N_("Create a new default package view"),
sigc::ptr_fun(do_new_package_view_with_new_bar)),
set "NewPackageView"
,
for any other NULL values, set respective string values to gain ability to set key-bindings to any menu option.
Let's call it best
(less
-> more
-> most
-> best
, ha-ha, false logic).
It looks at STDIN
data and detects line length. Then depending on that it execs less
or cat
or anything. Should be configurable: max data read, what to exec at what conditions, etc. More interesting feature: rules depending content type (similar to what file
command does).
bf <frame number>
Extract source file:line number from and put breakpoint on it.
From: Aleksey Midenkov
Subject: Coping with screen session and ssh-agent session
Date: Wed, 17 Oct 2012 18:22:30 +0400
This is well known problem that SSH client cannot connect to SSH-AGENT from
SCREEN session. I will briefly refresh your memory on it. OpenSSH uses
SSH_AGENT_SOCKET environment variable to connect SSH client and agent to get
authentication data. The problem is, that SSH_AGENT_SOCKET is different each
time you connect to host. But SCREEN session retains old value
from the time session was first created. As a result SSH client inside SCREEN
cannot use authentication keys from SSH-AGENT and asks for password.
There are already number of scripted solutions for this problem, that exist on
the net. But none of what I found is fully working. I will skip delving into
deficiencies of their implementations, but will try to deduce universal way
of what should be done for coping with this problem.
First, we need shell to be able to update SSH_AGENT_SOCKET before each command
it executes. For example, in BASH it can be done by 'trap ... DEBUG'.
Then, we need actual SSH_AGENT_SOCKET value for current running SCREEN
session. And this is hardest and in fact impossible part to find it at
runtime. Of course, we could lend to the method of leaving some traces upon
SSH connection like do all the existing examples I've seen. But this, as was
said, lacks universality and leads to deficiency of racing condition.
What should we do to properly find SSH_AGENT_SOCKET, is to trace the path from
the point of running shell inside SCREEN session to SSH connection that uses
this session. And here what I found about what we can do and what we cannot
do. The final goal is to find PID of SSH client. By knowing that PID we can
easily find socket in /tmp/ssh-*$PID/agent.$PID and that will be the value for
SSH_AGENT_SOCKET. To find PID of SSH we need to know PID of SCREEN client
(i.e. 'screen -r' command). By knowning PID of SCREEN client we can easily
find PID of SSH: walk through /proc filesystem.
And what I could not find is how to find out PID of SCREEN client by PID
of SCREEN daemon. The both are connected to SCREEN socket, but there is no
permission to find all processes opening this socket. There is no commands
inside SCREEN to find it. There is interactive command 'displays' that can be
of some help: at least it displays used PTS, but there is no ability to run
it in non-interactive way. Ideally, 'screen -list' should print instead of
just '(Attached)' something like '(Attached to PID)'. And that would be
enough to satisfy my needs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.