SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / user-829705

metichi's questions

Martin Hope
metichi
Asked: 2022-04-27 04:22:06 +0800 CST

Can you use keyboard and mouse sharing in wayland?

  • 3

With each new ubuntu version I've tried to give wayland another chance. But one of the reasons I end up going back to xorg is the fact that Barrier does not seem to work properly under wayland.

Is there any alternative software that lets me share mouse and keyboard between two computers that runs under wayland?

keyboard
  • 0 Answers
  • 223 Views
Martin Hope
metichi
Asked: 2021-05-22 15:11:51 +0800 CST

Can you run only part of a script as sudo on startup?

  • 1

I got a Lenovo Yoga 7i, there is a known issue with its audio card on the current kernels where it wont output sound through the speakers.

There is, however, a hackish solution described here where, after doing the setup, you run this script and the audio works

#!/bin/bash
sudo rtcwake -m mem -s 1
while true
do
  echo -n -e '\x00' | padsp tee /dev/audio
  sleep 5
done

The problem with this script is that in order to run rtcwake, you seem to need to run it as sudo, meaning you need to input the password making it useless as a startup script. But running the script as root from the start means that the while loop outputs the error tee: /dev/audio: Connection refused over and over.

How can I run this script, that only uses parts of it as sudo, on startup from any user?

bash
  • 1 Answers
  • 95 Views
Martin Hope
metichi
Asked: 2021-04-29 13:49:47 +0800 CST

Can you still use x.org in 21.04?

  • 7

I installed 21.04 on my laptop to try it out, and now it comes with wayland as the default.

However, I'm noticing some issues with my digital drawing tablet and I wanted to switch to x.org to see if it is related to that, only that I can't see the little cogwheel that would let me do so on the log in screen.

Am I missing a step, is it possible to do it still?

EDIT: I may be silly but it finally showed up, I'll just close the post but it appears after clicking on an user and not before as I thought it might.

xorg
  • 1 Answers
  • 3295 Views
Martin Hope
metichi
Asked: 2020-09-17 03:23:26 +0800 CST

How would you make a "shared /home" partition for Windows and Ubuntu dual boot?

  • 2

I have been using Ubuntu as my only OS for a couple of years now, but from time to time, due to compatibility issues with some software I want to use (mainly games or drawing programs) I have installed Windows alongside.

One of the big reasons I end up removing Windows every time is how much of a hassle is to keep my files up to date in both OS. Art files, documents, videos, stuff I downloaded... making sure the latest version is always available is a bit of a pain that requires a few reboots to move from ext4 to a ntfs partition if you aren't that good at planning ahead.

How would you set up your drive so the files in your /home are available to both OS? Just making your /home partition an ntfs one? Some other way?

dual-boot partitioning ext4 ntfs
  • 1 Answers
  • 1926 Views
Martin Hope
metichi
Asked: 2020-07-07 07:14:37 +0800 CST

Is there a way to have a windows-like google drive client?

  • 1

You can mount your google drive into ubuntu by using gnome online accounts, but this has pretty low performance as it seems it has to download each file to open it and upload every time you want to save directly to it.

Is there a way to mount your google drive the way the windows client does it? Where the files are stored locally and, whenever there is a change locally or remotely, it syncs?

I also know of google-drive-ocalmfuse, but I am not sure if that one is syncing a local directory or mounting a remote one.

mount google-drive
  • 0 Answers
  • 86 Views
Martin Hope
metichi
Asked: 2020-07-06 03:46:38 +0800 CST

Can you keep a gui application running with ssh x11 forwarding after closing the ssh connection?

  • 3

There is an electron app I want to run in a remote machine, and it works through an ssh -X connection.

The thing is that I would like that application to continue running even after I close the connection, and be able to resume it's execution at a later point. Is this possible?

ssh x11-forwarding
  • 1 Answers
  • 188 Views
Martin Hope
metichi
Asked: 2020-04-30 06:11:01 +0800 CST

Pidgin missing libnotify plugin on ubuntu 20.04

  • 4

I installed pidgin when I upgraded to ubuntu 20.04, and realized immediately that notifications were not working properly and I could not close the buddy list without also closing the chat window.

When I went to check on the libnotify plugin, I realized it was no longer on the list, how can I add it again? I can't seem to find a download link to the standalone plugin anywhere.

pidgin libnotify
  • 2 Answers
  • 1126 Views
Martin Hope
metichi
Asked: 2020-02-14 07:47:29 +0800 CST

How can you change a program's repository/install from a specific one?

  • 1

I am curious for both answers since a brief google didn't show any result. But I was wondering how would you handle installing a program that has the same name in two different repositories. Or changing one already installed so it receives updates from a new one.

Specifically what brought this to attention is OBS studio, since it's included in the default Ubuntu repositories, but the obsproject repo has a higher version of the program.

repository apt obs-studio
  • 2 Answers
  • 749 Views
Martin Hope
metichi
Asked: 2019-12-17 07:01:46 +0800 CST

Show progress in nautilus for custom script

  • 6

I'm using ubuntu 19.10 without any modifications and I got a couple scripts set up so I can execute them with the contextual right click menu.

The thing is, once they are going, they are completely silent, and I don't really know whether they are executing or how to interrupt them.

Is there anything I can add to my script so it shows a progress bar in the browser the same way copying a file or compressing a file does?

nautilus scripts bash
  • 0 Answers
  • 62 Views
Martin Hope
metichi
Asked: 2019-12-10 02:45:57 +0800 CST

How to prevent a cronjob from executing if another instance is already running?

  • 2

I want to record a stream whenever it is live automatically, so I thought of setting a cronjob that runs youtube-dl every 15 minutes to that url.

But once it is recording, how do I prevent the system from starting another recording 15 minutes later simultaneously?

cron
  • 1 Answers
  • 1062 Views
Martin Hope
metichi
Asked: 2019-11-18 06:16:08 +0800 CST

Can you remove a device from the Output Audio Devices list?

  • 3

I am using ubuntu 19.10 and one of my monitors is connected through HDMI to my computer, but it does not have any speakers.

However, a lot of times, whenever I unplug my USB headset or reboot my computer, the HDMI audio output gets selected as the default device and I have to manually change it.

Since it won't ever be an audio output, is there a way to remove it from the list altogether?

sound pulseaudio hdmi 19.10
  • 0 Answers
  • 903 Views
Martin Hope
metichi
Asked: 2019-10-03 09:51:42 +0800 CST

How to measure for how long a window is active?

  • 2

I am a digital artist, using Clip Studio Paint (a Windows app) to draw, through Wine. It would be interesting to know how many hours each piece takes me. But being how I am, most of the time I just forget to set up a chronometer to measure or to stop it after I end or during a break.

Would it be possible to have a script that logs how much time a window is active, so I can add that up and get a time?

EDIT: When I talk about the window being active, I specifically talk about the window being in focus, not just the program running, so that if I get distracted and alt-tab out I can get later a closer idea of how much I actually worked.

wine window-manager productivity
  • 1 Answers
  • 109 Views
Martin Hope
metichi
Asked: 2019-08-27 11:41:04 +0800 CST

Can you get separate workspaces in separate screens?

  • 5

I am running ubuntu 19.04 with 2 monitors. Right now, my options to switch workspaces are to either switch workspaces in the primary display while the other one doesn't change, or switch both of them at once.

I would love to have the option to also switch workspaces in the secondary while keeping primary static, or change each of them to arbitrary spaces and get any configuration.

Is there any way to get gnome to do this? Is there any other desktop environment with a feature like the one I described?

gnome multiple-monitors workspaces
  • 0 Answers
  • 1529 Views
Martin Hope
metichi
Asked: 2019-06-30 02:58:37 +0800 CST

Is there a standalone nintendo switch pro controller driver without steam?

  • 5

You can connect the Nintendo Switch Pro controller to an ubuntu desktop in 2 ways, bluetooth or wired.

Out of the box, the wired connection staight up not works, it is detected but no inputs are registered. The bluetooth version is functional using a generic gamepad driver, but it does not support things like rumble or motion control and it does not allow for the controller to turn itself off after disuse.

It does work flawlessly once you launch Steam however, wich can handle all the features of the pro controller. But it seems like a bit overkill having to launch steam just to be able to use it properly.

Is there a standalone driver for the Pro Controller that does not require me to launch Steam?

drivers gamepad steam
  • 1 Answers
  • 3678 Views
Martin Hope
metichi
Asked: 2019-06-13 02:14:21 +0800 CST

What is the best way to rename files and directories recurively on bash?

  • 1

I am trying to make a script to rename a lot of files and directories in bulk. But I'm having trouble making it move through every file and subfile.

My script right now is this

#! /bin/bash

function _setname {
    for file in "$@"
    do
        oldname=$(basename "${file}")
        newname=$(echo "${oldname}" | tr '?%*:|' '_' )
        echo "${newname}"
        [ ! "${oldname}" = "${newname}" ] && mv "${oldname}" "${newname}"
    done
}
function _recursivename {
    for file in "$@"
    do
        currentpath="$(pwd)"
        cd "$(dirname ${file})"
        oldname="$(basename ${file})"
        newname="$(_setname ${oldname})"

        [ -d "${newname}" ] && _recursivename ./"${newname}"/*

        cd "${currentpath}"
    done
}
_recursivename "${@}"
exit

It breaks when it reaches the bottom of a directory tree and has to go back up, currentpath has been overwritten and does not return to the beginning to look for a 2nd subdirectory.

I don't get why currentpath gets overwritten, or how to do it properly.

EDIT: Just had to declare it local, I thought it was declared local by defining it inside a function.

scripts command-line bash
  • 1 Answers
  • 55 Views
Martin Hope
metichi
Asked: 2019-06-12 03:02:44 +0800 CST

Can you copy files with invalid filenames to ntfs and change the name automatically?

  • 1

I have a bunch of files spread over a lot of folders in an ext4 disk. Some of those files have illegal characters for ntfs (like : or | ) and so I get errors when I try to copy them to be seen in Windows.

Is there any tool that will let me copy the files and change the names as needed, or do I need to write my own?

ntfs
  • 1 Answers
  • 1806 Views
Martin Hope
metichi
Asked: 2019-05-30 02:32:14 +0800 CST

Can you quote a random string without knowing if it contains special characters?

  • 1

I'm having trouble inputting random generated passwords into some scripts.

I generate the password, and paste it between "". But sometimes it contains characters that sends the whole thing crashing down, like " # or whatever.

EDIT: I have been pointed to Quoting for a solution

There are several options for Quoting ( using \ , " " and ' ' ) but each require checking the string for special characters, like single quotes in a single quote block. Is there a way to really paste a string without needing to check it or is doing that check always necessary when your random string can contain the ' character at least.

command-line bash
  • 1 Answers
  • 125 Views
Martin Hope
metichi
Asked: 2019-05-01 08:09:18 +0800 CST

Is it possible to save and load a display configuration?

  • 1

I have 2 displays for my computer, and a lot of times I need to change the configuration (from extended desktop to single desktop, changing wich one is the main screen, etc etc)

I wonder if there is a way to save and load these configurations for quick access in the future. I am aware of the existence of xrandr and I know it will probably be possible to write an alias for each setting, just wondering if there is an easier way or am I going to read the manual for it and do it that way.

display
  • 2 Answers
  • 2164 Views
Martin Hope
metichi
Asked: 2019-04-13 03:11:26 +0800 CST

How to manually create a thumbnail for one file using another file

  • 1

I draw a lot with Clip Studio Paint, wich works almost flawlessly with wine, but the only major caveat is that the original files are in a format that doesn't have thumbnail support in linux (as far as I can tell).

For most files I will have 2 versions. File.clip (the CSP format) and File.png. I would like to use .png (or its thumbnail) as a thumbnail for File.clip.

So, how would you add a thumbnail to a random file from the command line?

Im working in ubuntu 18.04 and nautilus.

Edit: Changed the description of what I want to do exactly to make it clearer.

nautilus thumbnails
  • 1 Answers
  • 364 Views
Martin Hope
metichi
Asked: 2019-04-08 03:35:49 +0800 CST

Workspaces or fullscreen only in secondary monitor?

  • 3

I am working with two monitors, big and small. I use big as my primary and small is the one I use most to reference stuff.

The issue is that workspaces only switch the view on the primary and leave the secondary static. And full screen aplications (like games) or certain wine programs (that I need to use often) also default to the primary.

So, what I would like is to keep Big static with only one workspace, but make fullscreen games and stuff default to it. And give the multiple workspaces to Small. Either by making secondary monitor the multiple workspaces or by making Small the primary and making the secondary default for fullscreens.

TLDR: How to make only the secondary monitor switch workspaces? And if not possible, how to make games and wine aplications default to secondary monitor?

gnome multiple-monitors wine workspaces fullscreen
  • 1 Answers
  • 443 Views

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    How to install Google Chrome

    • 8 Answers
  • Marko Smith

    Is there a command to list all users? Also to add, delete, modify users, in the terminal?

    • 9 Answers
  • Marko Smith

    How to delete a non-empty directory in Terminal?

    • 4 Answers
  • Marko Smith

    How to unzip a zip file from the Terminal?

    • 9 Answers
  • Marko Smith

    How can I copy the contents of a folder to another folder in a different directory using terminal?

    • 8 Answers
  • Marko Smith

    How do I install a .deb file via the command line?

    • 11 Answers
  • Marko Smith

    How do I run .sh scripts?

    • 16 Answers
  • Marko Smith

    How do I install a .tar.gz (or .tar.bz2) file?

    • 14 Answers
  • Marko Smith

    How to list all installed packages

    • 24 Answers
  • Marko Smith

    Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

    • 25 Answers
  • Martin Hope
    Flimm How can I use docker without sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp How do I save terminal output to a file? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd How to unzip a zip file from the Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    pandisvezia How can I copy the contents of a folder to another folder in a different directory using terminal? 2011-12-11 17:19:37 +0800 CST
  • Martin Hope
    TheXed How do I install a .deb file via the command line? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan How to list all installed packages 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry How do I determine the total size of a directory (folder) from the command line? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "The following packages have been kept back:" Why and how do I solve it? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford How can PPAs be removed? 2010-07-30 01:09:42 +0800 CST

Related Questions

Trending Tags

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve