pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
228 stars 47 forks source link

Add Installation instructions to README #49

Closed nielsonrolim closed 2 years ago

nielsonrolim commented 2 years ago

As the pop-launcher service has been separated from pop-shell, when you make a local install of pop-shell, you don't have the Launcher available anymore.

Please, add detailed instructions of how to install pop-launcher service and integrate it with pop-shell.

mmstick commented 2 years ago

make && make install as usual

nielsonrolim commented 2 years ago

I tried this already. I'm using Debian testing so I installed cargo:

sudo apt install cargo

I run make.

This is the error I am getting:

   Compiling pollster v0.2.4
error[E0658]: use of unstable library feature 'wake_trait'
  --> /home/nielsonrolim/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.2.4/src/lib.rs:19:27
   |
19 |     task::{Context, Poll, Wake, Waker},
   |                           ^^^^
   |
   = note: see issue #69912 <https://github.com/rust-lang/rust/issues/69912> for more information

error[E0658]: use of unstable library feature 'wake_trait'
   --> /home/nielsonrolim/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.2.4/src/lib.rs:104:5
    |
104 | /     fn wake(self: Arc<Self>) {
105 | |         self.notify();
106 | |     }
    | |_____^
    |
    = note: see issue #69912 <https://github.com/rust-lang/rust/issues/69912> for more information

error[E0658]: use of unstable library feature 'wake_trait'
   --> /home/nielsonrolim/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.2.4/src/lib.rs:103:6
    |
103 | impl Wake for Signal {
    |      ^^^^
    |
    = note: see issue #69912 <https://github.com/rust-lang/rust/issues/69912> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `pollster` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:33: all] Error 101
mmstick commented 2 years ago

What version of Rust do you have there? I can guarantee that it currently works with at least Rust 1.51, but we're going to update that to Rust 1.56 soon.

nielsonrolim commented 2 years ago

Rust version is 1.50.0 in Debian testing (bookwarn).

I managed to compile using asdf and installing Rust version 1.51 as you said. But I needed to install some packages:

sudo apt install librust-atk-sys-dev librust-gdk-sys-dev librust-gdk-pixbuf-sys-dev librust-pango-sys-dev librust-glib-sys-dev

I got some warings in the end:

warning: use of deprecated function `std::env::home_dir`: This function's behavior is unexpected and probably not what you want. Consider using a crate from crates.io instead.
  --> plugins/src/files/mod.rs:49:19
   |
49 |             home: std::env::home_dir().expect("no home dir"),
   |                   ^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated function `std::env::home_dir`: This function's behavior is unexpected and probably not what you want. Consider using a crate from crates.io instead.
  --> plugins/src/scripts/mod.rs:77:13
   |
77 |             std::env::home_dir()
   |             ^^^^^^^^^^^^^^^^^^

warning: use of deprecated function `std::env::home_dir`: This function's behavior is unexpected and probably not what you want. Consider using a crate from crates.io instead.
  --> plugins/src/web/mod.rs:60:21
   |
60 |         let cache = std::env::home_dir()
   |                     ^^^^^^^^^^^^^^^^^^

warning: 3 warnings emitted

But it worked.

Just got two issues:

  1. I couldn't find the "Launch application" entry in Gnome Shortcuts so I couldn't change the default shortcut;
  2. The highlighted text is dark gray and almost unreadable (this is related to the Adwaita theme).
mmstick commented 2 years ago

Those dependencies have no affect here. librust packages aren't actually used for building Cargo projects outside of the ones packaged by Debian.

mmstick commented 2 years ago

See the debian/control file for the Debian dependencies required.

nielsonrolim commented 2 years ago

Without these dependencies, the compile process failed.

Ramblurr commented 2 years ago

On Fedora 35 I had to install rust cargo gtk3-devel. make and make install succeeded, but now I'm not sure what to do?

How do I use it?

mmstick commented 2 years ago

The launcher is just a JSON IPC service, so you need a frontend for it. In Pop!_OS the default frontend is the one provided by pop-shell.

Ramblurr commented 2 years ago

Ah yea, I figured as much. I should have been more specific, how to I configure a manually installed pop-shell to use the service?

Does pop-shell handle execing the service? Should I create systemd user service to run the launcher in the background?

mmstick commented 2 years ago

It's two-way IPC over stdin and stdout, and pop-shell will launch the process when the launcher is opened, and exit the process when it is closed.

prasannavl commented 2 years ago

On debian/ubuntu, just do make with valid rustc and gcc, letting the errors guide on what lib*-dev pkgs to install until this is documented.

On my fresh(-ish) existing setup, deps looked something like this:

libcairo2-dev libgdk-pixbuf2.0-dev libatk1.0-dev libpango1.0-dev libgtk-3-dev
mmstick commented 2 years ago

For what it's worth, libgtk-3-dev installs all of those dependencies automatically.

marcelobelli commented 2 years ago

@Ramblurr about Fedora, you had to put the .local/bin/ in your PATH so the pop-shell can find the launcher binary. For me that was the missing piece to make it work

JJGadgets commented 2 years ago

@Ramblurr about Fedora, you had to put the .local/bin/ in your PATH so the pop-shell can find the launcher binary. For me that was the missing piece to make it work

To install for all users in a directory that is definitely in $PATH, I ran this make command to install to /usr where the pop-launcher binary will go to /usr/bin:

make && sudo PWD=$PWD DESTDIR=/ make install