help-circle
rss
Get a list of all available packages excluding dependencies?
I want to [get a list of trending packages](https://lemmy.ml/post/414930) but only for actual software excluding dependencies. For that I have to get the list of packages first excluding dependencies I'm using an arch-based system. And this is what I've thought about. `get_packages` ``` #!/usr/bin/env bash wget https://pkgstats.archlinux.de/api/packages all_packages.txt # Read the package list while read package; do # Check if the package is a dependency if ! pacman -Qi $package | grep -q "Depends On"; then # Save actual packages that aren't dependencies echo $package fi done < all_packages.txt ``` I can use it like `get_packages > packages.txt` Is there a better way? I don't know if pacman knows all about the packages already or it has to make a request to check for each one. And if it does already know about them then I shouldn't need to download the packages.
fedilink

[SOLVED] What is the simplest way to remote desktop from one Linux computer to another?
To control one computer from another using the terminal I use ssh, but what if I want to use a GUI program from the other computer in the one I'm using? Both computers are on the same local network. I’ve seen there are multiple options like VNC and Deskreen. Which is the simplest one? I've been told [x2x](https://github.com/dottedmag/x2x) is the simplest way > I’ve been using x2x for controlling between Linux OSs. > > There is also win2x and mac2x, but I’ve never used them. > > I don’t think you can get simpler. > > If you have already set up passwordless ssh, connecting is as simple as `ssh -XC username@ip x2x -west -to :0.0 ` > > then you have control over the the desktop at ‘ip’ from your current keyboard and mouse. but I get an error when using it ``` ❯ ssh -XC user@192.168.1.135 x2x -west -to :0.0 X11 forwarding request failed on channel 0 x2x - error: can not open display ``` > I've also tried [TigerVNC](https://tigervnc.org/). I've followed the steps in the [Initial setup](https://wiki.archlinux.org/title/TigerVNC#Initial_setup) and [Accessing vncserver via SSH tunnels](https://wiki.archlinux.org/title/TigerVNC#Accessing_vncserver_via_SSH_tunnels) from the TigerVNC arch wiki and now when I try to login a black screen flashes and it takes me to the login page again. So I can't access the computer. Now I can only access from another computer by ssh or graphically by using the TigerVNC Viewer. > > I would like to still be able to login normally to the computer without having to login from another computer.
fedilink

This is an orange pi 5 without cooling. Perhaps it can't reach the maximum because it has a thermal throttle? The CPU temperature is 42 ºC. ![](https://lemmy.ml/pictrs/image/3a5beca8-83ab-419d-b7c5-cfbabb77f541.png) I'm using the same program in another computer and it uses more CPU and in a more consistent way. Without the lines being all over the place. ![](https://lemmy.ml/pictrs/image/b83f8ec5-88ca-4821-bee2-3fed2fa2ef7a.png)
fedilink


How can I use a nofail alternative with fuse?
Using mergerfs the computer refused to boot with the following error ``` [Failed] Failed to mount /mnt/storage [Depend] Dependency failed for Local File Systems You are in emergency mode. After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or “exit” to boot into default mode. Root password for maintenance (or press Control-D to continue): ``` I added the `nofail` option and it boots up fine but now I can't mount the folder because I get ``` fuse: unknown option nofail ``` How can I use a `nofail` alternative with fuse? I'm looking for a way more specific than [this](https://unix.stackexchange.com/a/590869/513177). The error was because the mount point wasn't empty. I may need `nofail` in the future to avoid this same error.
fedilink

[SOLVED] How can I merge the drives of two computers and see them all as one directory?
I want to share the drives of two computers using Manjaro Linux and see them all as one directory in both computers. I've been using mergerfs and sshfs and it was working when I shared one drive of B with A, merged them there and shared the merged folder back with B. Now I've tried merging the drives of B too but I haven't managed to do it. If possible I would like the computers to still work while the other is disconnected. NFS made one computer hang when the other was disconnected which is why I ended up using sshfs. The only error I had before was some applications giving `input/output error` or `permission denied`. Which I guess it's because I didn't have the proper permissions. I would like to avoid that error too, without having to execute something like `chmod -R 777 /mnt/merged` often. I don't know if [this solution](https://unix.stackexchange.com/questions/1314/how-to-set-default-file-permissions-for-all-folders-files-in-a-directory) works with mergerfs. This is what I've tried to do without success `user@A ❯ cat /etc/fstab` ``` # <file system> <mount point> <type> <options> <dump> <pass> UUID=1615d12a-a9fb-41a9-a84b-34c618f16832 /mnt/hdd1 ext4 nosuid,nodev,nofail,x-gvfs-show 0 0 UUID=d605a480-f133-443c-8fe7-5b0a2d1c60c1 /mnt/hdd2 ext4 nosuid,nodev,nofail,x-gvfs-show 0 0 user@192.168.1.45:/mnt/hdd0 /mnt/hdd0 fuse.sshfs IdentityFile=/home/user/.ssh/id_rsa,uid=1000,gid=1000,allow_other,default_permissions,_netdev,follow_symlinks,ServerAliveInterval=45,ServerAliveCountMax=2,reconnect,noatime,auto 0 0 /mnt/hdd* /mnt/storage fuse.mergerfs allow_other,use_ino,cache.files=partial,dropcacheonclose=true,ignorepponrename=true,func.mkdir=epall,x-gvfs-show 0 0 ``` `user@B ❯ cat /etc/fstab` ``` # <file system> <mount point> <type> <options> <dump> <pass> UUID=301e3d8d-6c0a-4f7c-864b-4185a70efbb0 /mnt/hdd1 auto nosuid,nodev,nofail,x-gvfs-show 0 0 UUID=be8b9fd3-7ed2-45ae-881a-25fa06f4de47 /mnt/hdd2 auto nosuid,nodev,nofail,x-gvfs-show 0 0 user@192.168.1.122:/mnt/storage /mnt/hdd0 fuse.sshfs IdentityFile=/home/user/.ssh/id_rsa,uid=1000,gid=1000,allow_other,default_permissions,_netdev,follow_symlinks,ServerAliveInterval=45,ServerAliveCountMax=2,reconnect,noatime 0 0 /mnt/hdd* /mnt/storage fuse.mergerfs allow_other,use_ino,cache.files=partial,dropcacheonclose=true,ignorepponrename=true,func.mkdir=epall,x-gvfs-show 0 0 ``` This is what I was using, which is working fine. `user@A ❯ cat /etc/fstab` ``` # <file system> <mount point> <type> <options> <dump> <pass> UUID=1615d12a-a9fb-41a9-a84b-34c618f16832 /mnt/hdd1 ext4 nosuid,nodev,nofail,x-gvfs-show 0 0 UUID=d605a480-f133-443c-8fe7-5b0a2d1c60c1 /mnt/hdd2 ext4 nosuid,nodev,nofail,x-gvfs-show 0 0 user@192.168.1.45:/mnt/hdd1 /mnt/hdd0 fuse.sshfs _netdev,follow_symlinks,IdentityFile=/home/user/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000,ServerAliveInterval=45,ServerAliveCountMax=2,reconnect,noatime,auto,x-gvfs-show 0 0 /mnt/hdd* /mnt/storage fuse.mergerfs allow_other,use_ino,cache.files=partial,dropcacheonclose=true,ignorepponrename=true,func.mkdir=epall,x-gvfs-show 0 0 ``` `user@B ❯ cat /etc/fstab` ``` # <file system> <mount point> <type> <options> <dump> <pass> UUID=301e3d8d-6c0a-4f7c-864b-4185a70efbb0 /mnt/hdd1 auto nosuid,nodev,nofail,x-gvfs-show 0 0 UUID=be8b9fd3-7ed2-45ae-881a-25fa06f4de47 /mnt/hdd2 auto nosuid,nodev,nofail,x-gvfs-show 0 0 user@192.168.1.122:/mnt/storage /mnt/storage fuse.sshfs _netdev,follow_symlinks,IdentityFile=/home/user/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000,ServerAliveInterval=45,ServerAliveCountMax=2,reconnect,noatime,auto,x-gvfs-show 0 0 ```
fedilink

[SOLVED] How to set up onion service?
I want to serve [a website](https://forum.manjaro.org/t/how-to-run-stash-box-bare-metal/124582) through tor, so that I don't have to pay a hosting service or provide my ip to the users. I've followed the steps on [Arch Wiki](https://wiki.archlinux.org/title/tor) and [torproject.org](https://community.torproject.org/onion-services/setup/): ## Step 0: Get a working Tor ``` $ yay -S tor $ sudo systemctl enable --now tor.service ``` ## Step 1: Get a web server working [Previous steps](https://forum.manjaro.org/t/how-to-run-stash-box-bare-metal/124582). ``` $ cd ~/code/go/stash-box $ ./stash-box --host 127.0.0.1 --port 9998 & ``` ## Step 2: Configure your Tor Onion Service Added this lines to `/etc/tor/torrc` ``` HiddenServiceDir /var/lib/tor/media_wiki/ HiddenServicePort 9998 127.0.0.1:9998 ``` ## Step 3: Restart Tor and check that it worked ``` $ sudo systemctl restart tor ``` ## Step 4: Test that your Onion Service works When I visit the address in `/var/lib/tor/media_wiki/hostname` with the Tor Browser I see an `Unable to connect` message. What else do I have to do? Tags: linux arch-linux manjaro tor
fedilink

SMART data of Samsung PM1643a SSD connected through MR9560-16i
When I run `smartctl -Ai -d megaraid,0 /dev/sda` I only get the following output: ``` smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.19.0+1] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: NVMe Product: SAMSUNG MZQLB7T6 Revision: 502Q Compliance: SPC-5 User Capacity: 7,681,501,126,656 bytes [7.68 TB] Logical block size: 512 bytes LU is resource provisioned, LBPRZ=0 Rotation Rate: Solid State Device Logical Unit id: REDACTED Serial number: REDACTED Device type: disk Transport protocol: SAS (SPL-3) Local Time is: Wed Oct 26 REDACTED SMART support is: Available - device has SMART capability. SMART support is: Enabled Temperature Warning: Enabled === START OF READ SMART DATA SECTION === Current Drive Temperature: 33 C Drive Trip Temperature: 86 C ``` I expected to see stuff like Total_Writes_GiB (TBW) or other "Vendor Specific SMART Attributes" I get on other systems, including the SMART log. How can I get the complete SMART data here? Is it possible to use `nvme` to show the statistics as it seems to be an NVMe-attached drive? `nvme list` only shows me the disks not connected through the MegaRAID controller…
fedilink

[SOLVED] Add cheap HDD storage (from home) to a small Peertube VPS
This is the second try (original post: https://feddit.de/post/426890) of me trying to get an answer, this time I'll be more specific of what I am thinking to do. I thought a more generalized question would be enough. Sorry for that. A peertube server needs lots of storage. Many of the videos will hardly get any views. Storage space on a vps is pretty expensive, storage space in general isn't cheap. So my thought was to have a disk at home (maybe external disk on a raspberry pi) and a VPS. The VPS only has a very limited amount of storage, but is otherwise totally able to run peertube well. So why not have a virtual file system on the VPS, which looks like it has the size of the HDD and it uses a specified amount of the vps storage for caching. So if someone watches a popular part of a popular video, the vps can serve the video content from the local disk. If someone wants to watch the video that nobody ever watches, it's not a problem since the uplink from home can easily deliver that as well, without the video taking the precious storage. Block caching would be best, since file caching wouldn't be ideal with video files being really big in some cases. So a very long video would fill the cache, even if only parts of it are needed. The remote storage doesn't need to be from home of course, could be cheap cloud storage. I know that peertube works with s3, but it will only move transcoded videos into a bucket and then serve them directly from there. I don't want that from home, it would also not use the upload performance of the VPS for popular videos. Any thoughts? Good idea or not? I have worked with bcache in the past and was always very impressed with the performance, I think my scenario could really work.
fedilink

Expand VPS with slow cached network storage
Hey I am looking for a way to have a network folder on a vps that uses a configurable amount of local storage for caching.
fedilink

[SOLVED] How to install coqui-ai TTS on Manjaro and use it with a simple command?
Since [coqui-ai TTS](https://github.com/coqui-ai/TTS) isn't in the AUR I have to install it manually. When I install it directly with ``` pip install TTS ``` it installs but at the end of the installation I get the error ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. typer 0.3.2 requires click<7.2.0,>=7.1.1, but you have click 8.1.3 which is incompatible. google-api-core 2.10.0 requires protobuf<5.0.0dev,>=3.20.1, but you have protobuf 3.19.6 which is incompatible. ``` To avoid this error I think I should install it in a virtual environment, but I want to be able to use it like ``` ttst text wav ``` using a function like ``` ttst() { cat $1 | sentences | xargs -0 tts --model_name "tts_models/en/ljspeech/tacotron2-DDC" --out_path "${2:-out.wav}" --text } ``` and I don't know how to do that if I install it in a virtual environment. If there is a simpler way just forget what I said. What I want to know is the answer to the title. `sentences` refers to the [sentences-bin](https://aur.archlinux.org/packages/sentences-bin) package, required to tokenize the text in sentences, as coqui TTS only works on sentences.
fedilink

Does Podman run have a noconfirm setting?
Does podman run (among other commands) have a noconfirm type of option/config? Like apt's `$ apt-get install --yes pacman`, which will install pacman and automatically answer yes to any questions that might pop-up. In podman, when you have a conf like this in */etc/containers/registries.conf:* ` unqualified-search-registries = ['some-mirror.org', 'docker.io'] ` and you run something like: `$ podman run -it --rm archlinux bash -C "echo hello world"` It might happen that both of those registries have a container called `archlinux`. In this case podman will stop and ask you to choose. I would like to just default to the first option. Here's a blog post about container registries and podman (which didn't help but it's still interesting): https://www.redhat.com/sysadmin/manage-container-registries
fedilink



How can I move my home folder to an external drive?
Edit: doing this has slowed down the computer. I don't recommend it. I'm going to revert the changes. I would like to move all the content of my home folder to an external drive to preserve the SSD from too many reads and writes when downloading stuff. Would it be safe to just move everything to `/mnt/T/home` and symlink with `ln -s /mnt/T/home /home/user`? The hard drive is configured to mount on system startup. I don't know if this would generate issues with any program that may refuse to follow symlinks. Maybe it's safer to [create a home partition][1] and [move it][2]? [1]: https://www.howtogeek.com/116742/how-to-create-a-separate-home-partition-after-installing-ubuntu/ [2]: https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/
fedilink

[SOLVED] How to connect to postgres database with sea-orm?
I've [installed postgres on manjaro](https://wiki.archlinux.org/title/PostgreSQL), then I've created the user wiki with password wiki. ``` ❯ sudo -iu postgres [postgres@arch-desktop ~]$ createuser -P wiki [postgres@arch-desktop ~]$ psql postgres=# \du Role name wiki ``` And when I try to run [this program](https://codeberg.org/LifeSymbiont/media_wiki/src/commit/e1687774d6ebdb9afacb9d8cad5ab3f6a44b90b0) I get the error ``` thread 'main' panicked at 'Connection Error: error returned from database: database "wiki" does not exist', src/main.rs:53:9 ``` [According to this](https://www.sea-ql.org/sea-orm-tutorial/ch01-01-project-setup.html#connecting-to-the-database-server) ``` // Change this according to your database implementation, // or supply it as an environment variable. // the database URL string follows the following format: // "protocol://username:password@host:port/database" const DATABASE_URL: &str = "postgres://wiki:wiki@localhost:5432"; ``` it shouldn't be using `wiki` as the database name. [In the tutorial](https://www.sea-ql.org/sea-orm-tutorial/ch01-01-project-setup.html#creating-a-database), why is it creating the database after it's already connected to it? Shouldn't it check if the database exists and create it only if it doesn't? If I create the database manually with ``` [postgres@arch-desktop ~]$ createdb media_wiki_db postgres=# ALTER DATABASE media_wiki_db OWNER TO wiki; ``` and use this instead ``` const DATABASE_URL: &str = "postgres://wiki:wiki@localhost:5432/media_wiki_db"; ``` I get the error ``` thread 'main' panicked at 'Execution Error: error returned from database: cannot drop the currently open database', src/main.rs:53:9 ``` thread 'main' panicked at 'Execution Error: error returned from database: permission denied to create database', src/main.rs:53:9 If I use the postgres database ``` const DATABASE_URL: &str = "postgres://wiki:wiki@localhost:5432/postgres"; ``` I get ``` thread 'main' panicked at 'Execution Error: error returned from database: permission denied to create database', src/main.rs:53:9 ``` Probably missing `CREATEDB` permission ``` ❯ sudo -iu postgres [postgres@arch-desktop ~]$ createdb test postgres=# ALTER USER wiki CREATEDB; postgres=# ALTER DATABASE test OWNER TO wiki; postgres=# \l \q Ctrl+D ``` Changed to `const DATABASE_URL: &str = "postgres://wiki:wiki@localhost:5432/test";` ``` ❯ cargo run thread 'main' panicked at 'Connection Error: error returned from database: database "test/media_wiki_db" does not exist', src/main.rs:53:9 ``` What am I doing wrong? How do I connect to the database? Actually what I would like to do is drop the database, recreate it and connect. At least for now.
fedilink

How to close ssh in nested tmux session?
I've opened ssh and it has gone into the tmux session opened in the other computer so now I see two tmux one inside another. Now I don't know how to exit ssh. When I pressed `Ctrl+D` it closed a panel in the nested tmux session. When I tried to detach `Ctrl+B D` it closed the tmux session in my computer.
fedilink


VMs and VM management for your home
What do you use, prefer? I have mostly used KVM with qemu, but I want to try out other things. I have heard of proxmox and all kinds of cool management things, what's a solid setup that supports easy backups and such things? KVM and qemu is solid and pretty easy to understand. Basic control of the VMs can be done with virt-manager, which is a basic but solid tool.
fedilink

How do I install packages from a file on a debian based system?
I want to install a list of packages from a file on a debian based system. But if there is any error I just one to log the package and output a list of packages that couldn't be installed at the end, when every package has finished installing. I don't want to see any other output. I don't want the installation to stop if a package gives an error, like it's missing or can't be installed. I want the packages to be installed without any input whenever possible. This is the function I'm using right now, which I would like to substitute: ``` install_packages() { xargs pacstall -I < pacscripts sudo apt install --ignore-missing $(cat apt-pkglist) } ```
fedilink

How do I use VM as a server?
I want to install HomelabOS on a virtual machine, with a few services like NextCloud, Jellyfin, Pi-hole, Peertube, Funkwhale, PrivateBin. I've installed QEMU/virt manager following [this guide](https://computingforgeeks.com/install-kvm-qemu-virt-manager-arch-manjar/). I've downloaded Ubuntu 20.04.4. It says [here](https://homelabos.com/docs/setup/installation/) that it requires Ubuntu Server 20.04, but I guess it's pretty much the same. ``` sudo pacman -Syyu sudo pacman -S --needed archlinux-keyring qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat ebtables iptables libguestfs sudo systemctl enable --now libvirtd.service // Edit the file /etc/libvirt/libvirtd.conf // unix_sock_group = "libvirt" // unix_sock_ro_perms = "0777" // unix_sock_rw_perms = "0770" sudo usermod -aG libvirt $(whoami) newgrp libvirt sudo systemctl reload-or-restart libvirtd.service ``` What else should I do? I think I need to set bridged network but it's giving me an error. I've selected all the default options during the configuration of the virtual machine in *Virtual Machine Manager*, except for the Network selection, in which I've chosen `Bridge device`, with `Device name` asdfasdf. Unable to complete install: 'Cannot get interface MTU on 'asdfasdf': No such device' ``` Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/createvm.py", line 2001, in _do_async_install installer.start_install(guest, meter=meter) File "/usr/share/virt-manager/virtinst/install/installer.py", line 701, in start_install domain = self._create_guest( File "/usr/share/virt-manager/virtinst/install/installer.py", line 649, in _create_guest domain = self.conn.createXML(install_xml or final_xml, 0) File "/usr/lib/python3.10/site-packages/libvirt.py", line 4400, in createXML raise libvirtError('virDomainCreateXML() failed') libvirt.libvirtError: Cannot get interface MTU on 'asdfasdf': No such device ```
fedilink

/git: permission denied
I reinstalled *Manjaro Cinnamon 21.2.2-220123-linux515* trying to get rid of this error with no luck. I've only copied my dotfiles from an external drive and run the installation script. Whenever I try a `git init` in any empty repository I get `/git: permission denied`. Which doesn't tell me anything. I've found that the error is produced because of this lines in the installation of my dotfiles: ``` sudo tee -a /etc/profile /etc/zshenv /etc/zsh/zshenv &>/dev/null <<EOF export XDG_CONFIG_HOME=$XDG_CONFIG_HOME export ZDOTDIR=$ZDOTDIR EOF ``` If I change the lines appended to those files and restart the system it doesn't give me an error, but then my configuration isn't loaded. But that could mean the error happens anywhere in my configuration and I don't know how to find it.
fedilink

    Create a post

    Ask specific questions about how to do something with linux

    General linux discussion on lemmy.ml

    Create Post From:
    lemmy.ml

    Community icon by Alpár-Etele Méder,
    licensed under CC BY 3.0

    • 0 users online
    • 1 user / day
    • 1 user / week
    • 4 users / month
    • 13 users / 6 months
    • 2 subscribers
    • 22 Posts
    • 20 Comments
    • Modlog
    Heap Overflow
    A place to ask programming questions and share free resources

    General programming discussion,
    Additional resources, challenges

    To post or comment:

    1. Create an account on another lemmy instance
    2. Then search for the community url like here

    RULES:

    1. No politics
    2. No flaming / trolling
    3. No proprietary BS
    4. Stay on topic

    Please keep questions & examples short!

    All content is Public Domain unless otherwise specified.
    Only CC0, CC BY 3.0, or CC BY-SA 3.0 alternate licenses are allowed.

    No affiliation with StackOverflow.com