1 |
if &cp | set nocp | endif let s:cpo_save=&cpo set cpo&vim vmap gx NetrwBrowseXVis nmap gx NetrwBrowseX vnoremap NetrwBrowseXVis :^V^Ucall netrw#BrowseXVis()^V^M nnoremap NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '^V')),netrw#CheckIfRemote())^V^M let &cpo=s:cpo_save unlet s:cpo_save set backspace=indent,eol,start set fileencodings=ucs-bom,utf-8,default,latin1 set helplang=en set nomodeline set ruler set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc " vim: set ft=vim : |
Category Archives: unix administration
mostly stuff I need and shouldn’t be scp’ing
.vimrc
1 2 3 4 5 6 7 8 9 10 11 12 |
"keep the defaults unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim set tabstop=4 set softtabstop=0 set noexpandtab set shiftwidth=4 set laststatus=2 set hlsearch set printfont=courier:h8 |
update script
1 2 3 4 |
#!/bin/bash apt-get update apt-get -q -y dist-upgrade apt-get -q -y autoremove |
Basic Windows 10 VM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
!/bin/bash #-boot d \ #-cdrom win_10_pro_64.iso \ #-cdrom QuickBooks2013InstallCD.iso \ #-monitor stdio \ qemu-system-x86_64 \ -enable-kvm \ -cpu host \ -machine q35 \ -m 8G \ -smp cores=2,threads=2 \ -usbdevice tablet \ -vnc :1 \ -rtc clock=host,base=localtime \ -daemonize \ -cdrom $HOME/Backups/Win10_1809Oct_English_x64.iso \ -drive file=$HOME/VMs/Windows_C.img,format=raw,index=0,media=disk |
Linux 5.0.0-rc6+ fixed my lockup when using USB-C video
I had a really vexing problem with my XPS 13 9370. When I used it with an Apple USB-C to HDMI dongle or a Dell X5 dock (which has HDMI, Ethernet and some other devices), it would randomly lock-up. It wasn’t a hard lock-up (just video I think) as I could ssh to it over the network and do an orderly shutdown, though, I could not kill Xorg.
I headed over to GitHub and cloned the latest Linux 5 source, configured (with the help of /boot/config-4.15.0-1033-oem), built (takes about 15-20 minutes), and installed (you have to compress the initrd,img initially).
It’s fixed, with no side effects (for me)!
I am not a Dell fanboy. …and ordering this thing (w/ Ubuntu pre-installed) was unpleasant. …and I have no illusions of support (from India). …but it continues to be the best laptop I’ve ever owned.
In comparison to my spouse’s Mac Book, yes, it’s a little bulkier, but it’s got 3 USB-C (yes, they will all charge) ports, about the same battery life, and lacks Apple’s dodgy keyboard.
make -j8
make -j8 modules
make modules_install
mkinitramfs -c xz -o initrd.img-5.0.0-rc8+ 5.0.0-rc8+
update-grub
Installing Lattice Diamond on Ubuntu 18.04
Use Alien to convert the rpm to a Debian package:
1 |
alien --scripts diamond_3_10-base_x64-111-2-x86_64-linux.rpm <br>diamond-3-10-base-x64_3.10-112_amd64.deb generated<br><br> |
Use dpkg to install the resulting deb package:
1 |
root@xps13:~# dpkg -i diamond-3-10-base-x64_3.10-112_amd64.deb <br>Selecting previously unselected package diamond-3-10-base-x64.<br>(Reading database … 232711 files and directories currently installed.)<br>Preparing to unpack diamond-3-10-base-x64_3.10-112_amd64.deb …<br>Checking configuration of machine xps13…<br>Installing Diamond 3.10 Base…<br>Unpacking diamond-3-10-base-x64 (3.10-112) …<br>Setting up diamond-3-10-base-x64 (3.10-112) …<br>Extracting compressed data files…<br> |
Use alien to convert the service pack(s) to Debian Packages, if you see things like “bad interpreter” then you may need to install things like csh, here is an example below:
1 |
alien --scripts diamond_3_10-sp3_x64-144-3-x86_64-linux.rpm<br>diamond-3-10-sp3-x64_3.10-145_amd64.deb generated<br><br>root@xps13:~# dpkg -i diamond-3-10-sp3-x64_3.10-145_amd64.deb<br>Selecting previously unselected package diamond-3-10-sp3-x64.<br>(Reading database … 239294 files and directories currently installed.)<br>Preparing to unpack diamond-3-10-sp3-x64_3.10-145_amd64.deb …<br>Installing Diamond 3.10 SP 3…<br>Unpacking diamond-3-10-sp3-x64 (3.10-145) …<br>Setting up diamond-3-10-sp3-x64 (3.10-145) …<br>/var/lib/dpkg/info/diamond-3-10-sp3-x64.postinst: /usr/local/diamond/3.10_x64/sp/cp_pack: /bin/csh: bad interpreter: No such file or directory<br>Processing triggers for libc-bin (2.27-3ubuntu1) … |
fail. …so install csh and try again:
1 |
root@xps13:~# apt install csh<br>Reading package lists… Done<br>Building dependency tree <br>Reading state information… Done<br>The following NEW packages will be installed:<br>csh<br>0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<br>Need to get 243 kB of archives.<br>After this operation, 358 kB of additional disk space will be used.<br>Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 csh amd64 20110502-3 [243 kB]<br>Fetched 243 kB in 1s (405 kB/s)<br>Selecting previously unselected package csh.<br>(Reading database … 248012 files and directories currently installed.)<br>Preparing to unpack …/csh_20110502-3_amd64.deb …<br>Unpacking csh (20110502-3) …<br>Processing triggers for man-db (2.8.3-2ubuntu0.1) …<br>Setting up csh (20110502-3) …<br>update-alternatives: using /bin/bsd-csh to provide /bin/csh (csh) in auto mode<br><br><br>root@xps13:~# dpkg -i diamond-3-10-sp3-x64_3.10-145_amd64.deb <br>(Reading database … 248021 files and directories currently installed.)<br>Preparing to unpack diamond-3-10-sp3-x64_3.10-145_amd64.deb …<br>Uninstalling Diamond 3.10 SP 3…<br>Installing Diamond 3.10 SP 3…<br>Unpacking diamond-3-10-sp3-x64 (3.10-145) over (3.10-145) …<br>Setting up diamond-3-10-sp3-x64 (3.10-145) …<br>Processing triggers for libc-bin (2.27-3ubuntu1) … |
That did it for me, look in /usr/local/diamond. Enjoy! Personally I hate IDEs so I tend to use vi for all but trivial editing sessions but it works.