WPFでWPF-UIをつかう

1. NugetでWPF-UIをインストール

nuget-wpf-ui

2. App.xaml編集

<Application x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
             xmlns:local="clr-namespace:WpfApp1"
             StartupUri="MainWindow.xaml" >
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!-- Other merged dictionaries here -->
                <ui:ThemesDictionary Theme="Dark" />
                <ui:ControlsDictionary />
            </ResourceDictionary.MergedDictionaries>
            <!-- Other app resources here -->
        </ResourceDictionary>
    </Application.Resources>
</Application>

3. MainWindow.xaml修正

<ui:FluentWindow x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">

 

</ui:FluentWindow>

4. MainWindow.xaml.cs修正

namespace WpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow   : Window
    {

 

ubuntu ログインキーリングのパスワードを入力してください

ubuntuにvncserverを入れてvncviewerからアプリを起動すると「ログインキーリングのパスワードを入力してください」とでた。

アカウントのパスワードかと思い入力したが違った。

googleで検索すると、Passwords and Keysアプリから変更する方法が出てきたが、そもそもパスワードが分からないから変更できない。

結局、~/.local/share/keyrings/にあるlogin.keyringを削除して再起動したら、パスワードを聞かれなくなった。

Glibc version

Glibc uses something called symbol versioning. This means that when you use e.g., malloc in your program, the symbol the linker will actually link against is malloc@GLIBC_YOUR_INSTALLED_VERSION (actually, it will link to malloc from the most recent version of glibc that changed the implementaton of malloc, but you get the idea). This means that when you run your old program on a newer system, where malloc has been changed to, say, take its size as a string instead of an integer, that new crazy malloc will be malloc@GLIBC_CRAZY_VERSION but you'll still link to malloc@OLD_SANE_VERSION, and glibc will keep exporting the old symbol with a compatible implementation. This effectively make binaries forward compatible, as the system will always act like the version of glibc on the developers machine when they build the binary. The downside of this is that if I compile my super cool, new program on my bleeding edge Arch Linux machine, that binary is almost useless to anyone who isn't cool enough to use the same new version of glibc as me. I theorise that this is why almost no one ships Linux binaries - it's just too much of a pain in the ass.

However, the version of a function that you link against can be specified. The GNU assembler has a "psuedo-op" .symver SYM,SYM@VERSION, which forces the linker to use SYM@VERSION wherever you ask for SYM. This can be embedded in C source like so: __asm__(".symver SYM,SYM@GLIBC_VERSION");. Great, but I want to use glibc 2.13 for my whole program, not just one function in one translation unit. So, what we do to resolve this, is we generate a header file that contains these symver asm blocks for every symbol exposed by glibc. To do this, we build every version of glibc from 2.5 to current (open an issue if the latest version is no longer current please), check what symbols are exposed in all the binaries built by that version (glibc splits the C standard library into a few different binaries), and generate the header accordingly. Then, all you need to do is make sure that header is included in every translation unit in your build. This is as simple as adding -include /path/to/glibc_version_header.h to your compiler flags using whatever build system you use.

GitHub - wheybags/glibc_version_header: Build portable Linux binaries without using an ancient distro