A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process.

Overview

Ubuntu WSL Splash

A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process. Made with:

Flutter & C++

Getting Started

To experiment with the code you'll need Flutter on Windows. Refer to the Flutter documentation if you need to install it on Windows. You can skip the steps related to Android.

Also, Flutter requires Visual Studio. You can download the community edition from the IDE offical website. Make sure to read Flutter documentation thoroughly.

Beware: We are not talking about VSCode!

With Flutter and Visual Studio installed, you can git clone this repository (or download the source code from it) and:

cd ubuntu_wsl_splash
flutter run

You can also use your favorite editor/IDE to work with this project, like VSCode, IntelliJ or even Vim.

Contributing

Before submitting any issues or pull requests, make sure to review our contributor guidelines.

Technical details

Please check the explanation if you want to know more about how this project works.

License

The Ubuntu Desktop Installer is licensed under the GNU General Public License version 3.

Comments
  • Added LogView widget

    Added LogView widget

    • Will be used to display what would be printed to the launcher console.
    • Shamelessly copied from github.com/jpnurmi/ubuntu-desktop-installer.

    It is the black component of the screenshot below: image

    opened by CarlosNihelton 4
  • Post WM_CUSTOM_CLOSE instead of calling DestroyWindow()

    Post WM_CUSTOM_CLOSE instead of calling DestroyWindow()

    FlutterWindow parent class has some business logic to perform on close (see the code snippet below). Calling DistroyWindow() is part of that. Doing as previously done (calling DestroyWindow() as part of the method channel handler) may skip part of that logic. That could be a cause for the access violation we noticed in the dumps if some other part of the framework attempts to dereference any of the structures cleaned up during the potentially skipped handler.

    PostMessage, on the other, won't wait the message to be handled, thus the framework has the chance to do whatever it needs to. Posting a custom message allows the WndProc to call DestroyWindow, avoiding any possibility of ownership issues.

    void Win32Window::Destroy() {
      OnDestroy();
    
      if (window_handle_) {
        DestroyWindow(window_handle_);
        window_handle_ = nullptr;
      }
      if (g_active_window_count == 0) {
        WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
      }
    }
    
    
    LRESULT
    Win32Window::MessageHandler(HWND hwnd,
                                UINT const message,
                                WPARAM const wparam,
                                LPARAM const lparam) noexcept {
      switch (message) {
        case WM_DESTROY:
          window_handle_ = nullptr;
          Destroy();
          if (quit_on_close_) {
            PostQuitMessage(0);
          }
          return 0;
    
    ...
    
    opened by CarlosNihelton 3
  • Matches the design team output

    Matches the design team output

    This PR updates the slide show contents to match the output from the design team.

    The window has been scaled a little bit and forced centering the user's main display as a partial workaround to ensure the OOBE will not catch user's attention before the right time. There is another side of this work on WSL launcher itself to find and control the visibility of the OOBE window as the main way of reaching this aim, so the window resizing and positioning is just a secondary measure.

    Design screenshots and text can be found in the document: https://docs.google.com/document/d/16JdUzXox6bYDrsrrDvZ66LJskhy6qBxVyWBh2J7RobM/preview

    This is how it looks now:

    https://user-images.githubusercontent.com/11138291/161046142-b61c505d-6e65-449c-bfb1-822ffc8e6cdf.mp4

    opened by CarlosNihelton 3
  • Integrating the pieces

    Integrating the pieces

    It turns out that due the simplicity of this app I could keep the state management in one single top-level widget. Thus no need for the provider package.

    AppHome handles the InstallerStateController, making sure it's disposed in the end and reacts to its state change thru the method _buildStatusTile() which builds the pieces of the ListTile that are affected by the state changes.

    I didn't make it stateless because I needed to ensure the controller's dispose() method is called. I could have wrapped it in a Provider, but that would be the single reason why I'd bring that dependency to this project. So, to my understanding that is the perfect use case for a stateful widget, even though I don't need to call setState()

    opened by CarlosNihelton 1
  • Stdin transformer to fix broken lines

    Stdin transformer to fix broken lines

    By design this project is meant to display in the LogView widget the contents that would be printed in the launcher process stdout. That is achieved by having the launcher redirecting its output to a pipe whose read end is inherited as the stdin of this Flutter app.

    When building the proof of concept I noticed a fairly consistent behavior of stdin.transform(systemEncoding.decoder) stream interpreting line breaks just after the first character. I did some investigation on the C++ side, but nothing was conclusive enough, so I preferred to perform this quick fix and investigate further later on, since I don't really have a clue about what causes that behavior at this point after the first investigation steps being done.

    The fix implemented in the POC was just adding some more state to an already stateful widget. The need for state is what motivates writting a transformer class instead of just a function.

    As demonstrated in the test file it is meant to be passed straight into stdin.transform().

    void _transformerAssert(
        {required Iterable<String> input, required Iterable<String> output}) {
      final fakeStdin = StreamController<List<int>>();
      final stringStdin = Stream.fromIterable(input);
      fakeStdin.addStream(stringStdin.transform(systemEncoding.encoder));
    
      final resultStream = fakeStdin.stream.transform(StdinTransformer());
    
      expect(resultStream, emitsInOrder(output));
    }
    
    opened by CarlosNihelton 1
  • Allow static linking VC runtime libs

    Allow static linking VC runtime libs

    Back in the time we only supported Windows Desktop it was possible to rely on Microsoft Store to deliver a compatible VCLibs package to ensure the required runtime libraries would always be present in the target system.

    We cannot rely on that mechanism on Windows Server. Thus we should avoid linking against them dynamically, since CMake 3.15 onwards offers way to do it statically.

    The recipe can be applied to any recent Flutter app targeting Windows to avoid the need for shipping msvcp140.dll, vcruntime140.dll and vcruntime140_1.dll libraries. That can be handy for deployment under certain situations, but increases the overall app size since every native plugin (and the runner binary) will be affected by this option (a lot of binary code will be duplicated).

    The size increase is irrelevant for the WSL case, because our main size constraint is orders of magnitude bigger than the Flutter-produced binaries.

    Relevant documentation about this topic can be found in MS FAQ about Runtime libs, CMake CMP0091 policy and MSVC_RUNTIME_LIBRARY property

    Notice the usage of generator expressions in the snippet "MultiThreaded$<$<CONFIG:Debug>:DebugDLL>" to ensure we still link against the debug runtime DLL's in debug builds, otherwise those builds would be much bigger and likely slower than they currently are.

    opened by CarlosNihelton 0
  • Enables producing a full PDB out of the splash app

    Enables producing a full PDB out of the splash app

    A bare bones Flutter app on Windows is made of the flutter_windows.dll (provided by the framework) and the application runner executable compiled with Visual Studio build tools, with the build system (aka solutions and vcxproj files) generated by a set of CMakelists.txt files.

    Program debug database is supplied for the dll, but not for the application runner. Enabling the build system to generate it requires one-line addition to enable it, per instructions found in this comment on Flutter repository.

    opened by CarlosNihelton 0
  • Reduces error notifications

    Reduces error notifications

    The setup GUI is more verbose nowadays. Error messages are shown even when it heals itself. This regex change makes the splash react only to errors coming from the launcher.

    Here is an example that would cause the InstallerStateController to react as if an irrecoverable error has happened. Notice that after a few SocketExceptions we finally get a connection. That's a normal behavior due the late server startup. The regex match is due "(OS Error: " part of the log.

    2022-07-27 12:47:45.733412 INFO subiquity_server: Waiting server up to 30 seconds
    2022-07-27 12:47:45.734439 ERROR subiquity_server: SocketException: Connection failed (OS Error: No such file or directory, errno = 2), address = /run/subiquity/socket, port = 0
    2022-07-27 12:47:46.736066 ERROR subiquity_server: SocketException: Connection failed (OS Error: No such file or directory, errno = 2), address = /run/subiquity/socket, port = 0
    2022-07-27 12:47:47.737158 ERROR subiquity_server: SocketException: Connection failed (OS Error: No such file or directory, errno = 2), address = /run/subiquity/socket, port = 0
    2022-07-27 12:47:48.740348 INFO subiquity_client: Opening socket to Endpoint(/run/subiquity/socket )
    
    opened by CarlosNihelton 0
  • Make the custom exit dialog non-dismissible

    Make the custom exit dialog non-dismissible

    https://github.com/ubuntu/WSL/issues/177 documents the possibility of dismissing the dialog that notifies the user when its time to leave the slide show and interact with the OOBE, halting the installation. Making the dialog non-dismissible gives time for the user to acknowledge the notification and automatically close out in case it doesn't react on time, moving the installation forward.

    This closes https://github.com/ubuntu/WSL/issues/177 while we prepare the redesign that will remove the dialog in favor of something smoother.

    opened by CarlosNihelton 0
  • Translations into pt_BR

    Translations into pt_BR

    Portugal variant requires more skilled translator. Brazilian one is being handled here, but the arb workflow wouldn't accept it without the more general pt version.

    opened by CarlosNihelton 0
  • Rename assets and fix missing 'u'

    Rename assets and fix missing 'u'

    When attempted to package the Flutter build artifacts using Visual Studio, MSBuild failed to understand the '%20' in asset files names, added by Flutter because the original assets have spaces in their file names. Removing the spaces in the original files solve the issue.

    Also, this fixes a typo causing a missing 'u' in the 'Ubuntu' name, as you may recall 😅

    opened by CarlosNihelton 0
  • Profile setup won't proceed if

    Profile setup won't proceed if "Your name" contains special characters

    When the name fields contains special (i.e non-English) characters, clicking the continue button doesn't result in proceeding to the next step, despite the green mark suggesting the name is ok. Removing non-English characters from the name fixes this.

    image

    opened by jonasjancarik 0
  • gui not working well from select your language when graphic card is radeon (maybe)

    gui not working well from select your language when graphic card is radeon (maybe)

    My computers that has nvidia gpu work well, but any computer has radeon graphic card, is screened by half triangle section color inversed.

    image

    When I close the window, I initialize with only root user.

    Can I install ubuntu without splash?

    opened by naramdash 0
Owner
Ubuntu
Ubuntu
Ubuntu-flutter-plugins - A collection of Flutter plugins and packages for Ubuntu applications.

Flutter plugins for Ubuntu A collection of Flutter plugins and packages for Ubuntu applications. ubuntu_localizations - provides localizations for Flu

Canonical 25 Oct 12, 2022
Ubuntu Desktop Installer

Ubuntu Desktop Installer This project is a modern implementation of the Ubuntu Desktop installer, using subiquity as a backend and Flutter for the UI.

Canonical 388 Jan 7, 2023
A tutorial for creating an Ubuntu Linux Flutter app, using the yaru theme

Building a Yaru app with Flutter Summary URL https://github.com/ubuntu/user_manager Category Environment Linux Status Feedback Link Author Frederik Fe

Ubuntu 22 Dec 21, 2022
Unofficial Ubuntu Desktop Settings App made with Flutter

Unofficial Ubuntu Desktop Settings App made with Flutter - WIP The goal of this project is to build a feature complete settings app for the Ubuntu des

Frederik Feichtmeier 239 Jan 1, 2023
Ubuntu Software Store

Unofficial Ubuntu Store Flutter - WIP An alternative software store for the Ubuntu Desktop made with Flutter. First goals Great UX Adaptive Layout Sna

Frederik Feichtmeier 288 Jan 3, 2023
Trident - The magic kernel manager for elementary os and ubuntu based distros.

trident The magic kernel manager for elementary os and ubuntu based distros. testing Make a cache directory for trident in /var/cache/ sudo mkdir /var

Quinten Van Damme 4 Apr 5, 2022
Manage Subiquity for Ubuntu Desktop Installer

Manage Subiquity for Ubuntu Desktop Installer

J-P Nurmi 1 Mar 3, 2022
Highlighter Coach Mark There are different ways for user on-boarding

Highlighter Coach Mark There are different ways for user on-boarding. It can be a show of screenshots or overlay with directions to features, feature

Marica 81 Oct 18, 2022
Android-Toolbox is a desktop app which enables the user to access android device features which are not accessible directly from the mobile device

Android-Toolbox is a desktop app which enables the user to access android device features which are not accessible directly from the mobile device. One of Android-Toolbox's special feature is to transfer files at the highest speed using ADB push and pull bypassing a lot of Android API overheads.

Sashank Visweshwaran 30 Dec 26, 2022
File manager application

Website ● Discord ● Releases ● Donate ● Documentation File manager application File manager for dahliaOS Written in Flutter Contribute If you're inter

dahliaOS 31 Dec 16, 2022
A flutter application to monitor your Linux PC statistic.

Linux Stats App A flutter application to monitor your Linux PC statistic. Screenshots Installation Download or clone the repository: $ git clone https

Malte2036 7 Dec 17, 2022
An open source desktop application for creating set-plans for TV and movie productions

lyghts_desktop An open source (Windows) desktop application for creating set-plans for TV and movie productions. Getting Started This application uses

MindStudio 1 Feb 15, 2022
Implementation of Flutter Desktop Application

Flashmall Vendor This project is an implementation of a Design i found on Dibble.com by Casprine Assempah Art Light Theme Dark Theme Getting Started T

Etornam Sunu 38 Nov 22, 2022
A push notification application for multiple platforms

notifi.it App | Website | Backend Run locally create an .env with the example content SERVER_KEY=Hu2J7b7xA8MndeNS KEY_STORE=notifi-local DEV=true TLS=

Maximilian Mitchell 34 Nov 3, 2022
Photon is a cross-platform file-sharing application built using flutter.

Welcome to Photon ?? Photon is a cross-platform file-transfer application built using flutter. It uses http to transfer files between devices.You can

Abhilash Hegde 161 Jan 1, 2023
A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Muhammad Hamza 21 Jan 1, 2023
A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Muhammad Hamza 20 Jun 7, 2022
Quickly is build as a tool to enhance your Flutter UI development experience and make code easier

Quickly is build as a tool to enhance your Flutter UI development experience and make code easier. It is highly inspired by Bootstrap and Tailwind CSS. It also provide lots of extension methods on String, List and Map.

Aniket Khote 11 Oct 24, 2022
Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop

Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop Using Yaru To be able to use this package follow this steps: Installation Make you su

Ubuntu 226 Dec 28, 2022
Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop

Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop Using Yaru To be able to use this package follow this steps: Installation Make you su

Ubuntu 226 Dec 28, 2022