473 links
267 private links
  • When 140 characters is not enough!
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
8 results tagged linux x
  • SecureBoot - Debian Wiki

    Infos sur uEFI, SecureBoot, MOK, comment générer sa propre CA, l'importer dans uEFI et signer ses noyaux Linux compilés à la main

    July 17, 2024 at 09:39:17 GMT+2 * - permalink -
    QRCode
    - https://wiki.debian.org/SecureBoot
    Linux uEFI SecureBoot
  • GUI in C# while using Linux (.NET Core)

    I've been reading up on the GUI situation for C# on linux and while it seems obvious that there is no support for Forms (or Windows Forms I guess) on Linux, there seems to be a lot of confusion for me regarding the GUI development. For context, I have just recently begun to learn C# and was looking to practice some simple commands while also trying to make a functional GUI with buttons that will execute some commands for me. I'm not exactly sure what next steps to take because any forums / wikis regarding this topic usually go like "Is it possible" while someone on the other end replies "Just use C++ lol".

    Would really appreciate any help and especially some beginning point or links for me to go to so I can start learning all of this. Loving C# so far!

    --

    Réponses : 

    • Avalonia - https://github.com/AvaloniaUI/Avalonia
    • Eto - https://github.com/picoe/Eto
    • Uno - https://platform.uno

    Également proposés :

    • Linux MAUI <<- version “communautaire” de MAUI, mais pas vraiment maintenu, et carrément pas prêt pour la prod
    • Winforms + Mono <<- on oublie
    • Razor <<- sérieux ? - pourquoi pas Electron tant qu'on y est, nan parce que quitte à faire de l'ASP.Net, autant faire du web)
    • Blazor, mais quand ça sera intégré <<- ça ne l'est pas.
    • Electron, “mais je vois pas comment intégrer avec C#” <<- Sérieux ?
    March 29, 2024 at 10:26:40 GMT+1 * - permalink -
    QRCode
    - https://www.reddit.com/r/csharp/comments/nyubg4/gui_in_c_while_using_linux_net_core/?rdt=33264
    c# dotNet Core Linux GUI
  • You can host a .NET Core MVC app on Linux | Declaration of VAR

    You can host a .NET Core MVC app on Linux

    On your local machine publish your project by running the following from the project folder:

    $ dotnet publish -c Release -o ../_deploy
    Create a website folder on the server:
    
    $ mkdir -p /var/www/YOUR-WEBSITE

    And copy the contents of ../_deploy from your machine to /var/www/YOUR-WEBSITE/ on the server.

    Change the owner of your website’s directory so it would belong to NGINX’s user (www-data):

    $ chown -R www-data:www-data /var/www/

    systemd service

    Create a systemd config for Kestrel instance:

    $ nano /etc/systemd/system/kestrel-YOUR-WEBSITE.service

    Edit it like that:

    [Unit]
    Description=YOUR-WEBSITE
    
    [Service]
    WorkingDirectory=/var/www/YOUR-WEBSITE/
    ExecStart=/usr/bin/dotnet /var/www/YOUR-WEBSITE/YOUR-WEBSITE.dll
    Restart=always
    RestartSec=10
    SyslogIdentifier=dotnet-YOUR-WEBSITE
    User=www-data
    Environment=ASPNETCORE_ENVIRONMENT=Production
    
    [Install]
    WantedBy=multi-user.target

    Enable and start it:

    $ systemctl enable kestrel-YOUR-WEBSITE.service
    $ systemctl start kestrel-YOUR-WEBSITE.service

    You can check its status:

    $ systemctl status kestrel-YOUR-WEBSITE.service

    If everything is okay, then it will show something like that:

    ● kestrel-YOUR-WEBSITE.service - YOUR-WEBSITE
       Loaded: loaded (/etc/systemd/system/kestrel-YOUR-WEBSITE.service; enabled; vendor preset: enabled)
       Active: active (running) since Thu 2017-08-10 11:30:09 UTC; 1s ago
     Main PID: 15628 (dotnet)
        Tasks: 14
       Memory: 25.4M
          CPU: 1.380s
       CGroup: /system.slice/kestrel-YOUR-WEBSITE.service
               └─15628 /usr/bin/dotnet /var/www/YOUR-WEBSITE/YOUR-WEBSITE.dll

    NGINX

    Install NGINX:

    $ apt-get install nginx

    Now, there are 2 options how NGINX can send requests to Kestrel: via TCP or via Unix socket.

    TCP

    Your Program.cs:

    // ...
    
    public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseUrls("http://localhost:5000/")
            .UseStartup<Startup>();
    
    // ...

    NGINX config (/etc/nginx/sites-available/default):

    # ...
    
    server {
        listen 80;
        listen [::]:80;
    
        location / {
                proxy_pass http://localhost:5000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection keep-alive;
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
    
    # ...

    Unix socket

    This should be better in terms of performance as there is no TCP overhead. Even if there was no performance impact, on a local machine “talking” through Unix socket simply makes more sense than communicating over TCP.

    Your Program.cs:

    // ...
    
    public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseLibuv()
            .ConfigureKestrel(
                (context, serverOptions) =>
                {
                    // /var/www/YOUR-WEBSITE
                    string root = Path.GetDirectoryName(
                        System.Reflection.Assembly.GetExecutingAssembly().Location
                    );
                    // if we are (behind NGINX) and on Linux, then can use sockets
                    if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
                    {
                        // path to socket has to be absolute
                        string socket = Path.Combine(root, "kestrel.sock");
                        serverOptions.ListenUnixSocket(socket);
                    }
                    else
                    {
                        serverOptions.Listen(IPAddress.Loopback, 5000);
                    }
                }
            )
            .UseStartup<Startup>();
    
    // ...

    For that to work you need to add Transport.Libuv package, so you’ll have the following in your .csproj:

    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="2.2.0" />

    NGINX config in this case:

    # ...
    
    location / {
        proxy_pass http://unix:/var/www/YOUR-WEBSITE/kestrel.sock;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    
    # ...

    Save it and restart NGINX:

    $ systemctl restart nginx.service

    Now open your web-browser and go to http://YOUR-SERVER-IP/. It fucking works!

    March 28, 2024 at 02:39:09 GMT+1 * - permalink -
    QRCode
    - https://decovar.dev/blog/2017/08/10/you-can-host-net-core-on-linux/
    C# dotNet Core MVC Linux
  • thumbnail
    braindamaged / udev / overview — Bitbucket

    Fork d'udev, sans la partie Bloated^Wsystemd

    September 4, 2012 at 20:44:52 GMT+2 - permalink -
    QRCode
    - https://bitbucket.org/braindamaged/udev
    udev fork linux
  • thumbnail
    "Yes, udev on non-systemd systems is in our eyes a dead end, in case you haven't noticed it yet. I am looking forward to the day when we can drop that support entirely" - Lennart Poettering : linux

    « Oui, udev sur les systèmes non-systemd est à nos yeux un cul de sac, au cas ou vous n’auriez pas encore remarqué. J’attends avec impatience le jour où nous pourrons entièrement laisser tomber ce support. »

    September 4, 2012 at 20:44:12 GMT+2 - permalink -
    QRCode
    - http://www.reddit.com/r/linux/comments/y3ao1/yes_udev_on_nonsystemd_systems_is_in_our_eyes_a/
    troll systemd udev linux
  • thumbnail
    usftZ.png (Image PNG, 1184x874 pixels) - Redimensionnée (64%)

    Troll "Lennart Poettering's approach of software comparison"

    September 4, 2012 at 20:43:21 GMT+2 - permalink -
    QRCode
    - http://i.imgur.com/usftZ.png
    troll linux systemd unix bloatware
  • thumbnail
    Installation sur une Squeeze d'un serveur mail complet (Postfix Postfixadmin Dovecot Mysql Amavisd-new Spamassassin Clamav Postgrey Squirrelmail Roundcube) avec gestion des filtres Imap et des quotas - wiki.debian-fr

    Comment configurer une solution complète d'email.

    August 19, 2012 at 01:39:40 GMT+2 - permalink -
    QRCode
    - http://www.isalo.org/wiki.debian-fr/index.php?title=Installation_sur_une_Squeeze_d%27un_serveur_mail_complet_(Postfix_Postfixadmin_Dovecot_Mysql_Amavisd-new_Spamassassin_Clamav_Postgrey_Squirrelmail_Roundcube)_avec_gestion_des_filtres_Imap_et_des_quotas
    linux email serveur admin
  • thumbnail
    Munin Statistics - Wiki

    Similiar to MRTG graphs showing Network Usage, Munin is monitoring system used to produce graphs of usage of key areas in the running of a server. Munin can produce graphs of:

    Disk Usage
    Mysql
    Network (similar to mrtg)
    Postfix Mail
    Processes
    Squid Proxy
    System - CPU, Load, Memory etc.
    August 14, 2012 at 11:18:27 GMT+2 - permalink -
    QRCode
    - http://wiki.kartbuilding.net/index.php/Munin_Statistics#Munin_via_CGI_.28Reduce_CPU_Load.29
    linux monitoring
Links per page: 20 50 100
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation