我运行的是 Ubuntu-Mate 22.04。
我播放亚马逊视频时,光线通常很低。
我进行了搜索,但找不到任何有用的东西。
有没有办法可以提高这些亮度?
我运行的是 Ubuntu-Mate 22.04。
我播放亚马逊视频时,光线通常很低。
我进行了搜索,但找不到任何有用的东西。
有没有办法可以提高这些亮度?
有人可以帮助我吗?我需要一个 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
但它只播放第一个声音文件。??
有没有办法在观看亚马逊电影时隐藏鼠标光标?
当我停止观看电影时没有禁用它。
我还经常需要调整音量,这确实需要我的鼠标。
确实是一个难题。:-)
谢谢。
已经过去很长时间了,我对自己的命令已经生疏了。
我使用脚本来进行提醒。我运行的一个会显示“流星雨发生在午夜之后”。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. !!'
我想将一些 .jpg 文件转换为 640x480 大小。
我查看了我的 Ubuntu_Tips.odt 文件并找到了这个。
Convert png to a 640x480 png.
convert Screenshot_1360x768.png -resize 640x480! 640smaller.png
我在 /home/andy/Downloads/ 中有 8 个这样的文件。
有没有办法将这些 .jpgs 文件批量转换为较小的文件大小?
谢谢。
我让 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>
我怎样才能做到这一点?
我的传感器在 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:权限被拒绝)
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 个位置。
我是相当新的使用 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
我需要有关 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://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
我有这个正是我想要的方式。
但是我可以弄清楚如何捕获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
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)
我正在尝试安装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
我有 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
有没有办法可以将名称更改为更用户友好和更短的名称。
我制作了一个脚本来启动软件更新程序。现在我正在尝试找到它的图标。
但是,我的搜索发现了很多这样的图标。比如在 /usr/share/icons/hicolor/ 等。
如何找到 Ubuntu 用于软件更新程序的图标?
是否有适用于任何程序的方法?
我想获得程序使用的空间的列表,最好首先列出最大的空间。
我只保留 18.04,因为 20.04 “损坏”了我的佳能 TS9120 扫描仪。
然后我可以卸载那些不需要的程序。
我希望我的垃圾每 30 分钟清空一次。
我安装了 Autotrash,但它指定了天数。
有替代方案吗?
这是来自突触。
statically-linked version of the ext2/ext3/ext4 filesystem checker
This may be of some help to you if your filesystem gets corrupted enough
to break the shared libraries used by the dynamically linked checker.
This binary takes much more space than its dynamic counterpart located
in e2fsprogs, though.
You may want to install a statically-linked shell as well, to be able
to run this program if something like your C library gets corrupted.
这是什么意思?
This binary takes much more space than its **dynamic counterpart** located
in e2fsprogs, though.