Skip to main content

45 posts tagged with "linux"

View All Tags

· 2 min read
Hreniuc Cristian-Alexandru

Initial packages

apt-get install gcc g++ make cmake gedit network-manager-gnome tmux gedit-plugins

Remove wicd package, because it doesn\'t detect the wi-fi networks automatically. That\'s why i installed network-manager-gnome package.

apt-get remove wicd
apt-get autoremove

Fix wifi driver issue on Debian 9

The error i was getting was: firmware: failed to load iwlwifi-8000C-23.ucode (-2)I was able to fix it using an answer on stackoverflowThose were the steps i had to follow: 1. Add non-free and contrib components to /etc/apt/sources.list

deb http://ftp.ro.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.ro.debian.org/debian/ stretch main contrib non-free

Run

sudo apt-get update
apt-get install firmware-iwlwifi

Reboot

Fix TPM error

Error con*tent : tpm tpm0: A TMP error occurred attempting to read a pcr value*Fix: Disable TPM from BIOS. > Trusted Platform Module (TPM) is an international standard for a secure cryptoprocessor, which is a dedicated microprocessor designed to secure hardware by integrating cryptographic keys into devices. In practice a TPM can be used for various different security applications such as secure boot and key storage. TPM is naturally supported only on devices that have TPM hardware support. If your hardware has TPM support but it is not showing up, it might need to be enabled in the BIOS settings.

· One min read
Hreniuc Cristian-Alexandru

The xml config file isn’t closed correctly and the parsing of the parameters doesn’t work. There is a method around it:

  • Edit the file: /home/user/.config/bless/preferences.xml

    <preferences>
    <pref name="ByteBuffer.TempDir">/tmp</pref> <!-- add this -->
    ...
    <pref name="Default.Layout.File"/>
    </preferences> <!-- Add this -->

    And make that file readonly, this way it won't get modified each time you restart bless.

Note: You won't be able to modify the preferences from the bless editor, you will have to edit the config file by yourself.

Another method is to rebuild Bless, applying a patch: https://bugs.launchpad.net/ubuntu/+source/bless/+bug/1622951

· One min read
Hreniuc Cristian-Alexandru

I used fcrackzip.

$ fcrackzip -D -p pass.txt -u file.zip

-D - dictionary mode, In this mode, fcrackzip will read passwords from a file, which must contain one password per line and should be alphabetically sorted (e.g. using sort(1)).

-p - Set initial (starting) password for brute-force searching to string, or use the file with the name string to supply passwords for dictionary searching.

pass.txt - file containing all passwords

-u - Try to decompress the first file by calling unzip with the guessed password. This weeds out false positives when not enough files have been given.

file.zip - the zip file on which you want to crack the password

· 3 min read
Hreniuc Cristian-Alexandru

This is a tutorial on how you can split a screen in multiple screens on linux. I needed this because i got an ultrawide monitor.

For this we will use: fakexrandr.

We will begin by cloning the project: git clone https://github.com/phillipberndt/fakexrandr.git

Then we will only have to install it using :

make
make install

Note: If we get an error like: "Unable to locate package pkg-config" You will have to install pkg-config:

apt-get install pkg-config

You will also need to install :

apt-get install libxrandr-dev

You might get an error: libXrandr.c:18:37: fatal error: X11/extensions/Xinerama.h: No such file or directory

apt-get install libx11-dev libxinerama-dev

Now all you have to do is to run :

fakexrandr-manage gui

Note: To use the graphical interface you will have to install pygobject:

apt install python-gi
# or
apt install python-gi-dev

After all these steps i got the same problem as this user here but i managed to do it via CLI. Below you can see how i did it.

phillipberndt explains it very clearly in his response:

Hm, simply run fakexrandr-manage.py show-available, copy the output, and replace SPLITS="N" with SPLITS="whatever", where for whatever you subsitute your splits. From the command's output:

It starts by one of the letters H, V or N, describing the
kind of split. H means horizontal, V vertical and N no split. Separated by a
space follows the pixel position of the split. Again separated by a space
follow the two sub-configurations of the left/right or top/bottom halves. Any
additional white-space besides a single space is optional any only serves
better readibility. dump-config indents sub-configurations to this end.
If SPLITS equals N, a configuration is discarded upon saving it.

That is, to have one split (step 1 in the screencast above), insert e.g. V 840 N N to split at 840px, to have the right half split further horizontally (as in step 2), insert V 840 N H 630 N N to split at 630px. This becomes more clear if you insert more whitespace:
```
V # Split vertically
840 # at 840px
N # Do not split the left half further
H # Split the right half horizontally
630 # At 630px
N # Do not split the top half further
N # Do not split the lower half further
```

Let's say you want to split the monitor in two, horizontally. Initially fakexrandr-manage show-available will give you the output:

NAME="HDMI-A-0" # output name
EDID=00ffffffffffff001e6d # a long hex string
WIDTH=2560
HEIGHT=1080
SPLITS="N"

Copy all that output and change only the SPLITS field to : SPLITS="V 1280 N N" . This will split your monitor horizontally in two equal screens(if your resolution is 2560) .(Those two "N N" mean that you don't want to split those two halves that resulted from the first split) Put everything into a file file_with_config, after that run fakexrandr-manage set-config < file_with_config

To see if the config is being used run: fakexrandr-manage dump-config this will output the current config that is being used.

To make it work you have to restart the desktop manager or reboot. All those things were tested on Lubuntu 17.04 and it worked.

· One min read
Hreniuc Cristian-Alexandru

Connect to server:

sftp -P [port no] user@dns_or_ip

Commands for the remote server:

pwd #print remote working directory
cd #open remote directory
ls #list remote files

Commands for the remote server(add a 'l' before each command):

lpwd # Print local working directory
lcd # Open local directory
lls # List local files

Transfer remote file to local:

get remote_file 
# Rename the file that you want to get from remote
get remote_file new_name
# Get a directory(recursive)
get -r remote_directory
# Keep the same permissions to the files
get -Pr remote_directory

Send file from local to remote(Same as before, use 'put' instead of 'get'):

put local_file 
# Rename the file that you want to get from local
put local_file new_name
# Get a directory(recursive)
put -r remote_directory
# Keep the same permissions to the files
put -Pr remote_directory

Exit:

exit