AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-573838

fixit7's questions

Martin Hope
fixit7
Asked: 2024-09-18 05:17:04 +0800 CST

wnctrl 没有最小化我的终端

  • 7

这有效。

xdotool search  "Mozilla Firefox" windowminimize

但这并没有最小化我的终端。

xdotool search  "Terminal" windowminimize
Defaulting to search window name, class, and classname

wmctrl -l
0x01400003 -1 andy-To-be-filled-by-O-E-M Top Panel
0x01400017 -1 andy-To-be-filled-by-O-E-M Bottom Panel
0x01400025 -1 andy-To-be-filled-by-O-E-M Top Panel
0x01600006 -1 andy-To-be-filled-by-O-E-M Desktop
0x02800007  0 andy-To-be-filled-by-O-E-M Downloads - Thunar
0x0360003e  0 andy-To-be-filled-by-O-E-M How to minimize an application window from command line - Unix & Linux Stack Exchange — Mozilla Firefox
0x03800006  0 andy-To-be-filled-by-O-E-M Terminal
0x03c00007  0 andy-To-be-filled-by-O-E-M *untitled - Geany

为什么我的终端没有被最小化?

command-line
  • 1 个回答
  • 21 Views
Martin Hope
fixit7
Asked: 2024-01-29 06:34:45 +0800 CST

我可以调整亚马逊视频的亮度吗

  • 4

我运行的是 Ubuntu-Mate 22.04。

我播放亚马逊视频时,光线通常很低。

我进行了搜索,但找不到任何有用的东西。

有没有办法可以提高这些亮度?

22.04
  • 1 个回答
  • 64 Views
Martin Hope
fixit7
Asked: 2023-11-25 12:17:03 +0800 CST

定时器程序依次播放 4 个声音,每个声音 30 秒

  • 4

有人可以帮助我吗?我需要一个 bash 脚本来播放一个短声音文件,等待 30 秒,播放另一个声音文件,再等待 30 秒。

(我会以此作为提醒,在使用电动牙刷时,在牙齿的每个象限上花费 30 秒。)

mpg123 /usr/share/sounds/My_Sounds/Alarm_Clock_Sound.mp3
sleep 30
mpg123 /usr/share/sounds/My_Sounds/Alarm-sound-buzzer.mp3
sleep 30
mpg123 /usr/share/sounds/My_Sounds/facility-alarm.mp3
sleep 30

但它只播放第一个声音文件。??

20.04
  • 2 个回答
  • 209 Views
Martin Hope
fixit7
Asked: 2023-11-18 11:53:45 +0800 CST

查看亚马逊电影时隐藏鼠标光标[重复]

  • 4
这个问题在这里已经有了答案:
如何隐藏鼠标光标 (7 个回答)
在 X 显示器上闲置几秒后隐藏鼠标 (1 个回答)
昨天关门了。

有没有办法在观看亚马逊电影时隐藏鼠标光标?

当我停止观看电影时没有禁用它。

我还经常需要调整音量,这确实需要我的鼠标。

确实是一个难题。:-)

谢谢。

20.04
  • 2 个回答
  • 48 Views
Martin Hope
fixit7
Asked: 2023-11-06 10:51:05 +0800 CST

防止打开的终端被关闭

  • 9

已经过去很长时间了,我对自己的命令已经生疏了。

我使用脚本来进行提醒。我运行的一个会显示“流星雨发生在午夜之后”。3小时后。

有没有办法防止我意外关闭正在运行计时器脚本的终端?

更新:

这是我的脚本。

#!/bin/bash
#
#  Sound alarm after specifying time and message 
# Must input time delay AND message in double quotes !!
#
#       
# ** sleep can also accept intergers ex. sleep 7.63
# Made alias for it type al 

    # Print a trace of simple commands, for commands, case commands, select commands, 
    # and arithmetic for commands and their # arguments or associated word lists after they are expanded 
    # and before they are executed. The value of the PS4 variable is # expanded and the resultant value is printed before the # command and its expanded arguments.

Red='\e[0;31m'     
BRed='\e[1;31m' 
BIRed='\e[1;91m' # ${BIRed} this works
Gre='\e[0;32m'     
BGre='\e[1;32m'
BBlu='\e[1;34m' # ${BBlu}
BWhi='\e[1;37m'
Black='\e[0;30' 
BWhite='\e[0m 1;37'
# This defines a variable containing the ANSI escape sequence to clear
# the effect of all previous ANSI escape sequences that define formatting (colors, underlining, etc).
RCol='\e[0m'; 

            

soundfile="/usr/share/sounds/My_Sounds/Alarm_Clock_Sound.mp3"

clear
amixer -D pulse sset Master 40% > /dev/null 2>&1
if [ -f "$soundfile" ];
then
     echo -e "${BGre}Soundfile is present."
else
      
  echo "File $soundfile does NOT exist."
  echo
  echo "Program will now exit."
  exit
fi

[ -z "$2" ] && {
echo 
echo -e " ${BIRed}Error!! No time value given and/or message specified !!"
echo
echo -e "   ${BBlu}Alarm Program 2018 ${RCol}"
echo
echo -e "   alarm.sh [time value in seconds] Message in double Quotes"; 
echo -e "   alarm 5m   = 5 minute alarm"
echo -e "   alarm 5h   = 5 hour alarm"
echo -e "   alarm 5d   = 5 day alarm"
echo -e "   alarm 1.5m = 1 minute 30 seconds alarm"
echo 
echo -e "   alarm.sh 1m "\"Take bread out of oven."\""  

echo 
exit 1; }
echo  -e "\033[32;5mTIMER COUNTING DOWN to $1 \033[0m"
sleep $1
{
    for ((volume = 15; volume <= 35; volume += 2)); do
        # 2> /dev/null suppresses messages for amixer AND (c)vlc
        amixer -D pulse sset Master ${volume}% > /dev/null
        sleep .5
    done
} &

mpg123 $soundfile > /dev/null 2>&1
#set back to original volume
amixer -D pulse sset Master %30

gxmessage -fg blue -font  'sans 20' -timeout 2 ' Tea is ready. !!'






 
command-line
  • 2 个回答
  • 804 Views
Martin Hope
fixit7
Asked: 2023-04-25 05:26:58 +0800 CST

如何将一些 .jpg 文件批量转换为 .png 文件

  • 5

我想将一些 .jpg 文件转换为 640x480 大小。

我查看了我的 Ubuntu_Tips.odt 文件并找到了这个。

Convert png to a 640x480 png.
 convert Screenshot_1360x768.png -resize 640x480! 640smaller.png

我在 /home/andy/Downloads/ 中有 8 个这样的文件。

有没有办法将这些 .jpgs 文件批量转换为较小的文件大小?

谢谢。

ubuntu-mate
  • 1 个回答
  • 34 Views
Martin Hope
fixit7
Asked: 2023-02-17 23:46:03 +0800 CST

如何更改 DVD 目录的名称

  • 5

我让 K3b 将一些数据刻录到可重写的 DVD 上。

我的文件管理器将其显示为“K3b 数据项目”

我想将它重命名为一个合理的名称,如 DVD_Disk。

sudo mv '/media/andy/K3b data project' DVD
mv: cannot move '/media/andy/K3b data project' to 'DVD': Device or resource busy
andy@7 /media/andy> 

我怎样才能做到这一点?

dvd
  • 1 个回答
  • 19 Views
Martin Hope
fixit7
Asked: 2022-12-19 15:15:26 +0800 CST

新键盘没有睡眠按钮

  • 5

我有一个新键盘(联想),但它没有我经常使用的睡眠键。

我有一个脚本来暂停。

我可以使用一个很少使用的键,比如暂停/中断键,并按下它让我的电脑进入挂起模式吗?

我已经安装了 xbindkeys。

20.04
  • 1 个回答
  • 14 Views
Martin Hope
fixit7
Asked: 2022-12-05 15:17:59 +0800 CST

需要获取有关我的传感器、风扇速度等的更多信息

  • 6

我的传感器在 18.04 中工作,但在 20.04 中遇到困难

我安装了传感器并运行 sensors-detect 选择默认选项。

我很高兴有机会了解我下一步需要做什么。

谢谢。

sensors
k10temp-pci-00c3
Adapter: PCI adapter
temp1:         +2.1°C  (high = +70.0°C)
                       (crit = +80.0°C, hyst = +79.0°C)

radeon-pci-0008
Adapter: PCI adapter
temp1:         +2.0°C  (crit = +120.0°C, hyst = +90.0°C)

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:           N/A  (crit =  65.19 W)

还有我的硬件信息。不确定您是否需要其他信息。

sudo dmidecode | more

Base Board Information (Mother board)
    Manufacturer: Gigabyte Technology Co., Ltd.
    Product Name: F2A68HM-H

BIOS Information
        Vendor: American Megatrends Inc.
        Version: FB
        Release Date: 04/22/2015

AMD A8-7600 Radeon R7, 10 Computer Cores 4C+6G x 4

尝试一些成员建议的其他一些事情:

 E: Package 'hddtemp' has no installation candidate 

Psensors does not show fan speeds. 

我试过这个来安装 hddtemp。

我试过这个

sudo apt update wget http://archive.ubuntu.com/ubuntu/pool/universe/h/hddtemp/hddtemp_0.3-beta15-53_amd64.deb sudo apt install ./hddtemp_0.3-beta15-53_amd64.deb 得到下载由于用户“_apt”无法访问文件“/home/andy/hddtemp_0.3-beta15-53_amd64.deb”,因此以 root 身份执行非沙箱化。- pkgAcquire::Run(13:权限被拒绝)

20.04
  • 2 个回答
  • 46 Views
Martin Hope
fixit7
Asked: 2022-12-02 20:33:04 +0800 CST

没有这样的文件或目录 - 文件存在

  • 6

enter code here我不明白为什么会收到“没有这样的文件...”错误。

fstab 在 home/andy/Downloads/

这是我的备份脚本中的相关内容。

# Backup fstab
cat /etc/fstab > home/andy/Downloads/fstab
tar -cvf fstab.tar home/andy/Downloads/fstab
rsync --progress -r -u fstab.tar $Backup_Directory
rsync --progress -r -u fstab.tar $Local_Backup_Dir

和输出。

Thunar_Settings.tar
10,240 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1) sending incremental file list
-rw-rw-r--         10,240 2022/12/01 22:27:27 Thunar_Settings.tar
/home/andy/bin/Backup_20_04.sh: line 79: home/andy/Downloads/fstab: No such file or directory
tar: home/andy/Downloads/fstab: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

我将 / 添加到适当的位置。

tar:从成员名称 /home/andy/Downloads/fstab 中删除前导“/”,发送增量文件列表 fstab.tar

它创建 tar 文件并将其发送到 2 个位置。

bash
  • 1 个回答
  • 30 Views
Martin Hope
fixit7
Asked: 2022-12-01 20:01:53 +0800 CST

创建不包含目录的 tar 文件

  • 8

我是相当新的使用 tar 的人,过去曾使用过 zip 文件。

我只想创建不包含目录的 tar 文件。

我去了这里,但发现它有点混乱。

https://www.baeldung.com/linux/tar-archive-without-directory-structure

# Backup crontab
crontab -l > /home/andy/bin/crontab_backup.txt
tar -cvf /home/andy/bin/crontab_backup.tar /home/andy/bin/crontab_backup.txt
20.04
  • 3 个回答
  • 691 Views
Martin Hope
fixit7
Asked: 2022-11-30 07:05:14 +0800 CST

从台式电脑拨打电话

  • 10

我的桌面系统上有麦克风和摄像头。

我希望能够使用电脑拨打电话。

我使用缩放,所以它看起来应该是可行的。

可以使用 Ubuntu Mate 吗?

20.04
  • 2 个回答
  • 1065 Views
Martin Hope
fixit7
Asked: 2022-10-01 14:05:44 +0800 CST

autofs 的问题

  • 0

我需要有关 autofs 的帮助。这有点复杂。

我被困在这一点上。我没有 /data 目录。

The/data directory and the subdirectories fs1/, fs2/, and fs3/ should be automatically created, as you can see in the screenshot below.
$ ls /data

https://imgur.com/a/8mvbROE

https://linuxhint.com/mount-filesystems-automatically-on-demand-using-autofs/

这是我的 auto.sda2

/dev/sda2   ext3    UUID=5b4b2ae5-9aaa-4559-9f41-afb313998c75

我的汽车大师

#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc  /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
#   "nosuid" and "nodev" options unless the "suid" and "dev"
#   options are explicitly given.
#
#/net   -hosts
#
# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/etc/auto.sda2
ubuntu-mate
  • 1 个回答
  • 25 Views
Martin Hope
fixit7
Asked: 2022-09-22 14:47:22 +0800 CST

在脚本中捕获 Ctrl+C

  • 1

我有这个正是我想要的方式。

但是我可以弄清楚如何捕获Ctrl+ C,这样如果我想提前结束脚本,它可以重新启用挂起和休眠模式。

我查看了其他关于捕获Ctrl+的讨论C,但没有发现任何帮助。

谢谢。

#     TimerInTerminal.sh

# To prevent your Linux system from suspending or going into hibernation, you need to disable the following systemd targets:
# sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

# To re-enable the suspend and hibernation modes, run the command:
# sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

soundfile="/usr/share/sounds/My_Sounds/Electronic_Chime.wav"
# Stop computer from sleeping while timer is running

# prevent your Linux system from suspending or going into hibernation
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

# This allows supend ?
#trap "echo marlin | sudo -S systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target" INT EXIT

if [ $# -eq 1 ]
then
    DURATION="$1"
else
    read -r -p "Timer for how many minutes?( for fractional, use decimal notation , 0.5==30s, 1.25==75s etc) : "  DURATION
    read -r -p "Enter text to display at the end of the timer : " n1
fi

DURATION=$(echo "$DURATION * 60 / 1" | bc) # lets us deal with fractional inputs

START=$(date +%s)   # only do this once (anchor's the time)

countdown () {
    NOW=$(date +%s)              # Get time now in seconds
    DIF=$((NOW - START))         # Compute diff in seconds
    ELAPSE=$((DURATION - DIF))   # Compute elapsed time in seconds
    MINS=$((ELAPSE / 60))        # Convert to minutes... (dumps remainder from division)
    SECS=$((ELAPSE - (MINS*60))) # ... and seconds
    #banner "$MINS:$SECS"
    echo "$MINS:$SECS"
    sleep "$1"
}

while true 
do
    clear
    
    countdown 0 # calc time remaining
    
    if [ $MINS -le 0 ]
    then
        # Blink screen

        while [ $SECS -gt 0 ]
        do
            
            clear # Flash on
            #setterm -term linux -back red -fore white 
            countdown 0.5

            clear # Flash off
            #setterm -term linux -default
            countdown 0.5

        done # End for loop
        
        setterm -term linux -default
        clear
        
        break   # time has expired lets get out of here
    
    else
        countdown 1 
    fi
done

echo $n1
amixer -D pulse sset Master 30% > /dev/null 2>&1
# Play a sound
cvlc --play-and-exit "$soundfile" > /dev/null 2>&1

# To re-enable the suspend and hibernation modes, run the command:
 echo marlin | sudo -S systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

这行得通。我不会在 ctrl_c 中插入我的整个代码,看看会发生什么。

 #!/bin/bash
    # trap ctrl-c and call ctrl_c()
    trap ctrl_c INT
    
    function ctrl_c() {
            echo "** Trapped CTRL-C"
    echo System will now have suspension/hibernation halted.
    
    # prevent your Linux system from suspending or going into hibernation
    sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
    sleep 10
}
ctrl_c
bash
  • 1 个回答
  • 117 Views
Martin Hope
fixit7
Asked: 2022-09-17 18:00:14 +0800 CST

不带 -r 读取会破坏反斜杠

  • 0
cd $Script_Dir
clear
read -p "Enter name of script to run shellcheck on. -> " n1
shellcheck "$n1" 

In shellchk.sh line 10:
read -p "Enter name of script to run shellcheck on. -> " n1
^-- SC2162: read without -r will mangle backslashes.

为什么这么说?我永远不会在文件名中使用反斜杠。

如果我使用

read -r "Enter name of script to run shellcheck on. -> " n1

/home/andy/bin/nshellchk.sh: line 11: read: `Enter name of script to run shellcheck on. -> ': not a valid identifier
: : openBinaryFile: does not exist (No such file or directory)
bash
  • 1 个回答
  • 47 Views
Martin Hope
fixit7
Asked: 2021-07-29 14:25:03 +0800 CST

依赖无法满足:openjdk-14-jre-headless

  • 2

我正在尝试安装frostwire 6.9.4,但收到此消息。

This package is uninstallable
Dependency is not satisfiable: openjdk-14-jre-headless

我在 UbuntuMate 18.04 中使用了frostwire-6.9.4.amd64.deb

18.04
  • 1 个回答
  • 393 Views
Martin Hope
fixit7
Asked: 2021-03-12 12:15:29 +0800 CST

我的主目录的较短名称

  • 0

我有 2 个版本的 Ubuntu-Mate,18.04 和 20.04。

这是我 20.04 的主目录。

/media/andy/81353260-b5a5-4b72-9fce-432e7c620fdc/home/andy/

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=5b4b2ae5-9aaa-4559-9f41-afb313998c75 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

有没有办法可以将名称更改为更用户友好和更短的名称。

20.04
  • 4 个回答
  • 115 Views
Martin Hope
fixit7
Asked: 2021-02-04 07:12:18 +0800 CST

查找软件更新程序图标的位置

  • 0

我制作了一个脚本来启动软件更新程序。现在我正在尝试找到它的图标。

但是,我的搜索发现了很多这样的图标。比如在 /usr/share/icons/hicolor/ 等。

如何找到 Ubuntu 用于软件更新程序的图标?

是否有适用于任何程序的方法?

icons
  • 1 个回答
  • 109 Views
Martin Hope
fixit7
Asked: 2020-08-21 13:45:32 +0800 CST

程序使用的空间列表

  • 3

我想获得程序使用的空间的列表,最好首先列出最大的空间。

我只保留 18.04,因为 20.04 “损坏”了我的佳能 TS9120 扫描仪。

然后我可以卸载那些不需要的程序。

installed-programs ubuntu-mate
  • 1 个回答
  • 94 Views
Martin Hope
fixit7
Asked: 2020-08-12 17:22:50 +0800 CST

每 30 分钟清空一次垃圾

  • 1

我希望我的垃圾每 30 分钟清空一次。

我安装了 Autotrash,但它指定了天数。

有替代方案吗?

trash ubuntu-mate
  • 1 个回答
  • 173 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

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

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve