Skip to main content

11 posts tagged with "debian"

View All Tags

· One min read
Hreniuc Cristian-Alexandru

Source

If you need to connect remote to a PC and download something via torrent you need to do these steps:

Install transmission-daemon:

apt-get install transmission-daemon

This will install and start the service: transmission-daemon.

If you want to check it's status you can run:

systemctl status transmission-daemon

This will start a service and a web interface to acces the torrent client. This client will be at: ip:9091/transmission.

If you open that url, it will ask a user and password, by default these are:transmission:transmission.

If you want to change something, ex: the username, password, port; you can edit the settings file: /etc/transmission-daemon/settings.json. But before stop the deamon:

systemctl stop transmission-daemon
# After edit, start the daemon
systemctl start transmission-daemon

By default the download_dir is set to /var/lib/transmission-daemon/downloads you can change it to any value.

For username and password for the web interface: rpc-username and rpc-password(put it in plain, it will be hashed automatically after daemon starts).

If you want to access this interface from remote, you can do a tunnel via ssh:

ssh -L 127.0.0.1:9091:127.0.0.1:9091 user@pc

· 3 min read
Hreniuc Cristian-Alexandru

Ever encountered this type of error when you were trying to install Linux on your Laptop?

Some of your hardware needs non-free firmware files to operate.  The firmware can be loaded from
removable media, such as a USB stick or floppy.

The missing firmware files are: iwlwifi-6000g2a-6.ucode iwlwifi-6000g2a-5.ucode

If you have such media available now, insert it, and continue.

Here's how to fix it, based on steps from this guy.

If you fot to this ponit in the installation process, do not close the installation.

Get another usb stick and format it using FAT.

Plug in the usb

If you already have a usb that is formated as FAT(it doesn't need to be empty), skip the next two steps.

Get the usb device:
fdisk -l
# Output
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SanDisk SD8SBAT1
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: 0x995ebae8

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 250068991 250066944 119.2G 83 Linux


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-75W
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 08BAF1CD-519D-4758-8BFE-6B50CBBC078D

Device Start End Sectors Size Type
/dev/sdb1 1922275328 1953523711 31248384 14.9G Linux swap
/dev/sdb2 2048 1922275327 1922273280 916.6G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sdc: 29.3 GiB, 31457280000 bytes, 61440000 sectors
Disk model: ProductCode
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: 0x263d4ee4

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 61439999 61437952 29.3G 83 Linux
Delete all partitions and create a new FAT one:
fdisk /dev/sdc

# Press 'd' untill you deleted all partitions.

# Press 'w' to write the changes.

fdisk /dev/sdc
# Press 'n' to create a new partition

# Press 'w' to write the changes.

# Format it as FAT:

mkfs.fat /dev/sdc1
Download the drivers and copy them on the drive:

Go to https://packages.debian.org/buster/firmware-iwlwifi and download the deb file.

Extract it's content:

mkdir wifi
dpkg-deb --extract firmware-iwlwifi_20190114-1_all.deb wifi

Copy files to usb:

cp -r wifi/lib/firmware /mnt/usb_stick
Plugin the usb stick in the laptop that you are installing Debian and mount it:
  • Plugin the USB stick.

  • Press <CTRL>+<Alt>+<F2> key combination, to switch to the second virtual terminal.

  • Run the blkid command, to find out under which device name the USB stick was known: /dev/sdc. Its FAT filesystem, which contained the firmware files, then, was /dev/sdc1.

  • Mount the usb stick:

    cd /mnt
    mkdir mount_usb
    mount /dev/sdc1 /mnt/mount_usb
  • Create a symbolic link to the firmware folder from the usb stick in /lib/firmware:

    ln -s /mnt/mount_usb/firmware /lib/firmware
  • Press <CTRL>+<Alt>+<F5> to continue the installation process.

Everything should work out of the box now.

· 2 min read
Hreniuc Cristian-Alexandru

Here is the source.

Activate WOL in bios:

First, reboot the remote server and go to BIOS > Power Management > “Wake On LAN”. Turn it on. Next, save and close the bios.

Install ethtool:

apt-get install ethtool

Enable:

ethtool -s enp9s0 wol g
# ethtool -s <interface> wol g

Check if enabled:

ethtool enp9s0
# ethtool <interface>
# Output:

Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes

The most important thins is to check these two lines(g should be present):

Supports Wake-on: pumbg
Wake-on: g

You should also make it run at boot-up. Add this is /etc/rc.local:

#!/bin/bash

ethtool -s enp9s0 wol g

exit 0

Then make that file executable:

chmod +x /etc/rc.local

Reboot and check if you get Wake-on: g.

To access it from Internet, add a port forwarding in your router settings, to port 9 (UDP) on your PC.

Example if my PC has the ip 192.168.2.101 and the external port(from the router is 999) it will look like this:

public_ip:999 UDP -> 192.168.2.101:9 UDP.


Turn your pc from linux pc:

apt-get install wakeonlan
wakeonlan -i IP -p PORT MAC

From android.

· One min read
Hreniuc Cristian-Alexandru

This will add a keybinding (Alt+Shift) to switch the keyboard layout between us are ro.

Run:

echo 'Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbLayout" "us, ro(std)"
Option "XkbOptions" "grp:alt_shift_toggle, grp_led:scroll"
EndSection' >> /etc/X11/xorg.conf.d/10-keyboard.conf

Reboot or restart xserver.

Works on every distribution. First check if /etc/X11/xorg.conf.d/10-keyboard.conf does exits, if it exists write to another file: eg: /etc/X11/xorg.conf.d/20-keyboard.conf.

On Debian with lxde, the path for xorg.conf.d is /usr/share/X11/xorg.conf.d.

Press Alt+Shift to switch between us and ro.

If you want other key, for ex: win : Option "XkbOptions" "grp:win_shift_toggle, grp_led:scroll".

· One min read
Hreniuc Cristian-Alexandru

LE: 14th Sept 2022 - Use regolith-linux instead or use Ubuntu and use the default keybindings that support some tilling.

  1. First step, you have to install i3``apt-get install i32. Go to LXpanel menu > Preferences > Default application for LXSession then go to tab Core applications and set to Window Manager: i33. Edit the autostart script by adding --desktop-off in the file ~/.config/lxsession/LXDE/autostart to the pcmanfm command, it should look like this after you edit it: @pcmanfm --desktop --profile LXDE. If the dmenu doesn\'t find your local binaries(the folders you added to the $PATH) you should create a ~/.xsessionrc and export the $PATH env variable there:
#!/bin/bash
# Content of ~/.xsessionrc


export PATH=${PATH}:${HOME}/.local/bin

Note: On archlinux + lxde I added that export in .xinitrc I was having some problems with lxpanel, it was taking too much resources so a I deactivated. I commented the line @lxpanel --profile LXDE from file ~/.config/lxsession/LXDE/autostart. #### Debian + xfce: I followed these steps: https://feeblenerd.blogspot.com/2015/11/pretty-i3-with-xfce.html bash apt-get install i3 Deactivated xfwm4 and xfdesktop from : \'Session and Startup\' -> \'Session\' tab.. Added i3 in \'Application Autostart\' tab. Removed all keybindings. Reboot.

· One min read
Hreniuc Cristian-Alexandru

LE: 14th Sept 2022 - Ubuntu 20.04 supports most of these out of the box now, with other keybinings.

Add these in :~/.config/openbox/lxde-rc.xml or ~/.config/openbox/lubuntu-rc.xml :

<!-- Keybindings for window tiling -->

<keybind key=C-W-Up> # FullScreen
<action name=Maximize/>
</keybind>
<keybind key=C-W-Down> # MiddleScreen
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>center</x><y>center</y><width>50%</width><height>50%</height></action>
</keybind>

<keybind key=C-W-Left> # HalfLeftScreen
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
</keybind>
<keybind key=C-W-Right> # HalfRightScreen
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
</keybind>

<keybind key=C-W-1> # UpperQuarterLeft
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>0</x><y>0</y><height>50%</height><width>50%</width></action>
</keybind>

<keybind key=C-W-2> # LowerQuarterLeft
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>0</x><y>-0</y><height>50%</height><width>50%</width></action>
</keybind>

<keybind key=C-W-3> # LowerQuarterRight
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>-0</x><y>-0</y><height>50%</height><width>50%</width></action>
</keybind>

<keybind key=C-W-4> # UpperQuarterRight
<action name=UnmaximizeFull/>
<action name=MoveResizeTo><x>-0</x><y>0</y><height>50%</height><width>50%</width></action>
</keybind>

Add those inside <keyboard></keyboard>tags. Then run: openbox --reconfigureAdding a shortcut in lxde