Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
2 answers
27177 views
how can I set a right click and open terminal in context menu
I am using Debian 10.1 See the following screenshot. [![right click and no terminal][1]][1] I am used to a Ubuntu environment where I do a right click and terminal opens. Is this kind of a thing possible for Debian environment. If it is possible please let me know how can I enable it? If the same ca...
I am using Debian 10.1 See the following screenshot. right click and no terminal I am used to a Ubuntu environment where I do a right click and terminal opens. Is this kind of a thing possible for Debian environment. If it is possible please let me know how can I enable it? If the same can be added to context menu like in the screenshot I see following three options 1)Change Background 2)Display Settings 3)Settings Here can I add the option in black menu in screenshot to open terminal (I am not referring to the Ctrl+Alt+T to open terminal) some how tweaking gnome? **edit** based on discussion below package **gnome-tweak-tool** and **nautilus-extension-gnome-terminal** were installed. Then when required setting were not found as in videos here 1)https://youtu.be/scOYZZIyoM4 2) https://www.youtube.com/watch?v=scOYZZIyoM4&feature=youtu.be gsettings get org.gnome.desktop.background show-desktop-icons has been set to true gsettings set org.gnome.desktop.background show-desktop-icons true Still the desired results have not been achieved. What I want is I do a right click on any area on my desktop and in the context menu I want to see an option to open terminal.
political science (151 rep)
Oct 31, 2019, 02:32 PM • Last activity: Jul 13, 2025, 02:06 PM
3 votes
2 answers
3437 views
Chrome: font size of tabs, bookmarks' bar etc
Depending on the DPI settings, the fonts used in the Chrome user interface may be the wrong size, because Chrome (2018.07.22) respects the DPI settings when it renders web pages' content, but not when it draws the UI. E.g., my 13.3", 1366x768 display has approximately 118 DPI both in the horizontal...
Depending on the DPI settings, the fonts used in the Chrome user interface may be the wrong size, because Chrome (2018.07.22) respects the DPI settings when it renders web pages' content, but not when it draws the UI. E.g., my 13.3", 1366x768 display has approximately 118 DPI both in the horizontal and the vertical direction and when I use that value a 12pt font in a web page is, approximately, 12 points on my screen but the font in the UI is a bit largish, the bookmarks' bar is truncated and the tabs are a bit crowded. Chromium developers made clear that changing the font of the UI is not something they're going to support, I see that it is possible to circumvent the problem on Windows, what can be done on Linux?
gboffi (1376 rep)
Jul 22, 2018, 02:32 PM • Last activity: Apr 28, 2025, 01:03 PM
2 votes
0 answers
43 views
How do I increase the Debian window header button size?
I made a DIY DAB radio using a Raspberry Pi 5 and a 7-inch 1024x600px HDMI screen, running Raspberry Pi OS (Debian 12). The problem is, that the header buttons of each window is too small for operation reliable using the touchscreen. [![DAB radio screenshot for illustration][1]][1] I tried the follo...
I made a DIY DAB radio using a Raspberry Pi 5 and a 7-inch 1024x600px HDMI screen, running Raspberry Pi OS (Debian 12). The problem is, that the header buttons of each window is too small for operation reliable using the touchscreen. DAB radio screenshot for illustration I tried the following - gsettings get org.gnome.desktop.interface gtk-theme returns 'PiXnoir' - nano /usr/share/themes/PiXnoir/gtk-3.0/gtk.css shows @import url("../../PiXflat/gtk-3.0/gtk-contained.css"); - therefore I modified nano /usr/share/themes/PiXflat/gtk-3.0/gtk-contained.css - I modified the following parameter: modified codeline But that did not change the header size at all. How can I enlarge the header buttons? What did I do wrong? (If additional system informationa are required, please feel free to ask)
Florian (71 rep)
Mar 15, 2025, 08:52 PM
3 votes
3 answers
2608 views
How to automate switching between light and dark modes?
I am a user of [Linux Mint](https://en.wikipedia.org/wiki/Linux_Mint). One feature I often wish I had in Linux is the ability to switch between light and dark modes depending on the time of the day, as in macOS and mobile devices. I have put together the following script for switching from light to...
I am a user of [Linux Mint](https://en.wikipedia.org/wiki/Linux_Mint) . One feature I often wish I had in Linux is the ability to switch between light and dark modes depending on the time of the day, as in macOS and mobile devices. I have put together the following script for switching from light to dark mode:
#!/bin/bash
notify-send "Switching to dark mode"
gsettings set org.cinnamon.desktop.wm.preferences theme Mint-Y-Dark
gsettings set org.cinnamon.desktop.interface gtk-theme Mint-Y-Dark
gsettings set org.cinnamon.theme name Mint-Y-Dark
and I have another one for the opposite direction
#!/bin/bash
gsettings set org.cinnamon.desktop.wm.preferences theme Mint-Y
gsettings set org.cinnamon.desktop.interface gtk-theme Mint-Y
gsettings set org.cinnamon.theme name Mint-Y
Currently, I run these manually when I want to switch between the two themes. Most programs respect the OS-wide theme meaning this method works surprisingly well! However, there are three problems that I would like to solve with this approach: 1. Automated switching between light/dark modes depending on the time of day (as in macOS). I tried using cron and anacron but they don't work well for this purpose. When my computer is turned on after a period of being off, I would like it to realise that the time to switch has passed and perform the mode switch (as in macOS and various mobile devices); 2. I would like my terminal (GNOME Terminal, Cinnamon default) to switch from a light theme to a dark theme (and vice versa); and 3. I would like my text editor (Emacs) to load a light/dark theme. Even getting just (1) to work would be quite nice!
affibern (131 rep)
Nov 18, 2020, 09:15 PM • Last activity: Nov 14, 2024, 01:07 PM
0 votes
1 answers
238 views
How can I install a booting screen on Arch?
I am a very long term Ubuntu-based OS users, and I immensely appreciate the time Canonical and other distributions put into have aesthetically pleasing boot screens (no shame in other distributions that don't have one!). [![Ubuntu Boot Screen Example][1]][1] Is it possible to manually install these...
I am a very long term Ubuntu-based OS users, and I immensely appreciate the time Canonical and other distributions put into have aesthetically pleasing boot screens (no shame in other distributions that don't have one!). Ubuntu Boot Screen Example Is it possible to manually install these upon other distros, such as Arch?
14311 (1 rep)
Oct 13, 2024, 08:29 PM • Last activity: Oct 13, 2024, 09:42 PM
78 votes
5 answers
69974 views
getopt, getopts or manual parsing - what to use when I want to support both short and long options?
Currently I'm writing a Bash script which has the following requirements: * it should run on a wide variety of Unix/Linux platforms * it should support both short and (GNU) long options I know that `getopts` would be the preferred way in terms of portability but AFAIK it doesn't support long options...
Currently I'm writing a Bash script which has the following requirements: * it should run on a wide variety of Unix/Linux platforms * it should support both short and (GNU) long options I know that getopts would be the preferred way in terms of portability but AFAIK it doesn't support long options. getopt supports long options but the BashGuide recommends strongly against it: > Never use getopt(1). getopt cannot handle empty arguments strings, or > arguments with embedded whitespace. Please forget that it ever > existed. So, there still is the option of manual parsing. This is error-prone, produces quite some boilerplate code, and I need to handle errors by myself (I guess getopt(s) do error-handling by themselves). So, what would be the preferred choice in this case?
helpermethod (2052 rep)
Jan 29, 2013, 11:37 AM • Last activity: Aug 13, 2024, 01:54 PM
0 votes
2 answers
11062 views
Can't access to Ubuntu Interface when I open Ubuntu, just Terminal inteface
Please I have a serious problem using Ubuntu. I'm beginner in using Linux environment, I will try to explain the problem as good as can The problem is that I can't have access to Linux interface I have both systems Linux and Windows on the same computer. When I turn on the computer I choose which sy...
Please I have a serious problem using Ubuntu. I'm beginner in using Linux environment, I will try to explain the problem as good as can The problem is that I can't have access to Linux interface I have both systems Linux and Windows on the same computer. When I turn on the computer I choose which system I want to use, normally when I chose Linux, I can use the interface, the terminal... like Windows. But today when I tried to use Linux, it demands me my login and password and then only the terminal opened, I didn't have access to the interface. In other words, I can use just Terminal window and command lines, and I don't see any folders, I don't have this interface. Linux Interface Also, there's short msg in The terminal that says that there's a new version of Ubuntu 20.4, I wonder if I should update ! To solve the problem, if it's so please tell me the commands I should use to solve the problem. Thank you very much, I really appreciate your help. Edit-1When i first click to the power button i wrote my login and password Terminal window opens !! Edit-1: i just want to add some aditional informations , yesterday i uninstall some packages related to R and R studion ( statistical software ) , i don"t if this is related to the problem , also i had some size problem that appears ( only 700 MO left..)
Reda (103 rep)
Oct 23, 2020, 10:57 AM • Last activity: Jul 17, 2024, 11:45 AM
0 votes
1 answers
334 views
What keycodes can be used for keyboard shortcuts in Nemo file manager?
In the Nemo file manager (the default in Linux Mint), what keycodes can be used to specify non-alphabetic keyboard keys? Specifically, I want to assign Ctrl + ; to a built-in Nemo function. I have no difficulty assigning the function to a key combination like Ctrl + e (by modifying the `accels/nemo`...
In the Nemo file manager (the default in Linux Mint), what keycodes can be used to specify non-alphabetic keyboard keys? Specifically, I want to assign Ctrl+; to a built-in Nemo function. I have no difficulty assigning the function to a key combination like Ctrl+e (by modifying the accels/nemo file), but I want to assign it to Ctrl+;. What I've tried: - ; - \; - semicolon - Semicolon - SEMICOLON - KEY_Semicolon - KEY_SEMICOLON - KC_Semicolon - KC_SEMICOLON - KP_Semicolon - KP_SEMICOLON The only one that seems to come close is: - semicolon Using that keycode will list the desired keyboard shortcut in Nemo's UI, but it does not work. Nemo seems to reject any of the other keycodes above, and does not even display them in its UI.
Amazon Dies In Darkness (281 rep)
Apr 20, 2024, 03:33 AM • Last activity: Apr 20, 2024, 04:51 AM
0 votes
2 answers
643 views
text mode and emulated text mode: how do they work?
I'd like to know the difference(s) between the text mode that one gets, for example, by opening "terminal" in GNOME, and the text mode that one interacts with in a server linux distribution which doesn't have a GUI. I know that the program named "terminal" is an emulator. I'd like to know about the...
I'd like to know the difference(s) between the text mode that one gets, for example, by opening "terminal" in GNOME, and the text mode that one interacts with in a server linux distribution which doesn't have a GUI. I know that the program named "terminal" is an emulator. I'd like to know about the mechanisms behind the scenes. How is, for example, a call to scanf() managed in these two cases? If "terminal" realizes GUI-based text mode, what is the source of the other kind of text mode? (I mean the code showing the blinking cursor and moving it, etc.) the BIOS? the kernel? a process in user space?
apadana (133 rep)
Oct 31, 2023, 06:10 AM • Last activity: Oct 31, 2023, 11:06 AM
49 votes
3 answers
35030 views
What is a "modeless" vs a "modal" editor?
I just started learning Linux and all my previous experience of programming has been using the Windows platform. I came across Vim editor and read that it is **modal editor** unlike notepad which is termed as a **modeless editor**. Can you please explain what is the difference between modeless and m...
I just started learning Linux and all my previous experience of programming has been using the Windows platform. I came across Vim editor and read that it is **modal editor** unlike notepad which is termed as a **modeless editor**. Can you please explain what is the difference between modeless and modal editors in general?
Geek (6868 rep)
Dec 6, 2012, 06:10 AM • Last activity: Jul 3, 2023, 04:02 PM
0 votes
2 answers
150 views
Window Manager: Add the maximize option to any window (even if the UI disabled the option)
Some graphical programs make use of a window which the user can scale unlimitedly but still disable the maximize option (for whichever dumb reason). [EDIT]: The window might be a subwindow of another window (don't know the technical term), and it is the only window (of the application instance) that...
Some graphical programs make use of a window which the user can scale unlimitedly but still disable the maximize option (for whichever dumb reason). I use Linux Mint with Cinnamon, using X11 I believe. Although this would help temporarily, I am ultimately not looking for a window manager command line which resizes the window but I want to change the window flags themselves, without having access to the source code and without being specific to one particular program. Rant: It appears to me that some programmers or UI designers want to force their view on a program, inconsiderate of the needs and preferences of the end user, ignorant of what actually is the optimal work flow in the end. enter image description here
Semnodime (397 rep)
Mar 26, 2023, 11:37 PM • Last activity: Mar 27, 2023, 12:35 AM
3 votes
2 answers
1053 views
How do I filter out "useful" mounts from /etc/mtab or /proc/mounts
I'm currently writing a basic filesystem abstraction (in C++) and I need to get a list of "useful" mounted devices on linux. I've found the function(s) `getmntent`/`getmntent_r` that allow to me to easily parse `/etc/mtab` and `/proc/mounts` however many of the mounted devices aren't "useful" (such...
I'm currently writing a basic filesystem abstraction (in C++) and I need to get a list of "useful" mounted devices on linux. I've found the function(s) getmntent/getmntent_r that allow to me to easily parse /etc/mtab and /proc/mounts however many of the mounted devices aren't "useful" (such as: /sys/fs/cgroup/net_cls). In particular I'm attempting to find mounts which related to a physical device, partition or network share/drive. The closest I've found is checking if the mnt_fsname (device name) starts with a /, which in the case of my system narrows it down to: - / - /boot - /run/media/[username]/0CA8-1F2D - /run/media/[username]/14E0-3E80 Which appears to be what I want (the latter two being partitions on a usb stick). I haven't had a chance to try out a network share/device with it though. Basically this is meant to be an approximation of windows-like 'drives', hence why I'm interested in physical devices etc., but doesn't prevent a library user navigating to unlisted devices if they so-desire. So basically the question boils down too: - If the device name in a mount entry starts with a / is it guarenteed to be a physical device, partition or network share? - Will I be leaving out anything particularly important/useful? - Is there a better/more precise way to do this?
NotVeryMoe (133 rep)
Jul 29, 2016, 05:16 PM • Last activity: Feb 6, 2023, 10:30 PM
0 votes
1 answers
238 views
Prevent notifications from being dismissed when clicked?
On all the desktop environments I've used, clicking a browser notification makes it disappear. Is there some way to prevent this behavior to make it more in line with Windows/macOS where clicking a notification does not dismiss it?
On all the desktop environments I've used, clicking a browser notification makes it disappear. Is there some way to prevent this behavior to make it more in line with Windows/macOS where clicking a notification does not dismiss it?
Slbox (313 rep)
Dec 11, 2021, 08:07 PM • Last activity: Jan 23, 2023, 10:00 AM
3 votes
3 answers
25273 views
Is there a GUI to edit/add users and groups
Is there a graphical tool that shows (edits) *all* users and groups on the system, so that one can avoid editing `/etc/passwd` and `/etc/group` directly? [GNOME Settings](https://gitlab.gnome.org/GNOME/gnome-control-center) (`gnome-control-center`) *Users* view lets only see desktop users and no gro...
Is there a graphical tool that shows (edits) *all* users and groups on the system, so that one can avoid editing /etc/passwd and /etc/group directly? [GNOME Settings](https://gitlab.gnome.org/GNOME/gnome-control-center) (gnome-control-center) *Users* view lets only see desktop users and no groups at [all](https://help.gnome.org/users/gnome-help/stable/user-accounts.html.en) .
Scrooge McDuck (1102 rep)
Feb 11, 2020, 03:01 PM • Last activity: Oct 24, 2021, 09:59 AM
1 votes
1 answers
1764 views
Matching opening and closing if statements in shell script (if...fi) using PHPStorm, vscode
I hava bunch of these nested if..then...fi 's if [ "${var}" = "NA" ] then if [ "$var" != "SAM" -a "$fileFormat" != "XED" -a "$Format" != "TED" -a "$Format" != "ESTA" ] then echo "ERROR: Input file format not recognised" echo "use --help for more information" exit 1 fi #convert esta to ted - start if...
I hava bunch of these nested if..then...fi 's if [ "${var}" = "NA" ] then if [ "$var" != "SAM" -a "$fileFormat" != "XED" -a "$Format" != "TED" -a "$Format" != "ESTA" ] then echo "ERROR: Input file format not recognised" echo "use --help for more information" exit 1 fi #convert esta to ted - start if [ $fileFormat = "ESTA" ] then if [ $ENO != "NA" ] then ENO=$(greadlink -e ${ENO} ) fi if [ -z "$output" ] then echo "WARNING" echo "No output directory specified. Using current working directory, " $(pwd)/OUTPUT output=$(pwd)/OUTPUT fi InputTed=$(greadlink -e ${Inputted}) #greadlink - to canonicanize/normalize to standard format mkdir -p ${output} cd ${output} output=$(greadlink -e $(pwd) ) DIRECTORY=$(pwd) In a more than 2000 line shell script. I would like to click on the opening if, and have the closing fi highlighted to easily navigate the code like it works with braces. I'm using PHPStorm, vscode but happy to try any free text editor that could do it out of the box or any plugin to these tools.
San Emmanuel James (121 rep)
Aug 17, 2018, 01:10 PM • Last activity: Oct 10, 2021, 06:50 PM
2 votes
1 answers
1257 views
Why do terminal emulators still need to emulate specific, old terminals?
I more or less understand the distinction between what is called a "terminal" and a "terminal emulator". The former referring to an actual hardware peripheral connected to something like a mainframe computer to interface with it textually, and the latter being a piece of software that allows to do t...
I more or less understand the distinction between what is called a "terminal" and a "terminal emulator". The former referring to an actual hardware peripheral connected to something like a mainframe computer to interface with it textually, and the latter being a piece of software that allows to do the same thing, but just in software and not with actual hardware. I also gathered that nowadays, terminal emulators in fact emulate the way that these old terminals (like the popular VT100) sent keycodes to the computer, pretending to be them so-to-speak. But in the course of doing some troubleshooting and config on my Linux system, and encountering the odd and somewhat annoying quirks that made me ponder all this, I did some research and found that those devices almost exclusively used a keyboard to interact with the computer (I can't imagine that the mouse was created early enough for these sorts of terminals to support them), and because they belonged to the early era of computing, these keyboards were significantly different to the ones we usually encounter today, and have largely been standardized. Why am I pointing this out? Well, things like function keys, or caps-lock and num-lock were not usually encountered on a lot of terminals back then (at least I know that function keys are a relatively recent features of keyboards). Because terminal emulators emulate these terminals, they have to use workarounds to be able to support these keys, like sending special escape sequences. In my experience, this makes dealing with the keyboard and the way that the terminal emulator handles it a lot more complicated than it should probably be (at least, that's how it seems to me). In fact, I started pondering all of this when trying to figure out why trying to define keyboard shortcuts involving function keys above F4 didn't work on some terminal emulators, and why pressing such a function key inside a lot of terminal emulators (at least all the ones I've had any experience with) input a '~' on the command-line. (It's because these keys send escape sequences instead of dedicated keycodes since the terminals that are being emulated did not have function keys, and either they are not properly recognised or something, or the '~' that ends the escape sequence is interpreted as an actual character that the user typed.) I mean, why do we have to emulate these ancient terminal devices that don't even exist anymore (at least that I know of) in the first place? I get that we need software to allow users to interface with the computer with a keyboard to input commands, and therefore to "emulate a terminal", but what benefit is there for a terminal emulator to still pretend to be one of these devices, whose capabilities were substantially different from that of modern keyboard interfaces, and lacking in some regards when compared to modern keyboards? Unless I am missing something, it seems to me inappropriate to do so given that modern devices have evolved in capabilities and features since these terminals. It also seems like unnecessary complexity: why not consider the keyboard to just be something as simple as a panel of buttons which all send a specific standard keycode to the computer, instead of dealing with escape sequences to represent keys that didn't exist decades ago? If there was still a major need to support these old terminals I would probably understand, but I can't imagine that they are still so widely used that this is still a concern. Why is the combination of a computer's monitor and keyboard not considered a terminal in its own right, and why don't we define a way for a terminal emulator to send text to a computer that doesn't rely on how old terminals did it, and takes into account how computer interfaces have changed since then?
Thomas.M (315 rep)
Jul 21, 2021, 02:26 PM • Last activity: Jul 21, 2021, 06:54 PM
0 votes
0 answers
1082 views
How to fix Liquorix problems
I installed liquorix as a lubuntu kernel to improve the performance of the computer in tasks that require graphics processing, such as simulators or games, the problem is that you see lines like glitches when a graphic object is behind another, how can I solve this problem ? Equipment details: [![en...
I installed liquorix as a lubuntu kernel to improve the performance of the computer in tasks that require graphics processing, such as simulators or games, the problem is that you see lines like glitches when a graphic object is behind another, how can I solve this problem ? Equipment details: enter image description here Error example: enter image description here
John Doe (101 rep)
Apr 28, 2021, 04:32 PM
4 votes
1 answers
4301 views
LibreOffice install language package from official dnf-repositories
If I check under * tools > options > Language Settings > Languages > Language of > User interface: it only contains "Default - English (USA)" and "English (USA)", however I would like to change to "German (Germany)" or "Deutsch (Deutschland)" So I would like to install the german language pack of Li...
If I check under * tools > options > Language Settings > Languages > Language of > User interface: it only contains "Default - English (USA)" and "English (USA)", however I would like to change to "German (Germany)" or "Deutsch (Deutschland)" So I would like to install the german language pack of LibreOffice on Fedora (Linux).
JoKalliauer (579 rep)
Apr 16, 2021, 11:36 AM
0 votes
2 answers
309 views
How to replace an email in a (PHP) file from the command line without sed?
I have a PHP file which contains an email address as with `$to = "example-1_2@example-1_2.com";` and I want to replace the email address to another directly from the terminal. The following code based on [another similar code by Kuslanada][1] worked: read new_email_address sed -i 's/$to = ".*";$/$to...
I have a PHP file which contains an email address as with $to = "example-1_2@example-1_2.com"; and I want to replace the email address to another directly from the terminal. The following code based on another similar code by Kuslanada worked: read new_email_address sed -i 's/$to = ".*";$/$to = "'"$new_email_address"'";/' FILE Kuslananda told me in comments (paraphrasing): * My expression is **the concatenation of** a single-quoted string, a double-quoted string (the variable), and then another short single-quoted string --- As a non professional sysadmin I might use sed once in two years and I find its syntax somewhat difficult to remember and confusing for someone like me which doesn't work with it on a regular basis (the quoting rules clued by Kuslananda there are a bit confusing for me, let along when entire sed commands are normally single-quoted by themselves).
Perhaps there is a way to make Kusalananda's command more "intuitive" or "accessible" for some others and myself. Maybe some backslashes to break the command to pieces would help or maybe another utility would be better for me to do such text replacement. --- How to replace an email in a (PHP) file from the command line **without** sed?
timesharer (13 rep)
Mar 13, 2021, 06:47 PM • Last activity: Mar 15, 2021, 06:04 AM
2 votes
0 answers
414 views
i3: Firefox opens window on inactive workspace
I encountered a weird behavior with Firefox in i3. It sometimes opens on random inactive workspace, which is kind of annoying. I have no customization regarding Firefox in my i3 config. I have no idea, why this happens or how can I debug it. I suspect it may be related to switching on and off the ad...
I encountered a weird behavior with Firefox in i3. It sometimes opens on random inactive workspace, which is kind of annoying. I have no customization regarding Firefox in my i3 config. I have no idea, why this happens or how can I debug it. I suspect it may be related to switching on and off the additional monitor using arandr or switching to and back from another user, but I can't quite reproduce it. It doesn't seem to occur with any other application, but that may be affected by my behavior (I keep my terminals open, but I close Firefox and open it usually as first, when I get back to computer). I know I can use assign, but I'd like to avoid that. Edit: * I noticed that Firefox opens at active workspace and then switches to one of inactive ones.
ziima (121 rep)
Feb 15, 2021, 07:02 PM • Last activity: Feb 16, 2021, 07:18 AM
Showing page 1 of 20 total questions