Posts

command line - getting the desirable output with gawk/awk - Ask Ubuntu

i run following command: aws ec2 describe-instances --filters "name=ip-address,values=my_ip" | grep instanceid and get: "instanceid": "i-b0f13081", how can following: i-b0f13081 this tried: aws ec2 describe-instances --filters "name=ip-address,values=my_ip" | grep instanceid | gawk -f: '{ print $2 }' "i-b0f13081", awk : set " field delimiter, , 4th field: % awk -f'"' '{print $4}' <<<'"instanceid": "i-b0f13081",' i-b0f13081 similarly cut : % cut -d'"' -f4 <<<'"instanceid": "i-b0f13081",' i-b0f13081 grep pcre ( -p ): % grep -po ':\s*"\k[^"]+' <<<'"instanceid": "i-b0f13081",' i-b0f13081 shell parameter expansion: % var='"instanceid": "i-b0f13081",' % var="${var%\"*}" % ...

Strange Nautilus view in Ubuntu 16.10 - Ask Ubuntu

Image
why different windows of nautilus when running root (launched sudo) , usual user? question title bars. root user: usual user: ps: used arc theme. there same behavior other themes. elevated privileges.grants ability eject system volumes also profile settings in /root

wine - Running wineConsole err:wineconsole:WCUSER_SetFont wrong fon - Ask Ubuntu

i trying use program apophysis , having trouble. installed , ran program wine , worked great. after setting parameters program generates data file , bat file when run renders data file image. unfortunately when run wineconsole render.bat following error. err:wineconsole:wcuser_setfont wrong font err:wineconsole:wcuser_setfont wrong font i have discovered error has nothing apophysis or particular bat file when run wineconsole "" same error additional information. err:wineconsole:wcuser_setfont wrong font err:wineconsole:wcuser_setfont wrong font wineconsole: starting program "\"\"" failed. command invalid. i found 1 answer here unfortunatly setting $lang didn't change of results. appreciated. there several options try fix errors wineconsole.exe here documentation https://www.winehq.org/docs/wineusr-guide/cui-programs have tried running batch file via wine wine render.bat or user backend instead of console backend wine -...

apt - Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources 404 Not Found [IP: 91.189.91.26 80] - Ask Ubuntu

i using ubuntu 16.04 lts. morning when ran sudo apt-get update , encountered following error: w: repository 'http://us.archive.ubuntu.com/ubuntu lucid release' not have release file. n: data such repository can't authenticated , therefore potentially dangerous use. n: see apt-secure(8) manpage repository creation , user configuration details. e: failed fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/sources 404 not found [ip: 91.189.91.26 80] e: index files failed download. have been ignored, or old ones used instead. i've checked internet answer. although did find few similar posts, none of solution works me. 1 of interesting solution tried was: the simplest solution following 2 steps: 1- backup sources list -> sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup 2- open sources file "/etc/apt/sources.list" rename instances of us.archive or archive in http://us.archive.ubuntu.com/ubuntu/ to http://old-releases.ubu...

xorg - Ubuntu 16.04 - Dark patch on monitor (disappears on reboot) - Ask Ubuntu

Image
this has been happening while. afaicr, didn't happen before upgraded 14.04 16.04. i using computer while, , i'll notice dark patch stays in same location on screen. lloks 'burnt' patch on crt monitor. the way can rid of reboot computer. the location of dark patch in different location, , has different size, each time appears. rectangle. i have never noticed window of same size , in same location. i attach screenshot - didn't know until looked @ screenshot whether dark patch appear on screenshot. dark patch in screenshot appears superimposed on text below search text entry field. while fiddling around switching between windows while getting , looking @ screenshot, , entering text here @ askubuntu, noticed dark patch no longer there, , didn't have reboot. on further reflection, , due did, think might happening when shift-prtscr screenshot of something, , navigate window (eg. having used copy clipboard in order paste screenshot applica...

boot - Ubuntu installer gets stuck with flashing screen - Ask Ubuntu

Image
i'm using qemu setup ubuntu 16.04 server vm. i cannot done because somewhere @ beginning of install process, screen starts flashing , there nothing more can do. no matter how long wait, it's stuck (i waited 30 minutes). here screencast of issue (this in rescue mode, same in install mode): what happening, , how can fix it? i switched ubuntu instead of debian on vm host have more recent qemu/kvm/virt-manager , doesn't seem problem anymore. not sure happened.

apache2 - VirtualHost redirect https://www.example.com to https://example.com not working - Ask Ubuntu

i'm running several different virtual hosts on apache2. each has own .conf file. i'm trying redirect traffic https://example.com have certificates. https://example.com , http://example.com , , http://www.example.com work fine. however, https://www.example.com not working correctly. here .conf layout: <virtualhost *:443> servername example.com ... (server/ssl configuration) </virtualhost> <virtualhost *:443> servername www.example.com redirect permanent / https://example.com/ </virtualhost> <virtualhost *:80> servername example.com redirect permanent / https://example.com/ </virtualhost> <virtualhost *:80> servername www.example.com redirect permanent / https://example.com/ </virtualhost> what missing? i think it's not possible, if don't have correct certificate https://www.example.com . in (ssl) process of client-server handshake, establishment of secure connection first step. if have certificate h...