Czerwiec « 2019 « Różności …

Różności …

25 czerwca 2019

ionic inn-app-browser ERR_CLEARTEXT_NOT_PERMITTED

Zaszufladkowany do: Android — Jacek @ 16:19

To solve the problem there’s other option. in file resources/android/xml/network_security_config.xml. insert:

<network-security-config>
   <base-config cleartextTrafficPermitted="true">
       <trust-anchors>
           <certificates src="system" />
       </trust-anchors>
   </base-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain>localhost</domain>
        <domain includeSubdomains="true">192.168.7.213:8733</domain>
    </domain-config>
</network-security-config>

https://stackoverflow.com/questions/54752716/why-am-i-seeing-neterr-cleartext-not-permitted-errors-after-upgrading-to-cordo

Open the android manifest file (android/app/src/main/AndroidManifest.xml) and add
android:usesCleartextTraffic="true"

to the application tag

<application
        android:name="io.flutter.app.FlutterApplication"
        android:label="tangerine_ui"
        android:icon="@mipmap/ic_launcher"
        android:usesCleartextTraffic="true">

https://github.com/flutter/flutter/issues/30368

----------------------

config.xml:

<platform name=”android”>
<edit-config file=”app/src/main/AndroidManifest.xml” mode=”merge” target=”/manifest/application” xmlns:android=”http://schemas.android.com/apk/res/android”>
<application android:networkSecurityConfig=”@xml/network_security_config” android:usesCleartextTraffic=”true” />
</edit-config>

19 czerwca 2019

Maximize and unmaximize a window

Zaszufladkowany do: Bez kategorii — Jacek @ 09:33

You can maximize a window to take up all of the space on your desktop and unmaximize a window to restore it to its normal size. You can also maximize windows vertically along the left and right sides of the screen, so you can easily look at two windows at once. See Tile windows for details.

To maximize a window, grab the titlebar and drag it to the top of the screen, or just double-click the titlebar. To maximize a window using the keyboard, hold down the Super key and press , or press Alt+F10.

To restore a window to its unmaximized size, drag it away from the edges of the screen. If the window is fully maximized, you can double-click the titlebar to restore it. You can also use the same keyboard shortcuts you used to maximize the window.

https://help.ubuntu.com/stable/ubuntu-help/shell-windows-maximize.html.en

Keyboard shortcut for launching application from dock in Ubuntu 18

Zaszufladkowany do: Bez kategorii — Jacek @ 09:30
https://askubuntu.com/questions/1082772/keyboard-shortcut-for-launching-application-from-dock-in-ubuntu-18

Simply press and hold Super+Q. You should see numbers appearing next to the application icons. Then release Q and press the number associated to your target application to launch it.

You can alternatively press Super+number directly to launch the application without pressing Super+Q first.

Notes:

  1. If pressing Super+Q fails to show the numbers, run the following command first.
    gsettings set org.gnome.shell.extensions.dash-to-dock hot-keys false
    
  2. This shortcut only works with the keyboard’s top row number keys, not those of the numpad. You can install a GNOME shell extension called AppKeys to make it work with the numpad too.

Ubuntu 18 workspaces shortcuts

Zaszufladkowany do: Bez kategorii — Jacek @ 09:25

The only way I have found to modify the keyboard shortcuts for workspaces 5 and up in GNOME Flashback, is through a shell using the dconf command.

$ dconf read /org/gnome/desktop/wm/keybindings/switch-to-workspace-1
['<Primary>F1']

Here I read the shortcut setting for the first workspace, to get an idea about the syntax to use when setting values for the missing shortcuts. I’m using CTRLF1 myself.

To add shortcuts for the remaining workspaces, just modify the value returned above to match the workspace number, and use dconfto apply them:

$ dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-5 "['<Primary>F5']"
$ dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-6 "['<Primary>F6']"

https://askubuntu.com/questions/332264/13-04-more-than-four-workspace-shortcuts-in-gnome-flashback-no-effects


	

17 czerwca 2019

mount crypto_luks

Zaszufladkowany do: Bez kategorii — Jacek @ 15:59

https://evilshit.wordpress.com/2012/10/29/how-to-mount-luks-encrypted-partitions-manually/

blkid | grep crypto
cryptsetup luksOpen /dev/sda2/ crypthome
mkdir /mnt/crypthome && mount /dev/mapper/crypthome /mnt/crypthome
unknown lvm2_member
https://www.svennd.be/mount-unknown-filesystem-type-lvm2_member/
lvmdiskscan
lvscan
You used the exact same name (ubuntu-vg) for your new volume group as the old volume group. You must give them unique names. You can rename one of the groups using vgrename and its UUID.

Find the UUID with vgdisplay and then rename the volume group:
vgrename <VG UUID> new_name


  • root@svennd:~# fdisk -l /dev/sdd
  • Disk /dev/sdd: 233.8 GiB, 251000193024 bytes, 490234752 sectors
  • Units: sectors of 1 * 512 = 512 bytes
  • Sector size (logical/physical): 512 bytes / 512 bytes
  • I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Disklabel type: dos
  • Disk identifier: 0x0009345d
  • Device Boot Start End Sectors Size Id Type
  • /dev/sdd1 * 63 208844 208782 102M 83 Linux
  • /dev/sdd2 208845 488247479 488038635 232.7G 8e Linux LVM
(/dev/sdi1 is /boot partition, /dev/sdi2 is where the /home data resides) Seems lvm2 tools also provide a way to check if it is lvm or not, using lvmdiskscan (/dev/sdd2 here)
  • root@svennd:~# lvmdiskscan
  • /dev/sdb1 [ 1.82 TiB]
  • /dev/sdc2 [ 149.04 GiB]
  • /dev/sdd1 [ 101.94 MiB]
  • /dev/sdd2 [ 232.71 GiB] LVM physical volume
  • 0 disks
  • 4 partitions
  • 0 LVM physical volume whole disks
  • 1 LVM physical volume
Fine, now let’s scan what lv’s are to be found using lvscan
  • root@svennd:~# lvscan
  • inactive '/dev/VolGroup00/LogVol00' [230.75 GiB] inherit
  • inactive '/dev/VolGroup00/LogVol01' [1.94 GiB] inherit
Since this is an old disk in an enclosure, it is not activated on system boot. So we need to “activate” this lvm volume.
  • root@svennd:~# vgchange -ay
  • 2 logical volume(s) in volume group "VolGroup00" now active
and bam, ready to mount :
  • root@svennd:~# lvscan
  • ACTIVE '/dev/VolGroup00/LogVol00' [230.75 GiB] inherit
  • ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GiB] inherit
now to mount :
  • mount /dev/VolGroup00/LogVol00 /mnt/disk
success !

Strona startowa: www.jaceksen.pl