Skip Navigation
Posts
23
Comments
23
Joined
1 yr. ago
Linux @lemmy.ml
SpongeB0B @programming.dev

Remote Desktop over SSH ?

Hi,

I'm using the LITE version of Raspberry PI OS. ( so without desktop environment and other stuff, but unfortunately not systemd free... )

When I use this raspberry locally I don't need a desktop, but remotely I might...

I've found an interesting link:
\ https://www.xmodulo.com/remote-control-raspberry-pi.html
\    see Method Three: X11 Forwarding for Desktop over SSH

I see that xinit is not installed by default with LITE ( and it make sense ) so do you think if I install it, and follow the rest of instruction it will work ?

If I understand well the mechanism I do not need to install a desktop environment on the server ( the rpi ) but only on the client right ?

Or do you know a better way do achieve this ?

  • SOLVED

    The following works !

    I guess one of my others rules was blocking

     nft
        
    table ip Tip {
            chain prerouting {
                    type nat hook prerouting priority -100; policy accept;
                    ip daddr 192.168.y.2 log prefix "forwarded " dnat to 192.168.y.3
            }
            chain postrouting {
                    type nat hook postrouting priority 100; policy accept;
                    masquerade
            }
            chain INPUT {
                    type filter hook input priority filter; policy accept;
            }
            chain FORWARD {
                    type filter hook forward priority filter; policy accept;
            }
            chain OUTPUT {
                    type filter hook output priority filter; policy accept;
            }
    }
    
      
  • Hi, Thank to all of you.

    I made a test environment with the following.

    • Machine A: 192.168.Y.1
    • Machine B: 192.168.Y.2
    • Machine C: 192.168.Y.3

    The goal is to send a ping A to B, B forward to C

    So ping -4c 1 192.168.y.2 from A, should ping B fw C

    I've set the following rule in /etc/nftables.conf

     nft
        
    table ip Tip {
            chain prerouting {
                    type nat hook prerouting priority dstnat; policy accept;
                    iif "eth0" ip protocol icmp dnat to 192.168.y.3
            }
            chain postrouting {
                    type nat hook postrouting priority 100; policy accept;
                    ip saddr 192.168.y.3 masquerade
            }
    }
    
    
      

    but is not working :'(

    I see B receive the package

     undefined
        
    preroute: IN=eth0 OUT= MAC=▒▒ SRC=192.168.y.1 DST=192.168.y.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=21398 DF PROTO=ICMP TYPE=8 CODE=0 ID=17950 SEQ=1
    
    
      

    but it seem C receive nothing..

    Any ideas ?

  • networking @sh.itjust.works
    SpongeB0B @programming.dev

    Forward packets Wireguard to local subnet, with Nftables.

    cross-posted from: https://programming.dev/post/24356655

    Hi,

    I would like to forward packets that come from a wireguard connection to a local subnet

    environment
    • Client: connected to server trough wireguard IP 192.168.X.2
    • server: connected to Client trough wireguard IP 192.168.X.1 and 192.168.Y.1 ( it's not systemd free ¯(ツ)/¯  )
    • aMachine: on the same subnet as server IP 192.168.Y.2

       

    on the server I've done

     bash
        
    #I don't know if this is necessary ?
    echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
    sysctl --system
    
      

    I've added the following rule to my nftables config but it seem the packet get lost ?

     nft
        
    #added inside existing table `table ip Tip {}`
    chain chPreRoute {
    type nat hook prerouting priority 0; policy accept;
    iif wg0 icmp type echo-request dnat to 192.168.Y.2
    }
    
      
    Linux @lemmy.ml
    SpongeB0B @programming.dev

    Forward packets Wireguard to local subnet, with Nftables.

    Hi,

    I would like to forward packets that come from a wireguard connection to a local subnet

    environment
    • Client: connected to server trough wireguard IP 192.168.X.2
    • server: connected to Client trough wireguard IP 192.168.X.1 and 192.168.Y.1 ( it's not systemd free ¯(ツ)/¯  )
    • aMachine: on the same subnet as server IP 192.168.Y.2

       

    on the server I've done

     bash
        
    #I don't know if this is necessary ?
    echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
    sysctl --system
    
      

    I've added the following rule to the nftables config on server but it seem the packet get lost ?

     nft
        
    #added inside existing table `table ip Tip {}`
    chain chPreRoute {
    type nat hook prerouting priority 0; policy accept;
    iif wg0 icmp type echo-request dnat to 192.168.Y.2
    }
    
      
    Linux @lemmy.ml
    SpongeB0B @programming.dev

    Use arguments in shell script with apt

    Hi,

    I would like to pass the arguments to apt trough a .sh script.

     bash
        
    apt install "${1}/opensnitch_${1}_amd64.deb" "${1}/python3-opensnitch-ui_${1}_all.deb"
    
      

    so for example if I launch test.sh 1.6.5 the script should run apt install 1.6.5/opensnitch_1.6.5_amd64.deb 1.6.5/python3-opensnitch-ui_1.6.5_all.deb

    but it's not wokring it pass to apt only 1.6.5 and not the rest of the string... any ideas ?

  • As I want the system to be quite ( not sending data ) I was suspected the output hook to be the one. what are you suggesting ?

  • Obviously, but I'm anyway wondering why it doesn't blocking like it should
    \ I hope nftables do not let other pass like this...

  • Linux @lemmy.ml
    SpongeB0B @programming.dev

    Why my nftables do not block DHCP ?

    Hi,

    On my Debian 12 Bookworm ( raspberry pi )

    My nftables do not block DHCP packets ! according to this basic rules

    nft -y list rulesset

     nft
        
    table ip Tip {
    
        chain chIN {
            type filter hook input priority 0; policy drop;
            ct state established,related accept
        }
        chain chFW {
            type filter hook forward priority 0; policy drop;
        }
        chain chOUT {
            type filter hook output priority 0; policy drop;
            udp dport 67 drop #DHCP
            udp dport 53 accept
            tcp dport { 80, 443} accept
            ct state established,related accept
        }
    
    }
    
    
      

    DHCP should be blocked... but it's not as I get an IP from it..

    Any ideas ?

    Thanks.

    raspberrypi @lemmy.ml
    SpongeB0B @programming.dev

    problem with mkinitramfs after compiling new kernel :'(

    cross-posted from: https://programming.dev/post/23945016

    Hi,

    I've recompiled my kernel[^moreinfo] of my raspberry pi 4 than run under Devuan rpi


    \ In addi

    Linux @lemmy.ml
    SpongeB0B @programming.dev

    problem with mkinitramfs after compiling new kernel :'(

    Hi,

    I've recompiled my kernel[^moreinfo] of my raspberry pi 4 that run under Devuan rpi


    \ In addition to have enabled some cipher/algorithm in the kernel config I have set a string ( TESTversionA ) in `CO

  • Thank you very much all, for your inputs !

    I've did

     bash
        
    root: file /boot/broadcom/initrd.gz
    initrd.gz: Zstandard compressed data ....
    
    root: unmkinitramfs /boot/broadcom/initrd.gz Extracted/
    # data where extracted to Extracted/
    # but I go few error like:
    # cpio: cannot link usr/sbin/vconfig to usr/sbin/watchdog: Operation not permitted
    
    
      

    So it tend to confirm that even if the file is named initrd.gz it's actually an initramfs method.... ( damn this is so misleading )

    So I guess I can follow preparing-linux from the guide and overwrite the initrd.gz ?

  • Linux @lemmy.ml
    SpongeB0B @programming.dev

    boot on LUKS encrypted drive ( initramfs Vs initrd ) ?

    Hi,

    I'm trying to encrypt the root filesystem / of a raspberry pi 4 device running under Devuan rpi ( custom kernel )

    I'm following LUKS on Raspberry Pi 2021 guide

    That explain step by step how achieve this.

    But the guide use initramfs and my distro seem to use initrd

    So the question, is: should I migrate to initramfs ? and how check whats is inside my current initrd

    or keep-up with initrd but then how insert the necessary to enable LUKS drive to be mounted by it ( initrd ) ?

    Thanks.

  • Thanks @[email protected]

    I suppose the file linux/arch/Kconfig is the base the menuconfig to know which option is available ? right ?

    Thanks.

  • Thanks, how can we verify this ?

  • Linux @lemmy.ml
    SpongeB0B @programming.dev

    I cannot enable HAVE_KPROBES_ON_FTRACE - Kernel compile

    Hi,

    I have a great piece of software, that apparently need HAVE_KPROBES_ON_FTRACE

    To config the kernel option I'm using :

     shell
        
    make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
    
    
      

    The Kernel is Linux/arm64 6.6.63

    When I'm doing a search inside menuconfig i get:

     shell
        
    Symbol: HAVE_KPROBES_ON_FTRACE [=n]
    Type  : bool
    Defined at arch/Kconfig:223
    
    
    Symbol: KPROBES_ON_FTRACE [=n]
    Type  : bool
    Defined at arch/Kconfig:117
     Depends on: KPROBES [=y] && HAVE_KPROBES_ON_FTRACE [=n] && DYNAMIC_FTRACE_WITH_REGS [=n]
    
      

    But I found it no where in the menu... and if I add it mannuly in the .config file, then make some more other adapations in menuconfig my manual entry disappear..

    Any ideas ?

    Maybe HAVE_KPROBES_ON_FTRACE is not supported in 6.6.63 ?

    Thanks

  • I'm using Devuan ( systemd free ! ) :)

  • I believe my initramfs do not support luks encryption, but the link of @[email protected] might work.... 🤞

  • Linux @lemmy.ml
    SpongeB0B @programming.dev

    Boot on LUKS drive ( Rapsberry pi 4 )

    Hi,

    The SBC Raspberry Pi 4 boot on an sdcard with two partition /boot and /

    So I managed to encrypt the partition / with cryptsetup

    Here the partition of my sd-card

    device FILESYS LABEL UUID
    sdb1 vfat BOOT ( 9 characters )
    sdb2 crrypto_LUKS

    <unknow>

    ( 36 characters )

    I've modified the /boot/cmdline.txt

    to ( on one line )

     raw
        
    console=serial0,115200
    console=tty1
    root=UUID=#If I try the UUID of sdb2 it fail and also the UUID when I use `cryptsetup luksOpen /dev/sdb2 b2open`
    rootfstype=ext4
    fsck.repair=yes
    loglevel=5
    net.ifnames=0
    firmware_class.path=/lib/firmware/updates/brcm
    rootwait
    cryptdevice=UUID=#I dont know which one:b2open
    
      

    any ideas ?

    Thanks.

  • ohh ! great ! I'll see if I manage to install it on Devuan Thanks.

  • 🤩 Woo I didn't know nix. It seem a better way to handle package !!!
    \ But so if I have already apt that handle packages, is it compatible to use both on the same system !?

    Nix stores all packages in isolation from each other; as a result there are no /bin, /sbin, /lib or /usr directories and all packages are kept in /nix/store instead.

  • Yes, but it's not reliable. because even if you use a bare linux vm to download the packages and dependency, you never know if the online will have already a dependence that the offline system do not have.

    no, the only way is to force the dw of the already downloaded package.

  • Thank you very much @[email protected]

    I have tried

     bash
        
    apt-get -o Dir::Cache::archives="/to/path" install --download-only apt-offline
    
    
      

    But it downloaded only the .deb of apt-offline and not all the dependence tree. Most probably because this machine have them already.

    now, remain to force to download also all the dependency tree even if already installed...

  • indeed .appimage are an amazing thing as they do not require any special runtime or installation process !
    \ I guess I will have to do my own .appimage of software that do not provide them

  • Linux @lemmy.ml
    SpongeB0B @programming.dev

    How install a package/program with all the dependencies tree to an offline devices ?

    Hi,

    I have an air gaped[^1] device. ( Devuan )

    How do you manage to install packages/software on off-line[^1] device ?

    I've heard of apt-offline but it seem to bug and I don't know if it's still maintained (last release two years ago)

    of course I've tried manually but the dependencies relations are too crazy to do that fully manually

    ::: spoiler Dependence tree (not complete even) to install for example apt-offline

     raw
        
    ├── Depends
    │   ├── Depends
    │   │   ├── Depends
    │   │   │   ├── Depends
    │   │   │   │   └── python3-dbg_3.9.2-3_amd64.deb
    │   │   │   ├── libcurl4-gnutls-dev_7.74.0-1.3+deb11u14_amd64.deb
    │   │   │   ├── python3-pycurl-dbg_7.43.0.6-5_amd64.deb
    │   │   │   └── python-pycurl-doc_7.43.0.6-5_all.deb
    │   │   ├── python3-httplib2_0.18.1-3_all.deb
    │   │   └── python3-pycurl_7.43.0.6-5_amd64.deb
    │   ├── iso-codes_4.6.0-1_all.d
      
  • Thank you @[email protected] sadly it's hosted on google ... :/ https://issuetracker.google.com

    If I post here on lemmy, me feature request somebody would be kind to submit to google ?

    Thanks.

  • it's related to the GPS fix. So which is it ?

  • Software recommendations @lemmy.world
    SpongeB0B @programming.dev

    Images to animated GIF offline and FLOSS ( Linux )

    cross-posted from: https://programming.dev/post/18448635

    Hi,

    I was a very long time I didn't need to created a animated gif... I had a program before to take a static images (.jpg, .png etc..) and convert then into an animated gif..

    All the web search engine push for online (aka SaaSS) tool 🤮

    Do you know a program that do that ( Linux )

    Thanks.

    Free and Open Source Software @beehaw.org
    SpongeB0B @programming.dev

    Images to animated GIF offline and FLOSS ( Linux )

    Hi,

    I was a very long time I didn't need to created a animated gif... I had a program before to take a static images (.jpg, .png etc..) and convert then into an animated gif..

    All the web search engine push for online (aka SaaSS) tool 🤮

    Do you know a program that do that ( Linux )

    Thanks.

    Frontend Web Development @lemmy.ml
    SpongeB0B @programming.dev

    Create a clip-path animated ?

    cross-posted from: https://programming.dev/post/18448206

    Hi,

    I would like to use a rectangle that move (left to right) to reveal an element / image

    like this

    The white box shall be the image to display

    But I'm already block at my svg animation

     svg
        
    <svg viewBox="0 0 265.135 68.642" xmlns="http://www.w3.org/2000/svg">
    <g x="-55.790085" y="0.79151762">
        <rect
           style="fill:#ffcc00;stroke-width:2.46513;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers;stop-color:#000000"
           width="55.465603"
           height="151.60599"       
           transform="rotate(45)" />
           <animate
          attributeName="x"
          values="-55.790085;265"
          dur="5s"
          repeatCount="indefinite" />
      </g>
    </svg>
    
      

    Because the rectangle is not moving :'(

    Any idea

    Web Development @programming.dev
    SpongeB0B @programming.dev

    Create a clip-path animated ?

    Hi,

    I would like to use a rectangle that move (left to right) to reveal an element / image

    like this

    The white box shall be the image to display

    But I'm already block at my svg animation

     svg
        
    <svg viewBox="0 0 265.135 68.642" xmlns="http://www.w3.org/2000/svg">
    <g x="-55.790085" y="0.79151762">
        <rect
           style="fill:#ffcc00;stroke-width:2.46513;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke fill markers;stop-color:#000000"
           width="55.465603"
           height="151.60599"       
           transform="rotate(45)" />
           <animate
          attributeName="x"
          values="-55.790085;265"
          dur="5s"
          repeatCount="indefinite" />
      </g>
    </svg>
    
      

    Because the rectangle is not moving :'(

    Any ideas ?

    Thanks.

    Android @lemmy.world
    SpongeB0B @programming.dev

    Where submit a feature suggestion for Android ?

    Hi everyone,

    Does someone know where I can submit a feature suggestion for Android ?

    Thanks

    Inkscape @lemmy.world
    SpongeB0B @programming.dev

    Convert Path to strokes, possible ?

    Hi,

    is it possible to convert a path like this one
    \

    To a series of "line" stroke that are draw in the middle ? Like this (in green)
    \

    Thanks.

    inkscape @lemmy.ml
    SpongeB0B @programming.dev

    Mirror / parallel - squeeze / transform path is it possible ?

    cross-posted from: https://programming.dev/post/18113218

    Hi,

    Is it possible with Inkscape to squeeze a shape in a mirror way (sorry I don't know how to phrase it better) \

    Here a gif from a rasterize/pixel editor with what I'm looking for
    \

    Inkscape @lemmy.world
    SpongeB0B @programming.dev

    Mirror / parallel - squeeze / transform path is it possible ?

    Hi,

    Is it possible with Inkscape to squeeze a shape in a mirror way (sorry I don't know how to phrase it better) \

    Here a gif from a rasterize/pixel editor with what I'm looking for
    \

  • Thank you ! it works !

    Actually this is working :

     shell
        
    path/to/venv/bin/gunicorn A_Web_App:app
    
      

    Some other poster, claim it's dirty.. but which problems could it generate ? (if any)

    Thanks all !!!!

  • I don't want to make the venv portable...
    \ I want to use the gunicorn that is installed in one venv accessible to other venv

  • Python @lemmy.ml
    SpongeB0B @programming.dev

    Installing gunicorn once on the OS and reuse it between venv ?

    cross-posted from: https://programming.dev/post/17866168

    Hi,

    I use gunicorn in my venv

    I have quite few venv that run gunicorn.

    I would like to reuse gunicorn for other venv

    I launch my web application like this

     bash
        
    #PWD = venv dir
    source ./bin/activate
    gunicorn A_WebApp:app
    #A_WebApp is my python file A_WebApp.py
    
    
      

    I supposes that gunicorn is a shell program ? if yes I should use $PATH ?
    \ or gunicorn is a Python program only ? and then what I should do to use gunicorn in another venv ?

    Thanks.

  • ok I've found a work around

     html
        
    <style>
    .FlexColumn {display: flex;flex-flow: column nowrap }
    .FlexColumn > div {display: inline-block; margin: -4px 0}
    </style>
    
    <div class="FlexColumn">
        <div>X</div>
        <div>X</div>
        <div>X</div>
        <div>X</div>
        <div>X</div>
    </div>
    
    
      

    But if someone have something more proper, I'm all ears.