Recent Questions - Unix & Linux Stack Exchange |
- How to use hostname rather than IP address for website
- Remove the title bar but keep 3 buttons(X-quit application, square-minimize/maximize, "_" - minimize it to task manager) in KDE
- Created /etc/nologin
- Sending logs between rsyslog (client) and syslogd (server)
- Bazel Remote Cache not working with certificates/TLS
- Returning to main menu after calling a different script
- Manjaro hangs upon rebooting and shutting down
- How to use a pattern when doing for loop of files in directory
- Packet delay after route is added over new WiFi connection
- How do I change powerline?
- Need help booting a REHL 6.1 virtual image - Kernel panic - Unable to mount root fs
- Lenovo Carbon X1 Gen 8 Error getting sensor data: thinkpad/#2: Can't read
- zsh: How to store the return code of a statement without triggering `set -e`?
- How to display most common words from a file of text, with equally common words displayed alphabetically
- Remove text between "<!-- text here -->" tags where "<!-- text here \n\n -->" may be on different lines
- Splitting a line in a file into two columns
- Can you customise the UI / Icons used when running an app via sudo?
- Sort images by aspect ratio then use MPV to browse
- What can I do to fix occasional lagging of terminal emulator?
- Keep powerline prompt on ssh
- Routing traffic through VPN using Raspberry PI
- Evince: Hotkey for highlighting
- Evince keyboard shortcut to highlight text
- Powerline and gdb
- Unable to delete files from within smplayer
- urxvt powerline symbols
- tmux and Powerline: working configuration
- How do I change which version of Qt is used for qmake?
- Vim powerline with broken encoding
How to use hostname rather than IP address for website Posted: 10 Aug 2021 10:50 AM PDT I've set up a VirtualBox VM which has an apache webserver running. I've created a webpage and I can navigate to it via the IP address on devices in the lan. However I want to use a hostname rather than an IP address. I've used /etc/hosts and put the hostname next to the IP address, and on the VM it loads the website, but when I try another device on the lan it cannot go to the website using the hostname, only by the IP address. How can I get other devices connected to the lan to go to the website by using the hostname? |
Posted: 10 Aug 2021 10:48 AM PDT In KDE plasma, by default, the title bar always shows on top of any application window. I could find a way to remove the title bar: go to system settings, click on window management, and specify window rules. Doing that hides the title bar. But it also makes disappear the three buttons: X for quitting an application, and the other two - minimize/maximize the window size and minimizing that to task manager and running the app background. Is there any way to remove the title bar but keep the 3 buttons in the application window? Please let me know. |
Posted: 10 Aug 2021 10:47 AM PDT I added /etc/nologin and now of course I can't login as a regular user or even as root. CentOS Linux release 7.7.1908 (Core) Is there a way around this? |
Sending logs between rsyslog (client) and syslogd (server) Posted: 10 Aug 2021 10:43 AM PDT I have two machines. First of them runs embedded Linux and the second one runs FreeBSD. The machine with Linux has When I run In my In my And in my |
Bazel Remote Cache not working with certificates/TLS Posted: 10 Aug 2021 10:17 AM PDT I'm runnig Bazel remote cache from https://github.com/buchgr/bazel-remote inside docker, by runnig the following commands to start the http and grpc server: So far I can run some tests from my client by running one of the following commands: But when I put my server to run over TLS by adding the following flags to the server invocation: Although I created a root CA certificate to sign both my server's and clients' certificates, I'm not able to access my server via https or grpcs. The following errors are being raised for https: And the following for grpcs: Is this problem related to the fact the root CA certificate is self signed itself or am I doing something else stupid? |
Returning to main menu after calling a different script Posted: 10 Aug 2021 10:47 AM PDT I am having a menu based script which calls for an additional shell script. The challenge is that, after the additional shell script is finished, instead of returning to the main menu, it exits completely. The code is something like this: backup-script.sh is having the code: Tried sourcing the script and then using return function, but it didn't helped (or I have done something wrong). Any idea on how to return to the main menu after the backup-script.sh is finishing running? Thank you! |
Manjaro hangs upon rebooting and shutting down Posted: 10 Aug 2021 09:50 AM PDT I've been having issues with Manjaro. Both restarting and shutting down just freeze the computer in this state: /dev/sda1: recovering journal I'm using the latest LTS kernel (Linux 5.10.53-1). As for past solutions I've tried adding noefi to kernel options, but sadly it didn't help. As for what comes up when I do «sudo journalctl -xe»: kernel: mce: [Hardware Error]: Machine check events logged Characteristics if needed: If any more information is needed to solve this issue, I'll be happy to provide it. Why not ask this question on the Manjaro forum? |
How to use a pattern when doing for loop of files in directory Posted: 10 Aug 2021 09:44 AM PDT I'm a novice bash scripter. Need help with the following. I have a script that uses inotifywait to watch a directory. Another process will drop a csv file in nightly. The file will be of the format filename_YYYYMMDD.csv. My script takes the oldest timestamped file and renames it filename.csv, so it's ready to be consumed by another external process. In a perfect world, one files comes in, gets renamed without timestamp, and is processed. The external process moves the file to an archived folder. If the external process is down, the timestamped files will accumulate in the folder. My script renames the first file when it hits the directory, but the rest will go untouched until that first file is archived. Then my script finds the oldest file, renames it, and exits. When the timestamped file first hits the directory, my script checks for a timestamp in the name: This works fine. I check for a file already existing named filename.csv. If none, this file gets renamed. When a file is processed and archived, the script detects that file is gone, gets the basename and looks for the next oldest file matching that basename, renames it, and exits. Finally, here's where I need help. How can I modify the below code to look for the oldest file matching a pattern? If I just look for basename, I pick up a malformed filename, like filename_YYMM, which I don't want. Right now $mybasename is just filename. How can I get the for to use a regex like: Thanks! |
Packet delay after route is added over new WiFi connection Posted: 10 Aug 2021 09:41 AM PDT Network Setup
ProblemI control which WiFi interface streams the video using a static route to the receive pipeline for each interface In the above scenario, traffic is routed over I notice that there is a problem that manifests as one or two lost / delayed frames on the video receive pipeline if I reroute the video traffic over a connection that has not been used yet. Using the above scenario as an example, I start off with both interfaces authenticated, associated, and 4-way handshake complete, but the route for The strange thing is, after I experience this blip in the video and stay connected to the same APs, I can add and remove the route for Things I've looked atI've run What else can I look at to diagnose and fix this issue? |
Posted: 10 Aug 2021 09:26 AM PDT I installed powerline with pacman, I modified a config file, but nothing changed, what do I need to do? i'm kind of wondering if the default configs are somehow taking precedence. In my zshrc note: before I get this answer, I can't use powerlevel10k because it conflicts with history-search-multi-word unless there's a valid replacment for that. Then I opened a new tab, but the user is still in the prompt. What am I doing wrong? |
Need help booting a REHL 6.1 virtual image - Kernel panic - Unable to mount root fs Posted: 10 Aug 2021 09:19 AM PDT I'm trying to virtualize a REHL 6.1 image. I restored a clonezilla backup on a .vmdk and I'm trying to get the image to boot successfully in the latest release of VirtualBox 5. Unsurprisingly, I'm getting a Kernel panic. Bootloader is lilo. Disk is on a SCSI (BusLogic) controller in VBox. 500MB of ram. Chipset PIIX3. Audio,Network,Serial, USB all disabled. I would like to preface this post by saying that I am not the one who designed/partitioned this image and that my knowledge of linux is average at best. Please see the screenshots. Image 1 Image 2 fstab: lilo.conf: When i try to boot with SystemRecovery live cd, it fails at "Checking root filesystem" and says my root partition (/dev/sda3) is mounted. Cannot continue, aborting. If i select Control-D for normal startup, it performs fsck on the other 2 partitions(/dev/sda2 and /dev/sda4) and then it just hangs. I've used a livecd and I've succesfully mounted the partitions and even did a fsck on them to see if that would help. No luck. All clean btw. Not sure if the AIC7xxx SCSI driver is causing problems... obviously the VM doesn't have an Adaptec SCSI controller... Any help would be greatly appreciated. |
Lenovo Carbon X1 Gen 8 Error getting sensor data: thinkpad/#2: Can't read Posted: 10 Aug 2021 09:10 AM PDT I have I was working on getting |
zsh: How to store the return code of a statement without triggering `set -e`? Posted: 10 Aug 2021 08:55 AM PDT Suppose I want to capture the return code of If I use If I use So how do I get the return code? |
Posted: 10 Aug 2021 09:26 AM PDT I am quite close so far, the script will sort the words and display most common to least common however when the words are equally common they need to be sorted. Any ideas greatly appreciated! |
Posted: 10 Aug 2021 11:00 AM PDT I have a text file I wish to remove all instances of I have this which does remove the tags and their contents as desired, but not when the The result using the above expression is showing the tag still present How do I remove all instances of using sed or grep or any other tool ? |
Splitting a line in a file into two columns Posted: 10 Aug 2021 08:30 AM PDT I want to split a line into two coloumns I want the colon(:) in the above line as seperator and output like below Can someone help me ? |
Can you customise the UI / Icons used when running an app via sudo? Posted: 10 Aug 2021 09:41 AM PDT Is there a way in Linux to set the desired icon sets and themes used when running apps as sudo. At the moment if I, for example, type ... Then if I click Save As then the file save dialog doesn't match my own desktop environment settings, it seems to use default icons and the default theme (Adwaita). Is there anywhere this can be configured so that they match (or even better I'd like to make them largely the same but with different colours to indicate I'm running elevated). I'm running Gnome on Manjaro if it's relevant. I have tried a direct gsettings command line call: but that doesn't work, it did point me to look at doing my next thing which explained kind of why this didn't work. I have tried running Is this an OS limitation or is there somewhere deeper down that I can configure the 'default' settings? As I was interested, I also ran this... To confuse my brain further, rather than returning Adwaita (which is what's used in the LATER ON.... I logged on directly as root and set root up with the configuration that I want (similar to my main UI setup but with big glaring red danger colours) and that made no difference at all to what appears when AND ALSO... After being told that I got exactly the same result as with using The elevated privilege apps seem to operate using their own default configurations for how to display which don't seem to honour the logged in user (which makes sense to me) or root which... doesn't. My original question remains - How do I change the UI settings used by the elevated apps? |
Sort images by aspect ratio then use MPV to browse Posted: 10 Aug 2021 10:36 AM PDT I want to sort images by aspect ratio, then use MPV to browse them, and I got some codes from Google: This is a output: Then I made some adaptations to fit my need: It works, but isn't perfect. It can't deal with filename with space and |
What can I do to fix occasional lagging of terminal emulator? Posted: 10 Aug 2021 10:00 AM PDT My terminal emulators are lagging occasionally. It's not heavy a lag. May be once in 20-30 mins( I think). The terminal becomes unresponsive and all the characters I typed during lag appears suddenly. It's not happening in any other app (even in SMPLAYER during 1080p video playback). The lag occurs even during low memory usage(nearly 1 GB free). I thought there might be a problem in Update3: But in zsh I used very simple Prompt string without any color. Still it was lagging. |
Posted: 10 Aug 2021 09:35 AM PDT I have a powerline bash prompt in iterm2 on my MacOS client and I want to keep the prompt when I ssh into different servers. I regularly ssh into: a local headless vm, a server for school assignments, and a seedbox, and I'd rather not keep 4 different configurations synced, plus I can't install powerline on my school's server. Is there some way to keep my prompt when I ssh to a different machine? |
Routing traffic through VPN using Raspberry PI Posted: 10 Aug 2021 09:02 AM PDT I have a setup like this: Issue I am having & goal: Interface example: Routing table: 45.36.81.212 is my VPN OS: Raspbian Would forwarding wlan0 to ppp0 do the trick or do I need to tamper with br0? |
Evince: Hotkey for highlighting Posted: 10 Aug 2021 08:35 AM PDT I couldn't find a hotkey for activating the highlight feature. Did I miss something or is there no such key combination? |
Evince keyboard shortcut to highlight text Posted: 10 Aug 2021 08:37 AM PDT Is there a keyboard shortcut to highlight text in Evince? To place a note? Or a way to setup a custom keyboard shortcut? |
Posted: 10 Aug 2021 09:28 AM PDT |
Unable to delete files from within smplayer Posted: 10 Aug 2021 09:35 AM PDT smplayer has an option that allows deleting the currently playing video. This worked well in windows 7, and even in debian 9 till about an year back. It brings up a confirmation dialog box, and if I click 'yes' it deletes the file and starts playing the next file in the playlist. I tried it recently (now debian 10 buster, both kde & gnome. Both mplayer and mpv engine.) and it does not delete the file (When I click 'Delete File from Disk', nothing happens. Closing the app, also does not delete the file.). Tried files placed on both 'home' (ext4) and ntfs, same result. Could you tell me why/how it can be solved? If you have smplayer installed, could you please test it? To get the delete button onto the toolbar (its not available by right clicking on the video, even last year when it was working well it was like that), you will need to: Right click on the toolbar. Select "Edit Main Toolbar". Then find and select 'Delete File from Disk' from the 'Available Actions'. Now it will appear on the toolbar and can be used when a video is playing. Another test: I opened smplayer from the terminal, then opened a file using Ctrl+F and then tried to delete the file, hoping so get some error messages, but there was nothing!
|
Posted: 10 Aug 2021 09:28 AM PDT I use urxvt. So i was playing with oh-my-zsh themes and found out that some of them have "The PowerLine Symbols". (if you do not know what it is - take a look. https://gist.githubusercontent.com/agnoster/3712874/raw/screenshot.png ) So basically you have a set of patches to fonts, which add these extra characters. Or fonts can be downloaded, put info ~/.fonts && fc-cache -vf ~/.fonts && voila!. If you do not have a fully powerline-awair font, you can chain fonts like that: URxvt*font: xft:Terminus:pixelsize=14:antialias=true,xft:Inconsolata\ for\ Powerline:pixelsize=14:antialias=true In this case you use regular Mr.Terminus, and when it lacks characters, i guess, it goes to Ms.Inconsolata. So, my problem looks like this: http://5cm.ru/code/i6/PUno.png I have tried so far: The screenshot is of URxvt*font: xft:Terminess Powerline:pixelsize=15:antialias=true My urxvt is definitely built with unicode support. I run gentoo and double checked the useflags - unicode3 -vanilla. The fonts are downloaded to ~/.fonts. Here is a sample output: Help appreciated! Update 1: i forgot to mention one thing - the font actualy do work outside urxvt: konsole + urxvt: hxxp://img.5cm.ru/view/i6/Kqzo.png so the question is - what can be done to urxvt? Here are my USE flags: Update 2: I managed to make another symbol appear :) i read, that the "modern" way of adding Powerline characters support is by adding the PowerlineSymbols.otf file to ~/.fonts and ~/.config/fontconfig/conf.d/10-powerline-symbols.conf This way i not have this: hxxp://img.5cm.ru/view/i6/2TBR.png see, now there are 4 out of 7. |
tmux and Powerline: working configuration Posted: 10 Aug 2021 09:33 AM PDT BackgroundI found very interesting the Powerline project. After several attempts, I managed to get it to work correctly for Vim. Then I did proceed with enabling it for tmux, by pasting the following line in my It doesn't work as expected. This is the way it looks at the moment (plus the line above I pasted in the configuration file). QuestionHow can I get it to work as expected?
Rewording the questionI'm trying to get Powerline work correctly for tmux. The left part ( Further informationVim version: |
How do I change which version of Qt is used for qmake? Posted: 10 Aug 2021 09:41 AM PDT I feel like there should be a simple way of doing this, but my googlefu is failing so I'd really appreciate some info on how to switch (or even permanently change) which version of Qt is used when doing qmake. If I ask which version I get the following: I've install QtCreator, but I'm not sure where to go from here. |
Vim powerline with broken encoding Posted: 10 Aug 2021 09:34 AM PDT I trying to learn using vim, I am enjoining a lot, but I copied the vimrc from github and I would like to understand what is causing the break of powerline encoding. .
Could this be the problem and if yes, how can I fix it? |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment