Search This Blog

04 January, 2022

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf

setw -g mouse on

save the file and exit from the tmux shell, you should be able to use your mouse to resize the windows


10 August, 2021

tmux saving the scrollback content to a file

Follow as below, i tried this in Ubuntu 18.04 LTS

All commands to be execute without quotes 

1) Use "prefix + :"

2) Type "capture-pane -S -5000 + Return"

Replace -5000 with the number of lines you'd like to save, or with - for all lines. This copies those lines into a buffer.

3) To save the buffer to a file, type "prefix + :"

4) Type in "save-buffer filename.txt + return".

By default Prefix is Ctrl+B for tmux

22 August, 2020

How to enable Remote Desktop in Ubuntu

Below tested on Ubuntu 18.04

 

Refer the Screenshot, by default Ubuntu uses vino-server

 

1) Click on Ubuntu Settings

2) Click on Sharing

3) Click on the screen sharing

4) turn on the screen sharing button on the pop up window

5) set the options as shown above, set a password for the connection

6) disable encryption

 sudo gsettings set org.gnome.Vino require-encryption false



13 June, 2020

Ubuntu 18.04 running script at boot

Ubuntu 18 is using systemd, and there are three things we need to do 

1) Create a service file and put it in /etc/systemd/system/
  let say the file be board-init.service, with the below content


[Unit]
Description=Board initializations
DefaultDependencies=no

[Service]
Type=oneshot
ExecStart=/etc/board-init.sh

[Install]
WantedBy=sysinit.target

2) create your board-init.sh script file, and put it in /etc/

3) Create a soft link in the /etc/systemd/system/sysinit.target.wants to the service file w created

cd /etc/systemd/system/sysinit.target.wants
ln -s /etc/systemd/system/board-init.service board-init.service

reboot the board. To see the output of the script type 

journalctl -u board-init -b

13 September, 2019

dinomycle vimrc file

"show status bar
set laststatus=2

"Highlight search
set hlsearch


"Turning off expandtab in VIM for editing makefile
let _curfile = expand("%:t")
if _curfile =~ "Makefile" || _curfile =~ "makefile" || _curfile =~ ".*\.mk"
set noexpandtab
else
set expandtab
set tabstop=4
set shiftwidth=4
endif


"showing all opened files in vim
map <F4> :ls<CR>:buffer<space>

"showing the status bar with extra info
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set background=dark
set autoindent


13 March, 2019

04 February, 2018

Oracle Virtual Machine Creating Shared Folder and its Permission in Ubuntu guest

Explaining the Steps for sharing a folder on Oracle VM with Windows Host and Ubuntu Guest

VirtualBox’s Shared Folders feature works with both Windows and Linux guest operating systems.
Steps to follow to do this is as follows



1) Install VirtualBox’s Guest Additions in the guest virtual machine.
After the guest os(Ubuntu) is booted,
click the “Devices” menu and choose the
“Insert Guest Additions CD image” option.
This inserts a virtual CD that you can use within the guest operating system to install the Guest Additions.

2) we need to reboot the VM Guest

3) Creating a shared folder
from the menu

Devices -> Shared Folder -> Shared Folder Settings

Select a folder to be shared between Windows and Ubuntu
Reboot the VM

4) Now we should be able to see the shared folder in /media/sf_*****

5) Setting Permission

 But now when you click using browser or change directory you will see permission issue. For this we need to run the below command in terminal

sudo adduser <your_user_name> vboxsf

or

sudo adduser `whoami` vboxsf

Logout the current user and login again or reboot the Ubuntu guest, After logging in you will be to access the shared folder from the Ubuntu

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...