Saturday, December 28, 2019

centos minimal

install centos 8 minimal

install google-chrome from google repo, which should install all the X dependencies

additional language support for web page display
> yum groupinstall Fonts

To start chrome full screen
> X& DISPLAY=:0 google-chrome --window-size=1920,1080&

if sound is not already working,
> yum install alsa-utils
unmute everything with
> alsamixer
https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Disabling_auto_mute_on_startup



Wednesday, March 6, 2019

Monday, February 18, 2019

running graphical applications without desktop env


  1. install linux w/ desktop environment
  2. start run level 3
  3. $ X &
  4. $ DISPLAY=:0 google-chrome
  5. "You can switch from the X server and the framebuffer by using CTRL+ALT+F1 and CTRL+ALT+F7"

https://superuser.com/questions/407043/is-it-possible-to-run-graphical-applications-such-as-firefox-without-installing

Tuesday, January 1, 2019

save / print pdf without margin

Why?
pdf, including ones at research site ssrn, in general have huge margin.  when you wanna print 2 pages per sheet, the text become smaller with a lot of unnecessary white space for the margin

What do you need?
pdfcrop, which is available at ubuntu, but not centos7 afaik at the time of writing

How?
pdfcrop -h
pdfcrop <input.pdf> <output.pdf>

Appendix:
What if you don't have ubuntu?
if you have centos7 running on virtualbox with windows host, here's what I did:

  1. download ubuntu 18 desktop installation iso
  2. Virtualbox, existing vm, storage, optical drive
    1. select the downloaded iso
    2. check Live CD/DVD box
  3. start VM
  4. choose "Try ubuntu" after it boots from disc
  5. Follow https://askubuntu.com/questions/378558/unable-to-locate-package-while-trying-to-install-packages-with-apt to update package download source
  6. Open a terminal in ubuntu
    1. sudo apt-get install texlive-extra-utils
    2. pdfcrop <input.pdf> <output.pdf>
  7. ubuntu map windows host's shared drive
    1. netstat -nr to see window host's ip address from ubuntu
    2. ubuntu "Files" app, which has a folder icon
    3. connect to Server by entering smb://<windows ip>
  8. drag and drop <output.pdf> to shared folder